modeling,simulation and control of a drum boiler

55
1 Chapter - 1 Introduction There are dramatic changes in the power industry because of deregulation. One consequence of this is that the demands for rapid changes in power generation is increasing. This leads to more stringent requirements on the control systems for the processes. It is required to keep the processes operating well for large changes in the operating conditions. One way to achieve this is to incorporate more process knowledge into the systems. The goal is to develop moderately complex nonlinear models that capture the key dynamical properties over a wide operating range. The models are based on physical principles and have a small number of parameters; most of which are determined from construction data. Particular attention has  been devoted to model drum level dynamics well. Drum level control is an important  problem for nuclear as well as conventional plants. In Parry, Petetrot and Vivien (1995) it is stated that about 30% of the emergency shutdowns in French PWR plants are caused by poor level control of the steam water level. One reason is that the control problem is difficult  because of the complicated shrink and swell dynamics. This creates a nonminimum phase  behaviour which changes significantly with the operating conditions. Since boilers are so common there are many modelling efforts. There are complicated models in the form of large simulation codes which are based on finite element approximations to partial differential equations. Although such models are important for plant design, simulators, and commissioning, they are of little interest for control design because of their complexity. The model presented here is adapted from K.J Astrom and R.D. Bell (1998). A nonlinear dynamic model for natural circulation drum-boilers is adapted. The model describes the complicated dynamics of the drum, downcomer, and riser components. It is derived from first principles, and is characterized by a few physical parameters. A strong effort has been made to strike a  balance between fidelity and simplicity. Since the model is derived from first principles it can describe the system for a wide operating range. Simulation of the model is done using MATLAB R2010a and results have been verified with  plant data presented in K.J Astrom and R.D. Bell (1998). The conventional PID controller is applied when the boiler is operating at medium load for both servo and regulatory problems. Advanced controllers such as Fuzzy logic controllers(FLC) and Neural Network(NN)  predictive controllers have been also tried with satisfactory results. The details of these controllers are discussed in the report within. The drum boiler is a simple boiler which consist of a drum, downcomer and riser components. A simple schematic of the drum boiler have been shown in Figure 1. The heat Q, supplied to the risers causes boiling. Gravity forces the saturated steam to rise causing a circulation in the riser-drum-downcomer loop. Feedwater q f , is supplied to the drum and saturated steam, q s , is taken from the drum to the superheaters and turbine. The presence of steam below the liquid level in the drum causes the shrink-and-swell phenomenon which makes level control difficult. In reality the system is much more complicated than shown in the figure. The system has a complicated geometry and there are many downcomer and riser tubes. The outflow from the risers passes through a separator to separate the steam from the water. In spite of the complexity of the system it turns out that its gross behaviour is well captured by global mass and energy balances.

Upload: dk-kalita

Post on 08-Jul-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 1/55

1

Chapter - 1

Introduction

There are dramatic changes in the power industry because of deregulation. One consequenceof this is that the demands for rapid changes in power generation is increasing. This leads to

more stringent requirements on the control systems for the processes. It is required to keep

the processes operating well for large changes in the operating conditions. One way to

achieve this is to incorporate more process knowledge into the systems. The goal is to

develop moderately complex nonlinear models that capture the key dynamical properties over

a wide operating range. The models are based on physical principles and have a small number

of parameters; most of which are determined from construction data. Particular attention has

 been devoted to model drum level dynamics well. Drum level control is an important

 problem for nuclear as well as conventional plants. In Parry, Petetrot and Vivien (1995) it is

stated that about 30% of the emergency shutdowns in French PWR plants are caused by poor

level control of the steam water level. One reason is that the control problem is difficult because of the complicated shrink and swell dynamics. This creates a nonminimum phase

 behaviour which changes significantly with the operating conditions. Since boilers are so

common there are many modelling efforts. There are complicated models in the form of large

simulation codes which are based on finite element approximations to partial differential

equations. Although such models are important for plant design, simulators, and

commissioning, they are of little interest for control design because of their complexity. The

model presented here is adapted from K.J Astrom and R.D. Bell (1998). A nonlinear dynamic

model for natural circulation drum-boilers is adapted. The model describes the complicated

dynamics of the drum, downcomer, and riser components. It is derived from first principles,

and is characterized by a few physical parameters. A strong effort has been made to strike a

 balance between fidelity and simplicity. Since the model is derived from first principles it can

describe the system for a wide operating range.

Simulation of the model is done using MATLAB R2010a and results have been verified with

 plant data presented in K.J Astrom and R.D. Bell (1998). The conventional PID controller is

applied when the boiler is operating at medium load for both servo and regulatory problems.

Advanced controllers such as Fuzzy logic controllers(FLC) and Neural Network(NN)

 predictive controllers have been also tried with satisfactory results. The details of these

controllers are discussed in the report within.

The drum boiler is a simple boiler which consist of a drum, downcomer and riser

components. A simple schematic of the drum boiler have been shown in Figure 1. The heat

Q, supplied to the risers causes boiling. Gravity forces the saturated steam to rise causing acirculation in the riser-drum-downcomer loop. Feedwater qf , is supplied to the drum and

saturated steam, qs, is taken from the drum to the superheaters and turbine. The presence of

steam below the liquid level in the drum causes the shrink-and-swell phenomenon which

makes level control difficult. In reality the system is much more complicated than shown in

the figure. The system has a complicated geometry and there are many downcomer and riser

tubes. The outflow from the risers passes through a separator to separate the steam from the

water. In spite of the complexity of the system it turns out that its gross behaviour is well

captured by global mass and energy balances.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 2/55

2

Fig 1: Schematic of a drum boiler [1].

The shrink and swell phenomena in a drum boiler makes the level control very

difficult. Under boiling conditions, steam supporting field products such as bubbles

exist below the water/steam level interface. These bubbles have volume and therefore

displace water to create a misrepresentation of the true water level in the drum.

Another effect upon drum level is pressure in the drum. Because steam bubbles

compress under pressure the steam bubbles expand or contract respective to these

 pressure changes. A higher steam demand will cause the drum pressure to drop, andthe steam bubbles to expand to give the appearance of a water level higher than it

truly is.This fictitious higher water level causes the feedwater input to be shut down at

a time when more water is really required. 

A surge in water level as a result of the

drum pressure decreasing is called 'swell'. A water level decrease due to drum

 pressure increase is called 'shrink'.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 3/55

3

Chapter - 2

Modeling and Simulation

2.1 Global mass and energy balance equations

The global mass balance equation is

Rate of accumulation of mass in the system = Rate input of mass –  Rate output of mass.

……………….(1)

where

ρS= density of saturated steam (kg/m3)

Vst= total volume of steam in the boiler system (m3)

ρW= density of saturated water (kg/m3)

