Heater Workbook 2006

16
7/29/2019 Heater Workbook 2006 http://slidepdf.com/reader/full/heater-workbook-2006 1/16  1  Department of Chemical Engineering McMaster University 1280 Main Street West Hamilton, Ontario L8S 4L7 Canada  FIRED HEATER DYNAMICS AND CONTROL WORKBOOK By Andrea Moore San Yip Seongkyu Yoon Thomas Marlin Section Topic Page 1. Introduction 2 2. Exercise 1. Process and Equipment Principles 4 3. Exercise 2. Open-loop Process Dynamics 4 4. Exercise 3. Closed-loop PID Control 5 5. Exercise 4. Student-defined Project 7 6. References 8 Appendix A User’s Manual For Fired Heater Simulation 10 B MATLAB Controller Subroutine 15 Copyright © 2006 by T. Marlin

Transcript of Heater Workbook 2006

Page 1: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 1/16

  1

  Department of Chemical Engineering

McMaster University

1280 Main Street West

Hamilton, Ontario L8S 4L7

Canada

 

FIRED HEATER DYNAMICS AND CONTROL WORKBOOK 

By

Andrea Moore

San Yip

Seongkyu Yoon

Thomas Marlin

Section Topic Page

1. Introduction 22. Exercise 1. Process and Equipment Principles 4

3. Exercise 2. Open-loop Process Dynamics 4

4. Exercise 3. Closed-loop PID Control 5

5. Exercise 4. Student-defined Project 7

6. References 8

Appendix

A User’s Manual For Fired Heater Simulation 10

B MATLAB Controller Subroutine 15

Copyright © 2006 by T. Marlin

Page 2: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 2/16

  2

1. Introduction

Most engineers learn best by solving problems and by learning from prior experience; this is often termed

“experiential learning”. This workbook contains a set of experiential learning exercises covering

dynamics and control of a fired heater. You will be presented a set of problems to solve, and you will use

a combination of inquiry skills and simulation experiments in preparing your answers. The problems

 begin with a new perspective on topics that you have seen in other courses, and they conclude with youdefining the final question and solving it.

The simulation has been programmed in MATLAB. (The programming was performed by Ms.

Andrea (DaSilva) Moore when an undergraduate and by Drs. San Yip and Seongkyu Yoon while they

were teaching assistants.) The simulation is designed to be menu-driven, so that you can consider this

close to an experimental system, without programming the process simulation. Guidance on the use of 

the program is provided in Appendix A.

The fired heater in this exercise is shown in Figure 1 and associated data is given in Table 1. The

model conforms to the following assumptions.

1) the fire box gas has a uniform composition and temperature2) the flame is well mixed

3) The process fluid travels through only one pass, one pipe without splitting

4) vapor phase dynamics in the firebox are negligible

5) the oxygen analyzer is continuous and without dead time

6) all controllers are digital and executed at the same period as the simulation time step

7) unsafe conditions can occur, but the simulation will not represent an explosion

The simulation is designed to accurately model responses for small and medium input changes. The

simulation includes combustion stoichiometry and reaction material and energy balances, radiation and

convection heat transfer, and thermal capacitance of the metal and brick refractory. As part of the program

development, the model was calibrated by comparison with an industrial-scale fired heater in a petroleum

refinery.

The simulation will not  model extreme input changes, examples of which are given in the

following.

- start up and shutdown

- failure of equipment like blowers or pumps

- very low flows that could result in an unstable flame

Before beginning to consider the dynamic operation of any process, the engineer should

thoroughly understand the process and equipment principles. Some questions to help you review and

extend your knowledge are presented in the next section.

Page 3: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 3/16

  3

 

Table 1. Key data for the fired heater.

Variable Value

Feed flow rate 0.122 m3/s

Feed temperature 214 °C

Fuel flow rate 0.49 Sm3/s

Fuel composition 100% Methane

Air flow rate 4.72 Sm3/s

Outlet temperature of fluid in coil 280.6 °C

Fire box (combustion zone) pressure -153 Pa, gauge

Flue gas oxygen 2.00 mole %

Flue gas temperature when entering

the stack 460 °C

Figure 1. Fired heater 

flue gas

fuel gasair 

feedoil

T300

F200

V200V100

F100

V600

F600

V600

A400

P300

Page 4: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 4/16

  4

 

2. Exercise 1. Process and Equipment Principles

The questions in this section are designed to help you think about operating  the process equipment.

