Real-Time Fuzzy Adaptive Control of the Temperature Plant

Real-Time Fuzzy Adaptive Control of the Temperature Plant

Copyright © IFAC Artificial Intelligence in Real-Time Control. Bled. Slovenia. 1995 REAL-TIME FUZZY ADAPTIVE CONTROL OF THE TEMPERATURE PLANT Igor Sk...

1MB Sizes 1 Downloads 80 Views

Copyright © IFAC Artificial Intelligence in Real-Time Control. Bled. Slovenia. 1995

REAL-TIME FUZZY ADAPTIVE CONTROL OF THE TEMPERATURE PLANT Igor Skrjanc, Katarina Kavsek-Biasizzo, Drago Matko •

• Faculty of Electrical and Computer Engineering, University of Ljubljana, Trzaska 25, 61000 Ljubljana, Slovenia, E-mail : igor.skrjandijer.uni-Ij.si

A bstract. In the paper a new fuzzy adaptive cancellation control scheme is presented and compared with the model-reference adaptive control. The basic part of the fuzzy adaptive cancellation controller is the inverse fuzzy model which is given in the form of the fuzzy relational matrix. The comparison has been evaluated by the implementation on the real temperature pilot plant, which exhibits a nonlinear and time-varying character. It is shown that in the case of mutable processes the adaptive fuzzy cancellation controller is superior to the classical model-reference adaptive control. Key Words. fuzzy control, identification, adaptive control

a rule type model or by a relational matrix model. In this paper the approach based on relational matrix model is presented. The proposed method of inverse model identification can be used in the case of stable and phase-minimal processes .

1. INTRODUCTION

In some industrial control problems the parameters of the controlled process either are poorly known or vary during operation . In such cases the use of adaptive control technique is generally necessary to obtain a high-performance control system. Many solution have been proposed in order to make a control system adaptive. Among those solutions also model-reference adaptive system evolved in late 50s. The main innovation of such system is the presence of a reference model which specifies the desired dynamics of the closed-loop system . The reference model can be also implicitly included into the closed-loop system by means of a cancellation principle. The cancellation principle of model-reference control has been used to develop a fuzzy adaptive system .

Many practical processes exhibit a simple dynamics which can be approximately described by a first order model. However the parameters of the first order model vary significantly and rapidly with time . Such processes will be called here mutable processes with single dynamics. In the paper the comparison between the fuzzy adaptive cancellation controller which is based on the inverse fuzzy relational model and conventional model-reference adaptive system is given. Both adaptive schemes have been tested on a real mutable process with single dynamics, i.e. a temperature pilot plant which exhibits a nonlinear characteristics and whose parameters significantly vary during the operation time. This was the main motivation to implement an adaptive technique by extending some well-known concepts from adaptive and fuzzy theory. According to this the algorithm of fuzzy adaptive cancellation controller based on the recursive fuzzy identification of the inverse matrix model has been developed and implemented on the real plant . For this purpose the on-line recursive fuzzy identification represented by means of the fuzzy relational matrix R has

Similarly to the conventional adaptive controllers: adaptive fuzzy controllers can also be categorized into direct and indirect types. The first approaches on the area of fuzzy adaptive control have been of the direct type proposed by Prock and Mamdani (1979) and after that also some of indirect type appeared proposed by Czogala and Pedrycz (1981), Moore and Harris (1992) , Graham and Newell (1989) . The indirect type fuzzy adaptive control is based on fuzzy identification which can be expressed by 67

been developed. The fuzzy relational matrix R of the observed process is obtained on the basis of the fuzzified process input and output variables . The relational matrix model represents actually the relation between those fuzzified variables and is presented with fuzzy relational matrix .

values of the linguistic variable U and u is the actual value of the variable U (in the crisp form) . For the single dynamic mutable process the corresponding output fuzzy set Y is derived in the following form:

(2) which can be represented also as

2. FUZZY CANCELLATION ADAPTIVE CONTROLLER

(3) The developed fuzzy adaptive system, presented in Fig.l, consists of the recursive identification of the fuzzy model and the fuzzy controller .

(4) The identification algorithm used in this paper is based on the fuzzy relational model with crisp output variable. The defuzzification can be in our case expressed by