Vwt= total volume of water in the boiler system (m3)

qf = feed flowrate (kg/s)

qs=steam flowrate(kg/s)

The global energy balance is

Rate of accumulation of energy in the system = Rate input of energy –  Rate output of energy.

[ ] ……………………..(2) 

us= specific internal energy of steam (J/kg).

uw= specific internal energy of saturated water (J/kg).

mt= total mass of metal tubes and the drum.(kg)

C p= specific heat of metal (J/kg 0C)

tm= temperature of the metal (oC)

Q= heat supplied to the risers (W)

hf = specific enthalpy of feedwater (J/kg)

hs= specific enthalpy of steam (J/kg)

From first law of thermodynamics

H=U+PV

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 4/55

4

which can be rearranged as

u = h - p/ρ. 

 Now we write the global energy balance in terms of enthalpy instead of internal energy by

using the first law of thermodynamics. * + . [ ] . [ ] …………….(3) 

The total volume of the drum, downcomer and riser is

……………………….(4) 

Equation (1), (3) and (4) combined with saturated steam tables yields a simple boiler model.

We will however make manipulations of the model to obtain a state model. There are many

 possible choices of state variables. Since all parts are in thermal equilibrium it is natural to

choose drum pressure ,p as one state variable. This variable is also easy to measure. Using

saturated steam tables, the variables ρS  , ρW  , hS  and hW  can be expressed as functions of

steam pressure. The second state variable can be chosen as the total volume of water in the

system VWt. Using equation (4) VSt can be eliminated and replaced by VWt.

Equation (1) can be written as . . .

.

.Equation (3) can be written as

[ ] . .

.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 5/55

5

.

.

So

. (5)

.Where

.=   (6)

. .Steam tables are required to evaluate

,

 ,

 ,

 ,

 ,

 ,

  ,

  ,

  and

. The

results are based on approximations of steam tables with quadratic functions.

(). (). ().

().

(). . . .

.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 6/55

6

.The condensation flow rate is given by a simple energy balance done within the system

( ) .where .

Here the term on the left hand side of the equation  

accounts for the thermal energy change within the system and the term  accounts for the

 pressure energy change within the system. The negative sign appears before

 since

condensation is taking place.

The term on the right hand side accounts for the physical changes taking place within the

system due to total change in stored energy within the system.

So it can be rewritten as

( ) )………………..(8)

2.2 Distribution of steam in risers and drum

Saturated mixture quality in a heated tube

Consider a vertical tube with uniform heating. Let ρ be the density of the steam-water

mixture. Furthermore let q be the mass flow rate, A be the area of cross section of the tube, V

the volume, h the specific enthalpy, and Q the heat supplied to the tube. All quantities are

distributed in time, t and space, z. Assume for simplicity that all quantities are same in a

cross-section of the tube.

The mass balance for heated section of tube can be derived from the mass continuity

equation. The continuity equation can be stated as

.

u,v and z are velocity in x,y and z directions respectively. Since mass is only entering and

leaving in z- direction. So we have

.

.

…………….(9) 

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 7/55

7

The energy balance can be derived as follows. Let us consider a infinitesimally small block of

cube through which the fluid is flowing. The cube is a control volume. We will do the energy

 balance around this cube. The cube has three coordinates x, y and z. So

Energy flow into the cube- Energy flow out of the cube= Rate of change of energy

Energy flow into the cube= 

Energy flow out of the cube=

.

.

Dividing both sides by dxdydz we get. .

.

.

. ………………………………(10) 

The specific internal energy of mixture of steam and water is

……………….(11) 

Where  denotes the mass fraction of steam in the flow i.e. the quality of the mixture.

In steady state we get

.

………..from (10) and (11).

So

.

Let ξ be the normalized length coordinate along the r isers and

 be the steam quality at riser

outlet. The steam fraction along the tube.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 8/55

8

 , 0 <= ξ <= 1. ……………………..(12) 

The volume and mass fraction of steam are related through  where

 

⁄ ⁄ ⁄ .

  . …………………………….(13) 

To model drum level it is essential to describe the total amount of steam in the risers. This is

governed by the average volume fraction in the risers.

∫ ∫  

……………..(14) 

2.3 Mass and energy balance for the riser section

The global mass balance for riser section is

…………………(15) 

Where Vr  = volume of the riser(m3).

qdc =flow rate in the downcomer section(kg/s)

qr =flow rate in the riser section(kg/s).

The global energy balance for the riser section is

. . .

.

.

………….(16) 

Circulation flow

The momentum balance for the downcomer riser loop is

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 9/55

9

.Where Lr and Ldc are the length of riser and downcomer respectively, k is a dimensionless

friction coefficient and Adc is the area of the downcomer.

This is a first order system with time constant

.

With typical numerical values we find that the time constant is about a second. This is short

in comparison with the sampling period of the experimental data and we will therefore use

steady state relation.

  .

√   ……………………….(17) 

2.4 Distribution of steam in the drum

Vsd  –  volume of steam under liquid level

Vwd  –  volume of water under liquid level

qsd  –  steam flowrate under the liquid surface

qcd - condensation of steam below the liquid level

The mass balance for steam under the liquid level is

……………………………….(18) 

qcd can be given by (8)

( )

………………………..(19) 

Flow qsd  is driven by the density differences of water and steam, and momentum of flow

entering the drum.

Good fit to the experimental data have been obtained with the following empirical model.

…………………….(20) 

Here Vsd0 denotes volume of steam in the drum in the hypothetical situation where there is no

condensation of steam in the drum and Td is the residence time of steam in the drum.

Drum level

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 10/55

10

The volume of water in the drum is

…………………………….(21) 

The deviation of the drum level l  from normal operating level is

………………………………(22) 

The term l w represents level variations due to change in water in the drum and l  s represents

level variations caused by steam in the drum.

2.5 The Model

Selection of state variables

The accumulation of water is represented by the total water volume V wt . The total energy is

represented by drum pressure  p  and the distribution of steam and water is captured by the

steam mass fraction in the risers αr  and the steam volume in the drum V  sd .

Pressure and water dynamics.

These equations are represented by equation (5).

Riser dynamics

Eliminating the flow rate out of the risers, qr   , by multiplying eq(13) by  – (hw  + αr hc) and

adding to eq (14) gives

() .

() .

() .

.

.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 11/55

11

*(

)

+

. …………………….(23) 

Where

.

( ) .

If the state variables p and αr  are known the riser flow rate qr  can be computed from eq(13).

. . . . ……..(24) 

Drum Dynamics

The dynamics for the steam in the drum is obtained from the mass balance (18). Introducing

(24) for qr  , (19) for qcd and (20) for qsd we get

( ) . ( ) .

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 12/55

12

( )

* + .

……………(25)

Where

( )

.

* +. .2.6 Summary