Therefore, the design aspects that provide flexibility are emphasized. In addition, the equipment that are

essential for control - sensors and final elements (valves) - are covered. These topics complement and

reinforce the perspective more common in heat transfer courses, i.e., the steady-state design andequipment sizing (e.g., heat exchanger area).

The questions are presented below. In determining answers, you are encouraged to use the

references available; textbooks, engineering handbooks, the WWW (Google), and the process control

WEB site PC-Education (www.pc-education.mcmaster.ca).

1. Describe two applications for a fired heater.2. Why/when is a fired heater used rather than a steam heat exchanger?

3. Why does the pipe (coil) enter the heater above the radiant section?

4. Define energy efficiency and describe how it is calculated using process measurements.

5. The pressure inside firebox is lower than outside; why does flue gas exit without compression?

6. How is the best value of the air flow rate determined?7. Describe potential unsafe operating situations and how they are avoided.

8. A fired heater may have more than one burner. Discuss why.

9. A coil in a fired heater may be split into several pipes that pass through the heater and are

combined at the exit of the heater. Discuss why this design might be used. Do you expect

challenges with this design?

10. Flue gas exits to the environment via the stack at a high temperature. How might more energy be

recovered from the flue gas by heat transfer, with the effect of reducing fuel consumption?

11. Discuss factors that determine the minimum temperature of the flue gas as it leaves the fired

heater convection section.

12. Determine the physical measurement principle for each of the following sensors used for 

distillation control and briefly explain why this is an appropriate choice. Note that several correct

answers may be possible.a. air flow rate (F100)

 b. Coil outlet temperature (T300)

c. pressure of the fuel gas after the control valve (not shown on drawing) 13. What type of valve body to you recommend for the feed flow rate? The fluid does not contain

solids, does not vaporize and has moderate viscosity.

3. Exercise 2. Open-loop dynamics

This question is to be answered using programs provided in MATLAB to simulate a fired heater. Directionsfor the use of the programs are provided in Appendix A. In this problem, you will evaluate the dynamic

responses for the cases defined below and analyze the results based on your chemical engineering training.

Later, you will use the results of your open-loop tests in designing and tuning feedback digital PIDcontrollers for this system.

For this question, you will enter your changes via interactive menus. You need to change the

variables that determine the size of the step changes, and you might need to change the length of the

simulation to capture the entire dynamic response. All sensors are functioning, but the composition

controllers are not implemented even though the menu for the controllers exists. In later exercises, you will

continue with the same distillation tower (and simulation) by programming the controllers and tuning them.

Page 5: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 5/16

  5

  In these exercises, you are to use process reaction curve Method II, as defined in the textbook 

Section 6.3 (Marlin, 2000), to fit first order with dead time dynamic models.

Your solution will report plots, show calculations, and report model structure with parameters (e.g.,

gain, time constant and dead time) for exercises a-e.

a. Determine the dynamic responses for a step change in the fuel valve of + 1% opening. b. Determine the dynamic responses for a step change in the air damper of + 1% opening.

c. Determine the dynamic responses for a step change in the stack damper of + 1% opening.d. Determine the dynamic responses for a step change in the process fluid valve of + 1% opening.

e. Determine the dynamic responses for a step change in the fuel valve of – 4% opening.

f. Based on results in parts (a-e), describe the qualitative relationships between the four valves in a to

d above and the following dependent measured process variables.

- Coil outlet temperature (COT)- Flue gas oxygen

- Fire box pressure

- Feed flow rate

- Fuel flow rate

- Air flow rate

Present your conclusions in a matrix defined by the valves in the columns and the variables in the

rows. Use the results in cases a to d. Each entry in the matrix will be one of the following.

X = strong causal relationship

0 = no causal relationship

? = very weak casual relationship

Discuss your results concisely. Are you surprised by any of the results?

g. For each valve, determine a linear dynamic model between the valve and one measured variable;

you may use a graphical method for parameter estimation. The model you select must be one that

represents an X in the matrix defined in f above.

Recall that feedback control is not yet possible, although a menu exists for changing controller 

 parameters. In the next exercise, you will program the controllers, tune them (using results from this

exercise) and evaluate closed-loop performance.

4. Exercise 3: Closed-loop PID control

This question is to be answered using programs provided in MATLAB to simulate a fired heater; refer to

Appendix A for directions on using the program. This assignment follows Exercise 2. Be sure that the

 parameters in submenu 1 are the same as used in the Exercise 2, and before running dynamic cases,