Fuzzy Controller

(5) where Sij represents the elements of the fuzzy data matrix S . J1. u ( k )

Fig . 1. The scheme of the fuzzy adaptive system

In our case the fuzzy model of the process is given in the form of the relational matrix representation of the inverse of the process . This model is used by the cancellation fuzzy controller. In the next two subsections the relational matrix identification and the fuzzy cancellation controller will be given .

(I )

(6)

S~l

Sl1

S12

Sln

S21

S22

S2n

(7) Sm1

First , let us define the fuzzy vector of the linguistic variable U as follows

T J1. Y ( k-1) ,

where ® denotes the vector product of the fuzzy vector J1.u ( k) with dimensions n x 1 and the fuzzy vector J1. y (k-1) with dimensions m x 1, which represent the fuzzy sets of the input u( k) and the output y(k-l), respectively. The matrices Rand S are

2.1. The fuzzy relational matrix model identification

Mutable processes, even those with single dynamics, exhibit the behaviour which could be very difficult represented in the mathematical form . An alternative approach to the modeling of such systems is given by identification of fuzzy model. Due to adaptive character of the whole system we should obtain the information about the process parameters in each time instant. For the realtime implementation the time constraints require the compact and fast recursive fuzzy identification technique. The matrix R represents the relationship (mappings) between the fuzzy sets defined in the domain of model inputs and fuzzy sets defined in the domain of model outputs.

®

R=

l

Sm2

Smn

1

r2n "n

1

r12

'u .

rn

rm1

rm2

r21

(8)

rmn

For clarity reasons both matrices Sand Rare transformed into vector form :

and S

= (Sl1S12 "

'Sln"

' Sm1Sm2' ' · Smn?

(10)

Eq.(5) is now written in the vector form, as follows

(11 )

where y(k) denotes the process output sample at where f11{u)pd u ) . .. f1m(u) are the membership 68 time k , operator' denotes the scalar product and

I the unit vector with the dimension (n · m x 1) . A system of linear equations is constructed from Eq. 11 for the time instants t = t 1 , t = t2 ," " t = tN :

When there is no a priori information on the initial values of estimated parameters, the initial value of the matrix P(O) has to be chosen sufficiently large and the initial values of the estimated fuzzy relational vector parameters are set to zero.

P(O)

= aI,



1,

The system is of the form :

(18)

(13)

The application of the recursive fuzzy identification requires a continuous monitoring and supervision of several parameters. The identification algorithm may be started in the closed loop after specifying free parameters and setting the initial conditions for the parameter estimation . These problems are connected with the start-up procedure and pre-identification . Another problem is the persistent excitation in the closed loop . All these problems are discussed in the section on the supervision and the coordination.

with a known nonsquare matrix Ip and a known vector n . The solution of this overdetermined system is obtained by taking the pseudo-inverse as an optimal solution for the vector r in a least squares sense :

(14) where Ip stands for the fuzzified data matrix with dimension N x (n . m) and n has dimension N x 1. In the case of the recursive fuzzy identification the elements rij are estimated on the basis of the observations which are obtained in the equidistant time intervals by measuring the process input and output. For the real-time implementation the process parameters should be estimated and the whole algorithm calculated in the time between two samples . This restriction might be a serious problem. If the process parameters are time-varying, the last sample gives more information on the current behaviour of the process as the previous samples, so the exponential weighting should be used. The method of recursive fuzzy identification with exponential weighting is based on the loss function

2.2. The fuzzy adaptive cancellation controller based on fuzzy relational matrix The fuzzy cancellation controller is designed with the same considerations as the conventional cancellation controller - to ensure the desired closedloop response . It consists also of the cancellation (adaptive) part which is realized as fuzzy inverse model of the process and the non cancellation (nonadaptive) part which is determinated with the reference model in the same way as in the case of the conventional cancellation controller . The fuzzy cancellation controller is described by the following equations

N

l(x- e) =

L

).N-k(y(k) - s~ (k)re(k))2 ,

(15)

k=l