The model can be written as

.

. .

.

where

.=   . .

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 13/55

13

.

( ) .

( ) .

* +

.

.2.7 Steady state solution of the model

. .

.

.

Where qdc is given by equation (15) i.e.

√   .

A convenient way to find the initial values is to first specify steam flow rate qs  and steam

 pressure p. The feedwater flowrate qf  and input power Q are given by the first two equations

and the steam volume in the drum is given by the last equation. The steam quality α is

obtained by solving the nonlinear equations.

√   .

.The steam volume in the drum then can be computed directly.

2.8 The Solution

The solution of the third order non linear model developed can be given by

…………………(26) 

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 14/55

14

Where  

.

.

This is an ordinary differential equation which can be solved by MATLAB using the ODE

function. Basically we use ODE 45 since it is nonstiff differential equations. The ODE 45

implements the fourth or fifth order Runge-Kutta method.

2.9 Step Responses

Fuel Flow changes at medium load

A step change increase of 10 MW is given to the fuel flow rate and the results are discussed

 below

As the steam flow out from the drum is constant ,this in turn keeps the pressure of the drum

constantly increasing at the same rate.The constantly increasing pressure in the drum causes

condensation to take place inside the drum which is the reason for an increase in the water

volume, Vwt within the drum.Initially the steam quality at riser outlet shows a rapid increase

and then as time value increases,the quality of steam tends to become more stable with

gradual increase. The volume of steam inside the drum initially shows an increases by a small

volume and eventually decreases as time value increases. As seen from Figure 2 we note a

sharp initial increase in the steam volume and then a steep fall in the curve, the sharp

increases could be atrributed with the increasing steam flowrate in the riser whereas the steep

fall occurs due to the increase in pressure within the drum causing condensation to take place.

At the onset of the step there is a rapid increase in the outlet flow rate of the steam from the

risers as the flowrate of steam from the outlet of the riser needs to match the downcomer

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 15/55

15

flowrate we observe a decrease in the outlet steam flow rate .These flow rates equalize

almost after 30 seconds. The condensation flow changes in an almost step like manner. A

combination of water and steam dynamics are responsible for the response in drum level

indication and is somewhat complicated .The initial increase in the water level is due to the

rapid initial response of steam. The response in level is a combination of two competingmechanisms. The water volume in the drum increases due to increased condensation caused

 by increasing pressure. The volume of steam in the drum first increases a little and then it

decreases because of the increasing pressure.

Fig 2: Response due to step change in fuel flow at medium load.

Steam flow changes at medium load

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 16/55

16

A step increase of 10 kg/s in steam flow at medium load is given and the results are

discussed below.

As observed in figure 3 there is a linear decrease in the pressure of the steam because

of an increased steam flow rate. As we note a decrease in the pressure of steam , this

causes an increase in the evaporation rate of the water within the drum, in turn

causing an overall decrease in the water volume within the drum boiler system. As

mentioned above the steam quality at the riser outlet first increases rapidly due to

 pressure decrease and it then decreases due to an increase in the water circulation flow

rate. The drop in steam pressure within the boiler system causes an increase in the

steam volume .There is very rapid increase of flow out of steam from the riser as a

reason of high pressure drop within the system. After this initial transient response of

the riser flow rate it decreases to match the downcomer flow rate.The decreased steam

 pressure causes both the downcomer as well as riser flow rates to increase. The

constant decrease in the pressure happens to create an almost step like decrease in thecondensation flow rate response.

The shrink and swell effect is clearly visible. The contributions from the volumes of

steam and water have initially the same sign. There would however be a decrease in

the water volume because of steam flow rate alterations.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 17/55

17

Fig 2: Response due to step change in steam flow rate at medium load.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 18/55

18

Chapter 3

Control Schemes

The feedback control scheme will be implemented to control the water level with the

conventional PID controller and advanced controller fuzzy logic controller(FLC).

However we will try only feedwater flow rate as the manipulated variable and both

servo and regulatory testing will be done.

The feedback control scheme

3.1 PID controllers

The control implemented by the PID controller can be given as

∫ ……………………(27) 

Where u(t) –  control action taken by the PID controller

e(t) –  error at time t .

Kc –  proportional gain of controller

τI  –  integral time constant (s)

τD  –  derivative time constant (s)

Fig 4: feedback PID control scheme.( r(t) –  disturbance)(14).

The salient features of the PID controllers are

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 19/55

19

  Eliminates offset due to integral action

  Better stability criteria due to derivative action

  If error is constant then no derivative action.

  For a very noisy response with almost zero error the derivative term leads to

large control action which is not needed and hence a drawback.

3.1.1 Tuning methods

Tuning of a controller is a very tedious task. Tuning basically means to set the

 parameters (proportional band/gain, integral gain/reset, derivative gain/rate) to get its

optimum values for some desired response. The most basic requirement is that both

response of the system should be stable i.e. the system should not give unbounded

oscillations. It seems even though there are only three parameters in PID controller

tuning is a tedious problem. There are various online and offline methods for tuning a

PID controller. Some of the methods with their advantages and disadvantages aretabulated below.

Method Advantages Disadvantages

Manual Tuning No math required; online. Requires experienced

 personnel.

Zeigler-Nichols Proven method; online. Process upset, some trial-

and-error, very

aggressive tuning

Software tools Consistent tuning; online or offline -

can employ computer-automated

control system design (CAutoD)

techniques; may include valve and

sensor analysis; allows simulation

 before downloading; can support

non-steady-state (NSS) tuning.

Some cost or training

involved.

Cohen-Coon Good process models. Some math; offline; only

good for first-order

 processes.

Table 1: Choosing a tuning method(14).

Manual Tuning

Manual tuning is a online tuning method and it basically requires an experienced

 personnel. Even though the tuning method is manual some rules can be followed for

improved response. First of all set K I and K D values to zero. Increase K P until the loop

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 20/55

20

starts to oscillate. For a “quarter amplitude decay” type response the K P value should

 be set as half of the value at which the response starts to oscillate. Next we have to

increase K I until the offset is eliminated in sufficient time of the process and at last

increase K D, if required until loop is quick to reach its reference after a load

disturbance. But, too much increase in K D  can cause excessive response andovershoot. A fast PID loop usually overshoots a little bit to reach its response

reference point more quickly; however in some system overshoot is not acceptable, in

which case we require an overdamped response.

Parameter Rise time Overshoot Settling

time

Steady-

state error

Stability

K  p Decrease Increase Small

change

Decrease Degrade

K I  Decrease Increase Increase Eliminate Degrade

K D  Minor

change

Decrease Decrease No effect in

theory

Improve in

K d small

Table 2: Effects of increasing a parameter independently(14).

In our process we will try the manual tuning method only to tune the PID controller.