calculate the steady-state conditions using submenu 1, item 31! You will investigate the multiloop

feedback control of the fired heater in this problem.

Before performing the following exercises, you must program all of the PID controllers.

Submenu 4 is provided for the composition controllers and will function if you use the variables defined

for the tuning constants, initialization, etc. Directions and hints for programming are provided in this

handout.

Perform the following exercises and prepare a solution documenting programming, intermediate

calculations, and discussion of results. Provide a copy of your subroutine with your assignment.

Page 6: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 6/16

  6

 

a. Based on the open-loop dynamic experiments performed previously, calculate the tuning for the

two single-loop composition controllers (T300 controller by adjusting the fuel valve and P300 by

adjusting the stack damper). Recall that the controllers are executed with a period of 5 seconds.

Enter the tuning for both controllers via main submenu 3. (Remember to clear all step changes in

main menu item 2.)

 b. Set all controllers in manual or "OFF", i.e., not in service, except for the COT (T300) controller.The COT controller should be ON. In separate runs, determine the dynamic responses for the

following scenarios.

1) A set point change in COT of 2 degrees,

2) A set point change in COT of 20 degrees, and3) A disturbance in fuel composition (to 80% methane and 20% ethane)

Use the tuning determined in (a) with any fine tuning you deem necessary.

c. With both COT and pressure controllers in automatic or "ON", determine the response of thesystem to the same three inputs; you may further  fine tune the controllers as needed.

d. If any of the dynamic responses are clearly unacceptable in (c) above, modify the control system

to achieve acceptable performance. (Corrective action could involve changing tuning, changing

loop pairing, or implementing other controllers.)

e. Compare and discuss the control performances in COT achieved in response (b) with (c) and (d).

Hints for programming your controllers are given in the following, because you need to prepare

 before programming!

• First, read the attached subroutine so that you understand the variables and options within the program.

• Second, review the digital forms of the PID controller.

• Third, prepare a flowchart of the code that you plan to write.

• Fourth, prepare hand calculations of the controller that can be used to check the program.

• Fifth, plan your solution, specifically, which variables are (i) communicated in or from the

subroutine, (2) local and must be stored between subroutine executions, and (3) local and need not be

stored

• Sixth, include displays of intermediate results in your code so that you can confirm your excellent

results (or find and correct a bug ). Values of variables can be displayed in digital form in the

MATLAB window using the display function. A sample of a statement is given in “disp(VALVE)

;”, which prints values of the vector variable VALVE in the MATLAB window. These can be

removed when your results are satisfactory.

Retain a copy of your subroutine: you will need it for the next exercise.

You should be sure that your code is calculating the correct values before you send values back to the

distillation process simulation. This rule is especially true when working with the real process!

Page 7: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 7/16

  7

i) Appropriate initialization for the PID algorithm should be included; a variable (CTLINIT) is

 provided to designate the first time the calculations are executed.

ii) Anti-reset-windup protection must be provided.

iii) The control calculations should function when TI=0, even though TI appears in the denominator;

 prepare your program so that setting TI=0 turns off the integral mode.

iv) Remember that values of local intermediate variables, i.e., those not appearing in the function call

or GLOBAL statements are not retained  for subsequent executions. Thus, variables like the previous error or previous CV must be stored by you. Some extra GLOBAL variables SAVE?

are provided for this purpose. They can be used as scalars or vectors.v) Do not use the variables STORE or k that are transmitted to the subroutine.

vi) The comment number 4 (under calculations) describes the behaviour of the controller after you

have completed your program. You must check in this subroutine whether the control

calculations should be executed based on the controller status that is transmitted to the controller 

at every execution.

5. Exercise 4. Control Case Study

In this assignment, you will modify the process design and/or control system. You may select one of the

 proposed exercises, or you may propose an exercise of your own design. The modified control designmust be described, programmed, tuned (based on new process reaction curves, as needed), and the

 performance of the new design evaluated by dynamic simulation of the nonlinear process.

Only one group can perform each exercise, and the instructor will make the allocation based on

your completed project selection forms.

The group members will present the group's results in a brief (10 minute) oral presentation. The

group may prepare up to 5 power point slides for use as visual aids. (Students missing the class and not

 presenting an acceptable reason in writing will receive zero for the assignment.)

