control ofa nonlinear coupled three tank system using

6
Control of a Nonlinear Coupled Three Tank System using Feedback Linearization Fatima Tahir, Naeem Iqbal and Ghulam Mustafa Pakistan Institute of Engineering and Applied Sciences (PlEAS) Nilore, Islamabad, PAKISTAN [email protected], [email protected] and [email protected] Tank-1 meters F;., F 2 , F;, F 4 , F, The system has two feedback loops of the flow of water; one between tank-1 and tank-2 and the second between tank-2 and tank-3. Inputs to this system are voltages applied to the pumps and heat inputs. Outputs of the system are level and temperature of water in each tank. Levels are measured in centimeters and temperatures are measured in Kelvin. To model the system, it is assumed that there are no thermal losses, thermal delays, pump delays in the system, mixing is perfect and hydraulic and friction losses are negligible. The system has been modeled using Bernoulli's law, principle of conservation of fundamental quantities mass and energy. According to Bernoulli's law, the flow' Fa' out of an outlet having area of cross-section 'a' of a tank having height of liquid 'h' is given by: F: (1) In (1), 'g' is the gravitational acceleration whose value is equal to 9.8 m / S2. Let 'V' be an on/off valve having binary logic 0 or 1 according to it's OFF or ON state respectively, then the effect of this valve can be introduced as follows: F: == V x a x x g x h (2) V11 V8 Tank-3 Tank-2 Reservoir Fig. 1. Sketch of coupled three tank system Q1 V3 V2 P1 I. INTRODUCTION The sketch of CTTS is shown in Fig 1. It consists of one reservoir, three tanks, three pumps P; , seven on-off valves V 2 , v:, v:, seven level sensors L I , L 2 , L 3 , L 4 , L 5 , L 6 , L 7 , four temperature sensors and five flow- Abstract - This paper presents the modeling and control of a nonlinear coupled three tank system (CTTS). In this work, nonlinear state space dynamics of CTTS are derived. The objective is to control the level and tern perature of water in each tank. The control is achieved using classical nonlinear feedback linearization technique. Input and output scaling is done according to the interface with a standard PLC. Design steps of nonlinear control and input/output responses are shown. Keywords - Multi-Input-Multi-Output (MIMO) system, Coupled Three-Tank System (CTTS), Feedback Linearization (FBL), Programmable Logic Control (PLC) Feedback linearization (FBL) is the most widely used technique for the control of nonlinear systems. It is based on some early work of Krener [1] and Brocket [2] according to which a large class of nonlinear systems can be exactly linearized by a combination of a nonlinear transformation of state coordinates and a nonlinear state feedback control law. A good survey of theory can be found in work done by Isidori [3], Nijmeijer and Van Der Schaft [4], Slotine and Lie [5]. The central idea of this technique is the algebraic transformation of the nonlinear system dynamics into a fully or partly linear system so that conventional linear control techniques can be applied. The main difference between feedback linearization and conventional linearization is that feedback linearization is achieved by exact state transformations and feedback, rather than by linear approximations of the dynamics [5]. It results in cancellation of the nonlinearities present in a nonlinear system in such a way that the closed-loop dynamics of the system is linear. This paper presents the control of a nonlinear multi-input- multi-output (MIMO) system using the technique of feedback linearization by which the original nonlinear system can be transformed into a linear and controllable system by nonlinear state space change of coordinates and a state feedback control law. The MIMO system under consideration is a coupled three tank system (CTTS). II. COUPLED THREE TANK SYSTEM AND ITS MODELING 978-1-4244-4361-1/09/$25.00 ©2009 IEEE

Upload: others

Post on 04-Dec-2021

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Control ofa Nonlinear Coupled Three Tank System using

Control of a Nonlinear Coupled Three Tank Systemusing Feedback Linearization

Fatima Tahir, Naeem Iqbal and Ghulam MustafaPakistan Institute of Engineering and Applied Sciences (PlEAS) Nilore, Islamabad, PAKISTAN

[email protected], [email protected] and [email protected]

Tank-1

meters F;., F2 , F;, F4 , F, The system has two feedback loops

of the flow of water; one between tank-1 and tank-2 and thesecond between tank-2 and tank-3. Inputs to this system arevoltages applied to the pumps and heat inputs. Outputs of thesystem are level and temperature of water in each tank. Levelsare measured in centimeters and temperatures are measured inKelvin.