Fig 5: Simulink model to control the level in feedback control scheme using the PID

controller.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 21/55

21

3.2 Fuzzy Logic Controller

The basic and key concept of fuzziness is that it allows a gradual and continuous

transition rather than a sudden and abrupt change in values. For example in a fuzzy seta member does not either or neither belongs to a group. Each and every member have

some membership in that group whereas in a normal set it either belongs to a group or

it neither belongs to a group[ either 0 or 1]. In fuzzy logic a member can take any

value between 0 to 1 depending on its membership of the group i.e. how much it

 belongs to the group.The membership function of a set maps each element to its

degree i.e. it gives the degree of membership for each element under consideration.

Fuzzy control is a control technique based on fuzzy logic. The basic idea of fuzzy

control is to apply fuzzy inference to control problems. In fuzzy control, the control

 box includes fuzzification, fuzzy inference using fuzzy if-then rules, anddefuzzification procedures. Fuzzy rules can include human descriptive judgements.

Commonly used fuzzy variables and their membership functionsWe define fuzzy variables that can represent values of the input and output variables.

A commonly used set of seven fuzzy variables follows:

 NB = Negative Big

 NM = Negative Medium

 NS = Negative Small

ZO = Zero

PS = Positive Small

PM = Positive MediumPB = Positive Big

Or, the two mediums, NM and PM, may be omitted, resulting in the following set of

five fuzzy variables. This smaller set of fuzzy variables is simpler, but it would result

less fine or delicate control. For simplicity, we will use this five fuzzy variable

version hereafter.

 NB = Negative Big

 NS = Negative Small

ZO = Zero

PS = Positive Small

PB = Positive Big

The next step is to define membership functions for these fuzzy variables. Defining amembership function is up to us, and the selection of membership

functions affects the control performance. What membership function we choose

depends on many factors, such as the type of application, how much fine control is

required, how fast the control must be performed, and so on. A rule of thumb is that

simpler membership function causes lesser computation time but reduces fine control.

There are two categories of membership functions. One is continuous and the other

discrete

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 22/55

22

Fig 6: Graphical representations of continuous triangular membership functions for seven

fuzzy variables.

The membership functions can be of various shapes such as triangular, trapezoidal

Gaussian etc.

Typical fuzzy control setup

At each time interval our fuzzy control system receives specific values for two inputs,

E and ∆E and yields one output, W.

Where En = ln-lsp : the level difference at time period n

∆E = En  –  En-1 : changing rate of E at time period n

Just as E is the difference between the current and target values, rather than the

current control value itself, W is a deviation from the current output value. Forexample, suppose that level is controlled by a feedwater flow rate, and the amount of

feedwater at time period n is qfn; then

qf n+1 = qf n +W.

Fuzzy if-then rules that derive W from E and ∆E 

The fuzzy if then rules described for our system for level control is

Rule 1: If E is ZO and ∆E is NB then W is PB. 

Rule 2: If E is ZO and ∆E is NS then W is PS

.

.

.

.

Rule 25: If E is PB and ∆E is PB then W is NB.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 23/55

23

The rules are tabulated below.

W ∆E NB ∆E NS ∆E ZO ∆E PS ∆E PB

E NB PB PB PM PS ZO

E NS PB PB PS ZO NS

E ZO PB PS ZO NS NB

E PS PM ZO NS NB NB

E PB ZO NS NB NB NB

Table 3: If then rules for our system for level control.

3.2.1 Optimization of the membership functions

The optimization of the membership functions to obtain the best response is done by

using a non-traditional optimization technique called the genetic algorithm (GA).

Genetic Algorithm(GA)

Genetic algorithm is a non-traditional optimization technique developed by Prof. John

Holland and his colleagues and students at University of Michigan at around 1975

 based on process of evolution. It is basically a search algorithm based on mechanics

of natural selection and natural genetics. It is based on the “survival of the fittest”

concept (darwanian theory) and simulates the process of evolution.

The key idea behind GA is that evolution is an optimizing process. The central theme

of research in GA is “robustness”. 

Why GA?

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 24/55

24

Fig 7: A comparison between GA and traditional techniques.

As we can see from the figure 7 that F(x) is a function with of x over a region of x

with one global optimum and three local optimum for min(F(x)).

The table below clearly describes why we are using GA.

Initial guess Traditional optimization Genetic Algorithm

Region I Converges to 1 Converges to 2

Region II Converges to 2 Converges to 2

Region III Converges to 3 Converges to 2

Table 4: A comparison between GA and traditional techniques

As we can see that in traditional optimization the solution approaches the local

optimum value whereas in GA the solution will always approach the global optimum

value.

However there is a disadvantage that GA is slow compared to other general

optimization technique.

The differences between GA and traditional methods of optimization can be stated as:

  GA work with coding of parameter set ,not the parameter themselves

 

GA search for population of point not a single point.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 25/55

25

  GA use the objective function information and not the derivative or second

derivative.

  GA use stochastic transition rates , not deterministic rates.

In our case the objective function is to minimize the integral of square error(ISE) and

the variables are k1, k2 and k3. k1 , k2 , k3 are the values which need to be multiplied

with the ranges of the functions E, ∆E and W. The optimum values of k1,k2 and k3

are obtained by using GA inthe optimization toolbox in MATLAB.

Fig 8:Simulink model for feedback fuzzy logic controller(FLC)

3.3 Neural Network (NN) predictive control

 Neural Networks as function approximators

As shown in Figure 9, we have some unknown function that we wish to approximate.We

want to adjust the parameters of the network so that it will produce the same response as the

unknown function, if the same input is applied to both systems.

Fig 9: Neural networks as function approximator (7)

.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 26/55

26

 Neuron Model

The scalar input p is multiplied by the scalar weight w to form wp , one of the

terms that is sent to the summer. The other input,1 , is multiplied by a bias b and then passed

to the summer. The summer input often referred to as net input , goes into a transfer function,

f which produces the scalar neuron output a.

Fig 10: Single Input neuron(7).

The neuron output is calculated as

…………….(28) 

w and b are both adjustable scalar quantities of the neuron.

The transfer function may be linear or non-linear function of n. One of the most commonly

used is the log-sigmoid transfer function.

Fig 11: log sigmoid transfer function(7).

This transfer function takes the input and squashes the output in the range of 0 to 1.

………………..(29) 

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 27/55

27

Fig 12: A multiple input neuron[7].

Typically a neuron has more than one input . A multiple input neuron is shown in figure 12.

The neuron has a bias b, which is summed with the weighted inputs to form the net input n.

.

which can be written in matrix form as

…………………..(30) 

Where the matrix W from the single neuron case has only one row.

Fig 13: Neuron with R inputs, Matrix notation[7].

Commonly one neuron, even with many inputs, is not sufficient. We might need five or ten,