The written report should be concise (not more than four pages of typed text, not including the cover,

subroutine listing, presentation hardcopy, and plots) and provide the following, in addition to a statementof the study goals.

a. An explanation of the algorithms used for control.

 b. Discussion of additional modelling required, e.g., process reaction curve experiments and

calculations.

c. A discussion of the control performance obtained. Compare with the previous results, as

appropriate.

d. A hard copy of the presentation visual aids.

e. A summary of what you learned. How did the system perform, why, conclusions, unsolved

mysteries. What principles have you reinforced and what generalizations can you support based

on these results?

SOME HINTS 

1) Start early! (Have you heard this before?)

2) You can arrange to see the instructor with a plan before beginning the detailed work.- The plan will not be graded.

- Use outline or bullet format, hand-written in preparation for discussion with instructor.

- Prepare a plan for changes in menu-entered data.

Page 8: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 8/16

  8

- Prepare a plan documenting the new control equations and where they will be programmed,

empirical modelling cases, and tuning procedures.

- Explain what you will look for in your simulations, i.e., what are the expected results.

- Refer to the programming hints in Section 4.

3) Do NOT copy long sections of the text into your written report. Be concise!

CANDIDATE FIRED HEATER STUDIES 

For all fired heater control studies, the base process is the same as for the previous studies. All systems

should have feedback control of the coil outlet temperature (T300), the flue gas oxygen and the fire box

 pressure. Control performance should be investigated for the following changes.

1) A +20% increase in feed flow rate,2) A change from 100% methane fuel to 80% methane and 20% hydrogen, and

3) An increase of 15 K in the coil outlet temperature.

A. Feedforward control for flow– You will provide feedforward compensation for changes in thefeed flow rate. You will retain all feedback control.

B. Feedforward control for feed temperature - You will provide feedforward compensation for 

changes in the feed flow rate. You will retain all feedback control. You must simulate the

following additional case.

- A disturbance of –20K in the inlet oil temperature.

C. Air/fuel ratio – We have seen that the air and fuel flows should be maintained in proportion. Add

a ratio controller without losing feedback control of any of the three key variables.

D. Adaptive tuning – The tuning of feedback controllers could be compensated for changes indynamics due to changes to the furnace oil flow rate. Determine the needed tuning

compensations and program them so that the tuning is adjusted for changes in oil flow. You will

have to demonstrate the your tuning is good for flow rates from 50% to 110% of the base case

value.

E. Exercise defined by group - Any group may propose an exercise, which must be accepted by the

instructor.

6. References

Heat transfer fundamentals

Cengel, Y., Heat Transfer, A Practical Approach, WCB McGraw-Hill, New York, 1998.

Fired heater equipment design and operation

API, Measurement of Thermal Efficiency of Fired Process Heaters , API Recommended Practice 532, American

Petroleum Institute, Washington, 1982.

Page 9: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 9/16

  9

Berman, H. Fired Heaters – I. Finding the Basic Design for Your Application, Chem. Engin., pg. 99-104 (June 19,

1978).

Berman, H. Fired Heaters – II. Construction Materials, Mechanical Features, Performance Monitoring, Chem.

 Engin., pg. 87-96 (July 31, 1978).

Berman, H. Fired Heaters – III. How Combustion Conditions Influence Design and Operation, Chem. Engin., pg.130-140 (August 14, 1978).

Berman, H. Fired Heaters – IV. How to Reduce Your Fuel Bill, Chem. Engin., pg. 165-169 (September 11, 1978).

Reed, R., Furnace Operations, Gulf Publishing, Houston, 1981.

Combustion control

Dukelow, S., Trying to Save Energy? Don’t Neglect Your Process Heaters, Intech, pg. 35-39 (1981).

Kunz, R., D. Smith, N. Patel, G. Thompsin, and G. Patrick, Control NOX from Your Furnaces, Hydrocarbon Proc., pg. 57-62 (1992).

Fired heater dynamic simulation

Aspen, Aspen Dynamics™ and Aspen Custom Modeller™, Aspen Technology, 10 Canal Park, Cambridge, MA,

1999.

Hyprotech, HYSYS.PLANT v2.0 Documentation, Dynamic Modelling Manual, Hyprotech Ltd., Calgary, 1998.Marlin, T., The Software Laboratory, Version 3.0, McMaster University, Hamilton, 1999.