where y( k) is the current value of process output , s~(k) is the normalised fuzzy data vector , re(k) is the current value of the estimated fuzzy relational vector, and A is the forgetting factor . The proper value of forgetting factor is chosen between 0.95 and 0.98 as proposed by Isermann et al. (1992) . Optimizing the loss function (Eq. 15) the recursive fuzzy identification with exponential weighting is obtained in the following form

P(k+l) = ±[I -

K(k)s~(k+l)lP(k) .

(17)

Uau::( z ) _ Gm(z) E(z) 1 - Gm(z)

(19)

k) _ sT(k) · re(k) sT(k) . I '

(20)

U

(

where Gm(z) represents the desired model of the closed-loop system, sT the fuzziefied vector of the uau:z:(k) and u au :z:(k-l) , and re the current estimate of the fuzzy relational vector of the inverse process. It could be concluded that the adaptive mechanism is realised through the inverse process modeling .

(16) 69

The described algorithm of the fuzzy cancellation adaptive controller exhibits some advantages in comparison with the conventional adaptive technique . These advantages are based on the fuzzy identification which enables the identification of the nonlinear process dynamics and implicitly describes also the operating point of the process.

2.3 . Supervision and coordination

The main purpose of the supervision and the coordination level is to eliminate or at least reduce the causes of faulty functioning of the whole adaptive system.

where TI(z , t), T 2 (z , t) and Ts(z, t) represent temperatures of the cold water , heating water and the iron wall , respectively, VI and V2(t) velocities of cold and heating water, kl and k2 constants which include the heat transfer coefficients and the physical dimensions of the heat exchanger.

When the estimation of the inverse model is perfect , process output y( k) and the inverse model input uaux(k) should be equal. The discrepancy between both variables could be used as a signal for supervision system which is designed as simple P-controller to control that difference in the case when the controller action is too weak or two strong.

~,

The second problem in our case arises with setting the initial fuzzy relational vector of the inverse process. For this purpose the pre-identification in the closed-loop is calculated using a robust PIcontroller .

;~

-..-..'

VJ

Another problem of the closed-loop identification is the persistent excitation of the process. A simple action to avoid the influence of the linear dependance of the information matrix P on the parameters estimates is an automatic switch-off of the identification method according to the eigenvalues of matrix P or according to the trace of the same matrix. In our approach the latter method was used.

Fig . 2. The temperature plant

The solution of the set ofEq. 21 would yield to the mathematical model of the heat exchanger with the input defined by the current velocity of the heating water V2(t) and the output defined as the outlet temperature TI of the cold water. In order to obtain the simple model of the heat exchanger the theoretical modeling would be very difficult because of the nonlinear character of the third equation from the set, Eq. 2l. Furthermore , the heat exchanger is just one part of the plant, so the sensors and the actuators should be modeled, too . The characteristics of the motor driven valve exhibits a strong nonlinear and time-varying character .

Discussed adaptive approach has been implemented on the real temperature plant , which consists of a plate heat exchanger , through which hot water from an electrically heated reservoir is continuously circulated in the counter-current flow to cold process fluid (cold water). The thermocouples are located in the inlet and outlet flows of the exchanger , the both flow rates can be visualy monitored . Power to the heater may be controlled by time proportioning control using the external control loop . The flow of the heating fluid can be controlled by the proportional motor driven valve. Schematic diagram of the plant is shown in Fig .2.

System modeling based on the conservational laws and the first principles would be very difficult and time consuming task . Instead of that a fuzzy identification of the process is used . Although the process is very complex, it could be presented as a model with approximately first order dynamics with small time delay, with significantly time varying parameters and nonlinearities according to the operating point.

The temperature plant is a process where the variables are significantly dependent on the spatial coordinates at certain moment in time, so the dynamics of the heart of the process - the heat exchanger - could be presented with the following set of partial diferential equations

+ VI aT1a(zz ,t ) --

IoOIer

- - cold IoOIer

3. ADAPTIVE CONTROL OF THE TEMPERATURE PLANT

aT1(z,t) at

- - heo1IrO

k I [Ts (t) - T J ( Z , t) ]

70

During the experiments some values of the physical parameters (velocity VI and the temperature T'2 at the inlet of the exchanger) which are supposed to be constant , have been changing. These variations have a great influence on the gain and on the dominant time constant of the process. The period of the first 400 s has been used for the preidentification in the closed-loop using the robust PI-controller. After that , the fuzzy adaptive controller was switched on .

The results for the fuzzy adaptive control are shown in Fig .3, where the output y(t) and the reference model output Ym(t) are presented .

Both adaptive approaches have been realized using M atlabSimulink program package with selfwritten mex files in the C code for the on-line data aquisition .

reference and output stgnal

4. Conclusion

500

'000

, 500

2000

2500

3000

3SOO

<000

.mels)

Fig. 3. The process output and the reference-model signal in the case of fuzzy adaptive control

After 2780 seconds the change of the valve position in the cold water circuit has been made . The position has been changed for aproximately 25 percent. After transient phase the process output follows the reference model quit well. For the evaluation of the results the experiment under the same conditions using the conventional globally stable model-reference adaptive control scheme (Isermann et al. , 1992) has been made . The output of the closed-loop y(t) and the reference model output Ym(t) are shown in FigA . ""lIntIlC1tand """"" signal

500

'000

, 500

2000

2500

3000

3SOO

<000

tmels) contJcI signal '0

Fig . 4. The proces output and the reference-model signal in the case of the model-reference adaptive control

It is worth noting that the initial conditions in this case have been set near to the assumed values , because in the oposit case the algorithm diverge.

The model following is much better in the case of fuzzy adaptive control which is due to the capability of the fuzzy model to cope with the nonlinearities.

In the paper the fuzzy adaptive cancellation controller is presented . The development of a new fuzzy adaptive scheme was motivated with the nonsatisfactorily results obtained by using the conventional model-reference adaptive techniques . Regarding to the real-time experiments on the temperature plant which exhibits a nonlinear and time-varying character it could be found that the novel algorithm introduces faster convergence and better performance in the presence of the nonlinearity and the un measured dynamics . The proposed approach seems to be usuable in the case of time-varying or non linear systems with simple dynamics. In such cases proposed algorithm gives some advantages in comparison to the conventional model-reference adaptive technique .

5. REFERENCES Astrom ,

K.J . and

B.

Whitenmark.

(1984) .

Computer-Control/ed Systems, Theory and Design. Prentice Hall International.

Chou C .H. and H.C . Lu. (1993) . Real-time fuzzy controller design for hydraulic servo system. Int. Journal of Computers in Industry , 22, 129142 . Czogala E. and W . Pedrycz. (1981) . On identification in fuzzy systems and its applications in control problems . Fuzzy Sets and Systems , Vol.6 , .No.l , pp . 73-83. North Holland Publishing Company, Amsterdam. Graham , B.P. and R .B. Newell. (1988) . Fuzzy Identification and Control first-order process . . Fuzzy Sets and Systems , Vol.26 , pp . 255-273. North Holland Publishing Company, Amsterdam . Graham , B.P. and R .B. Newell. (1989) . Fuzzy Adaptive Control of the first-order process. Fuzzy Sets and Systems , Vol.31 , pp. 47-65 . North Holland Publishing Company, Amsterdam . Isermann , R. , K.H. Lachmann, and D. Matko . (1992 ). Adaptive Control Systems . Prentice Hall International. ~lamdani, E.H. (1974) . Application of fuzzy algorithms for control of simple dynamic plant . Proceedings IEEE 12112 , 1585-1588. lvloore, C.G. and C .J. Harris . (1992) . Indirect adaptive fuzzy control. Int. J. Control, Vol.56 , Ko .2, pp . 441-468. Pedrycz , W . (1984) . An identification algorithm 71 in fuz zy relational systems. Fuz:y sets and sys-

tems , Vo1.15 , pp . 153-167 . North Holland Publishing Company, Amsterdam. Pfeiffer, B.M. (1994) . Identification of fuzzy rules from learing data. IFAC Artificial Intelligence in Real- Time Control AIRTC94. Valencia, Spam . Procyc, T.J . and E.H. Mamdani , (1979) , A linguistic self-organizing process controller . A utomatica 15, pp . 15-30 . Tong , R.M . (1976) . Analyses offuzzy control algorithms using the relation matrix. Int . J. M anmachine studies, Vol. 8, pp . 679-687 .

72