operating in parallel, in what is called a layer . A single-layer network of S neurons.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 28/55

28

Fig 14: Layer of S neurons[7].

The S- neuron R-input layer can also be shown in matrix notation as

Fig 15: Layer of S- neurons. Matrix notation [7] 

Consider a network with several layers . Each layer has its own weight matrix W, its own

 bias vector b  a net input vector n, and an output vector a. We need to introduce some

additional notation to distinguish between these layers. We will use superscripts to identify

the layers. Thus, the weight matrix for the first layer is written as W1, and the weight matrix

for the second layer is written as W

2

. This notation is used in the three-layer network shownin Figure 16. As shown, there are R inputs, S1 neurons in first layer, S2 neurons in second

layer etc. A layer whose output is the network output is called an output layer . The other

layers are called hidden layers.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 29/55

29

Fig 16: Three- Layer Network [7].

The first stage of model predictive control is to train a neural network to represent the

forward dynamics of the plant. The prediction error between the plant output and the neuralnetwork output is used as the neural network training signal. The process is represented by

Figure 17.

One standard model that has been used for nonlinear identification is the Nonlinear

Autoregressive-Moving Average (NARMA) model:

..(31)

where u(k) is the system input ,  y(k) is the system output and d  is the system delay (we will

use a delay of 1 for the predictive controller).

Fig 17: Plant Identification[7].

For the identification phase, we train a neural network to approximate the nonlinear function .

The structure of the neural network plant model is given in Figure 14, where the blocks

labelled TDL are tapped delay lines that store previous values of the input signal.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 30/55

30

Fig 18: Neural network plant model[7].

We have modified our previous notation here, to allow more than one input into the network.

IWi,j is a weight matrix from input number j to network number i.

The equation for the plant model is given by

…….(32) 

where  is a function implemented by the neural network, and x  is a vector containing

all the network weight and biases.

The model predictive control method is based on the receding horizon technique. The neural

network model predicts the plant response over a specified time horizon. The predictions are

used by a numerical optimization program to determine the control signal that minimizes the

following performance criterion over the specified horizon.

  ∑ ∑ …..(33) 

where N1  , N2  and Nu  define the horizons over which the tracking error and the control

increments are evaluated. The  u’   variable is the tentative control signal ,  yr   is the desired

response and ym is the network model response. The  ρ value determines the contribution that

the sum of the squares of the control increments has on the performance index..

The following block diagram illustrates the model predictive control process. The controller

consists of the neural network plant model and the optimization block. The optimization

 block determines the values of u’  that minimize J and then the optimal u is the output to the

 plant.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 31/55

31

Fig 19: Neural network predictive control[7].

Fig 20: The Simulink model for neural network predictive control.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 32/55

32

Chapter 4

Results and Discussions

4.1 PID controller

4.1.1 Regulatory Problem

In the first regulatory problem we are giving a step change in fuel flow as 10 MW.

The PID parameters obtained by manual tuning are

K C = 500

τI = 1 , τD = 1.

The response of the system can be seen as follows

Fig 20: PID response for a step change in fuel flow.

The response obtained is a under damped response and the charecteristic of the

response are

Rise time, tr  = 0 s

Peak time , t p= 5 s

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 33/55

33

Time period, T= 30 s

Response time , ts = 100 s

Decay ratio = 0.33.

Overshoot = 0.58

The manipulated variable i.e. feedwater flow rate changes are given by

Fig 21 : Changes in feed water flow rate to control the level.

The changes in the feed water flow rate at the beginning drops to almost 26 kg/s and

then rises to almost 55 kg/s and after about 160 s it settles to a constant value of 51

kg/s.

In the second regulatory problem we are giving a step change in steam flow as 10

kg/s.

The PID parameters obtained by manual tuning are

K C = 500

τI = 1 , τD = 1.

The response of the system can be seen as follows

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 34/55

34

Fig 22: PID response for a step change in steam flow.

The response obtained is a under damped response and the charecteristic of the

response are

Rise time, tr  = 0 s

Peak time , t p= 4 s

Time period, T= 30 s

Response time , ts = 110 s

Decay ratio = 0.5.

Overshoot = 0.707

The manipulated variable i.e. feedwater flow rate changes are given by

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 35/55

35

Fig 23 : Changes in feed water flow rate to control the level.

The changes in the feed water flow rate at the beginning drops to almost 40 kg/s and

then rises to almost 65 kg/s and after about 200 s it settles to a constant value of 59kg/s. The water level increases at last to compensate to the losses in steam due to

increase in steam flow rate.

4.1.2 Servo problem

In the servo problem we are giving a step change of 0.1 m in the level set point.

The PID parameters obtained by manual tuning are

K C = 700

τI = 3 , τD = 1.

The response of the system can be seen as follows

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 36/55

36

Fig 24: PID response for a step change in steam flow.

The response obtained is a under damped response and the charecteristic of the

response are

Rise time, tr  = 11 s

Peak time , t p= 21 s

Time period, T=62 s

Response time , ts = 90 s

Decay ratio = 0.146.

Overshoot = 0.38

The manipulated variable i.e. feedwater flow rate changes are given by

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 37/55

37

Fig 25 : Changes in feed water flow rate to control the level.(servo problem)

The changes in the feed water flow rate at the beginning rises to almost 180 kg/s and

then drops to almost 15 kg/s and after about 150 s it settles to a constant value of 50kg/s.

4.2 Fuzzy Logic Controller

4.2.1 Regulatory Problem

Step Change in fuel flow rate by 10 MW

The membership function of the fuzzy logic controller before optimization are shown

 below

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 38/55

38

Fig 26 : membership function for input variable E. Range [-0.1 0.1]

Fig 27: membership function for input variable ∆E. Range [-0.1 0.1]

Fig 28: membership function for output variable W . Range [-20 20]

The responses before and after optimization of the membership functions are

compared below. As can be seen from the figure that the integral of square error (ISE)

 before and after optimization have a difference of almost 26. The three values k1,k2

and k3 which are multiplied with the member ship functions of E,∆E and W

respectively to minimize ISE are 0.109,0.814 and 0.302 respectively.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 39/55

39

Fig 27: response before optimization of membership functions (change in fuel flow)

ISE=148.1217

Fig 28: results after optimization of membership functions (change in fuel flow)

ISE=122.0842

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 40/55

40

Final results for step change in fuel flow

As we see from the response that in fuzzy control the response obtained is more

steady as obtained in PID controller. The response rises a peak of about 0.1 m aboveset point and then eventually decreases to the set point. The response obtained after 90

seconds.

Fig 29: response of FLC due to step change in fuel flow rate.

Fig 30: changes in feedwater flow rate to control the level for FLC for a step in fuel

flow.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 41/55

41