Roffel, B. and J. Rijnsdorp, Dynamics and Control of a Gas-fired Furnace, Chem. Eng. Sci., 29, pg. 2083-92 (1974).Stehlik, P., J. Kohoutek, and V. Jebacek, Simple Mathematical Model of Furnaces and Its Possible Applications,

Comp. Chem. Eng ., 20, pg. 1369-1372 (1996).

Fired heater control

API, Manual on Installation of Refinery Instruments and Control Systems, Part III – Fired Heaters and Inert Gas

Generators, API Recommended Practice 550, American Petroleum Institute, Washington, 1977.Jensen, J., Combustion Safeguards for Gas- and Oil-Fired Furnaces, Chem. Eng. Prog ., pg. 77-85 (October 1978).

Kane, L., Combustion Control and Analyzers: What’s Really Needed, Hydrocarbon Proc., 65-68 (June 1980).

Industrial Instrumentation

Andrew, W. and H. Williams, Applied Instrumentation in the Process Industries, Volume I, A Survey (2nd Ed.), Gulf 

Publishing, Houston, 1979.

Andrew, W. and H. Williams,  Applied Instrumentation in the Process Industries Volume II, Practical Guidelines (2nd Ed.), Gulf Publishing, Houston, 1980.

Driskell, L., Control Valve Selection and Sizing , ISA Publishing, Research Triangle Park, 1983.

Marlin, T., et. al., PC_Education WEB site, www.PC-Education.mcmaster.ca , 2006

Page 10: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 10/16

  10

Appendix A. User’s Manual for Fired Heater Simulation

The fired heater simulation requires MATLAB version 7.0 or higher and all of the files stored in the

McMaster JHE system under the course 3E04 in the "K:\" drive in subdirectory "fhtr_2006". If you want to

 perform the study on your home computer using a student version of MATLAB, copy all files in

"fhtr_2006" to your home computer.

The heater simulation has been developed to be menu-driven for most parameters you will input

during these exercises. (As you will see, later exercises will require some limited programming.) After you

have started MATLAB and defined the correct MATLAB folder for the m-files, you can start the program

 by typing fhtr and enter. The screen will clear and the main menu will be displayed as shown below.

The first item allows you to modify the process design and solve for the initial steady-state

operating conditions. You should enter the data given in the following copy of submenu 1.

******************************************************************************** FIRED HEATER SIMULATION ** Ver 2.0 ** ** Department of Chemical Engineering ** McMaster University ** September 1999 ********************************************************************************

1) Define Initial State2) Define Step Changes for DV & MV3) Controller status, Tuning and Size of SP Changes4) Simulation Events1 (Under construction)5) Simulation Events2 (Under construction)6) Start Simulation7) Plot a Previous Simulation8) Load a Base Case9) Save a Base Case10) QUIT TO MATLABPLEASE ENTER A SELECTION :

Page 11: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 11/16

  11

********************************************************************************************** Define Initial State **********************************************************************************************

CURRENT INITIAL STEADY-STATE:Air Flowrate .............. 4.70 m^3/sec Fuel Flowrate ............. 0.50 m^3/secFirebox Pressure ......... -181.0 Pa O2 in Stack flue Gas ..... 1.949 mpctCOT ...................... 284.6 degC Process Fluid Flowrate ... 0.122 m^3/sec

CO2 in Stack Flue Gas ..... 8.620 mpct Bridgewall Temperature ... 229.4 degC

WHICH OF THE FOLLOWING PARAMETERS WOULD YOU LIKE TO CHANGE?Oil Inlet Temperature & Pressure Present Values1) Oil inlet temperature .................... 214.0 degC2) Oil inlet pressure (1600 - 2500 kPa) ...... 1600.0 kPaValve Opening11) Air damper .............................. 46.50 pct open12) Fuel valve .............................. 20.80 pct open13) Process fluid valve ..................... 60.00 pct open14) Stack damper ............................ 25.00 pct openFuel Composition21) CH4 fraction ............................ 1.000 molfrac22) C2H6 fraction ........................... 0.000 molfrac23) H2 fraction ............................. 0.000 molfracUpdating Steady State Condition31) Calculate New Steady-State

99) Quit to main menuPLEASE ENTER A SELECTION :

REMEMBER TO SOLVE FOR THE STEADY-STATE

OPERATION USING SUBMENU ITEM 31 BEFORE LEAVING

THIS SUBMENU!

You can define step changes to various variables using submenu 2. These changes will be

introduced during the dynamic simulation; these changes will define process reaction curves (changes to

manipulated variables) or disturbances (changes to uncontrolled inputs). For each variable, you define a