To model the system, it is assumed that there are nothermal losses, thermal delays, pump delays in the system,mixing is perfect and hydraulic and friction losses arenegligible. The system has been modeled using Bernoulli's law,principle of conservation of fundamental quantities mass andenergy.

According to Bernoulli's law, the flow' Fa' out of an

outlet having area of cross-section 'a' of a tank having heightof liquid 'h' is given by:

F: ==ax~2xgxh (1)

In (1), 'g' is the gravitational acceleration whose value is

equal to 9.8 m / S2. Let 'V' be an on/off valve having binarylogic 0 or 1 according to it's OFF or ON state respectively,then the effect of this valve can be introduced as follows:

F: == V x a x ~2 x g x h (2)

V11V8

Tank-3

Tank-2

ReservoirFig. 1. Sketch of coupled three tank system

Q1

V3 ~

V2

P1

I. INTRODUCTION

The sketch of CTTS is shown in Fig 1. It consists of onereservoir, three tanks, three pumps P; , ~, ~, seven on-off

valves ~, V2 , ~, v:, ~, v:, ~, seven level sensors LI , L2 ,

L3

, L4

, L5

, L6

, L7

, four temperature sensors and five flow-

Abstract - This paper presents the modeling and control of anonlinear coupled three tank system (CTTS). In this work,nonlinear state space dynamics of CTTS are derived. Theobjective is to control the level and tern perature of water in eachtank. The control is achieved using classical nonlinear feedbacklinearization technique. Input and output scaling is doneaccording to the interface with a standard PLC. Design steps ofnonlinear control and input/output responses are shown.

Keywords - Multi-Input-Multi-Output (MIMO) system, CoupledThree-Tank System (CTTS), Feedback Linearization (FBL),Programmable Logic Control (PLC)

Feedback linearization (FBL) is the most widely usedtechnique for the control of nonlinear systems. It is based onsome early work of Krener [1] and Brocket [2] according towhich a large class of nonlinear systems can be exactlylinearized by a combination of a nonlinear transformation ofstate coordinates and a nonlinear state feedback control law. Agood survey of theory can be found in work done by Isidori [3],Nijmeijer and Van Der Schaft [4], Slotine and Lie [5].

The central idea of this technique is the algebraictransformation of the nonlinear system dynamics into a fully orpartly linear system so that conventional linear controltechniques can be applied. The main difference betweenfeedback linearization and conventional linearization is thatfeedback linearization is achieved by exact statetransformations and feedback, rather than by linearapproximations of the dynamics [5]. It results in cancellation ofthe nonlinearities present in a nonlinear system in such a waythat the closed-loop dynamics of the system is linear.

This paper presents the control of a nonlinear multi-input­multi-output (MIMO) system using the technique of feedbacklinearization by which the original nonlinear system can betransformed into a linear and controllable system by nonlinearstate space change of coordinates and a state feedback controllaw. The MIMO system under consideration is a coupled threetank system (CTTS).

II. COUPLED THREE TANK SYSTEM AND ITSMODELING

978-1-4244-4361-1/09/$25.00 ©2009 IEEE

Page 2: Control ofa Nonlinear Coupled Three Tank System using

(11)1

x--~~

TABLE 1CONSTANTS WITH DESCRIPTION AND VALUES

Reference [6] can be seen for more details.

III. INPUT AND OUTPUT SCALING AND OPERATINGPOINT CONSTANTS

Constant Description Value withUnits

V2 , V4 , ~, ~ Valves 2, 4, 6,7 1

~,~Valves 3, 5 0

AI' ~,~Cross section Area of Tanks-1 , 126.6769 ern'2,3

a Cross section of pipes 0.2419 crrr'

K I , K 2 , K 3Gain Constants of Pumps 1.3887

HI I Height of pipe through ~ 135 em

H I2 Height of pipe through v: 30.48 em

H2 1 Height of pipe through ~ 82.55 em

H22 Height of pipe through ~ 30.48 em

H31 Height of pipe through ~ 30.48 em

t; Input water Temperature 303 K

1\ 1\ 1\ Operating Voltages of pumps 12 VVI' V2 ' V3

1\ 1\ 1\ Operating Powers of Heaters 1000 WattQI' Q2' Q3

R Density of Water 1000 Kg/ern'

CpSpecific Heat of Water 4185 J/Kg.K