As we can see from figure 20 that the changes in feedwater flow rate can be limited

within a range ,in or case it is +- 20 kg/s but in PID controller it is not possible if the

disturbance by somehow increases to a great extent.

4.2.2 Servo Problem 

The membership function of the fuzzy logic controller before optimization are shown

 below

Fig 31 : membership function for input variable E. Range [-0.1 0.1]

Fig 32: membership function for input variable ∆E. Range [-0.1 0.1]

Fig 33: membership function for output variable W . Range [-20 20]

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 42/55

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 43/55

43

Final results for step change in set point.

Fig 36: response of FLC due to step change in set point.

Again we can change from the response that it is more smooth than the response

obtained by PID controller and non – oscillatory. The response time is about 105

seconds.

The feed water flow rate is shown below

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 44/55

44

Fig 37: changes in feedwater flowrate to control the level.(servo problem)

4.3 Comparison between PID and FLC

Step Change 

in 

PID ISE 

FLC ISE 

PID Response

time 

FLC Response

time 

PID Type of  

response 

FLC Type of  

response 

Fuel flow 147.57 122.08 100 s 90 s Oscillatory Smooth

Steam

Flow

147.55 -------- 110 s -------- Oscillatory Smooth

Set Point 160.95 156.33 90 s 105 s Oscillatory Smooth

Table 4: Comparison between PID and FLC response

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 45/55

45

Chapter 5

Conclusion

After analyzing the results we can conclude as:

  The model obtained clearly takes the shrink and swell effect in the drum

  The water level contribution(lw) to the water level(l) actually is the water in

the drum and hence we can distinguish it from the model.

  Both servo and regulatory problems are taken into account to control the water

level.

  The feed water flow rate is very efficient in controlling the level of water.

  PID gives an oscillatory response whereas FLC gives a smooth response.

  We can restrict the manipulated variable, in our case the feed water flow rate

to a certain range in FLC but it is not possible in PID controllers.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 46/55

46

References:

1) 

K.J.Astrom, R.D.Bell, “ Drum-boiler dynamics”, Automatica,2000,vol 36,pg 363-378.

2)  A.Parry, J.F. Petotrot and W.J.Vivier. “ Recent progress in sg level control in French

 pwr plants.” In  Proc. Int. Conf on Boiler Dynamics and Control in Nuclear

 Powerstations, pg 81-88. British Nuclear Energy Society ,1995

3)  H.H. Hacene Habbi, M.Zelmat, B.O. Bouamama,” A dynamic fuzzy model for drum

boiler turbine system”,Automatica,2002,vol 39,pg 1213-1219.

4)  E.J.Adam, J.L.Maarchetti (1997) ,” Dynamic Simulation of large boilers with natural

circulation, Computers and Chemical Engineering ”,1999,vol 23,pg 1031-1040.

5) 

M.E. Flynn, M.J.O.Malley(1999), “ A drum boiler model for long term power system

dynamic simulation”, IEEE transactions on Power Systems,1999, Vol. 14, pg .

6)  H.Kim, S.Choi(2005), “ A model on water level dynamics in natural circulation drum-

type boilers”, International Communications in Heat and Mass Transfer,2005,vol

32,pg 786-796.

7)  M.T.Hagan,H.B.Demuth,O.D.Jesus, “ An introduction to use of neural networks in

control system”, International journal of robust and non linear control,2002, Vol 12

,pg 959-985.

8)  M. Hudson Beale,  M. T. Hagan, H. B. Demuth ,”Neural Network Toolbox™ 7”,

User’s Guide MATLAB.

9)  D.M. Himmelblau,” Applications of Artificial Neural Networks in Chemical

 Engineering ” , Korean Journal. Chemical Engineering.2000,vol 17,pg 373-392.

10) Toshinori Munakata, “ Fundamentals of the New Artificial Intelligence”, Springer-

Verlag London Limited, 2008, ISBN- 978-1-84628-839-5.

11) “Fuzzy Logic Toolbox™”, User’s Guide, MATLAB ,R2014a. 

12) “Basics of S-functions”  retrieved march 5, 2014 from the world wide web

“http://www.mathworks.in/help/simulink/s-function-basics.html” 

13) 

“Fuzzy Logic toolbox”  retrieved april 5, 2014 from the world wide web

“http://www.mathworks.in/products/fuzzy-logic/” 

14) “PID Controller” retrieved may 9, 2014 from the world wide web

http://en.wikipedia.org/wiki/PID_controller.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 47/55

47

15) “Neural Network toolbox” retrieved may 5,  2014 from the world wide web

http://www.mathworks.in/products/neural-network/

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 48/55

48

Appendix A

MATLAB CODE

function[sys,x0,str,ts]=sfd302_sfcn(t,x,u,flag,x_init)

%sfd302 S-function version of the four state model

%compatible with simulink block diagrams.

global qr qdc qct;

%plant parameters-------------------------------

mt=300000;mr=100000;md=20000;Cp=650;

Cfw=4.18;Ad=23;Vd=37;Vr=37;Vdc=11;

Vt=Vd+Vr+Vdc;

ke=200;Vsd0=8;beta=0.3;

%properties of steam and water in saturated table

a01=2.7254E6;a11=-1.8992E4;a21=-1160.0;a02=53.1402;a12=7.673;a22=0.36;

a03=1.4035E6;a13=4.9339E4;a23=-880.0;

a04=691.35;a14=-18.672;a24=-0.0603;

a05=310.6;a15=8.523;a25=-0.33;

%-------------------------------------------------

if abs(flag) ==1, %compute state derivatives

%state initial conditions

Vwt=x(1);

 p=x(2);

ar=x(3);

Vsd=x(4);%controls or inputs

Q=u(1)*1e6; %conversion to watts

qf=u(2);

tf=u(3);

qs=u(4)+4.8*(p-8.5); %correction for steam transducer

% properties of steam and water in saturated state

hs=a01+(a11+a21*(p-10))*(p-10);

dhsdp=a11+2*a21*(p-10);

rs=a02+(a12+a22*(p-10))*(p-10);

drsdp=a12+2*a22*(p-10);

hw=a03+(a13+a23*(p-10))*(p-10);dhwdp=a13+2*a23*(p-10);

rw=a04+(a14+a24*(p-10))*(p-10);

drwdp=a14+2*a24*(p-10);

ts=a05+(a15+a25*(p-10))*(p-10);

dtsdp=a15+2*a25*(p-10);

%properties of water in subcritical state

hf=(Cfw*tf+p*1e3/rw)*1e3;

%the model equations--------------------

hc=hs-hw;

hr=ar*hs+(1-ar)*hw;

%average steam quality volume rati and partial derivativesz=ar*(rw-rs)/rs;

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 49/55

49

av=rw/(rw-rs)*(1-(1/z)*log(1+z));