step size and time for introduction of the step. All steps are introduced, so a zero size should be given for 

those variables that you want to be unchanged. More than one variable step may be nonzero. A sample of 

the submenu with one step defined is given below; the opening of the fuel valve is changed by –2% at a time

of 50 seconds.

Remember to enter the desired change from the base case (initial steady-state) value! 

Page 12: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 12/16

  12

 

The simulation can be executed by selecting the simulation submenu, main menu item 6. The first

two entries are the total time for the simulation and time step used in solving the process simulation. For 

this exercise, do not change the values of entry 2, the time step. The total time is initialized to a

reasonable value, but you can change this value if necessary.

When you select submenu item 31, you are asked to provide a case name (without extension),

which is used as the file name for saving the results for later retrieval; the extension will be “.MAT”. You

should provide a unique name, because the program will overwrite (without a warning) the contents of 

any existing file with the same name in the default folder that exists in the active MATLAB path directory.Therefore, name each case that you want to save with a unique name, such as “Marauder_Case_2a”.

When the simulation is being executed, numerical values are displayed on the screen to give you an

update on the case. This enables you to recognize and stop any case that is clearly wrong due to incorrect

data input. The variables displayed are summarized below. 

********************************************************************************************** Define Time and Size of Step Disturbance Changes **********************************************************************************************

CURRENT INITIAL STEADY-STATE:Air Flowrate .............. 4.70 m^3/sec Fuel Flowrate ............. 0.50 m^3/sec

Firebox Pressure ......... -181.0 Pa O2 in Stack flue Gas ..... 1.949 mpctCOT ...................... 284.6 degC Process Fluid Flowrate ... 0.12 m^3/secCO2 in Stack Flue Gas ..... 8.620 mpct Bridgewall Temperature ... 229.4 degC

WHICH OF THE FOLLOWING PARAMETERS WOULD YOU LIKE TO CHANGE?Size of Disturbance ChangeDisturbance in Fuel Composition1) CH4 fraction (dDV) ................. 0.000 molfrac2) C2H6 fraction (dDV) ................ 0.000 molfrac3) H2 fraction (dDV) .................. 0.000 molfracDisturbance in Pressure and Temperature4) Oil inlet temperature (dDV) ........ 0.000 degC5) Oil inlet pressure (dDV) ........... 0.000 kPa6) Fuel gas source pressure (dDV) ..... 0.000 kPa

Size of Valve Change11) Air damper (dOP) .................. 0.00 open%12) Fuel valve (dOP) .................. -2.00 open%

13) Stack damper (dOP) ................ 0.00 open%14) Process fluid VLV (dOP) ........... 0.00 open%

Returning to main menu99) Quit to main menu

PLEASE ENTER A SELECTION :

****************************************************************************************** Define Step Changes ******************************************************************************************

WHICH OF THE FOLLOWING PARAMETERS WOULD YOU LIKE TO CHANGE?

Runnung Parameter Present Values1) Total simulation time ....... tend ...... 600 sec2) Simulation time step ........ delt ...... 5 secSimulation and Returning to main menu31) Start simulation41) Replot current results99) Quit to main menu

PLEASE ENTER A SELECTION :

Page 13: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 13/16

  13

 

At the completion of each simulation case, the results are plotted automatically and also stored in

the file named at the beginning of the case. A sample of the plots is given in Figure 2. You can repeat the

 plot of any saved simulation by selecting main menu item 7 and entering the name of the appropriate stored

case. The plot provides the following three graphs:

- the fuel and air valves with the measured fuel and air flows

- the fuel valve and stack damper with the measured COT and flue gas % oxygen

- the feed valve and stack damper with the measured feed flow and fire box pressure

- the common disturbances: oil feed pressure, fuel gas composition, oil feed temperature, and fuel

gas supply pressure

When the plot is displayed, you can copy it and paste it in a MS WORD document where you can

add descriptions of the cases. The word processor document can be printed so that you can perform the

 process reaction curve calculations. You can save the word processor and the data MATLAB case files as

described previously for each case. This will allow you to recover from computer restarts, printing errors,

check for errors (unlikely that you will make any!), and transport the results to your home computer . Better

safe than sorry. 

