Open Collections

UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

Dynamic modeling for simulation and control of a circulating fluidized bed combustor Muir, James Ridley 1995

Your browser doesn't seem to have a PDF viewer, please download the PDF to view this item.

Item Metadata


831-ubc_1995-983272.pdf [ 7.43MB ]
JSON: 831-1.0058619.json
JSON-LD: 831-1.0058619-ld.json
RDF/XML (Pretty): 831-1.0058619-rdf.xml
RDF/JSON: 831-1.0058619-rdf.json
Turtle: 831-1.0058619-turtle.txt
N-Triples: 831-1.0058619-rdf-ntriples.txt
Original Record: 831-1.0058619-source.json
Full Text

Full Text

DYNAMIC MODELING FOR SIMULATION AND CONTROL OF ACIRCULATING FLUIDIZED BED COMBUSTORbyJAMES RIDLEYMUIRB.Sc., The University of Calgary, 1986M.Sc., The University of Calgary, 1989A THESIS SUBMITTED IN PARTIAL FULFILLMENT OF THE REQUIREMENTS FORTHE DEGREE OF DOCTOR OF PHILOSOPHYinTHE FACULTY OF GRADUATE STUDIES(Department of Chemical Engineering)We accept this thesis as conformingto the required standardTHE UNIVERSITY OF BRITISH COLUMBIAFebruary 1995© James Ridley Muir, 1995In presenting this thesis in partial fulfilment of the requirements for an advanceddegree at the University of British Columbia, I agree that the Library shall make itfreely available for reference and study. I further agree that permission for extensivecopying of this thesis for scholarly purposes may be granted by the head of mydepartment or by his or her representatives. It is understood that copying orpublication of this thesis for financial gain shall not be allowed without my writtenpermission.(Signature)___________________________Department of Ci,,4i l)i71”tThe University of British ColumbiaVancouver, CanadaDate /Z/qcDE.6 (2/88)ABSTRACTCirculating fluidized bed (CFB) technology has been recognized by industry as a viablegas/solid contacting process with applications including combustion for power generation andwaste incineration, pyrolysis, calcining, and catalysis. One important and growing use ofcirculating fluidized beds is as utility boilers. In this application, the combustor spends mostof its life under transient conditions, following the demand of the steam-side. This, in additionto stricter emission requirements, has led to the increasing importance of understanding thetransient nature of the circulating fluidized bed combustion (CFBC) process, specifically forcontrol system design and development. In response to this need, the work in this thesis wascarried out to investigate the dynamic behaviour of a circulating fluidized bed combustor.A dynamic model has been developed which predicts the transient behaviour of thecombustion temperature, rate of heat removal by the in-bed heat exchanger, and the flue gasoxygen concentration for a circulating fluidized bed combustor. These three factors fullydefine the combustor at any time. The model was incorporated into a simulator to provide anenvironment for the reproduction of the combustion process on computer. The simulatorpredicts the behaviour of the combustor under either manual or automatic control. In order toaccommodate the chemical kinetic behaviour of various fuels, separate tests were carried outin a bench scale fluid bed combustor to provide order-of-magnitude estimates of the kineticparameters to approximate the reactivity of these fuels in the combustor. To obtain anestimate of the solids circulation rate, experiments were performed to measure this rate as afunction of gas velocity, P/S air ratio, and average riser solids loading. These tests werecarried out using a novel time-of-descent method referred to as hlineandsinkerH in which acage immersed in the moving packed bed descends attached to a chain which passes through asealed port to the outside of the upper region of the standpipe.Validation of the model is provided through comparison with step response testscarried out on the UBC pilot CFB combustor. Discrepancies are attributed to unmodelled11disturbances rather than from basic model concepts. Further validation, necessary to ensurethe applicability of the simulator to control development, is provided through a comparison ofcontrol models identified experimentally on the pilot CFB to those obtained by simulation.Favourable comparison leads to the conclusion that the dynamic model is suitable for use incontrol simulation.In parallel with the modeling work, advanced control methods were applied to thepilot CFB combustor. This included process identification through open-loop PRBS testingand time series analysis, application of single loop Generalized Predictive Control (GPC)control of combustor temperature, and multivariable control of the combustor to meet heatremoval, flue gas oxygen concentration, and combustion temperature specifications. Theidentification methods tended to provide higher order control models than probably necessary.This was due to operational limitations of the pilot plant leading to the inability to collectsufficient data, and is not expected to be a problem on an industrial scale. Although modelorder is not minimal, since the controller may well operate under conditions of changing fUeltype, where knowledge of the model for the new fuel is lacking, it would be advantageous toemploy an over-parameterized model in order to be able to account for changing dead-timeand possible inverse responses. Finally, the applicability of GPC within a CFB combustorframework is demonstrated. The complete control structure takes advantage of the differingtime constants of the various parameters within the system. The water outlet temperaturecontrol setpoint can be realized in the order of a few seconds with solids circulation rate; fluegas oxygen (notwithstanding optimization), can be maintained within ± 1% with a detunedPD controller adjusting the total air flow based on this measurement; and a GPC controlleradjusts the rotary valve control signal in order to maintain combustion temperaturerequirements with fuel feedrate.111TABLE OF CONTENTSAbstract iiTable ofContents ivList of Tables ixList ofFigures xAcknowledgements xviiiChapter 1 INTRODUCTION 11.1 Background 11.2 Fluidization 21.3 The Circulating Fluidized Bed 31.4 The CFB Boiler 41.5 Dynamic Modeling and Control 71.6 Outline ofThesis 9Chapter 2 FAST FLUIDIZATION AND THE 12CIICULATING FLUIDIZED BED COMBUSTOR2.1 Introduction 122.2 Hydrodynamics ofFast Fluidization 122.2.1 Regimes ofFluidization 132.2.2 Axial Structure ofFast Fluidization 192.2.3 Radial Solids Distribution 232.2.4 Gas Flow 252.3 Heat Transfer 252.4 CFB Boiler 322.4.1 Riser 322.4.2 Gas/Solids Separation 35iv2.4.3 Solids Return Systems 352.5 Dynamic Modeling 40Chapter 3 EXPERIMENTAL FACILITIES 443.1 Reactor Shaft 443.2 Fuel Feed System 473.3 Heat Transfer Surfaces 493.4 Solids Recycle Systems 523.5 Flue Gas Cooling and Cleaning 543.6 Gas Sampling System 543.7 Instrumentation, Data Acquisition, and Control 553.8 Modifications for Current Project 593.9 Fuels and Inerts Characteristics 60Chapter 4 MODEL DESCRIPTION 634.1 Introduction 634.2 Mass Balance 644.2.1 Solids Distribution 664.2.2 Solids Balance Zones 714.2.3 Gas Balance Zones 754.2.4 Combustion 764.3 Heat Balance 804.3.1 Heat From Reaction 804.3.2 Heat Removed by Heat Exchanger 804.3.3 Heat Loss to Refractory 844.3.4 Heat Added to Solids Returned to Riser 864.4 Model Summary 884.5 Simulation 90VChapter 5 PROCESS IDENTIFICATION AND CONTROL 915.1 Introduction 915.2 Overview of Control 945.3 Generalized Predictive Control 985.4 Adaptive Control 1055.5 Process Identification 1085.5.1 Plant Testing 1105.5.2 Data Analysis 1105.5.2.1 Transfer Function Structure 1125.5.2.2 Noise Model Structure 1175.5.2.3 Parameter Fitting 1185.5.2.4 Diagnostic Checking 119Chapter 6 RESULTS AND DISCUSSION - CONTROL 120IMPLEMENTATION6.1 Introduction 1206.2 Basic Control Loops 1216.2.1 AirFlowControl 1216.2.2 Solids Circulation Control 1246.3 Temperature Control 1276.3.1 Single Loop Temperature Control 1276.3.1.1 Run#12 1296.3.1.2 Run#13 1406.3.1.3 Run#14 1516.4 The Multi-loop Control Structure 1626.4.1 Tuning the PID Loops 1716.4.2 Model Identification for GPC Control 1716.4.3 Controller Testing 184Chapter 7 RESULTS AND DISCUSSION - SIMULATOR 1977.1 Introduction 197vi7.2 Model Validation 1987.2.1 Transfer Function Comparison 1987.2.2 Step Testing Comparison 2047.3 Model Characterization 2157.3.1 Effect ofChar Size 2157.3.2 Effect ofHeat Transfer Area 2207.3.3 Controls Test Simulation 2247.4 Summary 233Chapter 8 SUMMARY AND CONCLUSIONS 2348.1 Summary 2348.2 Conclusions 2388.3 Recommendations for Further Work 239Nomenclature 241References 249Appendix A KINETIC RATE DETERMiNATION 255A. 1 Introduction 255A.2 Experimental Apparatus 256A.3 Theory and Analysis 261A.4 Results 270Appendix B SOLIDS CIRCULATION RATE 277MEASUREMENTB.1 Theory 277B.2 Experimental Apparatus 278viiB.3 Experimental Results 281Appendix C PROGRAMLISTING - DATALOGGING AND 293CONTROL FOR THE UBC PILOT CFBCOMBUSTORAppendix D PROGRAMLISTING - DYNAMIC SIMULATOR 338OF A CIRCULATING FLUIDIZED BEDCOMBUSTORAppendix E PROGRAMLISTING - TIME SERIES 375ANALYSIS AND TRANSFER FUNCTIONFITTINGviiiLIST OF TABLES1.1 Comparison ofFBC Boiler Systems (adapted from Thomas et al., 61986)3.1 Key Features of Gas Analysers 573.2 Proximate and Ultimate Analyses ofFuels 613.3 Screen Size Distribution ofOttawa 50 Silica Sand 624.1 Thermal Properties ofMaterials ofConstruction 85A. 1 Comparison ofOrcutt Bubbling Bed Model with Well-Mixed 265AssumptionA.2 Results ofFuel Reactivity Experiments 276B. 1 Results of Circulation Rate Experiments 283xLIST OF F[GURES1.1 Modeling for Process Control 82.1 Regimes ofFluidization (from Yerushalmi et al., 1978) 142.2 Axial Bed Voidage Characterization - profiles of cross-sectional 16overage bed voidage determined by Li et al. (1981) for a 8 m tallcolumn of diameter 90 mm2.3 Regime ofFast Fluidization according to Karri and Knowlton (1991) 182.4 Typical Bed Voidage Profiles in Fast Fluidization (from Li et al., 201981)2.5 Typical Radial Variance in Solids Flux - profiles from a column of 152 24mm diameter with alumina ofmean particle size of 64 tm by RhodesCt al. (1988)2.6 Illustration of Solids Distribution in the Riser of a CFB (from Senior 26and Brereton, 1992)2.7 Typical Membrane Wall Geometiy from Wu (1990) 272.8 Variation ofLocal Heat Transfer Coefficient with Height (from 29Mahalingam and Kolar, 1993)2.9 Effect ofAbrupt Exit on Vertical Profile ofAxial Solids Loading 34(from Senior and Brereton, 1992)2.10 U-Beam Separator (from Basu and Fraser, 1991) 362.11 CFB System Pressure Balance (from Rhodes and Geldart, 1987) 383.1 Simplified Schematic of CFBC Facility at UBC 453.2 View ofPrincipal Refractory Lined Reactor Column 463.3 Primary Air Distributor 483.4 Membrane Wall Heat Transfer Surface 503.5 Hairpin Heat Transfer Surface Configuration 51x3.6 Eductor Configuration for Secondary Cyclone Return 533.7 Gas Sampling System 563.8 Thermocouple and Pressure Tap Locations 584.1 Modeling Zones for Material Balance in Primary Loop of the CFB 654.2 Sketch Showing Cyclone Dimensional Parameters (from Leith and 74Licht, 1972)5.1 Simplified Block Diagram Showing Internal Model Control (IMC) 96Structure5.2 Impulse Response Functions ofVarious Transfer Function Models 1166.1 Effect of Compressor Fluctuations on Flue Gas Oxygen 123Concentration with Manual Setting ofAir Flowrate (Highvale coal,combustor temperature = 835 °C, gas velocity 7 m/s, P/S air ratio =3)6.2 Operation of Solids Loading Controller Showing Its Success in 125Following Step Changes in Setpoint of Solids Loading in Riser(Highvale coal, combustor temperature = 855 °C, gas velocity = 7.3m/s, P/S air ratio = 2)6.3 Temperature Response - Run #12 (Highvale coal, GPC temperature 132controller test, gas velocity = 7.5 mis, P/S =2, average solids loading= 120 kg/rn3)6.4 Rotary Valve Speed - Run #12 (Highvale coal, GPC temperature 135controller test, gas velocity 7.5 m/s, P/S =2, average solids loading= 120 kg/rn3)6.5 CO Response during Run #12 (Highvale coal, GPC temperature 137controller test, gas velocity = 7.5 mis, P/S =2, average solids loading= 120 kg/rn3)6.6 Adaptation ofB Polynomial - Run #12 (Highvale coal, GPC 139temperature controller test, gas velocity = 7.5 mis, P/S =2, averagesolids loading = 120 kg/rn3)6.7 Temperature Response - Run #13, Test #1 (Highvale coal, GPC 142temperature controller test, gas velocity = 7.5 mis, P/S =2, averagesolids loading = 120 kg/rn3)x6.8 Adapted Model Coefficients - Run #13, Test #1 (Highvale coal, GPC 143temperature controller test, gas velocity = 7.5 mIs, P/s =2, averagesolids loading = 120 kg/rn3)6.9 Rotary Valve Control Signal - Run #13, Test #1 (Highvale coal, GPC 144temperature controller test, gas velocity = 7.5 mIs, P/S =2, averagesolids loading = 120 kg/rn3)6.10 CO Response - Run #13, Test #1 (Highvale coal, GPC temperature 146controller test, gas velocity = 7.5 m/s, P/S =2, average solids loading= 120 kg/rn3)6.11 Rotary Valve Speed - Run #13, Test#2 (Highvale coal, GPC 147temperature controller test, gas velocity = 7.5 mIs, P/S =2, averagesolids loading = 120 kg/rn3)6.12 Rotary Valve Speed - Run #13, Test #3 (Highvale coal, GPC 148temperature controller test, gas velocity = 7.5 m/s, P/S =2, averagesolids loading = 120 kg/rn3)6.13 CO Response - Run #13, Test #2 (Highvale coal, GPC temperature 149controller test, gas velocity = 7.5 m/s, P/S =2, average solids loading= 120 kg/rn3)6.14 CO Response - Run #13, Test#3 (Highvale coal, GPC temperature 150controller test, gas velocity 7.5 m/s, P/S =2, average solids loading= 120 kg/rn3)6.15 Temperature Response - Run #13, Test#2 (Highvale coal, GPC 152temperature controller test, gas velocity = 7.5 m/s, P/S =2, averagesolids loading = 120 kg/rn3)6.16 Temperature Response - Run # 13, Test #3 (Highvale coal, GPC 153temperature controller test, gas velocity = 7.5 m/s, P/S =2, averagesolids loading = 120 kg/rn3)6.17 Temperature Response - Run #14, Test #1 (Highvale coal, GPC 154temperature controller test, gas velocity = 7.5 m/s, P/S =2, averagesolids loading = 120 kg/rn3)6.18 Rotary Valve Signal - Run #14, Test #1 (Highvale coal, GPC 155temperature controller test, gas velocity = 7.5 m/s, P/S =2, averagesolids loading = 120 kg/m3)xli6.19 CO Concentration - Run #14, Test #1 (Highvale coal, GPC 156temperature controller test, gas velocity = 7.5 mIs, P/s 2, averagesolids loading = 120 kg/rn3)6.20 Temperature Response - Run #14, Test#2 (Highvale coal, GPC 158temperature controller test, gas velocity = 7.5 mIs, P/S =2, averagesolids loading = 120 kg/rn3)6.21 Solids Loading - Run #14, Test #2 (Highvale coal, GPC temperature 159controller test, gas velocity = 7.5 mIs, P/S =2, average solids loading= 100 kg/rn3)6.22 Rotary Valve Speed - Run #14, Test #2 (Highvale coal, GPC 160temperature controller test, gas velocity = 7.5 mIs, P/S =2, averagesolids loading = 120 kg/rn3)6.23 Time Variation ofModel Coefficients - Run #14, Test #2 (Highvale 161coal, GPC temperature controller test, gas velocity = 7.5 m/s, P/S =2,average solids loading = 120 kg/rn3)6.24 Rotary Valve Signal - Run #14, Test #2 (Highvale coal, GPC 163temperature controller test, gas velocity = 7.5 m/s, P/S =2, averagesolids loading = 120 kg/rn3)6.25 Temperature Response - Run #14, Test #2 (Highvale coal, GPC 164temperature controller test, gas velocity 7.5 m/s, P/S =2, averagesolids loading = 120 kg/rn3)6.26 CO Concentration - Run #14, Test #2 (Highvale coal, GPC 165ternperature controller test, gas velocity 7.5 m/s, P/S =2, averagesolids loading = 120 kg/rn3)6.27 Investigated Control Structure 1676.28 Schematic ofHeat Exchanger Outlet Water Temperature Controller 1696.29 Schematic ofFlue Gas Oxygen Concentration Controller 1706.30 Schematic of Combustor Temperature Control Loop 1726.31 Rotary Valve Signal during PRBS Test Run #48 (Syncrude coke) 1766.32 Temperature during PRBS Test Run #48 (Syncrude coke) 177xiii6.33 Fuel Feedrate during PRBS Test ofRun #48 - Averaged over 16 178Minute Intervals (Syncrude coke)6.34 Comparison of Step Response ofModels Obtained from Time Series 180Analysis and the GPC Adaptor - Run #48 (Syncnide coke)6.35 Comparison of Transfer Function Step Responses from PRBS Test 181(Run #22) and Adapted Variables (Run #40)6.36 Comparison of Step Response ofPRBS Test (Run #44) and Adapted 183Model (Run #45)6.37 Temperature during Run #49 (Syncrude coke) 1856.38 Rotary Valve Signal during Run #49 (Syncrude coke) 1876.39 Oxygen during Run #49 (Syncrude coke) 1886.40 Air Flow during Run #49 (Syncrude coke) 1896.41 Water Outlet Temperature during Run #49 (Syncrude coke) 1906.42 Solids Loading during Run #49 (Syncrude coke) 1916.43 A Polynomial Coefficients during Run #49 (Syncrude coke) 1956.44 B polynomial Coefficients during Run #49 (Syncrude coke) 1967.1 Possible Models for Process Sampled Discretely 1997.2 Fuel Feedrate for Simulated PRBS Test with Highvale Coal 2007.3 Temperature Response ofPRBS Test Simulation with Highvale Coal 2017.4 Comparison of Step Responses ofDiscrete Time Models for Highvale 202Coal7.5 Comparison of Step Responses ofDiscrete Time Models for Conoco 203Coke7.6 Comparison ofRotary Valve Signal with 10-Minute-Averaged Fuel 206Feedrate (Highvale coal, Run #52)7.7 Transient Comparison of Temperature for Highvale Coal (Run #52) 207xiv7.8 Transient Comparison ofFlue Gas Oxygen Concentration for 208Highvale Coal (Run #52)7.9 Transient Comparison ofHeat Exchanger Water Outlet Temperature 210for Highvale Coal (Run #52)7.10 Step Test Comparison of Temperature for Conoco Coke (Run #51) 2127.11 Step Test Comparison ofFlue Gas Oxygen Concentration for Conoco 213Coke (Run #51)7.12 Step Test Comparison ofHeat Exchanger Outlet Water Temperature 214for Conoco Coke (Run #51)7.13 Predicted Effect ofParticle Size on Temperature Response (Conoco 217coke, solids loading = 120 kg/rn3,total air feedrate = 205 kg/h, P/Sratio = 2)7.14 Effect ofFuel Particle Size on Bed Carbon Inventory (Conoco coke, 219solids loading = 120 kg/rn3, total air feedrate = 205 kg/h, P/S ratio =2)7.15 Effect ofParticle Size on Oxygen Concentration - Conoco Coke 221(Conoco coke, solids loading 120 kg/rn3,total air feedrate = 205kg/h, P/S ratio 2)7.16 Effect ofBed Inventory on Temperature in Large Scale Unit (Conoco 223coke, solids loading = 120 kg/rn3,total air feedrate = 205 kg/h, P/Sratio = 2, char diameter = 900 jim)7.17 Temperature during Simulated Controls Test (Conoco coke, P/S ratio 225=2, char diameter = 900 jim)7.18 Fuel Feedrate during Simulated Control Test (Conoco coke, P/S ratio 226= 2, char diameter = 900 jim)7.19 Oxygen during Simulated Control Test (Conoco coke, P/S ratio =2, 227char diameter = 900 jim)7.20 Total Air Flow during Simulated Control Test (Conoco coke, P/S 229ratio = 2, char diameter = 900 jim)7.21 Water Temperature during Control Test Simulation (Conoco coke, 230P/S ratio = 2, char diameter = 900 jim)xv7.22 Average Solids Loading during Simulated Controls Test (Conoco 231coke, P/S ratio =2, char diameter = 900 pm)7.23 Coefficients during Simulated Controls Test (Conoco coke, P/S ratio 232= 2, char diameter = 900 pm)A. 1 Schematic Diagram ofthe 50 mm Diameter Fluidized Bed Reactor 257A.2 External View of the Bench Scale Fluidized Bed Reactor 258A.3 Details of the Bench Scale Reactor Setup 259A.4 Typical Carbon Dioxide Response Curve during Char Burnout for 271Highvale Coal Char Particles of Initial Diameter of 1.6 mm at aReactor Temperature of 810 °CA.5 Effect ofReaction Order, n, on Calculated Kinetic Rate Constant, 272Hlghvale Coal Char with Initial Particle Diameter of 1.6 mm, ReactorTemperature = 810 °C, A = 6 (kmoIIm2s•(kmoIJ3)),Ea = lx 10(kJ/kmol)A.6 Effect ofTemperature on Kinetic Rate Constant, Highvale Coal Char 273with Initial Particle Diameter of 1.6 mm, n = 0.9, A = 6 (kmollm2.s.(kmol/m3)”), Ea lxi0 (kJ/kmol)A.7 Confirmation ofDetermined Kinetic Parameters, Highvale Coal Char 275with Initial Particle Diameter of 1.6 mm, Reaction Temperature = 850°C, n 0.9, A = 1092 (kmo1Jm.s.(kmo1J3)),Ea = 8.0733x10(kJ/kmol)B. 1 Schematic ofLine-and-Sinker System 280B.2 Effect ofRiser Solids Loading on Net Solids Flux for a Gas Velocity 284of 8 mIs (Ottawa 50 sand, total inventory = 100 kg, combustortemperature = 850 °C)B.3 Effect ofRiser Solids Loading on Net Solids Flux for a Gas Velocity 285of 7.3 mIs (Ottawa 50 sand, total inventory = 100 kg, combustortemperature = 850 °C)B.4 Effect ofRiser Solids Loading on Net Solids Flux for a Gas Velocity 286of 6.7 mIs (Ottawa 50 sand, total inventory = 100 kg, combustortemperature = 850 °C)B.5 Effect ofP/S Air Ratio on Net Solids Flux for a Riser Solids Loading 287of 90 kg/rn3 (Ottawa 50 sand, total inventory = 100 kg, combustortemperature = 850 °C)B.6 Effect ofP/S Air Ratio on Net Solids Flux for a Riser Solids Loading 288of 120 kg/rn3 (Ottawa 50 sand, total inventory = 100 kg, combustortemperature = 850 °C)B.7 Effect ofP/S Air Ratio on Net Solids Flux for a Riser Solids Loading 289of 150 kg/rn3 (Ottawa 50 sand, total inventory = 100 kg, combustortemperature = 850 °C)B.8 Effect of Gas Velocity on Net Solids Flux for a Riser Solids Loading 290of 90 kg/m3(Ottawa 50 sand, total inventory = 100 kg, combustortemperature = 850 °C)B.9 Effect of Gas Velocity on Net Solids Flux for a Riser Solids Loading 291of 120 kg/rn3 (Ottawa 50 sand, total inventory = 100 kg, cornbustortemperature = 850 °C)B.10 Effect of Gas Velocity on Net Solids Flux for a Riser Solids Loading 292of 150 kg/rn3 (Ottawa 50 sand, total inventory = 100 kg, combustortemperature 850 °C)xviiACKNOWLEDGEMENTSI would like to express my sincere appreciation to a number of people whoseefforts contributed greatly to the completion of this thesis.To my supervisors, Dr. Clive Brereton, Dr. John R. Grace, and Dr. C. Jim Lim, fortheir ideas, discussion, and support provided throughout this project in addition to theirguidance and encouragement both towards this work as well as in personal areas beyondthe scope of this project.The operation and maintenance of the UBC pilot CFB combustor involved thecollective effort of a large number of people over the years. In particular the contributionsofHugh Ackroyd, Dr. Robert Legros, Dr. Richard Senior, Dr. Jiansheng Zhao, Dr. AdamLuckos, Dr. Serge Julien, Irene Hwang, Polly Wong, Wenqi Luan, Fenglei Liu, Dr. SengLim, and Lawrence Sung are greatly appreciated.Financial support from the Natural Sciences and Engineering Research Council,the U.B.C. Graduate Fellowship Fund, and Energy, Mines and Resources Canada isgratefully acknowledged.Most of all, I would like to express my gratitude and thanks to my parents for theircontinuous support and encouragement.xviiiCHAPTER 1- INTRODUCTION1.1 BackiroundThe purpose of the work reported in this thesis was to investigate the dynamics of theCirculating Fluidized Bed (CFB) combustion process. This objective has been achieved byconsideration of the problem both in terms of process control and modeling. Advancedcontrol methods have been applied to the University of British Columbia (UBC) pilot scaleCFB combustor. These have included various dynamic identification methods as well asimplementation of the Generalized Predictive Control (GPC) algorithm for prediction andcontrol. A dynamic simulator is described which was developed specifically for application tocontrol structure design. Most crucial to this simulator is a dynamic model providingresponses of key variables for circulating fluidized bed combustion.Although the concept of fast fluidization was first identified over 50 years ago, it isonly recently that industry has recognized the viability and the substantial advantages of thisfluidization regime. This commercial interest has sparked a flood of researchers into the areaof fast fluidization and CFB technology. An inadequate level of understanding exists because1of the complexity and relative newness of the area. The deluge of research activity has led toabundant controversy.The field can be characterized as having a fast-growing and continually expandingknowledge base. Research includes investigation ofmicro/macro scale phenomena, as well asgross operational characterization. Although incomplete, the current level ofunderstanding isadequate for extensions to the time domain. These extensions may be found wanting due toignorance of some basic phenomena, but are timely as a beginning to the understanding of thedynamics of industrial CFB process equipment. As more of the basics of CFBs are resolved,the time dependencies of these systems will become clearer.1.2 FluidizationFluidized beds are used in both physical and chemical processes involving solidparticles. Gas/solid reactions are of prime importance in applications such as those in themetallurgical and chemical industries, the processing of stones and ceramics, and in fuel andenergy engineering (Weiss et al., 1988). Such reactions occur at the surface or within theporous structure of individual particles and involve a complicated interplay of heat transfer,mass transfer, and reaction kinetics.Both heat and mass transfer involve a number of steps. For endothermic reactions,heat is supplied to the gas, transferred by convection to the surface of the solid, and thentransferred to the interior by conduction. Gaseous reactants are contacted with the particle bya similar mechanism of diffusion to the particle surface and pore diffusion into the particle. Incases where the kinetics of the gas/solid reaction can be considered fast (e.g., t112 < 100 ms),heat and mass transfer often become the rate controffing steps (Behie, 1987). For suchreactions, conversion is a function of the rate at which the gaseous components can besupplied to and removed from the particle and the uniformity of temperature. A higherparticle specific surface results in reduced internal heat and mass transfer resistances.Externally, high relative velocities between gas and solids reduce the boundary layer2surrounding the particle, giving lower external heat and mass transfer resistances. For theabove reasons, over the past few decades there has been a trend toward using finer-grainedsolids and higher gas velocities in industrial practice. This trend culminated in thedevelopment of the Circulating Fluidized Bed.1.3 The CircuIatin Fluidized BedHigh gas velocities and small particles lead to conditions of fast fluidization (Chapter2). Characterized by a high carryover of solids, discussion of this hydrodynamic regimecannot be limited to the reaction zone. Key to operation under the regime of fast fluidizationis the separation of gas and solids and the continuous return of solids to the reaction zone.The Circulating Fluidized Bed (CFB) is a technology developed to operate under theseconditions. It consists of a gas/solids contacting zone (riser), some form of gas/solidsseparation device (typically one or more cyclones), and a device for returning the solids to thebase of the riser (commonly a non-mechanical valve). These components are addressed indetail in Chapter 2.Over the past 15 years, CFB technology has received rapidly growing attention.Industry quickly recognized the broad potential of high velocity fluidization. Among itsunique advantages are greater gas/solids contacting efficiency, short solids residence time (ofthe order of seconds), and independent control of gas and solids retention times. Applicationsof fast fluidization technology for chemical reactions include combustion for power generationand waste incineration, pyrolysis, calcining, and catalytic processes. Currently, one of themore significant applications of this technology has been in the form of CFB boilers. Theseboilers provide many advantages over conventional fluidized bed steam and electrical powergeneration processes.31.4 The CFB BoiJerThe use of fluidized bed combustion (FBC) for industrial steam and hot water boilersbegan in the 1960’s and has grown rapidly since. Advantages such as the ability to cope withvarying fuel quality, and control of sulphur and nitrogen oxides, have encouraged thedevelopment of this technology (Thomas et a!., 1986). Atmospheric pressure FBC boilersystems may be divided into three general categories: shallow bubbling bed boilers, deepbubbling bed boilers, and circulating fluidized bed boilers.Shallow bubbling beds employ bed depths of 15 to 30 cm and fluidization velocities of2.0 to 3.0 mIs. These beds are very sensitive to oversize particles which tend to cause defluidization. Oversized particles may arise either through introduction with the solids feedstream or by formation within the bed due to agglomeration.Deep bubbling beds are characterized by typical depths of 70 to 110 cm and fluidizingvelocities of 1.5 to 2.5 mIs. These beds are more suited for higher ash coals (> 10% ash) asbed material removal systems can be employed.Circulating fluidized bed boilers operate in the regime of fast fluidization (Chapter 2).Typical gas velocities range from 4.5 to 9 m/s leading to a continuous gradation in suspensiondensity, with the depth of a lower dense zone typically from 0.4 to 1.5 m. The CFBcombustor particulate material generally consists of sand, ash from the fuel, combusting fuelor char particles, and limestone for SO2 capture. These solids circulate through the system ina well mixed state, providing high combustion efficiency, good SO2 removal, and favorablerates of heat transfer. Large, unentrainable stones may be added to the bed to enhance thedense zone in the combustor (Stockdale and Stonebridge, 1985).Ash agglomeration is virtually non-existent in CFB combustors. The high degree ofmixing and recycle prevent hot spots from occuring in the reactor which could causeagglomeration. In addition, the vigourous motion gives little opportunity for bonds to formbetween particles. The ability to handle agglomerating fuels is commonly enhanced by using adiverging conical lower section.4Table 1.1, reproduced from Thomas et al. (1986), compares FBC boiler systems.Shallow bubbling beds are often preferred because of the simplicity of their design and theirsmall size. The low height requirement allows for their retro-fitting of existing non-FBCfacilities as FBC boilers. Deep bubbling beds allow both oil and gas firing and some tolerancein solids fuel variations. Strict emission control is possible with FBC systems, with limestoneused to capture SO2 and low temperature/staged combustion giving considerable reductions inNO emniisions relative to conventional combustion/boiler systems.As can be seen from Table 1.1, CFB combustion (CFBC) systems provide versatileand favourable combustion characteristics. Their only disadvantage is the requirement of atall combustion chamber with large combustion zone volumes, and large cyclone solidscollection systems. These size requirements make the CFB combustor capital-intensive, butsuperior capabilities often make them most cost-effective, especially for large-scale utilityboilers.FBC systems burning coal typically operate at combustion temperatures below 900 °C.At these temperatures very little thermal NO is formed. (NOr emissions become a problem inpoorly designed fluidized beds or with those beds operated at other than design conditionswhere hot-spots can develop, increasing temperatures to levels leading to elevated NOformation). CFBC systems commonly introduce secondary air at several points along the riserto reduce NO even further. This method of combustion promotes reduction of NO bycarbon and carbon monoxide, e.g. as shown by Thomas et al. (1986):NO+C—*1/2N2+ O (1.1)NO+CO—* 1/2N2+C0 (1.2)Also, and more importantly, staging prevents formation by reducing the partial pressure ofoxygen in the primary zone.5Table 1.1: Comparison of FBC Boiler Systems(adapted from Thomas et al, 1986)fuels andcombustioncompactcombustor,particularlycompatible withshell boilersoverall boiler size isreduced comparedto conventionalfiring due toenhanced heattransferoverall boiler size isoften relativelylarge and can be adisadvantageboiler design or sizeCategory Shallow Bubbling Deep Bubbling CirculatingBeds Beds Fluidized Bedssimple designgas-firing oil and gas firing oil and gas firingcapabilities, oil to a capabilities capabilitieslesser extentcoal grade tolerance proper designs can proper designs cansuperior to stoker utilize solid fuels burn almost anyboilers which are combustible solid orincompatible with liquid, includingconventional firing wastessome waste-burning fuel flexibility broad fuel flexibilityabilities during operation during operationadequate broad waste superiorcombustion combustion combustionefficiency possibilities efficiencygood combustionefficiencymodest SO2 SO2 removal is superior SO2removal is possible easily achieved removal is obtainedusing limestone for with low sorbentbed material useemissionsNO may be limited NO can be superior NOby temperature controlled very well control with stagedcontrol and other with staged combustiontechniques - combustion-6CaJS molar ratios used in conventional CFB combustors range from 1.5 to 3 resultingin 90 to 95% sulphur capture. For the same ratios, sulphur capture tends to be somewhatlower (as low as 60%) in conventional fluidized beds where larger limestone particles areused.Most CFB boilers are capable of turndown to 33 to 25% of full load, with loadfollowing in the range of 4 to 10%/mm. (Sahagian, 1985 and Kullendorif et al., 1986). Morecomplex CFBC systems with incorporation of external heat exchangers can allow turndown toas low as 13%, with load following as high as 20%/mm. (Beisswenger et al., 1985; Stockdaleand Stonebridge, 1985).1.5 Dynamic Modeling and ControlTo date there is only limited understanding of the dynamic behaviour of CFBs. Thishas led to extreme difficulties in the development of reliable design methods and controlmodels. What is needed is a model which can describe both the internal riser and externalloop of the CFB, predicting both steady-state behaviour and dynamic responses. Steady-stateanalysis is required for the design of a CFB around a given operating condition. Dynamicresponse is necessary for both physical design and, more importantly, for design andimplementation of a reliable control structure. Such a model could be used not only forsimulation of a control structure, but also in controllers as a predictor.For control purposes, a model can be developed based on either a mechanistic or anempirical approach. The general development paths for each are presented in Figure 1.1. Ineither case, the ultimate form of the control model is a z-domain or discrete t-domainrepresentation of the plant. This is a common form used for process control as, at this time,supervisory and other new generation controllers are predominantly digital computer based.The plant is monitored and calculations are carried out on discrete time intervals rather thancontinuously, as with their simpler analog counterparts.7Figure 1.1: Modeling for Process Controlmass, heat, etc.balances andauxiliary equationsdeterministicinputs(step, pulse,sine wave)usestochasticinputs(random,pseudo-random)collectinput/outputdatacollectinput/outputdatadeterminestructureandparametersdeterminestructureandparameters8A mechanistic model is required for macroscopic understanding of the combustor’soperation. Ideally such a model is developed directly through mass and heat balances andother theoretical equations. In many instances, empirical correlations need to be incorporatedto complete the model. Although often incorporating a degree of empiricism, this type ofmodel is much more valuable than a truly empirical model because it enables design andsimulation, as well as control, whereas the latter is only useflul for control purposes around alimited range of tested operating conditions. Empirical models, on the other hand, may befound to be more reliable in situations where the process is complicated or poorly understood.In this case the model is developed directly from plant data driven by deterministic (step,pulse, sine function, etc.) or stochastic (random or pseudo-random) disturbances.The most important benefit of simulation in control development is the opportunity itaffords to investigate not only control parameters, but also a large number of control schemes.Simulators offer a particular advantage in upgrading current controls, and in developing andoptimizing new units, in that they enable this to be done off-line. Once on-line, althoughlimited dynamic testing is possible, complete testing of a particular control system is difficultdue to demands on the performance of the unit. The ability to perform these tests off-lineavoids disturbances to the plant and enhances the opportunity for controls upgrading anddesign. In addition, simulators are invaluable for training those inexperienced with theoperation of a particular unit.1.6 Outline of ThesisAlthough the CFB has been in industrial use for a number of years, it is not atechnology that is well understood. In particular, to date there has only been limitedinvestigation of the transient behaviour of these units. Industrial acceptance of CFBCtechnology is justification enough to merit research in this area. Though already economicallyviable for industrial application, understanding of the dynamic behaviour is desirable for moreefficient combustion, resulting in lower fuel and operating costs and conservation of energy9resources. Knowledge of the dynamic behaviour should permit more advanced controlstructures to be developed. Ultimately, this would lead to improved operation aroundoptimum conditions, resulting in lower fuel/air consumption and even stricter control ofemissions. “To develop advanced control systems of CFB boilers, dynamic mathematicmodels describing the transient behaviour of the CFBC are required” (Mon et al., 1991).This thesis presents the results of research in two related areas - dynamic modeling andcontrol. A dynamic model is developed which focusses on the prediction of the key variablesfor control. The model is then incorporated into a simulator for controls investigation.Developmental methods of advanced control and a demonstration of application to CFBcombustion are included.Chapter 2 provides a brief overview of fast fluidization with respect to hydrodynamicsand heat transfer. The application of CFBs to boiler technology is described, focusing onvarious configurations currently used industrially. A survey of the current state of dynamicmodeling is also presented.The main experimental set-up used in this work, the UBC pilot scale CFB combustoris described in Chapter 3. The equipment description is relatively brief as detailed reports arereadily available elsewhere. This chapter focuses on the modifications required for the presentwork.Chapter 4 describes the dynamic simulator developed for the study of control of CFBcombustion. Assumptions necessary for modeling, and those required to simplif,i the solutionfor this application, are specified and justified.Chapter 5 is a discussion of relevant aspects of process control. The theory behindGeneralized Predictive Control (GPC) and methods of process identification are presented.GPC has been described as a general control algorithm providing stability and robustness.The reasons for its choice as the control method in this work are discussed in this chapter.Identification methods are presented, and the theory underlying the methods employed in thisresearch is introduced.10Chapter 6 includes the experimental implementation of minor control loops as well asidentification for, and implementation of, the GPC algorithm for combustor temperaturecontrol of the UBC pilot scale CFB combustor. The temperature controller is demonstratedboth in a single loop application as well as within the framework of a control structure forcomplete combustion control.Chapter 7 provides a comparison/verification of the simulator with experimental data.An analysis of the proposed model is included. This was an investigation of the effect of charsize, total bed inventory, and heat loss on the dynamic response of the model. In addition, thecombustion control structure implemented in Chapter 6 is demonstrated on the simulator.Chapter 8 concludes the thesis with a summary of findings. Recommendations areprovided for further investigations into the dynamics of CFB combustion both from a generalmodeling point ofview and for process control.11CHAPTER 2- FAST FLUIDIZATION AND ‘flhI CIRCULATING FLUIDIZED BEDCOMBUSTOR2.1 IntroductionThis chapter provides a brief overview of key aspects of fluidization, focusing on theregime of fast fluidization utilized in Circulating Fluidized Beds. Fast bed hydrodynamics aswell as heat transfer mechanisms are introduced. References are provided to a number ofrecent reviews for more in-depth study. The CFB is discussed with regard to boilerapplications, particularly concentrating on the physical aspects and variants of units employedin industry. Finally, the current state of transient modeling of the CFB combustor is surveyed.2.2 Hydrodynamics of Fast FluidizationThe hydrodynamic behavior of the fast fluidized bed has been the focus of muchresearch in recent years. Since the recognition of the significant advantages of this regime(circa. 1970), researchers have been endeavoring to keep up with the extensive applications inindustry through fundamental understanding and modeling for scale-up, design, and processoptimization.12Recent reviews (Grace, 1990; Horio, 1991; Basu and Fraser, 1991) describe researchon the hydrodynamics and highlight major controversies. In view of this, only a briefdefinition and overview of the behaviour of solids and gases in fast fluidized beds arepresented here to provide the reader with a basic understanding of this complex regime.2.2.1 Re2imes of FluidizationAs the velocity of a gas passing through a bed of solids is increased, the bed traversesa number of characteristic operating modes or regimes. Figure 2.1 (Yerushalmi et al., 1978)shows the commonly accepted regimes of gas/solid contacting. The transition between eachsuccessive regime is directly related to the properties of the solids and gas. At the point ofminimum fluidization, a packed bed expands slightly so that particles move about freely withfrequent collisions. An increase in gas velocity results in bubbling fluidization, characterizedby the coexistence of two phases - a bubble phase (essentially no solids) and the surroundingdense (or emulsion) phase. It is commonly assumed that the emulsion phase is in a state ofminimum fluidization and that any excess gas supplied to the bed above that required toachieve minimum fluidization passes through the bed as bubbles. [f the column diameter isrelatively small, the bubbles may grow to be similar in diameter, resulting in slug flowbehaviour.A further increase in gas velocity results in a more pronounced two-phase characterwhich, with increasing velocity, gradually diminishes to a condition of increasing uniformity inwhich any voids present are transient and of small scale. The bed is then referred to as beingin a turbulent state. A definite, though more diffuse, upper bed surface exists, together with amore dilute dispersion or suspension in the freeboard. The turbulent regime extends up tovelocities approaching the transport velocity. As the transport velocity is approached, there isa sharp increase in particle carryover. Beyond the transport velocity, a continuous feed ofparticles to the bottom of the column is required to maintain a relatively dense suspension.This is the transport regime.13TRANSPORTR 5ER’REACTORSLIPVELOCITYUtBUBBUNGFLUIDIZEDBEDFigure 2.1: Regimes of Fluidization(from Yerushalmi et al., 1978)FASTFIWDIZEDBEDTURBULENTFLU1D2EDBEDI — C IEtnç14Operation in the transport regime offers a striking advantage over that of the othersdescribed above. Above the transport velocity, solids are fully entrained through the columnand the density of the suspension depends not only on the gas velocity but also on the rate atwhich solids are fed to the base of the column. It is this added ability to control the solidsconcentration that makes this regime unique. At low solids rates, the particles are carriedupwards in straight paths with slip velocities close to the terminal velocity of individualparticles. This has been termed dilute phase flow. With increasing solids feed rates, the flowthrough the column becomes increasingly dense until the condition of fast fluidization isreached, characterized by high solids concentration, flow of solids in clusters and strands(resulting in slip velocities an order of magnitude greater than the terminal velocity ofindividual particles), and extensive backmixing of solids (Yerushalmi, 1986).TMHigh velocity fluidization” usually refers to both the turbulent and fast fluidizationregimes. Li et al. (1981) carried out a study of high velocity fluidization in a 90 mm ID by 8m tall column. Their investigation incorporated a number of different solids all of Geldarttype A classification. They identified three separate regimes of fluidization based on the shapeof the bed porosity profile. Their results are presented in Figure 2.2. Region A is indicativeof operations in which the gas velocity is below that required to achieve fast fluidization and ismost likely representative of a turbulent fluidized bed. Region B shows two distinct phasescoexisting within the riser, a dense lower region and a comparatively lean upper region.Region C was encountered at very high gas velocities and characteristically showed a constantbed voidage over the entire height of the column, except in the vicinity of the solids inlet.This is the realm of pneumatic transport (or dilute phase flow).For many years, “turbulent fluidization” was a term used to qualitatively describefluidization past the bubbling/slugging regime (essentially high velocity fluidization). Thecurrent conceptualization of turbulent fluidization was defined by Kehoe and Davidson(1971). Lanneau (1960) provided evidence that this regime offered opportunities surpassingthat of the conventional bubbling bed. Carrying out experiments on fine powders with gas15I, ‘_. -[: .‘-CC2.16.17. C0.••.4•.’.3. WI0.50 0.85 090 0.9S .oI IFigure 2.2: Axial Bed Voidage Characterizationprofiles of cross-sectional average bed voidage determined by Li eta!. (1981) for a 8 m tallcolumn of diameter 90 mm16velocities up to 1.5 mIs, he noted that with increasing gas velocity, the two-phase nature ofthe bubbling bed transforms to that of increasing homogeneity leading him to conclude thatgas/solid contacting is better at higher velocities. In fact, Laneau’s work demonstrates thatoperation in the bubbling bed regime is probably the worst condition in terms of the efficiencyof gas/solid contacting.Kehoe and Davidson (1971) viewed the transition to the turbulent regime anddescribed the regime as a state of continuous coalescence. They found that this transition isquite gradual rather than sharp. On the other hand, Brereton (1987) found that the transitionto the turbulent state involved slugging and dilute phase clustering occurring intennittently,implying that the turbulent regime is itself a transition from slug flow to fast fluidization(Grace and Tuot, 1979).The voidage profile represented by region B in Figure 2.2 has been considered tocorrespond to fast fluidization, with the inflection point (z1) separating a dense phase at thebottom and a dilute phase at the top of the riser used as the indicator of the fast fluidizationregime. Horio and Morishita (1988) concluded, based on their investigation of upflowsystems, that any dense bed experiencing entrainment adjusts the upper boundary of the denseregion to changes in solids circulation rates so that the rate of elutriation equals the solids flowrate. Horio (1991) states that °the coexistence of dense and dilute regions could be a rathertrivial aspect of fast fluidization phenomena°.Kan-i and Knowlton (1991) define the fast fluidization regime as bounded by twotransition velocities for a given mass flux. These velocities are described in Figure 2.3. For agiven mass flux, the lower velocity is defined by the choking velocity (velocity at which thesolids saturate the gas). The upper bound on velocity was concluded to be that where thefrictional resistance to gas flow through the column begins to dominate over the pressure dropimposed by the presence of entrained solids.17cIE‘-I0‘C‘Ibi00Cr)Figure 2.3: Regime of Fast Fluid izat ionaccording to Karri and Knowlton (1991)Superficol Gas Velocdy. (.J3m/s]18The solids distribution in fast fluidization is by no means uniform. Particles move in alldirections throughout the column. For the most part they can be found in suspended clustersand wall streamers.Streamers are seen as a number of particles collected together and behaving as a groupfor a period of time. They appear as long strands or strings ofparticles at the wall of the riser,moving either upward or, more usually, downward. Streamer motion and breakup involvestochastic processes. Wall streamers intermittently pause, exposing their leading edge to thedilute suspension. This leading edge grows rapidly and protrudes into the core whereparticles are stripped away at a high rate (Senior and Brereton, 1992). These streamers, beingadjacent to the wall, have a marked effect on the heat transfer process to surfaces as discussedbelow.2.2.2 Axial Structure of Fast FluidizationTypically the axial solids distribution in fast fluidization is considered to be sigmoidalas indicated by curve 2 in Figure 2.4. As this figure illustrates, there is a dense zone at thebase of the riser, a relatively dilute region at the top, and a gradual transition inbetween,passing through a point of inflection. This point of inflection is usually taken to represent thetop of the dense region. The location of this point is a function of the gas velocity, solidscirculation rate, and the system pressure balance (or solids inventory). Although a sigmoidalprofile is not seen in all units or at all times, it is the most common. Discrepancies can oftenbe attributed to geometrical effects, addressed below.Li and Kwauk (1980) developed a first order differential equation to describe thevertical voidage profile in fast fluidization. A 90 mm ID by 8 m tall column was employed inwhich pressure profiles were measured for various gas velocities and solids circulation rates.The solids used in the experiments were all of Geldart type A classification. The results (Li, 1981) are generalized into three curves typical of fast fluidization, reproduced in Figure2.4, Curve 2 shows the complete profile with the limiting cases of curve 1 whose dense bed19Iz particle lumpsin dense phase Sinkingunder effect of buoyancyparticle lumps in dense phase diffusing upwaZ;I It I. Ij 1 / IIIICFigure 2.4: Typical Bed Voidage Profiles in Fast Fluidization (from Li et al., 1981)20upper level would require a taller riser and curve 3 which is dilute throughout the entirelengths of the riser. Observations show that clusters of particles migrate about in the bed.Clusters were assumed to rise by a diffusion-type mechanism from the relatively dense lowersection and to descend by gravity from the less dense upper region. Li and Kwauk (1980)proposed that at a given height, z, the upward and downward fluxes of the clusters are equal,leading to:(2.1)where: = volume fraction of particle clusters in the fast-fluidized bedz = vertical height (m)= bed voidage= voidage of particle clustersPg = gas density (kg/rn3)= apparent density of particles (kg/rn3)= effective density (p - Pg) (kg/rn3= segregation coefficient (a proportionality constant)= diffusive coefficient (a proportionality constant)At z, the mean concentration is given by:(i—s) = f(16a)+(1fv)(16’) (2.2)where: E voidage of dilute phaseso that:E(2.3)21After substitution, Equation (2.1) becomes:—de ..(WAPJdZ (2.4)( a) PsThe inflection point on the E vs. z profile (denoted by e, z1) is found by setting thesecond derivative oft equal to zero resulting in:(2.5)2showing that the point of inflection occurs at the arithmetic mean of the two boundaryvoidages.Integration ofEquation (2.4) yields:ln)=_._(z_zi) (2.6)where:Z0 = IIP!_) 1 (2.7).G)Ap (8 a)Equation (2.6) describes the vertical voidage distribution in a fast fluidized bed basedon axial diffusion of clusters.22More recently, several groups (Rhodes and Geldart, 1987; Kunii and Levenspiel,1991) have described density profiles in terms of entrainment from a vigorously bubbling orturbulent bed. Wen and Chen (1982) in their investigation of entrainment and elutriation,propose an equation for the entrainment rate of solids in the freeboard (similar to Large et a!.,1976) represented by:E=E+(E0—Ejexp(—ah) (2.8)where: a = decay constant (nr’)E = entrainment flux at riser exit (kg/m2.s)E0 = entrainment flux at dense phase/dilute phase interface (kg/m2.s)E,, = entrainment flux above TDH (kglm2.s)h = height above bed interface (m)Here, the decay constant, a, must be correlated to experimental data from theparticular unit in question. Wen and Chen (1982) recommend a = 4.0 rn-1 based onexperimental data collected in a bubbling fluidized bed. However, Rhodes and Geldart(1987), in applying this entrainment model to fast fluiclization, found that a = 0.5 rn-’provided better predictions.2.2.3 Radial Solids DistributionRadially, there is a high degree of nonuniformity in solids density. Figure 2.5 (Rhodeset al., 1988) represents the typical radial variation in solids flux measured under fast bedconditions. Results such as those presented in Figure 2.5 have led to the identification of tworadial zones in the riser of the CFB - the core of the riser, characterized by a dilute upwardflowing suspension, and a relatively thin annular zone, in which solids move downwards at ornear the wall of the riser. Many investigators (e.g. Weinstein et a!., 1986; Monceaux et. al,1986; Brereton, 1987; Bader et al., 1988; Hartge et. al, 1988) have clearly demonstrated this23i50UPWARDFLUX(kg/m2s)DOWNWARDFLUX(kg/m2s)0soMean solids flux = 63.4 kg/m2sSuperficial gas velocity 4 rn/sRiser diameter = 152 mmFigure 2.5: Typical Radial Variance in Solids Fluxprofiles from a column of 152 mm diameter with alumina of mean particle size of 64 imby Rhodes et al. (1988)soo 05 075I024now commonly accepted core/annular flow structure. The annular or wall region ischaracterized by sheets or streamers of falling particles interspersed with periods where thereis a dilute upward-moving solids suspension. Typical voidages of the streamers are in therange of 0.6 to 0.8 (Senior and Brereton, 1992).Figure 2.6 illustrates the core/annular structure together with the direction of flow ofboth gas and solids. Both gas and solids flow upward in dilute suspension in the core. In theannulus, solids flow predominantly downward, while gas flows upward along the bare walland downward within the streamers. Note that the thickness of the annular wall regiondiminishes with height for the case shown.2.2.4 Gas FlowThe gas flows in near plug flow throughout the core, while there is a sharp decrease ingas velocity from the inner edge of the annular region to the column wall. The reduced gasvelocities in the annular region are due to both frictional effects of the wall and to thepresence of the predominantly downward flow of the streamers in this region.2.3 Heat TransferHeat transfer in CFBs has been reviewed by, among others, Glicksman (1988),Leckner (1991), and Basu and Fraser (1991). This section briefly describes the mechanism ofheat transfer in CFB boilers.Heat transfer surfaces within CFB boilers are usually in the form of exposed membranewaterwalls. These surfaces form the containing wall of the unit. Figure 2.7 illustrates amembrane wall, which is a series of tubes connected by fins, with half of the tube surfaceexposed to the combustion side of the CFB reactor.The mechanism of heat transfer to the membrane wall is of utmost importance, as it isthis wall which is responsible for the removal of the majority of the heat generated within thecombustor. Although some work has been reported on time-averaged heat transfer25I I -III-I--’- — —4---Wall Region: 4dense solids layerdownf low solids flowgas flowCore Regon:dilute suspensionrapid upf low .;A- - A’section A-A’Figure 2.6: Illustration of Solids Distribution in the Riser of a CFB(from Senior and Brereton, 1992)26—* Waler OutTub.21.3 0.0.jgure 2.7: Illustration of a Membrane Wallfrom Wu (1989)(a) plane view, (b) side view- all dimensions in mmTh.emocoupleCouplingManilo(dWater In(a)(5)27measurements (e.g. Kobro and Brereton, 1986; Subbarao and Basu, 1986), very little isknown of the instantaneous local heat transfer coefficient (Wu et. al, 1989; Mahalingam andKolar, 1993). The local heat transfer coefficient provides insight into the mechanism oftransfer of heat to the walls of the CFB. The local instantaneous heat transfer coefficient isdirectly related to the hydrodynamics at that point. As discussed earlier, the walls of the CFBare covered by sheets, streamers, and dilute suspension, all in a state of dynamic instability.The greatest heat transfer initially occurs in areas covered by sheets and streamers, as particleconvective heat transfer can more than double the heat transfer coefficient at combustiontemperatures.On a strictly qualitative basis, the heat transfer coefficient is composed of a gasconvective component, a particle convective component, and a radiative component. In heattransfer from a streamer in a typical CFBC system, the radiation and particle convectivecomponents are most significant. As a streamer or packet of particles slides downwards alongthe heat transfer surface, it loses heat to the walls, resulting in a loss in particle temperature.Therefore, as the packet continues down the wall, there is a reduction in the local heat transfercoefficient. In studies of local heat transfer coefficients, insight has been gained into thehydrodynamic characteristics of streamers. As these packets are unstable, they fall only acertain distance before breaking up and being dispersed. As they are dispersed, new particlescome into contact with the wall resulting in a rise in heat transfer coefficient.Mahalingam and Kolar (1993) (Figure 2.8) investigated heat transfer over a 4.64 msimulated membrane wall and found for the conditions of their study (superficial velocity 4.2to 8.2 mIs, solids fluxes 17 to 110 kglm2.s) that there was a certain length over which the heattransfer coefficient decreases, followed by a distance over which it increases. This patternrepeated itself over the entire length of the wall. The renewal lengths were approximately 0.6m, with areas of decreasing coefficient being termed “thermal decay length” and those ofincreasing coefficient as “thermal regeneration length”. The authors conclude that the thermallife span of particles near the wall (thus possibly that of streamers) is 0.6 m and compare this280C)C)0C-)1501.0 20 3.0 4.0 5.02O0C)C)C)0C)IDistance along the heat transfer surface (m)Variation of heat transfer coefficient alongthe surface length with G as a parameter;U =5.7mlsandsandd1,= 265 microns.g• G :28 ka/m2s ;u =5.6 m/so Gs :G9 kgImsiJ:6S /sLOOt—. 1:1’tOO —0I0 1.0 2.0 .0 4.0 50 ,oDistance along the riser from its top (m)Variatton of heat transfer coefficientalong the heat transfer of Wu et at [1987]Figure 2.8: Variation of Local Heat Transfer Coefficient with Height(figures from Mahalingam and Kolar, 1993)29with Basu (1990) who claimed a value of 0.7 m. Although generation and renewal aregenerally considered to involve a random process, it was found to be periodic for theconditions and apparatus investigated.There is still a significant lack of knowledge for detailed design and experimentalanalysis of the heat transfer to the walls of boilers. Missing in particular are details of thelocal flow structures and their time and spatial variations. The effect of wall geometry andother surface defects (roughness) are also of direct importance as these determine how andwhere particles collect and the stability of these structures.Of greater importance to the designer is the time-averaged, spatially-averaged heattransfer coefficient as a fhnction of the local cross-section average suspension density. Thisinformation allows heat removal over a particular surface to be estimated. This heat transfercoefficient generally increases with suspension density due to the contribution of particleconvective heat transfer. As mentioned above, as density is increased, there is an increase inthe number of streamers at the wall, as well as an increase in the wall surface covered bystreamers.It is common that the heat transfer coefficient be estimated from:h0 hgc+hpc+hrad (2.9)where: h = overall heat transfer coefficient (W/m2•K)hgj = gas convective component (W/m2.K)= particle convective component (W1m2.K)= radiative component (W/m2•K)This equation is an over-simplification, but provides a practical basis for estimating the heattransfer in CFB boilers (Grace, 1986a). The gas convective heat transfer component, hgc,results from heat transfer occurring between the wall and the gas passing over the surface.For a CFB riser under conditions of relatively dilute phase flow, this component may be30estimated from correlations referring h to an empty tube. Although the presence of particlesmay alter turbulence and local gas flow near the wall, this estimate is deemed adequate as,under combustion conditions, the gas convective component contributes less than 10 % to theoverall heat transfer coefficient (Wu, 1989).The radiative component, h, can be estimated by treating the suspension as a graybody so that:h=a(1—T)(2.10)[(i/e) + (i/e) — 1](T —T)where: esurf = emissivity ofheat transfer surface= suspension emissivitytemperature of heat transfer surface (K)T = suspension temperature (K)a = Stefan-Boltzmann constant, 5.6696x 10-8W/m2.K4The suspension emissivity, e8,, may be approximated (Grace, 1982) as:e,,=0.5(1+e) (2.11)for risers of sufficient size and suspension densities high enough that opposite walls do not“see” each other.Grace (1986a) utilized Martin’s (1980, 1984) theory for heat transfer in fluidized bedsfor the prediction of the particle convective component, h.. This model is based on ananalogy between particle motion and kinetic theory of gases for molecular motion. Althoughsomewhat controversial, this model has been successful for some high velocity systems (Reh,1985).There is wide variation in heat transfer data from different units. The situation issomewhat analogous to hydrodynamic studies in that no single model has been able tocompletely explain all available information. Until the local heat transfer process is completely31understood, any attempt to determine the overall heat transfer coefficient tends to be a grossapproximation requiring experimental data from the unit in question for improved calculation.This is the approach taken in this work. Wu (1989) measured heat transfer on membranewalls and in-bed tubes and provided an experimental fit for both e and e equal to 0.91.These values were determined in the same pilot scale equipment and under conditions similarto those employed in the work reported here. Hence they are utilized in this thesis.With the convective component, hg0, estimated as suggested earlier, the radiativecomponent, h, from Equation (2.10), and the overall heat transfer coefficient, h,, fromexperimental data, the particle convective component, h.1,0 can be determined from Equation(2.9); h is then typically correlated to the corresponding suspension density. Glicksman(1988) and Basu (1990) found h. to be proportional to (1-s)°5, while Wu et al. (1989) implya linear relationship. The work here confirms a linear relationship for this particularapparatus.2.4 CFB BoilerCirculating Fluidized Bed units provide the means by which fast fluidization can beachieved. CFB equipment consists of a number of elements including a riser, some form ofgas/solids separation device, a reservoir to contain bed inventory, and a solids return device.These various aspects are considered here with specific focus on boiler applications.2.4.1 RiserMost commercial combustors are rectangular in cross-section. The cross-sectionalarea is designed on the basis of gas velocity and circulation rates. All units are now ofmembrane waterwall construction. It is common for some of the waterwalls to be coveredwith refractory to protect them from erosion.In boiler design, staged air introduction is essential. This entails injection of part of thetotal air at the base of the riser (primary air) and the rest at one or more levels through ports32higher up the riser (secondary air). Staged air combustion significantly reduces NOemissions. The section of the furnace below the secondary air ports is operated in a substoichiometric condition to reduce NO formation. The part of the riser below the secondaryair ports is usually an extensively mixed bubbling, or more typically a turbulent bed, with fastfluidization above the secondary air ports. Usually 40 to 60% of the total air is introduced assecondary air (Basu and Fraser, 1991) resulting in primary zone gas velocities of2 to 5 mIs.The base of the riser is sometimes tapered, with its cross-sectional area slowlyexpanded with increasing height over some vertical distance. The purpose of a tapered base isto increase the primary air gas velocity to aid vertical particle movement in the lower part ofthe riser, thereby resulting in lower solids loading and preventing agglomeration. However,Senior (1992) has provided evidence that, under some conditions, tapering can increase thesuspension density in the lower zone as a result ofjetting of the gas through the solids.The riser exit geometry affects the hydrodynamic behavior in the upper portion of thecombustor. If there is a gradual transition from the vertical flow direction to the horizontalpassage to the solids separator (smooth exit), almost all solids reaching the top of the riserpass directly to the separator. This results in the typical axial solids loading profiles discussedearlier (e.g. Figure 2.4) where there is a continuous increase in voidage with height, right tothe exit.If, as commonly used in industry, the exit is abrupt (90° bend) and especially if the exitcross-sectional area is less than that of the riser, the local bed density may increase towardsthe riser exit. As the solids pass through the riser, their predominant direction of flow isvertical. As they reach the exit, their vertical momentum may be great enough to carry themright to the top (or roof) of the column. Upon striking the roof, this momentum is convertedto the downward direction, causing these particles to rebound back down the riser asillustrated in Figure 2.9. Whether or not a given particle negotiates the exit is a function ofthe momentum of the particle and the drag of the exiting gas. The fraction of solids exitingthe riser is a complex function of gas velocity and solids loading. An abrupt exit tends to33C,,low moderate highheiç ht/ / /I iö1Wreflectionat the topsuspension densityFigure 2.9: Effect of Abrupt Exit on Vertical Profile of Axial Solids Loading(from Senior and Brereton, 1992)34cause an increase in solids loading towards the top, accompanied by an increase in solidsresidence time.2.4.2 Gas/Solids SeparationThe most common primary gas/solids separation device is the cyclone. The high gasthroughput and high solids concentrations in CFBC systems create operating conditionsdifferent from those in process industries (Basu and Fraser, 1991). As a result, mostmanufacturers use more than one cyclone in parallel or in series to maintain high separationefficiencies.An alternative to a cyclone is the use of an inertial separator, a labyrinth of multiplerows of U-beams vertically suspended in the gas stream (Figure 2.10). The simplicity ofconstruction (a rectangular extension of the boiler) reduces fabrication cost. As well, thenature of these separators allows them to be made as large as required, eliminating the needfor multiple cyclone separators in larger units. These U-beam separators cause lower pressuredrops which may lead to a significant reduction in fan requirements at the expense ofsomewhat lower collection efficiencies than properly designed cyclones.2.4.3 Solids Return SystemsSolids return systems, used to return solids captured in the gas/solids separator(s) tothe base of the combustor, are quite varied. These can be classified into two main categories -mechanical and non-mechanical devices. Mechanical devices employ some physicalmechanism to move the solids to the riser, while non-mechanical valves function without anymechanical device.Mechanical valves are rarely used, except in small research facilities. They can varyfrom butterfly valves where the size of opening determines the rate of flow of solids to screwtype feeders where the solids flowrate is set by the screw speed. Although providingextensive control over the rate of solids returned to the riser, they are complex additions at the35ONC..CI)‘01industrial level adding to capital cost and maintenance, and lowering reliability, especially athigh temperatures.Due to their inherent simplicity, non-mechanical valves are widely used in CFB boilertechnology. These valves provide for solids recycle without moving parts, the primaiypurpose being the transfer of the solids from the low pressure point in the loop (solidsseparator) back to the higher pressure riser base. Non-mechanical valves can be subclassifiedinto two categories - those providing a controlled rate of flow of solids and those providingno control, acting only as a solids flow device.In general, non-mechanical valves all operate by providing a high pressure point in theloop to prevent gas by-passing the riser through the return leg and to facilitate the transfer ofsolids from the low pressure point to the high pressure point in the system. Figure 2.11represents a typical system pressure balance. Key to the operation of these systems is thestandpipe. The solids inventory in this standpipe provides a certain head or pressure drop.The pressure drop across this moving bed dictates the drop around the rest of the loop.Examples of controllable valves include the L-valve, J-valve, and reverse seal.Automatic valves include the seal pot, loop seal, and V-valve. These devices provide apressure seal allowing for the passage of solids back to the riser. If the flow of solids ischanged, the valve simply adjusts itself to the new flowrate. In general, these valves operateunder fluidized conditions. By fluidizing the solids, the ioop pressure drop is essentially fixed,thereby fixing the solids throughput.The L-valve is the simplest and most widely used in CFB applications (see Knowlton,1986). It can be operated both as a controlled or uncontrolled solids flow device. Solids arepassed from the solids separation device to the valve through a hopper or standpipe. There isa certain inventory of solids in the system, the majority ofwhich (typically> 70 %) is stored inthis section. These solids move downward under moving bed flow, with very little axial orradial mixing of solids.37To filterFigure 2.11: CFB System Pressure Balance(from Rhodes and Geldart, 1987))‘pR,sSecondarycyclonePrimarycyclonecycSlowbedAirRiserAir38A key to the operation of an L-valve (or any non-mechanical valve) is the systempressure balance illustrated in Figure 2.11. The low pressure point in the system is the solidsseparator, while the high pressure point is at the location of aeration. The whole systemoperates such that the pressure drop across the slow bed is the same as that through the riserioop, i.e.:z\P = AP1 +AP + (2.12)where: zP = pressure drop across solids separator (kPa)1iv = pressure drop around L-valve to riser base (kPa)= pressure drop across riser (kPa)= pressure drop across standpipe moving bed (kPa)As the solids in the standpipe are in moving bed flow, an increase in the aeration air causes anincrease in the pressure drop across the standpipe. The system responds with an increase insolids flow rate resulting in an increase in riser solids loading and an increase in riser pressuredrop, satisfying the pressure balance ofEquation (2.12).The operation of an L-valve is strongly dependent on solids inventory (standpipe bedheight), with the height of this moving bed essentially dictating the range of solids return ratesachievable. This is best illustrated by a conventional fixed bed. As the flowrate of gasthrough a bed of solids is increased, there is a corresponding increase in pressure drop. If thisflow is increased enough, the bed becomes fluidized. Once in a fluidized state, any changes ingas velocity result in changes in bed height, but very little change in bed pressure drop. Thepressure drop required to fluidize this bed is directly related to its static bed depth, with adeeper bed resulting in a higher pressure drop upon fluidization. The greater the bed depth,the greater the range of pressures available for solids flow control. Once this bed has beenfluidized, the L-valve behaves as an uncontrolled non-mechanical valve since the systempressure drop can no longer be varied appreciably.392.5 Dynamic ModeIinDynamic models of the CFB tend to be modular in nature and to require cell blocksolution schemes. This is due to the recognition that a CFB system is not a single unit but acomplete assembly comprised of a riser, solids separation device, solids storage vessel, andsolids return conduit and valve - all interactively affecting the overall behaviour of the system.At present, all dynamic models are extreme simplifications, as inclusion of time intothe modeling realm enhances unresolved system behaviour at the micro-scale level. Nocontinuum approach has been published. This is not surprising since, as noted above, thecurrent level of steady-state modeling (especially for riser hydrodynamics and heat transfer) isitself far from complete. For instance, as clustering and wall strand formation have yet to bequantitatively addressed, there is no advantage to their inclusion at the dynamic level. This isillustrated by the fact that, although known to be critical to the process of heat transfer tosurfaces, heat transfer calculations are generally performed and coefficients are reported,based on average solids loading across the riser cross-section, without direct reference to wallcoverage.Given the paucity of understanding, modelers have approached the system from amacro-scale point of view, leading to cell models for the characterization of the reactionprocess in the riser of the CFB. Weiss and Fett (1986) developed one such model for thedecomposition of sodium bicarbonate, a simple reaction which could be used to providemodel validation for application to more complex reactions. The model assumes a gas/solidssuspension phase of uniform radial density across the entire column cross-section.Backmixing of solids is included, although it is unclear how the rate of backmixing is to bedetermined. The authors also state that the void fraction ‘may” be a fl.inction of height insidethe reactor. Whether or not a profile was used or void fraction was considered uniform overthe reactor height is not clear.40Weiss et al. (1988) extended this model to coal combustion. Here they clearly statethat voidage is a function of height and used the solids backmixing rate as a fitting parameter.Mori et. al (1991) proposed a dynamic model for a 70 T/h Multi-Solid CirculatingFluidized Bed Boiler. The purpose of this model was to investigate the control system. Theriser is considered in three zones - a dense zone, a reducing zone, and an oxidizing zone.Both gas and solids are considered to be well mixed in each of these zones and backfiow ofsolids between zones is taken into account. Devolatilization and subsequent combustion ofvolatiles are deemed to be instantaneous, while the char combustion reactions are taken to be:c4o2_*co (2.13)CO+!O2_.C (2.14)C+C02—*2 +0 (2.15)SO2 generation and capture, as well as NO formation and reduction, are not considered. Thesolids loading is assumed to vary in the axial direction only and is obtained from steady-stateexperimental pressure drop measurements. The hold-up is then assumed to vary linearly withload between initial and final conditions.The only unknown parameter in this model is the solids downflow ratio, X1,representing the backniixing between the three riser zones. X1 is formally defined as the ratioof downflow of solid particles in the combustor to the outside recycle fiowrate. In comparingexperimental temperature profiles with those calculated for various downflow ratios, X1 = 15was selected in order to match their almost uniform measurements.Zhang et. al (1991) developed a dynamic model for CFB combustion emphasizing theeffect of particle size distribution of both bed and feed materials. The combustor is consideredto consist of two zones - a dense (bubbling bed) zone and a dilute zone. The dilute zone is41sub-divided into an arbitrary number of lump-parameter blocks in series, with gas and solidsassumed to be well-mixed in each block, and with no backmixing of the gas between blocks.The hydrodynamics of the riser are considered to be at steady-state since the gas and solidsdynamics are considered relatively fast. The voidage profile is obtained from the correlationofYu (1989), while the solids entrainment rate along the height of the riser is taken from Wenand Chen (1982) (Equation 2.8). This equation is solved for each discrete particle size.Included in the reaction scheme are the reduction ofNO by carbon and the capture of SO2 byCaO. Dynamic changes of gas concentration are directly related to the rates of reaction.Hyppanan et. al (1993) presented a dynamic simulation of an Ahistrom Pyroflow 125MWe CFB utility power plant. This model incorporated not only the boiler, but also thesteam process. The riser is divided into numerous compartments in series, each assumed to bewell-mixed. The axial suspension density profile is determined using an empirical correlationof unknown origin. It is also stated that the “dynamics of the suspension density profiles aredetermined by using an experimental time constant for flow dynamics.” The meaning of thisstatement is unclear. It probably implies a smoothing of calculated profiles for a time-dependent transition from one operating condition to another. As in the model presented inthis work, the solids circulation flux has been correlated based on experimental data. Volatilesrelease, burning, and mixing are combined in a single expression and fitted to experimentaldata. Solids mixing between the cells is described using a dispersion model whose details arenot discussed. The heat transfer coefficient is correlated as a function of suspension density.Noting a paucity of experimental validation in previous work, Hyppanan et. a! presentexperimental results from the 125 MWe Seinajoki power plant to provide for verification.They also developed an advanced control structure with this model and applied it to the plant,presenting data showing improved load following based on this new structure. Their workshows the utility of the dynamic model for developing control structures and optimizingparticular aspects of the plant through simulation. Unfortunately, most likely due toproprietary factors, no mention of the modified control strategy is made other than that it is42°advanced”. Whether advanced from a control theory point of view or a schematicmodification leading to uniqueness is open to speculation.43CHAPTER 3- EXPERIMENTAL FACILITIESThe UBC-CFBC pilot plant used for the tests carried out in this work is shown inFigure 3.1. Detailed descriptions of each of the key reactor and return system componentsfollow.3.1 Reactor ShaftThe principal reactor shaft or riser is composed of five refractory-lined flangedsections providing a chamber of 152 mm square cross-section with an overall height of 7.32m. A view of the reactor is shown in Figure 3.2. The refractory is erosion resistant and heldin place by pins welded to the outside steel walls. The bottom section, which has stainlesssteel walls, is tapered gradually on the inside from a 51 mm x 152 mm cross-section at thebottom to 152 mm x 152 mm over a height of 1.22 m. The purpose of this feature is toprovide a high velocity region which helps prevent agglomeration and sintering. Pressure tapsand thermocouples are located at 610 mm maximum intervals along opposite left and rightfaces of the column. In addition, there are twelve regularly spaced 41 mm diameter portswhich can be used as viewing ports, for withdrawal of gas and/or solids samples, or for44secondary airwaror r *.----8—water-12___9 19131)p4-14) 2( 4_____715 1___4liquid fuel—Q —2 airnatural gasprimary air111. Reactor; 2. Windbox; 3. PrImary cyclone; 4. Secondary cyclone; 5. Recyclehopper; 6. Standplpe: 7. Eductor; 8. Secondary air preheater; 9. Flue gas cooler10. Baghouse; 11. Induced draught fan; 12. Fuel hopper; 13. Sorbent hopper;14. Rotary values; 15. Secondary air ports; 16. Membrane walt; 17. PneumatIcfeed line; 18. External burner; 19. Ventilation; 20. Calorimetric section;Figure 3.1: Simplified Schematic of CFBC Facility at UBC45TO CYCLONEPRIMARY AIR \PLENUM CHAMBERflMNFigure 3.2: View of Principal Refractory Lined Reactor Column1829HEAT TRANSFERTUBECOOLINGFLUID OUTTHERMOCOUPLE PORTVIEW PORTSECONDARY AIRUPPER INJECTION OPTIONSECONDARY AIRLOWER INJECTION OPTIONPNEUMATIC FEED PORT1829279BED DRAIN46insertion of probes and feed nozzles. The distributor and plenum chamber are suspended fromthe bottom of the reactor for easy removal. Primary air is introduced to the bottom of thereactor through a novel distributor shown in Figure 3.3. This distributor has twenty 9.5 mmdiameter orifices drilled at 30 and 50 degrees to the horizontal axis. Located at the centre ofthe base is a 38 mm tube which allows easy removal of small agglomerates of sintered solids,and other oversize material. The plenum chamber is also equipped with a drain pipe forremoval of solids that might flow back through the distributor during shut-down. For start-upof the unit, the primary air is preheated in an external burner by combustion ofnatural gas.As shown in Figure 3.1, there are four levels of air introduction to the riser. Primaryair enters principally through the distributor at the bottom of the unit. Additional air, alsodefined as primary for the purpose of defining a primary-to-secondary air split because of itsproximity to the primary air distributor, enters through the pneumatic feed system. Thissystem is used to recycle secondary cyclone ash and to convey fhel into the reactor. Thepneumatic transport air has a consistent flow of 8x103m3/s and is typically 20% of the totalair flow. Secondary air enters through one of two levels, either a lower manifold, 1 metreabove the air distributor, or an upper level, 3.1 m from the base. In all the combustion trialsdescribed in this thesis, the secondary air was introduced entirely at the upper level.3.2 Fuel Feed SystemThe feed system varies according to the type of fhel burned. For solid fi.iel feeding, thesystem consists of up to three sealed hoppers - one for a high reactivity start-up coal, thesecond for the fuel, and a third for sorbent. The capacity is 2 drums of solid fuel (approx. 360kg) for the large hopper, 1 drum(approx. 180 kg) for the smaller start-up hopper, andapproximately 20 kg for the limestone hopper. The solid fuel or fuel/sorbent mixture is fedpneumatically through a 38 mm diameter pipe entering the reactor at an angle of 15 degreesdownward to the horizontal. Generally, the pneumatic conveying air is first used to pick upsecondary cyclone solids; it then entrains the feed fuel and limestone. If it is not desirable to4751, 152__I__1/7 7 l_J____ _____3;,’00000•‘/5O°c===j9.5mm[ 1 Drain38mmTube L...J(a) Front view (b) Side viewFigure 3.3: Primary Air Distributor48recycle the secondary cyclone catch, it is possible to take fuel feed air directly from the maincompressed air line. The solids feed rates are controlled by means of rotary valves, one perhopper, with rubber impellers and a transparent front to allow visual verification that thefeeder is operating properly at all times. All three hoppers are mounted on load cells whichallow the feed rates to be determined by weight loss over an approximately 20 minute period.Limestone addition was not used for the experimental work reported here.3.3 Heat Transfer SurfacesTwo heat transfer configurations are available for the pilot plant CFB. These areinterchangeable to allow different heat transfer problems to be studied, and to permitmaximum flexibility with respect to fuels fired.The first heat transfer configuration is a membrane wall heat transfer surface. Itconsists of four vertical stainless steel tubes of 21.3 mm OD and 13.9 mm ID, separated bylongitudinal fiat fins welded along their lengths as shown in Figure 3.4. Thermocouples arepositioned at 152 mm intervals inside one of the central tubes, and at the inlet and outlet of thecooling water in order that heat transfer coefficients can be determined for different intervals.The cooling surface has a total exposed area of 0.30 m2 and a projected surface area of 0.23m2. With this surface in place, it is possible to burn high calorific fuels (HHV>28 MJfkg) at aminimum gas superficial velocity of 6 m/s while maintaining the reactor temperature above850°C. The surface is located in the upper section of the combustor as shown in Figure 3.2.It is interchangeable with the second surface described below.During combustion trials of low calorific fuels with high moisture contents, such aslignite, it is not possible to run at a low load condition (6 mIs) and maintain the reactortemperature above 850°C. A second heat transfer surface is therefore utilized. This sectioncontains three heavy-wall stainless steel tubes of 12.7 mm OD and 9.4 mm ID, in a hairpinconfiguration as shown in Figure 3.5. This surface reasonably approximates a superheaterplaten. Water or air can be used as cooling fluid in one, two or three tubes at a time. This49— Water OutFi2ure 3.4: Membrane Wall Heat Transfer SurfaceThermocoupleCoupling— Water In(all dimensions in mm)21.30D TubeFin21.3 OD Tube45789(a) Plan view (b) section view50TU BEBUNDLECOOLINGFLUIDOUTCOOLINGFLUIDINFigure 3.5: Hairpin Heat Transfer Surface ConfigurationTUBESUPPORT51allows the heat removal rate to be varied from 0 to approximately 20 kW without problemsdue to thermal expansion, since the tube bundle can expand freely inside the reactor. The heattransfer surface has a total exposed area of 0.34 m2. This configuration was used with waterflowing through one tube for all the trials described in this report.3.4 Solids Recycle SystemsGas and entrained solids leaving the top of the reactor enter a refractory-linedmedium-efficiency primary cyclone of inside diameter 305 mm. Solids captured in the primarycyclone drop into a conical recycle hopper. Make-up inert particles can also be added in thisvessel from a small external hopper. From the bottom of the vessel, the solids descend in amoving packed bed or fully fluidised flow in a 102 mm ID, 4.72 m long externally insulatedstainless steel standpipe, forming the vertical leg of an L-valve. There is a bellows-typeexpansion joint between the top of the standpipe and the bottom of the recycle hopper toallow for thermal expansion. The solids are returned to the reactor, 152 mm above theprimary air distributor, through the horizontal section of the L-valve, which is 790 mm longand 102 mm ID. The circulation rate is controlled by the amount of aeration air fed to the Lvalve at a single point, 102 mm above the horizontal axis of the L-valve.Gas and entrained solids leaving the primary cyclone are directed to a 203 mm ID,high efficiency secondary cyclone. This cyclone is made of stainless steel and is insulatedexternally. Solids captured in the secondary cyclone fall into a 76 mm diameter dipleg. Fromhere they are returned continuously using a venturi eductor system shown in Figure 3.6. Thepurpose of the eductor is to enable the solids from the secondary cyclone, together with asmall amount of gas, to be returned to the reactor bottom which is at a higher pressure. Asmall amount of air is fed to the distributor at the bottom of the dipleg (see Figure 3.6) tokeep the solids fluidized. Larger particles, which might obstruct the venturi section, faIl ontothe distributor. The distributor can be rotated to allow removal of solids through a ball valvelocated below. The air fed to the eductor nozzle, together with that which is entrained from52—.a’ a a a a a-4’,:tZ 1, 0 z m3: x z 0 m -l 0 z-I, C Id,mthe base of the cyclone, is then used for pneumatic solid fuel feeding. The oxygen or carbondioxide concentration can be measured in the dipleg to ensure that the air introduced in theeductor and by the distributor is drawn downward so that the performance of the secondarycyclone is not adversely affected by air drawn from below.3.5 Flue Gas Cooling and Cleanint!Gas leaving the secondary cyclone is cooled on the inside of three double-pipe heatexchangers in series. The first of these heat exchangers may be used as the secondary airpreheater, while the other two are water-cooled. The third heat exchanger offers thepossibility of further cooling with three independently controlled internal water-cooled coils.Particulate solids are removed from the flue gas in the baghouse before the flue gas enters anexhaust duct connected to an induced draught (I.D.) fan. The flue gas is then directed into thebuilding ventilation duct. The I.D. fan creates a negative pressure in the baghouse whicheliminates the risk of flue gas leaking into the laboratory.3.6 Gas Sampling SystemGas may be sampled from five axial positions along the reactor, from one positionbetween the two cyclones, and from a further point which monitors the flue gas after the firstheat exchanger. The gas from any of these seven positions can be monitored continuously todetermine concentrations of 02, C02, CO, SO2, NON, N20 and unburned hydrocarbons (asCH4). For the purposes of this work, the gases were sampled continuously from the flue gas.The sampled gas passes through a porous stainless steel filter, in which gas and solidsare separated. Gas is withdrawn through a heated sample line discharging directly into a coldtrap. A drying tube filled with magnesium perchlorate (Mg(C104)2removes any residualmoisture before the sample gas reaches a manifold on the analyser control board. In previouswork, magnesium perchlorate was found to be the optimum desiccant; while absorbing water,it does not appear to absorb any of the pollutant species of interest.54To minimize the possibility of reactions in the sampling lines, all sampling lines arestainless steel or Teflon. Air purge is used routinely to back-flush solids from the filters andsample lines. To ensure accuracy of gas sampling, the combustor is controlled at a smallpositive pressure using a damper on the flue gas line just upstream of the baghouse. Hence,no vacuum pump is needed on the sample line and there is no possibility of dilution due to airleakage into the sampling lines. A schematic of the complete sampling system is provided inFigure 3.7.Continuous on-line gas analysers are used for 02, CO2. CO, NO and SO2concentration measurements. The details of the analysers are given in Table 3.1. For thecontrol work reported here, the 02 analyser and pump were removed from the gas analysertrain (see Figure 3.7), and were installed after a dryer in a separate line immediately followingthe flue gas sample ifiter (upstream from 13 in Figure 3.7). This configuration provided thefastest possible analysis of 02 for more up-to-date measurement and tighter control, with totalresponse times (analyser and sample line lag) reduced from 2 to 3 minutes to less than 30seconds.3.7 Instrumentation, Data AcQuisitions and ControlThe system instrumentation consists of the following:(1) flowmeters for measuring all air and in-bed heat exchanger water flow rates;(2) thermocouples throughout the entire system (Figure 3.8) to allow measurement oftemperature profiles;(3) pressure transducers connected to pressure taps on the main reactor (see Figure 3.8for locations) to allow measurement of pressure profiles and of the overall pressuredrop;(4) load cells supporting all three hoppers to determine the solid and sorbent feedrates;(5) gas analysers (Table 3.1) to monitor the composition of the gases sampled from any ofthe positions described in section 3.6 above.55[hi_ _GAS____L_11._.jI—- hi iF—i7 Y9FflR U::7108 N2GCMSSiPLEFigure 3.7: Gas Sampling SystemI. Reactor; 2. Primary cyclone; 3.Secondary cyclone; 4. Gas filter; 5. Heat Exchanger; 6.Water trap; 7. Dryer; 8. Flow control valve: 9. Manifold; 10. Rotameter; 11. Controlpanel; 12. Three-way valve; 13: Electrically traced gas sampling line56Table 3.1: Key features of gas analysersGas Principle Range Response Time Accuracy02 Paramagnetic 0-25% or 0-10% 20 s 1%CO NDIR* 0-1000 ppm 5 s 1%CO2 NDIR 0-20% 5 s 1%CH4 NOW 0-0.2% or 1-0.5% 5 s 1%NO Chemiluminescence 0-250 ppm or 0-500 3 mm. 1%ppmSO2 NOR 0-1000 ppm or 0-3000 5 s 0.5%ppm or 0-5000 ppmN20 FTIR** 0-1000 ppm 1 mlii. +1- 5 ppm* Non-dispersive Infrared* * Fourier Transform Infrared57UI0000 C C 9 CJ -I C 0An AT&T 6300 PC, programmed in BASIC, equipped with a Metrabyte interface, isused for data acquisition. The interface may be expanded with up to eight multiplexer boardswith 16 channels on each board. Electrical outputs from thermocouples, pressure transducersand gas analysers can be stored and processed in the computer. The load cells are connectedthrough summation boxes to digital readouts. Air and water flow rates are read fromcalibrated rotameters.3.8 Modifications for Current ProjectModifications incorporated in the pilot plant for the work reported here aresummarized below.Three control valves were installed parallel to the respective rotameters to allow eithermanual or computer control of primary air, secondary air, and L-valve aeration rates. Boththe primary and secondary air control valves are 1” (25mm) Foxboro Vi series Stabifflocontrol valves, while the L-valve aeration control valve is a ‘/2” (13mm) Foxboro V4A needlestyle control valve. All valves are pneumatically actuated by a 3 to 15 psi (20 to 100 kPa)nominal input pressure, and are driven by a current-to-air positioner which converts a 4 to 20mA control signal to actuation pressure. 2” (50mm) orifice runs were installed in the primaryand secondary air lines to allow the flowrates, via orifice pressure drop, to be monitored bycomputer for on-line logging and control of these flows.The rotary valve controllers had facilities in place for the connection of a 4 to 20 mAcontrol signal. These can be operated either in manual or auto mode by selection with atoggle switch.A new data logging system and computer were dedicated to logging and control forthis work. Optomux, by Opto22, was chosen for logging as its versatility allows anycombination of input and output ports, each with its own predetermined gain. Logged datainclude 12 temperatures around the primary combustor loop; in-bed heat exchanger outlet59water temperature; pressures from the eight pressure taps along the riser; pressures from fourpressure taps from the two orifice runs; and 02, CO, CO2. CH4, SO2, and N0 concentrationsfrom the gas analysers. In addition, separate from the Optomux system, the loss in weightfrom the fuel and start-up hopper load cells is recorded directly from the digital displaythrough an RS232 port on the computer. Control outputs are in the form of 4 to 20 mAsignals to the primary, secondary, and L-valve valves, and the start-up and fuel hopper rotaryvalve controllers.The data logging and control programs were written in Microsoft QuickBASIC andallow interactive operator interfacing for the turning-on or -off of various controllers, andchanging of control parameters. The computer is able to completely log the system andperform all necessary calculations (of flowrates, solids loading, control action, etc.) in lessthan 2 seconds. A complete listing of the data logging and control programs written for thiswork are provided in Appendix C.3.9 Fuels and Inerts CharacteristicsThe fuels used in this work include Highvale coal, Conoco coke, and Syncrude Fluidcoke. The proximate and ultimate analyses of these fuels is provided in Table 3.2. The choiceof fuels was based on availability from other research on the pilot CFBC. Table 3.3 providesthe size distribution of the Ottawa 50 silica sand employed as bed material throughout thiswork. The Sauter Mean Diameter of this sand is 259 .tm.60Table 3.2: Proximate and Ultimate Analyses of FuelsProximate Analyses wt.% (as recieved)Highvale Conoco SyncrudeCoal Delayed Coke Fluid CokeVolatile Matter 30.5 10.0 7.2Fixed Carbon 42.1 84.0 84.6Ash 12.2 0.8 7.6Moisture 15.2 5.2 0.6Ultimate Analyses wt.% (dry basis)Highvale Conoco SyncrudeCoal Delayed Coke Fluid CokeCarbon 62.4 87.3 80.1Hydrogen 3.6 3.8 1.9Nitrogen 0.8 1.9 2.0Chlorine - 0.0 0.0Sulphur 0.2 4.9 7.1Oxygen (by difference) 18.7 1.1 1.3Ash 14.3 0.9 7.6Higher heating value(as received) (MJ/kg) 24.0 32.9 30.061Table 3.3: Screen Size Distribution of Ottawa 50 Silica SandScreen Size Mass Retained(-) (+) %TOP 35 2.735 45 25.545 50 14.650 660 19.760 80 28.180 120 8.1120 PAN 1.262CHAPTER 4- MODEL DESCRIPTION4.1 IntroductionThis chapter summarizes a model which describes the dynamic behaviour of acirculating fluidized bed combustor. The purpose of the model is to provide an adequatesimulator for the testing of control structures and algorithms. The model focuses on theprediction of the time variations of combustor temperature, outlet oxygen concentration, andthe temperature of the water leaving the in-bed heat exchanger, arising from changes inoperating parameters. Provided in this chapter are the major equations, methods, andassumptions used in this model.The goal of research modeling is to explain observed behaviour based on firstprinciples. In most cases it is not possible to entirely describe a process at this level.Empirical correlations and simplif,iing assumptions must generally be incorporated tocomplete the model or to make it solvable. These approximations are commonly justified bythe final application for which the model is intended and by the complexity of the physicalsystem under consideration. Often, particular aspects must be sacrificed in order to improve63the reliability of the desired results (Hyppanen et al., 1993). Simulation of the dynamics of acirculating fluidized bed combustor is one case where simplifications are an absolute necessity.Steady-state CFB models are far from complete. Although the qualitative behaviour iswell understood, a generalized model has yet to be developed. Extensive research has beenperformed to investigate such aspects as core/annular structure, solids loading profile, andsolids and gas residence time distributions. Results are difficult to compare. Little is knownregarding the effects of parametric differences between various experimental units to allowconfident comparison. Compounding this deficiency is the need to use fitting parameters inorder to match models to various results. The need for fitted parameters illustrates the currentstate of CFB modelling. Combustion of solid particles is also still the focus ofmuch research.Questions arise regarding such aspects as fuel physical characterization, devolatilization rates,internal/external combustion of char, transfer processes to and from the particles, and surfaceproducts of combustion.Compounding the above complexities is the extension to the time domain. It is notgenerally possible, or necessary, to base transient models on complex steady state versions.Very often the objectives of the two types of models are different and assumptions, which areinappropriate for one, are both reasonable and necessary for the other. In order to maintain anacceptable level of accuracy, and yet obtain acceptable speed of solution, a number ofsimplifications are required.4.2 Mass BalanceTo write an overall mass balance, the unit is divided into numerous zones for both thesolids and various gaseous species. This is necessary in order to avoid the computationalburdens associated with a continuum approach. Figure 4.1 presents the divisions employed inthis model. Optimistically, these zones represent the behaviour of the critical modelingcomponents in as simple a form as possible while maintaining some essential characteristics of64Cyclone21I20191817162 151413124Secondazy Air ii10596877869 5104Fuel 11 3122131L-valvePrimary Airfl1Figure 4.1: Modeling Zones for Material Balance in Primary Loop of the CFB(a) Solids; (b) Gas65fast fluidization and CFB combustion, such as extensive backmixing of solids and near plugflow ofgas in the riser.4.2.1 Solids DistributionA number of advanced models are available describing gas and solids movement in acirculating fluidized bed. For the most part, these models are too cumbersome to solve on areal time, dynamic basis. As well, they often require prior knowledge (ie. measurements) fromthe system in order to obtain a liii! solution and, as such, are not suitable for predictivesimulation.These models generally attempt to describe the now well-accepted core/annulusstructure predominant in circulating fluidized beds. It is this structure that makes the CFBboth unique and practically advantageous, yet mathematically complex. The purpose of theproposed model is to predict the dynamics of the combustor temperature, flue gas oxygenconcentration, and heat removed by the in-bed heat exchanger. In cases where thecombustion time of a particle is large compared to the turnover time of the bed and the cycletime through the external loop, the specifics of the internal structure are not important tooverall heat release. For these well backmixed systems the core/annulus nature need not beaddressed in mathematical form, and it is sufficient to assume a uniform radial suspensiondensity.Critically, it has been assumed that the interchange of both gas and solids between thecore and annular regions is fast enough that these two regions can be taken as well mixed atthe average voidage determined at a given height. Since the empirical heat transfercorrelations employed later are consistent with this assumption, and temperatures areexperimentally found to be radially fairly uniform, this assumption appears to be justified in thecurrent context.Key to the description of the hydrodynamics of a circulating fluidized bed is the axialsolids loading profile, in particular, the riser average and at the in-bed heat exchange surface,66as a function of the operating parameters (solids circulation rate, gas velocity, etc.). Seniorand Brereton (1992) consider two zones in the riser - a developing zone at the bottom and afully developed zone above. Their model concentrates on the developed core/annular regionand particle interactions between the core and the annulus for the purpose of heat transfercalculations. Noting that heat transfer surfaces are typically located in the upper developedzone and that the developing region is too complex for detailed modelling, they simplyestimate the developing zone solids loading profile with a fitted exponentially decreasingvoidage profile correlated to experimental data. An iterative solution is employed where theheight of the transition point is altered until specific umatchingu criteria are satisfied. Thesecriteria are that, at the transition, (i) the densities of the developing and developed regions arethe same, and (ii) the core-to-wall mass transfer coefficients are the same.The solution of their model is too numerically intensive for this application. As well,their core/annular solution does not satisfy the radial uniformity assumption employed in thismodel. Some of their basic concepts are used here in order to obtain a solution for the solidsloading profile.Senior and Brereton assume an exponentially decaying profile from the solids entrypoint to the top of the developing flow region given by:PzP =exp(—ç(z—z0)) (4.1)p0 —pwhere: z = height (m)z0 = reference height (m)= density at height z (kg/rn3)pf= density at top ofprofile (kg/rn3)p0 = reference constant density at height z0 (kg/rn3)= decay constant (rn-i)67The points chosen by Senior and Brereton to fit the curve given by Equation (4.1) arethe solids return point and the top of the so-called developing flow region. In the modelproposed here, exponential decay is considered right to the top of the riser. This is a commonassumption in current CFB modelling. It implies that there is a continuous decrease in theriser solids loading with height. Senior and Brereton (1992) define a reflection coefficient atthe top of the riser to account for observed deviations from this assumption. Riser exitgeometry has a strong effect on the ease with which solids can leave the riser. For example,the common abrupt (900) exit has a tendency to cause particles to rebound back down thewalls of the riser leading to the often observed increase in solids loading at the top of the riser.Their reflection coefficient stipulates what fraction of solids reaching the top of the riserreturn down the walls. Unfortunately, this coefficient is not only a function of unit geometry,but is also highly dependent on operating conditions. Rather than redefine this coefficient, theexponential decay to the exit is accepted and fitted to ensure appropriate solids loading overthe heat exchange surface. Although creating some error in the axial distribution of solids,this assumption has very little effect on the mass balance considering the assumption of perfectmixing.For the suspension density at the solids entry port, Senior and Brereton (1992)propose a relationship correlated to data obtained on the UBC combustor of the form:(1Er)=C0U’I GC2(4.2)PP(UvT)Jwhere: c0, c1, c2 = fitted constants= net solids flux (kg/m2.s)U = gas velocity (mis)= dimensionless gas velocity (Grace, 1982)vT = particle terminal velocity (mis)68Er = voidage at solids return level= particle density (kg/rn3)It has been found that, with solids circulation rates measured experimentally (Appendix B),Equation (4.2) greatly overpredicts the density at the base of the riser. Consequently, the netsolids flux G has been replaced with an internal flux correlated to fit measured combustordata.The suspension density in the upper portion of the riser is assumed to follow acontinuation of the exponential curve from the developing region, with the exit solids loadingexperimentally correlated. This density is determined from the work of Patience et al. (1992)who propose a relationship for a slip factor (the ratio of interstitial gas velocity to particlevelocity) that has been shown to be consistent with data in the hydrodynamically developedflow of the upper bed. This factor does not take into account the effects of exit geometry. Ithas been modified here to represent the high internal recirculation of solids resulting from theabrupt exit.The slip factor, p, applied to an asymptotic limit of fully developed flow, is defined asthe ratio of the superficial gas velocity, U5, to particle velocity, V, i.e.:U(4.3)where 6 = voidage.The particle velocity, V, is based on the solids circulation rate, i.e.:69VP = (44)p(i—c)The relationship for slip factor proposed by Patience et al. (1992) is given by:( = 1+..+O.47Frt041 (4.5)Frwhere Fr is the Froude number based on superficial gas velocity:UFr= g (4.6)(gD)while Fr is the Froude number based on particle terminal velocity:Fr= V(47)(gD)where D is the riser diameter (m).By substituting the relationship for the slip factor (Equation 4.5) and particle velocity(Equation 4.4) into the definition of slip factor (Equation 4.3), the voidage, s, in the fullydeveloped zone can be estimated. As noted earlier, Equation (4.5) does not take into accountriser geometry. In order to account for the substantial internal mixing caused by the abruptexit on the UBC pilot CFBC, an internal flux, G1 has been substituted for G in Equation(4.4). This hypothetical internal flux is obtained from a correlation of data from the UBCpilot plant to provide limiting voidages appropriate to estimate upper bed voidages.704.2.2 Solids Balance ZonesThe zones used to describe the density profile do not correspond well to physicaldivisions in the combustor; there are better divisions from the perspective of defining solidsmixing zones. For this purpose, the riser is divided into two regions in series as illustrated inFigure 4.1(a). The uprimaryl! zone extends from the base of the riser to the secondary airinjection port and includes the primary air port, fuel feed point, and L-valve solids return. The“secondary” zone continues from the secondary air injection port to the top of the riser.It is more common to regard the riser as 3 distinct zones to portray the conventionalsigmoidal profile (e.g. Wen and Chen, 1982). Three-zone models recognise a dense region atthe bottom, fully developed flow at the top, and an intermediate transition zone. Typicaloperating conditions in the UBC pilot combustor result in no significant bottom dense bed.The tapered lower section (Chapter 3) is intended to create high velocities at the base to helpmove the solids up the riser (although Senior (1992) has shown that, under some conditions, itcan increase the base density). Under most conditions, the tapered bottom section essentiallyeliminates the dense zone. Because of the lack of a significant dense region, this zone isneglected in this model, as by Senior and Brereton (1992), and only the developing and upperbed regions are considered.The base of the riser is characterised by a relatively high solids loading and significantparticle movement in all directions. Above this turbulent, or developing, region is thecore/annular flow structure characterised by a large downflow of solids at the wall and a highinterchange of particles between the core and the annulus. The gas velocity in the primaryzone (above the tapered section) is typically 4 to 5 m/s, 1/2 to 2/3 of the velocity in thesecondary zone leading to a high downward flux of solids. From a global perspective, thewhole zone might be considered well mixed.As with the primary zone, the secondary zone exhibits a relatively high degree ofbackmixing of solids. This region has a developed core/annulus structure throughout, withsolids mixing accentuated by the presence of an abrupt exit at the top of the riser. As solids71strike the top of the riser, many particles rebound downward internally, both increasing thesolids hold-up in the upper zone as well as enhancing the backmixing of solids. As with theprimary zone, in view of the extensive downflow of particles, for the solids, a well mixedassumption appears to be reasonable for this part of the furnace.To provide a full description of the solids mixing, the degree of solids mixing betweenthe upper and lower zones must finally be described. Here, communication between theprimary and secondary zone is assumed to occur in the upward direction only. Downflowacross this zonal barrier is considered negligible. At the secondary air injection port there is asudden increase in gas velocity from that of the primary zone. This addition of secondary airis considered an impediment, preventing solids downflow from the secondary to primary zone.Such a barrier has been observed in practice (Brereton and Grace, 1993), although it does notprevent some communication between the regions due to particles falling between thesecondary air inlet ports.All solids leaving the riser enter the primary cyclone, where they are separated fromthe gas. The cyclone is considered as having a 100% collection efficiency, thereby passing allsolids to the return standpipe.Gas and solids are assumed to be thoroughly mixed in the cyclone. Kang et al. (1989)correlated the average solids residence time in cyclones (for geometric ratios of cylinder tocone height of 1.8 to 5.0) from experimental measurements as:— 0.701 -0.42 —L760.032Re0.43(Ug vt Pp Pg ( H (4.8)tg v ) L Pg ) H—h)where: h0 = cyclone cylinder height (m)H = cyclone overall height (m)Re = particle Reynolds number (pgugdp /p.g)tg = mean gas residence time (s)= mean solids residence time (s)72Ug inlet gas velocity (mis)Vt = particle terminal velocity (mis)Pg gas density (kg/rn3)= solids density (kg/rn3)The mean gas residence time, 1g was given by Leith and Licht (1972) as:i IV+1 (4.9)(ab)ug 2)where: (ab) = cross-sectional inlet area height x width (m2)V = volume of cyclone at natural length (m3)annular volume above exit duct to middle of entrance duct (m3)Figure 4.2 indicates the cyclone dimensions referred to in Equations (4.8) to (4.11).V can be calculated from:—— De2)V (4.10)Swhile the volume at natural length, V, can be determined from:v =i!?—(h _s)+ +ShjD Ei++1_De21 (4.11)4 C L D D2J 4where d=D_(D_B)F8+1h0L H—h0Assuming steady state conditions (ie. no accumulation of solids in the cyclone), thecyclone solids holdup, p (kg/rn3), can be estimated from the solids residence time (Equation4.8) and the mass flowrate of particles:73LFi2ure 4.2: Sketch Showing Cyclone Dimensional Parameters(from Leith and Licht, 1972)174= mt(4.12)where the solids mass flowrate, the, (kgls), can be determined from the net solids flux as:th=GA (4.13)and V0 is the cyclone volume excluding the volume inside the vortex-finder (m3).The standpipe is simulated by a large number of CSTRs in series; sufficient torepresent a plug flow system. The PFR is necessary to follow the gradual cooling behaviourof solids as they pass through the standpipe, as well as to dynamically represent theaccumulation or consumption of the carbon in the total inventory as it is returned to the baseof the combustion zone.4.2.3 Gas Balance ZonesThe gas is assumed to be in near plug flow in the riser. For simplicity, both theprimary and secondary solids regions are each treated as ten well-mixed gas zones in series asshown in Figure 4.1(b). This gives a close approximation of plug flow. In practice, some gasbackmixing occurs as gas is pulled downwards with the solids in the annular region (Yu et al,1987). However, in combustors, this backmixing is small compared to the overall throughputof the system, and the model is relatively insensitive to the gas mixing assumption. Thenumber of zones employed here is somewhat arbitrary, 10 being more than adequate toapproach plug flow. The number of gas zones could be reduced in order to account for gasbackmixing as a crude alternative to an axial dispersion model. In view of the structure of thedynamic model presented here, which leads to its apparent insensitivity to gas backmixing, thetanks-in-series approach satisfies the plug flow assumption while retaining the option (by75reducing the number of gas zones in series) of approximating higher degrees of axial gasdispersion.It is assumed that there is negligible gas flow in the standpipe. Although air isintroduced to the standpipe through the L-valve for solids circulation control, the amount isvery small compared to the total throughput of the system (less than 1 %), and thecontribution of reaction of this air with carbon in the standpipe is considered negligible.4.2.4 CombustionSuperimposed upon the fluid mechanics are combustion reactions generating the heatrelease within the system. Different transient responses for different fuels must be reflected bydifferent intrinsic combustion rates at this level of the model. The general approach here is touse small batch tests in a bench scale fluid bed reactor (Appendix A) to determine kineticconstants for a given char. Such a test is of relatively low cost and, because it is performed ina fluid bed environment, should provide combustion rates approximating those in the pilotplant. Provided that the same assumptions are applied to interpretation of the batch data asare used later in extrapolation of these data to the pilot, then appropriate variation ofcombustion rate with particle diameter and temperature should be achieved.In this work, which is currently limited to solid fuels (coals and cokes), carboncombustion calculations are based on spherical char particles of a diameter representative ofthe system average. Spherity is assumed for the sake of simplicity. Particle shape is not onlyfuel specific, but depends on fragmentation through devolatilization and collision, as well ason the mode of combustion. For example, a cubic particle burning under external difihsioncontrol would have the highest local rate of combustion at the outer sharp edges where theboundary layer is thinnest. Eventually, in the extreme, it would burn itself into a nearlyspherical particle. Therefore, initial particle shape is not necessarily indicative of the shape ofthe char in the bed.76Allowing for a non-uniform particle size distribution decreases the computationalspeed many-fold, while not necessarily improving accuracy. Rate of size reductioncalculations are in any case approximate at best, being highly fuel specific and dependent onthe mode of combustion. Swelling of the fuel, as well as fragmentation, creates uncertaintiesabout the changing size distribution within the combustor. The actual combustion processesinvolving swelling, fragmentation and attrition, which result in a complex size distribution, arethus represented for kinetic purposes by a single effective mean diameter.Devolatilization is treated as if it were instantaneous. It is assumed that combustiontakes place on the surface of the particle and that all C consumed is converted to CO2. Toreduce computational time, the particle temperature is taken as a conservative 100 °C abovethat of the combustion gas. Again, the unknown properties of the burning fuel (pore sizedistribution etc.) make any assumption regarding the extent of internal burning questionable.Measurements indicate particle burning temperatures in the range of 50 to 200 °C above thatof the surroundings, the excess being a function of fuel type and, more importantly, size. Inthe case of the kinetic studies reported here (Appendix A), it was estimated that particletemperatures varied between 50 and 150 C above the surroundings during the burnoutperiod. The assumptions needed to apply a particle heat balance are not justifiable. In anycase, errors in this assumption are corrected for by the choice of bed char characterisation(representative size) described above.Following the development of Arena at. a!. (1991), the external diffusion constant isdefined by the Sherwood number:kd= (4.14)where: D = oxygen difihisivity (m2/s)= char particle diameter (m)77kd = diffusion constant (mis)Sh = Sherwood numberThe Sherwood number is taken as that developed for a bubbling fluidised bed by Chakrabortyand Howard (1981):(Re\ 1/Sh=2e+O.69-) (Sc)73 (4.15)6where: Sc = Schmidt number = L/PgDa = suspension voidageand Re is the particle Reynolds number, defined by Basu et a!. (1987) for a circulatingfluidized bed as:(Ug_______cPgi r6 pi,l—ERe= S (4.16)Equation (4.15) fully defines the external mass transfer coefficient based on the assumptionthat the external resistance is confined to char particles moving freely in a gaseous suspension.This is consistent with the assumption of thorough mixing, and ignores clustering or streamerformation.The overall rate of combustion can be determined by equating the rate defined bykinetics to that defined by external diffusion to the char surface, i.e.:78r =kc =kd(cb—cS) (4.17)where: Cb = bulk oxygen concentration (kmol/m3)= surface concentration of oxygen (kmol/m3)k= kinetic rate constant based on external surface area ((kmoI/m2•s)/(kmoIJ3)n = order of reaction= overall rate of combustion (kmollm2•s)The kinetic rate constant, k, can be expressed by the Arrhenius expression:Eakc=AeRTp (4.18)where: A = frequency factor ((kmo1Jm2.s)/(kmoII3)Ea = activation energy (kPa•ml mol)R = gas constant = 8.314 kPa•m/kmol•KT = particle temperature (K)Solution of Equation (4.17) for the surface concentration of oxygen, c, defines the currentrate of combustion.Only the reaction of 02 with C is considered at this stage. Other reactions, such asthose involving S or N, are ignored. Currently, of interest is the flue gas oxygenconcentration and the amount of heat released - neither of which are computationally affectedby the consideration of these secondary reactions. The amount of oxygen involved with theseother reactions is negligible compared to the total throughput, as is their affect on the overallheat balance.794.3 Heat Ba’anceThe hydrodynamic and combustion elements of the program combine to give the rateof heat release as a function of fluid mechanics, gas and fuel feedrates, and systemtemperature. To then solve for the critical system temperature and oxygen level requiressimultaneous solution of the unsteady state heat transfer from the system.The heat balance on the riser/cyclone section considers the heat of reaction (takinginto account combustion and overall enthalpy change), heat removed by the in-bed heatexchanger (controllable by variation of the suspension density), heat lost to the refractory, andheat added to solids returning to the riser.Unlike the mass balance in which the combustor is separated into numerous zones, theheat balance is made globally because, as noted experimentally, under typical steady stateoperation there are essentially no temperature gradients along the riser, while during periodsof transients the gradients are never more than 10 to 15 °C. This is due to the high degree ofsolids backmixing which results in a high internal flux of heat throughout the system.4.3.1 Heat From ReactionThe heat generated from combustion is determined from the heating value of the fueland the amount of carbon consumed over the period tt (as calculated from the mass balance).The heat leaving the reactor in the flue gas is determined from the enthalpies and mass balanceforN2, 02, C02, andH20, from which the heat from the entering air is subtracted.4.3.2 Heat Removed by Heat ExchangerThe water side heat transfer coefficient, h11, (for turbulent flow) is computed fromSleicher and Rouse (1975), i.e.:Nu= =5+0.015RemPr (4.19)80where:m = 0.88—0.24(4.20)4+ Prn = 0.333+0.5e°61 (4.21)Re = (4.22)with: Q = water flowrate (m3Is)r = tube inside radius (m)= water viscosity (kglm.s)= water density (kg/rn3)and:CtPr= W (4.23)wwhere: = heat capacity ofwater (J/kg.K)k., = thermal conductivity ofwater (W/m.K)Pr = Prandtl numberThe gas-side heat transfer coefficient is determined from the work ofWu (1989) whomakes the common assumption that the heat transfer coefficient is of the form:h0 = hgc + hpc +h (4.24)where: hgc gas convective component (W/m2.K)81particle convective component (W/m2.K)= radiative component (W1m2.K)h. = heat transfer coefficient between outside of tube and combustor (W/m2.K)Wu (1989) estimates the gas convective component, h from Sleicher and Rouse(1975). For this application it is taken as a constant at 13 W/m2•K.The gas-solids suspension is treated as a grey body so that the radiative component isestimated from:= a(T —T)(4.25)(1/e +1/e—1)(T —T)where: T= tube surface temperature (K)= suspension temperature (K)emissivity of tube surfacee = emissivity of suspensiona = Stefan-Boltzmann constant (5.672 x 1O-W/m2.K4)Fitted values of and equal to 0.91 were used as in the work ofWu (1989).The particle convective component, h. can then be estimated from experimental dataas a flanction of the average suspension density over the heat transfer surface. From the dataofWu (1989) it was determined, for the equipment used here, that:=2°Pave,hx (4.26)where Pavejx is the average suspension density around the heat exchange surface (kg/rn3).With these substitutions, Equation (4.24) becomes:82(T — T4 ‘\hto13+2.0pave,j,j+4.735X10j.j ..j I (4.27)g w)The overall heat transfer coefficient, U0, based on the combustion side is then:1 r(4.28)U0 h1r, k h0If the tube wall resistance is neglected, and the inside and outside resistances togetherwith their corresponding temperature differences are equated, it can be shown that the tubewall temperature can be estimated as:Tw=TgAT0 (4.29)where:AT = ATL (4.30)0 (h1,/u0)with: ATLD = overall log mean temperature difference (K)AT0 = temperature difference between gas phase and tube wall (K)The procedure to determine the amount of heat removed by the in-bed heat exchangeris then as follows:(1) given water flowrate compute h from eq.(4. 19);(2) guess water outlet temperature Twaout and compute ATLD;(3) guess tube wall temperature T;(4) calculate from eq. (4.27);83(5) calculate AT0 from eq. (4.30);(6) calculate T from eq. (4.29);(7) converged on T? Ifnot, go to (3); If yes, continue;(8) calculate U0 from eq. (4.28);(9) calculate heat transferred q = UOAATLM.m;(10) calculate outlet water temperature from q = thC,(T0—(11) converged on If not, go to (2); If yes, calculation complete.4.3.3 Heat Loss to RefractoryThe refractory comprises the riser and primary cyclone and is taken to have anequivalent hydraulic inside radius r and outside radius r0. Physically, the riser is constructed(from the inside out) of 90 mm of Plicast LWI-20 Insulating Castable, 1 mm ofFiberfrax 970J-Paper, 6 mm of carbon steel, 21 mm ofFiberfrax Durablanket S Ceramic Fiber Blanket, and21 mm of Paroc Basalt Insulation. The thermal properties of these materials are listed inTable 4.1.Heat loss through the refractory is treated as an unsteady state conduction problem inthe radial direction with:(4.31)at r&r ãr)where: T = material temperature at radius r and time t (K)r = radial position (m)cx = thermal diffusivity given by k/pC (m2/s)with boundary conditions:_kj=hj(T_Tg) @ r=r (4.32)84Table 4.1 - Thermal Properties ofMaterials ofConstructionMaterial Thermal Conductivity Heat Capacity Density(W/m2.K) (J/kg.K) (kg/rn3)Plicast Refactory* 0.3 920 961Fiberfraxj-Paper 0.112 1130 160Carbon Steel’s 34 473 7801Fiberfrax Durablanket’ 0.09 1130 64Paroc Insulation’ 0.08 920 128Stainless Steel# 26 477 7900*- from supplier# - from R.H. Perry and D. Green (1984)85—k0.=h(T--ç) r=r0 (4.33)where: Tg = combustor inside temperature at time t (K)T = surroundings temperature (K)The contact resistance between adjacent materials is ignored.The external heat transfer coefficient, h0, is assumed to be 12 W/m2K. Wu’sexpression for the inside heat transfer coefficient, h, as used for the in-bed heat exchanger(Equation 4.27), is assumed to apply to the refractory as well, with the temperature at theinside wall T substituted for Tbe and the overall average solids loading used in place ofPave,iv Measurements of temperature at the inside wall of the combustor indicate that thisexpression provides an adequate estimation of the wall temperature. This value isapproximately 20 °C below the combustion temperature at steady state conditions.4.3.4 heat Added to Solids Returned to RiserIn order to account for heat lost through the standpipe, a separate heat balance isperformed to determine the temperature of the sand/ash/char mixture being returned to thebase of the riser. The combustor compensates for this heat loss by transfer of heat from thegas to these solids. It is assumed that the gas and solids in the riser are at the sametemperature.Temperature variation within the sand particles is considered negligible. In order forthis to be valid, Holman (1963) indicates the following condition must be met:h(V/)A O.1 (4.34)k86where: A particle surface area (m2)h = convective heat transfer coefficient (W/m2.K)k = particle thermal conductivity (W/m.K)V volume of particle (m3)Note that the dimensionless group here is simpiy a Biot number.Under typical operating conditions, a value of 500 W/m2•Khas been estimated for h.The sand particles have a mean diameter of 260 with a thermal conductivity, k, of 0.33h(V/)W/m•K (Periy and Green, 1984). These provide an estimate of kA of 0.07 validating theassumption of temperature uniformity of the particles.Equating convection heat loss from a particle to its decrease in internal energy:hA(T—Tj=—CpV (4.35)with the initial condition of T T0 t =0, the solution ofEquation (4.35) is:T— T =exp (4.36)T0 -TThe density of the sand particles is 2600 kg/m3 with a specitic heat, Ci,, of 820 J/kg.K.Considering the discretized time interval of 1 s used in this work, the right hand side ofEquation (4.36) can be solved to yield 0.082 indicating that 91.8% of the87temperature change of a particle takes place during one calculation period - justifying theassumption that all solids introduced to the combustor are instantaneously heated tocombustion temperatures.The same ten standpipe zones used in the mass balance are employed to estimate theheat loss to the surroundings (Figure 4.1(a)). Each individual zone is considered to be at auniform temperature, with the particles entering the first zone (top of standpipe) at thecombustor temperature. As the solids travel down the standpipe they are assumed to be wellmixed in each consecutive zone in order to determine a new zonal average temperature,accounting for heat lost to the surroundings.The standpipe heat losses are modelled in a similar fashion as the riser (section 4.3.3).In this case, the standpipe radially consists of 6 mm of stainless steel on the inside, 21 mm ofFiberfrax Durablanket S Ceramic Fiber Blanket, and 21 mm of Paroc Basalt Insulation. It isassumed that heat travels in the radial direction only, i.e. axial conduction of heat is neglected.This is consistent with the observation that the solids, having a very high heat capacity, tend toexhibit only a small drop in temperature as they pass down the standpipe (5 to 10 °C from topto bottom compared to the driving force to the atmosphere of 800 to 850 °C).4.4 Model SummaryComputationally, the model is solved at each time step. This takes the form of anumber of sequential steps. The order of computation is as follows:(1) Given temperature Tg from previous time step, compute general properties(a) gas density(b) gas viscosity(c) gas thermal conductivity(d) gas molecular diflhsivity(e) particle terminal velocity(2) Perform hydrodynamic calculations. Given overall average suspension density, compute:88(a) solids loading profile in riser (section 4.2.1).(b) solids loading in cyclone (section 4.2.3).(3) Complete mass balance:(a) advance solids through standpipe and determine carbon content.(b) for riser and cyclone:(i) determine carbon content of solids zone i.(ii) compute rate of combustion of gas zonej (section 4.2.4).(iii) compute final concentrations of 02 and C in gas zone j.(iv) redistribute carbon in solids zone i and repeat for next gas zone j.(4) Complete heat balance. This is an iterative procedure by which the heat generated isequated to the sum of the heat losses to determine a new combustor temperature Tg:(a) compute heat lost to refractory (section 4.3.3).(b) compute heat lost through standpipe and temperature of solids re-entering riser(section 4.3.4).(c) compute heat lost to solids introduced to combustor.(d) compute heat generated from reaction and enthalpy balance (section 4.3.1).(e) determine heat removed by heat exchanger (section 4.3.2).The results of the above computation fully describe the condition of the combustor attime t. Most important in this application is the combustor temperature, water outlettemperature from the in-bed heat exchanger, and flue gas composition (especially the 02concentration). This information permits the implementation of control structures throughmanipulation of fuel feed rate, riser solids loading and air flows.894.5 SimulationIn order to provide full simulation capability, the model is extended to allow on-lineuser interface and graphic display updated at each time step. Variables which can bemanipulated include:- fuel feedrate- total air flow- primaiy/secondary air ratio- number of tubes used in heat exchanger- flowrate ofwater through heat exchanger- setting of average riser solids loading- setpoints for gas temperature, water temperature, and 02 concentration- various controller parameters as requiredA complete program listing of the dynamic simulator is provided in Appendix D.Simulation results are presented, compared with experimental data from the UBC pilotcombustor, and discussed in Chapter 7. The model is discussed in the latter part of the thesisas some of the results are in reference to the control identification and application work(Chapters 5 and 6).90CHAPTER 5- PROCESS IDENTIJICATION AND CONTROLThis chapter introduces basic concepts of control as used in this work. It is not aliterature review, nor does it consider these techniques in detail. It is included to aid thereader who does not have a background in this material. It is intended to provide sufficientinformation for an understanding of the results presented in Chapters 6 and 7.5.1 IntroductionBeing a highly competitive field, control design and philosophy tend to be proprietary.Therefore there is little public access to information on the application of process control toCFB combustion. Note also that there is growing pressure for tighter operating constraintsdue to expanding legislation on emissions and the consequential need to improve generaloverall efficiencies, and this further promotes secrecy among vendors and operators ofcommercial CFBC systems.The controls portion of this research was necessary to complete the validation of thedynamic model described in Chapter 4. Dynamic tests were carried out to develop discretetime process models of the plant. As well, an implementation for control of the UBC pilot91CFB combustor was demonstrated. Discrete time models determined experimentally can becompared with those extracted through simulation for validation of the appropriateness of thedynamic model in control simulation. In addition, the application of control to the combustorprovides a basis for comparison of the behaviour of a particular control system to that samesystem implemented through simulation. This comparison provides further qualitativevalidation of the simulator.CFB combustion is a process which is highly time variant. Among the manydisturbances are variations in fuel feed size and reactivity, and non-uniformities ofbed materialproperties and composition. Added to these disturbances, in boiler application, is thecontinually changing load demand. The combination of these aspects leads to a process thatrequires continuous monitoring and incessant control action.This chapter focuses on the control techniques used in this research. A brief overviewof model-based control leads to a discussion of the control algorithm employed - GeneralizedPredictive Control (GPC). This algorithm is outlined to provide the reader with anunderstanding of its operation and its advantages. As well, the employed identificationtechniques are presented. Identification refers to plant testing and analysis for thedevelopment of a simplified “black box” model describing the dynamics of the processoutput(s) in response to changes in the process input(s).Of the model-based approaches to control, the GPC algorithm has been proven to bethe most robust for open-loop unstable or non-minimum phase plants, and varying orunknown model order or dead-time. The pilot CFB, as found through experience, is highlytime variant. This is due to the deterioration of bed material over the course of an experimentas well as varying fuel properties. In addition, consideration was given to the effect ofchanging fuels. In this instance, the robustness to unknown model order and dead-time isconsidered highly advantageous. Although it is possible that other control techniques mayhave proven satisfactory, the use of GPC serves as (1) an applied demonstration of GPC itself92and (2) a demonstration ofmodel-based control within the framework of a combustion controlsystem.Complete control of the combustor can be achieved by adjustments in total air flow,riser solids loading, and fuel feedrate to meet specifications in combustor temperature, fluegas oxygen concentration (emissions), and in-bed heat exchanger water outlet temperature(rate of heat removal). This is a 3x3 MIMO problem in which interaction will occur. Thechoice of control loops was qualitative as outline by Stephanopoulos (1984):(1) Choose the manipulation that has a direct and fast effect on a controlled variable.(2) Choose the couplings so that there is little dead-time between every manipulationand the corresponding control variable.(3) Select couplings so that interaction is minimal.Applying the above criteria, it was decided to control heat exchanger outlet temperature withsolids loading, flue gas oxygen with total air flow, and combustor temperature with fuelfeedrate.Interaction between these loops is somewhat minimized due to the differences in thetime constants of each. The solids loading has a time constant of approximately 10 seconds,flue gas oxygen has a time constant of 3 to 5 minutes, while that of combustor temperature is20 to 30 minutes. These differences, while not eliminating interaction, indicate that control ofthese loops should not lead to instability.It is important to note that the purpose of the control portion of this research was asoutlined above. It was not for determining the optimum control strategy of CFB boilers norfor optimal control of the UBC pilot CFB combustor. It was simply to define a strategy thatwas able to provide sufficient control for model validation as well as demonstrate the GPCmodel-based controller.935.2 Overview of ControlProcess control has been an issue in many industries for hundreds of years. Beginningwith manual control, as processes became more complex and required more attention, thenatural progression to automatic control began. Notwithstanding the value of operatorknowledge, computer-based control is a major facet of any project and continues to be aprime area of research.The field of process control concerns itselfwith two conditions or modes of operation.These are the regulation problem or steady-state operation and the servomechanism problemor that of changing operating conditions. For regulation, the goal is to maintain the process atsome given operating point and the purpose of the controller is to correct for disturbances inthe process. In general, the tighter the control about a given condition, the more efficient thatprocess becomes and the higher the quality of the product. The servo problem concerns itselfwith moving the process from one operating condition to another. For efficiency, it isgenerally desired that these changes take place as quickly as possible without impartingexcessive disturbances to the process or producing excessive off-spec product.Numerous control methods are under both extensive application and research. Theserange from simple proportional controllers to highly advanced artificially intelligent or fuzzylogic type controllers. The majority of modern control methods can be considered as beingmodel-based from some point of view. Models are employed in the initial controller designand/or employed within the control structure. This allows complicated control problems to besolved faster and more easily, while such questions as stability and robustness can beaddressed directly (Fisher, 1991).In this thesis, the term advanced” control refers to model-based control. Morespecifically, this is in reference to internal model type control. Internal Model Control (IMC)is a general class of control structure which includes Minimum Variance Control (MVC),Extended Horizon Control (EHC), Linear Quadratic Control (LQ), and Dynamic Matrixcontrol (DMC).94IMC is based on a simplified model of the process. A block diagram illustrating IMCis presented in Figure 5.1, where 0 represents the actual process, Gm is the model describingthe process dynamics, and G is the controller for the given loop.The block diagram ofFigure 5.1 can be reduced to equation form:GG 1_G*Gmy= y + N (5.1)1+G*(G_Gm) sp 1+G*(G_Gm)The error between the model and the actual process is given by (0 - Gm). If the model isperfect, this error is 0 and Equation (5.1) reduces to:y=G*Gysp +(1_G*Gm)N (5.2)Ideally, one wishes to design a controller that can perfectly track the setpoint andcompletely reject all disturbances (so that y = y). This is accomplished by designing thecontroller such that G*G 1 in Equation (5.2). Based on the assumption that the model isperfect (Gm G), the resulting controller is given by:G* = Gm’ (5.3)Equation (5.2) represents the loop ofFigure 5.1 as an open loop relationship (since theassumption that G - Gm 0 eliminates the feedback loop). The only condition for closed-loopstability in this case is that 0* and 0 be open-loop stable. This is considerably simpler andmore straightforward than methods required to analyse conventional control schemes (e.g.Routh, root locus, Bode, and Nyquist).95Nsp__G*______ _ _ _________yFigure 5.1: Simplified Block Diagram Showing Internal Model Control (IMC) Structure96In practice, this idealized controller is often impractical. Inevitably, there is somemodel mismatch (or modeling error), and the controller is extremely sensitive to this, as in thecase with feedforward control. As well, the presence of noise or unmodeled disturbances canlead to excessive control action.These two problems can be solved by the inclusion of a filter. A properly designedfilter removes much of the noise and reduces controller activity. This is the equivalent of ‘detuning” in conventional control. It slows down the response of the controller, but can makethe loop stable for any level ofmodel error.Another problem that can arise with this idealized controller is with the inversion of* mthe process model (G = G ). Time delays in the process appear as future values in thecontroller, and are impossible to realize in application. As well, right hand plane (RHP) zeros(in the s-domain) in the process model result in an unstable controller. When the model isinverted, the RHP zeros become RHP poles. From theory, RHP poles (or poles outside theunit circle in the z-domain) indicate instability. These two problems are solved by factoringthe model and only inverting that part which does not contain RHP zeros or pure time delay.An extension to the basic IMC algorithm is the inclusion of a predictor (ModelPredictive Control (MPC)). The predictor estimates the trajectory of the process output todetermine the next appropriate control action based on some cost function. This allows online optimization by minimization of the cost function while meeting constraints on the inputand output variables.Adaptive control is the technique by which process modeling and/or controller designis performed on-line. “In principle, any model-based design or control technique can be madeinto an adaptive system by adding a suitable on-line model identification algorithm” (Fisher,199fl. Self-tuning regulators (Astrom and Wittenmark, 1973), self-tuning controllers andgeneralized minimum variance controllers (Clarke and Gawthrop, 1975, 1979), and poleplacement controllers are examples of the implementation of adaptive control.97The combination of internal model, trajectory prediction, and adaptation, results insome of the most practical controllers. These are Long Range Predictive Control (LRPC)systems. “LRPC has been used in a number of successfiul applications and is recommendedfor those that require an adaptive controller for non-linear and/or time-varying processes”(Fisher, 1991). Generalized Predictive Control (GPC) is one of the more recent developmentsand belongs to this class of LRPC. It is rapidly gaining interest both in research and forindustrial application.5.3 Generalized Predictive ControlGeneralized Predictive Control (GPC) (Clarke Ct al., 1 987a, b) is an algorithm which isconsidered to be a “generalization of the previous multistep predictive algorithms” (McIntoshet al., 1991). It is based on a receding-horizon method, predicting the process output overseveral future time steps. This algorithm is considered “general” because of its ability tohandle non-minimum phase, open loop unstable, variable or unknown dead time, andunknown order processes. A complete detailed description of GPC is provided by Clarke etal. (1987a, b).In discrete time, the condition of the process is known only at the instant of sampling.Commonly in digital control, the output, Yt’ is sampled at equispaced time intervals, the samepoints as those where control adjustments, u, are made. The linear difference equation tomodel the process is:Y1 — 1y_ — rYt—r o-t-i — i-’t-b--i — “ () sUt_b_s (5.4)which describes the output, Yt’ as some function, ö(y), of the previous known outputs and oi(u) of the previous inputs. b refers to the number of periods of delay representing the plantdead-time from when a control action is performed and a response is seen in the output.By definition the backward shift operator is given by:98q1y Yt—i (5.5)Substituting the backward shift operator into Equation (5.4) yields:(0)0—0)1’_..._0)qs)qbYt = —1 —r’ u (5.6)1—öq —...—ôq )or0)(ql)qbYt = Ut (5.7)öiq )which is the discrete form of the process transfer fi.inction. It is important to note that theorders and constants of the polynomials o)(q’) and ö(q’) are determined not only by theprocess dynamics, but also by the chosen sample/control interval.The original formulation of GPC is based on a CARIMA (Controlled Auto-Regressiveand Integrated Moving-Average) plant model:A(q’)y(t) = B(q’)u(t -1)+ qt)(5.8)where A(q-’), B(q’), and C(q’) are polynomials of order na, nb, and nc respectively, i.e.A(q’) = +a1q’ + . + (5.9)B(q’)=b0+b1q’+...+bflq (5.10)99(5.11)while y is the plant output and u is the plant input or manipulated variable; is a normallydistributed noise with variance a2 (white noise). C(q1) is in fact a model combination of allof the noise components within the process. If C(q’) is known for the process, the predictorhas optimality properties. Alternatively, as in this work, C(q’) can be a fixed designpolynomial, T(q’), becoming a filter for estimation to provide other properties such asrobustness to unmodeled dynamics.In Equation (5.8), is a differencing operator given by:A=1—q’ (5.12)to account for the non-stationarity of disturbances often encountered in industry andinherently providing integral action to the controller to remove offset.In order to derive a j-step ahead predictor for y(t+j), one must define the Diophantineidentity. Consider the stochastic process:C(q’)(t)A(q’)y(t)=A(5.13)The prediction of y(t+j) at time t is given by:c(q’)(t+j)y(t+j)= AA(q’)(5.14)100The right hand side ofEquation (5.14) contains terms (t+j), (t+j-1), ..., (t), (t-1),These terms can be separated into those known (past) values, (t), (t- 1), ..., and thoseunknown (future) values,E3(t+1), (t+2), ...,c(q’)= E.(q)+qF(q)(5.15)AA(q’) AA(q’)Rearranging and substituting the fixed design polynomial, T(q’), for the process noise,C(q), yields the Diophantine identity:T(q_’) = E(q)A(q’) + q_.Fj(q_1) (5.16)where E and F are polynomials defined by A(q’) and C(q-’) and the prediction interval j. Fis the known part of the disturbance forecast and E represents those components in the futureor the forecast error.Multiplying the model (Equation 5.8) by EJzqi results in:EAAy(t + j) = EBzu(t + j — i) + EC(t + j) (5.17)ReplacingE3AA with the aid ofEquation (5.16) yields:y(t +j) = EBAu”(t +j — i) + EC(t + j) + Fy(t) (5.18)where the superscript, f, indicates filtering by the quantity 1/T(q’).The polynomial E is of degree (j - 1). Multiplying E by the noise term E(t+j) involvesonly future values of noise. By definition, the best prediction of white noise is 0 allowing this101term to be dropped for predictive purposes. In addition, replacing EB with G yields theprediction ofy(t+j) at time t:(t +j) = GAu(t+ j — i) +Fy(t) (5.19)where is the step response of the plant to time t + j.The GPC approach to prediction is to consider a number of horizons over which toperform prediction. This is to say that a set of predictions is produced over a range ofj. Forjb, the plant dead-time, certain assumptions are required about future control actions. It isthese assumptions that provide the basis for GPC.The common objective or cost function is of the form:N2 2 N2 2[y(t+j)—w(t+j)] + (5.20)jN1 jiwhere: N1 minimum horizonN2 maximum horizon= control action weighting factorw = set-pointN1 can be, and often is, taken as 1. If the plant dead-time, b, is known withconfidence, then N1 can be taken as b in order to minimize computation. N2 is typically takento contain the rise time of the plant or, more generally, to contain all of the significantresponse generated by the current control action. The control weighting sequence, allowsfor a user specified weighting of the control actions to be performed.Since the minimization of the objective function (Equation 5.20) is in terms ofunfiltered inputs, zXu, and not the filtered inputs, Aug, of the output prediction (Equation 5.19),102modification of the output prediction is required. Clarke et al. (1987b) define the followingidentity:G(q) = (5.21)where and Ti are uniquely defined given G, T, and j. G’ contains the coefficients of forwhich the initial identitiy ofEquation (5.16) has T = 1.Substituting for in the output prediction, Equation (5.19), yields:where:9(t +j) = GAu(t+j —1)+r’tiu(t— 1)+Fy(t)In vector form, Equation (5.22) for each prediction interval, j, becomes:=G’ü+f(5.22)(5.23)9(t+i)(t+2)(t+N)u(t)- zu(t+1)u=zu(t+N—1)F1y(t) +F1tu(t — i)f2y(t)+FAu(t—1)Fyf(t)+ rNAU (t — i)gg.j10gg_2and...0g103The expectation ofEquation (5.20) can be written:3 = Ef(y_w)T(y._w)+?uTu} (5.24)where w is the setpoint vector:w(t+1)w(t +2)w=w(t+N)or:J = Ef(G’U +f w)(G’ü + f— w) + ?uTu} (5.25)The minimization of J results in the projected control vector:ii = (G”G’ + ?JF’GtT(w — f) (5.26)The first element of ü is applied to the process and the vector is re-calculated at eachsampling instant.The originators of this control algorithm (Clarke et al., 1987a, b) provide acomprehensive description of the controller including a complete simulation study, effect ofcontroller settings, effect of model parameter assumptions, and comparison with other controlapproaches. This single paper is sufficient to fuiiy comprehend and implement this control104scheme as well as overwhelm the reader with the adroitness of applicability and significance ofthe scheme. Further references are given by Fisher (1991).5.4 Adaptive ControlOne key feature of a CARIIVIA model in the process controller is the ease with whichthis form of model may be updated on-line. Adaptation involves the measurement of processinput and output and recursive updating of the model parameters as information becomesavailable. The use of a CARIIv[A model minimizes the number of parameters and thereforereduces the complexity of computations required to perform the control task.Inclusion of adaptability into a control scheme should be considered for processeswhich exhibit non-linearity or are time-variant. Ideally, as the process changes over time or asnew operating conditions are imposed, the self-tuner adjusts the model parameters to maintainimproved control. Although not always necessary for robustness, proper adaptation ensuresthe best possible tuning of the controller at any given point in time.Recursive Least Squares (RLS) is the most common form of parameter estimation inuse. This recursive form of the well known least squares method commonly updates themodel parameters at each time instant the system is sampled (some versions provide decisioncriteria for whether or not to update the parameters at any given time).Consider the CARIMA model used in the GPC controller:A(q’)y(t) = B(q’)u(t- 1)+(5.27)Taking a best approximation of the white noise to be zero, Equation (5.27) becomes:A(q’)Ay(t) = B(q’)Au(t — i) (5.28)105Equation (5.28) can be rewritten to express the model in terms of parameter and data vectorsas:Ay’(t) = eT(t) (5.29)where:0T=[a1,2...,bb.] (5.30)and= [Ay(t_ 1),y(t—2),...,u(t— 1),zu(t_2),...j (5.31)This expression separates the model parameters and the input/output information, and issuitable for identification (estimation of OT).RLS employs the cost function:N!N-1{AYf(t)_oT(t)} (5.32)N =iwhere is a forgetting factor which takes a value between 0 and 1. This allows for weightingof the data with more emphasis placed on recent information as ?—*0. 0T is the modelestimate of the true process. Minimization of Equation (5.32) produces the parameterestimates which minimize the difference between the process output y(t) and that estimated bythe model T(t)The basic RLS is a minimization ofEquation (5.32) with the forgetting factor, , equalto 1. Recursively:106O(t) = Ô(t — i) + K(t)[y(t) — Ô(t — 1)T4(t)J (5.33)K(t) = P(t — 1) 4(t)/{?. + p(t)TP(t— i)(t)] (5.34)P(t) = —1)—P(t — 1)(t)(t)TP(— (5.35)+(t)P(t—1)(t) JThe basic RLS as outlined above suffers from its inability to remain alert. Alertnessrefers to the speed with which an algorithm is able to adapt. The inability to remain alertresults from the tendency of the covariance matrix, P(t), to become small. Note that P(t) isalways positive or zero. Referring to Equation (5.35), the updated covariance matrix isalways less than or equal to the previous P(t- 1) (remembering that the basic RLS employs . =1). As this covariance matrix becomes smaller, so also does the gain matrix, Equation (5.34),resulting in less sensitivity of the update law, Equation (5.33), to modeling errors (zy(t) -Use of the forgetting factor, , is one method of improving the alertness of thealgorithm. However, the choice of 2 does not just affect the reliability of the estimatedparameters. A small 2 leads to heavy weighting on recent data resulting in a large P and K,leading to uncertainty in the parameter estimates. Large values of 2 lead to slow tracking (asillustrated previously) and make fast changing parameters difficult to follow.Fortescue et al. (1981) modified RLS to employ a variable forgetting factor andmaintain boundedness on the covariance matrix P. They proposed a time-variable forgettingfactor such that Mt) approaches 1 when the prediction error is small and approaches a smallvalue (< 1) for a large prediction error, i.e.:107K(t) = P(t — i)(t)/[i +(t)TP(t— i)(t)J (5.36)T i2Iy(t)—9(t—l) (t)iI J (537)[a(1 + p(t)TP(t—To avoid exponential growth of the covariance matrix (Cordero and Mayne, 1981),bounds must be imposed on P(t):P(t) = w(t)/(t) (5.38)ifW(t)/(t) C. Otherwise:P(t)=W(t) (5.39)Here:W(t) = P(t —1)—K(t)(t)TP( —1) (5.40)The program written to perform the GPC calculations and the adaptive algorithm asoutlined above is listed in Appendix C.5.5 Process IdentificationProcess identification is the procedure of determining an appropriate model for usewithin the controller. The model is a dynamical representation of the process in terms of itsinput and output variables. In the present thesis, the GPC controller employs a CARIMA108model (Equation 5.8). It is the goal of identification to determine the orders of polynomialsA(q-l), B(q-’), and C(q’) as well as the corresponding coefficients.Two modeling approaches can be taken for process identification - mechanistic orempirical modeling (see Figure 1.1). As one of the purposes of this research was thedevelopment of a mechanistic model, process identification for the control aspects was carriedout using the empirical approach to provide further validation of the mechanistic model usedin the simulator. The empirical approach uses data collected directly from the process both todetermine the form of the model and to estimate the parameters. This approach resultsdirectly in a linear dynamic model of the plant in discrete time.The subgroup of models referred to as empirical models may be further subdividedinto parametric and non-parametric models. The empirical approach to modeling involvesidentification of the dynamic characteristics directly from plant data. The non-parametricmodel is presented as a plot or tabulation of the data (Bode, Nyquist, etc.), while theparametric model is a black box representation of the process (CARIMA model, transferfunction), with parameters estimated from the data.Non-parametric modeling is classical in nature. The response, in its chosen form, iscompared with known response order shapes, and the appropriate parameters are estimatedfrom the response curve to provide a crude estimation of a parametric model. A simpleexample is that of step testing. One perturbs the plant with a step change in the input andcompares the output to a first order, first order plus dead-time, and second order response.Having determined the form of model from the above test, one estimates the dead-time, timeconstant, and/or damping factor as appropriate for the chosen model form. This example isone of the crudest methods of obtaining a model from plant data, but illustrates the use of theinformation collected.Most non-parametric methods have resulted from continuous time analysis. However,the parametric methods discussed here have arisen from discrete time data analysis. Thesemodern parametric methods are much more efficient in their use of available information in109that all data are taken into account. This is because the model not only fits a process transferfunction but also identities a process disturbance model. By modeling the noise in the output,disturbances are removed from the data and a more accurate estimation of the process ispossible. These approaches are more recent and emerge from statistical time series literature(e.g. Box and Jenkins, 1970; AstrOm and Bohlin, 1966).There are numerous techniques for both testing and analyzing results. In this work,process identification was achieved through open loop PRBS testing and time series analysis.5.5.1 Plant TestingThe method of plant testing used in this work involved dynamic stimulation of theopen-loop process through the use of a pseudo-random binary sequence (PRBS). An exampleof a PRBS signal can be found in Figure 6.31. Upper and lower limits are placed on the inputvariable so that, at any given point in time, the input is either “high” or “low”. At pre-definedinstances, a decision is made whether to change the value of the input variable or to have itremain at the current value. The period between these decisions is defined as the switchingperiod (T1J. At every Tth, a random number generator supplies a 50% probability of aswitch occurring. TWth is chosen by rule of thumb as 0.5t T$WtCh t where t is theeffective time constant of the process (MacGregor and Taylor, 1990). This choice ofswitching interval helps to ensure that the frequency of the input is close to the breakfrequency of the process.5.5.2 Data AnalysisThe steps involved in identification can be summarized (MacGregor and Taylor, 1990)as:(1) Auto- and cross-correlate input and output.(2) Estimate impulse response function.(3) Determine order of transfer function.HO(4) Fit transfer function.(5) Auto- and partial-correlate residuals.(6) Determine order of noise model.(7) Simultaneously fit transfer function and noise models.(8) Perform diagnostic checking.Details on these steps are provided below.One discrete representation of a process is by a weighted function of all past inputs:= v(Z’)u (5.41)where v(q’) is the impulse response which may be estimated directly from the process byforcing the process with an impulse input and measuring the output. This approach is nottaken in this work.The disadvantage of employing the impulse response function as the control model isthat it tends to be of relatively high order. This makes it computationally cumbersome both incontrol calculations and for adaptive updating of coefficients.A more common representation of the process is via the discrete transfer functionmodel as shown in Equation (5.7). As many processes can be approximated by low-ordertransfer function models, the orders of the polynomials co(q-’) and ö(q-’) are most often 3.Note that the relationship between the impulse response function and the transfer function is:v(q’)= (q4)qb(5.42)As indicated by the CARIMA model used in the GPC controller (Equation 5.8), and asstated previously when discussing time series analysis in process identification, modeling of111the process noise is also of concern. This noise takes the form of an additive term appendedto the process output. In transfer function form:(j)(q1 )qbYt= ..1\ u+N (5.43)okq )where N is the noise term which is a combination of all noise components within the process.The noise is commonly modeled as an Autoregressive - Integrated - Moving Average(ARMA) process, so that:e(q1)N = ,‘ a (5.44)(pq )Awhere O(q-’) is the moving average polynomial of order q, ‘p(q’) is the autoregressivepolynomial of order p, and M is the backward difference operator which accounts for nonstationarity in the process; a is white noise and is the driving force of the system noise. Acomplete discussion of ARIMA models is provided by Box and Jenkins (1970). Transfer Function StructureAs noted above, a necessary step of the fitting process is to determine an appropriatetransfer thnction model order. An initial estimate of the order can be obtained by usingcorrelation analysis of the data to obtain an impulse response function of the process. Thisfunction can be compared to transfer functions of known orders to select the appropriatemodel structure.Consider the impulse response function model:112Yt = v(q’)ut +N (5.45)or:Yt V0u+V1U_+V2U_+•.•+N (5.46)Multiplying Equation (5.46) by uk yields:Ut_kYt = VOUt_kUt + VIUt...kUt_l +V2Ut_kUt_ + + U_)N (5.47)The autocovariance of a given series, z, at lag k is given by:iN-k — —cU(k)=(ztz)(zt+kz) k=O, 1,2,-•,K (5.48)where: C22(k) = autocovariance of series z at lag kN = number of data points in the seriesz = mean of series zIt is more convenient to work with a normalized autocovariance - or autocorrelation function:r(k) = (5.49)where: r(k) = autocorrelation of series z (-1 r(k) 1)C(O) = variance of series;1131 N—k1 — —wt—w)zt+k—zN t=ic(k) (5.50)1 N+k1 _\f ———w)z — zN t=iNormalization ofEquation (5.50) gives the crosscorrelation function:r(k)= (5.51)where S, S = standard deviation of series w and ; (S, = (0))Considering the data set over t = 0, 1, 2, ..., N, we may write Equation (5.47) in termsof the variance functions as:k = 0, 1, 2, K(5.52)By definition, the input, x, and the noise, N, are uncorrelated so that C,(k) =0 for all k.In matrix form, Equation (5.52) becomes:C,T,c,cV (5.53)114c,,(o) c,(o) c(i) ••• c(K)c,,(i) c(i) c,(o) •.. c,(K—1)where: C, = , T,= : : and V =C,c,(K) c,(K-i) •.. c(o) vKOne of the reasons that a PRBS input sequence is advantageous is that randomnessguarantees that it is not autocorrelated so that:c,(o)=s (variance ofx) (5.54)and:(5.55)Thus the impulse weights can be determined by:vk=rXY(1c)— (5.56)Note that for Equation (5.56) to be valid, necessary conditions are that x, Yt’ and N arestationary with zero mean, that x is uncorrelated with N, and that x is uncorrelated (random).Figure 5.2 presents a table from which the impulse responses of Equation (5.56) canbe compared with transfer function models to choose an appropriate transfer functionstructure.115lmput3C Step ETr, s,b V Form B FormRespozuc vj Reponsc—003 Y.-B’X,________JjjjjjjjLi Li013 Y—(1—)X, Y.—(.5+.5B)B3X1- !IIIIULi Liv;023 Iv+sv2)X (.+0B+.25B2)BX1 IllLiJITIJIJI103 (1+V) Y,—X_3 (l—.5B) Y,—.5B’X I .- .ji[FFFI1Li Li(1 +V) Y,— (1H3(1—.5V)X_, (.25+.25B)B3X,4fl1[1]Li Li(1+V)Y,—123(1—V+.25V)X,_ (.125+.25B+.L25)B’X-_________. Li203(1 —.25V+.5V) (1 —.6B+.4B2)Y1.8B’X J ,.. 1 L ii i i i iixt-3(—.23V+.5V)1,— (1—.6B+.4B) Y,—213(1—.5V)X, (.4+.4B)BX, Ill I III(1—.23V-i-.5V) Y1- (1—.6B+.4B2)Y,—(I —V+.25V)X_ (.2+.4B.2B)BX, Ji. i1 Iii 111223 l’LiFigure 5.2: Impulse Response Functions of Various Transfer Function Models(from MacGregor and Taylor, 1990)116Having identified a tentative structure for the transfer function, an initial estimate ofthe transfer function coefficients can be obtained from Equation (5.42). By equatingcoefficients ofBi, we obtain:v=O j<bVi 51v_+ö2V_+••+rVj_r +w0 j = b(5 57vi = V_1+ö2v_+ +öVj_y Wj_b j= b + 1, b +2, . .., b +sVi =ö1v_+ö2vj+•••+örVj_r j> b +s5.5.2.2 Noise Model StructureA similar approach provides an initial structure for the noise model (Equation 5.44).The process noise can be estimated from Equation (5.43):0) (q’)qbN=y1—, -i Ut (5.58)öiq )The autocorrelation and partial autocorrelation of these residuals can be compared withknown noise model structures in a similar fashion as the comparison of the impulse responseto transfer function models in Section partial autocorrelation is a correlation between points at lag k after accounting forall correlation effects for lags <k. Box and Jenkins (1970) fully describe the determination ofthe partial autocorrelation of a data set concluding with the general recursive formulaedeveloped by Durbin (1960):Pp+1,j ‘Pp,j — Pp+i,p+iPp,p—j+i j = 1, 2, . .., p (5.59)117pr1 — (p,r+1_- j=1Pp+i,p+i— Parameter FittingHaving estimated the structures of the transfer function and noise model, theparameters must be determined. Consider the model equation:_____e(q’)Yt= o(q1)Ut_b+a (5.61)In fitting the model parameters, the goal is to minimize the residuals (Unfit data). Thisis accomplished by minimizing the sum of squares of the driving force of the noise(minimize Rearranging Equation (5.61), we obtain:p(q1)jd_____a= e(q’)Yt— o(q’)Utb (5.62)Minimization of a2 is essentially a non-linear least squares estimation of a in Equation(5.62). This is easily achieved with available routines.1185.5.2.4 Diagnostic CheckinaDiagnostic checking of the model must be carried out to determine if the chosen formis adequate and, if not, to identify the source of the structural deficiency. The most basicchecks involve the residuals of the model prediction mud Ypredicted) As discussed above,if the model is correct, these residuals should take the form of white noise (random withstationary mean of 0). An autocorrelation of the residuals is used to test this condition. Ifthere is no autocorrelation, the model can be assumed adequate in accounting for all data. Onthe other hand, if there is residual autocorrelation, modification of the structure is necessary.If the input is crosscorrelated with the residuals, the transfer function structure is incorrect andmust be modified to remOve this crosscorrelation. If there is no crosscorrelation between theinput and the residuals, the noise model must be modified to remove the residualautocorrelation.The program written to perform the identification through time series analysis is listedin Appendix E.119CHAPTER 6: RESULTS AND DISCUSSION - CONTROL IMPLEMENTATION6.1 IntroductionThis chapter presents the results of the research conducted for this thesis concerningthe implementation of various control loops on the UBC pilot CFBC. The underlyingcontrollers, necessary for plant upgrading from manual to combuster control, are firstdiscussed. These controllers are key to enabling the setting and maintaining of air fiowratesand providing control over the solids circulation rate. The methods outlined in Chapter 5 areemployed to implement a single ioop controller for combustor temperature with fuel feedrate.The GPC algorithm was used for this loop and is shown to behave exceptionally well. Aswell, the identification techniques were applied with limited success. Difficulties encounteredare discussed. Finally, a complete control structure is presented providing control over thecombustor temperature, flue gas oxygen concentration, and the amount of heat removed bythe in-bed heat exchanger. Although a multivariable process, it was found that the timeconstants for the various loops are such that each may be treated as a single loop controller.The solids circulation rate is used to control the amount of heat removed by varying the solidsloading around the heat exchange surface of the in-bed heat exchanger. The flue gas oxygen120concentration is controlled by adjusting the total air throughput of the system. Both of thesecontrollers employed discrete PID algorithms which sampled the process at 1 second intervalsand were tuned on-line. The combustor temperature was again controlled with fuel feedrateby the GPC algorithm. A sample/control interval of 2 minutes was used for this ioop. Resultsindicate exceptional behaviour of the overall control structure and, although probably notappropriate for a larger unit, demonstrate the general applicability of the GPC algorithm in thecombustion process and the ease and reliability with which it can be implemented.The purpose of the applied controls in this thesis was to provide further validation ofthe dynamic model described in Chapter 4 as well as to demonstrate GPC within a combustionsystem control structure. Optimization of the control system was not carried out. It wassimply desired to attain some level of control to achieve the goals of this work. This level ofcontrol was assessed qualitatively. Compared to the years under manual control, theautomatic control loops provide much faster responses to setpoint changes in addition tomaintaining much tighter control around a given setpoint. Of issue here is that the controllermaintain stability under all circumstances.6.2 Basic Control LoopsThe underlying controllers are key to the successful implementation of any controlscheme. Prior to the start of the experimental research, the UBC pilot plant had to beupgraded from manual to computer interactive control. The base control loops are describedin this section together with an explanation of their purpose. The principal problems whichhad to be addressed were the tendency for the combustor to cycle while ostensibly being atconditions of steady state, and the need to control riser solids loading.6.2.1 Air Flow ControlOriginally, two rotameters were used to monitor the air flows (primary and secondaryair rates) and for manually setting the total air flow. Although adequate for prior research,121this system required modifications for dynamic and control studies. The need formodifications became apparent after initial experiments, involving step tests of variousvariables, were carried out to obtain a “feel” for the dynamic response of the unit. Resultsshowed cycling of temperature, oxygen, and riser solids loading. This cycling was eventuallytraced back to the building air supply. Figure 6.1 presents an example of the effect of cyclesin the air feed flow on the flue gas oxygen concentration.Air to the rotameters was taken directly from the building main air compressor, whichhas an output design of 80 to 100 psig (550 to 690 kPa). As air from the source is used, theoutput pressure drops from 100 to 80 psig (690 to 550 kPa) at which time the compressor isactivated, and replenishes the tank until the pressure reaches 100 psig (690 kPa). This leadsto cycles which are approximately of 5 minutes duration. This pressure fluctuation causesfluctuations in the air flowrate to the combustor and consequent cycling in oxygenconcentration (due to oxygen supply), riser solids loading (due to velocity fluctuations with noloading controller in place), and temperature (resulting both from oxygen available forcombustion and changes in riser solids loading).The initial solution to this problem was the insertion of a pressure regulator in the airsupply line to drop the supply pressure to 275 kPag. This helped to filter out the compressorpressure fluctuations.In order to facilitate computer control, pneumatic control valves were installed parallelto the air flow rotameters. These were conventional, pneumatically operated, equalpercentage control valves responding to a 4 to 20 mA control signal.To obtain digital flow measurement, orifice meters were placed downstream of thecontrol valves. Pressure measurements were taken upstream and downstream of each orificeplate and converted through the data logger to digital pressure measurements. From thisinput, the computer performed conventional orifice calculations to determine thecorresponding air flowrates. The inclusion of digital proportional controllers in the datalogging algorithm, both employing a gain of 0.02 mA/kg•hr-1, accommodated the base1227.60 60 120 180 240 300 360 420 480 540 600 660 720 780 840Time (seconds)Figure 6.1: Effect of Compressor Fluctuations on Flue Gas Oxygen Concentrationwith Manual Setting ofAir Flowrate (Highvale coal, combustor temperature = 835°C, gas velocity = 7 m/s, P/S air ratio = 3)123feedback loop between each orifice run (flow measurement) and the corresponding controlvalves (flow controller). Continual operation of these loops (on a one second interval)enabled complete removal of flow cycling caused by the main air compressor.Individual primary and secondary air flowrate specifications could be set through thecomputer by the operator. Further program algorithmic modifications were later incorporatedwhich allowed the operator to specify the primary-to-secondary air ratio as well as the totalair supply or gas velocity.6.2.2 Solids Circulation ControlRiser solids loading is varied through adjustment of the L-valve aeration rate. Earlierexperiments simply dictated “high” or “low” solids loadings. During these experimental runs,the overall riser pressure drop was monitored by the operator using a water manometer andoccasional manual adjustments were made through the L-valve air rotameter to maintain“high” or “low” solids loadings as required.In order to automate the control, a computer actuated pneumatic valve was installedparallel to the L-valve air rotameter. A digital PD controller could then control riser solidsloading by adjusting this valve. A setpoint for the riser solids loading is input by the operatorand the controller meets this by adjusting the opening of the L-valve aeration valve.The above control loop enabled experiments to be carried out at specified riser solidsloadings. This was of particular importance in dynamic testing since it had been previouslyobserved that uncontrolled variations in loading had a direct effect on temperature and fluegas emissions. Figure 6.2 demonstrates the application of this controller.The typical operating range of riser solids loadings in the UBC pilot CFBC is from 50kg/rn3 to 200 kg/rn3. The solids loading controller, employing a gain of 0.02 mAlkg•m3,anintegral time of 20 s, and a derivative time of 0.12 s, is able to facilitate a step increase in thesetpoint as a first order response with a time constant of approximately 7 seconds. A stepdecrease in the setpoint takes the appearance of a slightly underdamped second order12416015014bO130(12 100C)7060Time (minutes)Figure 6.2: Operation of Solids Loading Controller Showing Its Success in FollowingStep Changes in Setpoint of Solids Loading in Riser (llighvale coal, combustortemperature = 855 °C, gas velocity = 7.3 mIs, P/S air ratio = 2)MeasuredSetpoint30 35 40 45 50 55 60 65 70 75 80 85 90125response. The overshoot is less than 10 kg/rn3, and the change is achieved in approximately10 seconds. Some difficulties with the solids loading control were associated with the fueland could not be completely resolved. A case in point was a problem encountered whenrunning for extended periods of time with Highvale coal. It was found that the responsegradually became sluggish and eventually cyclic. When this occurred, the controller would betaken off-line. Although it is difficult to manually maintain a set-point, the cycling in solidsloading was abated. As these experiments proceeded, there was a tendency for the loadingprofile to shift slowly such that a greater proportion of particles were at the bottom of theriser. In a few instances, the extent of this shift was such that L-valve aeration could be shutoff with no solids at the riser exit, although a loading greater than 100 kg/m3 could still bemaintained. This phenomenon is directly related to the nature of the particular fuel (Highvalecoal), which is noted for a high shale content. The shale gives rise to inert “stones” ofapproximately 5 mm in diameter which build up in the bed. These stones tend to accummulatein the riser and do not become part of the circulating inventory. Although part of the bed,they are independent of the circulating solids and contribute uncontrollably to riser solidsloading. Over time, these solids predominate the riser pressure drop, making control of riserloading increasingly difficult.This pilot plant problem is not a significant issue for industrial scale CFB units wherethere are bed drains. Bed draining and replenishment were found to alleviate the problem onthe pilot unit. For example, draining 20 to 30 % of the inventory and replacing it with freshsand returned controllablity for a few hours. However, this is not an acceptable procedureduring testing as it can affect results which depend on bed material build-up, loss of carbon,limestone for SO2 removal, and a shift in the solids loading profile.The solids circulation problem had implications beyond basic controllability. Thenature of the research required long term testing for identification and adaptation. Because ofthe solids loading difficulties, a single dynamic test could rarely exceed 10 hours. Thisrestriction meant an undesireable, but unavoidable, limitation on the work. The results of the126research are definitely promising and indicate the applicability of these techiques in industry -the limitations being imposed by the particular experiment in question, not by the technologyor concepts.6.3 Temperature ControlThe temperature controller is the major focus of this work and is discussed in detail infollowing sections.Unlike solids loading and air flow, combustor temperature may be represented byvalues taken at a number of alternative locations for the purpose of control. For example, onemay consider the average system temperature, maximum system temperature (usually in theprimary cyclone), or temperature at the heat transfer surfaces (here the in-bed heat exchangerlocated in the upper portion of the riser, although industrially a large portion of the combustoris surrounded by heat transfer surfaces).The most appropriate temperature would be a system average. This would allow thecombustor temperature to be defined by a mean value while filtering out localized anomalies.Within the pilot plant, however, there is a practical difficulty in maintaining measurement of asystem average temperature. Malfunction of any of the many thermocouples may not bedetected or cannot be corrected “on the fly”. Fortunately, with the fuels used in this work,uniformity of temperature around the solids loop was observed - within ±5 °C. This allowed asingle point measurement to provide an adequate approximation of the combustortemperature for control purposes. This measurement was taken from one of the upper threethermocouples located in the primary zone of the riser (Figure 3.8).6.3.1 Single Loop Temperature ControlThis section presents work concerned only with the control of combustor temperature.The purpose of this work was to gain experience with combustion control and to explore the127effect of GPC parameters. The results provide a demonstration of GPC - both its capabilitesand its ease of application.Note that the work reported in this section does deviate from methods outlined inChapter 5. Specifically, identification was not carried out prior to these control tests.Identification is a necessary step in the implementation of any control structure and is key forthe determination of appropriate models for model based controllers. Initially, the primarygoal of this control implementation was to perform final debugging of the control andadaptive algorithms after their incorporation into the data logging program. After successfIildebugging, it was decided to continue and investigate the behaviour of GPC. Identification atthis point in time was deemed impractical as plans were underway to alter the insulation of thepilot plant in order to reduce heat losses. Identification prior to re-insulation would provideinaccurate control models as the increased insulation would increase the thermal capacity ofthe unit, thus slowing the temperature response.During the experiments described in this section, the riser solids loading and the totalair throughput were maintained constant using the controllers discussed in Section 6.2. At thetime of these tests, only approximately 10 kW of heat was being removed by the in-bed heatexchanger using air as the cooling fluid. Heat removal control was not considered feasibleunder these conditions. Hence, the riser solids loading was set by the operator and notconsidered part of the temperature control structure.In addition, at the time of these experiments, the flue gas oxygen measurement wasconsidered very slow as well as of doubtfbl accuracy. Because flue gas oxygen wasconsidered somewhat secondary in terms of heat generation, it was not controlled. Instead,the total air throughput was determined by the operator and changed at his/her discretion,independant of the control structure under investigation.Throughout this work experiments are referred to by run numbers and test numbers. A runrefers to the total period of an experiment from combustor start-up to shut-down The runs are128sequentially numbered. There are gaps in the numbers because the reported runs were carried outbetween runs of the CFBC pilot plant for other purposes. Most of the unreported runs are notrelated to this work or, for any number ofreasons, shut-down occurred before any relevant results tothis thesis were obtained. A test designates a period of time during which one particular aspect ormore was investigated. Run #12The first implementation ofGeneralized Predictive Control (GPC) was during Run #12in May, 1992. The GPC algorithm had been incorporated into the data logging routines and itwas necessary to conduct an on-line test for final debugging. Since this was successful, it wasdecided to investigate the performance of the GPC controller, although identification is alwaysrecommended prior to implementation.This experiment was kept relatively short because the secondary return becameblocked, rendering the secondary cyclone inoperable. As a result, fines carried over from theprimary cyclone passed directly to the baghouse and were not returned to the CFB. It wasrecognized that this loss would greatly reduce the combustion efficiency as well as affect thedynamic behaviour of the system.Throughout the work described in this thesis, every effort was made to operate thepilot plant as consistently as possible from experiment to experiment. However, this wasdifficult to accomplish in practice because of a range of upsets and interfering factors - someunknown, some that could not be monitored, some unanticipated. More often than not, as inthe above case, the experiment was continued while recognizing that the desired degree ofconsistency was being sacrificed.A general rule of thumb for the selection of the sample/control interval is to choose itsuch that is 1/1 5th to 1/4th of the settling time of the plant. Best estimates of the temperaturein response to a step change in fI.iel feedrate indicated rise times of 20 to 30 minutes. Basedon this rule of thumb, this places the sample/control interval from 1 to 6 minutes. A shorter129interval is used in this section as discussed below while the 2 minute interval used in Section6.4 is within the estimated limits.Implementation of the controller at a 5 and then a 2 minute sample/control intervalrevealed that it must “warm-up” to current operating conditions before it can perform aproper controlling function. This is because the data logging and control routines werewritten as two completely independent programs (due to executable code size limitation).The controller only has access to information passed to it from the data logging program atthe time it is called. At the time of this test, the control program was not accessed until thecontroller was turned on.The warmup period is that time necessary for the controller to collect sufficientprocess information to enable it to perform its function. The consequences of allowing nowarm-up can be illustrated by considering the controlled variable, Yt’ (in this casetemperature). On the first call to the control routine, the current value of Yt is supplied. Butthe control algorithm requires knowledge of Yt.i, Yt.2’ etc. as well. Any control actionperformed without the knowledge of these previous values cannot be correct in thatcalculations are performed based on inaccurate information (0, as initialized by default). Thesame is true for the controlled variable (fuel feedrate). The sample/control intervals of 5 and 2minutes means that the length of time before the controller has sufficient prior data to behavecorrectly is such that the unit is usually too far out of operable conditions for control to beregained. An example would be the controller shutting off the fuel feed resulting in too greata temperature loss before feeding resumes. This occurs because the controller has a value of,say, 850 °C for y and 0 for Yt.i’ Yt2’ etc. Consequently, it “sees” the temperature shootingupwards from 0 to 850 °C in one sample period and shuts off the fuel to stop the “apparent’temperature rise. This problem can be eliminated by allowing calls to the control program,providing current measurements and manipulated variable settings, at the appropriate sampleinterval without performing control calculations.130Successful implementation was achieved in this same run using a sample/controlinterval of 15 seconds. In this case, the warm-up was short enough that the combustionconditions did not change significantly before the controller was fully operational.For this test some simplifying assumptions were made. It was assumed that no noisewas present and that the A(q’) polynomial acting in the backwards shift was constant and ofthe form:A(q’) = 1— 0. 9q1 (6.1)During initialization, the transfer function was assumed to be:y(q’)— 1q’u(q_1) 1—0.9qWhen the adaptive portion of the controller was turned on, it was designed to fit a 3”order numerator:y(q_1) (b0+b1q’+b2q+b3q)q’u(q’) (1—o.9q’)The controlled temperature during this test is shown in Figure 6.3. At time 33minutes, the controller was turned on using Equation (6.2) to bring the temperature to theinitial setpoint of 835 °C. At time 45 minutes, the adaptive portion of the controller wasturned on and allowed to update the model, Equation (6.3), at each sample/control interval.The adapter was left on for the the remainder of this test.131870_____865I:8508450U)z830825820Time (Minutes)Figure 6.3: Temperature Response - Run #12 (Highvale coal, GPC temperaturecontroller test, gas velocity = 7.5 mIs, P/s 2, average solids loading = 120 kg/rn3)SetpointMeasuredNTJ =2NTJ = 130 40 50 60 70 80 90 100 110 120 130132It is apparent in Figure 6.3 that each change in the setpoint was accompanied by anovershoot of approximately 50%. This was due to a combination of three important factors.Firstly, the denominator of the transfer function was fixed. This particular controller wasintended as a multivariable controller for which on-line adaptation of the A(q-1) polynomial isdifficult. Identification of this polynomial was planned at a later date. In the meantime, byfixing this polynomial, the true dynamics of the temperature were not known by the controller.Secondly, the sample/control interval was much shorter than needed for thisapplication. One of the advantages of model-based predictive control is the ability to uselonger sampling intervals, leading to fewer and lower amplitude control moves. Shortercontrol intervals result in stronger control actions. This leads to the third factor.Constraints must be placed on the controlled variable (rotary valve signal). Suchconstraints do not allow the controller to demand either unreasonable or unrealizable controlsettings. The rotary valve motor controller reacts to a 4 to 20 mA input signal. Likewise thedata logging module is a 4 to 20 mA output block. A request from the program (be itcalculated by the controller or input by an operator) for a current greater than 20 mA or lessthan 4 mA results in a hardware error and subsequent shut-down of the system. To ensureappropriate operator inputs, one simply incorporates a check loop into the input routine. Ifthe input is outside an acceptable range, the routine requests the operator to enter a newvalue. Similarly, if the controller demands an unacceptable setting, a maximum or minimumvalue is automatically employed. For example, if the controller determines that a 2 mA signalis required, a 4 mA signal is generated. Throughout the course of this research, a workingrange of 4 to 16 mA was employed, 4 mA being the minimum output possible and 16 mAconsidered a safe maximum.A more theoretical approach to employing constraints is to include them in the costfunction of the controller (Dion et al., 1988). This allows the controller to optimize thesetting with foreknowledge of the upper and lowers limits of the manipulated variable. Sincethis was an initial test implementing the basic GPC algorithm, this theory was not applied here.133In any event, the 4 to 16 mA allowable range of control action far exceeds any reasonablerange of feedrate settings so that any adequately designed controller would stay well withinthis operating range.The consequence of these three contributions to overshoot can be seen more clearly inFigure 6.4, which presents the fuel feedrate (as a mA signal to the rotary valve) during thistest. Comparing this figure with the temperature response (Figure 6.3), it is obvious that eachchange in setpoint leads to substantial control action.After each change, the feedrate increases or decreases for some period of time (usuallyuntil overshoot occurs) and then undergoes a large correction in the opposite direction tocounterbalance the over- or under-feeding that has taken place. The plateaus indicate thatpolynomial A(q1) in the model equation is incorrect. The controller makes the initialadjustment upon a setpoint change to approximately where it should be, based on the model.By staying near that point, it appears that, based on the fixed model, the unit is reacting moreslowly than predicted. The excessive control action is then maintained by the controller in anattempt to force the faster, expected, response. It is not until overshoot occurs that thecontroller “realizes” that a counter correction is required to bring the temperature back.The size of control actions in Figure 6.4 are considered excessive as swings in therange of 6 to 8 mA occur, while even a 3 mA change is considered substantial. Under manualcontrol, changes greater than 1 mA have rarely been employed over the 8 year life of thisplant. As stated earlier, a longer control interval would significantly reduce the size of controlactions.Also of note in Figure 6.4 is the differing behaviour of the fuel feed under increasesand decreases in the temperature setpoint. Increases occur at 46, 55, 97, and 111 minutes.The mA signal undergoes a three stage adjustment - a sharp increase followed by a largedecrease and a return to appropriate settings in fuel feedrate. In contrast, the step decreasesin setpoint at 68 and 120 minutes lead to only a two-stage adjustment - a large initial decreasefollowed by a return to acceptable levels. Although results are insufficient from this test to13416141121o0030 40 50 60 70 80 90 100 110 120 130Time (Minutes)Figure 6.4: Rotary Valve Speed - Run #12 (Highvale coal, GPC temperaturecontroller test, gas velocity = 7.5 mIs, P/S 2, average solids loading = 120 kg/rn3)135state unequivically that the system is non-linear, it is obvious that two different responses areencountered depending on whether one is increasing or decreasing the fuel feedrate.Figure 6.5 presents the CO measurements for the flue gas in this experiment. Thespikes correspond to the increases in temperature setpoint and are significant in that theyindicate that the unit is being taken into poor operating regions by the controller. Thesespikes occur during periods where overfeeding has occurred. When there is too much fueland not enough oxygen, incomplete combustion results, leading to the sharp increases in COleaving the system.Over-action of the feeder, as shown in Figure 6.4, is the source of this problem.Likely ways of preventing the CO peaks include: (1) reducing the maximum allowable fuelfeedrate setting from 16 mA to some lower value, (2) implementing some form of controllerfor the air flow that takes action based on a feed-forward system connected to fuel feedrate orfeedback from oxygen availability, or (3) implementing a controller based on CO productionto cut the fuel feedrate when incomplete combustion is indicated. However, each of thesemeasures has its own particular limitation or drawback.Changing the operable range of the fuel feedrate is not truly an acceptable solution.This range is only in place for hardware limits and safety. As previously stated, these limitsshould never be reached by a properly designed controller, and therefore should not beexpected to be employed by the controller.Feed-forward control of oxygen is often used in industry. Any increase or decrease infuel feedrate is accompanied by an appropriately proportional change in the air flows,augmented by a feedback controller to correct for any errors in oxygen concentration.Unfortunately, physical aspects of the UBC pilot plant made implementation of this type ofcontrol impossible. No method of measuring the fuel feedrate on the time scale required wasavailable. Steady-state rates are determined by averaging the change in weight of the feedhopper over a period of time - at least thirty minutes for an accuracy of ±10%. Instantaneousmeasurements of feedrate for control purposes could not be obtained. This is why the fuel136180016001400S 120001 1000o 400200030 40 50 60 70 80 90 100 110 120 130Time (Minutes)Figure 6.5: CO Response during Run #12 (flighvale coal, GPC temperaturecontroller test, gas velocity 7.5 m/s, P/S =2, average solids loading = 120 kg/rn3)L137controller was designed around the mA control signal to the rotary valve feeder. This signalwould not work in conjunction with a feed forward controller as a constant mA signal doesnot ensure a constant feedrate, which can be influenced by such factors as particle size, massof solids in feed hopper, and both hopper pressure and system back-pressure. This, added tothe fact that one of the aims was to maintain control during changes in fuel type, made anyfonn of feedforward control between fuel and air impractical.At the time of these tests, it was not feasible to base an air controller on oxygenconcentration. The oxygen measurement was extremely slow (requiring approximately 5minutes) and somewhat unreliable due to difficulties in maintaining constant flue gas sampleflows. The third solution, reducing fuel flow upon the occurrence of CO spikes, appeared tobe the simplest solution and is discussed below with reference to the results for Run #13.The adaptor during this test appeared to work acceptably well. The results of theadaptation of the B coefficients is shown in Figure 6.6. For the first 25 minutes or so afterinitialization at t = 43 mm, there was considerable fluctuation in these values. This isattributable to a lack of prior data at the time of implementation. The adaptor is “searching”for appropriate values.As can be seen from the latter part of this test, variable adaptation appears to proceedin steps which correspond to the large changes demanded by the controller. Since the natureof the adaptor is to be more sensitive when more information is available (large changes in fuelfeed setting), these large changes take place when swings in the rotary valve mA settingoccur. Although the adaptor behaved as designed, the fuel action took the unit to undesirableoperating conditions (over/under-feeding), and adaptation at these times (spikes in values) isundesirable.For the most part, the variables appear to be trending in a predictable manner. As oneproceeds to the end of the test, the change in the coefficients becomes less pronounced. Thismay be an indication that the coefficients are close to the correct “tuned” values, although thesmaller changes may simply result from the adapter having less sensitivity over time.1381.50z0C)00L)bObib2b310.5____0-0.5—130 40 50 60 70 80 90 100 110 120 130Time (Minutes)Figure 6.6: Adaptation of B Polynomial - Run #12 (Highvale coal, GPC temperaturecontroller test, gas velocity = 7.5 m/s, P/S =2, average solids loading = 120 kg/rn3)— -— I I I I I139The controller behaved exceedingly well, given its ad hoc implementation. Theadaptor was shown to provide reasonable values for the coefficients and did not indicate any“blow-up” or unacceptable loss of alertness during this test. The ability of the controller tomaintain control with a poor initial guess of transfer function and a fixed A polynomialdemonstrates one of the greatest advantages of GPC - its robustness to modeling errors andunder/overestimated model orders.A final point of interest in this test is the effect of heat removal. At 77 miii, thecalorimetric cooling was increased by approximately 1 to 2 kW and at 88 mm all cooling wasshut off, leading to a reduction in heat removal of approximately 10 to 12 kW. The effects ofthese changes in heat removal are very difficult to see in the temperature response (Figure6.3). There was no change in temperature due to the increase in cooling while there was avery slight increase in temperature when all cooling was removed. 10 kW is only about 7% ofthe total heat input to the system so it is not surprising that significant, short-term effects werenot noted.Referring to Figure 6.4, the effects of these changes become more apparent. At 77mm there was a slight increase in fuel feedrate to maintain temperature for the increased heatremoval, while at 88 mm there was a notable drop in fuel feedrate corresponding to theremoval of cooling. Perhaps most apparent is the response of the adaptor during the aboveperiods (Figure 6.6). While the observable behaviour of the CFB appears insignificant (slightadjustments of controller to maintain temperature), there are large corrections shown by theadapter at these times. This indicates that, while these changes may appear unobservable, theyare providing extensive dynamic information to the controller for adaptation. Run #13Run #13 was performed in June of 1992, during which four tests were conducted.These tests were unavoidably shorter than desirable due to a building power shutdown.140By the time of this run, it had been determined that the multivariable controlmentioned above was unrealizeable. Therefore, the model function was slightly modified fromthe previous run. Noise was again not considered, and the B polynomial was still taken as anadaptable third order expression. However, the adaptor was also allowed to operate on the Apolynomial, although of first order:A(q’) = 1 +a1q (6.4)The first test was a repeat ofRun #12 to attempt to adaptively tune the controller withthe variable A polynomial. Figure 6.7 shows the temperature during this test and indicatesthat, after the initial tuning period, temperature control appears quite good (except at the 60mm mark).Figure 6.8 presents the polynomial coefficients throughout this test. The initial valueswere taken to be those at the end ofRun #12. As can be seen, the fixed value of-O.9 used forthe coefficient, a1, in the previous run is quite different from the value (-0.45) determined bythe adapter. Also the coefficients of the B polynomial are very different from the previousrun. One reason for this is the fact that the A polynomial is now adapting and, therefore, isprobably more correctly accounting for some of the dynamics. In addition, as discussedabove, it is impossible to maintain fully consistent conditions throughout a run, let alonebetween different runs. The most obvious difference in this case is that the blockage in thesecondary return which had occurred in Run #12 was not a factor for Run #13.Most notable in this test is the dramatic demonstration of overfeeding following thestep change in the temperature setpoint from 835 to 860 °C at 50 mm. The rotary valvecontrol signal is shown in Figure 6.9. At the setpoint change, the valve opened to itsallowable maximum (16 mA) and stayed there in its attempt to raise the temperature. Thetemperature plot (Figure 6.7) shows the temperature responding to this massive overfeeding.141890_____880,_ 87008408308200 10 20 30 40 50 60 70 80 90 100Time (Minutes)Figure 6.7: Temperature Response - Run #13, Test #1 (Highvale coal, GPCtemperature controller test, gas velocity 7.5 mIs, P/s =2, average solids loading =120 kg/rn3)Controller OnA-Bed Over-FeedingMeasuredSetpointOnOnController OnOff1421.51>0.5eoa)00-0.5—10 10 20 30 40 50 60 70 80 90 100Time (Minutes)Figure 6.8: Adapted Model Coefficients - Run #13, Test #1 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mIs, P/s =2, average solids loading =120 kg/rn3)al— - bO— - bi- - - b2— — b3— ......4. — —— _•_/.----- ‘.7T ..‘ — t — — — at1431611210bfTime (Minutes)Figure 6.9: Rotary Valve Control Signal - Run #13, Test #1 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 m/s, P/S =2, average solids loading =120 kg/rn3)200 10 20 30 40 50 60 70 80 90 100144After about 5 minutes, the temperature reached a maximum of approximately 855 °C and thenbegan to drop even though the feeder was wide open. The bed had become so overfed withcarbon that a highly reducing condition had been created throughout the system withadditional fuel serving to absorb sensible heat. Insufficient heat was being generated tomaintain the temperature.At approximately 59 mm, the control was switched to manual and the fuel feedreduced to 4 mA (ie. shut-off). Almost immediately there was a sharp rise in temperature asthe carbon inventory of the bed was reduced to levels conducive to combustion. Once thetemperature had risen above the setpoint, the control was returned to automatic and thecontroller maintained a 4 mA rotary valve signal until the carbon had burned out and thetemperature had returned to the desired value of 860 °C. It is notable how well the controllerregained control over the temperature after the extreme overfeeding of the bed andsubsequent manual intervention. Again, the only physical indication of overfeeding was asharp increase in the CO concentration of the flue gas as shown in Figure 6.10.In order to avoid overfeeding the bed, Tests #2 and #3 were performed with theaddition of a “safety” switch within the algorithm which, upon detection of a CO spike, wouldreduce the rotary valve control signal to 6.5 mA (test 2) or 7.5 mA (test 3). This simplesolution resulted in a significant deterioration in control performance. In Test #1, the controlcould maintain the setpoint within ±2 °C (noise) while in Tests #2 and #3 fluctuations were ofthe order of± 5 °C. Also, these fluctuations were much more regular in nature. This periodiccycling is directly related to the fuel feedrate determined by the controller as shown in Figures6.11 and 6.12. With the “safety” switch, instead of a single peak, or plateau, occurring in theCO concentration with a step increase, there are a number of peaks associated with each stepchange, as illustrated in Figures 6.13 and 6.14.A typical increase in temperature setpoint caused the controller to open the fuel feedto some very high value (or to its maximum allowable setting of 16 mA). After a few minutesof overfeeding, the CO analyser sees the CO spike in the flue gas. The switch then closes the145200018001600140042000040 5O 80 90 100Figure 6.10: CO Response - Run #13, Test #1 (Highvale coal, GPC temperaturecontroller test, gas velocity = 7.5 mis, P/s 2, average solids loading = 120 kg/rn3)14616 T14—S112ho020 I I0 5 10 15 20 25 30 35 40 45 50Time (Minutes)Figure 6.11: Rotary Valve Speed - Run #13, Test#2 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mIs, P/S 2, average solids loading =120 kg/rn3)147160 10 20 30 40 50 60 70 80 90 100Time (Minutes)Figure 6.12: Rotary Valve Speed - Run #13, Test #3 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mIs, P/S =2, average solids loading =120 kg/rn3)148200018001600o 12001000800o 60004002000Time (Minutes)Figure 6.13: CO Response - Run #13, Test #2 (llighvale coal, GPC temperaturecontroller test, gas velocity = 7.5 mIs, P/S 2, average solids loading = 120 kg/rn3)0 5 10 15 20 25 30 35 40 45 50149200018001600S 1400• 120010008000600CL) 4002000Tune (Minutes)Figure 6.14: CO Response - Run #13, Test#3 (Highvale coal, GPC temperaturecontroller test, gas velocity = 7.5 m/s, P/S =2, average solids loading = 120 kg/rn3)0 10 20 30 40 50 60 70 80 90 100150feedrate to its minimum setting until such time as the CO concentration drops back to°normal” levels. At this point, the temperature setpoint has usually not been reached, so thecontroller again opens up and over-feeds the bed once more. Depending on the size of thissetpoint change, this sequence repeats itself as many as six times during the transition to thenew steady state. This cycling, initiated by a setpoint change, continues long after the newtemperature has been reached. The continuation demonstrates the instability caused by theCO monitoring switch. Inspection of the temperature responses in Figures 6.15 and 6.16suggests that these cycles would eventually subside over a longer period of time. Run #14Two final tests (Run #14) were performed in June of 1992 with the single variableGPC controller. The first implemented the previously used polynomials (Equation 6.3 andEquation 6.4). A series of step changes in temperature setpoint was induced, and thecontroller horizon, NU, was varied to study its effect on the control of temperature. NU waschanged from 1 to 4 during this test. The times at which these changes were made areindicated on the temperature response shown in Figure 6.17. This figure shows very littleeffect of control horizon on the temperature response, although the responses for NU = 1(first and last step increases) do appear to be somewhat more underdamped second orderresponses than the others.The rotary valve control signal for this test plotted in Figure 6.18 shows the expectedstronger control actions being taken for NU> 1. This is typical of higher control horizons.The subsequent increased control action is undesirable in this application and, as shown inFigure 6.17, has very little influence on the control performance.A final note on the test is that, as shown by the CO response in Figure 6.19, bedoverfeeding remains a problem under this control scheme.In the second test, the order of the adaptable A polynomial was increased to secondorder:151865860855850845. 840835830825Time (Minutes)Figure 6.15: Temperature Response - Run #13, Test#2 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mIs, P/S =2, average solids loading =120 kg/rn3)MeasuredSetpoint0 5 10 15 20 25 30 35 40 45 501528658605’‘— 855a)8508458408358308258200 10 20 30 40 50 60 70 80 90 100Time (Minutes)Figure 6.16: Temperature Response - Run # 13, Test #3 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 m/s, P/S 2, average solids loading =120 kg/rn3)SetpointMeasured153870865, 8601:835830825820Time (Minutes)Figure 6.17: Temperature Response - Run #14, Test #1 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mIs, P/s 2, average solids loading =120 kg/rn3)Turn OnController/AdaptorSetpointMeasured30 40 50 60 70 80 90 100 110 120 130 140 150 16015416 -14112o130 40 50 60 70 80 90 100 110 120 130 140 150 160Time (Minutes)Figure 6.18: Rotary Valve Signal - Run #14, Test #1 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mis, P/S 2, average solids loading =120 kg/rn3)1552000180016001400o 1200C.)E 1000800600400200i I30 40 50 60 70 80 90 100 110 120 130 140 150 160Time (Minutes)Figure 6.19: CO Concentration - Run #14, Test #1 (Highvale coal, GPC temperaturecontroller test, gas velocity = 7.5 mIs, P/S 2, average solids loading = 120 kg/rn3)156A(q’) = 1—a1q’ —a2q (6.5)Figure 6.20 shows the combustor temperature during the first part of this final test.The large fluctuations about the setpoint are largely attributed to the deterioration of the bedmaterial, which has been addressed in section 6.2.2.The overall riser solids loading is presented in Figure 6.21. The inert solids used inthis run consisted of old bed material from a previous experiment. The result of using thisdeteriorated material is poor control over riser solids loading. Typically, with a new bed, theloading is maintained within ± 5 kg/rn3 of the setpoint. In this test, the variation ranged from± 15 kg/rn3 to ± 30 kg/rn3. The riser solids loading has a marked effect on temperature since itis directly related to the rate of heat transfer to both the cooling surface and the surroundingrefractory. These swings in loading account for a large portion of the fluctuations intemperature, resulting in the large fuel controller action shown in Figure 6.22. The inclusionof a noise term in the controller model would have helped reduce control action, but was notimplemented at this time.At time 170 mm, the sample/control interval was changed from 15 to 30 s with noother adjustments at that time. A value for NU of 3 was in use and remained in place until210 mm at which point it was reduced to 1.The adapted variables for this portion of the test are shown in Figure 6.23. The initialvalues in this plot were those to which the adapter had converged under the 15 s interval.These values were consistent with previous results. Upon changing the interval, there was animmediate response in the model parameters. At first, the response was erratic since theadaptor was still being influenced by information obtained using the shorter interval of 15 s.After about 20 minutes, the adapter began to settle down and converge on new values.157865860G) 855S850845‘-42 840835830825Figure 6.20: Temperature Response - Run #14, Test#2 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mIs, P/S =2, average solids loading =120 kg/rn3)SetpointTemperature0 20 40 60 80 100 120 140 160 180Time (Minutes)1582502302101901701500 20 40 60 80 100 120 140 160 180Time (Minutes)Figure 6.21: Solids Loading - Run #14, Test #2 (Highvale coal, GPC temperaturecontroller test, gas velocity = 7.5 mIs, P/S =2, average solids loading = 100 kg/rn3)1591614120 20 40 60 80 100 120 140 160 180Time (Minutes)Figure 6.22: Rotary Valve Speed - Run #14, Test #2 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mIs, P/S =2, average solids loading =120 kg/rn3)1601. 0-0.2-0.4-0.6-0.8170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320Time (Minutes)Figure 6.23: Time Variation ofModel Coefficients - Run #14, Test #2 (Highvalecoal, GPC temperature controller test, gas velocity = 7.5 mIs, P/S =2, average solidsloading = 120 kg/rn3)open loop poles @ 0.8683, -0.5 183I ———— & •&SS —aSr%— —— —161Control does not appear to have improved during this initial period because of theerratic behaviour of the adapter. At 210 mm, when the control horizon, NLJ, was returned to1, a number of significant improvements began to take place. A combination of the reducedcontrol horizon and tuning of model parameters resulted in significantly reduced controlaction (Figure 6.24), and notably better control over temperature (Figure 6.25). As the modeltuned up, bed overfeeding (indicated by CO spikes in Figure 6.26) was virtually eliminated.The final CO spike, at 282 mm in Figure 6.26, resulted from returning the control horizon to3. This effect is also seen in the increased control action in Figure 6.24 where NU = 3 wasused from 275 to 285 mm at which time it was returned to 1.The final two step changes (Figure 6.25) from 850 to 825 °C and from 825 to 855 °Cgave dramatically improved control. The simple act of increasing the samplelcontrol intervalto 30 s afforded much stricter control (even in the face of the solids loading fluctuations) andvirtually removed the more serious difficulties of bed overfeeding and associated problems(poor emissions, loss of temperature, etc.).6.4 The Multi-loop Control StructureThe final overall control approach adopted in this work accepts the fact thatcombustion control is a multivariable problem, but takes advantage of (1) differing timeconstants between the controlled variables, and (2) ranking of each variable being controlled.Practical application to industrial boilers was always kept in mind.In the overall process of steam production, steam quality is of utmost importance. Thedesign of downstream equipment is based on the required steam quality (pressure andtemperature). The boiler must produce this steam at design conditions. When the CFBC unitis part of a power plant, there are continual changes in demand (from the power grid etc.) andthe boiler must meet these varying steam flow requirements for electricity production.While it was not feasible to include steam generating facilities on the UBC pilot CFBcombustion plant, an approach to the problem of steam quality was taken by analogy. The in-16216141124-0gx20Time (Minutes)Figure 6.24: Rotary Valve Signal - Run #14, Test #2 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mIs, P/S =2, average solids loading =120 kg/rn3)170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320163Setpoint870865, 86085550845I-.0835830825820170 180 190 200 210 220 230 240 250 260 300 310 320Time (Minutes)Figure 6.25: Temperature Response - Run #14, Test #2 (Highvale coal, GPCtemperature controller test, gas velocity = 7.5 mIs, P/s =2, average solids loading =120 kg/rn3)—— MeasuredNU ==1270 280 2901642000180016001400o 12001000800600400200-____________0 I I 1—170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320Time (Minutes)Figure 6.26: CO Concentration - Run #14, Test #2 (Highvale coal,GPC temperaturecontroller test, gas velocity = 7.5 mIs, P/s =2, average solids loading = 120 kg/rn3)165bed heat exchanger was considered the boiler surface and the water outlet temperature fromthis heat exchanger was chosen as the variable of control.Complete CFBC control can be reduced to a 3x3 multivariable problem. In particular,specifications for excess air (or flue gas oxygen concentration), combustor operatingtemperature, and rate of heat removal can be achieved by adjusting air flow, fuel feed, andsolids recycle rate. Temperature is important in maintaining conditions of safety and viabilityfor combustion and to meet emissions restrictions. Flue gas oxygen concentration isindicative of source air utilization and combustion conditions while also being of criticalimportance in avoiding excessive generation of pollutants. By maintaining a given oxygensetpoint, one ensures that sufficient air is being supplied for combustion, while limiting theamount of excess air being used. Beyond the scope of this work, optimization can be appliedto determine the best combinations of temperature and air flows for flue gas emissionsoptimization. In this work, however, it was desired to define specific values for these threevariables to be achieved and maintained.In order to provide control over these variables, three combustion side inputs wereidentified - riser solids loading, fuel feedrate, and total air flow. The interaction of each ofthese inputs affects, in one way or another, each of the outputs. This is illustrated in Figure6.27. The riser solids loading directly influences the rate of heat transfer to the heatexchanger (Equation 4.26). Jt also determines how much of the bed carbon inventory is in thecombustion zone at any given time, thereby affecting both temperature and oxygen utilization.The fuel feedrate is required to maintain a certain inventory of carbon in the bed. This carbonis one factor influencing the rate of combustion, which also affects hot water temperaturethrough radiation (Equation 4.26), combustor temperature (via the amount of heat generated),and oxygen concentration (because of reaction). The air flow determines the excess oxygen inthe system and hence the flue gas oxygen concentration. Oxygen availability impacts on thecombustor temperature through the rate of combustion (Equation 4.15). As well, the total airflow (as well as the primary-to-secondary air ratio) determines the gas velocity within the riser166PID Controller SettingsGnIntegral TimeDerivative TimeOxygen8’/%02150 s0.25 sWater Temperature0.26 mAf°C30 s0.06 sFigure 6.27: Investigated Control Structure167for a given temperature, which has a direct effect on the axial solids distribution within theriser. The interaction of these inputs is significant. The approach taken here, based onexperience, is to minimize the effect of these interactions by choosing appropriate individualloops.Based on the steam production analogy, the primary goal is to maintain a desired heatexchanger water outlet temperature. This control ioop is shown in Figure 6.28. It is not onlyimportant that this controller be able to meet a setpoint requirement, but it must also respondquickly to demand changes (i.e. changes in water throughput). Riser solids loading (Figure6.2) is the input which most quickly and most significantly affects this variable. The solidsloading controller is very fast in meeting setpoint demands (response times of 10 to 15 s) andits extension to water temperature control is logical.The philosopy here is that, with a controlled solids recycle device, one can control thesolids loading in the riser and thereby directly change the rate of heat transfer to the boilersurface pennitting fast, short term, control of steam production. In a conventional boiler, anychange in steam demand is satisfied by a change in the amount of fuel and air fed to thesystem. It may take a relatively long period of time to respond to these demands due to fuelbuildup and to heat sinks within the process. Having the ability to control the solids recyclerate allows for quick adjustments to new heat demands. The solids loading at the heatexchange surface accounts for typically 30 to 50% of the heat transfer coefficient to thatsurface. The loading can be rapidly adjusted to meet and maintain most changes in steamdemand, while longer term transients in response to fuel feed changes can be used for longterm stabilization of the plant. Superimposed on this controller is a limit checker whichensures that the riser solids loading remains between 50 and 180 kg/rn3 to maintain thecombustor in operable regions.Total air flow is the most obvious choice to maintain the flue gas oxygenconcentration at its desired level. This ioop is shown in Figure 6.29. As optimization is notan objective, a detuned PD controller works acceptably well. While concentration deviations168TowFigure 6.28: Schematic of Heat Exchanger Outlet Water Temperature ControllerAir169170Figure 6.29: Schematic of Flue Gas Oxygen Concentration Controllergreater that 1% may occur at times, this controller ensures that there is a sufficient supply ofoxygen available while limiting addition of excess air. By detuning this controller, largecorrections in air flow are avoided, thereby serving to limit over/under-supply and eliminatingany noticeable effects that faster changes would have on the heat exchanger outlet watertemperature due to changes in the solids loading profile. This loop shows response times of 2to 3 mm.The combustor temperature is controlled by a GPC controller with fUel-feedrate asshown in Figure 6.30. The use of the GPC controller allows the system to be sampled atsignificantly longer time periods (2 minutes) allowing the controller to ignore higher frequencynoise. This controller reacts to long term effects of fUel feedrate on temperature and, having aresponse time of 15 mm, is somewhat removed from the shorter term actions of the other twocontrollers.6.4.1 Tuning them LoopsThe two PD controllers were tuned on-line by trial and error. Noise and timerestrictions made conventional tuning impossible. Although probably not optimal, the tunedparameters provided more than satisfactory control as illustrated below. The oxygencontroller employed a gain of 8’/%02,an integral time of 150 s, and a derivative time of0.25 s, and the water temperature controller had a gain of 0.26 niAI°C, an integral time of 30s, and a derivative time of 0.06 s.6.4.2 Model Identification for GPC ControlPrior to the implementation of a model based controller, proper identification of theprocess order and dead-time and approximate values for the model coefficients are essential.As demonstrated in the initial work with GPC in this research, this may not be such a criticalstep in the overall design scheme.171172Figure 6.30: Schematic of Combustor Temperature Control LoopOne of the significant advantages of GPC, as discussed in detail in Chapter 5, is itsability to maintain robustness in the presence of plant/model mismatch (error), variable orfractional dead-time, and plant order over/under-estimation. The robustness of the controllerused in the present work in the face of poor identification suggests that the identification stepmay not be as important as in earlier cases. Optimality is not attainable without properidentification, but, when faced with a process that does not readily give up its dynamicproperties, it is encouraging that the GPC algorithm attained some level of control.This section presents the work involved in identification. The approach used here wasopen loop PRBS testing. These results are then compared to the on-line adaptationperformed by the adaptor within the GPC controller.Although properly designed PRBS testing should provide a plenitude of dynamicinformation for the identification of a plant model, reliance was placed upon on-line adaptationto dc-emphasize the identification stage. This was because of difficulties in obtainingacceptable dynamic information from the PRES tests. This problem is not associated with thetheory of identification, employing a PRBS signal, or time series analysis of the results, butrather is due to a combination ofgas/solid combustion and pilot plant limitations.CFB combustion is a somewhat non-linear process. Conventional model-basedcontrol (GPC included) uses a linear model of the plant. One advantage of employing a PRBSsignal at the identification stage is that identification may be performed about a fixed operatingpoint. This allows a linear model to be fitted at this point. Unfortunately, this application isboth transient and time-variant in nature. One is concerned with moving the process from thisoperating point in response to changing demand. In the present work, the GPC controller wasassigned to maintain combustion temperature by means of fuel feed. As already noted, thissingle variable coupling is a simplification of the solution since temperature is a function of airfiowrate and riser solids loading as well as fuel feedrate. Although, conceptually, it should bepossible to perform a PRBS test about a tight operating point, the linear model obtainedwould be too specific for these particular conditions to be generally applicable for the process.173Alternatively, a more dynamic PP.BS test, which moves the process throughout its operablerange limits, could be performed. Such a test would provide a linear model which is anaverage of the expected dynamics of the process. The advantage of the open ioop PRBS isthat it provides this average fit, as opposed to the adaptive algorithm which, given itsrecursive nature, more heavily weighs newer data. An important distinction betweenparameter fitting through time series analysis of a PRBS test and through adaptation is thattime series analysis fits all available data to a given model, while the true purpose ofadaptation is to change the model parameters subject to time variants in the process dynamics.Conceptually, a long term PRBS could traverse the entire operating range of the system in amanner not only to provide dynamic information from all operating points, but also to provideweighting of these points. A PRBS test, as outlined above, must move the processextensively thoughout the operating region in order to provide enough dynamic information todetermine a “mean° linear model.As discussed above, it proved to be difficult to ensure continuous, trouble-freeoperation of the pilot CFBC unit for more than 10 hours. Unfortunately, this time period isinsufficient to permit the collection of completely adequate information for identification. It isestimated that 40 to 50 hours of continuous testing would be required to properly identify thisprocess. Because of the limited information available, these tests tend to indicate relativelyhigh order models. This, in itself, is not a serious a drawback as this controller was intendedto perform during switches in fuel type and, as such, higher order models may be needed toaccount for dead-time changes.The identification methods employed are outlined in Chapter 5. These consist ofPRB S stimulation of the fuel feed rotary valve speed and measurement of the correspondingresponse of the combustor temperature. As discussed earlier, this is a multivariable problemin which each of the controlled inputs - fuel feedrate, air flow rate, and riser solids loading -affects each of the outputs - combustor temperature, water outlet temperature, and flue gasoxygen concentration. Since changes in fuel feedrate affect all of the output variables and, in174turn, the other controllers indirectly cause changes in temperature, during these identificationtests the water temperature and oxygen controllers were employed in order to include theireffect on temperature in response to changes in the fuel feedrate. Although, intuitively, thisshould result in a noisier and less distinct process model involving the effect of the! feedrateon combustor temperature, it does result in a closer approximation of the true process duringcontrol.Run #48 illustrates results obtained from PRBS tests performed on the UBC pilotCFBC. The fuel used during this run was Syncrude Coke. The PRBS stimulation of therotary valve speed is shown in Figure 6.31. The system was sampled every 2 minutes, whileevery 16 minutes the random choice to switch the rotary valve setting between 5.45 mA or5.25 mA was made.The measured combustor temperature during this test is shown in Figure 6.32. Thetemperature ranged from a minimum of 800 °C to a maximum of 950 °C. While this rangewas greater than desirable, and far larger than conventional operating limits, it did remainbounded throughout the test. The wide temperature range was caused by feed flowinconsistancies, not over-stimulation of the system by too great an amplitude of the PRBS.As can be seen in Figure 6.31, the rotary valve speed is very low. At these levels, motion ofthe valve was almost imperceptable. Syncrude Coke is a very fine fuel whose packingcharacteristics can vary greatly over time leading to extensive variations of fuel feed. As well,the rotary valve does not provide a perfect seal between the fuel hopper and the combustor.For a fuel such as Syncrude Coke, there is always leakage around the rotary valve to someextent. The combination of these two effects can create significant fluctuations in the fuelfeedrate.Figure 6.33 presents the fuel feedrate during this test computed by taking the loss-inweight from the fuel feed hopper over the same 16 minute intervals as the switch intervals forthe PRBS test. There is clearly a trend toward higher feedrates at the end of the test. Thistrend corresponds to that seen in Figure 6.32 where there are higher temperatures at the end1755.455.350C-)e•) 5.3ci15:5400 500 600 700 800 900 1000 1100 1200Time (Minutes)Figure 6.31: Rotary Valve Signal during PRBS Test Run #48 (Syncrude coke)176960940920900880860840820800780400 500 600 700 800 900 1000 1100 1200Time (Minutes)Figure 6.32: Temperature during PRBS Test Run #48 (Syncrude coke)1772520-4o15c ‘—‘-ea)a)a)0. I400 500 600 700 800 900 1000 1100 1200Time (Minutes)Figure 6.33: Fuel Feedrate during PRBS Test of Run #48 - Averaged over 16 MinuteIntervals (Syncrude coke)178of this test. These fuel feed flow inconsistencies are an uncontrollable disturbance within theprocess and, in a sufficiently long test, would contribute to the noise term of a properlyidentified noise model.Time series analysis was applied to the rotary valve control signal and to thetemperature response to identij a transfer function model for the process. Because thesetests are shorter than ideal, statistical significance suffers. Consequently, there is a tendencyfor identified models to be of relatively higher order than would be expected from tests oflonger duration.It is probably more important to view the results of these tests in terms of thebehaviour of the adaptor in the GPC controller. The PRBS identification program is designedto generate dynamically informative data and the most efficient analysis of this information. Ifthe design is correct, then the results of the PRBS testing can be used to judge theperformance of the adaptor used in the controller.During the forcing of the CFBC process with the PRBS sequence in Run #48, theadaptive portion of the controller was implemented so that the adaptor could also fit a modelto the process. Figure 6.34 compares the step response of the adapted CARTIVIA model to thetransfer function model from the time series analysis. The predicted gains of the two modelsare within 2 °C of each other, while the CAR]MA model predicts a slightly faster response.Possible explanations for the differences have been addressed above. In brief, the differencesare related to the fact that the time-series analysis provides equal weighting of informationover the test period, while the adaptor more heavily weighs data from the later portion of thetest. Conceptually, the step response of the PRBS is representative of an average model forthe period while the CARJMA model concentrates on the behaviour of the process at the endof the test.Perhaps more important is a comparison of the adaptor under normal situations withthe PRBS test and analysis (ie. a comparison of the adapted model for a less dynamicallystimulated controls test with that obtained through time series analysis). Figure 6.35 provides179900890880870_____a)I—.04-.o 840830600Time (Minutes)Figure 6.34: Comparison of Step Response of Models Obtained from Time Series Analysisand the GPC Adaptor - Run #48 (Syncrude coke)PRBS Test—— GPC Adaptor0 100 200 300 400 500180880875865I860855— GPC Adaptor850 - PRBS Test845840835830 I I I I I : I0 20 40 60 80 100 120 140 160 180 200Time (Minutes)Figure 6.35: Comparison of Transfer Function Step Responses from PRBSTest (Run #22)and Adapted Variables (Run #40)181such a comparison. These tests employed Highvale coal as fuel. Run #22 was a PRBSidentification test, while Run #40 was designed to test the GPC controller. The two modelsdiffer primarily in their predictions of the gain. Otherwise, the responses are almost identical.The favourable agreement in response is encouraging as these models were developed fromtwo different runs in which experimental conditions differed substantially. The differences ingain could be due to run changes, data averaging by the time series analysis, or model error.Whatever the source, the difference is less than 5 °C, insignificant for the process in question.The final comparison involved Conoco coke as fuel. Figure 6.36 provides the stepresponses for the transfer function model from time series analysis of a PRBS and theCARIMA model fitted by the adaptor during a controls test. Significantly differing responsesare predicted. There is an approximately 8 °C difference in the gains, and the adapted modelexpects an inverse response from the process. Again these conditions could be associatedwith differing characteristics of different runs.Figures 6.34, 6.35, and 6.36 all demonstrate that the PRBS techniques and the GPCadaptor provide similar model responses for the process. The time series analysis provides atime-averaged model, while the adapted CARIMA model is again more indicative of current,or final, conditions. As CFBC is a time-variant process, it is perhaps more appropriate to relyon the adaptor, than on a time-averaged model, to provide up-to-date information on thecurrent behaviour of the process.The primary role of the PRBS test is the determination of model order. Itseffectiveness here is reduced by insufficient data. If longer tests had been possible, lowerorder models would have become statistically significant. Run #22 and Run #48 bothprovided third order transfer function models, while Run #44 resulted in a first order transferfunction. Inspection of the responses for these three models indicates that they are possibly allfirst order. Lack of statistical significance militated against this reduction in model order.The results of this section indicate the relative importance of both the identificationprocedure and adaptive control. Ideally, identification should provide a low order transfer182870,—. 8650860a) 855a)04-.en- 845840835250Time (Minutes)Figure 6.36: Comparison of Step Response of PRBS Test (Run #44) and Adapted Model(Run #45)PRBS TestGPC Adaptor0 50 100 150 200183function model representative of the process. This low order model would be used in theadaptor which would adjust the coefficients of the model to account for time variations of theprocess. Higher order CARJMA models were used in this work because: (1) short PRBStesting would not provide lower order models; (2) the controller is expected to functionduring fuel type changes in which the behaviour of the process is unknown; and (3) as shownby Figure 6.36, it is possible that model order may change between runs, even for the samefI.iel.6.4.3 Controller TestingRun #49, performed in March, 1994, was designed to demonstrate the controlstructure with Syncrude coke as fuel. It was to provide implementation of the GPC controllerwith step changes in combustor temperature, water outlet temperature, and flue gas oxygenconcentration.The controller testing took place until 748 minutes into the run. Except for the last150 minutes of this test, the adaptive portion of this controller was deactivated. As indicatedearlier, numerous difficulties often arise during a run related to equipment failures rather thancontroller performance. Unfortunately, if a failure occurs while the adaptor is monitoring theprocess, drastic, unreasonable changes are forced on the control model, inadvertantly cripplingthe GPC controller. Run #49 was carried out with the model identified from Run #48(described in Section 6.4.2) without adaptation. After demonstration of this controller, theadaptor was employed in the final 150 minutes to indicate the adequacy of this model for thisparticular run. The results of this adaptor test are presented below.Step change combustor temperature from 850 to 870 °C (150 to 215 mm):The first dynamic change was a step increase in temperature from 850 to 870 °C at150 mm. The temperature response shown in Figure 6.37 appears acceptable withapproximately 20 minutes required to reach the new setpoint. The Syncrude coke is a very184890 -880870860850840830820Figure 6.37: Temperature during Run #49 (Syncrude coke)I MeasuredSetpoint0 100 200 300 400 500 600 700 800Time (Minutes)185fine, high heating value fuel. As such, with the current feed system, the speed of the rotaryvalve was well below 1 RPM, with much of the fuel forced through the valve due to thepositive pressure in the fuel hopper. This probably caused an added noise component due touncontrollable fuel flow fluctuations.While the initial temperature response to the step change is acceptable, at 185 mmthere was a drop of approximately 5 °C in the combustor temperature. This sudden loss isattributed to some form of noise whose source is unknown. The controller recovered fromthis error quite acceptably.At 210 mm, there was a 15 °C loss of temperature from the setpoint caused by ablockage in the fuel feed system. Because of this temperature drop, the controller increasedthe rotary valve speed in an attempt to feed more fuel to the system. The rotary valve controlsignal is shown in Figure 6.38. Because the controller had increased the speed of the rotaryvalve, overfeeding of the system occurred as soon as the blockage was cleared. This resultedin the overshoot of temperature from which the controller was able re-establish the setpoint inabout 20 minutes.During the fuel blockage, the flue gas oxygen dramatically increased to a high valuedue to reduced combustion as shown in Figure 6.39. In response to this increase, the oxygencontroller reduced the riser gas velocity to a minimum as shown in Figure 6.40. Once theblockage was cleared, the oxygen controller quickly re-established the oxygen setpoint.The effect of the fuel blockage on the water temperature can be seen in Figure 6.41.Although a definite disturbance can be seen at the time of the blockage, the controller wasable to maintain the setpoint of water temperature within a few degrees Celsius. Figure 6.42shows the overall riser solids loading as the variable responsible for maintaining watertemperature. There was a sharp increase in the solids loading at the time of the blockage.This response was mostly due to the loss in gas velocity rather than a result of the drop incombustion temperature. As the gas velocity was reduced, there was a tendency for the solidsprofile to shift. Given the constant overall riser solids loading, as the gas velocity was1865.815.65.5054.0c-)5.350 100 200 300 400 500 600 700 800Time (Minutes)Figure 6.38: Rotary Valve Signal during Run #49 (Syncrude coke)187loT• 8 Measured7 SetpointL.) 5 r’’0 100 200 300 400 500 600 700 800Time (Minutes)Figure 6.39: Oxygen during Run #49 (Syncrude coke)188240230,. 220210200190180C1701601500 100 200 300 400 500 600 700 800Time (Minutes)Figure 6.40: Air Flow during Run #49 (Syncrude coke)1895553,_ 510C)47r5E-43C)413937350 100 200 300 400Time (Minutes)500 600 700 800Figure 6.41: Water Outlet Temperature during Run #49 (Syncrude coke)TemperatureSetpoint1901801601401201008060402000 100 200 300 400Time (Minutes)Figure 6.42: Solids Loading during Run #49 (Syncrude coke)AverageHeat ExchangerI500 600 700 800191decreased, the solids loading at the base of the riser increased while that at the top decreased.Because of the strong dependency of the suspension-to-tube heat transfer coefficient on thesolids loading around the tubes, when the gas velocity is decreased, the overall riser solidsloading must be increased to maintain a constant loading over the heat exchange surface(Figure 6.42).Step change water outlet temperature from 46 to 52 °C (308 to 353 mm):This increase in water setpoint required an increase in heat removal by the exchangerfrom 22 kW to 25.1 kW (an increase of 15%). The performance of the controller can be seenin Figure 6.41. Figure 6.42 shows the expected increase in solids loading over the heatexchanger in order to achieve this increase in heat removal.The increased solids loading was provided by increasing the solids circulation rate.This higher circulation rate resulted in carbon being returned to the riser at a greater ratewhich increased the combustor temperature (Figure 6.37) and decreased the flue gas oxygenconcentration (Figure 6.39). The oxygen controller increased the riser gas velocity andquickly reattained the oxygen setpoint. The GPC controller initially lowered the Ibel feedrate(Figure 6.38) and, as the temperature setpoint was re-established, increased the fuel feedrateto maintain the appropriate carbon bed inventory.Step decrease in water outlet temperature from 52 to 47 °C (353 to 458 mm):This decrease in heat removal provided a near mirror image of the previous stepchange. The request for a decrease in heat removal resulted in a lower solids circulation ratein order to lower the riser solids loading. This resulted in a decrease of the carbon flow rateto the bed, causing an increase in flue gas oxygen and a decrease in combustor temperature.The gas velocity dropped in order to lower oxygen, while the GPC controller caused the fuelfeed valve to open more quickly in order to supply more carbon to increase the combustiontemperature.192At approximately 400 mm, some disturbance affected the system. From theappearance of the response at this time (a loss in temperature and an increase in flue gasoxygen), it appears likely that this disturbance was another interruption in the fuel feed.Recovery of conditions consumed the remainder of this time interval.Step change combustor temperature from 870 to 850 °C (458 to 546 mm):The first 30 minutes of this step appears to have shown acceptable behaviour. Thetemperature dropped in a time interval comparable to that after the initial step increase at 150mm and approached the new setpoint in the expected manner. The gas velocity decreased asless combustion took place in order to maintain the oxygen setpoint. The overall riser solidsloading increased in order to maintain the loading in the vicinity of the heat exchanger at thelower gas velocity.At approximately 500 mm, another equipment failure occurred. As a result of thelower gas velocity the system pressure also decreased. The pressure dropped to a level wherethere was no longer adequate flow to the oxygen analyser. This resulted in air being drawninto the analyser through the sample vent. In response to the apparent increase in oxygen, theriser gas velocity was reduced resulting in the temporary loss of combustion temperature.When the sample flow was restored, the controllers recovered to the appropriate setpoints.Step change in oxygen setpoint from 4 to 3%, 3 to 4%, 4 to 3% (546 to 596 mm):These steps in oxygen setpoint had no noticeable affect on combustor temperature orwater outlet temperature. However, as shown in Figure 6.39, response times of the order of 5to 10 minutes were achieved by this controller. Figure 6.40 indicates that there was a longterm, upward drift of oxygen concentration following these step changes, but it can beestimated from this figure that changes in the air supply of about 15 kg/h were sufficient tobring about the required changes between 3 and 4% outlet oxygen concentration. Thereappeared to be no overshooting by this controller. This is a consequence of detuning and is193advantageous in this situation since it avoids the possibility of cycling throughout the systemdue to swings in the riser gas velocity. Because the control loops are treated individually, andthey are interactive, an overshoot and decay in one ioop might otherwise carry over into theothers, perpetuating the cycling and leading to instability.Adaptation (596 mm to end of test):The remainder of this test involved two step changes in temperature with the adaptiveportion of the controller on-line. The purpose was to ascertain whether or not the modeldetermined from the previous run was adequate. The adaptation of the variables is shown inFigure 6.43 and Figure 6.44. There is no significant change in the parameters from thoseemployed by the GPC controller throughout the first portion of this test. The initial spikes at596 minutes seen in the A(q-’) polynomial in Figure 6.43 result from initialization of theadaptor. After this initialization period, the coefficients were relatively unchanged. TheB(q-’) polynomial shows a very slight upward trend, indicating a slightly lower process gainthan that employed by the model.As occurred at the 500 mm mark while responding to a decrease in the temperaturesetpoint, there was again a loss in flue gas sample at 700 mm resulting in air being drawn intothe oxygen analyser. The effect of this failure on the adapter is clearly seen in Figures 6.43and 6.44. The A(q’) polynomial, which is a predictor of the inertia of the process, is moststrongly affected. Fortunately in this case, the change in the model was not so great as tocause a failure of the control system. From the trend of the coefficients to the end of the test,it appears that the model, prior to the analyser failure, would have been re-established.1941.5flO.5. 0alI I0 100 200 300 400 500 600 700 800Time (Minutes)Figure 6.43: A Polynomial Coefficients during Run #49 (Syncrude coke)open loop poles @ 1, 0.6458, 0:29421958-- bOA I0 --—--olC)b22 b3$ 0I I0 100 200 300 400 500 600 700 800Time (Minutes)Figure 6.44: B polynomial Coefficients during Run #49 (Syncrude coke)196CHAPTER 7: RESULTS AN]) DISCUSSION - SIMULATOR7.1 IntroductionThis chapter presents results obtained for the portion of this research focussing ondynamic modeling of CFB combustion. These results are in reference to the model describedin Chapter 4. The model is validated by applying PRBS identification methods to thesimulator. The resulting model transfer functions are compared to those obtainedexperimentally on the UBC pilot CFBC. The results indicate that the simulator provides anadequate representation of the dynamic properties of the pilot CFBC. Further validation isachieved by comparison with experimental data taken from the UBC pilot CFBC. These datawere obtained from dynamic stimulation by a series of step changes in the fuel feedrate tomove the combustor through its operating regime. A brief investigation of various modelparameters is presented. This focusses on the effects of char diameter, heat loss, andcombustor size. Finally, a controls test simulation is carried out using the same structureemployed on the pilot plant as in section 6.4.1977.2 Model ValidationThis section provides validation of the model described in Chapter 4. This validationis achieved by comparing transfer ftinction models obtained through simulated PRBS testingon the simulator with those obtained experimentally as described in Section 6.4.2. Furtherverification is provided by comparing measured and simulated step responses. Two fuels -Highvale coal and Conoco coke - were investigated for this comparison.7.2.1 Transfer Function ComparisonPRBS testing, similar to that performed for model identification in the experimentalportion of this research, was carried out on the simulator. The purpose was to generatediscrete time process models as a means of comparing the dynamics of the simulator to theUBC pilot CFBC.Discrete time models only provide information on the process at the instants ofsampling. However, as illustrated in Figure 7.1, they do not provide any knowledge of theprocess between samples. There are an infinite number of models that could fit the datashown in this figure. Further, from the data presented, it is impossible to detennine which ofthe possible continuous time process outputs is the true plant output. By comparing discretemodels, high frequency fluctuations are ignored and the comparison is performed on a timescale coinciding with the sample intervals.Figure 7.2 presents the PRBS input sequence to the simulator for the generation ofdata for discrete time modelling of the UBC pilot CFB combustor operating with Highvalecoal. Figure 7.3 presents the predicted temperature response during this test. Analysis wasperformed using the time series methods discussed previously. A comparison of the stepresponse from the time series model determined from the simulation with that determinedexperimentally from Run #40 is presented in Figure 7.4. Similarly, a comparison of thediscrete time models obtained from experimentation and simulation for Conoco coke ispresented in Figure 7.5.19821.81.61.4I0. 7.1: Possible Models for Process Sampled Discretely0 1 2 3 4 5Sample1992827.52726i25.52524.52423.5200 280 360 440 520Time (minutes)Figure 7.2: Fuel Feedrate for Simulated PRBS Test with Highvale Coal1LL600 680 760200850840830V 8200z 800790780200Figure 7.3: Temperature Response of PRBS Test Simulation with Highvale Coal280 360 440 520 600 680 760Time (minutes)2018758702860835830320Figure 7.4: Comparison of Step Responses of Discrete Time Models for Highvale CoalSimulationExperimental (Run#40)0 80 160 240Time (minutes)202875870865‘ 860855-• 850845840835830Time (minutes)Figure 7.5: Comparison of Step Responses of Discrete Time Models for Conoco CokeSimulationExperimental (Run#45)0 80 160 240 320203In Figures 7.4 and 7.5, the predicted process gain of the simulator response has anerror of ± 5°C. This is a result of the comparison of the transfer function models developedexperimentally to those determined for the simulator. The input for the experimental transferfbnctions is the mA signal to the rotary valve controller while that for the simulator transferfunctions is the fuel feedrate in kg/hr. In order to compare these models it is neccesary toestimate the fuel feedrate to provide an identical step input to the simulator transfer functionas that to the experimental transfer function. In these two figures, the fuel feedrate has beenadjusted to match the gains of the transfer functions. The determined fuel feedrates are wellwithin “expected” experimental error in the estimation of the true fuel feedrate based on a mAsignal to the rotary valve controller.Figures 7.4 and 7.5 both show favourable comparison of the simulator withexperimental identification. These results indicate that the simulator provides an adequaterepresentation of the dynamic properties of the pilot CFBC unit. Since these dynamics aresuitably predicted, the simulator should provide an acceptable medium for the investigation ofthe behaviour ofvarious schemes for the control of a CFBC.7.2.2 Step Testing ComparisonThe previous section provided a very simple and direct validation of the model and is,itself, adequate to conclude that the model gives reasonable predictions of the dynamics ofinterest in this work. However, in order to obtain further validation of the proposed dynamicmodel, additional experimental testing was conducted on the UBC pilot CFB combustor. Thistesting involved forcing the combustor with a number of step changes in the fuel feedrate andcomparing its response with similar forcing of the simulator.As pointed out earlier, there are a number of inconsistencies in the fuel feedrate due toleakage around the rotary valve feeder and variations in fuel packing within the feed hopper.Because of these inconsistencies, the measured responses from the pilot plant do notnecessarily indicate step responses.204The tests on the pilot plant were performed by step changing the mA signal to therotary valve. This does not always ensure an equivalent change in the the! feedrate to thecombustor. This is illustrated in Figure 7.6 in which the mA signal to the rotary valve iscompared with the fuel feedrate measured by loss-in-weight from the fuel hopper, averagedover 10 minute periods. It is evident from this figure that there are discrepancies betweenthese two measures. For example, there was a decrease in flow at 700 mm while the mAsignal was maintained constant, while there was a higher feedrate of fuel at the end of the testthan at the beginning, even though the mA settings were the same.Figure 7.7 compares the measured response of the pilot CFB combustor to that of thesimulator when subjected to the measured 1 0-minute-averaged fuel feedrate. There is verygood agreement between the measured and predicted responses for the first 550 minutes.Only a slight over-prediction is apparent in the two temperature peaks at times of 700 and 850mm. The difference between the measured and predicted temperatures at these points is lessthan 5 °C, well within acceptable limits. The divergence during the final 250 minutes of thistest could be due to several factors. Inconsistent operation of the experimental unit may leadto changes which could not be monitored. The difficulties of maintaining consistentconditions throughout an extended test period have already been discussed. The time variantcharacteristics of the combustor may lead to the discrepancies noted at the end of this run.The model itself may be another contributing factor. Since the current prediction is basedupon all previous predictions, any error within the prediction is accumulative, becoming moreapparent over time. In any event, excluding the final 300 minutes of this test, the mean andstandard deviation of the prediction error of combustor temperature is -1.4 °C and 3.1 °Crespectively, while those for the entire test period are -6.3 °C and 9.0 °C.Figure 7.8 compares measured and predicted flue gas oxygen concentrations. Themeasured value goes off scale between 720 and 870 mm when there was a blockage in the fluegas sampling line which resulted in incorrect oxygen measurements, which are thereforeignored for comparison purposes. In addition, measurements from a time of 600 mm up to20510.5fio9.5ciCD8.5580 660 740 820 900 980 1060 1140 1220 1300Time (minutes)Figure 7.6: Comparison of Rotary Valve SignaL with 10-Minute-Averaged Fuel Feedrate(Highvale coal, Run #52)t’J0206920910880I0- 850o 8408308201200 1300Time (minutes)Figure 7.7: Transient Comparison of Temperature for Highvale Coal (Run #52)MeasuredPredicted500 600 700 800 900 1000 110020760’0500 600 700 800 900 1000 1100 1200 1300Time (minutes)Figure 7.8: Transient Comparison of Flue Gas Oxygen Concentration for Highvale Coal(Run #52)MeasuredPredicted208the blockage time are highly suspicious. The wide, rapid fluctuations observed during thistime are not common and are more likely caused by development of the problems leading tothe blockage; they are, therefore, also ignored. With these exclusions, there is excellentagreement between the measured and predicted oxygen concentration with a mean predictionerror of -0.1 %02 and a standard deviation of 0.3 %02. During periods of large changes inconcentration, the predicted concentration response was somewhat slower than the measuredtransient. This results from averaging the measured fi.iel feedrate over ten minute periods.When there were large changes in the fuel feedrate (at times of forcing step functions), thechange forced on the simulator is filtered by averaging, causing the slower predicted response.Figure 7.9 compares the measured and predicted in-bed heat exchanger water outlettemperature. The first part of this test shows favourable comparison with only slight over-prediction by the model in the early portion of this test. Again, excluding the final 300minutes of this test gives rise to a mean prediction error of -0.1 °C and a standard deviation of0.6 °C. In contrast, the latter portion indicates approximately 1 °C under-prediction by themodel for an overall prediction with a mean of 0.3 °C and a standard deviation of 0.7 °C. Theerrors discussed in reference to Figure 7.7 are also valid here. The change from a condition ofslight over-prediction to 1 °C under-prediction occurred quickly and, therefore, is notindicative of an additive error elsewhere in the model (combustor temperature calculation). Itis most likely attributable to changing operating conditions during the experiment. Forexample the nature of the bed material may have changed causing the solids loading over theheat exchange surface to vary, thereby creating a discrepancy between the calculated andpredicted heat removal rates. Due to the fast response of these variables, any discrepancy isnoted almost immediately.Comparing Figure 7.7 and Figure 7.9, the divergence in temperature begins to takeplace at the same time as the large change in the error of heat removal prediction occurs. Aswell, the error in combustor temperature leads to a progressively higher predicted temperatureconsistent with the under-prediction of water temperature. The model under-predicted the2094443_____42ZG)o 40fl3938373635 -500 600 700 800 900 1000 1100 1200 1300Time (minutes)Figure 7.9: Transient Comparison of Heat Exchanger Water Outlet Temperature forHighvale Coal (Run #52)MeasuredPredicted210amount of heat being removed from the system during the final portion of the test. This heatbuilds up in the refractory and bed material (of the model) resulting in over-prediction of thecombustor temperature. This suggests that, of the two possible sources of errors discussed,the discrepancy most likely results from changing bed material characteristics during theexperimental test rather than any inherent additive error in the dynamic model.As stated in Section 6.2.2, the changing bed characteristics are a result of the fuelbeing fed to the combustor. In this instance, the fuel was Highvale Coal. For this fuel, evenafter only short periods of testing, large stones ( 5 mm in diameter compared to a sand sizeof 259 tm) accumulate in the bed. The source of these stones is shale in the fuel. After shutdown of the pilot unit, they are found mixed in with the circulating inventory as well asaccumulated upon the primary air distributor at the base of the riser.A similar comparison was made for Conoco coke, the results ofwhich are presented inFigures 7.10, 7.11, and 7.12. In this case the water temperature prediction is excellentthroughout (a mean error of 0.0 °C and a standard deviation of 0.4 °C), indicating thatchanging bed material is not a source of error for this test. The temperature response shows adivergence as the maximum is approached at 860 mm, while the predicted and measuredvalues reconverge after this point is passed (a mean error of 3.5 °C and a standard deviationof 2.5 °C). The oxygen response shows this same phenomenon (a mean error of 0.7 % 02and a standard deviation of 2.1 % 02). There are two probable sources of thisdivergence/reconvergence error. It might be due to some anomaly or disturbance during thetest, causing some unpredictable, temporary behaviour, giving rise to the initial divergence,with subsequent reconvergence. Alternatively, there may be some error in the kinetic ratecoefficients determined in Appendix A, leading to an incorrect prediction of the temperatureeffects on the rate of combustion. This would account for the reconvergence as thetemperatures which showed good comparison at the start of the test are again approachedtowards the end of the test. However, the temperature response indicates that, if this were thecase, the prediction of the rate of combustion is too low at the higher temperatures, since the211880—.. 87008600 8501-408208101000Time (minutes)Figure 7.10: Step Test Comparison of Temperature for Conoco Coke (Run #51)MeasuredPredictedI I I I II I600 650 700 750 800 850 900 950212Time (minutes)Figure 7.11: Step Test Comparison of Flue Gas Oxygen Concentration for Conoco Coke(Run #51)1098MeasuredPredicted7.00”0cciC.)0(-)I6543.-600 650 700 750 800 850 900 950 100021343424oto3938V3736600 650 700 750 800 850 900 950 1000Time (minutes)Figure 7.12: Step Test Comparison of Heat Exchanger Outlet Water Temperature forConoco Coke (Run #51)MeasuredPredicted214predicted temperature is lower than measured. Given that the predicted rate of combustion islower than the true value, one would expect that the predicted oxygen concentration would behigher than measured, since the predicted consumption is also lower. However, Figure 7.11shows that this is not the case. During this period, the predicted oxygen concentration is alsolower than measured, suggesting that an unmeasured disturbance is more likely the source oferror in this test.7.3 Model CharacterizationThis section provides a brief evaluation of the model. It considers the effects of charparticle size and heat transfer surface area, and simulates a control test as in Section 6.4. Thisis a discussion of the behaviour of the model predictions only, without direct comparison withexperimental measurement.7.3.1 Effect of Char SizeIn fitting the data in the previous section, it was found that the particle size of theburning fuel had only a limited influence on the model predictions. Although the size chosenin the simulation gave a “best fit, there is a range of diameters (600 p.m to 1 mm) over whichthe model generates acceptable predictions.There are two factors which control the transient temperature response to a change infuel feedrate. These are the thermal capacity, or inertia, of the system and the carboninventory within the bed. The thermal capacity refers to the physical unit. Heat is stored bythe materials of construction (refractory and other structural materials, included here withrefractory) and the bed solids. At steady-state, the amount of heat entering these materials isequal to that leaving. Similarly, the heat lost by the solids passing through the standpipe isequal to that gained while in the combustion zone.As an illustration, consider an attempt to raise the temperature of the combustor byincreasing the fuel feedrate. As the amount of fuel in the combustion zone is increased, there215is a corresponding rise in the amount ofheat generated due to combustion. The excess heat isabsorbed by the system until a balance in heat loss and heat absorption is re-established. Thetime required to move from one steady-state to another is that required for the excess heat tobe collected in the structure and circulating solids.The carbon inventory also influences the transient temperature. At steady-state, thereis a balance of carbon within the system, with carbon entering with the fuel feed and beingreturned via the L-valve being matched by that consumed by combustion. If there is anincrease in fuel feedrate, there will be an increase in carbon consumed in the combustion zonedue to greater carbon availability there. However, this increased rate of combustion is not asgreat as the increase in feedrate, and there is, therefore, an increase in carbon being returnedto the standpipe from the primary cyclone. Since the total inventory of solids within thesystem remains essentially unchanged, there must also be an increase in carbon inventorywithin the riser. Given that the solids circulation rate remains constant, as the carboninventory increases, the rate of carbon returned to the combustion zone from the L-valve mustalso rise. Thus, even though a step change in fuel feed results in a step change in carbonintroduced with the fuel, a transient in total carbon introduction to the combustion zone alsoresults as carbon builds up within the total inventory of solids.As already stated, the thermal capacity of the system and the rate of carbonaccumulation combine to dictate the combustor response to a change in fuel feedrate. Giventhe limited effect of particle size, a brief assessment of the effects of the above two controllingparameters was carried out.In order to evaluate carbon accumulation, extremes in burning particle size wereinvestigated. Figure 7.13 illustrates the temperature response of the model to a step change infuel feedrate for fuel particles of two widely differing sizes - 50 and 1.5 mm. As expected,the response for the smaller particle size is significantly faster than that for the larger fuelparticles. This is a direct result of surface availability. The surface-area-to-mass ratio of the50 im particle is approximately 67m2flcg, while that of the 1.5 mm particles is only 2.2m/kg.2168708658608558500845840835450 500 550 600 650 700 750 800Time (minutes)Figure 7.13: Predicted Effect of Particle Size on Temperature Response (Conococoke, solids loading = 120 kg/rn3,total air feedrate = 205 kg/h, P/S ratio = 2)aaa000II— 00— — — 1.5mm50 micron217The much greater surface available for combustion of the smaller particles is reflected in afaster rise in temperature when excess solids are introduced in response to the higher rate ofcombustion.Assuming that the 50 p.m particles are small enough to burn almost instantaneouslyupon introduction to the bed, their response (Figure 7.13) can be attributed to the thermalmass of the circulating solids and containing walls. Accepting this and simplifying theanalysis, we can attribute the difference in the two responses to the rate of solids accumulationwithin the system. There should be no accumulation of the smaller particles (given theassumption of immediate consumption) so that the amount of heat released should changeinstantaneously when the fliel feedrate is changed.This is a simplification of the situation. Figure 7.14 shows the total predicted carboninventory during these changes. This inventory is based on the fraction of carbon in the solidsbeing returned to the riser from the base of the standpipe. The assumption of instantaneouscombustion for the smaller particles is not quite accurate. The initial steady state indicates acarbon inventory of 0.032 %. This is very small relative to the inventory of 2.7 % for thelarger particles - higher by a factor of almost 100. After an increase in fbel feedrate, itrequires about 5 minutes for the smaller particles to reach a new inventory of 0.045 %. Thislag time indicates that burning is not instantaneous. Nevertheless, for the purposes ofdiscussion, it is short enough to be considered negligible on the time scale considered here.As shown in Figure 7.14, after the new inventory is achieved, there is a downward trend. Thisis due to the dependency of rate of combustion on both surface availability and temperature.The increase in heat release on moving to a new steady state fhel feed is almost instantaneousfor the small particles but, as temperature increases, there is an associated rise in the rate ofcombustion which tends to deplete the steady state bed inventory. In contrast, the 1.5 mmparticles take approximately 150 minutes to reach peak carbon inventory. Although this timelag is a combination of surface area and temperature effects, it provides a rough estimate ofthe time required to build up the carbon inventory to a comparable surface area availability.2183.1 0.0450.040.035Figure 7.14: Effect of Fuel Particle Size on Bed Carbon Inventory (Conoco coke,solids loading = 120 kg/rn3, total air feed rate = 205 kg/li, P/S ratio = 2) 2.602.5cia0.030.0250.02. 80.0150.010.005490 590 690 790 8900Time (minutes)219Again, the predicted reduction in inventory after this point results from increasing combustiondue to increasing temperature.This interpretation is further illustrated in Figure 7.15. The oxygen transients showless sensitivity to the temperature. The 50 J.Lm particles are predicted to reach a new steadystate in the 5 minute period, while the 1.5 mm particles are predicted to have a response timeof almost 200 minutes. The final difference in oxygen concentration is due to temperatureeffects. The oxygen concentration for the larger particles is drifting upwards and, givensufficient time, would eventually match that for the smaller particles.The above discussion is a simplification since both temperature and particle size affectthe rate of combustion. For any given particle size, when the fuel feedrate is increased, thereis an increase in the rate of combustion in response to an increased surface area availability.This is accompanied by an increase in heat release, part of which is adsorbed by the system.The increase in fuel feedrate leads to a buildup of carbon in the bed. Solids being returned tothe riser from the recirculation loop provide a secondary source of increased surfaceavailability, intensifjing the rate of combustion. Larger particles take longer to accumulateavailable surface area. After a period of time, a balance is re-established between the surfacearea availability and the rate of combustion (resulting in the peak in carbon inventory in Figure7.14). From this point onward, the temperature response is primarily associated withabsorption of heat by the thermal mass. As temperature continues to rise, there is a reductionin carbon inventory corresponding to an increasing rate of combustion, maintaining thebalance of surface availability to rate of combustion.7.3.2 Effect of Heat Transfer AreaThe response of the combustor employed in this work is dominated by the thermalmass of the refractory. It is of interest to consider how these responses might change in largersystems, for which a much lower percentage of heat generated is absorbed by the structure. A2205.65.40450 500 550 600 650 700 750 800Time (minutes)Figure 7.15: Effect of Particle Size on Oxygen Concentration - Conoco Coke(Conoco coke, solids loading = 120 kg/rn3, total air feedrate = 205 kg/h, P/S ratio = 2)1.5mm50 micron221larger unit was simulated here for comparison. Only a crude approximation is used since theobjective is to predict a major factor rather than to provide an accurate simulation.An idealized combustor is envisaged in which there are no equipment heat losses, i.e.there are no heat losses to any riser structural material or through the standpipe. The onlyheat loss is due to heat absorbed (or released) by solids re-introduced to the combustion zonethrough the L-valve. This combustor is assumed to be 18 m tall with a cross-sectional area of4 m, producing about 20 MW.Figure 7.16 shows the predicted temperature responses of this unit to a step change inthe fhel feedrate for two different inventories. These response times are significantly fasterthan in the UBC pilot CFB (about 4 minutes compared with 30 to 40 minutes). Since theeffects of construction materials have been eliminated, this response is strongly related to therate of carbon build-up in the bed, with only a minor contribution from heat absorbed by thecirculating solids. This confirms the controlling effect the mass of the pilot plant refractoryhas on the temperature response.The effect of the thermal mass of the circulating solids is also shown in Figure 7.16.For an average riser solids loading of 60 kg/rn3, there will be a total mass of 4800 kg of solidsin the riser at any given moment in time. Two cases are considered, one where the standpipestores 15% of the total solids inventory for a total of 5650 kg of solids and the other wherethe standpipe contains 50% of the inventory, or 9600 kg total inventory. The increasedinventory is predicted to reduce the temperature response only slightly. Although notindicative of the true response of a larger unit, these results demonstrate that heat absorptionby the containing structure plays a major role in controlling the temperature response tochanges in ii.iel feedrate.It is suspected that there is another, unmoclelled, factor which becomes controlling inlarger units. This is the steam side of the system. For large industrial units, water and steamare required to remove the heat generated by the combustor. This water and steam contribute22288015% Inventory inRiser0‘ 8708658600o 85585024Time (minutes)Figure 7.16: Effect of Bed Inventory on Temperature in Large Scale Unit (Conoco coke,solids loading = 120 kg/rn3,total air feedrate 205 kg/h, P/S ratio = 2, char diameter = 900aim)- - - 50% Inventory inRiser18 20 22 26 28223to the thermal mass of the process - the counterpart of the pilot plant refractory. The rate atwhich heat is absorbed by the circulating water/steam must affect the rate of temperature rise.7.3.3 Controls Test SimulationThis section presents the results of a control test carried out on the simulator using thesame control structure as in the experimental portion of this work. Specifically, the structureemployed in Section 6.4 was implemented in parallel to the model to provide a simulation ofthat structure in response to setpoint changes in combustor temperature, flue gas oxygenconcentration, and in-bed heat exchanger water outlet temperature.Figure 7.17 compares the combustor temperature with the setpoint for this run. GoodGPC control over temperature is indicated. The controller is acting on a 2-minute samplinginterval and, with the noise filter, achieves response times of the order of 30 minutes. Theapparent loss of control at 790 minutes is due to a disturbance created by a change in thesetpoint of the heat exchanger water outlet temperature controller as discussed below.Figure 7.18 presents the fuel feedrate settings applied by the GPC algorithm to obtaincontrol. After a somewhat erratic initial period of approximately 70 minutes, during whichmodel tuning is being performed by the adaptor, the behaviour of this controller is very good.Each setpoint change leads to an initial large change in fuel feedrate, followed by a gradualapproach to a final value. This controller behaviour is common for a first order, orunderdamped second order process for which GPC employs a control horizon, NU, of 1. Asin the experimental work for which model orders were somewhat unclear, the modelpolynomials, A(B) and B(B), were over-parameterized, both being taken as third order. Thisover-paramaterization does not appear to adversely affect the behaviour of the controller. Itdoes allow for changes in fuel type to be employed without operator intervention.The oxygen control is shown in Figure 7.19. In order to approximate the delays andthe mixing of the flue gas sampling encountered on the experimental apparatus, the flue gasoxygen prediction is passed through a first order filter before being supplied to the oxygen224880870860850HI0820810Time (minutes)Figure 7.17: Temperature during Simulated Controls Test (Conoco coke, P/S ratio =2, char diameter = 900 m)ModelSetpoint550 650 750 850 950 1050 1150225250Time (minutes)Figure 7.18: Fuel Feedrate during Simulated Control Test (Conoco coke, P/S ratio2, char diameter = 900 jim)20105550 650 750 850 950 1050 115022670’‘—‘ 6.506____Ia)C)0(_) 5(ta)IL43Time (minutes)Figure 7.19: Oxygen during Simulated Control Test (Conoco coke, P/S ratio = 2,char diameter = 900 rim)ModelSetpoint550 650 750 850 950 1050 1150227controller. This is only a crude approximation of the true process, but it adequately representsthe associated signal distortion which is to be expected in reality. A simple proportionalcontroller is employed to control the oxygen for this simulation. As before, the main purposeof this controller is to maintain the oxygen availability in the presence of the disturbancescreated by the other controllers. It can be seen from this figure, as shown in the experimentalwork, that this controller can maintain an oxygen concentration within ± 1% of the setpoint.For completeness, the total air flow to achieve this control is shown in Figure 7.20.The heat exchanger water outlet temperature is shown in Figure 7.21. In the absenceof the high frequency pressure fluctuations encountered in actuality, the controller maintainsextremely tight control over this variable.The loss in control after the setpoint change at 790 minutes is not a controller failure.Rather, it is due to a solids loading constraint which is employed to ensure that the overallriser solids loading is kept within reasonable bounds as discussed in Section 6.4.The riser solids loading is shown in Figure 7.22. At the time of this setpoint change,the loading rises to its allowable maximum of 180 kg/rn3 and remains there for approximately150 minutes. During this period, the water temperature controller is unable to achieve itssetpoint. When reasonable operation is re-established at 950 minutes, the controller quicklyregains control of the combustor temperature. The upward drift in loading from 1000 to 1100minutes reflects the controller compensating for changes in combustion temperature. Thewater outlet temperature is a function of combustor temperature (radiation) and solids loadingarticle convective heat transfer) Thus, as the combustion temperature changes, the solidsloading adjusts the particle convective heat transfer coefficient to maintain the desired watertemperature.Figure 7.23 shows the polynomial coefficients for this test. There is very little changein these coefficients after the initial tuning period (until 650 minutes). The only significantchange occurs at the 790 minute mark when there was a change in setpoint of watertemperature in response to a significant change in the riser solids loading. This indicates that228230225‘‘ 220215210205. 200• 1954-.F2 190185180 I I550 650 750 850 950 1050 1150Time (minutes)Figure 7.20: Total Air Flow during Simulated Control Test (Conoco coke, P/S ratio= 2, char diameter = 900 p.m)2294443o 424140bO39383736550Time (minutes)Figure 7.21: Water Temperature during Control Test Simulation (Conoco coke, P/Sratio = 2, char diameter = 900 jim)ModelSetpoint650 750 850 950 1050 1150230200180‘ 160to140120100060 II80550 650 750 850 950 1050 1150Time (minutes)Figure 7.22: Average Solids Loading during Simulated Controls Test (Conoco coke,P/S ratio = 2, char diameter = 900 jim)231al a2 a3 - - bO bi — b2— b31.50.510ZEEZE______-0.5a)8-i550 650 750 850 950 1050 1150Time (minutes)Figure 7.23: Coefficients during Simulated Controls Test (Conoco coke, P/S ratio =2, char diameter = 900 tim)232the change in the discrete temperature model is due to the change in loading. Note that at the950 minute mark, the adaptor was disengaged, and the model maintained constant for theremainder of the test.The temperature changes and oxygen fluctuations do not appear to affect the model,while the change in riser solids loading is significant. This suggests that, in the regionsinvestigated, the only non-linearity of the process in terms of temperature control is associatedwith the riser solids loading. Although this non-linearity exists, it likely has only a minorinfluence, since fixing the model for the last portion of the test does not noticeably affect thequality of the control achieved over combustion temperature.7.4 SummaryThis chapter has provided sufficient validation for the model described in Chapter 4 inthe application of a controls simulator. As well, a brief investigation of various parameterswas provided in addition to a demonstration of the application of the simulator in theimplementation of a controls structure.233CHAPER 8- SUMMARY AND CONCLUSIONSThere is a growing use of circulating fluidized beds as utility boilers. In thisapplication, the combustor spends most of its life under transient conditions, following thedemand of the steam-side. This, in addition to stricter emission requirements, has led to theincreasing importance of understanding the transient nature of the circulating fluidized bedcombustion (CFBC) process, specifically for control system design and development.The work here responds to this need through investigation of the dynamics of the CFBcombustion process. A dynamic model for the prediction of key variables for combustorcontrol has been developed, and advanced control methods have been demonstrated using theUBC pilot CFB combustor.8.1 SummaryA dynamic model has been developed which predicts the transient behaviour of thecombustion temperature, rate of heat removal by the in-bed heat exchanger, and the flue gasoxygen concentration for a circulating fluidized bed combustor. These three factors fullydefine the combustor at any time. This model was conceived to provide an environment in234which control systems could be investigated. It is therefore macroscopic and does notconsider microscale phenomena.The model was incorporated into a simulator to provide an environment for thereproduction of the combustion process on computer. The simulator predicts the behaviourof the combustor under either manual control, in which operator inputs are accepted from thekeyboard, or automatic control, for which any given control scheme may be executed inalgorithmic form to meet specified combustion conditions.In order to accommodate the chemical kinetic behaviour of various fuels, separatetests were carried out in a bench scale fluid bed combustor to provide order-of-magnitudeestimates of the kinetic parameters - activation energy, frequency factor, and apparent orderof reaction - to approximate the reactivity of these fuels in the combustor. The estimates arebased on an external surface area (or particle diameter), and, therefore, do not provideinformation on the true kinetic behaviour of individual particles undergoing combustion.However, they are adequate for the prediction of kinetic behaviour in the fluid bedenvironment and are assumed to apply to conditions within the riser of a circulating fluidizedbed.In order to obtain an estimate of the solids circulation rate, experiments wereperformed to measure this rate as a function of gas velocity, P/S ratio, and average riser solidsloading. These were carried out using a novel time-of-descent method referred to as “lineand-sinker” in which a cage immersed in the moving packed bed descends attached to a chainwhich passes through a sealed port to the outside of the upper region of the standpipe. Whenthe chain is released, the cage travels downward with the moving bed. The rate at which thechain is pulled through the port gives a measure of the velocity at which solids are descendingthrough the standpipe.The control model was validated under manual inspection by performing step responsetests on the UBC pilot CFB combustor and comparing the results with simulated predictions.Because constant fuel feedrates could not be ensured during experimentation, direct step235responses could not be compared. Instead, 10-minute averages of the measured fhel feedratefrom experimentation were input to the simulator, and the behaviour compared to that fromthe experiments. Very good agreement was generally obtained between experiment andsimulation. Discrepancies have been shown to arise from unmodelled disturbances (e.g.changing bed behaviour characteristics) rather than from basic model concepts.The primary factor affecting the temperature response of the combustor was found tobe the thermal capacity of the materials of construction. The rate at which the structuralmaterials gain or lose heat has a significant influence on the speed with which the combustortemperature can be changed. At the outset, it was expected that char size would be a tuningparameter. However, investigation of the effect of this parameter over a range (600 jim to 1mm) showed that it had limited effect on the transients and confirmed the importance of therefractory thermal capacity.A brief investigation of the effect of the structural thermal capacity was carried out.This involved approximation of an “idealized” 20 MW combustor in which all heat isabsorbed by the heat exchange surfaces. A 10-fold reduction in the response time oftemperature to changes in fuel feedrate was indicated. This idealization does not take intoaccount the effects of the steam side, which might be expected to become a controlling factorfor large scale units. Investigation of the effect of solids inventory in this idealized combustorshows that, although a greater inventory does slow the transient, the effect is very small (ornegligible) - doubling the total inventory of solids increases the response time by less than20%.Application of the simulator in control scheme testing was demonstrated by utilizing asimilar scheme to that employed in the pilot plant combustor. The action of the simulator wassimilar to that observed experimentally.In parallel with the modeling work, advanced control methods were applied to thepilot CFB combustor. This included process identification through open-loop PRBS testingand time series analysis, application of single loop GPC control of combustion temperature,236and multivariable control of the combustor to meet heat removal, flue gas oxygenconcentration, and combustion temperature specifications.The identification tests did not provide sufficient information for completeidentification because changing bed properties, as well as other factors, precluded operatingthe pilot plant for a sufficient length of time. This is not expected to be a problem on anindustrial scale. Due to incompleteness, time series analysis of the data tends to indicatehigher order models than would probably be necessary if complete identification werepossible. Although model order is questionable, this is not as important as it might seem.Since the controller may well operate under conditions of changing fhel type, whereknowledge of the model for the new fuel is lacking, it would be advantageous to employ anover-parameterized model in order to be able to account for changing dead-time and possibleinverse responses.Further validation of the dynamic model is provided by a comparison of discrete timemodels obtained from experimentation and simulation. These discrete time models areessential for model-based control, such as GPC, considered in this work. The results indicatethat, on the time scale considered for control, the simulation provides discrete time modelrepresentations of the process similar to those determined from dynamic experiments on thepilot plant. It is concluded that the dynamic model can be used for controller behavioursimulation. The identification tests also confirm the validity of the performance of the adaptorwithin the GPC controller. Comparison of the step responses of the discrete time modelsidentified from the PRBS testing and from the on-line adaptor show these to be essentiallyequivalent.Finally, the applicability of GPC within a CFB combustor framework is demonstrated.The complete control structure takes advantage of the differing time constants of the variousparameters within the system. The water outlet temperature control setpoint can be realizedin the order of a few seconds; flue gas oxygen (since flue gas optimization is not considered),can be maintained within ± 1% with a detuned PID controller adjusting the total air flow237based on this measurement; a GPC controller adjusts the rotary valve control signal in orderto maintain combustion temperature requirements. These three loops can be treatedseparately since (1) water temperature response to solids loading is extremely fast; (2) oxygenconcentration need only remain within acceptable limits, allowing detuning; (3) thetemperature response is strongly affected by the thermal capacity of the complete sytsem,making it slow and ideal for long range predictive control where control actions are based onpredictions of the response.8.2 ConciusionsA dynamic model has been developed for a CFB combustor to predict the responses ofcombustion temperature, flue gas oxygen concentration, and rate of heat removal to changesin fuel feedrate, air flowrates, and solids circulation rate. The validity of this model has beenverified by a comparison of predicted values with those transients measured experimentally aswell as through comparison of control models developed through simulation with thoseidentified from the UBC pilot CFBC. In simulation form, this model provides a valuable toolfor control structure design and testing. In addition, simulators are always useful as operatortrainers.For an estimation of the reactivity of the various fuels employed, a very simpleexperimental method has been described. This method uses batch combustion tests in a benchscale fluid bed reactor to provide estimates of frequency factor, activation energy, andapparent order of reaction for the particular fuel in question. These are simple, inexpensivetests which provide adequate estimates of these parameters.A novel, time-of-descent measurement for the solids circulation rate was presented.Termed11line-and-sinke?’, it is a direct measurement of the particle descent velocity in thestandpipe to determine the circulation rate of the solids. One drawback of this method is thatit is intrusive, requiring plant shutdown for installation or removal. In addition, it does notprovide continuous measurement of the solids circulation rate.238Generalized Predictive Control (GPC) has been shown to be a viable method forcombustion control. Its ease of employment and reliability have been demonstrated in thisapplication. This is due to its robustness in the presence of model errors and mismatch.Additionally, time series analysis has been presented and demonstrated as a method foridentification in process control. Although the results obtained in this work were less thanideal, they did provide appropriate estimates of the transfer functions in question.8.3 Recommendations for Further WorkThe dynamic model developed here has been shown to predict the behaviour of theUBC pilot CFB combustor. At this point, it is not applicable to units of industrial scale.Necessary assumptions and equipment-specific correlations, such as the solids loading profileand the particle convective component of the heat transfer coefficient to the heat exchangesurface and solids circulation rate, render the simulator system-specific. Without suchinfonnation, full-scale units cannot be successfully simulated. In addition, it is likely that thesteam side may play a significant role in determining the temperature transients for industrialCFB boilers. The inclusion of a model for the behaviour of the steam plant would benecessary to complete the simulator. Because of the modular nature of programs such as this,with the necessary information available, appropriate additions or modifications can easily beincorporated to provide a powerful tool for the design of these processes.The assumption of temperature uniformity makes the model somewhat fuel specific.This assumption is reasonable for most of the solid fuels investigated in the pilot plant but,incorporating a heat release model to allow for a non-uniform temperature distribution wouldextend the validity of the model, at the expense of increased computation. This additionwould also enable simulation of gaseous and liquid fuels.The particular control schemes employed in this work were presented fordemonstration purposes. Although they performed well on the pilot plant, they are as yetunproven on an industrial level. Different control schemes could be considered. For example,239depending on the various response times, a multivariable GPC controller could control steamquality, combustion temperature and oxygen concentration together. Alternatively, steamquality and combustor temperature could be controlled with a multivariable GPC controller,with oxygen controlled conventionally by a feedforward controller from fuel feedrate and afeedback controller providing trim.Process identification testing, as carried out here, can be easily performed on theindustrial scale. The methods used are non-intnisive and, when properly designed, do notadversely affect product quality. In addition, analytical methods are available which enableidentification, using dither signals, of the plant operating in closed loop.240NOMENCLATUREa - decay constant (rn-1) (equation 2.8)ab - interfacial bubble area per unit bubble volume (m213)- driving force in noise model (white noise)ab - cross-sectional inlet area of cyclone (m2)A - frequency factor ((kmollm2.s)/(kmollm3)n)A(q-’) - poiynomial acting on y in CARIIvIA model (equation 5.8)- cross-sectional area of riser (m2)- cross-sectional area of standpipe (m2)- total external heat transfer surface area (m2)b - process dead-timeB(q-’) - polynomial acting on ut in CARIMA model (equation 5.8)cb - bulk oxygen concentration (kmollm3)- surface concentration of oxygen (kmollm3)c0, c1, c2 - fitted constants in equation 4.2C(q-’) - polynomial representing noise in CARII{A model (equation 5.8)CAOUtJC - dimensionless outlet Concentration- heat capacity ofwater (J/kg.K)C(k) - crosscovariance between series w and z at lag kC(k) - autocovariance of series z at lag kdb - bubble diameter (m)d - char particle diameter (m)d - initial diameter of char particle (m)d - char particle diameter at time t (m)d - particle diameter (rn)241D - oxygen diffusivity (rn2Is)D - riser diameter (m)e - particle emissivity- emissivity of heat transfer surfacee - suspension emissivityE - entrainment flux at riser exit (kg/m2.s)Ea - activation energy (kPa.m3l rnol)E(q’) - polynomial defined by Diophantine identity (equation 5.15)E0 - entrainment flux at dense phase/dilute phase interface (kg/m2.s)- entrainment flux above TDH (kglm2.s)F(q-1) - polynomial defined by Diophantine identity (equation 5.15)- volume fraction of particle clusters in the fast-fluidized bedFr - Froude number based on superficial gas velocity (equation 4.6)Fr - Froude number based on particle terminal velocity (equation 4.7)g - acceleration of gravity, 9.81 mIsG - process transfer ftinction- step response of plant to time t +j- net solids mass flux (kg/rn2.s)- hypothetical solids mass flux at solids return level (kg/m2.s)- hypothetical solids mass flux at riser exit (kg/m2.s)Gm - internal model transfer function- polynomial defined by equation (5.20)- controller transfer fhnctionh - height above bed interface (m)h - cyclone cylinder height (rn)h - combustor inside heat transfer coefficient (W/rn2.K)h0 - combustor outside heat transfer coefficient (W/rn2.K)242- inside heat transfer coefficient to exchanger tubes (W1m2.K)- outside heat transfer coefficient to exchanger tubes (W1m2.K)hgc - gas convective component ofheat transfer (W/m2.K)- particle convective component of heat transfer (W1m2•K)h - radiative component of heat transfer (W/m2.K)H - cyclone overall height (m)j - number of samples into the future from time tk - lag from time t in correlation analysisk0 - kinetic rate constant based on external surface area ((kmollm2.s)l(kmollm3)n)kd - difihision coefficient (mis)- thermal conductivity of stainless steel (WIm.K)k - thermal conductivity ofwater (Wlm.K)kq - bubble phase to dense phase mass transfer coefficient (mis)k1’ - dimensionless kinetic rate constantK(t) - gain matrix in RLSm - exponent used in equation (4.19)m2 - molar flow ofCO2 (kmoL/s)th - mass flowrate of cooling water (kgls)th - solids mass flowrate (kgls)- mass charged to reactor (kg)- mass of char at time t (kg)M - mass of single particle charged to reactor (kg)n - apparent order of reaction also exponent used in equation (4.19)- number of char particlesna - order of polynomial A(q-’)nb - order of polynomial B(q-’)nc - order of polynomial C(q-’)243N - process noiseN - discrete time process noiseN1 - minimum horizon for predictionN2 - maximum horizon for predictionNu - Nusselt numberp - ratio of carbon monoxide to carbon dioxide formedP(t) - covariance matrix in RLSP/S - primary to secondary air ratioPr - Prandtl numberq - rate of heat transfer to heat exchanger (W)q - volumetric flowrate of solids (m3/s)q - backward shift operatorQ - flowrate of cooling water (m3Is)r - order of polynomial &y) or raduis (m)- overall rate of combustion (kmollm2•s)r1 - inside radius of combustor (m)r0 - outside radius of combustor (m)rt - inside diameter of heat transfer tubes (m)- outside diameter ofheat transfer tubes (m)r(k) - crosscorrelation function of series w and series zr(k) - autocorrelation function of series;R - gas constant (8.314 kPa•m/kmol•K)Re - Reynolds numberRe - particle Reynolds numberRe - Reynolds number ofwater in exchanger tubess - order of polynomial o(u)Sc - Schmidt number, Wp5D244Sh - Sherwood number, kddjDt - time (s)- mean gas residence time in cyclone (s)- mean solids residence time in cyclone (s)T - temperature (K)T(q-1) - fixed design polynomial replacing C(q-’) in CARIMA model (equation 5.8)Tg - gas temperature (K)T - particle temperature (K)T5 - temperature of surroundings (K)TSWItCh - switching period in PRBS test- temperature of heat transfer surface (K)- suspension temperature (K)T - heat exchanger tube wall temperature (K)- water inlet temperature to heat exchanger (K)T0-water outlet temperature from heat exchanger (K)Ug - inlet gas velocity to cyclone (mis)uA - absolute rise velocity of bubbles (mis)u - value ofprocess input or control action at time t- filtered inputU - gas velocity (mis)Ug - superficial gas velocity (mis)U - velocity at incipient rapid fluidization (mis) (Li et al., 1981))U - superficial gas velocity at minimum fluidization (m/s)U0 - overall heat transfer coefficient based on combustion side (W1m2.K)- transport velocity (mis)U - dimensionless gas velocity (Grace, 1982)vd - descent velocity ofmoving packed bed in standpipe (m/s)245v - particle terminal velocity (mis)V - cyclone volume excluding vortex finder (m3)V - particle velocity (mis)V - volume of cyclone at natural length (m3)- annular volume above exit duct to middle of entrance duct of cyclone (m3)w(t) - process setpoint at time tX - number ofmass transfer unitsX1 - solids downflow ratio (Mon et al., 1991)y - process output or controlled variabley1, - setpointYt - value of process output at time tyf- filtered output9(t + j) - prediction ofy(t+j) at time tz - vertical coordinate of riser (m)z1 - height of rapid fluidized bed (m) (Li et al., 1981)- mean of series zzo - reference height (m)4, - characteristic length, defined by equation (2.7)Greek Symbolsa. - thermal difihisivity (m2Is)- ratio ofgas flow via bubble phase to total gas flow6(y) - polynomial acting on Yt in linear difference equation of model (equation 5.4)A - differencing operator (1 - q’)- pressure drop across solids separator (kPa)1v - pressure drop around L-valve to riser base (kPa)AP - pressure drop across riser (kPa)246AP - pressure drop across standpipe moving bed (kPa)ATLMTh - overall log mean temperature difference (K)AT0 - temperature difference between gas phase and tube wall (K)Ap - effective density- Pg) (kgfm3e - voidage- voidage ofparticle clusters- fraction ofbed volume occupied by bubbles- voidage at z1- voidage at minimum fluidizationEr - voidage at solids return levelC - voidage of dilute phasecj)- mechanism factorI(q1) - polynomial defined by equation (5.20)ri - ratio ofk from equation (A. 19) to that from equation (A. 18)- slip factorç(q’) - demonimator polynomial of noise model- forgetting factor- control action weighting factor- gas viscosity (kglm•s)- viscosity ofwater (kglm.s)v(q1) - impulse response function8(q-’) - numerator polynomial of noise modelPave,hx - average suspension density around heat exchange surface (kg/rn3)p0 - apparent density of char (kg/m3)p - cyclone solids holdup (kg/rn3)Pg - gas density (kg/rn3)pf - solids loading at top of profile (kg/rn3)247- particle density (kg/rn3)- apparent density of particles (kg/rn3)- density ofwater (kg/rn3)- solids loading at height z (kg/rn3)p0 - reference solids loading at height z0 (kg/rn3)a - Stefan-Boltzmann constant, 5.67x 10-8W/m2.K4c52- variance ofwhite noise- segregation coefficient (Li and Kwauk, 1980)- polynomial acting on u in linear difference equation ofmodel (equation 5.4)- diffusive coefficient (Li and Kwauk, 1980)(t) - normally distributed white noise- filtered white noise- decay constant in equation 4.1 (rn1)248REFERENCESArena, U., A. Malandrino, and L. Massimilla, “Modelling of Circulating Fluidized BedCombustion of a Char”, CJChE, V. 69, 860-868, Aug. 1991.Aström, K.J. and T. Bohlin, “Numerical Identification of Linear Dynamic Systems fromNormal Operating Records”, in Theory of Self-Adaptive Control Systems, ed. P.H.Hammond, Plenum Press, 1966.Aström, K.J. and B. Wittenmark, “On Self-Tuning Regulators”, Automatica, V. 9, 185-199, 1973.Arthur, J.R., “Model Reactions Between Carbon and Oxygen”, Trans. Faraday Society, 47,164-178, 1951.Bader, R., J. Finlay, and T.M. Knowlton, “Gas/Solids Flow Patterns in a 30.5-cm-diameterCirculating Fluidized Bed”, in Circulating Fluidized Bed Technology II, ed. P. Basu and 3.F.Large, Pergamon Press, Oxford, Boston, 123-13 7, 1988.Basu, P, “Heat Transfer in High Temperature Fast Fluidized Beds”, Chem. Eng. Sci., V. 45,N. 10, 3123-3 136, 1990.Basu, P. and S.A. Fraser, Circulating Fluidized Bed Boilers - Design and Operations,Butterworth-Heinemann, 1991.Behie, L.A., “ENCH 623 - Chemical Reactor Design”, Course notes from University ofCalgary, 1987.Beisswenger, H., S. Darling, L. Plass, and A. Wechsler, “Burning Multiple Fuels andFollowing Load in the Lurgi/Combustion Engineering Circulating Fluid-Bed Boiler”, inProceedings of the Eighth International Conference on Fluidised Bed Combustion, V II, 619-633, 1985.Brereton, C.M.H., “Fluid Mechanics of High Velocity Fluidized Beds”, Ph.D. Thesis,University ofBritish Columbia, Canada, 1987.Box, G.E.P. and G.M. Jenkins, Time Series Analysis - Forecasting and Control, HoldenDay, San Francisco, 1970.Burkell, J.J., J.R. Grace, J. Zhao, and C.J. Lim, “Measurement of Solids Circulation Ratesin Circulating Fluidized Beds”, in Circulating Fluidized Bed Technology II, ed. P. Basu andJ.F. Large, Pergamon Press, Oxford, 50 1-509, 1988.249Chakraborty, R.K. and J.R. Howard, “Combustion of a Single Particle in Fluidized Beds ofHigh-Density Allumina”, 3. Inst. Energy, V. 54, 55-58, 1981.Clarke, D.W. and P.J. Gawthrope, “Self-Tuning Controller”, Proc. IEEE, V. 122, 924,1975, and V. 126, 633, 1979.Clarke, D.W., C. Mohtadi, and P. Tuffs, “Generalized Predictive Control: Parts I and II”,Automatica, V. 23, 137-148 and 149-160, 1987a, b.Cordero, AM. and D.Q. Mayne, “Deterministic Convergence of a Self-Tuning Regulatorwith Variable Forgetting Factor”, IRE Proc.-PtD., V. 128, 19, 1981.Davidson, J.F., and Harrison, D., Fluidized Particles, Cambridge University Press,Cambridge, 1963.Dion, J.M., L. Dugard, Nguyen Minh Tn, “MIMO Adaptive Generalized PredictiveControl with Input-Output Constraints”, Adaptive Control of Chemical Processes 1988,(ADCHEM ‘88), 2nd International IFAC Symposium, 15-20, 1988.Durbin, J., “The Fitting of Time Series Models”, Rev, Tnt. Inst. Stat., V. 28, 233, 1960.Field, M.A., D.W. Gill, B.B. Morgan, and P.G.W. Hawksley, Combustion of Pulverisedcmi, The British Coal Utiisation Research Association, Leatherhead, 1967Fisher, D.G., “Process Control: An Overview and Personal Perspective”, CJChE, V. 69, 5-26, 1991.Fortescue, T.R., L.S. Kershenbaum, and B.E. Ydstie, “Implementation of Self-TuningRegulators with Variable Forgetting Factors”, Automatica, V. 17, 831-835, 1981.Glicksman, L.R., “Circulating Fluidized Bed Heat Transfer”, in Circulating Fluidized BedTechnology II, ed. P. Basu and J.F. Large, Pergamon Press, Oxford, 13-29, 1988.Grace, J.R., “Fluidized Bed Heat Transfer”, Chapter 8.2 in Handbook of MultiphaseSystems, ed. G. Hetsroni, Hemisphere, Washington, 1982.Grace, J.R., “Heat Transfer in Circulating Fluidized Beds”, in Circulating Fluidized BedTechnology, ed. P. Basu, Pergamon Press, Toronto, 63-8 1, 1986a.Grace, J.R., “Fluidized Beds as Chemical Reators”, in Gas Fluidization Technology, ed. D.Geldart, John Wiley and Sons, 1986b.Grace, J.R., “High-Velocity Fluidized Bed Reactors”, Chem. Eng. Sci., V. 45, 1953-1966,1990.250Grace, J.R. and J. Tuot, “Cluster Formation in Vertically Conveyed Suspensions ofIntermediate Density”, Trans. Inst. Chem. Engrs., V. 57, 49-54, 1979.Raider, P.K. and P. Basu, “Mass Transfer from a Coarse Particle to a Fast Bed of FineSolids”, A.I.Ch.E. Symp. Ser., V. 84, N. 262, 58-67, 1988.Hartge, E.-U., D. Rensner, and J. Werther, “Solids Concentration and Velocity Patterns inCirculating Fluidized Beds”, in Circulating Fluidized Bed Technology H, ed. P. Basu and J.F.Large, Pergamon Press, Oxford, 165-180, 1988.Hojman, J.P., Heat Transfer, 2’ edition, McGraw, New York, 1968.Horio, M., “Hydrodynamics of Circulating Fluidization - Present Status and ResearchNeeds”, in Circulating Fluidized Bed Technology ifi, ed. P. Basu, M Horio, and M. Hasatani,Pergamon Press, Oxford, 3-14, 1991.Horio, M. and K. Morisita, Japanese 3. Multiphase Flow, V. 2, 117, 1988.Hyppanen, T., Y.Y. Lee, A. Kettunen, and J. Riiali, “Dynamic Simulation of a CFB BasedUtility Power Plant”, in Fluidized Bed Combustion, Proc. 12th Tnt. Fluidized Bed CombustionConference, ASME, 1121-1127, 1993.Kang, S.K., T.W. Kwon, and S.D. Kim, “Hydrodynamic Characteristics of CycloneReactors”, Powder Tech., V. 58, 211-221, 1989.Karri, S.B.R and T.M. Knowlton, “A Practical Definition of the Fast Fluidization Regime”,in Circulating Fluidized Bed Technology ifi, ed. P. Basu, M. Horio, and M. Hasatani,Pergamon Press, Oxford, 67-72, 1991.Kehoe, P.W.K., and Davidson, J.F., Inst. Chem. Eng. (Lond.) Symp. Ser., V. 33, 97, 1971.Knowlton, T.M., “Solids Transfer in Fluidized Systems”, in Gas Fluidization Technology, ed.D. Geldart, John Wiley and Sons Ltd., Chichester, U.K., 341-3 14, 1986.Kobro and Brereton, in Circulating Fluidized Bed Technology, ed. P. Basu, PergamonPress, Toronto, 1986.Kuliendorif, A., B. Jansson, and J. Olofsson, “Operating Experience of CirculatingFluidized Beds”, Circulating Fluidized Bed Technology, ed. P. Basu, Pergamon Press,Toronto, 83, 1986.Kunii, D. and 0. Levenspiel, “Flow Modeling of Fast Fluidized Beds”, in CirculatingFluidized Bed Technology III, ed. P. Basu, M. Horio, and M. Hasatani, Pergamon Press,Oxford, 91-98, 1991.251Lanneau, K.P., “Gas-Solids Contacting in Fluidized Beds”, Trans. Instn. Chem. Engrs., V.38, 125-143, 1960.Large, J.F., Y. Martinie, and, M.A. Bergougnou, “Interpretive Model for Entrainment in aLarge Gas Fluidized Bed”, International Powder Bulk Solids Handling and ProcessConference, May 1976.Leckner, B., “Heat Transfer in Circulating Fluidized Bed Boilers”, in Circulating FluidizedBed Technology ifi, ed. P. Basu, M. Horio, and M. Hasatani, Pergamon Press, Oxford, 27-38, 1991.Leith, D. and W. Licht, “The Collection Efficiency of Cyclone Type Particle Collectors - ANew Theoretical Approach”, AIChE Symp. Ser., V. 68, N. 126, 196-206, 1972.Li, Y., and M. Kwauk, “The Dynamics of Fast Fluidization”, in Fluidization, ed. J.R. Graceand J.M. Matsen, Plenum Press, New York, 53 7-544, 1980:Li, Y., B. Chen, F. Wang, Y. Wang, and M. Guo, “Rapid Fluidization”, mt. Chem. Eng.,V. 21, 670-678, 1981.MacGregor, J.F. and P.A. Taylor, Advanced Process Control - an Intensive Short Course,McMaster University, Canada, 1990.Mahalingam, M. and A.K. Kolar, “Experimental Investigations ofHeat Transfer at the Wallof a Circulating Fluidized Bed”, in Fluidized Bed Combustion, Proc. 12th mt. Fluidized BedCombustion Conference, ASME, 34 1-348, 1993.Martin, H., “Heat and Mass Transfer in Fluidized Beds”, Chem. Ing. Tech., V. 52, 199-209,1980.Martin, H., “Heat Transfer Between Gas Fluidized Beds of Solid Particles and the Surfacesof Immeresed Heat Exchanger Elements, Part I”, Chem. Eng. Process., V. 18, 157-169, 1984.McIntosh, A.R., S.L. Shah, and D.G. Fisher, “Analysis and Tuning of AdaptiveGeneralized Predictive Control”, CJCIIE, V. 69, N. 1, 97-110, 1991.Monceaux, L., M. Azzi, Y. Molodtsof, and J.F. Large, “Overall and Local Characterizationof Flow Regimes in a Circulating Fluidized Bed”, in Circulating Fluidized Bed Technology,ed. P. Basu, Pergamon Press, Toronto, 185-191, 1986.Mori, S., K. Narukawa, I. Yamada, T. Takebayashi, H. Tanii, Y. Tomoyasu, and T.Mi “Dynamic Model of a Circulating Fluidized Bed Coal Fired Boiler”, in Fluidized BedCombustion, Proc. 1 1th mt. Fluidized Bed Combustion Conference, ASME, 1261-1266, 1991.252Orcutt, J.C., J.F. Davidson, and RL. Pigford, “Reaction Time Distributions in FluidizedCatalytic Reactors”, Chem. Eng. Prog., Symp. Ser., V. 58, N. 38, 1-15, 1962.Patience, G.S., J. Chaouki, F. Berruti, and R Wong, “Scaling Considerations forCirculating Fluidized Bed Risers”, Powder Tech., V. 72, 31-37, 1992.Perry, Ru. and D.W. Green, Perry’s Chemical Engineer’s Handbook, 6th edition, McGraw-Hill, Inc., 1984.Reh, L., personal communication with J.R. Grace, 1985.Rhodes, M.J. and D. Geldart, “A Model for the Circulating Fluidized Bed”, Powder Tech.,V. 53, 155-162, 1987.Rhodes, M.J., P. Laussmann, F. Villain, and D. Geldart, “Measurement of Radial andAxial Solids Flux Variations in the Riser of a Circulating Fluidized Bed”, Circulating FluidizedTechnology II, ed. P. Basu and J.F. Large, Pergamon Press, Oxford, 155-164, 1988.Sahagian, J., “Circulating Combustion”, in First Annual Fluidized Bed ConferenceProceedings, Council of Industrial Boiler Owners, Fairfax Station, Virginia, 1985.Senior, R.C., “Circulating Fluidised Bed Fluid and Particle Mechanics: Modelling andExperimental Studies with Application to Combustion”, Ph.D. Thesis, University of BritishColumbia, Canada, 1992.Senior, R.C. and C. Brereton, “Modeling of Circulating Fluidized Bed Solids Flow andDistribution”, Chem. Eng. Sci., V. 47, 28 1-296, 1992.Sleicher, C.A. and M.W. Rouse, “A Convenient Correlation for Heat Transfer to Constantand Variable Property Fluids in Turbulent Pipe Flow”, Int. 3. Heat Mass Transfer, V. 18, 677,1975.Stephanopoulos, G., Chemical Process Control - An Introduction to Theory and Practice,PTR Prentice Hall, N.J., 1984Stockdale, W. and R. Stonebridge, “The Design and Commercialisation of Multi-SolidsFluidised Bed Combustors”, in Coaltech ‘85, London 5th Int. Conf and Ex. on Coal Util. andTrade, 1985.Subbarao, D. and P. Basu, “Heat Transfer in Circulating Fluidized Beds”, in CirculatingFluidized Bed Technology, ed. P. Basu, Pergamon Press, Toronto, 28 1-286, 1986.Thomas, J.F., R.W. Gregory, and M. Takayasu, “Atmospheric Fluidized Bed Boilers forIndustry”, LEA Coal Research Report # 1CTIS/TR35, lEA Coal Research, London, Nov.1986.253Weinstein, H., M. Shao, and M. Schnitzlein, “Radial Variation in Solid Density in HighVelocity Fluidization”, in Circulating Fluidized Bed Technology, ed. P. Basu, Pergamon Press,Toronto, 201-206, 1986.Weiss, V. and Fett, F.N., “Modeling the Decomposition of Sodium Bicarbonate in aCirculating Fluidized Bed Reactor”, in Circulating Fluidized Bed Technology, ed. P. Basu,Pergamon Press, Toronto, 167-172, 1986.Weiss, V., J. Schöler, and F.N. Fett, “Mathematical Modeling of Coal Combustion in aCirculating Fluidized Bed Reactor”, in Circulating Fluidized Bed Technology II, ed. P. Basuand J.F. Large, Pergamon Press, Oxford, 289-298, 1988.Wen, C.Y. and L.H. Chen, “Fluidized Bed Freeboard Phenomena: Entrainment andElutriation”, AIChE 3., V. 28, 117-128, 1982.Wu., R.L., “Heat Transfer in Circulating Fluidized Beds”, Ph.D. Thesis, University of BritishColumbia, Canada, 1989.Wu, R.L., C.J. Lim, and J.R. Grace, “The Measurement of Instantaneous Local HeatTransfer Coefficients in a Circulating Fluidized Bed”, CJChE, V. 67, 30 1-307, 1989.Yerushalmi, J., N.T. Cankurt, D. Geldart, and B. Liss, “Flow Regimes in Vertical Gas-Solid Contact Systems”, AIChE Symp. Ser., V. 74, N. 176, 1-13, 1978.Yerushalmi, J., “High Velocity Fluidized Beds”, in Gas Fluidization Technology, ed. D.Geldart, John Wiley and Sons, Chichester, U.K., 1986.Vu, L., “Experimental Study on the Hydrodynamics in Circulating Fluidized Bed with WideParticle Size Distribution”, M.Sc. Thesis, Tsinghua University, China, 1989.Zhang, L., T.D. Li, Q.Y. Zheng, and C.D. Lu, “A General Dynamic Model for CirculatingFluidized Bed Combustion Systems with Wide Particle Size Distributions”, in Fluidized BedCombustion, Proc. 1 1th mt. Fluidized Bed Combustion Conference, ASME, 1289-1294, 1991.254APPENDIX A - KINETIC RATE DETERMINATIONA.1 IntroductionThis appendix documents supplemental experimental work undertaken to providesome estimation of the “reactivity” of the various fhels used in this research, in particular forsimulation of results obtained on the UBC pilot CFBC. The method used is not consideredideal by any means. It is only intended to provide rough estimates for rates of combustion.The chemistry and physics of coal reactions are fundamental to the combustionprocess. Significant emphasis has been given to the modeling of these reactions, but the workhas not yet advanced to the point where it is widely used in process development (Smoot,1984).A coal particle, as described by its proximate analysis, is comprised of moisture,volatiles, carbon and ash. The proportion of each of these components depends on the sourceand rank of the coal.The burning process is typically considered as taking place in three interactive stages -drying (driving off moisture), devolatiization (gasification of volatiles), and char combustion(oxidation of char). The time required for char combustion is usually at least an order of255magnitude greater than for drying and devolatilization so that char combustion is consideredthe controlling factor in the burnout times of coal. In this study, experiments were carried outon char particles (dried and devolatiized coal) and on petroleum coke where it can beassumed that drying and devolatilization have been afready completed.A.2 Experimental ApparatusThis work was carried out to provide estimates of the kinetic parameters (n, A, andEa) used in the dynamic model presented in Chapter 4. The tests were performed in a benchscale fluid bed facility.Figure A. 1 gives a flow diagram of the system, while Figures A.2 and A.3 providefurther details of the unit. The reactor is a 50 mm OD quartz cylindrical tube, with an ID of46 mm and a height of 1020 mm. It is supported via ceramic sleeves by two stainless steelplates. The bed is heated by two electrical heaters surrounding the colunm. A gas preheater(usually maintained at 300 °C) is employed to heat the inlet gas.Due to heater positioning, it was found that the region close to the distributor was notadequately heated. To ensure a uniform bed temperature, ceramic fibre, supported by astainless steel rod, was placed on top of the silicon carbide distributor to raise the bedapproximately 500 mm up the column to a location where it could be adequately heated. Thisfibre became the distributor for the fluid bed.The inlet gas was a mixture of nitrogen and air, mixed prior to introduction to thereactor. Nitrogen, air, and total gas flowrates were measured with rotameters. The oxygenconcentration of the inlet mixture was determined by running a sample of the inlet streamthrough the analyser bank. The gas analysis system was the same as that used for the CFBcombustor and is fully described in Chapter 3.The reactor temperature is measured via a thermocouple immersed in the center of thefluid bed. This temperature is maintained by the setting of the external electrical heaters. Theflue gas from the reactor exits to the exterior of the building, after sampling, via a duct and a256oGas Saffipfl9 Po0Io__________li-i1LCerIc_____ ______Connector50 rn(Quartz Glass)- Quartz Glass Column1020 mm—Gas cuctRod ConnectorCaramicF 1______ ________ ____—Inlet Gasft____GasPrHeaterPerocatedSamng PoPlatePlenumchamberFigure A.1: Schematic Diagram of tue 50 mm Diameter Fluidized Bed Reactor257ReactorPreheater(b)Figure A.2: External View of the Bench Scale Fluidized Bed Reactor - (a) front view and(b) side view(a)258ThermocoupleVentMixing[erIGas CylindersFigure A.3: Details of the Bench ScaleReactor SetupDistributorMultichannelData Logger259porous stainless steel filter. A valve is located after this ifiter to allow pressurization of thesystem to maintain sufficient positive pressure (approx. 300 mm or 12” H20) to assureadequate flow through the gas sample train.For each experiment, the reactor was charged with 200 g of 500 p.m silica sand as bedmaterial, and the unit was heated to the desired operating temperature with the electricalheaters. During this process, air was passed through the reactor to ensure uniform heating ofthe bed. Once the desired temperature had been reached, the air was shut off and nitrogenwas passed through the bed to purge all oxygen from the system.When all oxygen had been removed, as indicated by the analysers, the char sample wasdropped into the bed through a port at the top of the column. The appropriate amount of airwas then mixed with the nitrogen to begin the test. Nominally, the inlet gas flowrate was 1.5kg/h using a 5% 02, N2 mixture. Rather than sample the inlet gas to determine the true inlet02 concentration, the flue gas oxygen concentration measured after burnout of the char istaken as the inlet concentration.There is a certain delay in, and filtering of, concentration measurements, related to thelength of the sample lines and analyser cell volumes and responses. The CO/CO2 analyser isthe first in the sample train. Measurements indicate a delay of 15 to 20 s followed by a 95%rise time of approximately 3 to 4 s. The time delay is accommodated by taking the time ofstart of combustion as the time when the CO/CO2 analyser first responds, as opposed to thetime of introduction of air. Burnout times are of the order of 10 mm. This duration of theburnout period is much larger than the response time of this analyser, so that the latter cansafely be ignored.On the other hand, the oxygen analyser at the end of the sample train experiences adelay of over 1 minute, with samples reaching it filtered by the preceding 4 analysers. Thehigh degree of prefiltering makes dynamic measurements, on the time scale experienced here,somewhat difficult to analyze. For this reason, as explained later, only the CO2 response isused (and needed) to analyze the results; the oxygen analysis is only used to determine a final260steady-state oxygen concentration (after the char burnout); this concentration is assumed tocorrespond to the inlet concentration.A.3 Theory and AnalysisThe dynamic model (Chapter 4) assumes that all carbon reacting with oxygen isconverted to C02, and the same assumption is applied in this work. In practice, char burnsaccording to the reaction:C + —* (2 - !CO + 1! - ico2 (A.1)(I) (I)) }Field et. al (1967), in the modelling of pulverized coal firing, define c1 as a mechanism factorwith a value of 1 for CO2 transport away from the particle, and 2 for CO transport. Themechanism factor increases with increasing temperature and decreasing char size. Field et. al(1967) express c1 as:2p+2for d<O.OO5cm (A.2)and(2p + 2)— p(d —0. 005)/0. 095for 0.0O5<d.<0.1cm (A.3)where p is the ratio of carbon monoxide to carbon dioxide formed. From Arthur (1951):p = 250Oexp5.19 i07J(A.4)261At typical CFB combustion temperatures (850 °C), cF takes on a value of 1 for 1 mmchar particles and 1.3 for 0.6 mm char particles. The data analysis usually does not includeestimated particle diameters of less that 700 pm. Hence, the assumption of completeconversion to C02, which is consistant with the assumptions applied in the model, is notexpected to create any significant error in the analysis.The reactor itself is assumed to be well mixed, with adequate exchange of gas betweenthe emulsion and bubble phase to allow for a mean gas concentration throughout the reactor.This assumption is reasonable since the size of the bed employed here is much smaller thanrequired for fully developed fluidization. It is doubtfiul that the bed is deep enough to allowfor extensive growth and coalescence of bubbles. The flow is entirely transitional over thelength of the bed. There is little advantage in employing an advanced reactor model andincorporating its inherent errors into the analysis when the intended application requires onlyorder ofmagnitude estimates.Rather than attempting to justify this assumption through characterization of themovement of gas and solids phases, a more direct approach provides partial justification - thecomparison of conversion based on a bubbling bed model, and that based on a well mixedreactor model assumed here. For this comparison, one of the models of Orcutt et al. (1962)has been selected for the bubbling bed. The key assumptions of this model are that no solidsare associated with the bubble phase, while gas is assumed to be in plug flow in the bubblephase and perfectly mixed in the dense phase.For a first order, irreversible reaction, the Orcutt model yields a dimensionless outletconcentration of:CAOUt = 1— 13e_X + f3k1e(A 5)C 1_13e_X+ki’262where: CAOdC = dimensionless outlet concentrationk1’ = dimensionless kinetic rate constant (Grace, 1 986b)X = number ofmass transfer units= ratio of gas flow via bubble phase to total gas flowThe gas flow ratio, [3, is assumed to be given by:UU1g(A.6)Ugwhere: Ug = superficial gas velocity (mis)U, = superficial gas velocity at conditions ofminimum fluidization (mis)The number ofmass transfer units, X, here is given by:k abebLfq(A.7)f3uAwhere: ab = interfacial bubble area per unit bubble volume (m2/3) 6/dbkq = bubble phase to dense phase mass transfer coefficient (ms-i)= fraction of bed volume occupied by bubbles (U—U,)/uA= absolute rise velocity ofbubbles (m/s)with kq (Davidson and Harrison, 1963) given by:0 975 °25D°kq = O.75U +d5(A.8)where : D = difflisivity (m2/s)db = bubble diameter (m)g = acceleration due to gravity = 9.81 rn/s2263Application of these equations to this equipment provides a rough estimate of 2 for Xb.The limiting case of a perfectly mixed reactor for a first-order reaction is given (Grace,1986b) by:Aout_ (A9)CAin N-k1Table A. 1 provides a comparison of the kinetic rate k1 calculated from the Orcuttmodel (equation A.5) and the well mixed reactor (equation A.9) for various conversions. The% difference in this table is determined from:%difference = 100 1— (A.10)Typical dimensionless outlet concentrations in the experiments reported here rangefrom 0.6 to 1. Table A. 1 indicates that, if the Orcutt model provides an effective descriptionof the hydrodynamics, the well-mixed reactor assumption is likely to incorporate no more than6 % difference in kinetic rates calculated from the data.The rate of char combustion is directly related to the flow rate of CO2 leaving thesystem. This reaction rate can be expressed in terms of an exposed char external surface areaby:264Table Al: Comparison of Orcutt Bubbling Bed Model with Well-Mixed AssumptionCA, kl’((k5)) kl(k9)) % differenceCAIfl0.2 6.6 4 390.4 1.76 1.5 140.6 0.71 0.67 60.8 0.26 0.25 41.0 0 0 0265r=2 (A.11)where: d = char particle diameter (m)= molar flow ofCO2 (kmolls)= number of char particles -= rate of combustion based on external surface area (kmollm2•s)The number ofparticles in the reactor, n, is estimated from the mass introduced to thereactor and the mass of a single particle:n =- (A.12)CMwhere: = mass charged to reactor (kg)M = mass of single particle charged to reactor (kg)The mass of each particle introduced (assuming it is spherical) is defined by:(A.13)where: = initial char particle diameter (m)PC = apparent char density (kg/rn3)It is assumed that the majority of combustion takes place at or near the particlesurface. Hence a shrinking particle type model is utilized. Ash is assumed to break off theparticle due to rigorous agitation within this bed, and thus no ash layer is considered.The particle diameter at any time t can then be estimated from:2661/(1,LK /3= I U1VLc (A. 14)“.ltncpc)where: d = char particle diameter at time t (m)= mass of char at time t (kg)= Mi—Jm2dtAt pseudo steady-state, the rate of diffl.zsion of oxygen to the particle surface is thesame as the kinetic rate at the surface:= kc’ kd(cb —c5) (A.15)where: Gb = bulk oxygen concentration (kmolim3)Cs = surface concentration of oxygen (kmolim3)k0= kinetic rate constant (kmoI/m2•s•(kmol/)kd = mass transfer coefficient (mis)n = apparent reaction orderThe apparent reaction order, n, takes into account and corrects for assumptionsapplied in this analysis and in the dynamic model. Specifically, it corrects for errors in theassumption of complete conversion to CO2 at the particle surface, as well as the assumption ofcombustion occurring on the external surface of the particle, neglecting any internal diffusion.The surface concentration of oxygen, c, can be determined by equating the rate fromequation (A. 11) to the expression on the right hand side of equation (A. 15).From the definition of the Sherwood number, the mass transfer coefficient, kd, is:kd=-- (A.16)d267where: D = diffusivity (m2Is)Sh = Sherwood numberFor a fluidized bed, the Sherwood number, Sh, is given by Halder and Basu (1988) by:1R 1/Sc7 (A.17)6mfwhere: Sc = Schmidt number = JIg/P5DHaving determined the oxygen surface concentration, c, from equation (A. 15), thekinetic rate constant, k, can be calculated from:k=-- (A.18)c5The temperature dependency ofk is given by the Arrhenius expression:k=Aex[_ (A.19)where: A = frequency factor (kmolIm2.s.(kmo1J3))Ea = activation energy (kJ/kmol)R gas constant = 8.314 (kPa.m/ mol K)T = particle temperature (K)268A particle heat balance is required to estimate the temperature of the burning particle,T, in equation (A. 19). This is accomplished by equating the heat released on combustion tothe convective and radiative heat transfer:r/XH =hp(Tp_Tg)+ea(T;_) (A.20)where: li = convective heat transfer coefficient (W/m2.K)z\H0 = heat of combustion (JIkmol)Tg = temperature of surroundings (K)= emissivitya = Stephan-Boltzmann constant (5.670x 10-8W/m2.K4)This equation can be solved to determine T.It is assumed here that the char particle is at a uniform temperature. This assumptionis justified in the same manner as for the sand in Section 4.3.4. In this case,h(V/A,’isestimated to be 0.03 6 to justilj this assumption.The analysis of the data can now be summarized. Given a particular data set, valuesfor A and Ea in Equation (A. 19) as well as n in Equation (A. 18) are assumed. The overall rateof combustion, r, is determined from the data using Equation (A. 11). The surfaceconcentration of oxygen, c, is then estimated by means of Equation (A. 15) and used tocalculate the experimental kinetic rate coefficient, k, from Equation (A. 18) based on theassumed reaction order n. A calculated value for k0 is next obtained from Equation (A. 19)and the particle heat balance (Equation A.20). The experimental and calculated kinetic rateconstants can then be compared in terms of the ratio:= kcAlgD(A.21)kC( (A 18))269This procedure is carried out on the data set from the start of combustion to a pointwhere the estimated particle size is approximately 700 p.m.An appropriate value for the reaction order, n, can be determined by investigation of rover the burnout period selected; n is adjusted until a constant ri with respect to time isobtained.Experimental values of k0 from equation (A. 18) can then be substituted into equation(A. 19) from two data sets at different temperatures to solve for A and Ea. A thirdindependent data set at an intermediate temperature is then analysed to ensure that 11, definedby equation (A.21) is in fact 1 over the burnout time, implying a good fit.A.4 ResultsTwo fuels were investigated for the purpose of kinetic parameter estimation - Highvalecoal char and Conoco coke. Various fuel sizes were employed for these tests. Average chardiameters were 1.6 mm and 0.95 mm for Highvale Coal char, and 2.2 mm, 1.5 mm, 1.1 mm,and 0.8 mm for the Conoco Coke. The burnout for each particle size for each fuel wasmeasured at three different reactor temperatures: 800 °C, 850 °C and 900 °C.A typical CO2 vs. time profile is presented in Figure A.4. In the test portrayed, a 1 gsample of 1.6 mm diameter Highvale char particles was charged to the reactor operating at810 °C and the corresponding burnout recorded.The effect of reaction order, n, in this particular test is shown in Figure A. 5. Asmentioned before, n is a fitting parameter which covers applied assumptions. Since a value ofn = 0.9 provides a relatively constant ratio, ri, over the analysed burnout time range, this valuewas selected to represent Highvale coal char.Figure A.6 presents the effect of temperature on the ratio. This error at differenttemperatures is then applied to equation (A. 19) which provides values for A and Ea.2700.5Time (seconds)Figure A.4: Typical Carbon Dioxide Response Curve during Char Burnout forHighvale Coal Char Particles of Initial Diameter of 1.6 mm at a ReactorTemperature of 810 °C2.521.5I00 100 200 300 400 500 600 700 800 9002710.90.80.604-b0.5R0.40.30.2150 450Time (seconds)Figure A.5: Effect of Reaction Order, n, on Calculated Kinetic Rate ConstantHighvale Coal Char with Initial Particle Diameter of 1.6 mmReactor Temperature = 810 °CA = 6 (kmol/m2-s.(kniol/3)),Ea = lxi O (kJ/kmol)250 3502720.40.3500.20.15 - /0.1220 320Time (seconds)Figure A.6: Effect of Temperature on Kinetic Rate Constant• Highvaie CoaL Char with Initial Particle Diameter of 1.6 mm• n 0.9, A = 6 (kmol/m2-s.(kmol/3)),£a = lx 1O (kJ/kmol)gloc895 C273Analysis of a third data set at yet another temperature was performed to confirm theabove determined values. This confirmation is achieved as shown in Figure A.7 by a relativelyconstant ii of 1.This approach was applied to both fuels. The parameters determined in this mannerare presented in Table A.2.27421.81.6‘1.4<1.2•1100Time (seconds)Figure A.7: Confirmation of Determined Kinetic Parameters• Highvale CoaL Char with Initial Particle Diameter of 1.6 mm• Reaction Temperature = 850 °C• n = 0.9, A 1092 (kmolJm•s•(kmoL/ni3)),Ea = 8.0733x I0 (kJfkrnol).150 200 250 300275Table A.2: Results of Fuel Reactivity ExperimentsFuel Order, n Frequency Factor, A Activation Energy, Ea(kmollm2.s.(kmo l3)”) (kJ/kmol)Highvale Coal 0.9 1092 8.0733x10Conoco Coke 1.0 44.4 4.99x107276APPENDIX B - SOLIDS CIRCULATION RATE MEASUREMENTThis appendix summarizes work performed to measure the solids circulation rate in theUBC pilot CFB combustor. The solids circulation rate determines the bed carbon inventoryand the rate at which this bed carbon is returned to the riser. This information is necessary forthe modeling described in Chapter 4. Burkell et al. (1988) review various techniques fordetermining solids circulation rates in circulating fluidized beds.B.1 TheoryThis work uses a time-of-descent method to determine the solids circulation rate.Time-of-descent involves measurement of the velocity of the particles in the moving packedbed within the standpipe.The particle velocity measurement is commonly made by observing individual particlesthrough the wall of a plexiglass column, or through windows installed in the standpipe. Plugflow is generally assumed so that this velocity is taken as the descent velocity of all particles inthe moving packed bed, Vd (m/s).277The moving bed is assumed to have a voidage equal to that at minimum fluidization,c. The volumetric flowrate of solids, (ms/s), is therefore:q =VdA(1—8) (B.1)where A is the cross-sectional area of the standpipe (m2).The circulation rate, th5 (kg/s), is obtained by multiplying the volumetric flow of solidsby the solids density, p (kg/rn3):= VdpS(1—6)A (B.2)Finally, the net solids flux in the riser, G (kg/m2s), can be calculated by dividing thesolids circulation rate by the cross-sectional area of the riser, A1., (m2):G5 =vdPS(1_6mf)/A (B.3)B.2 Experimental ApparatusVisual observation is unreliable at the temperatures of combustion used in this work(800 to 900 °C). Although a quartz glass window (400 mm tall by 50 mm wide) was in placein the lower portion of the standpipe, it was difficult to discern and track individual particlesdue to the red glowing of the solids at these temperatures. As well, although plug flow isassumed, the flat wall may influence particle velocities in its vicinity so that particles at thewall may not be representative of the bed.This work employed a method, referred to here as the line-and-sinker technique,whereby the velocity of the bed could be measured as a bulk velocity from within the movingmass. This employed a stainless steel cage, suspended by a chain, inserted into the bed. The278rate at which this cage is pulled downward with the moving packed bed is taken to be thevelocity of the bed itself.Figure B.1 is a sketch of the line-and-sinker system. A view port located near the topof the standpipe was replaced with the apparatus shown in this figure.A stainless steal welded link chain of an approximate 6 mm outer diameter is used tosuspend a conical cage within the moving bed. The stainless steal hollow cone isapproximately 40 mm in diameter at the top and 10 mm at the bottom with six 5 mm holesdrilled around its circumference. This design, developed through trial and error, allows thecone to be caught by the bed and pulled downward with the moving mass while permitting itto be raised through the bed without excessive force.The external, free hanging end of the chain passes over a pulley and through a funnelinto the extender tube. The pulley allows for a smooth change of direction from the verticalhanging position to that of the entry port to the standpipe. The funnel ensures that the chain isguided into the extender tube freely, without getting caught on any sharp, or abrupt edges.The extender tube, approximately 2 m long, serves two purposes. First it moves thehanging portion of the chain beyond the pilot plant structure so that it may hang freely and notbecome caught in various ancillaries. Second, it provides containment of hot portions of thechain. When, during testing, the chain is pulled to raise the cage, the hot portion of the chainbeing extracted from the standpipe remains in this feeding structure preventing the possibilityof operator contact.The packing box is a large cylinder, 400 mm long and 100 mm in diameter, packedwith Fibrefrax Durablanket insulation. This provides a crude seal between the standpipe andthe atmosphere. During installation, the chain is wrapped tightly with insulation which is thenstuffed into the cylinder. The chain is pulled back and forth through the insulation until itmoves freely with no resistance. The packing box provides tight restriction in the line, so thatsome backpressure may be maintained while providing minimal resistance to chain movement.279FunnelFigure B.1: Schematic of Line-and-Sinker SystemDireconal PackingTube BoxPurge AirExtender TubeCbCone280Prior to entry into the standpipe, a tee allows purge air to be introduced. This airincreases the pressure in the feedline to minimize escape of hot gas to the atmosphere, and tokeep solids from flowing into the chain-containment system where they could cause blockagesand restrict free movement of the chain.The directional tube enables the smooth transition of the chain to the vertical directionin the standpipe, helping to minimize restrictions to free movement. As well, it is located suchthat the cage, welded to the end of the chain, is located approximately along the centreline ofthe moving bed.For each experiment, the cage is located such that it is approximately 1.5 to 2 m abovethe vertex of the L-valve. A very strong pulling indicates that the bed is, in fact, under packedconditions and that the cage is within this bed. The chain is then released and the timerequired for a 1 m length to pass into the system is measured. The chain can then be pulled toraise the cage and repeat the measurement. In this work, the measurement was repeated 5times for each condition considered.B.3 Experimental ResultsFor all of the tests reported here, as the chain passed into the bed, it would typicallymove 5 to 10 cm, pause, then move again. This is indicative of stick/slip flow often reportedfor these types of systems. Consequently, the reported measurements are time averages of thesolids circulation rate.The three factors which determine the solids circulation rate, or net solids flux, are gasvelocity, primary to secondary (P/S) air ratio, and average riser solids loading. Run #33employed the line-and-sinker method to measure solids rates as a function of these variables.The results are presented, in terms of net riser solids flux, in Table B.1. The values reportedhere were found to be reproducible to ±5%.Figures B.2 to B. 10 present these results graphically. Figures B.2 to B.4 show theeffects of solids loading in the riser; Figures B.5 to B.7 illustrate the effects of P/S air ratio;281Figures B .8 to B. 10 present the effects of gas velocity. It is seen that there is very little effectof solids loading on the net solids flux. This is indicative of a high sensitivity of riser solidsloading to changes in the solids circulation rate.In contrast, the gas velocity and P/S air ratio have a more significant effect on solidsflux. On increasing the P/S air ratio, more air is introduced at the base of the riser. Thisincreased primary zone gas velocity helps to move the solids up the riser and out the exit.Therefore, a higher circulation rate is required in order to maintain a given riser solids loading.Increasing the total gas velocity is seen to have a similar effect.282Table B.1: Results of Circulation Rate ExperimentsP/S Air Ratio Gas Velocity Solids Loading Net Solids Flux(mis) (kg/rn3) (kglm2.s)2 8 90 19.62 8 120 21.72 8 150 22.63 8 90 27.73 8 120 31.03 8 150 33.24 8 90 33.04 8 120 36.74 8 150 40.32 7.3 90 16.22 7.3 120 17.02 7.3 150 18.33 7.3 90 22.03 7.3 120 21.83 7.3 150 24.74 7.3 90 27.74 7.3 120 28.04 7.3 150 28.82 6.7 90 15.72 6.7 120 15.22 6.7 150 14.93 6.7 90 19.93 6.7 120 20.83 6.7 150 20.44 6.7 90 23.14 6.7 120 23.54 6.7 150 25.328345_________+ P/S =2PIS=3 AAP/S4 A- 35A-e+2015 I I I I80 90 100 110 120 130 140 150 160Riser Solids Loading (kg/m3)Figure B.2: Effect of Riser Solids Loading on Net Solids FLux for a Gas Velocity of 8ni/S (Ottawa 50 sand, total inventory = 100 kg, combustor temperature = 850 °C)28445+P/S2P/S=335. AP/S=4AA AoF:’)20’+15 I I I I I80 90 100 110 120 130 140 150 160Riser Solids Loading (kg!rn3)Figure B.3: Effect of Riser SoLids Loading on Net Solids Flux for a Gas VeIoity of7.3 rn/s (Ottawa 50 sand, total inventory = 100 kg, combustor temperature = 850 °C)2854540 +PIS=2P/S=3A. P/S =430C,)-e25 AA Az2015 I I80 90 100 110 120 130 140 150 160Riser Solids Loading (kglm3)Figure B.4: Effect of Riser Solids Loading on Net Solids Flux for a Gas VeI&city of6.7 ni/s (Ottawa 50 sand, total inventory = 100 kg, combustor temperature = 850 °C)2864540 +Ug=8m/sUg=7.3m/sAUg=6.7mJs4>c+o(/3Az20 A151.5 2 2.5 3.5 4 4.5P/S Air RatioFigure B.5: Effect of P/S Air Ratio on Net Solids Flux for a Riser Solids Loading of90 kg/in3 (Ottawa 50 sand, total inventory = 100 kg, combustor temperature = 850C)287454O +Ug=8m/sUg7.3m/s25AUg6.7s4.5P/S Air RatioFigure B.6: Effect of P/S Air Ratio on Net Solids Flux for a Riser Solids Loading of120 kg/rn3 (Ottawa 50 sand, total inventory 100 kg, combustor temperature = 850°C)2884540‘35______Zno.4-.0)z20154.5P/S Air RatioFigure B.7: Effect of P/S Air Ratio on Net Solids Flux for a Riser Solids Loading of150 kg/rn3 (Ottawa 50 sand, total inventory = 100 kg, coinbustor temperature = 850°C)+ Ug = 8 m/sUg=7.3mJsA Ug=6.7 rn/s+AA1.5 2 2.5 3 35 42894540 +P/S=2PIS=335 A.P/S=4ASr1’-eo 25Az20 ++156.5 7 7.5 8 8.5Gas Velocity (mis)Figure B.8: Effect of Gas Velocity on Net Solids Flux for a Riser Solids Loading of90 kg/m3(Ottawa 50 sand, total inventory = 100 kg, combustor temperature = 850C)29045+ P/S =2C P/S=3 AAP/S=4A25z20.15 I6.5 7 7.5 8 8.5Gas Velocity (mis)Figure B.9: Effect of Gas Velocity on Net Solids Flux for a Riser Solids Loading of120 kg/ni3 (Ottawa 50 sand, total inventory = 100 kg, combustor temperature = 850°C)29145,4O +P/S=2 AP/S=3AP/S4AAz20+156.5 7 7.5 8 8.5Gas Velocity (mis)Figure B.1O: Effect of Gas Velocity on Net Solids Flux for a Riser Solids Loading of150 kg/rn3 (Ottawa 50 sand, total inventory 100 kg, combustor temperature = 850°C)292APPENDIX C - PROGRAM LISTING - DATA LOGGING AND CONTROL FORTHE UBC PILOT CFB COMBUSTORThis appendix provides the listing of the QuickBasic program written for data loggingand control of the UBC pilot CFB combustor. It consists of two programs - Ti performs thedata logging operations and T2 is the GPC control algorithm for combustion temperaturecontrol. Information is passed between the two through the COMMON variable storageblock.293COMMON.BIdefmesvariablestobesavedinramwhenloadingandunloadingTiandT2DIMa(1T03,1T02)DIMb(0TO4,1T02,1T02)DIMcc(1T04)DIMinfo%(15)DIMk(1TO10)DIMlam(1TO20,1TO2)DIMma(5)DIMmodifiers%( 1)DIMoffset%(3,15)DIMpositions%(15)DIMp(1TO10,1TO10,1T02)DIMpt(1TO10,1TO10)DIMsp(5)DIMu(-5TO0,1TO2)DIMy(-5TO0,ITO2)DIMuf-5TO0,1)DIMyf(-5TOO,1)DIMduf-5TO0,1)DIMdyf-5TOO,1)DIMtheta(1TO10)DIMfi(1TO10)DIMwrls(1TO10,1TO30)DIMalph(1TO2)DIMsetpnt(1TO2)DIMtube%(1T03)COMMONSHAREDenors%,address%,command%, positions%,modifiers%O,info%()COMMONSHAREDadapt%,arat,b,cont%, coalo,control%,elmip,ehn2pCOMMONSHAREDelmI s,elm2s,elmI 1,elm2I,fly%,gout%,ko,loado,iimeoCOMMONSHAREDlamO,maO,nu%, p0,pt(),spQ,samtime,saver%,rangoCOMJvIONSHAREDrangco,rangc,rangch,rangno,rangso,risvel,tsamp%,times%COMMONSHARED1s),waxmup%, y(),u()COMMONSHAREDtheta0,110,ffr,load,tempi, aOCOMMONSHAREDchange%, itstme%,ppmco,tube%()COMMONSHAREDoxyg,aiphO,setpnt()COMMONSHAREDoxy%,water%, oxysp,twosp,twofCOMMONSHAREDkox,tauio,taudo,ki,tauil,taudiCOMMONSHAREDkw,tauiw,taudw, en1w,e2wCOMMONSHAREDcomb,eom2o, alphw,ma3high,ma3low,limit%COMMONSHAREDsphigh,splow,prbst%, prbs%,prbsint%, hopper%COMMONSHAREDceO,uf),yf),dufl),dyf)COMMONSHAREDpidt%, k4,taui4,taud4,e4,dm14,ehri24COMMONSHAREDlimitc%,ma4high, ma4low,ccount%, trace,lanirisTIprogramtoperformdataloggingoperations‘$STATIC$INCLUDE:‘c:\opto\qb\progs\’DeclarecommonvariablestobepassedtooptowaredriverDeclarationofsubroutinesDECLARESUBOPTOWARE(a%,b%,C%,BYVALD%, BYVALE%, BYVALF%)DECLARESUBflcniain0DECLARESUBgetdata0DECLARESUBsaveitoDECLARESUBnumdisp0DECLARESUBtcolor()DECLARESUBaircont()DECLARESUBloadcelloDECLAREFUNCTIONorifice!(dor,dpip,p1, p2)DECLARESUBpowerup()DECLARESUBhellooDECLARESUBinitialsp0DECLAREFUNCTIONsecondsl0DECLARESUBopto0DECLARESUBennsg()DimensionarrayvariablesDIMvalue(3,15)DIMoffer(3,15)Defmitionofloggeddatavariables‘VALUE(l,O)=L-2tVALUE(1,I)L-3bottomtemperature‘VALUE(I,2)=L-4‘VALUE(l,3)=L-6‘VALUE(l,7)=L-12temperaturejustaboveinbedIncAssigndataconstantsoffer(2,13)-.045177offer(3,6)=.015873offer(2,14).008547offer(3,7)=.006105offset%(I,0)=-30offset%(I,I)=-30offset%(l, 2)=-30offset%(l,3)=-30offset%(I, 4)=-25offset%(1,5)=-25offset%(1,6)-20offset%(1,7)=-20offset%(1, 8)=-20offset%(1,9)=-20offset%(1,10)-9offset%(1,1l)-12offset%(1,12)-11‘offset%(l,13)0offset%(1,14)3offset%(1,15)”4‘offset%(2, 0)=0offset%(2,1)4‘offset%(2,2)0offset%(2,3)=1‘offset%(2,4)0‘offset%(2,5)=0offset%(2,6)=-5offset%(2,7)=-6offset%(2,8)=-24offset%(2,9)=-12offset%(2,10)=-9offset%(2,11)-3offset%(2,12)=-8offset%(2,13)23offset%(2,14)6offset%(2,15)2offset%(3, 0)=0‘offset%(3,1)0offset%(3, 2)=Ioffset%(3,3)=-59offset%(3, 4)3‘offset%(3,5)=0offset%(3,6)99offset%(3,7)=-4offset%(3,8)=13offset%(3, 9)=0offset%(3,10)=0‘offset%(3,11)0offset%(3,12)=0‘offset%(3,13)0‘offset%(3,14)=0‘offset%(3,15)0conport%=104pupclr%=0resset%=Iconout%=8probtp%=76setofl%=53rtemp%=77stavin%=47racb%=48ravin%=49ranin%=37ranout%=36waout%=35SetairpropertiesMIJ=.1812ROl=1.2928cp=1.403cv=1setorificerunparametersdorprim=.034925dpipprim.0508dorsec=.028575dpipsec=.0381kp=50ks=50gaml=.1alphw.5Set serialportnumbercommand%=setpnum%info%(0)=2CALLoptoconfigureserialportcommand%=conport%info%(0)=9600CALLoptoIFtimes%=1THENGOTO145ki=I/SOtauil=20taudl.12kw=.26tauiw30taudw.06kox=8tauio=150taudo=.25taui4=10000000000000#rannum=IRANDOMIZE(rannum)initializevariablesnu%=1FORi%=0TO15positions%(i%)=0info%(i%)=0NEXTi%defmeoptomuxcommandnumberssetpnum%=102rangolorangco=1000‘.0range20rangch=.2rangno=500rangso1000tsamp%=120sp(4)”4sp(5)4Cheekifpowerupclearisrequired(ie. hashardwarebeenshutoff)address%=Icommand%=rtemp%positions%(0)=0positions%(l)=-1CALLoptoIFerrors%0THENCALLpowerupInitialentryscreenandfileinitializationCALLhello6DetenninesetpointsforflowcontrollersIFcont%=ITHENCALLinitialspCOLOR7,0Initializedisplaytonumberformatgout%=IReadtheloadcellsCALLloadcell‘coalo=coallimeo=limeTIMES=“00:00:00”samtime=seconds145150WHILE(seconds-samtime)<tsamp%IFchange%=1THENarat/(arat+1)airset-37sp(2)1/(arat+l)*airsetsp(1)=0sp(2)0command%=waout%address%=3positions%(1)=-1positions%(0)=14info%(0)=INT((sp(4)-4)/16*4095)CALLoptochange%=0ENDIFCOLOR7,0:LOCATE22,1:PRINT“ELAPSEDTIME”,TIMESCOLOR7,0:LOCATE23,1:PRINT“SAMPLERATE(S)“,tsamp%IFcont%=1THENCALLaircont‘calculateriservelocityveloc=8.31434*(value(l,1)+273)*(pair+sair+37)/28.82/3600/(.1524)A2/100IFgout%=ITHENCOLOR14,0LOCATE310PRINTUSING“####“tairiLOCATE416PRINTUSING“###.#“;pairLOCATE1350PRINTUSING“##.##“ma(1)LOCATE5,16:PRINTUSING“###.#“;sairLOCATE14, 50:PRINTUSING“##.##“;ma(2)LOCATE7,16:PRINTUSING‘####“;value(2,10)LOCATE7,21:PRINTsp(3)LOCATE15, 50:PRINTUSING“##.##“;ma(3)LOCATE2,16:PRINTUSING“###.#“;value(3,0)LOCATE3,16:PRINTUSING“###.#“;airsetLOCATE8,16:PRINTUSING“###.#“;twoLOCATE9,16:PRINTUSING“###.#“;velocLOCATE12,16:PRINTUSING“###.#“;value(I,I)LOCATE10,16: PRINTUSING“##.##“;ma(4)ENDIFSetupfunctionkeysfor mainmenuGOSUB7000WENDsamtime=samtime+tsamp%itstme%1IFprbst%=1THENprbs%=prbs%+IIFprbs%=prbsint%THENnumber=R1’D-.5IFnumber >0THENsp(hopper%)=sphighELSE sp(hopper%)=splowENDIFcommand%waout%address%3positions%(0)=10+hopper%positions%(1)=-1info%(0)INT((sp(hopper%)-4)!16*4095)CALLoptoNJprbs%0ENDIFENDIFCALLgetdataGOTO1507000 FUNC11ONKEYmainmenuCOLOR10,0IFsaver%=0THENKEY1,‘Save”ELSE KEY1,“Wait”ENDIF1C.EY2,KEY3,“Setup”KEY4,“PRBS”KEYS,“Contem”ICEY6,KEY7,“Valve”KEYS,“limit”KEY9,“Sample”KEY10,“Quit”KEY(1)ON:KEY(2)ON:KEY(3)ON: KEY(4)ON:KEY(S)ONKEY(6)ON: KEY(7)ON:KEY(8)ON: KEY(9)ON: KEY(10)ONONKEY(1)GOSUB7001ONKEY(2)GOSUB9990ONKEY(3)GOSUB7010ONKEY(4)GOSUB8088ONKEY(5)GOSUB7500ONKEY(6)GOSUB9990ONKEY(7)GOSUB7400ONKEY(S)GOSUB7005ONKEY(9)GOSUB7300ONKEY(10)GOSUB9998KEYONCOLOR7,0RETURN‘******************************************************************7001IFsaver%=1THENsaver%=0ELSE saver%=1ENDIFGOSUB7000RETURN**************************************************************7005IFlimit%=1THENIimit%0ELSE limit%=1CLSINPUT“highmasetting”;ma3highINPUT“lowmasetting”;ma3lowCALLnuxndispGOSUB7300ENDiFRETURN7010 SUBROUTINETOCHANGEFUNCTIONKEYSFORSETUPCONTROLCOLOR10,0KEYI“SPLRAT”KEY2,“RANGE”IFcont%=0THENKEY3,“CONThL”ELSEKEY3,“NOCON”ENDIFKEY4‘COAL”KEYS“VEL”KEY6“02”KEY7“TWO”KEY8“LOAD”KEY9“TUBES”KEY10,“RETRN”KEY(1)ON:KEY(2)ON:KEY(3)ON:KEY(4)ON:KEY(S)ONKEY(6)ON:KEY(7)ON:KEY(8)ON:KEY(9)ON: KEY(10)ONONKEY(1)GOSUB7020ONKEY(2)GOSUB7040ONKEY(3)GOSUB7100ONKEY(4)GOSUB8500ONKEY(S)GOSUB7110ONKEY(6)GOSUB7013ONKEY(7)GOSUB7093ONKEY(8)GOSUB7032ONKEY(9)GOSUB7099ONKEY(10)GOSUB7000KEYONCOLOR7,0RETURN,******************************************************************7013 subroutinetoworkonoxygencontrollerCOLOR10,0IFoxy%0THENKEY1,“CONTRL”ELSEKEY1,“NOCON”ENDIFKEY2””KEY3,“SP”KEY4””KEYS“K”KEY6“TAUI”KEY7“TAUD”KEY8,””KEY9,KEY10,“RETRN”KEY(l)ON:KEY(2)ON:KEY(3)ON:KEY(4)ON: KEY(S)ONKEY(6)ON:KEY(7)ON:KEY(8)ON:KEY(9)ON: KEY(10)ONONKEY(1)GOSUB7014ONKEY(2)GOSUB9990ONKEY(3)GOSUB7015ONKEY(4)GOSUB9990\0ONKEY(5)GOSUB7016ONKEY(6)GOSUB70177018ONKEY(7)GOSUB7018CLSONKEY(8)GOSUB9990INPUT“inputnewoxygentaud”,taudoONKEY(9)GOSUB9990CALLnunidispONKEY(10)GOSUB7010GOSUB7300RETURNKEYONCOLOR7,0RETURI’l7032 subroutinetoworkonloadcontroller7014COLORIO,0IFoxy%ITHENKEYI””oxy%=0KEY2ELSEKEY3,oxy%1ENDIFKEY4GOSUB7013KEYS“K”RETURNKEY6“TAUT’KEY7“TAUD”7015KEY8CLSKEY9,””INPUT“inputnewoxygensetpoint(%)“,oxyspKEY10,“RETRN”CALLnumdispGOSUB7300KEY(1)ON:KEY(2)ON: KEY(3)ON:KEY(4)ON:KEY(5)ONRETURNKEY(6)ON:KEY(7)ON:KEY(8)ON:KEY(9)ON:KEY(l0)ON7016ONKEY(1)GOSUB9990CLSONKEY(2)GOSUB9990INPUT“inputnewoxygengain”,koxONKEY(3)GOSUB9990CALLnumdispONKEY(4)GOSUB9990GOSUB7300ONKEY(S)GOSUB7033RETURNONKEY(6)GOSUB7034ONKEY(7)GOSUB70357017ONKEY(8)GOSUB9990CLSONKEY(9)GOSUB9990INPUT“inputnewoxygentaui”,tauioONKEY(10)GOSUB7010CALLnumdispGOSUB7300KEYONCOLOR7,0KEY4””RETURNKEY5“K”KEY6“TAUI”KEY7“TAUD”7033KEY8CLSKEY9,“Filtr”INPUT“inputnewloadgain”,kIKEY10,“RETRN”CALLnumdispGOSUB7300KEY(1)ON: KEY(2)ON:KEY(3)ON:KEY(4)ON:KEY(S)ONRETURNKEY(6)ON:KEY(7)ON:KEY(8)ON:KEY(9)ON: KEY(10)ON7034ONKEY(l)GOSUB7094CLSONKEY(2)GOSUB9990INPUT“inputnewloadtaui”,tauilONKEY(3)GOSUB7095CALLnumdispONKEY(4)GOSUB9990(3OSUB7300ONKEY(S)(3OSUB7096RETURNONKEY(6)GOSUB7097ONKEY(7)GOSUB70987035ONKEY(8)GOSUB9990CLSONKEY(9)GOSUB7092INPUT“inputnewloadtaud”,taudlONKEY(10)GOSUB70102CALLnumdispGOSUB7300KEYONRETURNCOLOR7,0RETURN7094IFwater%=1THENwater%=07093ELSEsubroutinetoworkonwatercontrollerwater%=COLORIO,0ENDIFIFwater%=0THENGOSUB7093KEY1,“CONTRL”RETURNELSEKEY1,‘NOCON”7095ENDIFCLSKEY2,“INPUT“inputnewwatersetpoint(%)“,twospKEY3,”SP”CALLnunidispGOSUB7300RETURN7096CLSINPUT“inputnewwatergain”,kwCALLnumdispGOSUB7300RETURN7097CLSINPUT“inputnewwatertaui”,tauiwCALLnumdispGOSUB7300RETURN7098CLSINPUT“inputnewwatertaud”,taudwCALLnumdispGOSUB7300RETURN7092CLSINPUT“inputnewwaterfilterfactor(0to1)”,alphwCALLnumdispGOSUB7300RETURN7099‘subroutinetotoggleon/offfortubesCLSINPUT“whichtubetotoggleon/oil”;xx%IFtube%(xx%)=1THENtube%(xx%)=0ELSE tube%(xx%)=ENDIFCALLgetdataCALLnumdispGOSUB7010RETURNREM**************************************************************7020 SUBROUTINETOCHANGESAMPLERATECOLOR10,0KEY1“-30S”KEY2“-5S”KEY3“-15S’1KEY4“-1M”KEYS“-2M”KEY6,“-3M”KEY7“-SM”KEY8,KEY9,“user”KEY10,“RETRN”KEY(1)ON:KEY(2)ON: KEY(3)ON: KEY(4)ON: KEY(S)ONKEY(6)ON:KEY(7)ON: KEY(8)ON: KEY(9)ON: KEY(10)ONONKEY(1)GOSUB7025ONKEY(2)GOSUB7026ONKEY(3)GOSUB7027ONKEY(4)GOSUB7028ONKEY(S)GOSUB7029ONKEY(6)GOSUB7030ONKEY(7)GOSUB7031ONKEY(8)GOSUB9990ONKEY(9)GOSUB8033ONKEY(10)GOSUB7010KEYONCOLOR7,0RETURNC7025tsamp%30INPUT“inputsampletimeinseconds”;tsamp%IFtsamp%<10THEN(IOTO8033CLSCALLnumdispGOSUB7300GOSUB7010RETIJRNREM***********************************************************************7040 SUBROUTINETOCHANGEANALYSERBANKRANGESCOLOR10,0KEY1,“02”KEY2“CH4”KEY3“NOX”KEY4“SO2”KEYSKEY6KEY7,KEY8,KEY9,KEY10, “RETRN”KEY(1)ON:KEY(2)ON: KEY(3)ON: KEY(4)ON:KEY(5)ONKEY(6)ON:KEY(7)ON: KEY(8)ON:KEY(9)ON: KEY(10)ONONKEY(1)GOSUB7045ONKEY(2)GOSUB7050ONKEY(3)GOSUB7055ONKEY(4)GOSUB7060ONKEY(5)GOSUB9990ONKEY(6)GOSUB9990ONKEY(7)GOSUB9990ONKEY(8)GOSUB9990ONKEY(9)GOSUB9990ONKEY(10)GOSUB7010KEYONCOLOR7,0RE11JRNREM**************************************************************GOSUB7010RETURN7026tsamp%=5GOSUB7010RETURN7027tsainp%=15GOSUB7010RETURN7028tsamp%=6OGOSUB7010RETURN7029tsamp%=120GOSUB7010RETURN7030tsamp%=180GOSUB7010RETURN7031tsamp%=300GOSUB7010RETURN8033CLScDREM**************************************************************REM*****************************************************************7045 SUBROUTINETOCHANGE02ANALYSERRANGECOLOR10,0KEY1“-5%”KEY2“-10%”KEY3“-25%”KEY4””KEYS””KEY6KEY7KEY8KEY9KEY10,“RETRN”KEY(1)ON:KEY(2)ON:KEY(3)ON:KEY(4)ON:KEY(S)ONKEY(6)ON:KEY(7)ON: KEY(8)ON:KEY(9)ON: KEY(10)ONONKEY(1)GOSUB7046ONKEY(2)GOSUB7047ONKEY(3)GOSUB7048ONKEY(4)GOSUB9990ONKEY(S)GOSUB9990ONKEY(6)GOSUB9990ONKEY(7)GOSUB9990ONKEY(8)GOSUB9990ONKEY(9)GOSUB9990ONKEY(10)GOSUB7040KEYONCOLOR7,0RETURNrango=5GOSUB7040RETURN7050 SUBROUTINETOCHANGECH4ANALYSERRANGECOLOR10,0KEY1“-02%”KEY2“-05%”KEY3””KEY4””KEY5KEY6””KEY7””8,KEY9,””KEY10,“RETRN”KEY(1)ON:KEY(2)ON: KEY(3)ON:KEY(4)ON:KEY(S) ONKEY(6)ON: KEY(7)ON:KEY(8)ON: KEY(9)ON:KEY(10)ONONKEY(1)GOSUB7052ONKEY(2)GOSUB7053ONKEY(3)GOSUB9990ONKEY(4)GOSUB9990ONKEY(S)GOSUB9990ONKEY(6)GOSUB9990ONKEY(7)GOSUB9990rango=10GOSUB7040RETURN7048 CHANGE02TO25%raugo=25GOSUB7040RETURNREM********************************************************************************C7046 CHANGE02TOOTO10%7047 CHANGE02TO0TO10%7052ONKEY(8)GOSUB9990ONKEY(9)GOSUB9990ONKEY(1O)GOSUB7040KEYONCOLOR7,0RETURNCHANGECH4ANALYSERTOOTO0.2%RANGECH=.2GOSUB7040RETURN7053 CHANGEC1-14ANALYSERTOOTO0.5%rangch=.5GOSUB7040RETURN7055 SUBROUTINETOCHANGENOXANALYSERRANGECOLOR10,0KEY1“-25”KEY2“-5”KEY3“-10”KEY4“-25”KEY5“-50”KEY6“-100”KEY7“-250”KEY8“-500”KEY9KEY10,“RETRN”7076KEY(1)ON: KEY(2)ON: KEY(3)ON:KEY(4)ON:KEY(S)ONKEY(6)ON:KEY(7)ON: KEY(8)ON:KEY(9)ON:KEY(1O)ONONKEY(1)GOSUB7076ONKEY(2)GOSUB7077ONKEY(3)GOSUB7078ONKEY(4)GOSUB7079ONKEY(S)GOSUB7081ONKEY(6)GOSTJB7082ONKEY(7)GOSUB7083ONKEY(8)GOSUB7084ONKEY(9) GOSUB9990ONKEY(1O)GOSUB7040COLOR7,0KEYONRETURNCHANGENOXANALYSERTOOTO2.5PPMrangno2.5GOSUB7040RETURN7077 CHANGENOXANALYSERTOOTO5PPMraugno=5GOSUB7040RETURN7078 CHANGENOXANALYSERTOOTO10PPMrangnolOGOSUB7040RETURN7079 CHANGENOXANALYSERTOOTO25PPMrangno=25GOSUB7040RETURNQ U’REM**********************************************************************7081 CHANGENOXANALYSERTOOTO50PPMrangno50GOSUB7040RETURN7082 CHANGENOXANALYSERTOOTO100PPMrangno100GOSUB7040RETURN7083 CHANGENOXANALYSERTOOTO250PPMrangno=250GOSUB7040RETURN7084 CHANGENOXANALYSERTOOTO500PPMrangno=500GOSUB7040RETURNREM******************************************S******************REM***********************************************************************7060 SUBROUTINETOCHANGESO2ANALYSERRANGECOLOR10,0KEY1“-1000”KEY2“-3000”KEY3“-5000”KEY4 5,007062KEY8,KEY9,KEY10,“RETRN”KEY(1)ON:KEY(2)ON:KEY(3)ON: KEY(4)ON:KEY(5)ONKEY(6)ON: KBY(7)ON:KEY(8)ON:KEY(9)ON: KEY(1O)ONONKEY(1)GOSUB7062ONKEY(2)GOSUB7063ONKEY(3)GOSUB7064ONKEY(4)GOSUB9990ONKEY(S)GOSUB9990ONKEY(6)GOSTJB9990ONKEY(7)GOSUB9990ONKEY(8)GOSUB9990ONKEY(9)GOSUB9990ONKEY(1O)GOSUB7040KEYONCOLOR7,0RETURNCHANGESO2ANALYSERTOOTO1000PPMrangso1000GOSUB7040RETURN7063 CHANGES02ANALYSERTOOTO3000PPMrangso=3000GOSUB7040RETURN7064 CHANGES02ANALYSERTOOTO5000PPMrangso5000GOSUB7040RETURNKEY61EY7,ONKEY(2)GOSUB7130ONKEY(3)GOSUB9990ONKEY(4)GOSUB9990ONKEY(5)GOSUB7140ONKEY(6)GOSUB9990ONKEY(7)GOSUB71507100ONKEY(8)GOSUB9990SUBROUTINETOTOGGLEAIRCONTROL/NOCONTROLONKEY(9)GOSUB9990IFcont%=0THENONKEY(10)GOSUB7010cont%1ELSEKEYONcont%=0ENDIFRETURNKEYOFFGOTO67120CLSRETURNLOCATE2,2:INPUT‘INPUTP:SAIRRATIOAS#:1“,aratCLSCALLnumdispGOSUB7300RETURN71307110CLSSETUPFUNCTIONKEYSFORSETTINGVELOCITYLOCATE2,2:INPUT“INPUTDESIREDRISERVELOCITY(MIS)”, risvelCLSKEY1,“P:S”CALLnumdispKEY2“VEL”GOSUB7300KEY3““RETURNKEY4KEY5“ON”7140KEY6““fly%=1KEY7“OFF”GOSUB7300KEY8“GOSUB7010KEY9“RETURNKEY10,“RETRN”7150KEY(1)ON:KEY(2)ON:KEY(3)ON:KEY(4)ON: KEY(S)ONfly%=0KEY(6)ON:KEY(7)ON:KEY(8)ON:KEY(9)ON:KEY(10)ONGOSUB7010RETURNONKEY(1)GOSUB7120ONICEY(7)GOSUI39990ONKEY(S)(3OSUB9990ONKEY(9)GOSUB9990ONKEY(10)GOSUB7000KEYON7300COLOR7,0SUBROUTINEFORUNSCHEDULEDSAMPLNGOFOPTOMUXRETURNTM$=TIMESCALLgetdataRETURNREM**************************************************************REM**************************************************************7410 SUBROUTINETOCHANGEPRIMARYAIRFLOWCLS7400COLOR10,0SUBROUTINETODISPLAYFUNCTIONKEYSFORVALVECHANGEPRINT“ENTERNEWPRIMARYAIRFLOW(KGINR)”INPUTsp(1)COLOR10,0eImlp”OKEY1,“PRIM”elni2p=0KEY2“SEC”CLSKEY3“L-VAL”‘WRiTE#1,“CHANGEINVALVESETTING-PRIMARYAIR”KEY4“COAL”‘WRiTE#2“CHANGEINVALVESETI1NG-PRIMARYAIR”KEYS“LIME”‘WRITE#3“CHANGEINVALVESETTING-PRIMARYAIR”KEY6“‘WRITE#4“CHANGEINVALVESETTING-PRIMARYAIR”KEY7“‘WRITE#5“CHANGEINVALVESETTING-PRIMARYAIR”KEY8,”COLOR7,0KEY9,““CALLnumdispKEY10,“RETRN”GOSUB7400GOSUB7300KEY(1)ON:KEY(2)ON: KEY(3)ON:KEY(4)ON:KEY(S)ONRETURNKEY(6)ON:KEY(7)ON: KEY(8)ON:KEY(9)ON:KEY(I0)ONONKEY(1)GOSUB7410ONKEY(2)GOSUB7420ONKEY(3)GOSUB7430ONKEY(4)GOSUB7440ONKEY(S)GOSUB7450ONKEY(6)GOSUB99907420CLSCOLOR10,0PRINT“ENTERNEWSECONDARYAIRFLOW(KG/HR)”INPUTsp(2)elmls0elm2s=0CLS WRiTE#1“CHANGEINVALVESETTING-SECONDARYAIR”WRiTE#2“CHANGEINVALVESETTING-SECONDARYAIR”WRiTE#3“CHANGEINVALVESETTING-SECONDARYAIR”WRITE#4“CHANGEiNVALVESETtING-SECONDARYAIR”WRITE#5,“CHANGEINVALVESETTING-SECONDARYAIR”COLOR7,0CALLnumdispGOSUB7400GOSUB7300RETURNREM**************************************************************7430 SUBROUTINETOCHANGEL-VALVEAIRFLOWCLSCOLOR10,0PRINT“ENTERNEWSOLIDSLOADING(KGIM3)”INPUTsp(3)elmil=0elrn2l=0CLSWRITE#1“CHANGEINVALVESETTING-L-VALVE”WRITE#2“CHANGEINVALVESETTING-L-VALVE”WRITE#3“CHANGEINVALVESETtING-L-VALVE”WRiTE#4“CHANGEINVALVESETTING-L-VALVE”WRITE#5,“CHANGEINVALVESETTING-L-VALVE”COLOR7,0CALLnumdispGOSUB7400GOSUB7300RETURNREM*************************************************************************7440 SUBROUTINETOCHANGECOAL(LARGE)HOPPERFLOWCLSCOLOR10,0PRINT“ENTERNEWCOALSETTING(MA)”INPUTsp(4)CLS WRITE#1,“CHANGEINVALVESETTING-LARGEHOPPER”WRITE#2“CHANGEINVALVESETTING-LARGEHOPPER”WRiTE#3“CHANGEINVALVESETTING-LARGEHOPPER”WRITE#4“CHANGEINVALVESETTING-LARGEHOPPER”WRiTE#5,“CHANGEINVALVESETTING-LARGEHOPPER”COLOR7,0CALLnumdispGOSUB7400coxmnand%=waout%address%=3positions%(0)=14positions%(1)=-1info%(0)=INT((sp(4)-4)/16*4095)CALLoptoGOSUB7300RETURNSUBROUTINETOCHANGESECONDARYAIRFLOWCR.EM*********************************************************************REM************************************************************************7450KEYS,“02”KEY9,“Coefs”KEY10,“Retrn”SUBROUTINETOCHANGELIMESTONE(SMALL)HOPPERFLOWCLSCOLOR10,0PRINT“ENTERNEWLIMESTONESElliNG(MA)”INPUTsp(5)CLSWRITE#1“CHANGEINVALVESETI]NG-SMALLHOPPER”WRITE#2“CHANGEINVALVESETTING-SMALLHOPPER”WR1TE#3“CHANGEINVALVESETTING-SMALLHOPPER”WRiTE#4“CHANGEINVALVESETTING-SMALLHOPPER”WRiTE#5,“CHANGE114VALVESETTING-SMALLHOPPER”COLOR7,0CALLnumdispGOSUB7400command%=waout%address%=3positions%(0)=15positions%(1)=-1info%(0)=INT((sp(5)-4)/16*4095)CALLoptoGOSUB7300RETURN7500KEY1,“Horiz”KEY2“Lam”KEY3“Adapt”KEY4,“P-Mat”KEY5,“Contri”KEY6,””KEY7,“Temp”KEY(1)ON:KEY(2)ON: KEY(3)ON:KEY(4)ON: KEY(S)ONKEY(6)ON:KEY(7)ON:KEY(S)ON:KEY(9)ON: KEY(I0)ONONKEY(1)GOSUB7510ONKEY(2)GOSUB7550ONKEY(3)GOSUB7520ONKEY(4)GOSUB7521ONKEY(S)GOSUB7530ONKEY(6)GOSUB9990ONKEY(7)GOSUB7540ONKEY(S)GOSUB7545ONKEY(9)GOSUB7547ONKEY(I0)GOSUB7000KEYONCOLOR7,0RETURN7510CLSINPUT“Inputnewcontrolhorizon“;nu%CLSCALLnumdispGOSUB7500RETURNREM************************************************************************(‘307520IFadapt%=0THENadapt%=IELSEadapt%=0ENDIFGOSUB7500RETURN7521CLSPRINT“inputnewdiagonalforp-matrix”PRIN1’“-999tonotresetandreturn”INPUTinitialIFinitial=-999THENdon’tdoanytingELSE FORlo%=1TO2FORi%=ITO10FORj%=1TO1OIFi%=j%THENp(i%,j%,lo%)=initialELSE p(i%,j%, lo%)=0ENDIFNEXTJ%NEXTi%NEXTlo%ENDIFCLSCALLnumdispGOSUB7500RETURN7530IFwarmup%=0THENwarmup%=1ELSE warmup%=0ENDIFGOSUB7500RETURN7540CLSLOCATEI,I:INPUT“Inputnewtemperaturesetpoint”;setpnt(1)setpnt(2) =setpnt(1)CLSCALLnumdispGOSUB7500RETURN7545CLSLOCATEI,1:INPUT“Inputnewoxygensetpoint”;setpnt(2)CLSCALLnumdispGOSUB7500RETURN7547CLSINPUT“Input‘a’fora,‘b’forb,or‘c’forc”; co$IFco$=“A”THENINPUT“whicha?(Ito3)”,cco%IFcco%>3ORcco%<1THENGOTO7547INPUT“acoefficient ?“,a(cco%,I)ELSEIFco$=“a”THENINPUT“whicha?(Ito3)”,cco%IFcco%>3ORcco%<ITHENGOTO7547INPUT“acoefficient ?“,a(cco%,I)ELSEIFco$=“B”THENINPUT“whichb?(0to3)”,cco%fl?cco%>3ORcco%<0THENGOTO7547INPUT“bcoefficient ?“,b(cco%,1,1)ELSEIFco$=“b”THENINPUT“whichb?(0to3)”,cco%IFcco%>3ORcco%<0THENGOTO7547INPUT“bcoefficient ?“,b(cco%,I,I)ELSEIFco$=“C”THENINPUT“whichC?(1or2)”,cco%IFcco%>2ORcco%<1THENGOTO7547INPUT“ccoefficient?“,cc(cco%)ELSEIFcoS=“c”THENINPUT“whichc?(1or2)”,cco%IFcco%>2ORcco%<1THENGOTO7547INPUT“ccoefficient?“,cc(cco%)ELSE GOTO7547ENDIFCLSCALLnumdispGOSUB7500RETURN7550CLSLOCATE1,1:INPUT“Whichinput”,z%LOCATE2,1:INPUT“newconstraint“,connyFORi%=ITO10lam(i%,z%)=connyNEXTi%CLSCALLnumdispGOSUB7500RETURN9990RETURN8088CLSIFprbst%=0THENPRINT“youhaveenteredthesetuproutineforaPRBStest”PRINT“youcanabortatanytimebyansweringwith-999”PRINT8089PRINT“whichhopperisbeingusedforthefuelfeed(4or5)”INPUThopper%IFhopper%-999THENRETURNIFhopper%<4ORhopper%>5THEN(30T08089PRINTPRINT“inputhighmasignalofPRBSsignal”INPUTsphighIFsphigh=-999THENRETURNPRINTPRiNT“inputlowmasignalofPRBSsignal”INPUTsplowIFsplow=-999THENRETURNPRINTPRINT“whatisthedesiredswitchintervaltosampleintervalratio”INPUTprbsint%IFprbsint%=-999THENRETURNPRINTINPUT“pressENTERtoconfinnaboveinfonnationiscorrect (-999toabort)”;oxIFxxxxx=-999THENRETURNprbs%=0prbst%=1CLSELSECLSINPUT“pressENTERtoconfirmendofPRBStest(-999tocontinuetest)”; xxxocIFxxxxx=-999THENRETURNprbst%=0CLSENDIFRETURN8500 KEYTEMPLATEforpidcoalcontrollerIFpidt%=0THENKEY1,“CONTEL”ELSEKEY1,“NOCON”ENDIFKEY2,INPUT“inputnewcoalgain”,k4KEY3,“K”CALLnumdispKEY4“TAUl”GOSUB7300KEYS“TAUIY’RETURNKEY6KEY7“LIIvIIT’8530KEY8,‘“CLSKEY9,””INPUT“inputnewcoaltaui”,taui4KEY10,“RETRN”CALLnumdispGOSUB7300KEY(1)ON:KEY(2)ON:KEY(3)ON:KEY(4)ON:KEY(S)ONRETURNKEY(6)ON:KEY(7)ON:KEY(S)ON:KEY(9)ON: KEY(l0)ON8540ONKEY(1)GOSUB8510CLSONKEY(2)GOSUB9990INPUT“inputnewcoaltaud”,taud4ONKEY(3)GOSUB8520CALLnumdispONKEY(4)GOSUB8530GOSUB7300ONKEY(S)GOSUB8540RETURNONKEY(6)GOSUB9990ONKEY(7)GOSUB85508550ONKEY(S)GOSUB9990IFlimitc%=1THENONKEY(9)GOSUB9990limitc%=0ONKEY(10)GOSUB7010ELSE limitc%=IKEYONCLSCOLOR7,0INPUT“highmasetting”;ma4highINPUT“lowmasetting”;ma4lowRETURNCALLnuindispGOSUB73008510ENDIFIFpidt%=1THENRETURNpidt%=0ELSE pidt%=1ENDIFRETURN9998KEYI“Retrn’KEY28520KEY3CLSKEY4,KEY5KEY6””KEY7””KEY8””KEY9KEY10,“Quit”KEY(1)ON:KEY(2)ON:KEY(3)ON:KEY(4)ON:KEY(5)ONKEY(6)ON:KEY(7)ON:KEY(8)ON:KEY(9)ON: KEY(10)ONONKEY(l)GOSUB7000ONKEY(2)GOSUB9990ONKEY(3)GOSUB9990ONKEY(4)GOSUB9990ONKEY(S)GOSUB9990ONKEY(6)GOSUB9990ONKEY(7)GOSUB9990ONKEY(8)GOSUB9990ONKEY(9)GOSUB9990ONKEY(10)GOSUB9999KEYONCOLOR7,0RETURN*******9999STOPENDSUBaircontSTATICSHAREDsp(),stavin%, racb%,ravin%,valueO,offer(), ranout%, waout%SHAREDerrors%, adclress%, command%, positions%O, modifiers%O,info%()SHAREDdorprim, dpipprim, dorsec,dpipsec,pair, sairSHAREDmao,tauip,tauis, tauil,taudp,tauds,taudi,kp,ks,ki, gamiSHAREDkw, kox,tauiw, tauio,taudw, taudo, rango,ranin%, veloc, tairiSHAREDarat,oxy%, water%, oxysp,twosp,two,airset,rtemp%, twofSHAREDalphw, ma3high, ma3low, limit%SHAREDpidt%,k4,taui4,taud4,e4, ehnl4, e1m24, limitc%, ma4high, ma4lowcoxnmand%=stavin%address%=2positions%(0)10positions%(1)=-1info%(0)=10CALLoptocommand%=stavin%address%=2positions%(0)=13positions%(1)=14positions%(2)-1info%(0)=10CALLoptoaddress%=3positions%(0)=6positions%(1)=7positions%(2)=-1info%(0)=10CALLoptoReadcurrent masignalstocontrol valvesconunand%=ranout%address%3-FORi%=0TO4poSitiOflS%(j%)=j%+11NEXTi%positions%(5)=-1CALLoptoFORi%=11T015ma(i%-10)=(info%(i%)/4095*16) +4NEXTi%Checkifboard2isdoneUIcommand%=racb%address%211 CALLoptoIFinfo%(13)OTHENGOTO11IFinfo%(14)0THENGOTO11Readboard2command%ravin%address%=2positions%(0)13positions%(1)14positions%(2)=-1CALLoptoFORi%=13T014value(address%,i%)=(jfo%(j%)/4095*10)NEXTi%Checkifboard3isdonecommand%=racb%address%=312 CALLoptoIFinfo%(6)=0THENGOTO12IFinfo%(7)0THENGOTO12Readboard3command%=ravin%address%=3positions%(0)6positions%(1)7positions%(2)=-1CALLoptoFORi%=6TO7value(address%, 1%)(info%(i%)/4095*10)NEXTi%Offsetsforprnnaiyairflowvalue(2,13)value(2,13)+offer(2,13)value(3,6)=value(3,6)+offer(3,6)value(2,14) =value(2,14)+offer(2,14)value(3,7)=value(3,7)+offer(3,7)Ensureitiso.k.tocalculatewithout non-negativeflowsIFvalue(3,6)<1THENvalue(3,6)=1.00001IFvalue(2,13)<ITHENvalue(2,13)=IIFvalue(3,7)<1THENvalue(3,7)=1.00001IFvalue(2,14)<1THENvalue(2,14)=ICalculateprimaiyairflowp1=(value(3, 6)-1)*6894.733+101325p2=p1-(value(2,13)-1)*498.348dor=dorprimdpip=dpipprimpair=orifice(dor,dpip, p1,p2)*3600Calculatesecondaryair flowp1=(value(3, 7)-1)*6894.733+101325p2p1-(value(2,14)-1)*498.348dor=dorsecdpip=dpipsecsair=orifice(dor,dpip,p1,p2)*3600CheckifdonewithpressuredropmeasurementCheckifboard2isdonecommand%=racb%address%218 CALLoptoIFinfo%(10)=0THENGOTO18Readboard2coiumand%=ravin%address%=2positions%(0)=10positions%(1)=-1CALLoptovalue(address%,10)=(info%(10)/4095*10)Calculateaveragesolidsloading(kglm3)value(2,10)=(value(2,10)-1)*101.325value(2,10)=gaml*value(2,10)+(1-gami)*loadoloado=value(2,10)readwatertemperaturesReadthermocouplescommand%=rtemp%address%=IFORi%=0TO14positions%(i%)=i%NEXTi%positions%(15)=-1CALLoptoFORi%=OTO14value(address%,i%)=info%(i%)/16NEXTi%calculateaverageoutlet watertemperaturetwo=0xx%=0FORi%=1TO3IFtube%(i%)=1THENtwo=two+value(1,10+i%)xx%=xx%+IENDIFNEXTi%IFxx%=0THENtwo=0ELSE two=twoIxx%ENDIFtwoalphw*twof+(1-alphw)*twotwoftworead02analysersignalcoxnmand%=ranin%address%3positions%(0)=0positions%(1)-1CALLoptothe-.025isanoffsetfor theportableo2analyservalue(address%, 0)=(info%(0)/4095-.025)*rangoIFwater%1THENIFvalue(2,10) >200THENel=170-valué(2,10)ma(3)=ma(3)+ki*(1+I/tauil+taudl)*el-ki*(1+2*taudl)*elmil+*taudi*elxn2lELSEIFvalue(2,10)>170ANDvalue(2,10)<200THENIFtwo>twospTHENew=twosp-twoma(3)=ma(3)+kw*(1+1/tauiw+taudw)*ew-kw*(1+2*taudw)*eiw+*taudw*evwELSE ci=170-value(2,10)ma(3)=ma(3)+ki*(1+I/tauil+taudl)*ci-ki*(1+2*taudl)*eImli+ki*taudi*dm21ENDIFELSEIFvalue(2,10)<50THENIFtwo<twospTHENewtwosp-twoma(3)=ma(3)+kw*(1+1/ tauiw+taudw)*ew-kw*(1+2*taudw)*ewmlw+*taudw*ewm2wELSE ci=50-vaiue(2,10)ma(3)=ma(3)+Id*(1+1/tauii+taudl)*ci-ki*(1+2*taudi)*elinll+Id*taudi*dm21ENDIFELSE ew=twosp-twoma(3)=ma(3)+kw*(1+I/tauiw+taudw)*ew-kw*(1+2*taudw)*ewmlw+kw*taudw*en2wIFlimit%=1THENIFtwo<twospTHENma(3)=ina3highELSE ma(3)=nia3lowENDIFENDIFENDIFELSE el=sp(3)-vaiue(2,10)ma(3)=ma(3)+ki*(1+I/tauii+taudi)*ci-ki*(1+2*taudi)*elmil+*taudi*elm2iIFlimit%=1THENIFvalue(2,10)<sp(3)THENma(3)=ma3highELSE ma(3)=ma3lowENDIFENDIFENDIFairsetsp(1)+sp(2)+37IFfly%1THENIFoxy%=1THENIFveloc6.6THENIFvaiue(3,0)<oxyspTHENeo=oxysp-vaiue(3,0)tairi=airset+kox*(1+IItauio+taudo)*eo-kox*(1+2*taudo)*comb+kox*taudo*eom2osp(1)arat*tairi/(arat+1)-37sp(2)tairi-sp(1)-37ELSE airtot6.6*100*3600*.1524A2/8.31434/(vaiue(1,1)+273)airtotairtot-.15airtot=airtot*28.84sp(1)aratf(arat+1)*airtot-37sp(2)=I/(arat+1)*airtotENDIFELSEIFveloc>9.8THENIFvaiue(3,0)>oxyspTHENeo=oxysp-value(3,0)tairiairset+kox*(1+1/tauio+taudo)*eo-kox*(1+2*taudo)*comb+kox*taudo*eom2osp(1)arat*tairil(arat+1)_37sp(2)tairi-sp(I)-37ELSE airtot=9.8*100*3600*.1524A2/8.31434!(value(1,1)+273)airtot=airtot-.15airtot=airtot*28.84sp(1)=arat/(arat+1)*airtot-37sp(2)11(arat+1)*airtotENDIFELSE eooxysp-vaiue(3,0)tairi=airset+kox*(1+I/ tauio+taudo)*eo-kox*(1+2*taudo)*comb+kox*taudo*eoin2osp(1)=arat*tairi/(arat +1)-37sp(2)=tarn-sp(1)-37ENDIFELSE airtot=risvel*100*3600*.1524A2/8.31434/(value(1,1)+273)airtot=airtot-.15airtot=airtot*28.84sp(1)arat!(arat+1)*airtot-37sp(2)=I/(arat+I)*airtotENDIFENDIFep=sp(1)-paires=sp(2)-sairma(1)=ma(1)+(ep/kp)ma(2)=nia(2)+(es/ks)ma(1)=ma(1)+kp*(1+1/taujp+taudp)*epkp*(1+taudp)*ejmlp+kp*taudp*elm2pma(2)=ma(2)+elm2pelmlpelin1p=epeim2s=elmlselmis=esdm21=ehullelmIl=elewin2w=ewml wen1w=eweom2oeomloeomloeocommand%=waout%address%=3positions%(1)=-1FORi%=ITO3IFma(i%)<4THENma(i%)=4lFma(i%)>I6THENma(i%)16positions%(0)=i%+10info%(0)=INT((ma(i%)-4)/16*4095)CALLoptoNEXTi%IFpidt%=ITHENe4=setpnt(1)-value(1,1)sp(4)=sp(4)+k4*(1+I/taui4+taud4)*e4-k4(1+2*taud4)*eIml4+k4*taud4*e1m24elin24=elml4elml4=e4IFlimitc%=ITHENIFvalue(1,1)<setpnt(1)THENsp(4)=ma4highELSE sp(4)ma4lowENDIFENDIFcommand%=waout%address%=3positions%( 1)=-1i%=4IFsp(i%)<4THENsp(i%)=4IFsp(i%)>I6THENsp(i%)=16positions%(0)=j%+10info%(0)=INT((sp(i%)-4)116*4095)CALLoptoENDIFENDSUBSUBennsgsubroutinetodisplayerror messageifaproblemwithoptomuxSHAREDerrors%, command%IFerrors%=-1THENGOTO345‘indicatesonlypowerupclearisrequired(nonfatal)CLSPRINT“ERROR“,errors%, “FORCOMMAND“,connuand%STOP345ENDSUBSUBgetdataSTATICSHAREDstavin%, rtemp%, ranin%,ranout%, racb%, ravin%, offer()SHAREDdorprim, dpipprim,dorsec, dpipsec,sair, pair,lair,saver%SFIAR.EDelinip,ehn2p,elinis,elm2s,elmil,dm21,value()SHAREDsp(),waout%, arat,airtot, gout%,gami,loadoSHAREDerrors%, address%,conunand%, positions%),modifiers%,infO%()SHAREDcoalrat,limerat, coalo,limeo,coal,lime,tsamp%, two,twofStart averagingpressuretransducersaddress%=2command%=stavin%FORi%=OTO15positions%(i%)=NEXTi%info%(0)=10CALLoptoStartaveraginpressuretransducers(10samples)command%=stavin%address%=I00positions%(0)=15positions%(1)=-1info%(0)=10CALLoptocommand%=stavin%address%3FORi%=0TO2positions%(i%)=i%+6NEXTi%positions%(3)=-1info%(0)=10CALLoptoReadloadcellsCALLloadcellReadthermocouplescommand%=rtemp%L..)address%=IFORi%=0TO14positions%(i%)i%NEXTi%positions%(15)=-1CALLoptoFORi%=OTO14value(address%,i%)info%(i%)/16NEXTi%Readgasanalysersignalscommand%=ranin%address%3FORi%=0TO5positions%(i%)=i%NEXTi%positions%(6)=-1CALLoptothe-.025isanoffsetfortheportableo2analyservalue(address%, 0)=(info%(0)/4095-.025)*rangovalue(address%,1)=info%(1)/4095*5*rangcovalue(address%, 2)=info%(2) /4095*5*rangcvalue(address%,3)=info%(3)/4095*5*rangchvalue(address%, 4)=info%(4) /4095*rangnovahie(address%,5)=info%(5)/ 4095*rangsoReadtheoutputsignaltothecontrolvalvescommand%=ranout%address%=3FORi%=0T04positions%(i%)=i%+11NEXTi%positions%(5)=-1CALLoptoFORi%=11T015value(address%, i%)=(info%(i%)/4095*16)+4NEXTi%Checkifaveragmgisfinishedonboard#1command%=racb%address%=I36 CALLoptoIFinfo%(15)=0THENGOTO36Readaveragedinput fromboard#1coxmnand%=ravin%address%=Ipositions%(0)=15positions%(1)=-1CALLoptovalue(address%,15)(info%(15)/4095*10)‘Checkifaveragingisfinishedonboard#2command%=racb%address%=237 CALLoptoCFORi%=OTO15IFinfo%(i%)=0THENGOTO37NEXTi%Readaveragedinputsfromboard#2command%=ravin%address%2FORi%=0T015pOsitiOflS%(i%)=i%NEXTi%CALLoptoFORi%=OTO15value(address%,i%)=(info%(i%)/4095*10)NEXTi%Checkifaveragingisfmishedonboard#3conunand%=racb%address%338 CALLoptoFORi%=6TO8IFinfo%(i%)‘0THENGOTO38NEXTi%Readaveragedinputsfromboard#3command%=ravin%address%=3FORi%=0TO2positions%(i%)=i%+6NEXTi%positions%(3)=-1CALLoptoFORi%=6TO8value(address%,i%)=(info%(i%)/4095*10)NEXTi%Offsetsforprimaiyairflowvalue(2,13)=va1ue(2,13)+offer(2,13)value(3,6)=value(3,6)+offer(3,6)value(2,14)=value(2,14)+offer(2,14)value(3,7)value(3,7)+offer(3,7)LOCATE21,10:PRINTvalue(3,6)LOCATE21,20:PRINTvalue(2,13)Calculatestandpipepressure(inkpa)value(i,15)=((value(1,15)-1)-2.5)*101.325/14.696FORi%=0TOSvalue(2,i%)=((value(2,i%)-1)-2.5)*101.325/14.696NEXTi%Calculaterisersolidsloadingvalue(2,6)=(value(2,6)-1)*70.35*3937/9/5value(2,7)=(value(2, 7)-1)*70.35*393.7/30/5value(2,8)=(value(2, 8)-i)*70.35*393.7/42/5value(2,9)=((value(2,9)-1)*2-5)*2.54*393.7/48value(2,10)=(value(2,10)-1)*101.325value(2,i1)((value(2,11)_1)*2_5)*2.54*393.7/48value(2,12)=((value(2,12)-1)*2-5)*2.54*393.7148value(2,10)=gami*value(2,10) +(1-gami)*loadoloado=value(2,10)CaluclatemassflowratesofairIFvalue(3,6)<1THENvalue(3,6)=1.00001IFvalue(2,13)<1THENvalue(2,13)=IIFvalue(3,7)<=ITHENvalue(3,7)=1.00001IFvalue(2,14)<ITHENvalue(2,14)1p1((value(3,6)-l)*101.325/14.696*1000)+101325p2pl_(value(2,13)_1)*2*2.54/l00*9.81*998dor=dorprimdpip=dpipprimpair=orifice(dor,dpip,p1,p2)*3600p1((value(3,7)-1)*101.325/14.696*1000)+101325p2=pl_(value(2,14)_l)*2*2.54/100*9.81998dor=dorsecdpip=dpipsecsair=oriflce(dor,dpip,p1,p2)*3600calculateaverageoutlet watertemperaturecoafrat =(coalo-coal)*3600I(tsamp%*5)two=0PRINT“help”xx%=0limerat=(limeo-lime)*3600/tsamp%FORi%ITO3‘PRINT“help”IFtube%(i%)“1THENcoalo=coaltwo=two+value(l,10+i%)Iimeo=limexx%”,oc%+1ENDIFENDIFNEXTi%IFxx%=0THENtwo=0change%=1ELSEitstnie%=0two=two/xx%ppmco=value(3,1)ENDIFCHAIN“c:opto’,qb\progs\t2”two=twof*.9+.1*twoENDIFtwof=two‘calculateriservelocityveloc=8.31434*(value(1,1)+273)*(pair+sair÷37)/28.82/3600/(.1524)AENDSUB2/100SUBhelloCheckifshouldsavedatatodiskSHAREDrtm$,cont%IFsaver%=ITHENCALLsaveit‘Print programheaderCLSCheckifcontrollingriservelocity‘COLOR14,0PRINT”WelcometotheCONTROLprogram”CheckhowtodisplayresultstoscreenPRINT”fortheCFBCOMBUSTOR”IFgout%=1THENCALLnumdispPRINTPRINTPRINTtempi=value(1,I)ppfl.JJoxyg=value(3,5)PRINT‘withthecommentsbelowthegpccontrollerisshutoffpennanentlyPRINT“Theoptomuxboardsareallsettogo”IFitstme%=1THENPRINTPRINTccount%=ccount%+ICOLOR4,0IFccount%5THENPRINT“AREYOUSUREYOUHAVESTOREDTHEPREVIOUSLYLOGGEDccount%=0FILES????”PRINT“help”PRINT””PRINT””INPUT“type‘YES’ tocontinue“,doneSIFdone$“YES”THENSTOPOpenoutputfilesOPEN“0”,#1,“c:\opto\qb\progs\data\ternp.out”OPEN“o”,#2,“c:\opto\qb\progs\data\flow.out”OPEN“o”,#3,“c:\opto\qb\progs\data\comp.out”OPEN“o”,#4,“c:\opto\qb\progs\data\load.out”OPEN“o”,#5,“c:\opto\qb\progs\data\stan.out”OPEN“o”,#6,“c:\opto\qb\progs\data\setp.out”OPEN“o”,#7,“c:\opto\qb\progs\data\vars.out”OPEN“o”,#8,“c:\optoqb\progs\data\pid.out”OPEN“o”,#10,“c:\opto\.qb\progs\data\other.out”OPEN“o”,#11,“c:\optoqb\progs\data\o2con.out”OPEN“0”,#12,“c:\opto’qb\progs\data\twocon.out”OPEN“o”,#13,“c:\optoqb\progs\datateinpcon.out”OPEN“o”,#14,“c:opto’qbprogs\data.adapt.out”‘COLOR15,0PRINTPRINTPRINT“Output filesarenowopen”Openrs232cornportforconununicationwithloadcellsOPEN“comi :9600,n,8,l,cs,ds”FORRANDOMAS9ControlledoruncontrolledloggingPRINTPRINTPRINTPRINTPRINT13 INPUT“Input(1)foraircontrolor(0)fornocontrol“,cont%IFcont%<0ANDcont%>ITHENGOTO13WritestartingtimetofilesWRITE#1,TIMES‘WRITE#1“samtime”“VALUE(10)”“VALUE(II)”“V.ALUE(l2)”“VALUE(l,3)”,“VALUE(l,4)”,“V.ALUE(l,5)”,“VALUE(1, 6)”,“VALUE(l,7)”“VALUE(18)”“VALUE(1, 9)”,“VALUE(1,10)”“VALUE(111)”,“VALUE(I,12)”,“VALUE(1,13)”,“VALUE(i,14)”WRITE#2, TIMES.NrRr.rE#2,“saintinie”,“pair”, “sair”,“lair”,“coal”,“iliac”,“VA.LUE(3,11)”,“VALUE(3,12)”,“VALUE(3,13)”,“VALUE(3,14)”,“VALUE(3, 15)”WRITE#3, TIME$WRITE#3“samtime”“VALUE(30)”“VALUE(3,1)”“VALUE(3, 2)”“VALUE(3, 3)”, “VALUE(3, 4)”,“VALUE(3, 5)”WRITE#4, TIMESWRiTE#4“samtime”“VALUE(2, 6)”“VALUE(27)”“VALUE(28)”“VALUE(2, 9)”,“VALUE(2,10)”,“VALUE(2,11)”,“VALUE(2,12)”WRITE#5, TIMESWRiTE#5“samtime”“VALUE(115)”,“VALUE(2, 0)”“VALUE(21)”“VALUE(2, 2)”,“VALUE(2, 3)”,“VALUE(2, 4)”,“VALUE(2, 5)”WRiTE#6, TIMESVRITE#6,“sarntirne”, “setpnt(l)”,“setpnt(2)”,“arat”,“risvel”,“sp(l)”,“sp(2)”,“sp(3)”,“sp(4)”,“sp(5)”,“aclapt%”,“warmup%”,“nu%”,“lam(1,1)”WRITE#7, TIMESWRITE#7,“sarntime”,“a(1,1)”, “a(2,1)”,“a(3,1)”,“b(0,1,1)”, “b(1,1,1)”,“b(2,1,1)”,“b(3,1,1)”WRITE#8, TIMESWRiTE#8,“saintiine”, “ki”,“tauil”,“taudi”,“tauiw”,“kox”,“tauio”,“taudo”WRITE#10,TIMESW’Rl’TE#10,“saintirne”,“tubel“,“tube2”,“tube3”,“two”,“veloc”,“oxy%”,“1vater°/’o”,“Oxysp”,tV0SpWRE#11,TIMESWRiTE#11,“samtirne”,%o2n,“o2sp”, “o2con”,“tairi”VR1TE#12,TUvIESWRITE#12,“sarntime”,“two”,“twosp”, “twocon”,“rhoave”,“rhohx”WRITE#13,TIMESVRJTE#13,“samtiiue”,“L—12”,“tsp”,“gpccon”,“coal”WRITE#14,TIMESWRITE#14,“saintime”,“adapt”,“al”,“a2”,“a3”, “bO”,“bi”,“b2”,“b3”,“ci”,“trace”,“lainrls”SCREEN0CLSENDSUBSUBinitialspSHAREDspa,stavin%, racb%, ravin%, valueO,offer()SHAREDerrors%,address%,comniand%, positions%O,modifiers%,,iflfo%()SHAREDdorprim,dpippriin,dorsec,dpipsec,ffrCLSINPUT‘primaryairsetpoint(kg/hr)”;sp(1)pair=sp(l)INPUT“secondaryairsetpoint(kg/hr)”;sp(2)sair=sp(2)INPUT“risersolidsloading(kg/m3)”;sp(3)load=sp(3)INPUT“fuelfeedrate(ma)”;sp(4)ffr=sp(4)ENDSUBSUBloadcellSHAREDcoal,limePRIN1’#9,“2”;INPU1’#9,mass$weight=VAL(lvflD$(mass$, 4,6))lime=weightPRIN1’#9,“1”;INPUT#9, mass$weight=VAL(M[1)$(mass$,5,6))coal=weightENDSUBSUBnumdispSHAREDthingy,valueO,coal,lime,pair,sair,lair,coafratSHAREDlimerat,saver%, TM$,two,oxysp,twospCLSCOLOR7,0‘LOCATE1l7PRINT“COEFFICIENTS”‘LOCATE2,15: PRINTUSING“#.##“;a(l,1)‘LOCATE3,15: PRINTUSING“#.##“;a(2,1)‘LOCATE4,15: PRINTUSING“#.##“;a(l,2)‘LOCATE5,15:PRINTUSING“#.##“;a(2,2)‘LOCATE2,20:PRINTUSING“#.##“;b(0,1,1)‘LOCATE3,20: PRINTUSING”#.##”;b(1,1,1)‘LOCATE4,20:PRINTUSING“#.##“;b(2,1,1)‘LOCATE5,20:PRINTUSING“#.##“;b(3,1,1)‘LOCATE2,25:PR.1NTUSING“#.##“;b(0,2,2)‘LOCATE3,25:PRINTUSING“#.##“;b(1,2,2)‘LOCATE4,25:PRINTUSING“#.##“;b(2,2,2)‘LOCATE5,25: PRINTUSING“#.##“;b(3,2,2)‘LOCATE6,20: PRINTUSING“#.##“;b(0,1,2)‘LOCATE7,20:PRINTUSING“#.##“;b(1,1,2)‘LOCATE8,20:PRINTUSING“#.##“;b(2,1,2)‘LOCATE9,20:PRINTUSING“#.##“;b(3,1,2)‘LOCATE6,25:PRINTUSING“#.##“;b(0,2,1)‘LOCATE7,25:PRINTUSING“#.##“;b(1,2,1)‘LOCATE8,25:PRINTUSING“#.##“;b(2,2,1)‘LOCATE9,25:PRINTUSING“#.##“;b(3,2,1)LOCATE1,22:PRINT“waterout temp”LOCATE222PRINT“tubeI”LOCATE322PRINT“tube2”LOCATE422PRINT“tube3”LOCATE229: PRINTUSING“###.#“value(111)LOCATE329PRINTUSING“####“value(112)LOCATE429PRINTUSING“###.#“value(113)LOCATE5,22:PRINT“trace”LOCATE6,22:PRINT“lamrls”LOCATE5,29:PRINTUSING“##.##“;traceLOCATE6,29: PRINTUSING“#.###“;lamrlsLOCATE2,35IFtube%(1)1THENPRINT“ON”ELSE PRiNT“OFF”ENDIFLOCATE3,35IFtube%(2)=ITHENPRINT“ON”ELSE PRINT“OFF”I.‘LOCATE12:PRINT“02”‘LOCATE22’PRINT“PAIR”‘LOCATE32PRINT“SAIR”‘LOCATE42:PRINT“LOAD”‘LOCATE52:PRINT“COAL”‘LOCATE62:PRINT“TEMP”‘LOCATE72’PRINT“P:S”‘LOCATE8,2:PRINT“VEL”‘LOCATE1,7:PRINTUSING“###.#“;setpnt(2)‘LOCATE27PRINTUSING“####“sp(1)‘LOCATE3,7:PRINTUSING“###.#“;sp(2)‘LOCATE4,7:PRINTUSING“###.#“;sp(3)‘LOCATE5,7:PRINTUSING“###.#“;sp(4)‘LOCATE6,7:PRINTUSING“###.#“;setpnt(1)‘LOCATE7,7:PRINTUSING“###.#“;arat‘LOCATE8,7:PRINTUSING“###.#“;risvel‘LOCATE92PRINT“LAMI”LOCATE9,7:PRINTUSING“###.#“lam(11)‘LOCATE10,2:PRINT“LAM2”:LOCATE10, 7:PRINTUSING“###.#“;lam(1,2) ‘LOCATE112PRINT“HORIZ”LOCATE119PRINTUSING“##“nu%‘LOCATE12,2:PRINT“AIR”‘LOCATE12,8¶IFcont%=0THENPRINT“OFF”ELSEPRINT“ON”‘ENDIF‘LOCATE13,2:PRINT“VEL”‘LOCATE13,8‘IFfly%0THENPRINT“OFF”ELSEPRINT“ON”‘ENDIF‘LOCATE14,2:PRINT“ADAPT”‘LOCATE14,8‘IFadapt%=0THENPRiNT“OFF”ELSE PRINT“ON”‘ENDIF‘LOCATE15,2:PRINT“TEMP”‘LOCATE15,8¶IFwannup%=0THENPRINT“OFF”ELSE PRINT“ON”ENDIFLOCATE11,1:PRINT“GPC”LOCATE11,6IFwarmup%=0THENPRINT“OFF”ELSE PRINT“ON”ENDIFLOCATE12,1:PRINT“TEMP”LOCATE12,10: PRINTUSING“###.#“;setpnt(1)LOCATE13,1:PRINT“ADAPT”LOCATE13,6IFadapt%=0THENPRINT“OFF”ELSE PRINT“ON”ENDIFLOCATE14,1:PRINT“HORIZ”LOCATE14,10: PRINTUSING“##“;nu%LOCATE15,1:PRINT“LAMDA”LOCATE15,10: PRINTUSING“###.#“;lam(1,1)LOCATE11:PRINT“VAR”LOCATE1,6:PRINT“CONT”ENDIFLOCATE4,35Wtube%(3)1THENPRINT“ON”ELSE PRINT“OFF”ENDIFLOCATEI12PRINT“SP”LOCATE118:PRINT“VAL”LOCATE2,1:PRINT“02”LOCATE2,6IFoxy%1THENPRINT“ON”ELSE PRINT“OFF”ENDIFLOCATE2,10:PRINTUSING“###.#“;oxyspLOCATE3,1:PRINT“AIR”LOCATE3,6IFcont%ITHENPRINT“ON”ELSE PRINT“OFF”ENDIFLOCATE4,1:PRINT“PAIR”LOCATE4,10:PRINTUSING“###.#“;sp(1)LOCATE5,1:PRiNT“SAIR”LOCATES,10:PRINTUSING“###.#“;sp(2)LOCATE6,1:PRINT”P:S”LOCATE6,10:PRINTUSING“####“;aratLOCATE7,1:PRINT“LOAD”LOCATE7,6IFcont%=1THENPRINT“ON”ELSE PRINT“OFF”ENDIFLOCATE7,10: PRINTUSING“###.#“;sp(3)LOCATE8,1:PRINT“TWO”LOCATE8,6IFwater%ITHENPRINT“ON”ELSE PRiNT“OFF”ENDIFLOCATE810:PRINTUSING“###.#“•twospLOCATE9,1:PRINT“VEL”LOCATE9,6IFfly%ITHENPRINT“ON”ELSE PRINT“OFF”ENDIFLOCATE9,10:PRINTUSING“##.##“;risvelLOCATE10,1:PRINT“COAL”LOCATE10,10: PRINTUSING“##.##“;sp(4)COLOR7,0LOCATE16,5: PRINT“TEMPERATURES”thingyvalue(1,1)CALLtcolorLOCATE175PRINT“L3”LOCATE17,10: PRINTUSING“####“value(11)LOCATE17,15: PRINT“(C)”thingy=value(1,3)CALLteolorLOCATE18,:PRINT“U”LOCATE18,10: PRiNTUSING“####“;value(1,3)LOCATE18,15:PRINT“(C)”thingy=value(1,7)CALLtcolorLOCATE19,5:PRINT“L12”LOCATE19,10: PRINTUSING“####“;value(1,7)LOCATE19,15: PRINT“(C)”thingyvalue(1,14)CALLtcolorLOCATE20,5:PRINT“RS”LOCATE20,10:PRINTUSING“####“;value(1,14)LOCATE20,15: PRINT“(C)”COLOR7,0‘LOCATE1,40:PRINT“L-VALVEDELTAP”COLOR9,0‘LOCATE2,40:PRINT“DPLI”‘LOCATE2,45: PRINTUSING“####“;value(1,15)‘LOCATE250PRINT“(KPA)”‘LOCATE3,40:PRINT“DPL2”‘LOCATE3,45:PR1WI’USING“####“;value(2,0)‘LOCATE3,50: PRINT“(KPA)”‘LOCATE4,40:PRINT“DPL3”‘LOCATE4,45:PRINTUSING“####“;value(2,1)‘LOCATE450:PRINT“(KPA)”‘LOCATE5,40:PRINT“DPL4”‘LOCATE5,45:PRINTUSING“####“;value(2,2)‘LOCATES50:PRINT“(KPA)”‘LOCATE6,40:PRINT“DPLS”‘LOCATE6,45:PRINTUSING“####“;value(2,3)‘LOCATE650:PRINT“(KPA)”‘LOCATE7,40:PRINT“DPL6”‘LOCATE7,45:PRINTUSING“####“;value(2,4)‘LOCATE7,50:PRINT“(KPA)”‘LOCATE8,40:PRINT“DPL7”‘LOCATE8,45:PRINTUSING“####“;vahie(2,5)‘LOCATE8SO’PRINT“(KPAY’LOCATE140:PRINT“COEFICIENTS”LOCATE240:PRINT“Al”LOCATE340PRINT“A2”LOCATE440PRINT“A3”LOCATES40:PRINT“BO”LOCATE640:PRINT”Bl”LOCATE740:PRINT“B2”LOCATE840:PRINT“B3”LOCATE245:PRINTUSING“##.###“a(lI)LOCATE345:PRIN1’USING“##.###“a(2I)LOCATE445:PRINTUSING“##.###“a(3,I)LOCATE545:PRINTUSING“##.###“b(011)LOCATE6,45:PRINTUSING“##.##ll”;b(I,1,1)LOCATE7,45:PRINTUSING“##.###“;b(2,1,1)LOCATE8,45:PRINTUSING“##.###“;b(3,1,1)COLOR7,0LOCATE1,62:PRINT“RISERLOADING”COLOR12,0LOCATE260:PRINT“dPi”LOCATE265:PRINTUSING“####“value(26)LOCATE270PRINT“(KG/M3)”LOCATE3,60:PRINT“dP2”LOCATE3,65:PRINTUSING“##fl#”;value(2,7)LOCATE370:PRINT“(KGIM3)”LOCATE4,60:PRINT“dP3”LOCATE4,65:PRINTUSING“####“;value(2,8)LOCATE4,70:PRINT“(KGIM3)”LOCATE5,60:PRINT“dP4”LOCATE5,65: PRINTUSING“####“;value(2,9)LOCATE570:PRINT“(KG/M3)”LOCATE6,60:PRINT“dPS”LOCATE6,65:PRINTUSING“####“;value(2,10)LOCATE670:PRINT“(KG/M3)”LOCATE7,60:PRINT“dP6”LOCATE7,65:PRINTUSING“####“;value(2,11)LOCATE770:PRINT“(KGIM3)”LOCATE8,60:PRINT“dP7”LOCATE8,65: PRINTUSING“####“;vahie(2,12)LOCATE8,70:PRINT“(KG!M3)”COLOR7,0LOCATE10,25:PRINT“FEEDRATES”COLOR13,0LOCATE11,20:PRINT“COAL”LOCATE11,30:PRINTUSING“###.#“;coalLOCATE11,36:PRINT“(KG)”LOCATE12,20:PRINT“LIME”LOCATE12, 30:PRINTUSING“###.#“;limeLOCATE12,36:PRINT“(KG)”LOCATE13,20:PRINT“PRIM.AJR”LOCATE13, 30:PRINTUSING“###.#“;pairLOCATE1336’PRINT“(KG/HR)”LOCATE1420’PRINT“SEC.AIR”LOCATE1430:PRINTUSING“###.#“sairLOCATE14,36’PRINT“(KG!HR)”LOCATE1520:PRINT“L-V.AIR”LOCATE15,30:PRINTUSING“###.#“;lairLOCATE1536: PRINT“(L/MIN)”LOCATE1720:PRINT“COAL”LOCATE17, 30:PRINTUSING“###.#“coalratLOCATE17, 36:PRINT“(KGIHR)”LOCATE1820’PRINT“k4”LOCATE19,20:PRINT“taui4”LOCATE20,20:PRINT“taud4”LOCATE1827:PRINTUSING“###.##“k4LOCATE19,27:PRINTUSING“###.##“;taui4LOCATE20, 27:PRINTUSING“#####“;taud4LOCATE21,27:PRINTpidt%COLOR7,0LOCATE10,44:PRINT“VALVES(MA)”COLOR10,0LOCATE11,45:PRINT“COAL”LOCATE11,50:PRINTUSING“##.##“;value(3,14)LOCATE12,45:PRINT“LIME”LOCATE12, 50:PRINTUSING“##.##“;value(3,15)LOCATE13, 45:PRINT“PAIR”LOCATE13,50:PRINTUSING“##.##“;value(3,11)LOCATE14,45:PRINT“SAIR”LOCATE14, 50:PRINTUSING“##.##“;value(3,12)LOCATE15, 45:PRINT“LAIR”LOCATE15,50:PRINTUSING“##.##“;value(3,13)LOCATE16,45:PRINT“ki”: LOCATE16, 50:PRINTUSING“##.##“;kiLOCATE17,45:PRINT“til”:LOCATE17, 50:PRINTUSING“##.##“;tauilLOCATE1845PRINT“td1”LOCATE1850PRINTUSING“###“taudiLOCATE1945:PRINT“kw”:LOCATE1950:PRINTUSING“##.##“•kwLOCATE2045PRINT“tiw”LOCATE2050PRINTUSING“####“tauiwLOCATE2145PRINT“tdw”LOCATE2150PRINTUSING“####“taudwLOCATE19, 60:PRINT“kox”:LOCATE19, 65:PRINTUSING“####“;koxLOCATE20,60:PRiNT“tio”:LOCATE20,65:PRINTUSING“##.##“;tauioLOCATE21,60:PRINT“tdo”:LOCATE21,65:PRINTUSING“##.##“;taudoCOLOR7,0LOCATE10, 63:PRINT“FLUEGAS”COLOR2,0LOCATE1160PRINT“02”LOCATE1165PRINTUSING“####“value(30)LOCATE1171:PRINT“%“LOCATE12,60:PRINT“CO’LOCATE12, 65:PRiNTUSING“#####“;value(3,1)LOCATE12,71:PRINT“PPM”LOCATE13, 60:PRINT“C02”LOCATE13,65:PRINTUSING“###.#“;value(3,2)IOCATF137IPRINT”%”LOCATE1460PRINT“CH4”LOCATE1465:PRINTUSING“####“value(33)LOCATE1471PRINT“%“LOCATE15,60:PRINT“NOX”LOCATE1565PRINTUSING“#####“value(34)LOCATE1571PRINT“PPM”LOCATE16,60:PRINT“S02”LOCATE16, 65:PRINTUSING“###.#“;value(3,5)LOCATE16,71:PRINT“PPM”COLOR7,0LOCATE22,38:PRINT“SAMPLETIME....”,TM$LOCATE23,38IFsaver%=0THENPRINT“FILESTATUS=WAIliNG”IFsaver%=ITHENCOLOR4,0:PRINT“FILESTATUS=SAVING”ENDIFCOLOR7,0ENDSUBSUBoptosubroutinetocalloptomuxdriver(optoware)SHAREDerrors%, address%,command%, positions%(), modifiers%,info%()CALLOPTOWARE(errors%,address%,conunand%, VARPTR(positions%(0)),VARPTR(modifiers%(0)), VARPTR(info%(0)))checkforenorsIFefrors%<0THENCALLermsgENDSUBFUNCTIONorifice(dor, dpip,p1,p2)SHAREDcp,cv=0BETA=dor/dpipIFBETA<.5THENko=.6004+.35*BETAA4O52*(5BETA)A(3/2)IFBETA>.7THENko’.6004+.35*BETA4+.62*(BETA..7)A(5/3)IF(BETA>.5ANDBETA<=.7)THENko=.6004+.35*BETA“4b=(.002+.026*BETA4)*koXE=(pl-p2)/piy=cp/cvSMALL=0BIG=1M=.5Yl=1-(.41+.35*BETAA4)*3l/yROl=pl*29!/831434/29315F=3.14159/4*dor*dor*Y1*(2*RO1*(p1_p2))(1/2)23 value=MA(3/2)_F*ko*MA(1/2)-1000*F*b*ko*(3.14159/4*fJ*dpjp/10000)A(1/2)N%=N%+1IFvalue<0THENSMALL=MIFvalue>0THENBIG=MIF(BIG-SMALL)<.000001THENGOTO55M=(BIG+SMALL)/2GOTO2355 orifice=MENDFUNCTIONSUBpowerupSHAREDpupclr%,resset%,conout%,probtp%,setofl%SHAREDerrors%,address%,conunand%, positions%i,modifiers%(),info%()SHAREDoffset%()Powerupclearoptomuxconunand%pupclr%FORaddress%=ITO3CALLoptoNEXTaddress%Resetmodulescomtnand%=resset%FORaddress%=1TO3CALLoptoNEXTaddress%Configureoutputmodulescommand%=conout%address%=3FORi%=0TO4positions%(i%)=i%+11NEXTi%positions%(5)=-1CALLoptoSettemperatureprobetype(k-type)cominand%=probtp%address%=IFORi%=0TO14positions%(i%)=i%NEXTi%positions%(15)=-1info%(0)5CALLoptoSet offsetsforinputmodulescommand%=setofl%address%=IFORi%=0TO15po5itloflS%(j%)=i%info%(i%)=offset%(address%,i%)NEXTi%CALLoptoaddress%=2FORi%=0TO15posjtions%(i%)=i%info%(i%)=offset%(address%,i%)NEXTi%CALLoptoaddress%3FORi%=0TO8positions%(i%)=i%info%(i%)=offset%(address%,i%)NEXTi%positions%(9)=-1CALLoptoENDSUBSUBsaveitSHAREDvalue(),samtime,pair,sair,lair,coal,lime,two,velocWRiTE#13,samtime/60,value(1,1),setpnt(1),warmup%, ma(4)SUBROUTINETOWRITEDATATOFILESWRITE#14,samtinie/60,adapt%, a(1,I),a(2,1), a(3,1),b(0,1,1),b(1,1,1),b(2,1,1),b(3,1,1),cc(1),cc(2),cc(3),cc(4),trace,lamrlsWRiTETEMPERATURESWRiTE#1,samtime,value(1,0),value(l,1),value(1, 2),value(I,3),value(1,4),ENDSUBvalue(1,5),value(1,6),value(1,7),value(1,8),value(1,9),value(1,10),value(1,11),value(1,12),value(1,13),value(1,14)FUNCTIONsecondsSHAREDTM$WRiTEAIRFLOWSANDCONTh.OLVALVEPOSITIONSWRITE#2,samtime,pair,sair,lair,coal,lime,value(3,11),value(3,12),value(3,TM$=TIMES13),value(3,14),value(3,15)seconds=VAL(MID$(TM$,1,2))*3600+VAL(MID$(TM$,4,2))*60+VAL(MID$(TM$,7,2))WRITEGASANALYSISWRITE#3,samtime,value(3,0),value(3,1),value(3, 2),value(3,3),value(3,4),ENDFUNCTIONvalue(3,5)SUBtcolorWRITERISERSOLIDSLOADINGS‘SHAREDthingyWRiTE#4,samtime,value(2,6),value(2,7),value(2,8), value(2,9),value(2,10),value(2,II),value(2,12)‘SUBROUTINETODETERMINEDISPLAYCOLORFORTEMPERATURE‘IFthingy<800THENWRITESTANDPIPEPRESSUREDROPS‘COLOR1,0WRITE#5,samtime,value(l,15),value(2,0),value(2,I),value(2,2),value(2,3),‘ELSEIFthingy>950THENvalue(2,4),value(2,5)‘COLOR4,0‘ELSEiteset-pointsCOLOR7,0WRiTE#6,samtime,setpnt(1),setpnt(2),arat,risvel,sp(1),sp(2),sp(3),sp(4),‘ENDIFsp(5),adapt%,warmup%,nu%,lam(1,1)ENDSUBwritecoefficients‘1VR1TE#7,samtirne,a(1,1), a(2,1),a(3,1),b(0,1,1), b(1,1,1),b(2,1,1), b(3,1,1) writepidcontrollconfigurationsWRITE#8,samtime,kl,tauil,taudi,kw,tauiw,taudw, kox,tauio,taudowriteextrastufffortwoandoxygencontrolWRfl’E#10,samtime,tube%(I),tube%(2),tube%(3),two,veloc,oxy%,water%,oxysp,twospWRITE#11,samtime/ 60,value(3,0),oxysp,oxy%,sp(1)+sp(2)+35WRITE#12,samtime/60,two,twosp,water%,value(2,10),value(2,11)T2programtoperformGPCcalculationsforcombustiontemperaturecontrolSSTATICSINCLUDE:‘c:opto\qb\progs\’DECLARESUBmattran(n%, m%,aay(),bbxO)DECLARESUBmatmult (n%,m%,o%,aay(), bbxo,cO)DECLARESUBMATADD(n%,m%,aayO, bbxO, cO)DECLARESUBMATINVRS(n%,aay,bbxO)DECLARESUBmatsub(n%, m%,aay,bbxO, cO)‘$DYNAMICDIMgamma(0TO3,0TO20)DIMgp(0TO20)DIMaay(1TO30,1TO30)DIMbbx(1TO30,1TO30)DIMc(1TO2O,ITO3O)DIMe(0TO16,ITO16, 2)DIMF(0TO3,1TO16,2)DllvIg(OTO18,ITO16,1T02,IT02)DIMgin(1TO30,1TO20)DIMid(1TO20,1TO20)DIMw(0TO20,1TO1)DIMspcc(1TO2)D1M1f1T030,1)DIMholda(1TO30,1TO30)DIMholdb(1TO20,1TO30)DIMholdc(lTO20,1TO30)DIMholdd(ITO20,1TO30)DIMholde(1TO20,1TO30)DIMhoidgiTO20,1TO30)DIMgt(ITO20,1TO30)nc%15numout%=2nuxnin%2FORi%=1TO20FORj%=ITO2OIFi%=j%THENid(i%, j%)=IELSE id(i%,j%)=0ENDIFNEXTj%NEXTi%IFtimes%=ITHENGOTO675initial=Inu%=1alph(1)=0alph(2)=0FORi%=1TO20FORj%=ITO2laxn(i%, j%)=0NEXTj%NEXTi%FORi%=1TO20lam(i%, 2)=9.999999999999999D+32EKri%FORi%=-5TOOFORj%=IT02y(i%,j%)=0u(i%,j%)=ONEXTJ%NEXTi%cc(1)=-1.6cc(2)=.64cc(3)0cc(4)=0a(1,1)-.5908a(2,1)=0a(1,2)=0a(2,2)0b(0,1,1)=3‘b(O,1,1)=4b(1,1,1)=12.6b(2,I,1)=0b(3,1,1)=0b(0,1,2)=0b(1,1,2)=0b(2,1,2)=0b(3,1,2)0b(0,2,1)=0b(1,2,1)0b(2,2,1)=0b(3,2,1)=0b(0,2,2)=0b(1,2,2)=0b(2,2,2)=0b(3,2,2)=0FORlo%=1TO2FORi%1TO10FORj%ITO10IFi%=j%THENp(i%,j%,lo%)=initialELSE p(i%, j%,lo%)=0ENDIFNEXTj%NEXTi%NEXTlo%times%=I675y(O,1)=templut-1,1)=u(-1,1)-cc(1)*ufl-2,1)-cc(2)*ug-3,1)*)*(4)*uf(-5,1)duf(-1,1)=u(-1,1)-u(-2,1)-cc(l)*duf-2,I)-cc(2)*dufi-3,1)-cc(3)*duf4,1)-cc(4)*dufl-5,1)dy10,1)=y(0,1)-y(-I,1)-cc(1)*dyt-l,I)-cc(2)*dyfi-2,1)-cc(3)*dyf-3,1).cc(4)*dyg4,1)spcc(1)=setpnt(1)IFadapt%=0THENGOTO678PERFORMRLSWITHVARIABLEFORGETI1NGFACTOTTOFITCONSTANTSGOSUB8100678IFrmup%=0THENGOTO689IFnu%>5THENnu%5Ii%=Ilo%=1e(0,I,lo%)1F(0,1,lo%)1-a(1,lo%)+cc(1)F(l,1,10%)=a(1,lo%)-a(2,lo%)+cc(2)F(2,1,10%)=a(2,lo%)-a(3,lo%)+cc(3)F(3,I,lo%)=a(3,lo%)+cc(4)FORj%ITOnc%F(0,j%+1,lo%)F(1,j%,lo%)_(a(1,lo%)_1)*F(0,j%,lo%)F(1,j%+1,Io%)=F(2,j%, lo%)-(a(2,lo%)-a(I,lo%))*F(0,j%,lo%)F(2,j%+1,lo%)=F(3,j%,lo%)-(a(3,lo%)-a(2,lo%))*F(0,j%,lo%)F(3,j%+1,lo%)=a(3,lo%)*F(0,j%,lo%)FORi%=OTOj%-Ie(i%,j%+1,lo%)=e(i%, j%,Io%)NEXTi%e(j%,j%+1,lo%)=F(0,j%, Io%)NEXTj%‘NEXTlo%4,1)‘FORlo%=1TOnumont%FORli%=ITOnunthi%FORi%=0TO3g(i%,1,lo%,li%)=b(i%,lo%, li%)NEXTi%NEXTli%FORj%ITOnc%FOR1i%lTOnwnin%FORk%=OTOj%+3g(k%,j%+1,Io%,li%)0NEXTk%FORi%=0TOj%FORk%=0TO3g(i%+k%,j%+1,lo%,li%)=g(i%+k%,j%+I,lo%,li%)+e(i%,j%+1,lo%)*b(k%,lo%, li%)NEXTk%NEXTi%NEXTli%NEXTj%‘NEXTlo%FORi%=0TO3gamma(i%,0)0gp(0)=0NEXTi%FORj%=0TOnc%gp(j%+1)=(e(j%,j%+I,I)b(0,1,1)+ganima(0,j%))gamma(0,j%+1)=ganuna(1,j%)+e(j%,j%+1,1)*b(1,1,1)cc(1)*gp(j%+I)gamina(1,j%+1)ganima(2,j%)+e(j%,j%+1,1)*b(2,1,1)-cc(2)*gp(j%+1)gamma(2,j%+1)gatnma(3,j%)+e(j%,j%+1,1)*b(3,I,1)_cc(3)*gp(j%+1)ganuna(3,j%+I)=cc(4)*gp(j%+I)NEXTj%FORi%=1TOnc%FORj%1TOnc%IFj%>i%THENgm(i%,j%)=0ELSE gin(i%,j%)=gp(i%-j%)ENDIFNEXTj%NEXTi%FORi%1TOnc%id(i%,i%)=id(i%,i%)*lani(i%,I)NEXTi%CALLmattran(nc%,nu%,ginO, holda3)CALLmatmult(nu%,nc%, nu%,ho1da,gins,ho1db)CALLMATADD(nu%,nu%,ho1db(), ide),ho1de)CALLMATINVRS(nu%, holdeO,ho1dc)CALLmatmult(nu%,nu%, nc%,ho1dc,holdaO,gtQ)FORi%=1TO20FORj%=1T020IFi%=j%THENid(i%,j%)=IELSE id(i%,j%)=OENDIFNEXTj%NEXTi%w(0,I)=y(0,1)FORi%=1TOnc%w(i%,1)alph(I)*w(i%-1,I)+(1-alph(1))*spcc(1)NEXTi%FORi%=1TOnc%lfl:i%,1)=F(0,1%,1)*y±10,I)+F(1,i%,1)*yf(—1,)+F(2,i%,I)*y11—2,1)+F(3,j%,I)*yf(..3,1)lli%,1)=1fli%,l)+gamma(0,i%)*(uf(-1,1)-ul-2,1))+ganuna(1,i%)*(ufi-2,1)-uft-3,I))+gamma(2,i%)*(uf-3,I)-uf-4,1))+gamma(3,i%)*(ufi-4,1)-u-5,I))NEXTi%CALLmatsub(nc%,1,w,1fl),ho1da)CALLmatmult(nu%,nc%,I,gte,ho1da,ho1db)u(0,i)=u(-i,1)+holdb(1,1)‘u(0,2)=u(-1,2)+holdb(nu%+1,1)TFu(0,1)>16THENu(0,1)=16‘ENDIFTFu(0,1)<4THENu(0,1)=4‘ENDIFIFu(0,1)>6.8THENu(0,1)=6.8ENDIFIFu(0,1)<-5.2THENu(0,1)=-5.2ENDIF‘IFu(0,2)>250THENu(0,2)=250‘ENDW‘IFu(0,2)<150THENu(0,2)=150‘ENDIF689IFwarmup%=0THENu(0,i)=sp(4)u(0,1)=sp(4)-9.2u(0,2)=tairiELSE sp(4)=u(0,1)sp(4)u(0,1)+9.2tairiu(0,2)ENDIFi%=IFORj%=-5TO-iy(j%,i%)=y(j%+1,i%)u(j%,i%)u(j%+1,i%)ytTj%,i%)=yffj%+1,1%)ufrj%,i%)=ufrj%+I,i%)dyitj%,i%)=dyffj%+1,i%)dufij%, i%)duf(j%÷1,i%)NEXTj%change%=ICHAIN“c:\opto\qbprogst1”RETURN8100 SUBROUTINETOPERFORMVARIABLEFORGETtINGFACTORRLSlo%=1fi(i)-dyt-1,i)fi(2)=-dyt{-2,1)fi(3)=-dyf(-3,1)fi(4)=duf-1,1)fl(S)=duf-2,1)fi(6)=duf-3,1)fi(7)=duf-4,1)theta(1)=a(1,lo%)theta(2)=a(2,lo%)theta(3)=a(3,io%)theta(4)=b(0,lo%,1)theta(5)b(1,lo%,1)theta(6)=b(2,lo%,1)theta(7)=b(3,lo%,1)errer0FORi%=iTO10elTer =eier÷fi(i%)*theta(i%)NEXTi%errer=dyf(0,I)-errerFORi%=IT010FORj%=1T010pt(i%, j%)=p(i%, j%, lo%)NEXTj%NEXTi%FORi%=ITOlOFORj%=1TOlOholda(i%, j%) =0NEXTj%NEXTi%FORi%=ITO10holda(i%,I)=fi(i%)NEXTi%CALLmattran(10,10,holda(),ho1db)CALLmatmult(I0,10,10, ho1db,ptO, holdcO)valuel0FORi%=ITO10valuel=valuel+holdc(1,i%)*fi(i%)NEXTi%lamrls=I-errer2/ (1000*(I+valuel))IFlamrls<.9THEN1amr1s’.9CALLmatmult(10,10,10,pta,ho1da,hoiddO)FORi%ITOIOk(i%)=holdd(i%,1)!(1+value 1)NEXTi%FORi%ITO10theta(i%)=theta(i%)+k(i%)*errerNEXTi%FORi%=ITO10FORj%=ITOlOholde(i%,j%) =0NEXTj%NEXTi%FORi%=ITO10holde(i%,I)=k(i%)NEXTi%CALLmafmult(10,10,10,holde,holdcO, holdiX))CALLmatsub(10,10, pt,,holdfi),‘c1s)IF1s(1,I)/lamrls<‘ITI-lENFOR1%=1TO10FORj%=ITOlOpt(i%, j%) =wrls(i%, j%) IlaxnrlsNEXTj%NEXTi%ELSE FORi%=ITO10FORj%=ITO10pt(i%,j%) =wrls(i%, j%)NEXTj%NEXTi%ENDIFtrace0FORi%=ITOlOFORj%=ITOlOp(i%,j%,lo%)=pt(i%, j%)IFj%=j%THENtrace=trace+p(i%,j%, lo%)ENDIFNEXTj%NEXTi%a(1,lo%)=theta(I)a(2,lo%)=theta(2)a(3,lo%)=theta(3)b(0,lo%,I)=theta(4)b(1,lo%,I)=theta(5)b(2,lo%,1)=theta(6)b(3,lo%,1)=theta(7)‘NEXTlo%RETURNREM$STATICSUBMATADD(n%,m%,aayO, bbxO,cO)SUBROUTINETOADDTWOMATRICIESN=#ROWSM=#COLUMNSA=F]RSTMATRIXB=SECONDMATRIXC=RESULTANTMATRIXFORi%=1TOn%FORj%1TOm%c(i%, j%)aay(i%, j%)+bbx(i%,j%)NEXTj%NEXTi%SUBROUTINETOTAKETHEINVERSEOFAMATRIX(MUSTBESQUARE)N=#ROWS=#COLUMNSA=INPUTMATRIXB=INVERSEOFMATRIXADIMid(1TO16,1TO16)SETUPIDENTITYMATRIXFORi%=1TOn%FORj%=1TOn%IFi%=j%THENbbx(i%, j%) =Ibbx(i%, j%)=0ENDIFNEXTj%NEXTi%PUTAINTOANOTHERMATRIXTOSAVEAASifISFORi%=1TOn%FORj%=ITOn%id(i%, j%)=aay(i%, j%)NEXTj%NEXT1%GAUSS-JORDANELIMINATIONTOTURNIDINTOIDENTITYMATRIXRESULTINBISTHEINVERSEFORi%=1TOn%IFid(i%, i%)=0THENFORj%=i%+ITOn%IFid(j%,i%)cOTHENFORk%=1TOn%HOLD=id(i%, k%)id(i%, k%)=id(j%, k%)id(j%, k%)=HOLDHOLDbbx(i%, k%)bbx(i%, k%)=bbx(j%, k%)bbx(j%, k%)=HOLDNEXTk%GOTO10(1ELSEENDSUBSUBMATINVRS(n%, aay,bbxO)10 66ENDIFIFj%=n%THENPRINT“CANNOTTAKEINVERSEOFMATRIX”STOPENDIFNEXTj%ENDIFHOLD=id(i%,i%)FORj%ITOn%id(i%,j%)=id(i%,j%)IHOLDbbx(i%,j%)bbx(i%,j%)IHOLDNEXTj%FORj%ITOn%IFj%=i%THENGOTO66HOLD=id(j%,i%)/id(i%,i%)FORk%=1TOn%id(j%, k%)=id(j%, k%)-HOLD*id(i%, k%)bbx(j%,k%)=bbx(j%,k%)-HOLD*bbx(i%, k%)NEXTk%NEXTj%NEXTi%ENDSUBSUBmatmult(n%,m%,o%,aayO,bbxQ,cO)SUBROUTINETOMULTIPLYTWOMATRICIESN=IIROWSOFMATRIXAM=#COLUMNSOFMATRIXAO=#ROWSOFMATRIXB(ITHINKITSCOLUMNS)A=FIRSTMATRIXB=SECONDMATRIXC=RESULTANTMATRIXIFn%>m%THENBIG%=ELSEBIG%=m%ENDIFFORi%=ITO10FORj%=1T030c(i%,j%)=0NEXTj%NEXTi%FORk%=ITOn%FORi%=ITOo%FORj%=ITOm%c(k%, i%)=c(k%,i%)+aay(k%, j%)*bbx(j%, i%)NEXTj%NEXTi%NEXTk%ENDSUBSUBmatsub(n%, m%,aay(), bbxO,c)SUBROUTINETOSUBTRACTTWOMATRICIESN=#ROWSM=#COLUMNSA=FIRSTMATRIXB=SECONDMATRIXC=RESULTANTMATRIXFORi%=1TOn%FORj%1TOm%c(i%, j%)=aay(i%, j%)-bbx(i%, j%)NEXTj%NEXTi%ENDSUBSUBmattran(n%,m%,aayO, bbxO)SUBROUTINETOTAKETHETRANSPOSEOFAMATRIXN=#ROWSOFAM=#COLUMNSOFAA=INPUTMATRIXIB=TRANSPOSEOFAFORi%=1TOn%FORj%=ITOm%bbx(j%,i%)=aay(i%,j%)NEXTj%NEXTi%ENDSUBAPPENDIX D - PROGRAM LISTING - DYNAMIC SIMULATOR OF ACIRCULATING FLUIDIZED BED COMBUSTORThis appendix provides the listing of the QuickBasic program written for the dynamicsimulation of a circulating fluidized bed combustor. It employs the model described inChapter 4.338T$STATIC$INCLUDE: ‘e:\model\’DECLARESUBmattran(n%, m%,aay,bbxO)DECLARESUBmatmult (n%, m%,0%,aay,bbxO,c())DECLARESUBMATADD(n%,m%, aay,bbxo,c)DECLARESUBmatinvrs(n%, aay,bbxO)DECLARESUBmatsub(n%, m%,aayO, bbxO, cO)REM$DYNAMICDIMt(0TO50,13)DIMnt(0TO50,13)D1Mot(0TO50,13)DIMeh(0TO30)DIMebsh(0TO30)DIMnts(OTO13)DIMaaa(0TO50, 0TO50)DIMffl0TO50)OPEN“0’,#1,“SIM.PRN”OPEN“I”,#2,“c:\model\”OPEN“I”,#3,“c:\”SCREEN8CLSCOLOR5,0DIMkmo2o(1TO21)DIMknico2o(0TO21)DIMar(1TO3)DIMload(1TO3)DIMmolfo2(0TO21)DIMmolfo2o(0TO21)DIMkgco2o(0TO3)DIMKGH200(0TO3)DIMKGSO2O(0TO3)DIMKGN2O(0TO3)DIMKGCASO4O(0TO3)DIMKGCAOO(0TO3)DIMkgasho(0TO3)DIMkgco(0TO3)DIMKGO2O(0TO3)DIMKGCL2O(0TO3)DIMts(0TO13)DIMqout(1TO3)DIMtg(0TO3)DIMbedc(0TO13)DIMbedash(0TO13)DIMsmass(0TO13)DIMrin(1TO13)DIMh(1TO3)DIMgainma(0TO3,0TO20)DIMgp(0TO20)DIMaay(1TO30,1TO30)DIMbbx(1TO30,1TO30)DIMc(1TO2O,ITO30)DIMe(0TO16,1TO16,2)DIMF(0TO3,1TO16,2)DIMg(0TO18,ITO16,1TO2,ITO2)DIMgm(1TO30,ITO20)DIMid(1TO20,1TO20)DIMw(0TO20,ITOI)DIMspcc(1T02)DIMiftiTO30,1)DIMholda(1TO30,1TO30)DIMholdb(ITO20,1TO30)DIMholdc(1TO20,1TO30)DIMholdd(ITO20,1TO30)DIMholde(ITO20,1TO30)DIMholdftlTO20,1TO30)DIMgt(1TO20,1TO30)DIMdmpo2f-20TOO)DIMrad(0TO50)DIMloadx(1TO21)FORi%=0TO21molfo2(i%)=.21molfo2o(i%)=molfo2(i%)NEXTi%scrn%0limit%=0dmpo2f(0)=0swing%=0swingper=-3.1415912s%=Irannum=1RANDOMIZE(rannum)FORi%=4TO13bedc(i%)=0bedash(i%)=0-•0osmass(i/o)=10NEXTi%aistan=.0182saistan.1197two=273+65twall=273+600waterfi=.08twi=273+4aom.155965ntubes%=2o2cont%=0setpo2=3.5testcnta%=0countint%=0wannup%0adapt%0nc%=15numout%=2nuniin%=2FORi%=1TO20FORj%=1TO2OIFi%=j%THENid(i%, j%)=IELSE id(i%, j%)=0ENDIFNEXTj%NEXTi%IFtimes%=1ThENGOTO675nu%=Ialph(1)=0alph(2)=0FORi%=1TO20FORj%=ITO2lam(i%,j%)=0NEXTj%NEXT1%FORi%=ITO20lam(i%,2)=9.999999999999999D+32NEXTi%FORi%=-5TO0FORj%=1T02y(i%,j%)=Ou(i%,j%)=0NEXTj%NEXTi%cc(I)=-1.6cc(2)=.64cc(3)=0cc(4)0a(1,1)-.855a(2,1)0a(3,1)0a(1,2)=0a(2,2)0b(0,1,1)=1.688b(1,1,1)=.198b(2,1,1)=.193b(3,1,1)=.122b(0,l,2)=0b(l,1,2)=0b(2,1,2)=0b(3,1,2)=0b(0,2,1)=0b(1,2,1)=0b(2,2,1)=0b(3,2,1)=0b(0,2,2)=0b(1,2,2)=0b(2,2,2)=0b(3,2,2)=0FORi%=1TO10FORj%=ITO10FOR1o%1T02p(i%,j%,io%)=id(i%,j%)NEXTlo%NEXTj%NEXTi%times%Iis=3.8g9.81dcol=.1524dp=.0005y=.7afactor=Iacol3.14159/4*dco1’2msoiids=100ki=110000k2=.00001#ncstr=5tg=850+273REMSTANDPIPErstan.05113astan3.14159*rs1*rstmlROSTAN=.2hstan5.3AOSTAN=2*3.14159*ROSTAN*hstanhostan27vcell=astan*hstan/10hcellhstan/10saiceii2*3.14159*rstan*hstan/10hgs=150675‘Initializationsfromrhodes.basgs=100aeration=15setpload=120mug=.0000442rhog=.324rhos=2650ebsmf”.44REMCRITICALPROPERTIEST(K),V(CM3/GMOL)TCR1TO2=154.6TCRITN2=126.2VCR1TO2=73.4VCRITN2=89.5WMPO2=21qout(1)1qout(2)=Iqout(3)=1DELTAI=.1DELTA2=-1testcnt%=0test%=0change=-1REMRISERDIMENSIONSREMH=8th=14h(1)1ph(2)ish(3)th-lp-lsFORi%=ITO3rin(i%)=.086ar(i%)=2*3.14159**h(i%)NEXTi%FOR1%=4T013rin(i%)=.05113NEXTi%aris=3.14159*rin(1)*rin(1)qhx=0ss%=0r%0REMINITIALTEMPERATURESTO=20+273ta=20+273delt=1tai20+273tg(O)=taiFORi%=1TO3tg(i%)=850+273NEXTi%FORi%=OTO13ts(i%)=850+273NEXTi%press101.325rg=8.31434delr.003DEL=deirNX%=49FORi%=0TONX%rad(i%)=tin+i%*DELNEXTi%NX%=49count%=0minit=0REMSANDhs121hs50eps=800smass=100TVsmass/ rhosvi413*314159*(dp/2)A3sas=3.14159*dpA2NUMSTV/vlTAS=NUMS*sasREMGAStairi211.3psratio=2pair=tan-i*psratio/(psratio+1)sair=tairi-pairLIMEI=0CPG=1100mwg=28F02=.21m2=32CCO2O=0REMAIRha12MWAIR=28.84mwc=12mwh=1mi=14REMINCREMENTDEFINiTIONSmws32mwo=16mwcl=35.5MWCACO3=100mwh2ol8mwco2=44MWSO2=64mwn2=28MWCAO=56MWCASO4=136mwo2=32MWCL2=71kref.3cpref920rhoref=961‘carbonsteelkcs=34cpcs=473rhocs=7801‘durablanketkdur=.09cpdur’1130rhodur=64cpss=477rhoss=7900REMFUELCOMPOSITIONS(ULTIMATEANALYSIS)REMPET.COKE(CONACO)PFC=873PFH38PFN=19PFS=49PFO=11PFCL=.1PFASH=.9PFH2O=.5rhoap1459surfar255order=Ifreq44.3946ea=4.99E+07REMHIGHVALECOALPFC=62.4PFH=3.6PFN=.8PFS=.2FF0=18.7PFCL=0PFASH=14.3PFH2O=15.2rhoap=1185surfar108100order=.5freq=3.2664ea=5.699E+07REMANTHRACiTECOALPFC=775PFH=2?PFN=.9PFS=.5PFO=2.4PFCL=0j-paperkj=.112cpjll3Orhoj=160‘parockpar=.08cppar=920rhopar=128‘stainlesssteelkss=26PFASH=16.7NEXTj%PFH2O=2.1NEXTi%rhoap=1815surfar4210order=0o2concs=.21*.010389freq=2.6935E-04ea=7059000!REMBEGINCALCULATIONS11REMCOAL‘IFminit+count%/60>100THENINPUTz%de=.0009‘IFminit+count%/60>110THENffr=0‘ffr=ffr-.1IFffr<13.65THENffr13.65coaly=ffrRG1=82.06RG2=8319.17mwc12RHOC=2000mpart4/3*3.14159*(dc/2)3*rhoaptwi273+9.5‘IFminit+count%/60>1000THENSTOPREMCALCULATEHIGFIERINGVALUEOFFUEL(KJ/KGFUEL)HHV=1.055/.4536*(14544*PFC/100+62028*(PFH/100PFO/‘STOP100/8)+4050*PFSI100)IFhThx>0THENbedc=0r%1bedash=0ntubes%1REMSULPHURCAPTURE(%)waterfi=.2scOENDIFRHOASH=2700IFminit+count%/60>.5THENss%=1GOSUB9998GOTO610‘readinitialtemperaturedistributionFORi%0TO49rfr26.5INPUT#2,nt(i%,1)coaly=rfrNEXTi%FORi%0T049IFrfr-ffr<OTHENFORj%=2TO13ffr=ffr..1nt(i%,j%)nt(i%,1)IFfli<rfrTHE4fli=rfrU’coaly=ffrELSE fr=ffi’+.1IFffr>rfrTHENffr=rfrcoaly=ffiENDIF610‘GOTO612ffrhi=28ffrlow=25IFABS(ffr-coaly)<.1THENffr=coalyELSE ffrf&.1*j\BS(ffra1y)/(ffrcoa1y)ENDIF612‘TFminit+count%/60<65THENffr=ffr+.1IFffr>3OTHENffr=30coaly=ffrENDIF‘dc=.0001GOTO611IFminit+count%/60>247THENIFcountint%0THENINPUT#3,coalycoaly=coaly*1.2156IFminit+count%/60>236THENcoalycoaly/1,16*1.175ENDIFENDIFffr=coalyELSE ffr’ffr.1*S(ffr_coa1y)/(_coa1y)ENDIFIFminit+coimt%/60>200THENffr=ffr+.1JFffr>14.4THENffr=14.4ELSE ffr=ffr+.1IFffr>15,4THENIk=15.4ENDIFENDIF611‘IFtg(l)>II25ANDr%=1THENwarmup%=Icont%1‘ENDIFTFcount%>30THENSS%=1¶IFcount%>45THENfl1=21.5tai2O+273IFhThx/3600>-10THENr%=1waterfl=0ntubes%=1setpnt(1)=860warmup%=Icont%=1adapt%=IENDIFENDIFIFABS(ffr-coaly)<.1THENy=lO’(-l.5446+2.9l62*w_1.0432*wA2)ELSEtpartltg(1)+100‘IFtg(1)<(849.38+273)THENffr=26‘ELSE ffr=25ENDIFIFminit+count%/60>1300THENINPuTz%ENDIFcalculategasdensity(kg/m3)rhog=1.29425*273*press/101.325/tg(1)‘calculategasviscosity(kg/m/s)mug=6.31E-06+tg(1)*4.18E-08-tg(1)’2*6.7E-12‘calculategasthermalconductivity(W/m/K)kg=.001*(19.178+.047567*tg(1))estimatemoleculardiffusivity(m2/s)dab=9.693E-06*(tg(1)+100)”1.75/100“2‘schmitnumbersc=mug/rhog/dabcalculatesingleparticleterminalvelocitybi=(rhog*(rhos-rhog)*9.81/mugF’2)’(I/3)b2(mug*9.81*(rhos_rhog)/rhogA2)A(1/3)x=dp*biIFx<3.8THENy=xA2/183.l234E04*xA5+1.6415E06*xA8_7.278E_i0*xA11ELSEy=10‘(-1.64758+2.94786*w-1.09703*w”2+.17129*WA3)ENDIFENDIFVt=y*b2FORi%=-15TO-idmpo2fli%)=dmpo2fli%+1)NEXTi%pair=tairi*psratio/(psratio+1)sair=tarn-paircount%=count%+1IFcount%>60THENcount%=0nunit =minit+IIFswing%=1THENswingper=swingper+3.14159/120waterfi=(.035+.005*SIN(swingper))/ntubes%IFwaterfl*ntubes%>.04THENswingper=(.03.04)*.01IFwaterfi*ntubes%<.03THENswingper=(.04-.03)*.01ENDWENDIFSTORE%=STORE%+1perfromhydrodynamiccalculationsIFo2cont%=1THENerroro2=setpo2-dmpo2f-15)tairitairi+.01IFtairi >225THENtairi225IFtairi<i5OTHENtairi=150pair=tairi*psratio/(1+psratio)IFpair<85THENpair=85sairtairi-pairENDIFh=lp+lsGOSUB4000h=thw=LOG(x)/LOG(iO)IFx<7.58THEN12 interval%=120REMMASSBALANCEAROUNDREACTOR(COMBUSTIONCALCULATIONS)GOSUB6000REMHEATBALANCEGOSUB7000s%3IFscm%0THENLOCATE1,1:PRINT“LOAD”,load(1),load(2),load(3)LOCATE162:PRINT“TIME“LOCATE1,76:PRINT“MIN.”LOCATE1,69:PRINTUSING“####.#“;minit+count%/60LOCATE2,69:PRINTcount%LOCATE5,41:PRINT“GAS”LOCATE6,40:PRINTUSING“####.#“;tg(1)-273LOCATES47PRINT“SAND”LOCATE647:PRINTUSING“####.#“ts(1)-273LOCATES60:PRINT“SUP.GASVEL.”LOCATE6,60:PRINT“(MIS)”LOCATE7,60:PRINTUSING“##.##“;rg*tg(1)/press/ens/mwg*tarn/3600REMGOTO987LOCATE4,30:PRINTwaterfi‘ntubes%LOCATE5,30:PRiNTtwo-273LOCATE6,30:PRINTloadmemLOCATE7,30:PRINTtwall-273LOCATE8,30:PRINT(1-ebsdils)*2650LOCATE9,30:PRINTgsLOCATE10,30:PRINTloadaveLOCATE3,30:PRINT“TEMPERATUREPROFILES(DEG.C)”FORi%=OTONX%STEP2LOCATEi%+8-i%/2,40:PRINTUSING“####“;nt(i%,1)-273NEXTi%LOCATE10,40:PRINTUSING“####.#“;nt(0,1)-273LOCATE11,40:PRINTUSING“####.#“; nt(30,1)-273LOCATE12,40:PRINTUSING“####.#“;nt(31,1)-273LOCATE13,40:PRINTUSING“####.#“;nt(33,1)-273LOCATE14,40:PRINTUSING“####.#“;nt(41,1)-273LOCATE15,40:PRINTUSING“####.#“; nt(49,1)-273LOCATE17,40:PRINTUSING“####.#“;nt(0,13)- 273LOCATE18, 40:PRINTUSING“####.#“;nt(26,13)-273987LOCATE3,1:PRINT“FLUEGASCOMPOSITION”LOCATE4,1:PRINTaeration,“aeration”LOCATES,1:PRINTdmpo2,“%02”LOCATE6,1:PRINTDMPCO2,“%C02”LOCATE7,1:PRINTdppmso2,“PPMSO2”LOCATE9,1:PRINT“CARBONINBED(%)“LOCATE10,1:PRINTbedc(13)*100LOCATE12,1:PRINT”ASHINBED(%)”LOCATE13,1:PRINTbedash(13)*100LOCATE8,1:PRINTdmpo2f-15),“%o2”LOCATE15,1:PRINT“COALFEEDRATE(KG/HR)”LOCATE16,1:PRINTffrLOCATE18,1:PRINT“AIRFEEDRATE(KG/HR)”LOCATE19,1:PRINTtamLOCATE20,1:PRINTtai-273,“DEG.C”LOCATE9,50:PRINT“NEATREMOVED(1(W)”LOCATE10,60:PRINThlhxI3600LOCATE12,50:PRINT“BEATRELEASED(1(W)”LOCATE13,50:PRINThgencom/3600LOCATE13, 60:PRINT-hgen/3600LOCATE15,50:PRINT“NEATTOREFRACTORY(1(W)”LOCATE16,60:PRINThinisI3600LOCATE18, 50:PRINT“HEATTOSAND(KW)”LOCATE19,60:PRINTHS*TAS*RSMASS/SMASS*tg(s%)-ts)*3.6LOCATE19,60:PRINThisand/3600LOCATE21,50:PRINT“HEATTOSTANDPIPE(KW)”LOCATE22,60:PRINThistan/3600REMPRINTTG,TS,NTSREMINPUTX%LOCATE22,30IFss%0THENPRINT“STEADY-STATEELSEPRINT“UNSTEADY-STATE”ENDIFLOCATE23,30IFr%0THENPRINT“RUNOFF”ELSEPRINT“RUNON”ENDIFIF(KGCI-CARBO)<=0THENGOTO642LOCATE22,1:PRINT“COMBUSTIONEFFICIENCY(%)“LOCATE23,1:PRINT(1-(((load*aris*h)*bedc/(smass+bedc+bedash)-CARBO)I(KGCI-CARBO)))*100642ELSEIFscrn%=1THENLOCATE1,1:PRINT“LOAD”,load(1),load(2),load(3)LOCATEI58PRINT“TIME=“LOCATE1,73:PRINT“MIN.”LOCATE1,65: PRINTUSING“####.##“;minit+count%/60LOCATE11,65:PRINTcountint%LOCATE12,65:PRINTtestcnt%LOCATE13,45:PRINT“trace“,traceLOCATE14,45:PRINT“lamrls=”,lainrisLOCATE2,1:PRINT“TG”LOCATE3,1:PRINTa(1,1)LOCATE4,l:PRINTa(2,1)LOCATES,1:PRINTa(3,1)LOCATE9,1:PRINT“two”LOCATE10,I:PRINTa(1,2)LOCATE11,I:PRINTa(2,2)LOCATE2,20:PRINT“ffr->tg”LOCATE3,20:PRINTb(0,1,1)LOCATE4,20:PRINTb(1,1,1)LOCATE5,20:PRThITb(2,1,1)LOCATE6,20: PRINTb(3,1,1)LOCATE2,35:PRINT“load->tg”LOCATE3,35: PRINTb(0,1,2)LOCATE4,35:PRINTb(I,1,2)LOCATES,35:PRINTb(2,1,2)LOCATE6,35:PRINTb(3,1,2)LOCATE2,50:PRINT“ffr->two”LOCATE3,50:PRINTb(0,2,1)LOCATE4,50:PRINTb(1,2,1)LOCATE5,50:PRINTb(2,2,1)LOCATE6,50: PRINTb(3,2,1)LOCATE2,65:PRINT“load->two”LOCATE3,65:PRINTb(0,2,2)LOCATE4,65: PRINTb(1,2,2)LOCATE5,65: PRINTb(2,2,2)LOCATE6,65:PRINTb(3,2,2)LOCATE15,1:PRINT“load=“,loadaveLOCATEI61PRINT”ffr=”ffrLOCATE15, 25:PRINT“two“,two-273LOCATE16,25:PRINT“tg=“:LOCATE16, 35:PRINTtg(1)-273:LOCATE16,50:PRINTy(-1,1)-y(-2,1): LOCATE16, 65:PRINTy(-2,1)-y(-3,1)LOCATE17,25:PRINT“tgfilt=“:LOCATE17, 35:PRINTyfl0,1):LOCATE17,50:PRINTdyI-1,1):LOCATE17, 65:PRINTdyt-2,1)LOCATE18,25:PRINT“dmpo2f=”, dmpo2f.15)LOCATE1925:PRINT“dmpo2“dmpo2LOCATE17,1:PRINT“tairi=“,tairiELSEIFscm%=2THENPRINTminit+count%/60LOCATE2,1:PRINTsninit+count%/ 60GOSUB5400INPUTz%LOCATE1,1:PRINT“LOAD”,loadLOCATE1,32:PRINT“TIME=“LOCATE1,46:PRINT“MIN.”LOCATE1,39:PRINTUSING“####.#“;minit+count%/ 60LOCATE4,30:PRINTdmpo2t1-15)PRINTminit+count%/6000ENDIF FORx%=0TO50FORy%=ITO13Ot(X%,y¾)=t(x%,y%)t(x%,y%)=nt(x%, y%)NEXTy%NEXTx%IFSTORE%=INT(60/ DELT)THENENDIFIFminit>1999THENFORs%4TO13FORi%=0TO26WRITE#1,i%,nt(i%,s%)NEXTi%NEXTs%WR1-rE#I,INPUTz%INPUTz%INPUTz%INPUTZ%INPUTz%ENDIFWminit>2000THENGOTO9999countint%=countint%+1IFcountint%>interval%THENSTORE%=0IFtest%=1THENtestcnt%=testcnt%+IIFtestcnt%=100000000000#THENFORii%=IT030BEEPNEXTii%STOPENDIFtestcnta%=testcnta%+IIFtestcnta%>8THENnumber=RND-.5IFnumber>0THENcoaly=fiThiELSE coaly=IfrIowENDIFtestcnta%0ENDIFnumber=RND-.5IFnumber>0THENtairi =205ELSE tairi =195ENDIFpair=tairi*psratioI(psratio+1)sair=tairi-pairENDIFENDIFWRiTE#1, minit+count%/60,ffr,tairi,loadave,dmpo21-15), tg(1)-273,two-273,aeration,waterfi*ntubes%, a(1,1),b(0,1,1)a(1,1),a(2,1), b(0,1,1),b(I,1,1), b(2,1,1), b(3,1,1)DMPO2,BEDC, ffr,aeration,load, a(1,1),a(2,1),a(1,2),a(2,2),b(0,1,1),b(1,1,1),b(2,1,1), b(3,1,1), b(0,1,2),b(1,1,2),b(2,1,2), b(3,1,2), b(0,2,1),b(1, 2,1),b(2, 2,1), b(3,2,1),b(0, 2,2),b(1,2,2),b(2,2,2),b(3,2,2)countint%=0IFswing%1THENsetpnt(1)=(waterfi*ntubes%-.03)/ (.04-.03)*(205-125)+125ENDIFGOSUB9365ENDIFIFlimit%=ITHENIFtg(1)<1125THENffr=24ELSEffr=19KEYONENDIFRETURNEN])IF9951GOTOI1scni%=OSCREEN09950CLSsubroutinefor mainmenuRETURNKEY1,“comb”KEY2,“9952KEY3,“limit”scm%=IKEY4,“cont”SCREEN0KEY5,“CLSKEY6,“ans”RETURNKEY7,“coefs”KEY8,“blank”9953KEY9,“scm%2KEY10,“quit”CLSSCREEN0KEY(1)ONSCREEN8KEY(2)ONGOSUB5300KEY(3)ONRETURNKEY(4)ONKEY(5)ON9960KEY(6)ON‘subroutineforcontrolKEY(7)ONKEYl,”sp”KEY(8)ONKEY2,“nu”KEY(9)ONKEY3“lain”KEY(10)ONKEY4,“adapt”KEYS,“on/oft”ONKEY(1)GOSUB9998KEY6,“alpha”ONKEY(2)GOSTJB9990KEY7“swing”ONKEY(3)GOSUB9700KEY8“o2”ONKEY(4)GOSUB9960KEY9,“two”ONKEY(S)GOSUB9990KEY10,“main”ONKEY(6)GOSUB9951ONKEY(7)GOSUB9952KEY(1)ONONKEY(8)GOSUB9953KEY(2)ONONKEY(9)GOSUB9990KEY(3)ONONKEY(10)GOSUB9999KEY(4)ONKEY(5)ONlam(i%, x%)=lambdaKEY(6)ONNEXTi%KEY(7)ONCLSKEY(8)ONRETURNKEY(9)ONKEY(10)ON9964CLSONKEY(1)GOSUB9961IFadapt%=ITHENONKEY(2)GOSUB9962adapt%=0ONKEY(3)GOSUB9963ELSEONKEY(4)GOSUB9964adapt%=ONKEY(S)GOSUB9965ENDIFONKEY(6)GOSUB9967CLSONKEY(7)GOSUB9969RETURNONKEY(8)GOSUB9966ONKEY(9)GOSUB99689965ONKEY(10)GOSUB9950CLS IFcont%=ITHENKEYONwarmup%=0RETURNcont%=0ELSE9961warmup%=1CLScont%=1INPUT“setpoint forwhichoutput(1)tg,(2)4wo”;x%ENDIFIFx%<1ORx%>2G0TO9961CLSINPUT“newsetpoint”;setpnt(x%)RETURNCLS RETURN9966CLS9962IFo2cont%=ITHENCLSo2cont%0INPUT“newhorizon”;nu%ELSECLSo2cont%=IRETURNENDIFCLS9963RETURNCLS INPUT“constraintforwhichinput (1)=ffr,(2)”aeration”;x%9967IFx%>2THENGOTO9963CLSINPUT“newconstraintfactor”;lambdaINPUT“inputwhichoutputtoconstrain”, xxxxx%FORi%=1TO20INPUT“alpha1”,alph(xxxxx%)CLSRETURN9968 IFtestl%=lTHENtestl%=0ELSEtestl%=1ENDIFRETURN9969IFsng%ITHENswing%0ELSE swing%=1ENDIF9990REMSUBROUTINEFORUSELESSFUNCTIONKEYSRETURN9991REMSUBROUTINETOCHANGEAIRINLETTEMPERAUTRCLSINPUT“INPUTNEWGASINLETTEMPERATURE(DEG.C)”; taitai=taj+273CLSGOSUB9998RETURN9992REMSUBROUTINETOCHANGEPRIMARYAIRFLOWRATECLS1234 INPUT“CHANGEwhichairflow-primaiy(l)orsecondaiy(2)?”, xxxx%INPUT“inputnewtotalairflow”;tairipairtairi*psratio/ (psratio+1)sair=tairi -pair(-‘IRETURN9993REMSUBROUTINETOCHANGECOALFEEDRATECLSINPUT“INPUTCOALFEEDRATE(KG/BR)”; ffrCLSRETURN9994REMSUBROUTINETOCHANGETIMESTEPCLSINPUT“INPUTNEWTIMESTEP(S)”;deltCLSRETURN9995REMSUBROUTINETOCHANGEHEATREMOVALCLSINPUT“INPUTNEWwaterflowrate”;waterfiINPUT“numberoftubes”; ntubes%waterfi=waterfi/ntubes%CLSRETURN9996REMSUBROUTINETOTOGGLESTEADYANDUNSTEADYSTATECALCULATIONSIFss%0THENss%=IELSEss%=0ENDIFRETURN9997REMSUBROUTINETOTOGGLECONST.TEMPANDCALCULATEDGASTEMPCLSIFr%=0THENKEY(4)ONr%=1KEY(5)ONELSEKEY(6)ONr%=OKEY(7)ONENDIFKEY(S)ONKEY(9)ONRETURNKEY(10)ON9988ONKEY(1)GOSUB9991IFtest%=0THENONKEY(2)GOSUB9992test%1ONKEY(3)GOSUB9993ELSEONKEY(4)GOSUB9994test%0ONKEY(S)GOSUB9995ENDIFONKEY(6)GOSUB9996TEST1=1ONKEY(7)GOSUB9997RETURNONKEY(8)GOSUB9988ONKEY(9)GOSUB99899989ONKEY(10)GOSUB9950CLSINPUT“inputnewload”,setploadKEYONRETURNRETURN99999998REMSUBROU]TNETOSETUPFUNCTIONKEYSREMFUNCTIONKEYTEMPLATESTOPKEYI“GASIT”ENDKEY2“GASP’KEY3“COAL”KEY4“TIIvIE”KEY5“HEAT”KEY6“STATE”6000KEY7“RUN”REMMASSBALANCEKEY8,“TEST”KEY9,“circ”FORs%13TO4STEP-IKEY10,“main”bedc(s%)=bede(s%) +delt*gs*astanIvcellI rhosIebsmf*(bedc(s%-1)-bedc(s%))KEY(I)ONbedash(s%)=bedash(s%)+delt*gs*astanIvcellIrhos/ebsmf*(bedash(s%KEY(2)ON-I)-bedash(s%))KEY(3)ONNEXTs%gasvel=rg*tg(I)Ipress/aris/mwg*pair/3600/(1-loadx(i%)/2650)bedc(0)=bedc(13)bedash(0)=bedash(13)kmco2o(0)=0s%=IREMCALCULATEINLETFLOWS(KG)OVERTIMEDELTmwowater=(1-PFH2O/100)kmci=Lfr/3600*water*PFC/100/mwc+gs*aris*bedc(13)/mwckgco(0)=kmci*mwckmhi=ffr/3600*water*PFH/100/mwhkmni=pair/3600/MWAIR*.79*2+(ffi/3600*water*PFN/100)/KMSI=ffr/3600*water*PFS/100/mwskmoi=pair/3600/MWAIR*.21*2+(ffr/3600*water*PFO/100)/KMCU=ffr/3600*water*PFCL/100/mwclKMASHIffr*water*PFASH/100*TIME+(load(s%)*aris*h(s%)gs*aris)*bedash(s%)+gsarisbedash(s%-1)KMCACO3I=LIMEI*flffiKMH2OI=ffr/3600*PFH2O/I00/mwh2okgashi=ffrI3600*water*PFASH/100REMCOMBUSTIONKINETICSCALCULATIONSREMOUTLETKMOLREMSPECIFICVOLUMEOFGASATTANDP(KMOL/M3)sv=press/tg(s%)/rgkgciz=bedc(s%)*load(s%)*3.14159*.086‘2*ip+kmci*mwc-gs*3.14159*.086“2*bedc(s%)nbedc=kgciz/(load(s%)*3.14159*.086A2*Ip)FORi%=1TOIOkgcigz=nbedc*loadx(i%)*3.14159*.086A2*.36numckgcigz/ mpartparticlereynoldsnumberrepp=rhog*(gasvel -gs/loadx(i%))*dc/ mugsherwoodnumbersh=2*(1-loadx(i%)/2650)+.69*(repp/ (1-loadx(i%)/2650))A(1/2)*A(1/3)masstransfercoefficient (mis)kd=sh*dab/dcestimatekineticrateconstant(kmollm2/s/(kmollm3)’n)kcr=freq*EXP(-ea/8314/ tpartl)LOCATE1,2:PRINTi%6001molfo2o(i%)=molfo2(i%)o2concb=molfo2o(i%)*svo2concs=o2concbdeterminesurfaceconcentrationofoxygen(kmol/m3)891termy=kcr*o2concsAorder-kd*(o2concb-o2concs)IFABS(tenny)<.000001#GOTO890o2concs=o2concs-.01*termyGOTO891890rateas(ktnolls)crate=ker*o2concsAorder*4*3.14159*(dc/ 2)‘2*numcIFi%=1THENkmh2oo(s%)=kmhi/2+KMH2OIkmso2o(s%)=KMSI*(1-sc/100)kmn2o(s%)=kmni/2KMCASO4O(s%)=KMSI*sc/100KMCAOO(s%)=KMCACO3I-KMCASO4O(s%)WMPH2O=kmh2oo(s%)/ TOTAL*100kmcl2o(s%)KMCLI/2ENDIFIFi%=IUIENkmo2i=(kmoi-2*kmso2o-kmhi/2)/ 2kmo2o(i%)=kmo2i-cratekmco2o(i%)crate+KMCACO3IELSEkmo2i=kmo2o(i%-1)kmo2o(i%)=kmo2i-cratekmco2o(i%)=kmco2o(i%-1)+crateENDIFmolfo2(i%)=kmo2o(i%)/(kmo2o(i%)+knico2o(i%)+kmcl2o(s%)+kmn2o(s%)+kmh2oo(s%)+kmso2o(s%))IFmolfo2(i%)<0THENmolfo2(i5)=0kmo2o(i%)=0GOTO6022ENDIFIFABS(1-molfo2(i%)Imolfo2o(i%))>.000001THENmolfo2(i%)=(molfo2(i%)+molfo2o(i%))/2GOTO6001ENDIFREMFLUEGASCOMPOSH1ON(WET)(MOL%)6022TOTAL=kmn2o(s%)+kmo2o(i%)+kmco2o(i%)+kmso2o(s%)+kmh2oo(s%)WMPN2k.mn2o(s%)ITOTAL*100WMPO2=kmo2o(i%)/TOTAL*100WMPCO2=kmco2o(i%)/TOTAL*100IFWMPO2=21THENWPPMSO2=0ELSE WPPMSO2=kmso2o(s%)/ TOTAL*1000000*(21-3)1(21-WMPO2)ENDIFREMFLUEGASCOMPOSON(DRYXMOL%)TOTAL=kmn2o(s%)+kino2o(i%)+kmco2o(i%)+kmso2o(s%)DMPN2=kmn2o(s%)/TOTAL*100dmpo2=kmo2o(i%)ITOTAL*100DMPCO2=kmco2o(i%)/TOTAL*100IFdmpo2=21THENdppmso2=0ELSE dppniso2=kmso2o(s%)ITOTAL*1000000*(21-3)/(21-dmpo2)ENDIFkgciz=kgciz-(kmco2o(i%)-kinco2o(i%-1))*mwcnbedc=kgciz/(load(s%)*3.14159*.086A2*lp)PR]NTi%,kgciz,molfo2o(i%)NEXTi%,*******************************************************************kmco(s%)=kgciz/mwcREMOUUETMASS(KG)kgasho=kgashiBEDCO=bedc(s%)bedc(s%)kmco(s%)*mwcI(load(s%)*3.14159*.086‘2*1p)bedash(s%)=kgasho/(load(s%)*3.14159*.086A2*lp)s%=2(11U’REMCALCULATEINLETFLOWS(KG)OVERTIMEDELTkgcigs*3.14159*.086”2*bedc(s%_1)kmnikmn2o(l)*2+sair/3600/MWAIR*.79*2kmoikmo2o(10)2+sair/3600/MWAIR.212kgashikgashokmo2o(I0)=kmoi/2kmn2o(s%)kmni/ 2REMCOMBUSTIONKINETICSCALCULATIONSREMSPECIFICVOLUMEOFGASATTANDP(KMOL/M3)svpress/tg(s%)/rgkgciz=bedc(s%)*load(s%)*3.14159*.086“2*Is+kgci-gs*3.14159*.086“2*bedc(s%)nbedc=kgcizl(load(s%)*3.14159*.086“2*Is)FORi%=11TO20kgcigz=nbedc*Ioadx(i%)*3.14159*.086“2*.38numc=kgcigz/mpartgasvel=rg*tg(1)/press!aris/mwg*tairi /3600/(1-loadx(i%)/2650)particlereynoldsnumberrepprhog*(gasvel-gs/loadx(i%))*do/mugsherwoodnumbersh=2*(I-loadx(i%)/2650)+.69*(repp/(1-loadx(i%)/2650))“(1/2)*sc”(I/3)masstransfercoefficient (m/s)kd=sh*dab/dc‘estimatekineticrateconstant(kmollin2/s/(kmollm3)”n)kcr=freq*EXP(-ea/8314!tpartl)LOCATE1,2:PRINT6002molfo2o(i%)=molfo2(i%)o2concb=molfo2o(i%)*sv‘determinesurfaceconcentrationofoxygen(kmollm3)893892termy=kcr*o2concs“order-kd*(o2concb-o2concs)IFABS(termy)<.000001#GOTO892o2concs=o2concs-.01*tennyGOTO893rateas(kmolls)crate=kcr*o2concs”order*4*3.14159*(dc/2)”2*numckmo2i=kmo2o(i%-I)kmo2o(i%)=kmo2i-cratekmco2o(i%)=kmco2o(i%-1)+cratemolfo2(i%)=kmo2o(i%)/(kmo2o(i%)+kmco2o(i%)+kmcl2o(s%.1)+kmn2o(s%)+kmh2oo(s%-1)+kmso2o(s%-1))IFABS(1-molfo2(i%)/molfo2o(i%))>.000001THENmolfo2(i%)=(molfo2(i%)+molfo2o(i%))/2GOTO6002ENDIFREMFLUEGASCOMPOSiTION(WETXMOL%)TOTAL=kmn2o(s%) +kmo2o(i%)+kmco2o(i%)+kmso2o(s%-1)+knih2oo(s%-1)WMPN2knm2o(s%)/TOTAL*100WMPO2=kmo2o(i%) /TOTAL*100WMPCO2=kmco2o(i%) /TOTAL*100IFWMPO2=21THENWPPMSO2=0ELSE WPPMSO2=kmso2o(s%)/TOTAL*1000000*(21-3)/(21-WIvIPO2)ENDIFWMPH2O=kmh200(s%-1)/TOTAL*100REMFLUEGASCOMPOSiTION(DRY)(MOL%)TOTAL=kmn2o(s%) +kiuo2o(i%) +kmco2o(i%)+kmso2o(s%-1)DMPN2=kmn2o(s%)I TOTAL*100kmo2o(20)=kmoi/2dmpo2=kmo2o(i%)/TOTAL*100kmn2o(s%)=kinni /2DMPCO2=kmco2o(i%)/TOTAL*100IFdmpo2=21THENdppmso2=0REMCOMBUSTIONKINETICSCALCULATIONSELSEREMSPECIFICVOLUMEOFGASATTANDP(KMOL/M3)dppmso2=kmso2o(s%-1)!TOTAL*1000000*(21-3)/(21-dmpo2)svpress!tg(s%)/rgENDIFkgciz=bedc(s%)*ioad(s%)*viii+kgci-gs*3.14159*.086“2*bedc(s%)nbedc=kgciz/(load(s%)*viii)kgciz=kgciz-(kmco2o(i%)-kmco2o(i%-1))*mwcnbedc=kgciz/(load(s%)*3.14159*.086‘2*is)i%=21PRINTi%, kgciz,molfo2o(i%)loadx(i%)=ioad(s%)NEXTi%kgcigz=nbedc*loadx(i%)*numc=kgcigz/mpartkmco(s%)=kgciz/mwckgasho=kgashigasvel=rg*tg(1)Ipress!aris/mwg*tairi I3600/ (1-loadx(i%)/2650)BEDCO=bedc(s%)‘particlereynoldsnumberrepp=rhog*(gasvel -gsIloadx(i%))*dc/mugbedc(s%)=kmco(s%)*mwc/(ioad(s%)*3.14159*.086“2*is)bedash(s%)=kgashoI(ioad(s%)*3.14159*.086“2*is)sherwoodnumbersh2*(1-loadx(i%)/2650)+.69*(repp/(1-loadx(i%)/2650))”(1/2)*m”(l/3)masstransfercoefficient (m/s)s%3kdsh*dab/dc‘estimatekineticrateconstantnol/m2/s/(kmol/m3y”n)REMCALCULAThINLETFLOWS(KG)OVERTIMEDELTkcr=freq*EXP(-eaI8314/tpartl)kgci=gs*3.14159*.086“2*bedc(s%-1)6003moifo2o(i%) =molfo2(i%)kmni=kmn2o(2)*2o2concb=moifo2o(i%)*svkmoi=kmo2o(20)*2kgashi=kgashodetenninesurfaceconcentrationofoxygen(kmollm3)895894tenny=kcr*o2concs“order-kd*(o2concb-o2concs)IFABS(tenny)<.000001#GOTO894o2concs=o2concs-.01*temiyIFo2concs<0THENo2concs=0GOTO$94ENDIFGOTO895rateas(kxnolls)crate=kcr*o2concs“order*4*3.14159*(dc/2)”2*numckmo2i=kmo2o(i%-1)kmo2o(i%)=kmo2i-cratekinco2o(i%)=kmco2o(i%-1)+cratemolfo2(i%)=kmo2o(i%)/(kmo2o(i%)+kmco2o(i%)+kmcl2o(s%-2)+kmn2o(s%)+kinh2oo(s%-2)+kmso2o(s%-2))sick=ABS(1-molfo2(i%)/molfo2o(i%))IFABS(1-molfo2(i%)/molfo2o(i%))>.001THENmolfo2(i%)=(molfo2(i%)+molfo2o(i%))/2IFmolfo2(i%)<0THENmolfo2(i%)=molfo2o(i%) /2GOTO6003ENDIF896REMFLUEGASCOMPOSON(WETXMOL%)TOTAL=kmn2o(s%)+kmo2o(i%)+kmco2o(i%)+kmso2o(s%-2)+kmh2oo(s%-2)WIvIPN2=kmn2o(s%)/TOTAL*100WMPO2=kmo2o(i%)/TOTALS100WIvIPCO2=kmco2o(i%)/TOTAL*100IFWMPO2=21THENWPPMSO2=0ELSE WPPMSO2=kmso2o(s%)/TOTAL*1000000*(21-3)/(21-WMPO2)ENDIFWMPH2O=kmh2oo(s%-2)/TOTAL100REMFLUEGASCOMPOSITION(DRYXMOL%)TOTALkmn2o(s%)+kmo2o(i%) +kmco2o(i%)+kmso2o(s%-2)DMPN2=kmn2o(s%)ITOTAL100dmpo2=kmo2o(i%) I100DMPCO2=kmco2o(i%)/ TOTAL*100lFdxnpo2=21THENdppmso2=0ELSE dppmso2kmso2o(s%-2)/TOTAL*1000000*(21-3)/(21-dmpo2)ENDIFdmpo2al =.9dmpo2f0)=dmpo2fl-1)dmpo2al +dmpo2*(1-dznpo2al)kmco(s%)=kgciz/mwc-(kmco2o(21)-kmco2o(20))kgasho=kgashiBEDCO=bedc(s%)bedc(s%)=kmco(s%)*mwcI(load(s%)vnl)bedash(s%)=kgasho/(load(s%)*viii)RETURN7000hiris=0hThx=0hisand=0hgen0hlstan=0hgencom=0bigt=1000smaIlt7SOngtotgREMHEATBALANCEIFss%1THENs%=Ihg=13+1.27*loadave+4.735E-08*(tg(s%)“4-t(0,s%)“4)!(tg(s%)-t(0,s%))i%=0a02*3.141595(s%)al=2+3.14159*(rin(s%)÷deli)v3.14159*(delr”2+2*delr5rin(s%))x=hg*aOykref5al/2/delizrhoref*epref*v/2IdeltX=X/Zyy/znt(i%,s%)=(ot(i%, s%)*(1-y/2)+y*t(i%+2,s%)-x/2*t(i%,s%)+x*tg(s%))/(1+x/2+y12)FORi%=1T029aiphar=kref/rhoref/cprefmm=deli”2/aiphar/deltaa=t(i%+1,s%)*(1+deli!(2*(rin(s%)+i%*deli)))+t(i%-1,s%)*(1-deir/(2*(rin(s%)+i%*deir)))nt(i%,s%)=(mm-2)/(mm+2)*ot(i%,s%)+2/(mm+2)*NEXTi%i%=30anmi=2*3.14159*(rin(s%)+(i%_1)*deli)anpi=2*3.14159*(rin(s%)+(i%+1)*deli)va=3.14159*(2*rin(s%)*i%*deli+(i%*deli)“2-2*rin(s%)*(i%-1)*deli-((i%-1)*delr)“2)vb=3.14159*(2*rin(s%)*(i%+1)*delr+((1%+1)*delr)”2-2*rin(s%)**deli-(i%*delr)“2)wkref*anini/2/delixrhoref*cpref*va/deltykj5anpl/2/deliz=rhoj*cpj*vb/deltnt(i%,s%)=(w*t(i%-2,s%)+y*t(i%+2,s%)+t(i%,s%)*(x-w-y+z))/(z+x)i%=31anmi=2*3.14159*(rin(s%)+(i%-1)*deli)anpl=2*3.14159*(rin(s%)+(i%+1)*deli)va=3.14159*(2*rin(s%)**deli+(i%*deli)“2-2*rin(s%)*(i%-1)*deli-((i%-1)*deli)“2)vb=3.14159*(2*%)*(i%+1)deli+((i%+1)*deli)“2-2**j%*deli-(i%*deli)“2)w=kj*mimi/2/delix=rhoj*cpj*va/2/delty=kcs5anpl/2/deliz=rhocs*cpcs*vb/deltnt(i%,s%)=(w*t(i%-2,s%)+y*t(i%+2,s%)+t(i%, s%)*(x-w-y+z))/(z+x)i%=32aiphar=kcs/rhocs/cpcsnun=deli“2/aiphar/deltaat(i%+1,s%)*(1+delr/(2*(rin(s%)+i%*deli)))+t(i%_1,s%)*(1-deli/ (2*(rin(s%)+j%*deli)))nt(i%,s%)=(mm-2)/(mm+2)*ot(i%,s%)+2/(mm+2)*aai%=33anml=2*3.14159*(rin(s%)+(i%-1)*deli)anpi=2*3.14159*(rin(s%)+(i%+1)Sdeli)Va=3.14159*(2*rin(s%)*i%*deli+(i%*deli)“2-2*rin(s%)*(i%-1)*deli-((i%-1)*deli)“2)vb3.14159*(2*rin(s%)*(i%+1)*defr+((i%+1)*deli)“2-25rin(s%)*i%*deli-(i%*deli)A2)w=kcs*anmi/2/delix=rhocs*cpcs*va/2/delty=kdur*anpl/2/deliz=rhodur*cpdur*vb/deltnt(i%, s%)=(w*t(i%-2,s%)+y*t(i%+2,s%)+t(i%,s%)*(x-w-y+z))/(z+x)FORi%=34TO40aiphar=kdur/ rhodur/cpdurmmdeft“2/aipharIdeltaa=t(i%+1,s%)*(1+deft1(2*(rin(s%)+j%*deft)))+t(i%-1,s%)*(1-delr/(2*(rin(s%)+j%*deir)))nt(i%,s%)=(mm-2)I(mm+2)*ot(i%,s%)+2/(mm+2)*NEXTi%i%=41anmi=2*3.14159*(rin(s%)+(i%-1)*deir)anpi=2*3.14159*(jj(s%)+(j%+1)*delr)va=3.14159*(2*rin(s%)*j%*delr+(i%*deft)“2-2*rin(s%)*(1%-1)*deft-((i%-1)‘deft)”2)vb=3.14159*(2*rin(s%)*(i%+1)*deft+((i%+1)*deir)“2-2*rin(s%)*j%*deft-(i%*deft)A2)w=kdur*anml/2/deftxrhodur*cpdur*va/ 2/delty=kpar*anpl/2/deftz=rhopar*cppar*vb/deltnt(i%,s%)=(w*t(i%-2,s%)+y*t(i%+2,s%)+t(i%,s%)*(x-w-y+z))/(z+x)FORi%=42T048aiphar=kpar/ rhoparIcpparmm=deft“2/aiphar/deltaa=t(i%+1,s%)*(1+deft/(2*(rin(s%)+i%*deft)))+t(i%-1,s%)*(1-delr1(2*(rin(s%)+j%*deir)))nt(i%,s%)=(mm-2)/(mm+2)*ot(i%,s%)+2/(mm+2)*NEXTi%i%=49anmi=2*3.14159*(rin(s%)+(i%-1)’delr)an=2*3.14159*(rin(s%)+i%*deft)v=3.14159*(2*rin(s%)*i%*deft+(i%*deft)“2-2*rin(s%)*(i%-1)*deft-((i%-1)*deir)2)y=kpar*anml/2/deftx=ha*z=rhopar*cppar*v/ 2/deltx=x/zy=y/znt(i%,s%)=(ot(i%,s%)(1y/2)_x/2*t(i%,s%)+y*t(i%_2,s%)+x*ta)/ (1+x/ 2+y/2)FORs%4TO13i%=0aO=2*3.14159*rin(s%)al=2+3.14159*(rin(s%)+deft)v=3.14159*(defr”2+2*delr*rin(s%))x=hgs*aOykss*al/2/deftz=rhos*cpss*v/2/deltx=x/zyy/znt(i%,s%)=(ot(i%,s%)(1yI2)+y*t(i%+2,s%)xI2*t(i%,S%)+x*ts(s%))/(1+x/2+y12)i%=1anml=2*3.14159*(rin(s%)+(i%-1)*deft)anpl=2*3.14159*(rin(s%)+(i%+1)*deft)va=3.14159*(2*rin(s%)*i%*deft+(i%*deft)“2-2*rin(s%)*(i%-1)*defr-((i%-1)*defr)”2)vb=3.14159*(2*rin(s%)*(i%+1)*delr+((i%+1)*deft)“2-2*rin(s%)*j%*deft-(i%*deft)“2)w=kSs*aflml/2/dekx=rhoss*cpss*va/delty=kdur*anpi/ 2/deftz=rhodur*cpdur*vbIdeltnt(i%,s%)=(w*ts(s%)+y*t(i%+2,s%)+t(i%,s%)*(x-w-y+z))I(z+x)FORi%=2T017alphar=kdur/rhodurIcpdurmm=deft“2/aipharIdeltan=t(i%+1,s%)*(1+deft1(2*(rin(s%)+j%*deft)))+t(i%-1,s%)*(1-deft/(2*(rin(s%)+i%*deft)))nt(i%,s%)=(nun-2)1(mm+2)*ot(i%,s%)+2/(mm+2)*anNEXTi%i%=18anmi=2*3.14159*(rin(s%)+(i%-1)*deft)anpi=2*3.14159*(rin(s%)+(i%+1)*deft)va=3.14159*(2*rin(s%)*j%*delr+(i%*defr)”2-2*rin(s%)*(1%-I)*deli-((i%-1)*deli)“2)vb=3.14159*(2*rin(s%)*(i%+1)*deli+((i%+1)*deft)“2-2*rin(s%)*j%*deli-(i%*deft)‘2)wkdur*aiunl/2/delix=rhodur*cpdur*va/delty=kpar*anpl/2/defrz=rhopar*cppar*vb/deltnt(i%,s%)(w*t(i%-2,s%)+y*t(i%+2,s%)+t(i%,s%)*(x-w-y+z))/(z+x)ass2=hgs*saicell*3.6ts(s%)=(assi*ts(s%-1)+ass2*nt(O, s%))f(assl+ass2)histan=histan+ass2*(ts(s%)-nt(0,s%))NEXTs%ts(0)=ts(13)s%=Ihg=13+1.27*loadave+4.735E-08*(tg(s%)“4-t(0,s%)“4)!(tg(s%)-t(0,s%))FORi%=19TO25aiphar=kpar/ rhopar/cpparmm=deli“2/aiphar/deltas=t(i%+1,s%)*(1+deft!(2*(rin(s%)+j%*deli)))+t(i%-1,s%)*(1-deli/(2*(rin(s%)+j%*deli)))nt(i%,s%)(mm-2)I(mm+2)*ot(i%,s%)+2I(mm+2)*NEXTi%i%=26anml=2*3.14159*(rin(s%)+(i%-1)*deli)an=2*3.14159*(rin(s%)+j%*deft)v=3.14159*(2*rin(s%)i%*defr+(i%*deli)“2-2*rin(s%)*(i%1)*deli-((i%-1)*deli)A2)ykpar’anml/2/deirx=ha*anz=rhopar*cppar*v/2/deltx=xfzyy/znt(i%,s%)(ot(i%,s%)*(1-y/ 2)-x/ 2*t(i%,s%)+y*t(i%-2,s%)+x*ta)/(1+x/ 2+y/2)NEXTs%ENDIFREMHEATLOSSTHROUGHSTANDPIPE(KJIHR)ts(3)=ts(l)FORs%4T013assi=gs**cps3.6HR=hgREMMASSOFSANDINzonersmass=loadave*3.14159*iin(s%)”2*(h(1)+h(2)+h(3))REMMASSOFSANDINRISERATNTSrntsmass=circrat’deltREMMASSOFSANDINRISERATTSrtsmass=rsmass-mtsmassREMNEWSANDTEMPERATUREINRISERnts(s%)=rtsmass/ rsmass*ts(s%)+mtsmass/rsmass*ts(s%-1)REMCALCULATEHEATOFREACTIONAT25DEG.C(KJ/KGFUEL)LOCATE21,25:PRINTHHVLHV=HHV-PFH/2.02*18*2370/100HCOM=LHVREMENTHALPYOFAIRENTERING(KJ/KGAIR)REMREFT=298Ktemp=taiAI=28.94BI=.004147CI=3.191E-06DI=-1.965E-09GOSUB8000hairidhi IMWAIRREMENTHALPYOFWATERENTERINGINCOAL(KJIKGH2O)REMGASAT25DEG.CREMASSUMEFUELENTERSAT25DEGCTHEREFOREIFs%=1THENHH2OII=-2440ELSEHH2OII=0ENDIF7001REMASSUMENOHEATASSOCIATEDWITHSOLIDFUELFEEDREMENTHALPYOFEXITGASES(KJIKG)REMN2temp=tg(s%)AI=29BI=.002119CI=5.723E-06DI=-2.871E-09GOSUB8000HN2O=dhi /m2REM02temp=tg(s%)AI=29.1BI=.01158CI=-6.076E-06DI=1.311E-09GOSUB8000HO2O=dbi Imwo2REMC02temptg(s%)AI=36.11BI =.04233CI=-2.887E-05DI=7.464E-09GOSUB8000HCO2O=dhi /mwco2REMH20temptg(s%)AI=33.46BI=.00688CI=7.604E-06DI=-3.593E-09GOSUB8000hh200=dhi /mwh2oREMHEATOFREACTIONATTEMPERATUREtg(s%)(KJIHR)KGN2O(0)=0KGO2O(0)=0kgco2o(0)=0KGH200(0)=0IFs%=ITHENfeedwat=ffrairin=pair+sairELSEIFs%2THENfeedwat=0airin=sairELSE feedwat=0airm=0ENDIFhrxn=-HCOM*kmco2o(21)*mwc*100IPFC*3600hrxn=hrxn+(HN2O*rn(3)*mwa2)*3600hrxn=hrxn+(H020*kmo2o(21)mwo2)*3600hnm=hrxn+(HCO2O*kmco2o(21)*mwco2)*3600hrxn=hrxn+(hh2oo*kmh2oo(1)*mwh2o)*3600hrxn=hrxn-HH2OII*feedwat*PFH2O/100performmembranewallcalculationsIFr%000T023IFwaterfi<=0THENheafflow=0GOTO22ENDIFGOSUB950022qhx=ntubes%heatfiow*3.623TERM1hnm_qhx+hg*(ar(1)+ar(2)+ar(3))*nt(0,s%)*3.6+3.6*circrat’cps*nts(s%)+ffra*7*(273+20)TERM2=hg*(ar(l)+ar(2)+ar(3))*3.6+16*cirerat*cps+Ifra*.7ntg=TERMI/TERM2tg(s%)=ntgIFr%=0THENtg(s%)=850+273ntgotg(s%)ntg=tg(s%)ENDIFqhx=-hnm-hg*(ar(1)+ar(2)+ar(3))*(tg(s%)-nt(0,s%))*3.6-hs*TAS*rsmass/smass*(tg(s%)-ts(s%))*3.6waterfi=qhx/3.6/4175/(two-twi)ENDIFIF(ABS(ntg-ntgo))>.01THENtg(s%)=(tg(s%)+ntgo)/2ntgo=tg(s%)GOTO7001ENDIFcomputesandtemperatureqs=circrat*cps*(tg(s%)-nts(s%))ts(s%)=(qs*delt/rsmassIeps)/ 2+ts(s%)ts(s%)=tg(s%)hthx=qhxhiris=hg*(ar(1)+ar(2)+ar(3))*(tg(s%)-nt(0,s%))*3.6hgenhrxnhlsand=qs*3600hgencom=HCOMkmco2o(21)*mwc*100/PFC*36008000REMSUBROUTINETOCALCULATEINTEGRALCP.DELTAT(KJIKMOL)dhi=AI*(temp_298)+BI/2*temp*temp_BI/2298*298+CI/3*temp*temp*temp_CI/3*298*298*298REM+DI/4*TEMP**m!.4p*m1pDI/4*298*298*298*298hrxnhrxn-hairi*airincorrectionforsandheattransfercalculation(seep.96330ofnotebook)IFs%=1THENIfra=ffrELSE iu—ENDIFREThRNIFr%=0THENRETURN4000 SOLIDSDISTRIBUTIONtwocontrollerIFtestl%=1THENtwoerror=62-(two-273)setpload=setpload+twoerrorENDIF‘solidsloadingcontrollerIFtestl%=0THENioaderr=setpload-loaddaeration=aeration+.02*loaderrENDIFup=rg*tg(l)IpressIaris/mwg*pair/3600us=rg*tg(l)/press/aris/mwg*tairi/3600db=dcoiumfdp”2*(rhos_rhog)*g/1650/muggsj=23.4-.61833333#*setpload+.00461111#*setploadA213NEXTzcount =count+4sum=sum+4*load(l)=sum!countsum=0count=0FORzip+.1TOlp+isSTEP.1count =count+Isum=sum+gamsusp+(gami -gamsusp)*EXP(-2*(z-.05))NEXTzioad(2)=sum!countloadave=(ip*load(1)+is*load(2))/(lp+is)IFABS(setpload-loadave)>.1THENgsi=gsi+.1*(setpioad-loadave)GOTO13ENDIFdpr=ioadave*9.81*(ip+is)‘calculateriser pressuredropustar=up*(rhogA2/mug/9.81/(rhos-rhog))‘(1/3)ebsi=I-2.1062698#*ristarA.2920853#*(gsj/rhos/(up-Vt))A.3661963#gami=rhos*(1-ebsi)frus/(9.81*dcol)A5frt=vt/(9.81*dcol)A5ciggyI+5.6/fr+.47*frt”.41x=ciggy*gsi/us/rhosgamsusp=(1-11(1+x))*rhos*Isum0count=0FORz=.5TOlpSTEP.1count=count+Isumsum+gamsusp+(gami-gamsusp)*EXP(-2*(z-.05))sum0counts%=Iloadx(1)=gamiFORz.72TOip+.36STEP.36counts%=counts%+Iioadx(counts%)=gamsusp+(gami-gamsusp)*EXP(-2*(z-.18))NEXTzFORzip+.38TOlp+is+.38STEP.38counts%=counts%+Iloadx(counts%)=gamsuap+(ganu-gamsusp)*EXP(-2*(z-.19))PRINTloadx(counts%),z-.19NEXTzbOO=27641.76546#-21151.7156911*psratio+3539.17236211*psratio*psratiobOl-7471.41923411+5728.16923311*psratio-958.419231154#*psratio*psratiob02=502.31684981211-385.72161171811*psratio+64.55494505411*psratio*psratioblO=-503.415904146#+390.80474755411*psratio-66.16993498111*psratio*psratioblI=136.25230768611-105.935064098#*psratio+17.93576923#*psratio*psratiOb12=-9.17167277299999911+7.14264346811*psratio-1.20934065911*psratio*psratiob20=2.12043534511-1.66482186411*psratio+.285242521#*psratio*psratiob21=-.573995728#+.45126282111*psratio-7.732478600000001D-02*psratio*psratiob22=.03863858411-.03042022811*psratio+.00521367511*psratio*psratiobO=bOO+bOl*us+b02*us*usblblO+bll*us+b12*us*usb2=b20+b21*us+b22*us*usgs=bO+bI*loadave+b2*loadave*loadave‘Calculatecyclonepressuredropdeth24*.1524*0635/1524A2*(3048/552451(13144555245))A(1/3) ug=us*.1524”2/.1524/.0635dpcycrhog*ug/s2*delh/2Calculatepressuredropinhorizontalsectionof1-valvevsolids=gs*aris/astanIrhos/(1-ebsmf)rhobulk=rhos*(1-ebsmf)dphor=4.266*vsolids‘.455*.635*rhobulk*9.811(1016/dp)”.25Calculatepressuredropin1-valvebenddpbend=13.8*vsolids”.34*rhobulk/ (.1016/dp)‘.25dptot=dpr +dpcyc+dphor+dpbendPRINTdptot,dpi,dpcyc,dphor,dpbend‘inputz%‘cyclonehydrodynamicsvnl=.09527vs=.0072975#gasres=1/9.677399999999999D-03/ug*(vs+vnl /2)reprhog*ug*dp/mugvterm=(4/225*(rhosrhog)A2*9.81A2/rhog/mug)A(1/3)*dpparties=.032*gasres*rep”.43*((ug-vterm)/vteim).7*((rhos-rhog)/rhog)”.42*.433289465#cycmass=gs*aris*parties‘volumeexcludingvortexfmder(m”3)cycvol=.09527load(3)=cycmass/cycvol‘surfaceareaofcyclone(m”2)cycarea=1.1933hstan=(msolids-loadave*aris*(ip+Is)-cycmass)/rhos1(1-ebsumi)/astangsnew=(ki*aeration*hstan-dptot)*PRINTgsnew, form, dpr,hstar‘inputz%‘GOTO1330 loadd=loadaveloadmem=loadx(18)circrat =gs*arisRETURN* 9365REMGPCCONTROLLERy(O,1)=tg(1)-273y0,1)=y(0,1)_cc(1)*yf_1,1)_cc(2)*yf(_2,1)_cc(3)*yf_3,1)_cc(4)*yf(_4,1)uf-1,1)=u(-1,1)-cc(1)*uf-2,1)-cc(2)*nfl-3,1)-cc(3)*uf4,1)*cc(4)*ut-5,1)duf-1,1)=u(-1,1)-u(-2,1)-cc(1)*dufl-2,1)-cc(2)*duf(-3,1)-cc(3)*dug-4,1)-cc(4)duf(-5,1)dyf0,1)=y(O,1)-y(-l,1)-cc(1)*dyt1-1,1)-cc(2)*dyg-2,1)-cc(3)*dyg-3,1)-cc(4)*dyf(-4,1)spcc(1)=setpnt(1)IFadapt%=0THENGOTO678PERFORMRLSWiTHVARIABLEFORGET1’INGFACTOTTOFITCONSTANTSGOSUB8100678cc(1)-1.6cc(2).64cc(3)=0cc(4)=0IFwarmup%=0THENGOTO689IFnu%>5THENnu%5li%=Ilo%=1e(0,1,lo%)=IF(0,1,lo%)I-a(1,lo%)+cc(1)F(1,1,lo%)a(1,lo%)-a(2,lo%)+cc(2)F(2,I,lo%)=a(2,lo%)-a(3,lo%)+cc(3)F(3,1,lo%)=a(3,Io%)+cc(4)FORj%1TOnc%F(0,j%+1,lo%)=F(1,j%,lo%)-(a(1,lo%)-1)*F(O,j%, lo%)F(1,j%+1,10%)=F(2,j%,lo%)-(a(2,lo%)-a(1,lo%))*F(0,j%,Io%)F(2,j%+1,lo%)=F(3,j%, lo%)-(a(3,lo%)-a(2,lo%))*F(0,j%,lo%)F(3,j%+1,lo%)=a(3,lo%)*F(0,j%, lo%)FORi%=OTOj%.Ie(i%, j%+1,lo%)=e(i%, j%,lo%)NEXTi%e(j%,j%+1,lo%)=F(0,j%,lo%)NEXTj%TNEXTlo%PORlo%=1TOnumout%FORIi%=lTOnumin%FORi%=0TO3g(i%,1,lo%,li%)=b(i%,lo%,li%)NEXTi%NEXTli%FORj%ITOnc%FORli%=ITOnumin%FORk%=OTOj%+3g(k%,j%+1,lo%,li%)=0NEXTk%FORi%=0TOj%FORk%=0TO3g(i%+k%,j%+1,lo%,li%)=g(i%+k%,j%+1,lo%,li%)+e(i%, j%+1,lo%)*b(k%,lo%,li%)NEXTk%NEXTi%NEXT11%NEXTj%¶NEXTlo%FORi%=0TO3ganima(i%, 0)=0gp(0)0NEXTi%FORj%=0TOnc%gp(j%+1)(e(j%,j%+1,1)b(0,1,1)+gamma(0,j%))ganima(0,j%+1)=gamma(1,j%)+e(j%,j%+1,1)*b(1,1,1)-cc(1)*gp(j%+1)gainma(1,j%+1)=gamma(2,j%)+e(j%,j%+I,1)*b(2,1,1)_cc(2)*gp(j%+1)gamma(2,j%+1)=gamma(3,j%)+e(j%,j%+1,1)*b(3,1,1)-cc(3)*gp(j%+1)gamma(3,j%+1)=cc(4)*gp(j%+1)NEXTj%FORi%=1TOnc%FORj%1TOnc%IFj%>i%THENgm(i%,j%)=0ELSE gm(i%,j%)=gp(i%-j%)ENDIFNEXTj%NEXTi%FORi%1TOnc%id(i%,i%)=id(i%,i%)*lain(i%,1)NEXTi%CALLmattran(nc%,nu%, ginO, holdaO)CALLmatmult(nu%,nc%, nu%,holda(3, gins,ho1db)CALLMATADD(nu%, nu%,ho1db,idO,holdeO)CALLmatinvrs(nu%, ho1de),ho1dc)CALLmatmult(nu%, nu%,nc%, holdcO,holdaO,gte)FORi%=ITO10FORj%=1TO10IFi%=j%THENid(i%,j%)=IELSE id(i%, j%)=0ENDIFNEXTj%NEXTi%w(0,1)=y(0,1)FORi%=1TOnc%w(i%,1)=alph(1)*w(i%_I,1)+(1_alph(1))*spcc(1)NEXTi%FORi%=ITOnc%lfXi%,1)=F(0,j%,I)*yf0,1)+F(1,i%,I)*y11-l,1)+F(2,i%,1)*1)+F(3,i%,I)*yfl_3,1)1fi%,1)=1fi%,1)+gamma(0,i%)*(uf-1,1)-ufl-2,1))+gamma(1,i%)*(uf-2,1)-ug-3,1))+gamnia(2,1%)*(uf-3,1)-uf-4,1)) +gainma(3,i%)*(ufI-4,1)-uf-5,1))NEXTi%CALLmatsub(nc%,1,w,1f),holdaO)CALLmatmult(nu%,nc%,1,gte,ho1da,ho1db)u(0,1)u(-1,1)+holdb(1,1)‘u(O,2)=u(-1, 2)+holdb(nu%+1,1)IFu(0,1)>22THENu(O,1)=22ENDIFIFu(0,1)<-18THENu(0,1)=-18ENDIF‘IFu(0,2)>250THENu(0,2)=250‘ENDIF‘IFu(0,2)<150THENu(0,2)=150‘ENDIF689IFwarinup%=0THENu(0,1)=flh-18u(0,2)tairiELSE ffr=u(0,1)+18tairiu(0,2)ENDIFi%=IFORj%=-5TO-IFORi%=ITOlOy(j%,i%)y(j%+1,i%)u(j%,i%)=u(j%+I,i%)yfTj%,i%)=yffj%+1,i%)uf(j%,i%)=uf(j%+1,i%)dyftj%,i%)=dyf(j%+I,i%)duf(j%,i%)=duf(j%+I,i%)NEXTj%change%=1RETURNerrer=errer +fi(i%)*theta(i%)NEXTi%errer=dyf(0,I)-errerFORi%=ITO10FORj%=ITOlOpt(i%,j%)=p(i%,j%, lo%)NEXTj%NEXTi%ON008100 SUBROUTINETOPERFORMVARIABLEFORGETIINOFACTORRLSlo%=Ifi(I)=-dyf(-I,1)ft(2)=-dyf-2,1)fi(3)’-dyf-3,1)fi(4)=duf-1,I)fi(5)=duf-2,1)fi(6)”duf-3,1)fi(7)=duf-4,1)theta(I)=a(I,lo%)theta(2)=a(2,lo%)theta(3)=a(3,lo%)theta(4)=b(0,lo%,1)theta(5)=b(1,lo%,1)theta(6)=b(2,lo%,1)theta(7)=b(3,lo%,I)FORi%=ITOI0FORj%=ITOlOholda(i%,j%)0NEXTj%NEXTi%FORi%=ITOlOholda(i%,I)=fi(i%)NEXTi%CALLmattran(I0,10, holdaO,ho1db)CALLmatmult(10,10,10,ho1db,ptO, holdcO)valuel=0FORi%=ITOlOvaluel=valuel+holdc(1,i%)*fi(i%)NEXTi%lamrlsI-errer“2/(1000*(I+valuel))IFlamrls<.9THENIamrls=.9lamrls.9CALLmatmult(10,10,10,pta, holdaO, hoiddO)FORi%=ITOlOk(i%)=holdd(i%,1)1(1+valuel)NEXTi%errer=0FORi%=ITOlOtheta(i%)=theta(j%)+k(i%)*errerNEXTi%FORi%=ITOlOFORj%=ITOlOholde(i%, j%)0NEXTj%NEXTi%FORi%=ITO10holde(i%,1)=k(i%)NEXTi%CALLmatmult(10,10,10, holdeO, holdcO,holdfQ)CALLmatsub(10,10,ptQ, ho1df),wrisO)lFwrls(I,I)/lamrls<=1THENFORi%=ITO10FORj%=ITO10pt(i%, j%) =wrls(i%, j%)IlainrisNEXTj%NEXTi%ELSE FORi%=ITO1OFORj%=1TOlOpt(i%, j%) =wrls(i%, j%)NEXTj%NEXTi%ENDIFtrace0FORi%=1TOIOFORj%=ITO1Op(i%,j%,lo%)=pt(i%, j%)IFi%=j%THENtrace=trace+p(i%, j%, lo%)ENDIFNEXTj%NEXTi%a(2,lo%)=theta(2)a(3,lo%)=theta(3)b(0,lo%,1)=theta(4)b(I,lo%,1)theta(5)b(2,lo%,1)=theta(6)b(3,lo%,I)=theta(7)RETURN9500 subroutinefor membranewall heat transferwaterq=waterfi/1000hirn58.9166*(5+8415025111*vlaterqA.851)7501dtl‘tg(s%)-twidt2=tg(s%)-twohntd=(dtl-dt2)/LOG(dtl/dt2)7502‘loadrnem=30horn=13+2*loadrnern+4.735E-08*(tg(s%)A4twallA4)/(tg(s%)-twall)dto=Imtd/(I.5958*hom/him+.00027822511*hom+1)twalln=tg(s%)-dtoIFABS(twalln-twall)>ITHENtwall =(twall +twafln)/2GOTO7502ENDIFuornl/(1.5958/hinj-t-.000278225#+1/horn)a(1,lo%)=theta(l)heatfiowuom*aom*lmtdtwon=heatfiowI waterfi/4175+twiIFtwon>373TI{ENtwon=373IFABS(twon-two)>.0001THENtwo=(twon+two)/2IFtwo>373THENtwo=373GOTO7501ENDIFRETURNKEY1,“on/off’KEY2KEY3,KEY4,“u-ch”KEYS“l-ch”}CEY6,KEY7,“u-sp”KEY8,“l-sp”KEY9,KEY10,“main”KEY(1)ONKEY(2)ONKEY(3)ONKEY(4)ONKEY(S)ONKEY(6)ONKEY(7)ONKEY(S)ONKEY(9)ONKEY(10)ONONKEY(1)GOSUB9710ONKEY(2)GOSUB9990ONKEY(3)GOSUB9990ONKEY(4)GOSUB97209710ONKEY(5)GOSUB9730ONKEY(6)GOSUB9990ONKEY(7)GOSUB9740ONKEY(8)GOSUB9750ONKEY(9)GOSUB9990ONKEY(10)GOSUB9950KEYONRETURNCLSIFlimit%=0THENlimit%=IELSE limit%=0ENDIFRETURN9720CLSINPUT“upperlimitofchange=?“;uchRETURN9730CLSINPUT“lowerlimitofchange=?“;IchRETURN9740CLSINPUT“upperset-point =?“;uspusp=usp+273RETURN9750CLSINPUT“lowerset-point =?“;ispisp”’isp+273RETURN9700CXxc%=xc%+15300REMTHISSUBROUTINESETSUPTEMPLATEFORTEMPERATUREPROFILEPLOTSCOLOR7,0LINE(39,4)-(451,4)LINE(451,4)-(451,156)LINE(451,156)-(39,156)LINE(39,156)-(39,4)LOCATE258:PRINT“FILESTATUSLOCATE658:PRINT“ELAPSEDTIMELOCATE1058:COLOR30:PRINT“L-3LOCATE1458:COLOR2,0:PRINT“L-12LOCATE18,58:COLOR4,0:PRINT“R-SCOLOR14,0LOCATE23,16: PRINT“TRANSIENTTEMPERATUREPROFILES”COLOR7,0x%39REM**************************************************************5400REMSUBROUTINETOPUTNUMBERSONTEMPERATUREPROFILETEMPLATEIFcountint%0THENmaxt%950mint%=800xc%=xc%+1IFxc%>450THENLINE(xc%-1,162)-(xc%-1,157),0LINE(xc%-1,157)-(xc%-1-2,159),0LINE(xc%-1,157)-(xc%-1+2,159),0LINE(xe%-1-2,159)-(xc%-1+2,159),0xc%=40ENDIFCOLOR8,0LINE(xc%, 5)-(xc%,155),0IFXxc%<=450THENLINE(Xxc%, 5)-(Xxe%,155)ENDIFREMDEFINEPOINTFORL-3PTI%=INT((((8-dznpo2) /8)*150)+5)REMDEFINEPOINTFORL-12PT2%=INT((((maxt%-(tg(1)-273))!150)*150)+5)REMDEFINEPOINTFORR-5PT3%=INT((((maxt%-VALUE(1,14))!200)*150)+5)REMDEFINELIMITSOFVALUESFORPLOTIFPTI%<5THENPTI%=5IFPT2%<5THENPT2%=5IFPT3%<5THENPT3%=5JFPTI%>155THENPTI%=155IFPT2%>155THENPT2%=155IFPT3%>155THENPT3%=155REMPUTONPOINTSCOLOR3,0:PSET(xc%, PTI%)COLOR2,0:PSET(xc%, PT2%)COLOR4,0:PSET(xc%,PT3%)REMDRAWCUTEL11TLEARROWCOLOR5,0LINE(xc%-1,162)-(xc%-1,157),0LINE(xc%-1,157)-(xc%-1-2,159),0LINE(xc%-1,157)-(xc%-I+2,159),0LINE(xc%-1-2,158)-(xc%-1+2,159),0LINE(xc%,162)-(xc%,157)LINE(xc%,157)-(xc%-2,159)LINE(xc%,157)-(xc%+2,159)LINE(xc%-2,159)-(xc%+2,159)ENDIFREMPUTONTHENUMBERSLOCATE3,65IFsaver%0THENCOLOR7,0:PRINT“WAITING”ELSEIFsaver%ITHENCOLOR4,0:PRINT“SAVING”EN])IFCOLOR7,0LOCATE7,65:PRINTUSING“####.##“,minit+count%/60LOCATE11,65:COLOR3,0:PRINTUSING“####.####“;dmpo2LOCATE15,65:COLOR2,0:PRINTUSING“########“;tg(1)-273LOCATE19,65:COLOR4,0:PRINTUSING“##.####“;ffrCOLOR7,0ENDIFRETURNREM$STATICSUBMATADD(n%,m%,aay),bbxo,c())SUBROUTINETOADDTWOMATRICIESN=#ROWSM=#COLUMNSA=FIRSTMATRIXB=SECONDMATRIXC=RESULTANTMATRIXFORi%=1TOn%FORj%ITOm%c(i%, j%)=aay(i%,j%)+bbx(i%,j%)NEXTJ%NEXTi%EN])SUBSUBROUTINETOTAKETHEINVERSEOFAMATRIX(MUSTBESQUARE)N=#ROWS=11COLUMNSA=INPUTMATRIXB=INVERSEOFMATRIXADIMid(1TO16,ITO16)SETUPIDENTITYMATRIX•FORi%=1TOn%FORj%ITOn%]Fi%=j%THENbbx(i%,j%) =IELSEbbx(i%,j%) =0ENDIFNEXTj%NEXTi%PUTAINTOANOTHERMATRIXTOSAVEAASITISFORi%=1TOn%FORj%=1TOn%id(i%, j%)=aay(i%, j%)NEXTj%NEXTi%GAUSS-JORDANELIMINATIONTOTURNIDINTOIDENTiTYMATRIXRESULTINBISTHEINVERSEFORi%=1TOn%IFid(i%,i%)=0THENFORj%i%+ITOn%IFid(j%,i%)”0ThENFORk%=1TOn%HOLD=id(i%,k%)id(i%, k%)=id(j%, k%)id(j%, k%)=HOLDHOLD=bbx(i%,k%)bbx(i%, k%)=bbx(j%, k%)bbx(j%, k%)=HOLDNEXTk%GOTO10SUBmatinvrs(n%,aay,bbxo)10 66ENDIFIFj%=n%THENPRINT“CANNOTTAKEINVERSEOFMATRIX”STOPENDIFNEXTj%ENDIFHOLD=id(i%,i%)FORj%ITOn%id(i%, j%)=id(i%, j%)/HOLDbbx(i%, j%)=bbx(i%, j%)/HOLDNEXTj%FORj%1TOn%IFj%=i%THENGOTO66HOLD=id(j%,i%)Iid(i%,i%)FORk%=1TOn%id(j%, k%)=id(j%, k%)-HOLD*id(i%,k%)bbx(j%,k%)=bbx(j%,k%)-HOLD*bbx(i%, k%)NEXTk%NEXTj%NEXTi%ENDSUBSUBmatmult (n%,m%,O%, aay,bbxO,c())SUBROUTINETOMULTIPLYTWOMATRICIESN=#ROWSOFMATRIXAM=#COLUMNSOFMATRIXAO=#ROWSOFMATRIXB(ITHINKITSCOLUMNS)A=FIRSTMATRIXB=SECONDMATRIXC=RESULTANTMATRIXIFn%>m%THENBIG%=ELSEBIG%=ENDIFFORi%=ITO10FORj%=1T030c(i%,j%)=0NEXTj%NEXTi%FORk%=1TOn%FORi%=1TO0%FORj%ITOm%c(k%, i%)=c(k%, i%) +aay(k%,j%)*bbx(j%, i%)NEXTj%NEXTi%NEXTk%ENDSUBSUBmatsub(n%,m%, aayO, bbxO,cO)SUBROUTINETOSUBTRACTTWOMATRICIESN=#ROWSM=#COLUMNS$A=FIRSTMATRIXB=SECONDMATRIXC=RESULTANTMATRIXFORi%=1TOn%FORj%ITOm%c(i%,j%)aay(i%, j%)-bbx(i%, j%)NEXTj%NEXTi%ENDSUBSUBmattran(n%,m%, aayO, bbxo)SUBROUflNETOTAKETHETh.ANSPOSEOFAMATRIXIN=#ROWSOFAM=#COLUMNSOFAA=INPUTMATRIXB=TRANSPOSEOFAFORi%=1TOn%FORj%=ITOin%bbx(j%, i%)=aay(i%,j%)NEXTj%NEXTi%ENDSUBAPPENDIX E - PROGRAM LISTING - TIME SERiES ANALYSIS AN]) TRANSFERFUNCTION FilliNGThis appendix provides the listing of the QuickBasic program written for analysis ofthe data collected for process identification. It employs the methods outlined in Section 5.5.2and includes auto-, cross-, and partial-correlation of the data, graphical output to the screenfor model order identification, and parameter fitting of the chosen transfer function.375REMDYNAM1CDECLARESUBVARI (NASINThGER,IASINTEGER,DATAA()ASSINGLE,MEANASSINGLE,VARASSINGLE)DECLARESUBCOREL(AUTOA()ASSINGLE,AUTOB()ASSINGLE,CHOICEASINTEGER,NASINTEGER,DATAA()ASSINGLE,DATAB()ASSINGLE,MEANAASSINGLE,MEANBASSINGLE,VARAASSINGLE,VARBASSINGLE,COROASSINGLE,ERM()ASSINGLE,ERP()AS-SINGLE)DECLARESUBGAUS(CASINTEGER, XX()ASSINGLE,AUTOA()ASSINGLE, CROSSTOASSINGLE, VUASSINGLE,FLAGASINTEGER)REMDIMENSIONVARIABLESDIMFIRST$(ITOll)DIMREF%(ITO10)DIMORDERN%(1TO10)DIMORDERD%(ITO10)DIMDEAD%(1TOIl)DIMVART(1TO11,0T02)DIMMEANT(1TOII,OTO2)DIMDAT(-l0TO1000,1TO11)DIMHOLDER(1T03,1TO11)DIMTEMPD(ITO1000)DIMPLOT(1TO1000)DIMINPCOL%(I1)DIMPLOTM(0TO1000)DIMMEAN(ITO11)DIMVAR(1TO11)DIMCOR(-50TO50)DIMSAVE(-7TO5)DIMTAG(-50TO50)DIMERM(-50TO50)DIMERP(-50TO50)DIMIMPUL(-7TO50,1TO100)DIMAUTO(-50TO50,ITO11)DIMERPP(-50TO50,1TOIi)DIMERMM(-50TO50,1TOII)DIMCROSS(-50TO50,1TO100)DIMCERP(-50TOSO,ITO100)DIMCERM(-50TO50,1TO100)DIMV(lTO51)DIMWATE(0TO50)DIMDATAA(1TO1000)DIMDATAB(1TO1000)DIMAUTOA(-50TO50)DIMAUTOB(-50TO50)DIMCROSST(-50TO51)DIMERRI(ITO1000)DIMSTD(1TO2)DIMCOEF(ITO50)DIMYY(-50TO50)DIMXX(1TO51,1TO51)DIMANS(1TO50)DIMCOEFO(1TO50)DIMYCALC(-I0TO1000,1TO5)DIMDERV(ITO1000,1TO11)DIMAO(-1OTO1000)DIMAOT(0TO1000)DIMYC(0TO1000)DIMNO(-I0TO1000)DIMPART(ITO50)DIMFI(1TO50,1TO50)RMOPENINPUTANDOUTPUTFiLESOPEN“C:OPTOQBprogs’DATA\COR.OUT”FOROUTPUTACCESSWRiTEAS#10OPEN“C:OPTO\QB\progs\DATACORIN”FORINPUTACCESSREADAS#11REMINTI1ALIZEVARIABLESFOR1%=-SOTO50FORJ%=1TOIIAUTO(I%,3%)=0’NEXT3%NEXT1%FOR1%=ITO11DEAD%(I%)=0!FORJ%=-IOTOODAT(J%,1%)=0!NO(J%)=0!NEXTJ%NEXT1%DIF%=0AOT(0)=0YC(0)=0FLAG=0CHECK=0LAM=.001STD(1)=10000FIRST$(11)=“RESIDUALS”REMREADDATAPRINT””PRINT””PRINTPRINT””INPUT#11,N%PRINT””INPUT#11,M%PRINTFOR1%=1TOM%INPUT#11,FIRST$(I%)NEXT1%PRINT””PRINTPRINT“COLUMN”,“NAME”PRINTFOR1%=1TOM%PRINT1%,FIRST$(I%)NEXT1%FOR1%=1TON%FOR3%=1TOM%INPUT#11,DAT(I%,3%)IF3%=ITHENPRINTDAT(I%,3%)INPUTz%NEXT3%NEXT1%FOR1%=1TO6PRINT#10,””NEXT1%PRINT#10,CHR$(34);FIRST$(1);CHR$(34),CHR$(34);FIRST$(2);CHR$(34),CHR$(34);FIRST$(3); CFIR$(34),CHR$(34);FIRST$(4); CHR$(34),CHR$(34);FIRST$(5);CHR$(34),CHR$(34);FIRST$(6); CFIRS(34),CHR$(34);FIRST$(7);CHR$(34)FOR1%=1TON%PRINT#10,DAT(I%,1),DAT(I%, 2),DAT(I%,3),DAT(I%, 4),DAT(I%,5),DAT(I%,6),DAT(I%,7),DAT(I%,8),DAT(I%,9),DAT(1%,10)NEXT1%FOR1%=1TOM%FOR3%=1TON%DAT.AA(3%)=DAT(J%, 1%)NEXT3%VARI N%,1%, DATAAO,MEAN(I%),VAR(I%)MEANT(I%,DIF%)=MEAN(I%)VART(I%, DIF%)=VAR(I%)NEXT1%PRINT#10PRINT#10,CHRS(34);“MEAN”;CHR$(34)PRINT#10,MEAN(1),MEAN(2),MEAN(3),MEAN(4),MEAN(S),MEAN(6),MEAN(7),MEAN(8),MEAN(9),MEAN(10)PRINT#10,””mrr#10,CHR$(34);-“;CHR$(34)PRINT#10,CHR$(34);“VARIANCE”;CHR$(34)PRINT#10,VAR(1),VAR(2),VAR(3),VAR(4),VAR(S),VAR(6),VAR(7),VAR(8),VAR(9),VAR(10)FOR3%=1TOM%FOR1%=1TON%DAT(I%, 3%)=DAT(I%, 3%)-MEAN(J%)NEXT1%NEXTJ%FOR1%=1TOM%FORJ%=1TON%DATAA(J%)DAT(3%, 1%)NEXTJ%VARI N%, 1%, DATAAO,MEAN(I%),VAR(I%)NEXT1%PRINT?TIPRINTINPUT“ENTEROUTPUTCOLUMNFROMPROCESSOUTCOL%INPUT“HOWMANYINPUTSARETHERE?NUMIN%FOR1%=1TONUMJN%PPJJ.JT“INPUTCOLUMNNUMBERFORINPUT“,I%INPUT0%INPCOL%(I%)G%NEXT1%FLAGOER%=0=1CHOICE%=1HALT%=070IFFLAGGER%=1THENGOTO74IFHALT%=1THENCHOICE%=CHOICE%+1HALT%=0DOIT%=IENDIFIFCHOICE%=1THENIFDO%<=NUMIN%THEN=INPCOL%(DOIT%)PRINT“AUTOCORRELATJNGCOLUMN”,A%B%=A%DO1T%=DO1T%+1GOTO7IENDIFA%=OUTCOL%PRINT“AUTOCORRELATINGCOLUMN”,A%B%=A%HALP/o=IGOTO7IELSEIFCHOICE%=2THENIFDOfl’%>NUMIN%THENHALT%=IGOTO70ENDIFA%=INPCOL%(DOIT%)=OUTCOL%PRINT“CROSSCORRELATING”A%“AND”B%DOJT%=DO1T%+1GOTO71ELSEIFDO1T%>NUMIN%THENFLAGGER%=IGOTO70ENDIFA%=INPCOL%(DOIT%)B%=OUTCOL%PRINT“IMPULSERESPONSEOF”,A%,“AND”,B%C%=20DO1T%=DOrr%+1GOTO71ENDIF—10074PRINT””PRINT””PRINT“DEGREEOFD1FFERENCING=“,DIF%PRINT””PRINT“WHATWOULDYOULIKETODO?”71PRINT””PRINT“(1)AUTOCORRELATION”PRINT“(2)CROSSCORRELATION”PRINT“(3)RESPONSE”PRINT“(4)FiTMODEL”PRINT“(5)DIFFERENCEDATA”PRINT“(6)UNDIFFERENCEDATA”PRINT“(7)PLOTS”PRINT“(8)MODELSUMtvIARY”PRINT“(0)QUrr”INPUTCHOICE%IFCHOICE%=0GOTO999IFCHOICE%<0ORCHOICE%>8GOTO70IFCHOICE%=1THENIFFLAGGER%=1THENINPUT“WHICHCOLUMNWOULDYOULIKETOAUTOCORRELATE?—B%=A%ENDIFGOTO620ELSEIFCHOICE%=2THENIFFLAGGER%=1THENINPUT“CROSSCORRELATIONINPUT?—“,A%INPUT“CROSSCORRELATIONOUTPUT?—ENDIFGOTO620ELSEIFCHOICE%=3THENIFFLAGGER%=1THENINPUT“RESPONSEINPUT?—“A%INPUT“RESPONSEOUTPUT?—“,B%REMINPUT“NUMBEROFLAGS?—C%=20ENDIFC%=20GOTO621ELSEIFCHOICE%=4THENGOTO987ELSEIFCHOICE%=5THENDIF%=DIF%+1FOR3%=1TOM%FOR1%=DIF%+1TON%TEMPD(I%)=DAT(I%, 3%) -DAT(I%-1,3%)DATAA(I%-DIF%)=TEMPD(I%)NEXT1%FOR1%=DIF%+1TON%DAT(I%,3%)=TEMPD(I%)NEXT1%VARI N%-DIF%, 3%, DATAAO,MEANT(3%, DIF%),VART(J%, DIF%)FOR1%=DIF%+1TON%DAT(I%, 3%)=DAT(I%,J%)-MEANT(J%, DIF%)DATAA(I%-DIF%)=DAT(I%, 3%)NEXT1%VARI N%-DIF%, 3%, DATAAO,MEAN(J%),VAR(J%)NEXT3%FLAGGER%=0DOIT%=ICHOICE%=1HALT%=0GOTO70ELSEIFCHOICE%=6THENDIF%=DIF%-1FOR3%=1TOM%FOR1%=DIF%+2TON%DAT(I%,3%)=DAT(I%,J%)+MEANT(J%, D]F%+1)+DAT(I%-1,3%) DATAA(I%-DIF%)=DAT(I%,3%)NEXT1%DATAA(1)=DAT(1+DIF%, J%)VARI N%-DIF%, J%, DATAAO,MEAN(J%),VAR(J%)IvIEANT(J%,DIF%+I)0NEXT3%FLAGGER%=0DO1T%=1CHOICE%=1HALT%=0GOTO70ELSEIFCHOICE%=7THENGOTO7000ELSEIFCHOICE%=8THENPRINT”PRINT”PRINT“MODELACCOUNTSFOR”REMPRINT100-100*STANIVAR(C%)PRINT100-100*STAN/VART(C%,0)PRINT“PERCENTOFTHEOUTPUTVARIANCE”PRINT””PRINT“RESIDUALVARIANCE=“,STANFOR1%=1TOH%PRINT“FORTRANSFERFUNCTION”,FIRST$(OUTCOL%),“TO”FIRST$(REF%(I%))PRINT”PRINT”PRINT1NEXT1%PRINT“NOISEMODEL”PRINT”ORDEROFNUMERATOR=“,ONN%PRINT”ORDEROFDENOMINATOR=“,OND%PRINT””FOR1%=1TONUMCO%PRINT“VARIABLE#“,1%,“=“,COEFO(I%)NEXT1%PRINTINPUT“ANYKEYTOCONTINUE”,CRAPpRnNrr#lo,””ENDIFFORI%=-50TO50AUTOA(I%)=AUTO(I%, A%)AUTOB(I%)=AUTO(I%, B%)NEXT1%FOR1%=DIF%+1TON%DATAA(I%-DIF%)=DAT(I%,A%)DATAB(I%-DIF%)=DAT(I%,B%)NEXT1%C%=C%+1FOR1%=-50TO50AUTOA(I%)=AUTO(I%, A%)CROSST(I%)=CROSS(I%,10*A%+B%)NEXT1%FLAG%=1GAUSC%, XXO,AUTOAO, CROSSTO,V(),FLAG%FLAG%=0GOTO670FOR1%=1TO5PRINT#10,””NEXT1%IFCHOICE%=1THENFOR1%=-50TO50AUTO(I%, A%)=COR(I%)ERMM(I%, A%)=ERM(I%)ERPP(I%,A%)=ERP(I%)NEXT1%PRINT#10,CHRS(34);“AUTOCORRELATIONOFCOLUMN”;CHR$(34),A%PRINT#10PRINT#10,CHR$(34)“K”CHR$(34)CHR$(34)“CORREL”;CHR$(34),CHR$(34);“CONFID-”; CHR$(34),CHR$(34);“CONFID+”;CHR$(34) PRINT#10,CI{R$(34);CORELAUTOAO, AUTOBO,CHOICE%, N%-DIF%, DATAAO,DATABO,MEAN(A%),MEAN(B%),VAR(A%),VAR(B%),CORO,ERMO,ERP() GOTO670ORDEROFNUMERATOR=“,ORDERN%(I%)ORDEROFDENOMINATOR=“,ORDERD%(I%)00 C621670620CHR$(34) FOR1%=1TO50FOR1%=1TOC%WATE(I%-1)=V(I%)*SQR(VAR(B%) /VAR(A%))NEXT1%CP%=10*A%+B%FOR1%=0TOC%-1IMPUL(I%,CP%)=WATE(I%)NEXT1%REM*************************************************************REMIMPULSERESPONSEFORWHITENOISEINPUTFOR1%=0TOC%IMPUL(I%,C%)=CROSS(I%,CP%)*SQR(VAR(B%)/VAR(A%))WATE(I%)=IMPUL(I%,C%)NEXT1%R.EM************************************************PRINT#IQ, CHR$(34);“IMPULSERESPONSEOFCOLUMN”;CHRS(34),B%,CHR$(34);”TOCOLUMN”;CHRS(34),A%PRINT#10PRINT#10,CHR$(34);“K”;CHR$(34),CHR$(34);“RESPONSE”;CHR$(34) PRINT#10,CHR$(34);”“;CHR$(34) FOR1%=1TO20PRINT#10,1%.1,WATE(I%-1),ERRI(CP%),-1*ERRJ(999)NEXT1%FOR1%=1TO5PRINT#10,””NEXT1%PRINT#10,CHRS(34);“STEPRESPONSEOFCOLUMN”;CHR$(34),B%,CHR$(34);“TOCOLUMN“;CFIR$(34),A%PRINT#10,””PRINT#10,CHR$(34);“K”;CHR$(34),CHR$(34);“RESPONSE”;CHR$(34) PRINT#10,CHR$(34);”CHR$(34) SUM=0SUMI=0FOR1%=1TO20SUM=SUM+WATE(I%-1)PRINT#10,I%-1,SUMNEXT1%ENDIFGOTO70VARI20,12, WATEO,MEANI,VARIIERRI(CP%)=MEANI-I-2.1*(VApfl/2O)A5ERRJ(999)=-ERRI(CP%)PRINT#10,1%,COR(I%),ERM(I%),ERP(I%)NEXT1%ELSEIFCHOICE%=2THENPRINT#10,C1{R$(34);“CROSSCORRELATIONOFCOLUMN”;CHR$(34),B%,CHR$(34);“TOCOLUMN“;CHR$(34),A%PRINT#10,””PRINT#10,C1{RS(34);“K”;CHR$(34),CHR$(34);“CORREL”;CHR$(34),CHR$(34);“CONFID-”;CHR$(34),CHR$(34);“CONFID+”;CHR$(34) PRINT#10,CHR$(34);”—“;CHRS(34) FOR1%=-50TO50CROSS(I%,10*A%+B%)=COR(I%)CERM(I%,10*A%+B%)=ERM(I%)CERP(I%,10*A%+B%)=ERP(I%)NEXT1%ERRI(10*A%+B%)=ERP(0)/2FORI%=-50TO50PRINT#10,1%,COR(I%),ERM(I%),ERP(I%)NEXT1%ELSEIFCHOICE%=3THENCo987PRINT”PRINTINPUT“ENTEROUTPUTCOLUMNFORMODELRESPONSE“,C%REMC%=OUTCOL%FORI%=ITOIOORDERN%(I%)=0ORDERD%(I%)=0NEXT1%INPUT“HOWMANYINPUTSARETHERE?-“,H%FOR1%=1TOH%PRINT“INPUTCOLUMNNUMBERFORINPUT‘3,1%INPUTG%REF%(I%)=INPUT“ORDEROFNUMERATOR(0-3)“,X%ORDERN%(I%)=X%INPUT“ORDEROFDENOMINATOR(0-3)ORDERD%(1%)=X%INPUT“INPUTDEADTIME—----“,X%DEAD%(I%)X%NEXT1%INPUT“ORDEROFNUMERATOROFNOISE“,ONN% INPUT“ORDEROFDENOMINATOROFNOISE‘3,OND% COUNTS%=0DEADM%=0FORI%=ITOIOIFDEAD%(I%)>DEADM%THENDEADM%=DEAD%(I%)NEXT1%DEADM%=DEADM%+4GOTO2007=IFOR1%=1TOH%FOR3%=0TOORDERN%(I%)PRINT“INPUTINiTIALGUESSFORCOEF#“,K%INPUTCOEF(K%)K%=K%+1NEXTJ%FOR3%=1TOORDERD%(I%)IFORDERD%(I%)=0THENGOTO2006PRINT“INPUTINiTIALGUESSFORCOEF#“,K%INPUTCOEF(K%)K%=K%+1NEXT3%NEXT1%FOR1%=1TOH%IFOND%>0TI-lENGOTO2111IFONN%>0THENGOTO2II1NEXT1%IFH%=01HENGOTO2II2=1FOR1%=ITOH%S%=ORDERN%(I%)B%=DEAD%(I%)CP%=10*REF%(I%) +C%K%=K%+1+ORDERN%(I%)FORL%=B%-1TO-5STEP-1SAVE(L%)=IMPUL(L%, CP%)IMPUL(L%, CP%)=0NEXTL%IFORDERD%(I%)=2THEN=K%+1TI=IMPUL(B%+2+S%, CP%)tIMPUL(B%+S%, CP%)T2=(IMPUL(B%+I+S%,CP%))“2T3=(IMPUL(B%+S%, CP%))“2T4=IMPUL(B%+I+8%, CP%)*IMPUL(B%-1+S%,CP%)COEF(K%)=(T1-T2)/(T3-T4)DEL2=COEF(K%)=K%-iTI=IMPUL(B%+1+S%,CP%) /IMPUL(B%+S%,CP%)T2=IMPUL(B%-1+5%, CP%)/IMPUL(B%+S%, CP%)COEF(K%) =Ti-T2*COEF(K%+I)2006w Go2007DELl=COEF(K%)K%=K%-1-ORDERN%(I%)FORF%=0TOORDERN%(I%)COEF(K%)=DELI*IMPUL(B%-1+F%,CP%)+DEL2*IMPUL(B%-2+F%,CP%)-IMPUL(B%+F%,CP%)COEF(K%)=-1*COEF(K%)K%=K%+1NEXTF%ELSEIFORDERD%(I%)=ITHENCOEF(K%)=IMPUL(B%+1+S%,CP%)/IMPUL(B%+S%,DELl=COEF(K%)K%=K%-1-ORDERN%(I%)FORF%=0TOORDERN%(I%)COEF(K%)=DELI*IMPUL(B%-1+F%,CP%)-IMPUL(B%COEF(K%)=-1*COEF(K%)K%=K%+1NEXTF%ELSEK%=K%-I-ORDERN%(I%)FORF%=0TOORDERN%(I°Jo)COEF(K%)=-1*IMPUL(B%+F%,CP%)COEF(K%)=-I*COEF(K%)K%=K%+1NEXTF%ENDIFK%=K%+ORDERD%(I%)NEXT1%=0FORI%=ITOH%=K%+1+ORDERN%(I%)K%=K%+ORDERD%(I%)=K%+1NEXT1%PRINT“1”B%=DEAD%(I)FORL%=B%-ITO-5STEP-iIMPUL(L%, CP%)=SAVE(L%)NEXTL%PRINT“2”IFOND%1ANDONN%=0THENIFK%=0THENK%=1COEF(K%)=-TAG(I)=K%+1ELSEIFOND%=2ANDONN%0THENPRINT“3”,K%COEF(K%)=-TAG(1)*(I-TAG(2))1(1-TAG(2)A2)K%=K%+IPRINT“4”,K%COEF(K%)=-(TAG(2)-TAG(I)”2)1(1-TAG(I)A2)K%=K%+1PRINT“5”,K%ELSEFOR1%=1TOONN%IFONN%=0THENGOTO2012PRINT“INPUTINITIALGUESSFORCOEF#“,K%INPUTCOEF(K%)=K%+INEXT1%FOR1%=ITOOND%IFOND%=0THENGOTO2016PRINT“INPUTINITIALGUESSFORCOEF#“,K%INPUTCOEF(K%)=K%+INEXT1%ENDIFLAM=.001REMINPUT“LAM?”, LAMREMINPUT“STD(I)?”,SID(1)STD(1)=1E+32NUMCO%=-1CP%)+F%,CP%)0021112112201220169000PRINTNTJMCO%FOR1%=1TONTJMCO%PRINTCOEF(I%)NEXT1%IFH%=0THENFOR1%=1TON%YC(I%)=0NEXT1%Y%=1GOTO9005ENDIFFORI%=-1OTOOFOR3%=1TOH%YCALC(I%, 3%)=0YC(I+10)=0AO(I+10)=0NEXT3%NEXT1%IFDIF%>0THENFOR1%=1TODIF%FOR3%=1TO11HOLDER(I%,3%)=DAT(I%, J%)DAT(I%, 3%)=0NEXTJ%NEXT1%ENDIFFOR1%=1+DIF%TON%=1FORK%=1TOH%YCALC(I%, K%)=0FOR3%=0TOORDERN%(K%)YCALC(I%, K%)=YCALC(I%,K%)+COEF(Y%)*DAT(I%-DEAD%(K%)-3%,REF%(K%))=Y%+1NEXTJ%FORJ%=1TOORDERD%(K%)IFORDERD%(K%) =0THENGOTO593IFABS(YCALC(I%-J%, K%))>IE+25THENPRINT“YCALC=“,YCALC(I%-3%,K%)GOTO74ENDIFYCALC(I%, K%)=YCALC(I%, K%)+COEF(Y%)*YCALC(I%-3%,K%)=Y%+15939005NEXTJ%NEXTK%YC(I%)=0FORU%=1TOH%YC(I%)=YC(I%)+YCALC(I%, U%)NEXTU%NEXT1%NOST%=Y%SUM=0FOR1%=1+DIF%TON%SUM=SUM+YC(I%)NEXT1%REMFOR1%=1+DIF%TON%REMYC(I%)=YC(I%)-SUM/(N%-DIF%)REMNEXT1%FOR1%=1TON%NO(I%)=DAT(I%,C%)-YC(I%)NEXT1%FOR1%=-10TO0AO(I%)=0NO(I%)=0NEXT1%REMREMREMREM500000FOR1%=1+DIF%TON%=NOST%AO(I%)=0FOR3%=0TOONN%IFJ%=0THENAO(I%)=AO(I%)+NO(I%)ELSEAO(I%)=AO(I%)+COEF(Y%)*AO(I%-J%)Y%=‘1%+1ENDIFNEXT3%FORJ%=1TOOND%IFOND%=0THENGOTO835AO(1%)=AO(I%)+COEF(Y%)*NO(I%-3%)=Y%+1NEXT3%NEXT1%FOR1%=1+DIF%TON%AOT(I%)=AO(I%)NEXT1%FOR3%=1+DIF%TON%DATAA(J%-DIF%)=AOT(J%)NEXTJ%1%=11VARIN%-DIF%,1%, DATAAO,MEAN(I%),VAR(I%)STAN=VAR(11)IFSTAN>=STD(1)THENLAM=LAM/1.5CFIECK%=1GOTO1111ELSELAM=LAM*1.5STD(1)=STANFORz%=1TONUMCO%COEFOL=COEF(z%)COEF(z%)=COEF(z%)+COEF(z%)*.001IFH%=0THENFOR1%=1TON%YC(I%)=0NEXT1%=1GOTO9006ENDIFFOR1%=1+DIF%TON%=1FORK%=1TOH%YCALC(I%, K%)=0FOR3%=0TOORDERN%(K%)YCALC(I%, K%)=YCALC(I%,K%)÷COEF(Y%)*DAT(I%-DEAD%(K%)-3%, REF%(K%))=Y%+1NEXT3%FORJ%=1TOORDERD%(K%)IFORDERD%(K%)=0THENGOTO1006YCALC(I%, K%)=YCALC(I%,K%)+COEF(Y%)*YCALC(I%-3%, K%)1006=Y%+1NEXTJ%NEXTK%YC(I%)=0FORU%=1TOH%YC(I%)=YC(I%)+YCALC(I%, U%)NEXTU%NEXT1%SUM=0FOR1%=1+DIF%TON%SUM=SUM+YC(I%)NEXT1%FOR1%=1+DIF%TON%YC(I%)=YC(I%)-SUMI(N%-DIF%)NEXT1%FOR1%=1+DIF%TON%NO(I%)=DAT(I%, C%)-YC(I%)NEXT1%83500‘-‘I9006REMREMREMNEXT1%FOR1%=-10TO0+DIF%AO(1%)=0NO(I%)=0NEXT1%FOR1%=1+DIF%TON%Y%=NOST%AO(I%)=0FOR3%=0TOONN%IF3%=0THENAO(I%)=AO(I%)+NO(I%)ELSEAO(I%)=AO(I%)+COEF(Y%)*AO(I%-3%)=Y%+1ENDIFNEXT3%FOR3%=1TOOND%IFOND%=OTHENGOTO1011AO(I%)=AO(I%)+COEF(Y%)*NO(I%-3%)=Y%+1NEXTJ%NEXT1%FOR1%=1+DIF%TON%DERV(I%, z%)=1000*(AO(I%)-AOT(I%))NEXT1%COEF(z%)=COEFOLNEXTz%FOR1%=1TONUMCO%YY(I%)0FOR3%=20TON%YY(I%)=YY(I%)+AOT(J%)*DERV(J%, 1%)NEXTJ%FORK%=1TONIJMCO%FORJ%=20TON%YY(I%)=YY(I%)-COEF(K%)*DERV(J%, K%)*NEXT3%NEXTK%1111FOR1%=1TONUMCO%YY(I%) =-1*YY(I%)NEXT1%FOR1%=1TONUMCO%FORJ%=1TONTJMCO%XX(I%,3%)=0FORK%=20TON%XX(I%,3%)=XX(I%,3%) +DERV(K%,1%)*NEXT3%NEXT1%GAUSNTJMCO%,XX(), AUTOAO, YYO,ANS,FLAG%SUMCOF0FOR1%=1TONUMCO%COEF(I%)=COEFO(I%)+(ANS(J%)-COEFO(I%))*LAMSUMCOF=SUMCOF+ABS(COEF(I%)-COEFO(I%))NEXT1%PRINT””PRINT””PRINT“LAM=“LAMPRINT“RESU)UALVARIANCE=“,STANFOR1%=1TONTJMCO%PRINT“VARIABLE#“,1%,‘=“,COEFO(I%)NEXT1%DERV(K%,3%)001011NEXTK%REMPRINT””FOR1%1TONIJMCO%COEFO(I%)=COEF(I%)NEXT1%ENDIFDERV(3%,1%)REMPRINTLAM,STAN,COEF(1), COEF(2)REMIFLAM<IE-lOTHENGOTO9994IFLAM<.000000l#THENGOTO9994IFCHECK%=1THEN(IOTO5713REMIFSUMCOF<IE-lOTHENGOTO9994REMIFSUMCOF<.001THENGOTO9994REMPRINTSUMCOF5713COUNTS%=COUNTS%+1CHECK%=0GOTO5000IFCOUNTS%<3THENGOTO5713FOR1%=ITONUMCO%PRINTCOEF(1%)NEXT1%IFDIF%>0THENFOR1%=1TODIF%FOR3%=ITO11DAT(I%,3%)=HOLDER(I%,3%)NEXT3%NEXT1%ENDIFPRINTPRINT””PRINT“MODELACCOUNTSFOR”REMPRINT100-100*STAN/VAR(C%)PRINT100-100*STAN/VART(C%,0)PRINT“PERCENTOFTHEOUTPUTVARIANCE”PRINT””INPUT“ANYKEYTOCON11NUE”CRAPPRINT#10PRINT#10,””PRINT#10,CHR$(34);“MODELACCOUNTSFOR”;CHRS(34)PRINT#10,100-100*STAN/VAR(C%)PRINT#10,CHR$(34);“PERCENTOFTHEOUTPUTVARIANCE”;CHRS(34)PRINT#10,””FOR1%=1TONUMCO%PRINT#10,CHR$(34);“COEFFICIENT#“;CHR$(34),1%, CHR$(34);“““;CHR$(34),COEF(I%)NEXT1%PRINT#l0,””PRINT#10PRINT#10,””FOR1%=0TON%DAT(I%,11)=AOT(I%)NEXT1%FOR3%=1+DIF%TON%DATAA(J%-DIF%)=DAT(J%,11)NEXT3%1%=11VARIN%-DIF%,1%, DATAAO,MEAN(I%),VAR(I%)PRINT#10,CHR$(34);“MEANOFRESIDUALS=“;CHR$(34),MEAN(I%)PRINT#10,CHR$(34);“VARIANCEOFRESIDUALS=“;CHRS(34),VAR(I%)PRINT#10PRINT#10,””B%=11FOR3%=0TOH%IF3%=0THENA%=B%CHOICE%=1PRINT“AUTOCORRELATINGRESIDUALS”PRINT””PRINT””ELSEA%=p%(J%)CHOICE%=2PRINT“CROSSCORRELATINGINPUTSWiTHRESIDUALS”999400PRINT”PRINT”ENDIFFORI%=-50T050AUTOA(I%)=AUTO(I%,A%)AUTOB(I%)=AIJTO(I%,B%)NEXT1%FOR1%=1+DIF%TON%DATAA(I%-DIF%)=DAT(I%,A%)DATAB(I%-DIF%)=DAT(I%,B%)NEXT1%CORELAUTOAO,AUTOBO,CHOICE%, N%-DIF%, DATAAO,DATABO,MEAN(A%),MEAN(B%),VAR(A%),VAR(B%),CORO,ERMO,ERP()IF3%=0THENFORI%=-50T050AUTO(I%,A%)=COR(I%)IFONN%=0ANt)OND%=0ThENTAG(I%)=COR(I%)ERMM(I%,A%)=ERM(I%)ERPP(1%,A%)=ERP(I%)NEXT1%PRINT#10,CHR$(34);“AUTOCORRELATIONOFTHERESIDUALS”CHR$(34)PRINT#10PRINT#10CHR$(34)“K”CHR$(34)CHR$(34)“CORREL”CHR$(34),CHR$(34);“CONFID-”;CHR$(34),CHR$(34);“CONFID+”;CHR$(34)CHR$(34)PRINT#10,CHR$(34);“-FORI%=1T050PRINT#10,1%,COR(I%),ERM(I%),ERP(I%)NEXT1%PRINT#10PRINT#10,””ELSEPRINT#10,CHR$(34);“CROSSCORRELATIONOFCOLUMN“;CHR$(34),A%,CHR$(34);“WiTHTHERESIDUALS”;CHR$(34)pR[NT#1o,””PRINT#10,CHR$(34)“K”CHR$(34),CHR$(34)“CORREL”CHR$(34),CHR$(34);“CONFID-”;CHR$(34),CHR$(34);“CONFID+”;CHR$(34)CHR$(34)PRINT#10,CHR$(34);FORI%=-50TO50CROSS(I%,10*A%+B%)=COR(I%)CERP(I%,10*A%+B%)=ERP(I%)CERM(I%,10*A%+B%) =ERM(I%)NEXT1%ERRI(10*A%+B%)=ERP(0)/2FOR1%=-50TO50PRINT#10,1%,COR(I%),ERM(I%),ERP(I%)NEXT1%PRINT#10PRINT#10,””ENDIFNEXT3%PRINT“PARTIALCORRELATINGRESIDUALS”PRINT””FI(1,1)=AUTO(1,11)PART(1)=FI(1,1)FORP%=1T019TOPSUM=0BOTSUM=0FOR3%1TOP%TOPSUM=TOPSUM+F1(P%,J%)*AUTO(P%+1-3%,11)BOTSUM=BOTSUM+FI(P%,3%)*AUTO(J%,11)NEXT3%FI(P%+1,P%+1)=(AUTO(P%+1,11)-TOPSUM)/(1-BOTSUM)J%+1)PART(P%+1)=FI(P%+1,P%+1)FOR3%=1TOP%FI(P%+1,J%)’FI(P%,J%)-FI(P%+1,P%+1)*FI(P%,P%NEXT3%NEXTP%00 00CHR$(34)PRINT#10PRINT#10,CHR$(34);“K”;CHR$(34),CHR$(34);“CORREL”;CHRS(34)FOR1%=1TO20PRINT#10,1%,PART(I%)NEXT1%7000PRINT#10PRINT#10,””PRINT#10,CHR$(34);“RESIDUALS”;CHR$(34)PRINT#10,””FOR1%=1TON%PRINT#10,DAT(I%,11)NEXT1%PRINT#10PRINT#10,””GOTO70CLSSCREEN8PRINT“PLOTOF”PRINT”(1)RAWDATA”PRINT”(2)AUTOCORRELATION”PRINT”(3)CROSSCORRELATION”PRINT”(4)IMPULSERESPONSE”PRINT”(5)CROSSCORELATLONOFINPUTWITHRESIDUALS”PRINT”(6)AUTOCORRELATIONOFRESIDUALS”PRINT”(7)PARTIALCORRELATIONOFRESIDUALS”PRINT”(8)FULLMODELRESPONSE”PRINT”(0)RETURNTOMAINMENU”INPUTP%IFP%=1THENINPUT“WHICHCOLUMN7”,A%CLSCOLOR7,0LINE(39,4)-(451,4)LINE(451, 4)-(451,156)LINE(451,156)-(39,156)5)LINE(39,156)-(39, 4)MINX=1+DIF%MAXX=N%MINY=0MAXY=0FOR1%=1+DIF%TON%IFDAT(I%, A%)<MINYTHENMINY=DAT(I%, A%)IFDAT(I%, A%)>MAXYTHENMAXY=DAT(I%, A%)NEXT1%Y%=INT((MAXY-0)/(MAXY-MINY)150+5)LINE(39,Y%)-(451, Y%)COLOR4,01%=1+DIF%X%=INT((I%-MINX)/(MAXX-MINX)*400+40)Y%=INT((MAXY-DAT(I%,A%))!(MAXY-MINY)*150+5)PSET(X%,Y%)XO%=X%YO%=Y%FOR1%=2+DIF%TON%X%=INT((I%-MINX)/(MAXX-MINX)*400+40)Y%=INT((MAXY-DAT(I%,A%))/(MAXY-MINY)*150+LINE(XO%,YO%)-(X%, Y%)XO%=X%YO%=NEXT1%COLOR2,0LOCATE2,58:PRINT“MEAN”LOCATE3,58PRINTMEANT(A%, DIF%)LOCATE6,58:PRINT“VARI”LOCATE7,58PRINTVART(A%, DIF%)LOCATE10,58:PRINT“DOFD”LOCATE11,58:PRINTDIF%COLOR9,0LOCATE23,16:PRINT“RAWDATAPLOTOF”,FIRST$(A%)COLOR9,0LOCATE1,1:PRINTMAXYPRINT#10,CHR$(34);“PARTIALCORRELATIONOFRESIDUALS”;005)LOCATE21,1:PRINTMINYLOCATE21,40:PRINT“NUMBEROFPOINTS”LOCATE21,57:PRINTMAXXCOLOR7,0LOCATE24,16:INPUT“ANYKEYTOCONTINUE”,z%GOTO7000ELSEIFP°!0=2THENINPUT“WHICHCOLUMN7”,A%CLSCOLOR7,0LINE(39,4)-(451,4)LINE(451,4)-(451,156)LINE(451,156)—(39,156)LINE(39,156)-(39,4)MINX=0MAXX=20MINY=0MAXY=0FOR1%=1TO20IFAUTO(I%, A%)<MENYTHENMINY=AUTO(I%, A%)IFAUTO(I%, A%)>MAXYTHENMAXY=AUTO(I%, A%)NEXT1%YC%=JNT((MAXY.0)/(MAXYMINY)*150+5)LINE(39,YC%)-(451,YC%)FOR1%=1TO20X%=INT((I%M1NX)/(MAXXMINX)*400+40)Y%=INT((MAXY-AUTO(I%, A%))/(MAXY-MINY)*150+IF(AUTO(I%, A%)>ERPP(I%, A%))OR(AUTO(I%, A%)<ERMM(I%,A%))THEN COLOR4,0ELSECOLOR9,0ENDIFLINE(X%, Y%)-(X%,YC%)NEXT1%COLOR2,0LOCATE10,58:PRINT“DOFD”LOCATE11,58:PRINTDIF%COLOR9,0LOCATE23,16:PRINT“AUTOCORRELATIONOF”,FIRST$(A%)COLOR7,0LOCATE24,16: INPUT“ANYKEYTOCONTINUE”,z%GOTO7000ELSEIFP%3THENINPUT“INPUTCOLUMN7”, A%INPUT“OUThUTCOLUMN7”,B%CLSCOLOR7,0LINE(39,4)-(451,4)LINE(451, 4)-(451,156)LINE(451,156)-(39,156)LINE(39,156)-(39, 4)MINX=-20MAXX=20IvIINY=0MAXY=0FOR1%=-20TO20IFCROSS(I%,10*A%+B%)<MINYTHENMINY=CROSS(I%,10*A%+B%)IFCROSS(I%,10*A%+B%)>MA4j4)(yCROSS(I%,10*A%+B%)NEXT1%YC%=INT((MAXY-0)/(MAXY-MINY)150+5)LINE(39,YC%)-(451, YC%)X%=INT((0M1NX)I(MAXX.MINX)*400+40)LINE(X%, 4)-(X%,156)FOR1%=-20TO20X%=INT((I%.MINX)!(MAXXMINX)*400+40)Y%=INT((MAXY-CROSS(I%,10*A%+B%))/(MAXY-ffl4y)*150+5) IF(CROSS(I%,10*A%+B%)>CERP(I%,10*A%+B%))OR(CROSS(I%,10*A%+B%)<CERM(I%,10*A%+B%))TI-lENCOLOR4,0ELSEENDIFLINE(X%,Y%)-(X%, YC%)‘0 CCOLOR9,0NEXT1%COLOR2,0LOCATE10,58:PRINT“DOFD”LOCATE11,58:PRINTDIF%COLOR9,0LOCATE23,5:PRINT“CROSSCORRELATIONOF”,FIRST$(B%),“TO”,FIRST$(A%)COLOR7,0LOCATE24,16:INPUT“ANYKEYTOCONTINUE”,z%GOTO7000ELSEIFP%4THENINPUT“INPUTCOLUMN?“,A%INPUT“OUTPUTCOLUMN?“,B%CLSCOLOR7,0LINE(39,4)-(451,4)LINE(451,4)-(451,156)LINE(451,156)-(39,156)LINE(39,156)-(39,4)MINX=0MAXX=20MINY=0MAXY=0FOR1%=0TO20IFIMPUL(I%,10*A%+B%)<MINYTHENMINY=IMPIJL(I%,10*A%+8%)IFIMPUL(I%,10*A%+B%)>MAXYTHENMAXY=IIvIPUL(I%,10*A%+B%)NEXT1%YC%=INT((MAXY-0)/(MAXY-MINY)*150+5)LINE(39,YC%)-(451,YC%)FOR1%=0TO20X%=INT((I%.M1NX)/(MAXXMINX)*400+40)Y%=INT((MAXY-IIvIPUL(I%,10*A%+B%))/(MAXY-4Jf)*150+5) IF(IMPUL(I%,10*A%+B%)>ERRI(10*A%+B%))OR(IMPUL(I%,10*A%+B%)<ERRI(999))THENCOLOR4,0ELSECOLOR9,0ENDIFLINE(X%, Y%)-(X%,YC%)NEXT1%COLOR2,0LOCATE10,58:PRINT“DOFD”LOCATE11,58:PRINTDIF%COLOR9,0LOCATE23,5:PRINT“IMPULSERESPONSEOF”, FIRST$(B%),“TO”,FIRST$(A%)COLOR7,0LOCATE24,16:INPUT“ANYKEYTOCONTINUE”,Z%GOTO7000ELSEIFP%5THENINPUT“INPUTCOLUMN7”,A%B%=11CLSCOLOR7,0LINE(39,4)-(451,4)LINE(451, 4)-(451,156)LINE(451,156)-(39,156)LINE(39,156)-(39, 4)MINX=-20MAXX=20MINY=0MAXY=0FOR1%=-20TO20IFCROSS(I%,10*A%+B%)<fflr4INy=CROSS(I%,10*A%+B%)IFCROSS(I%,10*A%+B%)>MAXYTHENMAXY=CROSS(1%,10*A%+B%)NEXT1%YC%=INT((MAXY-0)!(MAXY-M]NY)*150+5)LINE(39,YC%)-(451, YC%)X%=INT((0.MINX)!(MAXXM]NX)*400I40)LINE(X%, 4)-(X%,156)FOR1%=-20TO20X%=INT((I%-MINX) /(MAXX-MINX)*400+40)NY%=INT((MAXY-CROSS(T%,10*A%+B%))/(MAXY-ffly)*150+5) IF(CROSS(I%,10*A%+B%)>CERP(I%,10*A%+B%))OR(CROSS(I%,10*A%+B%)<CERM(I%,10*A%+B%))THENCOLOR4,0COLOR9,0ENDIFLINE(X%,Y%)-(X%,YC%)NEXT1%COLOR2,0LOCATE10,58:PRINT“DOFD”LOCATE11,58:PRINTDIF%COLOR9,0LOCATE23,5:PRINT“CROSSCORRELAllONOFRESIDUALSTO”,FIRST$(A%)COLOR7,0LOCATE24,16:INPUT“ANYKEYTOCONTINUE”,z%GOTO7000A%=11CLSCOLOR7,0LINE(39,4)-(45I,4)LINE(451,4)—(451,156)LINE(451,156)-(39,156)LINE(39,156)-(39,4)MINX=0MAXX=20MINY=0MAXY=0FOR1%=1TO20IFAUTO(I%,A%)<MINYTHENMINY=AUTO(I%, A%)IFAUTO(I%,A%)>MAXYTHENMAXY=AUTO(I%, A%)NEXT1%YC%=INT((MAXY0)/(MAXYMINY)*150+5)LINE(39,YC%)-(451,YC%)FOR1%=1TO205)X%=INT((I%MINX)/(MAXX.MINX)*400+40)=INT((MAXY-AUTO(I%,A%))/(MAXY-MINY)*150+IF(AUTO(I%,A%)>ERPP(I%, A%))OR(AUTO(I%,A%)<ERMM(I%, A%))THENCOLOR4,0ELSECOLOR9,0ENDIFLINE(X%,Y%)-(X%,YC%)NEXT1%COLOR2,0LOCATE10,58:PRINT“DOFD”LOCATE11,58:PRINTDIF%COLOR9,0LOCATE23,16:PRINT“AUTOCORRELATIONOFRESIDUALS”COLOR7,0LOCATE24,16:INPUT“ANYKEYTOCONTINUE”,z%GOTO7000ELSEIFP%=7THENCLSCOLOR7,0LINE(39,4)-(451,4)LINE(451,4)-(45I,156)LINE(451,156)-(39,156)LINE(39,156)-(39,4)MINX=0MAXX=20MINY=0MAXY=0FOR1%=1TO20IFPART(I%)<MINYTHENMINY=PART(I%)IFPART(I%)>MAXYTHENMAXY=PART(I%)NEXT1%YC%=INT((MAXY-0)/(MAXY-MINY)150+5)LINE(39,YC%)-(451,YC%)COLOR4,0FOR1%=1TO20ELSEELSEIFP%6THENIN.)X%=INT((I%MINX)/(MAXXM1NX)*4OO+4O)=INT((MAXY-PART(I%))/(MAXY-MINY)*150+5)LINE(X%,Y%)-(X%,YC%)NEXT1%COLOR2,0LOCATE10,58:PRINT“DOFD”LOCATE11,58:PRINTDIF%COLOR9,0LOCATE23,16:PRINT“PARTIALCORRELATIONOFRESIDUALS”COLOR7,0LOCATE24,16: INPUT“ANYKEYTOCONTINUE”,z%GOTO7000ELSEIFP%=8THENCLSINPUT“OUTPUTCOLUMN?”, A%A%=OUTCOL%CLSCOLOR7,0LINE(39,4)-(451,4)LINE(451,4)-(451,156)LINE(451,156)-(39,156)LINE(39,156)-(39,4)MINX=MAXX=N%MINY=0MAXY=0FOR1%=1TON%PLOT(I%)=DAT(I%,A%)NEXT1%DIFT%=DIF%997IFDIFT%=0THENGOTO996DIFT%=DIFT%-1FORI%DIFT%+2TON%PLOTf(I%)=PLOTT(I%)+MEANT(A%,DIFT%+1)+GOTO997996FORI%=1TON%PLOT(I%)=PLOT(I%)+MEANT(A%, DIF%)PLOTM(I%)=PLOT(1%)-DAT(1%,11)NEXT1%VARJN%,1%, PLOTrO,DMEAN,DVARVARI N%,1%, PLOThO,M1,4EAN, MVARMINY=PLOTT(1)MAXY=PLOT(1)FOR1%=1TON%IFPLOT(I%)<MINYTHENMINY=PLOT(I%)IFPLOTr(I%)>MAXYTHENMAXY=PLOU(I%)IFPLOTM(I%)<MINYTHENMINY=PLOTM(I%)IFPLOTM(I%)>MAXYTHENMAXY=PLOTM(I%)NEXT1%COLOR9,01%=1+DIF%X%=INT((I%-MINX)/(MAXX-MENX)*400+40)Y%=INT((MAXY-PLOT(I%))/(MAXY-MINY)*150+5)PSET(X%,Y%)XO%=X%YO%=Y%FOR1%=2+DJF%TON%X%=INT((I%-MINX)/(MAXX-MINX)*400+40)Y%=INT((MAXY-PLOTF(I%))/(MAXY-M]NY)*150+5)LINE(XO%,YO%)-(X%,Y%)XO%=X%YO%=Y%NEXT1%COLOR4,01%=1+DIF%X%=INT((I%-MINX)/(MAXX-MINX)400+40)Y%=INT((MAXY-PLOTM(I%))/ (MAXY-M[NY)*150+5)PSET(X%,Y%)XO%=X%YO%=FOR1%=2+DIF%TON%X%=INT((I%MINX)/(MAXXMENX)*40O+40)REMPLOTT(I%-1)NEXT1%Y%=]NT((MAXY-PLOTM(I%))/(MAXY-IvIINY)*150+5)LINE(XO%,YO%)-(X%, Y%)XO%=X%YO%=NEXT1%COLOR4,0LOCATE2,58:PRINT“MODEL”LOCATE3,58:PRINT“MEAN”LOCATE3,64:PRINTMMEANLOCATE4,58:PRINT“VAR”LOCATE4,64:PRINTMVARCOLOR9,0LOCATE658PRINT“DATA”LOCATE7,58:PRINT“MEAN”LOCATE7,64:PRINTDMEANLOCATE8,58:PRINT“VAR”LOCATE8,64:PRINTDVARCOLOR2,0LOCATE10,58:PRINT“DOFD”LOCATE11,58:PRINTDIF%COLOR9,0LOCATE1,1:PRINTMAXYLOCATE21,1:PRINTMINYLOCATE21,40:PRINT“NUMBEROFPOINTS”LOCATE21,57:PRINTMAXXCOLOR9,0LOCATE23,16:PRINT“FULLMODELPREDICTION(MODELINCOLOR7,0LOCATE24,16:INPUT“ANYKEYTOCONTINUE”,z%GOTO7000REM$STATICSUBCOREL(AUTOAO, AUTOBO,CHOICE%, N%, DATAAO, DATABO,MEANA,MEANB,VARA,VARB, CORO,ERMO,ERPO)DIMTEMP(-50TO50)FORK%=1TO5OSUM=0FOR1%=1TO(N%-K%)VALU=((DATAA(I%)-MEANA)*(DATAB(I%+K%)-MEANB))SUM=SUM+VALUNEXT1%COR(K%)=SUM/N%COR(K%)=COR(K%)/SQR(VARA*VARB)NEXTK%FORK%=0TO-50STEP-1SUM=0FOR1%=1TO(N%+K%)VALU=((DATAB(I%)-MEANB)*(DATAA(I%-K%)-MEANA))SUM=SUM+VALUNEXT1%COR(K%)=SUM/N%COR(K%)=COR(K%)ISQR(VARA*VARB)NEXTK%IFCHOICE%=1ThENTEMP(1)=IFOR=2TO50GOTO70ENDIFSTOPEND999RED)” ELSEIFP%=0THENSCREEN0TEMP(K%)=TEMP(K%-1)+COR(K%-1)“2*2NEXTK%FORK%=1TO50TEMP(K%)=TEMP(K%)/N%ERM(K%)=2*SQR(TEMP(K%))ERP(K%)=2*SQR(TEMP(K%))NEXTK%ELSEIFCHOICE%=2THENSUM=0FORK%=-50TO50SUMSUM+AUTOA(K%)AUTOB(K%)NEXTK%FORK%=0TO50TEMP(K%)=SUM!(N%-K%)NEXTK%FORK%=-1TO-50STEP-1TEMP(K%)=SUM!(N%+K%)NEXTK%FORK%=-50T050ERM(K%)=2*SQR(TEMP(K%))ERP(K%)=2*SQR(TEMP(K%))NEXTK%ENDIFENDSUBSUBGAUS(C%, MATO,AUTO(), CROSSO,V(), FLAG%)FOR1%=1TOC%V(I%)=CROSS(I%)NEXT1%IFFLAG%=1TI-lENFOR1%=1TOC%FOR3%=1TOC%K%=ABS(I%-3%)MAT(I%,3%)=AUTO(K%)NEXT3%V(I%)=CROSS(I%-1)NEXT1%ENDIFL%=C%FOR1%=1TOL%M%=1IFMAT(I%,1%) =0THENFOR0%=1TOL%HOLD=MAT(I%,0%)MAT(1%, 0%)=MAT(1%+M%, 0%)MAT(I%+M%, 0%)=HOLDNEXT0%HOLD=V(I%)V(I%)=V(I%+M%)V(I%+M%)=HOLDM%=M%+1GOTO90ENDIFDIV=MAT(I%, 1%)FOR3%=1TOL%MAT(I%, 3%)=MAT(I%, 3%)!DIVNEXT3%V(I%)=V(I%)/ DIVFOR3%=1TOL%IFJ%I%THENXMULT=MAT(J%, 1%)FORK%=1%TOL%MAT(3%, K%)=MAT(3%, K%)-MAT(I%, K%)*NEXTK%V(J%)=V(3%)-V(I%)*XMULTENDIFNEXT3%c.J90 XMULT NEXT1%“0ENDSUBSUBVARI(N%,1%, DATAAO,MEAN,VAR)SUM=0FOR3%=1TON%SUM=SUM+DATAA(J%)NEXT3%MEAN=SUM/N%SUM=0FORJ%=1TON%SUM=SUM+(DATAA(3%)-MEAN)A2NEXTJ%VAR=SUM/N%ENDSUB


Citation Scheme:


Citations by CSL (citeproc-js)

Usage Statistics



Customize your widget with the following options, then copy and paste the code below into the HTML of your page to embed this item in your website.
                            <div id="ubcOpenCollectionsWidgetDisplay">
                            <script id="ubcOpenCollectionsWidget"
                            async >
IIIF logo Our image viewer uses the IIIF 2.0 standard. To load this item in other compatible viewers, use this url:


Related Items