davdar=rw/rs*((1/z)*log(1+z)-1/(z+1))/z;

zp=(rs*drwdp-rw*drsdp)*ar/rs/rs;

z1=(rw*drsdp-rs*drwdp)/(rw-rs)/(rw-rs);

z2=rw/(rw-rs)*((1/z)*log(1+z)-1/(1+z))/z*zp;

davdp=z1*(1-(1/z)*log(1+z))+z2;%circulation flow

s1=ke*(rw-rs)*Vr*av;

qdc=sqrt(s1);

%equations for coefficents of derivatives of state variables

Td=600/qs;

Vst=Vt-Vwt;

Vwd=Vwt-Vdc-(1-av)*Vr;

e11=rw-rs;

e12=Vst*drsdp+Vwt*drwdp;

e21=hw*rw-hs*rs;

e22x=-Vt*1e6+mt*Cp*dtsdp;e22=Vst*(hs*drsdp+rs*dhsdp)+Vwt*(hw*drwdp+rw*dhwdp)+e22x;

e3w=(rw*dhwdp-ar*hc*drwdp)*(1-av)*Vr;

e3x=(rs+(rw-rs)*ar)*hc*Vr*davdp-Vr*1e6+mr*Cp*dtsdp;

e32=((1-ar)*hc*drsdp+rs*dhsdp)*av*Vr+e3w+e3x;

e33=(rs+(rw-rs)*ar)*hc*Vr*davdar;

e42y=(1+beta)*ar*Vr;

e42x=e42y*((1-av)*drwdp+av*drsdp+(rs-rw)*davdp)+Vsd*drsdp;

e42=(rs*Vsd*dhsdp+rw*Vwd*dhwdp-Vsd*1e6+md*Cp*dtsdp)/hc+e42x;

e43=(1+beta)*(ar*Vr*(rs-rw)*davdar);

e44=rs;

e=[e11,e12,0,0

e21,e22,0,0

0,e32,e33,0

0,e42,e43,e44];

%the right hand side of state equations

 b4=(hf-hw)*qf/hc+rs*(Vsd0-Vsd)/Td;

 b=[qf-qs; Q+qf*hf-qs*hs; Q-qdc*ar*hc; b4];

%solve linear equation for derivatives

dx=e\b;

qx=(rw-rs)*Vr*davdp*dx(2)+(rw-rs)*Vr*davdar*dx(3);

%two important flows for understanding behaviourqr=qdc-(av*drsdp+(1-av)*drwdp)*Vr*dx(2)+qx;

qctx=rs*Vst*dhsdp+rw*Vwt*dhwdp-Vt*1e6+mt*Cp*dtsdp;

qct=((hw-hf)*qf+qctx*dx(2))/hc;

%step the derivatives, dx is a 4X1 vector

sys = [dx];

%-------------------------------------------------------------

elseif flag==3, %Compute outputs

%extract state variables

Vwt=x(1);

 p=x(2);

ar=x(3);Vsd=x(4);

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 50/55

50

%drum level

rs=a02+(a12+a22*(p-10))*(p-10);

rw=a04+(a14+a24*(p-10))*(p-10);

z=ar*(rw-rs)/rs;

av=rw/(rw-rs)*(1-(1/z)*log(1+z));

Vwd=Vwt-Vdc-(1-av)*Vr;ls=Vsd/Ad;

lw=Vwd/Ad;

l=lw+ls;

sys=[l,p,lw,ls,qr,av,qdc,ar,Vwt,Vsd,qct];

%--------------------------------------------------------------

elseif flag==0, %INITIALIZATIONS

str=[];

sizes(1)=4; %4 continious states

sizes(2)=0; %0 discrete statessizes(3)=11; % 11 outputs

sizes(4)=4; %4 inputs

sizes(5)=0; % no discontinious roots

sizes(6)=0; % no direct term

sizes(7)=1; ts=[0,0]; %efficency fix(see[1])

sys=sizes';

x0(1)=x_init(1);

x0(2)=x_init(2);

x0(3)=x_init(3);

x0(4)=x_init(4);

else

sys=[]; %flags 2 or 4 , not considered since we have no discrete states.

end; % Also flag 5 is of no interest.

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 51/55

51

Appendix B

Optimization Code

The code for the fuzzy logic file is:

d=newfis('boiler','mamdani');

d=addvar(d,'input','err',[-0.1 0.1]*k1);

d=addmf(d,'input',1,'nb','trimf',[-0.19 -0.1 -0.01]*k1);

d=addmf(d,'input',1,'ns','trimf',[-0.03 -0.015 0]*k1);

d=addmf(d,'input',1,'z0','trimf',[-0.0004 0 0.0004]*k1);

d=addmf(d,'input',1,'ps','trimf',[0 0.015 0.03]*k1);

d=addmf(d,'input',1,'pb','trimf',[0.01 0.1 0.19]*k1);

d=addvar(d,'input','dele',[-0.1 0.1]*k2);

d=addmf(d,'input',2,'nb','trimf',[-0.15 -0.1 -0.05]*k2);

d=addmf(d,'input',2,'ns','trimf',[-0.1 -0.05 0]*k2);d=addmf(d,'input',2,'z0','trimf',[-0.0004 0 0.0004]*k2);

d=addmf(d,'input',2,'ps','trimf',[0 0.05 0.1]*k2);

d=addmf(d,'input',2,'pb','trimf',[0.05 0.1 0.15]*k2);

d=addvar(d,'output','w',[-20 20]*k3);

d=addmf(d,'output',1,'nb','trimf',[-27.5 -20 -12.5]*k3);

d=addmf(d,'output',1,'nm','trimf',[-15 -10 -5]*k3);

d=addmf(d,'output',1,'ns','trimf',[-10 -5 0]*k3);

d=addmf(d,'output',1,'z0','trimf',[-2.5 0 2.5]*k3);

d=addmf(d,'output',1,'ps','trimf',[0 5 10]*k3);

d=addmf(d,'output',1,'pm','trimf',[5 10 15]*k3);d=addmf(d,'output',1,'pb','trimf',[12.5 20 27.5]*k3);

ruleList=[ ...

1 1 7 1 1

1 2 7 1 1

1 3 6 1 1

1 4 5 1 1

1 5 4 1 1

2 1 7 1 1

2 2 7 1 1

2 3 5 1 1

2 4 4 1 12 5 3 1 1

3 1 7 1 1

3 2 5 1 1

3 3 4 1 1

3 4 3 1 1

3 5 1 1 1

4 1 6 1 1

4 2 4 1 1

4 3 3 1 1

4 4 1 1 1

4 5 1 1 15 1 4 1 1

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 52/55

52

5 2 3 1 1

5 3 1 1 1

5 4 1 1 1

5 5 1 1 1];