SimTime AIR FUEL FBPres %O2 COT HOIL30 4.70 0.505 -181.0 1.949 284.64 0.12260 4.70 0.505 -181.0 1.949 284.64 0.12290 4.70 0.505 -181.0 1.949 284.64 0.122120 4.70 0.505 -181.0 1.949 284.64 0.122150 4.70 0.505 -181.0 1.949 284.64 0.122

180 4.70 0.505 -181.0 1.949 284.64 0.122210 4.70 0.505 -181.0 1.949 284.64 0.122240 4.70 0.505 -181.0 1.949 284.64 0.122270 4.70 0.505 -181.0 1.949 284.65 0.122300 4.70 0.505 -181.0 1.949 284.65 0.122330 4.70 0.505 -181.0 1.949 284.65 0.122360 4.70 0.505 -181.0 1.949 284.65 0.122390 4.70 0.505 -181.0 1.949 284.65 0.122420 4.70 0.505 -181.0 1.949 284.65 0.122450 4.70 0.505 -181.0 1.949 284.65 0.122480 4.70 0.505 -181.0 1.949 284.65 0.122510 4.70 0.505 -181.0 1.949 284.65 0.122540 4.70 0.505 -181.0 1.949 284.65 0.122570 4.70 0.505 -181.0 1.949 284.65 0.122600 4.70 0.505 -181.0 1.949 284.65 0.122

Page 14: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 14/16

  14

 

0 100 200 300 400 5004.696

4.697

4.698

4.699

4.7

Time (sec)

   F   1   0   0   (  m   3   /  s   )

 Air Flowrate

0 100 2 00 300 400 50045.5

46

46.5

47

47.5

Time (sec)

   A

   i  r  v  a   l  v  e ,  v   1   0   0   (   %   )

0 100 200 300 400 5000.4

0.45

0.5

0.55

0.6

Time (sec)

   F   2   0   0   (  m   3   /  s   )

Fuel Flowrate

0 100 2 00 300 400 50018.5

19

19.5

20

20.5

21

Time (sec)

   F  u  e   l  v  a   l  v  e ,  v   2   0   0   (   %   )

 

0 100 2 00 300 400 500276

278

280

282

284

286

Time (sec)

   T   3   0   0   (   d  e  g   C   )

Coil Outlet Temperature

0 100 2 00 300 400 50018.5

19

19.5

20

20.5

21

Time (sec)

   F  u  e   l  v  a   l  v  e ,  v   2   0   0   (   %   )

0 100 2 00 300 400 5001.5

2

2.5

3

3.5

4

Time (sec)

   A   4   0   0   (  m  o   l   %   )

O2 in Flue Gas

0 100 2 00 300 400 50024

24.5

25

25.5

26

Time (sec)

   D  a  m  p  e  r ,  v   6   0   0   (   %   )

Stack damper % open

 

0 100 200 300 400 500-1

-0.5

0

0.5

1

1.5

Time (sec)

   F   6   0   0   (  m   3   /  s

   )

Process oil flowrate

0 100 2 00 300 400 50059

59.5

60

60.5

61

Time (sec)

   F  e  e   d  v  a   l  v  e ,  v   6   0   0   (   %   )

0 100 200 300 400 500-184

-183

-182

-181

-180

Time (sec)

   P   3   0   0   (   P  a   )

Fire box pressure

0 100 2 00 300 400 50024

24.5

25

25.5

26

Time (sec)

   D  a  m  p  e  r ,  v   6   0   0   (   %   )

Stack damper % open

 

0 100 200 300 400 500213

213.5

214

214.5

215

Time (sec)

   O   i   l   F  e  e   d   T  e  m  p

   (   C   )

0 100 200 3 00 400 5001599

1599.5

1600

1600.5

1601

Time (sec)

   O   i   l   F  e  e   d   P  r  e  s  s  u  r  e   (   k   P  a   )

0 100 200 300 400 500404

404.5

405

405.5

406

406.5

Time (sec)

   F  u  e   l  g  a  s  s  u  p  p   l  y   P  r  e  s .

   (   k   P  a   )

0 100 200 3 00 400 5000

0.2

0.4

0.6

0.8

1

Time (sec)

   F  u  e   l  g  a  s  c  o  m  p  o  s   i   t   i  o  n

Solid = Meth, Dashed = Ethane

 

Figure 2. Sample Plot for –2% step change in the fuel valve opening.

Page 15: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 15/16

  15

Appendix B. MATLAB Controller Subroutine

This is the subroutine stored in file fhtrcont.m. You should store the original (fhtrcont.bak) and