Scaling is very important in practical applications becauseit makes model analysis and controller design (weightselection) much simpler and easier [7]. The specifications ofthe system should be considered very thoroughly to have abetter scaling. Inputs and outputs should be scaled properly toget a maximum variation of output for a maximum variation ofinput. Table 1 shows the constants used with description andnumerical value. For details, [6] can be seen.

(7)

(8)

(6)

(9)

(10)

B. State Equations/or Tank-2

dh2 = [-~a~2g(H21 + h2) - ~a~2g(H22 + h2)]

~ dt +~a~2g(H12 +~)+K3V3 -K2v2

Let 'T " "I',' and 'Tj , be the temperatures of water in

the tank, water coming into the tank from th inlet and water

leaving the tank via r outlet respectively. Let 'R' be the

density of water. According to the law of conservation offundamental quantity energy:

d(fAhC T) n m

---P-=fC 'LFT-fC 'LF.Tdx p i=l lip j=l }

Simplifying (6), applying product rule of differentiationand then using (5), we get;

Ah dT = ±F; (1; - T)dx i=l

Using (1) to (7), the state equations obtained for the threetanks are as follows:

Equation (2) shows that when valve is open (i.e. V == 1),the output-flow of the pipe is given by (1) and when valve isclosed (i.e. V == 0 ), the output-flow of the pipe is equal to zero.

Consider a pipe of height i.e. 'H' attached to the outlet.Then outflow is given by:

Fa =Vxax~2xgx(h+H) (3)

If 'v' is the voltage applied to the pump, then outflow of

the pump' Fp , out of a pump is given by:

Fp = Kxv (4)

where' K ' is the constant of proportionality.The rate of change of volume in a tank is equal to the

difference of the inflow and outflow of the tank. Let 'n' bethe total number of flows into a single tank and 'm' be thetotal number of flows out of the same tank. Let 'A' be thearea of the tank and 'h' be the level of the water in the tank.As area of the tank is constant, so change in volume of water inthe tank is dependent only on the level of water in the tank. Let,F;' be the input flow through r inlet of the tank and 'Fj , be

the output flow of the r outlet of the tank, then according to

the law of conservation of fundamental quantity mass:dh n m

A x - = L ~ - L Fj (5)dt i=l j=l

Page 3: Control ofa Nonlinear Coupled Three Tank System using

IV. CONTROLLER DESIGN USING FEEDBACKLINEARIZATION

To find the equilibrium point of a system, we need to solvethe following:

~(.!) = [~l (.!) ~2 (.!) ~3 C!) s,W ~5 (.!) ~6 (.!) ] (22)

where

(28)

(31)

(26)

(27)

(32)

(33)

(30)

(29)

m

L1j=ni=l

If

Then nonlinear system can be exactly feedback linearized [3]which is true for CTTS.

There are two conditions relevant to vector relative degreewhich must be satisfied for the MIMO system.

a. Condition No.1For each Yi , for at least one ~j ,

LgjL11j-Ihi(~0) 7= 0,1 ~ i.] ~ m

For output YI =~ (~) = Xl ,

Ii =1~ L~~ =~ = Xl

L LO i; = 8(L~~) (X) = a(xl ) (X)gl 1"1 a gl - a gl_

X - X -

=[1 0 0 0 0 0]~l (~) = 0.011 7= 0

L LOh, = 8(L~~) g (x) = 8(x]) g (x) = 0.011 *- 0g2 1 ax _2 - ax _2_

L g3L~~ = L g4L~~ = L gsL~~ = L g6L~~ =0

For output Y2 = hz (~) = X2 ,

r2 =1~ L~hz = h2 = x2

L g2L~h2 =-0.011 7= 0

x=O

(24)= [15.8 23.47 23.27 314.59 317.76 320.314]T

This equilibrium point is needed in the verification of thetwo conditions for a MIMO system to have a particular vectorrelative degree.

To which equilibrium point, a system will converge,depends on the initial conditions. Optimization toolbox ofMATLAB is used to solve for equilibrium point. xinilial is the

vector representing initial values of the states.

xinitial =[5 5 5 300 300 300]T (23)

The technique used to fmd the solution uses large scalealgorithm to solve for the problems with bound constraints.Different options can be set according to the requirements. ForCTTS, the upper bound for the levels is 25 em whereas thelower bound is 0 ern. For temperature of water in each tank, theupper bound is 373 K and lower bound is 273 K. Theequilibrium point thus obtained is:

o [0 0 0 0 0 oJ~ = Xl X2 X3 X4 Xs X6

B. Step 2: Vector Relative DegreeLet 1j be the relative degree ofYi , then 1j is equal to the

number of times, output Yi needs to be differentiated until any

of the inputs appears explicitly in the expression.~ 1j =1,1~ i ~ 6 (25)(21)

(14)

(15)

(16)

o

oooo

0.0019

ooooo

oo

o0.011

-0.011

o

oo

-0.011(xs-x6 )

o X2

o 0

0.011 0

-0.011 0

o 0

-0.011(x4-xs ) '~4 = 0.0019 '~6 =

Xl Xl

f(~) =

Consider a MIMO system of the form

~ =f(~)+ t gj(~)uj- j=l-

YI =~(x)

Y2 =hz(x)

0.011

oo

~l = 0.011(x4-303)

'~3 =Xl

Ym = hm(x) (17)

where .[ and ~j 's are smooth vector fields and hj (x) 's are

smooth functions defmed on an open set of R" . Then forCTTS,

Xi =hi' ui =Vi , 1~ i ~ 3 (18)

x j = ~_3,Uj = Qj_3,4 s ] ~ 6 (19)

~ = !:!.(~) =[~ C!) hz W ~ (~:) h4 (.!) hs (.!) h6 (.!)r (20)

= [Xl X2 X3 X4 Xs X6 ]T

-0.0845~30.48 + Xl

0.0845(~30.48+XI ~~30.48+X2)

0.0845(~30.48+X2 ~~30.48+X3)

o

A. Step 1: Equilibrium Point

Page 4: Control ofa Nonlinear Coupled Three Tank System using

(58)

(56)

(55)

(54)

(53)

Lf~ (.!)

Lfh2 (.!)

Lf~(.!)

Lfh4 (.!)

Lfhs(.!)

Lfh6 (.!)

L hex) = a(hi(~» I(x)fl- ax--

-0.0845~30.48+ Xl

0.0845(~30.48+Xl-~r--30-.4-8-+X-2 )

0.0845(~30.48+X2 -~30.48+X3)

o

x3

==>~=[Ul U2 U3 U4 Us U6 ]T (57)

Lf'i ~ (~)

Lfr2 h2 (.!)

Lfr3~ (.!)

b(x) -- - L

fr4 h

4(.!)

Lfrshs(.!)

Lfr6 h6 (.!)

where

U1 = 90.9091w1 + 1.5364~762 + 25x1 + 526.316(x4 - 303)w4

U2 =90.9091wl +3.0727~762+25xl -90.9091w2

-1.5364~762 + 25x2 + 526.316(xs - 303)w4

U3 = 90.9091wl +3.0727~762+25xl -90.9091w3

-1.5364~762 + 25x3 + 526.316(xs - 303)w4

+526.316(x6 -x5 ) ( w5 -0.0169~762+25xl (x, -xX)

U4 =526.316xlW4

U5 =526.316x2 ( W5 -0.0169~762+25xl (x, -xX)

U6 =526.316x 3 ( W6 + 0.0169~762 + 25x2 (x, - xX)

Using the nonlinear feedback control law given by (57), thelinear system obtained is:

where

C. Step 3: Feedback LawThe control law which converts the nonlinear model of the

CTTS into an exact linear representation is given by:

s. = :1-1(.!)(!!: - Q)= [Ul U2 U3 U4 Us U6 ]T (52)

where

and

(39)

(40)

(41)

where

(42)

(43)

(44)

(45)

(46)

(47)

(48)

(49)

(50)

(51)

For output Y6 = h6(.!) = X6,

r6 = 1 ==> L~h6 = h6 = x6

LgiL~h6 =0,1 ~ i ~ 5

L LO h = 0.0019 0g6 f 6 X0:;t:

3

Lg3L~h2 = 0.011 :;t: 0 (34)

Lg, L~h2 = Lg4L~h2 = LgsL~h2 = Lg6L~~ = 0 (35)

For output Y3 =~ (.!) = x3 ,

r3 = 1 ==> L~~ = ~ = x3 (36)

Lg, L~~ = Lg2L~~ = Lg4L~~ = LgsL~~ = Lg6L~~ =0 (37)

Lg3L~~ = -0.011:;t: 0 (38)

For output Y4 =h, (.!) =x 4 ,

r4 = 1 ==> L~h4 = b, = x4

°h O.Oll(x~ - 303) 0Lg,Lf 4= ° :;t:

Xl

° O.OII(x~-x~) 0Lg2Lfh4 = 0 :;t:

Xl

L LO h = 0.0019 0g4 f 4 X0:;t:

1

Lg3L~h4 = LgsL~h4 = Lg6L~h4 = 0

For output Ys = hS (.!) = Xs ,

rS = 1 ==> L~hs = hs = Xs

Lg, L~hs = Lg2L~hs = Lg4L~hs = Lg6L~hs = 0

L LOh =_O.OII(x~-x~) 0g3 f 5 O:;t:

X2

L Lfr6-1~(x)g6 - 6x6

should be a non-singular matrix at .! =.!O . This condition is

also satisfied.Since both conditions are satisfied, so exact linearization

of the system is possible.

b. Condition No.2The matrix

Hence first condition for defining relative degree 1j at the

point .!O is satisfied.

Page 5: Control ofa Nonlinear Coupled Three Tank System using

time (se c)

T ank2( X2, x,)

REFERENCES

Fig. 3. Flow chart showing controllers with interactions

u6 ' w3 ' w6 •

Fig 3 shows the flow chart having the three tanks beingcontrolled using Cj , Cz and C3 which take states of tank-I ,

tank-2 and tank-3 respectively as inputs and gives controlsignals to control the states. Also there is communicationbetween the controllers and interactions are also present.Controllers Cz and C3 depend on controller CI and states of

tank-I. As there is communication and interaction between thecontrollers, the breaking of a loop can result in the instability.

So, using the feedback law given by (57), the resultantoverall closed-loop system has linear dynamics given by (59)and (63) and it is completel y state-controllable. Let Cj , Cz and

C3 be the controllers used to control states of tank-I , tank-2

and tank-3 respectively. Then controller CI includes control

inputs ul , u4 , WI ' w4 ' controll er Cz includes control inputs

Uz , u5 ' W z , w5 and controll er C3 includes control inputs u3 '

[I) A. J. Krener, "On the equivalence of control systems and linearization ofnonlinear systems", SIAM J. control and opt., II :670-676, 1973.

[2) R. W. Brockett, " Feedback invariants for nonlinear systems", Proc. VIIIFAC Congress, Heisinki, pp 1115-1120 , 1978.

[3) Alberto Isidori, "Nonlinear Control Systems", 3rd edition, Springer­Verlag Berlin Heidelberg, New York, 1989.

[4) H. Nijmeijer and A. Van Dar Schaft, "Nonlinear dynamical controlsystems", Springer-Verlag, New York, 1990.

[5) J. J. E. Slotine and E. W. Li, "Applied Nonlinear Control", Prentice Hall,Englewood Cliffs, N.J., 1991.

[6) Fatima Tahir, "Stability Analysis of Sampled-Data Control of NonlinearSystems", PlEAS Library, Nilore, Islamabad, 2007.

ooooo

I 0 0 0 0 0

0 2 0 0 0 0

0 0 3 0 0 0 (62)K=0 0 0 4 0 0

0 0 0 0 5 0

0 0 0 0 0 6

V. Results and Conclusion

s + 1

0 0 0 0 0s +2

0 0 0 0 0 (63)H(s) =

s +3

0 0 0 0 0s +4

0 0 0 0 0s +5

0 0 0 0 0s +6

Step Response

00

08

The closed loop transfer function matrix of the overallsystem is shown in (63) which is same as it should beaccording to the form given in [3]. Step response of the closedloop system is as shown in Fig 2 which shows that all states arestabilized. This is the response to unit step input, so all outputscan be stabilized to any desired value by applying gain.

I

0 .1

°o!:---!:---!:----!:----~----:'---_!

This system IS completely state controllable andobservable.

D. Step 4: Controller Design using Pole PlacementSince the system linearized using feedback linearization is

completely state controllable, so it can be stabilized using poleplacement techn ique [8] according to which

W =-KTz (60)

Poles can be placed arbitraril y for a completel y statecontrollable system. Let the arbitrarily selected location forpoles be:

P = [-1 ,-2,-3,-4,-5,-6] (61)

So, the controller obtained using pole placement techniqueis as follows:

Fig. 2. Step response ofthe closed loop system

Page 6: Control ofa Nonlinear Coupled Three Tank System using

[7] S. Skogestad and I. Postlethwaite, "Multivariable Feedback Control:Analysis and Design", John Wiley & Sons, Ltd, England, 2005.

[8] Katshuhiko Ogata, "Modem Control Engineering", 4th edition, PrenticeHall of India, New Dehli, 2003.