d=addrule(d,ruleList);

The code for the process file is:

mt=300000;mr=100000;md=20000;Cp=650;

Cfw=4.18;Ad=23;Vd=37;Vr=37;Vdc=11;

Vt=Vd+Vr+Vdc;

ke=200;Vsd0=8;beta=0.3;

%properties of steam and water in saturated tablea01=2.7254E6;a11=-1.8992E4;a21=-1160.0;

a02=53.1402;a12=7.673;a22=0.36;

a03=1.4035E6;a13=4.9339E4;a23=-880.0;

a04=691.35;a14=-18.672;a24=-0.0603;

a05=310.6;a15=8.523;a25=-0.33;

dt=1;

% t(1)=0;

ise=zeros(1,200);

err=zeros(1,200);

qf=zeros(1,200);

 p=zeros(1,200);

ar=zeros(1,200);

t=zeros(1,200);t=1:1:200;

Vwt=zeros(1,200);

Vsd=zeros(1,200);

l=zeros(1,200);lw=zeros(1,200);ls=zeros(1,200);Q=zeros(1,200);qs=zeros(1,200);

for i=1:200

Vwt(1)=57.2;

 p(1)=8.5;

ar(1)=0.0511;Vsd(1)=4.8971;

Q(1:50)=86.813*1e6;%conversion to watts

Q(51:200)=96.813*1e6;

qf(1)=50;

tf=240;

qs(1:200)=50+4.8*(p(i)-8.5);

%qs(51:200)=60+4.8*(p(i)-8.5);

% properties of steam and water in saturated state

hs=a01+(a11+a21*(p(i)-10))*(p(i)-10);

dhsdp=a11+2*a21*(p(i)-10);

rs=a02+(a12+a22*(p(i)-10))*(p(i)-10);drsdp=a12+2*a22*(p(i)-10);

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 53/55

53

hw=a03+(a13+a23*(p(i)-10))*(p(i)-10);

dhwdp=a13+2*a23*(p(i)-10);

rw=a04+(a14+a24*(p(i)-10))*(p(i)-10);

drwdp=a14+2*a24*(p(i)-10);

ts=a05+(a15+a25*(p(i)-10))*(p(i)-10);

dtsdp=a15+2*a25*(p(i)-10);%properties of water in subcritical state

hf=(Cfw*tf+p(i)*1e3/rw)*1e3;

%the model equations--------------------

hc=hs-hw;

hr=ar(i)*hs+(1-ar(i))*hw;

%average steam quality volume rati and partial derivatives

z=ar(i)*(rw-rs)/rs;

av=rw/(rw-rs)*(1-(1/z)*log(1+z));

davdar=rw/rs*((1/z)*log(1+z)-1/(z+1))/z;

zp=(rs*drwdp-rw*drsdp)*ar(i)/rs/rs;

z1=(rw*drsdp-rs*drwdp)/(rw-rs)/(rw-rs);z2=rw/(rw-rs)*((1/z)*log(1+z)-1/(1+z))/z*zp;

davdp=z1*(1-(1/z)*log(1+z))+z2;

%circulation flow

s1=ke*(rw-rs)*Vr*av;

qdc=sqrt(s1);

%equations for coefficents of derivatives of state variables

Td=600/qs(i);

Vst=Vt-Vwt(i);

Vwd=Vwt(i)-Vdc-(1-av)*Vr;

e11=rw-rs;

e12=Vst*drsdp+Vwt(i)*drwdp;

e21=hw*rw-hs*rs;

e22x=-Vt*1e6+mt*Cp*dtsdp;

e22=Vst*(hs*drsdp+rs*dhsdp)+Vwt(i)*(hw*drwdp+rw*dhwdp)+e22x;

e3w=(rw*dhwdp-ar(i)*hc*drwdp)*(1-av)*Vr;

e3x=(rs+(rw-rs)*ar(i))*hc*Vr*davdp-Vr*1e6+mr*Cp*dtsdp;

e32=((1-ar(i))*hc*drsdp+rs*dhsdp)*av*Vr+e3w+e3x;

e33=(rs+(rw-rs)*ar(i))*hc*Vr*davdar;

e42y=(1+beta)*ar(i)*Vr;

e42x=e42y*((1-av)*drwdp+av*drsdp+(rs-rw)*davdp)+Vsd(i)*drsdp;

e42=(rs*Vsd(i)*dhsdp+rw*Vwd*dhwdp-Vsd(i)*1e6+md*Cp*dtsdp)/hc+e42x;e43=(1+beta)*(ar(i)*Vr*(rs-rw)*davdar);

e44=rs;

e=[e11,e12,0,0

e21,e22,0,0

0,e32,e33,0

0,e42,e43,e44];

%the right hand side of state equations

 b4=(hf-hw)*qf(i)/hc+rs*(Vsd0-Vsd(i))/Td;

 b=[qf(i)-qs(i); Q(i)+qf(i)*hf-qs(i)*hs; Q(i)-qdc*ar(i)*hc; b4];

%solve linear equation for derivatives

dx=e\b;qx=(rw-rs)*Vr*davdp*dx(2)+(rw-rs)*Vr*davdar*dx(3);

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 54/55

54

%two important flows for understanding behaviour

qr=qdc-(av*drsdp+(1-av)*drwdp)*Vr*dx(2)+qx;

qctx=rs*Vst*dhsdp+rw*Vwt(i)*dhwdp-Vt*1e6+mt*Cp*dtsdp;

qct=((hw-hf)*qf(i)+qctx*dx(2))/hc;

Vwt(i+1)=(Vwt(i)+dx(1)*dt);

 p(i+1)=(p(i)+dx(2)*dt);ar(i+1)=ar(i)+dx(3)*dt;

Vsd(i+1)=Vsd(i)+dx(4)*dt;

ls(i)=Vsd(i)/Ad;

lw(i)=Vwd/Ad;

l(i)=lw(i)+ls(i);

lwsp(1:50)=0.859;

%lwsp(51:200)=0.909;

err(i)=lw(i)-lwsp(i);

if(err(i)>=0.00001 || err(i)<=-0.00001)if i==1;

ise(i)=err(i)*(err(i));

else

ise(i)=ise(i-1)+err(i)*(err(i));

end

end

if i==1

dele=0;

else

dele=err(i)-err(i-1);

end

w=evalfis([err(i) dele], d);

qf(i+1)=50+w;

end

iseplot=ise(200);

The objective function is:

function [iseplot]=objective(par)

k1=par(1);

k2=par(2);

k3=par(3);

fuzzyboils;

drumboilerdynamics;

end

8/19/2019 Modeling,simulation and control of a drum boiler

http://slidepdf.com/reader/full/modelingsimulation-and-control-of-a-drum-boiler 55/55