modify the m-file. Only the file with the extension “.m” will be executed.

function [SP,CV,VALVE] = fhtrcont(STORE,k,SP,CV,VALVE,Kc,Ti,Td,MVmax, ...MVmin,EUhi,EUlo,CTL_STAT,CTLINIT, Dt )% ********************************************************************%% Fired Heater Simulation%% Copyright : McMASTER UNIVERSITY, 1998, 1999% Version : 1.0% Last Updated : Sept 99,% Programmed by : T. Marlin% Filename : fhtrcont.m%% ********************************************************************% Usage:% This function m-file is a subroutine which can be called% using the following statement.

% [SP,CV,VALVE] = fhtrcont(STORE, k,SP,CV,VALVE,Kc,Ti,Td, ...% MVmax,MVmin,EUhi,EUlo,CTL_STAT, CTLINIT,Dt)% Decription:% This function returns the values of the 4 valve opening.% If necessary, flowrate is compensated.% ********************************************************************% Inputs:% These variables and parameters are available for use% in the controller calculation. The values are provided% from the menu entries and the plant measurements.% STORE The stored data of all past SPs, CVs and VALVESs.% SP(i) is the setpoint of CV i (i=1,6) at the current time% SP that isn't specified in% menu would be changed here.% CV(i) is the value of CV i (i=1,6) at the current time% Any of them can be compensated here.% VALVE(j) valve of valve opening (0-100%)% j=1 air% 2 fuel% 3 stack% 4 feed% MVmin(i)% MVmax(i) are the lower and upper bounds for the manipulated% variable used to control the CV i% NOTE: These values are applied to the controller% outputs.% Kc(i)% Ti(i)% Td(i) are Controller tuning parameters specified in menu% EUhi(i)% EUlo(i) is Lower and upper bounds for the measured variables.% CTLINIT is a flag that indicates if this function is being called% for the first time in the simulation, in which case% the controllers have to be initialized. The value% reported to this function is given below, and you% may use this information to decide when to initialize% you controller calculations.% CONTINIT = 1, if is this is the first call% = 0, otherwise.% CTL_STAT(i) is a controller status specified in menu.% values are 1=ON or 0=OFF% *********************************************************************% Output:% These are the variables and parameters which can be changed% through the controller calculations and will be transmitted% to the plant.

Page 16: Heater Workbook 2006

7/29/2019 Heater Workbook 2006

http://slidepdf.com/reader/full/heater-workbook-2006 16/16

  16

% SP(i) is the setpoint of CV i (i=1,8) at current time% CV(i) is the value of CV i (i=1,8) at current time% VALVE(J) is the current value of the VALVE j = see above% **********************************************************************% Sensor Information% i = 1, Air flowrate% 2, Fuel flowrate% 3, Box pressure

% 4, Stack O2 mol percent% 5, COT% 6, Process oil flowrate% 7, Stack CO mol percent% 8, Fuel density% 9, Compensated fuel flow. CV(9)=CV(2) unless you compensate fuel flow.% **********************************************************************% STORE data information% STORE(kk,:) = [T ...% CV(1) CV(2) CV(3) CV(4) CV(5) CV(6) CV(7) CV(8) ...% SP(1) SP(2) SP(3) SP(4) SP(5) SP(6) ...% OP(1) OP(2) OP(3), OP(4) OP(5) OP(6) ...% CV(9) ];%% **********************************************************************% Calculations:% Some suggestions and hints are given below.

% 1. The convention is that the integral mode of a controller is turned off% by setting the integral time constant to zero in the menu for editing% controllers. If at some point you will want to turn off the integral mode% of a composition controller this way, make sure that your code% treats the case TI=0 as a special case; if not, a division by zero will% occur (recall: Integral Mode = (Error integral)/TI ).% 2. The controller can be turned off two ways via the menu.% i) select "off" in the menu.% ii) give the controller gain a value of zero.% 3. Any special calculations for initialization must be included.% 4. When a controller is "OFF", this subroutine is executed but the% values of OP are ignored. When the controller is "ON", this% subroutine is executed and the values of OP are implemented.% *********************************************************************%% The global variables enable the programmer to store results of% calculations for use in the next execution. Intermediate

% values not placed in SAVE will not be available

global SAVE1 SAVE2 SAVE3 SAVE4 SAVE5 SAVE6 SAVE7 SAVE8 SAVE9

% ------- Put your code here ----------%% *****************************************************************

return;