Fuzzy Model - Based DMC for Nonlinear Process Control

Fuzzy Model - Based DMC for Nonlinear Process Control

Copyright to IFAC Artificial Intelligence in Real-Time Control, Kuala Lumpur, Malaysia, 1997 FUZZY MODEL - BASED DMC FOR NONLINEAR PROCESS CONTROL Ka...

2MB Sizes 78 Downloads 108 Views

Copyright to IFAC Artificial Intelligence in Real-Time Control, Kuala Lumpur, Malaysia, 1997

FUZZY MODEL - BASED DMC FOR NONLINEAR PROCESS CONTROL Katarina Kavsek-Biasizzo, /gor Skrjanc, Drago Matko Faculty of Electrical Engineering University of Ljubljana Trz.aska 25, 1000 Ljubljana, Slovenia [email protected]

ABSTRACT This paper proposes a new approach to predictive control of highly non linear processes based on a fuzzy model of the Takagi-Sugeno form. Standard Model Based Predictive Control (MBPC) methods use linear process models and are therefore unable to deal with strong process nonlinearities. But. the advantage of linear MBPC is in implementation due to fast optimization algorithms and guaranteed convergence within each time sample. In our approach. step responses for different operating points are extracted on-line from the nonlinear fuzzy model and a modified linear DMC algorithm is used. In this way. all the advantages of both fuzzy modeling of nonlinear processes and DMC control are accomplished. Proposed approach is simple and efficient also for real-time control. In the paper two illustrative examples are shown: a highly non linear simulated pHprocess and a laboratory scale thermal plant. Copyright © 1998 IFAC

1

Introduction

In the last 10 years. Model Based Predictive Control (MBPC) has become an attractive research field in automatic control because of its advantages over conventional techniques. Hundreds of industrial units all over the world are now running now under predictive control. Model Based Predictive Control is a control strategy based on the explicit use of a process model to predict the controlled variable over a long-range time horizon. In most applications of generic MBPC techniques (DMC. GPC. PFC •... ) the process has been modeled over its operating range by an average linear (linearized) model (transfer function, state space model. impulse or step response model •... ). But in the real world. nonlinearities are more the rules than exceptions. and a fixed linear model might not really result in the required performance. especially over wider operating ranges. A construction of nonlinear models by physical laws and first principles is usually a difficult and time consuming task. Hence. identification techniques for building nonlinear models from measurements are of great interest. Generic nonlinear black-box models. which are currently quite popular. are fuzzy models and neural network models. Both of them can be easily identified from input-output process measurements and yield good approximation and generalization properties. In fact, the extension of an MBPC strategy for the use of nonlinear process models is a topic of the moment in the academic environment. Originally. MBPC algorithms were developed for linear processes. but the basic idea can be extended to nonlinear systems. Unfortunately. this leads to a nonlinear non-convex optimization problem with very computationally demanding algorithms and usually

415

too slow for real-time control. This fact has forced the control engineers to study simplifications of general approach in order to remove these drawbacks. Following this. the use of different locallinear models of the process for different operating points appears to be a good solution to simplify the optimization problem considerably. In our new approach. a black box nonlinear fuzzy model is used. For predictive control, various step responses for different operating points are extracted on-line from the fuzzy model. and a modified Dynamic Matrix Control (DMC) [4] can be applied. The effectiveness of both the identification algorithm of the fuzzy model and the control scheme are shown through two highly nonlinear examples.

2

Fuzzy modeling

The concept of fuzzy logic and fuzzy sets theory can be employed in process automation in different ways. not only in the field of control but also in mode ling (nonlinear) dynamical systems. An survey of different approaches to fuzzy modeling can be found in [2]. Each of the fuzzy model types has its own learning and fuzzy reasoning algorithm and its own set of free parameters 9. In Takagi-Sugeno models. structure identification means specifying operators for logical connectives. inference and defuzzification. Once the structure is determined (e.g. collections of local linear models). membership functions have to be selected (using different sources of information) and finally. consequent parameters can be estimated by least squares. If there is no prior knowledge. membership functions can be extracted from data using fuzzy clustering techniques. nonlinear optimization. neural networks or inductive learning. In this paper. we focus on Takagi-Sugeno fuzzy systems. where the rule base of a fuzzy system is as follows :

for i = I •... M. where XI and X2 are input variables of the fuzzy system. y is an output variable and Ai. Bi are fuzzy sets characterized by their membership functions. The If-part (antecedents) of the rules describe fuzzy regions in the space of input variables and the Then-parts (consequents) are functions of the inputs. usually in linear form: h(xl,X2) = aixl + b;X2 + rio where ai, b i and ri are the consequent parameters. For aj = b i = 0 the model becomes a Takagi-Sugeno fuzzy model of the zeroth order. Rule-premises are formulated as fuzzy AND relations on the cartesian product set X = XI x X2, and several rules are connected by a logical OR. Fuzzification of a crisp value XI produces a column vector

(2)

and similarly for a crisp value x2. The degrees of fulfillment of all possible AND combinations of rule premises are calculated and written into matrix S. If the algebraic product is used as an AND operator, this matrix can be directly obtained by multiplication: S

= ~I ®~2 = ~I .~r.

ture process output over a certain (finite) horizon and to evaluate control actions to minimize a certain cost function. MBPC stands for a collection of several different techniques all based on the same principles. Originally, the algorithms were developed for linear processes, but the basic idea can be used also for nonlinear systems. This straightforward approach [3] is accompanied by a major drawback: due to the nonlinear nature of the models, a generally nonlinear and non-convex optimization problem has to be solved in each time sample. In order to overcome this disadvantage, some attempts at using approximate local linear models for each operating point and linear MBPC algorithm have been reported [12], [I]. Below, a new approach to incorporating the non linear fuzzy model into the DMC algorithm is presented.

(3)

A crisp output value y is computed by a simplified algorithm for singletons as a weighted mean value (Center of Singletons):

Lt: I L}': I sijrij y=

~n

~m

~i=1 ~j=1 Sij

.

(4)

The dimensions of matrix S(m x n), which actually represents the structure of the model, depend on the dimensions of input fuzzy sets ~I (m x I) and ~2 (n x I). Parameters of the fuzzy model rij are estimated from the measurements, using the standard least-squares algorithm.

2.1

3.1

Modeling dynamic systems

The described fuzzy model actually represents a static nonlinear mapping between input and output variables. Dynamic systems are usually modeled by feeding back delayed input and output signals, like in other kinds of non linear models, such as neural network models.

N

y(k) = Lgi.iu(k-i)+n(k)

where y(k) is the process output, u(k) the manipulated variable, gi denotes the elements of the process step response and n( k) is a disturbance acting at time instant k.

If-

~ ~

JdlLllL

~

The predictive controller calculates a sequence of the future actuation signal.iu(k),.iu(k+ I), .. . ,.iu(k+Nu) over a certain control horizon Nu, such that it brings the predicted output of the process as close as possible to a predefined reference trajectory. This sequence is obtained by minimizing (with respect to .iu(k+ j) the cost function (8)

(6)

~

Following the nomenclature for linear models, a nonlinear dynamic system with autoregressive part can be described in two ways :

N.-I

J= L [Y(k+j)-r(k+j)f+ L [Mu(k+j)f, j=NI

• NARX model, also called series parallel model, which use u(k-i) and y(k-i) as regressors • NOE model or parallel model, which use u( k - i) and past model outputs y(k-i) as regressors

(8)

j=o

assuming that after Nu the future control signal remains constant = 0 for j ~ Nu). In this expression, r(k) is the desired reference trajectory, A. a weighting factor and y( k+ j) are predictions of the values of the output in the time horizon j =NI , ... , N2 . These predictions depend on the manipulated variables .iu(k+ j) and can be obtained from the process model. NI and N2 are lower and upper prediction horizons for the output signal.

(.iu(k+ j)

The NOE model structure is recurrent and can predict an arbitrary number of steps in the future while NARX model can calculate only one-step-ahead prediction. It is in general harder to work with recurrent structures (due to the feedback, parameter estimation problem is no longer linear). Usually, NARX model is applied for identification and NOE model for prediction of many steps in the future. Since, using the identified NARX model in parallel can sometimes lead to bad results, special care should be taken for validation.

3

proces

Fig. I. Step response model

if y(k)isAi,1 and ... y(k-n+l) is Ai,n and u(k) is Bi,1 and . .. u(k-m+l)isBi,m thenYi = ri

I:k:rrm-

(5)

where q>(k) = (y(k-I), . . . ,y(k-ny),u(k-I), .. . ,u(k-nu)] is a regression vector and j is an approximation function realized as neural network or fuzzy system. In terms of Takagi-Sugeno rules of the zeroth order, the model is given by:

Ri:

(7)

i=1

Generally, a nonlinear black-box model structure can be described as a concatenation of a mapping from measured data to a regression vector and a non linear mapping from the regressor space to the output space. A choice of regressors and a choice of non linear mapping can then be studied independently. The general system identification problem is to find a relationship between past observations of input, output and current output. We thus work with model structures of the kind

y(k) = j(q>(k),9))

DMC Algorithm

One of the first proposed MBPC methods, and still comercially the most succesful one, is Dynamic Matrix Control (DMC), introduced by Cutler [4]. The DMC algorithm is based on a step response model of the process given by

The cost function J (8) can be rewritten in matrix form as:

where

.iuT (k)

Fuzzy Model-Based Predictive Control

= [.iu(k),.iu(k+ I), ... ,.iu(k+Nu-I)]

(10)

is the vector of the future control increments to be calculated, Model Based Predictive Control (MBPC) is a control strategy based on the explicit use of a dynamic model of the process to predict fu-

416

(11 )

is a vector of known future errors, p j represents the free response of the process, and G is a matrix given by g) g2

gNI

~~I+)

G=

0 g)

0

[ g~

gl.l

(12)

j=N), ... ,N2

(13)

N

Pj =y(k)+

L

(gj+i-gi)&.(k-l)

i=j+)

The most important advantage of the DMC method is that if there are no constraints on the system inputs or outputs, an analytical solution of the optimisation problem exists: (14) and gives Nu values of future increments of the control signal. Only the first element of &.(k) is applied to the process, and in the next time sample the solution is calculated again using the receding horizon strategy.

3.2

4

Application to pH-process

The problem of controlling pH-processes is found in many practical areas, including waste water treatment, biotechnology processing and chemical processing. There are two common characteristics of pH -control: (i) diffuculties in controlling the pH-process, arising mainly from its heavy nonlinearity and uncertainty, (ii) diversity in control approaches applied, ranging from simple PlO control, adaptive control, nonlinear linearization control, gain-scheduling control and various model-based control to modem control systems based on fuzzy systems and neural networks [5], [7], [10], [12]. One reason for the increasing number of papers in recent years is the highly nonlinear character what makes pH control suitable for illustrating new nonlinear approaches. Another reason for such attention in the literature is the fact that practical pH-control has not yet been finally solved [6]. A simplified schematic diagram of the simulation test bench scale pH neutralization tank is shown in Fig. 3.

DMC Using the Fuzzy Model

The Takagi-Sugeno fuzzy model described in the second section has to be utilized for the DMC algorithm. The main idea of our approach is to combine the advantages of black-box nonlinear modeling (fuzzy models) and DMC strategy in a way that is fast enough and suitable for real-time implementation. Whereas for linear, time-invariant processes the dynamic matrix G needs to be calculated only once (off-line), the step response of a nonlinear process strongly varies according to the operating point and range of the signals. The same DMC algorithm can be employed, but the step response vector g and the matrix G( u,y) have to be determined at each time instant (on-line) using a nonlinear model. Usually, it is good enough to update the matrix G only when the operating point of the system or the reference signal is changed. Assuming a step-wise setpoint trajectory w, time instants for updating matrix G are well specified The basic control scheme is shown in Fig. 2.

Fig. 3. The pH-process Here, we are looking at a case where a strong acid is neutralized by a strong base in water in the presence of carbonate (buffer), and the output of the process is the effluent pH value as described by [7]. A dynamical model for the pH process has been derived using conservation equations and eqUilibrium relations [6] employing a concept known as reaction invariant. Modeling asumptions include perfect mixing, constant density, fast reactions and completely soluble ions. While keeping acid stream Fa (HN03) and buffer stream FbI (NaHC03) at a constant rate, the control objective is to follow some desired pH trajectory by manipulating the influent base stream Fb (NaOH and traces of NaHC03). The chemical equilibrium is obtained by defining two reaction invariants for each inlet and outlet stream (i E [1,4]): Wai W bi

= =

[H+]- [OH-]- [HC03"]- 2[CO~-]

(15)

[H2C03]+[HC03"]+[CO~-]

(16)

Fig. 2. DMC control using fuzzy model where W ai is a charge-related invariant and Wbi equals the total concentration of carbonate. Using the eqUilibrium constants:

The adaptive DMC controller is placed in the low-level control loop. The current step response and corresponding matrix G is supplied by the step response generator in the upper control level. At changes in the set-point trajectory, the current step response g, which corresponds to the range of current interest (between old and expected steady-state), is obtained using a fuzzy model. Here, the fuzzy model is simulated in "free-run" (as a parallel or NOE model), i.e. the calculated outputs from the model are fed back to the input. Special care should be taken for determining the length of the step response, since g has to contain information about both dynamic and static behaviour.

Ka) Ka2

=

Kw

[HC03"][H+][H2C03]-)

(17)

[CO~-][H+][HC03"]-l

(18)

[H+][OH-]

(19)

an implicit relation for [H+] can be derived:

_ + Kw Wa - [H ]- [H+] - Wb

The next two sections illustrate the proposed approach for simulated example of pH-control and for real-time control of laboratory thermal plant.

~+~ .!..L ~ 1 + [H+] + [W]Z

pH = -log ([H+]) (20)

The above equation defines a static titration curve function relating pH values to reaction variables.

Al"7

,.

The complete dynamical model is given by a mass balance equation and two differential equations for the effluent reaction invariants:

Ah hAWa4 hAWb4

Fa+Fb/+Fb-CvVh

=

Fa(Wa\ - Wa4 ) + Fb/(Wa2 - Wa4 ) + Fb(Wa3 - Wa4 ) Fa(Wb\ - Wb4) + FbAWb2 - Wb4 )+Fb(Wb3 - Wb4 ) (21)

Nominal values of these parameters and operating conditions are taken from [7]. The acid and buffer flow-rates are supposed to be known and kept constant during experiments. This analytical model is used to simulate the "true" system. The sampling period for pH measurement and control is 15s.

\L--~~I~.--'~'-~~~~~~~~~~.

--

Fig. 6. Validation of the steady-state titration curve (solid: process, dashed: model) The identified fuzzy model is integrated into a DMC predictive control scheme in the manner described earlier in this paper (Fig. 2). The upper prediction horizon for output signal is chosen as N2 10 and the control horizon as Nu = 4. The cost function also includes penalty on the control effort (A 0.3). Fig. 7 shows the simulation results for the proposed fuzzy predictive approach considering a sequenc.!of step changes in the set-point trajectory. The step-wice reference trajectory was known in advance, hence, the predictive controler generate changes in control signal before reference change occurs.

The Takagi-Sugeno fuzzy model of the described pH-process was constructed only from input-output data measurements (black-box model). For identifying the model, an amplitude modulated pseudo random binary signal (pRBS) in combination with a step excitation signal was used. The dynamics of the process can be represented as a first order NARX model

pH(k+ 1) = i1Fb (k) , pH(k)]

=

=

(22)

where f is an uknown non linear function approximated by the fuzzy model.

i,

, ~

Fig. 4. Membership functions for Fb and pH

lOO -~I

lOO

,~

Fig. 7. Predictive control based on fuzzy model

The membership functions for input and output signals, which actually represent the partition of the operating region into SUb-regions, were determined on the basis of previous knowledge about process behaviour. The consequent parameters of the fuzzy model were determined by the ordinary least-squares algorithm.

5

Application to thermal plant

The second example illustrates the effectiveness of presented fuzzy model-based DMC approach for temperature control of highly nonlinear laboratory plant.

".---~-~--~-~-~---,

,.

...

I~

i'

V ,\

'.

••

1

\

L-

u _101

"

, Jll0'

Fig. 5. Validation of the fuzzy model (solid: process, dashed: model) Fig. 5 shows the validation of the obtained fuzzy model using another data set. Additionally, the steady-state response of the fuzzy model, the so-called titration curve, is compared with the steadystate response of the simulated process (Fig. 6). From both figures, one can conclude that for this pH process, the fuzzy model has good dynamic performance and is also able to capture the steady-state relationship of the process.

418

Fig. 8. schematic diagram of the plant The heart of the thermal plant (Fig. 8) is a miniature plate heat exchanger serviced by primary circuit (heating water) and secondary circuit (cold water). In the primary circuit, water in electrially heated reservoir is kept at constant temperature (61 DC) by aditional control loop. The flowrate F\ can be controlled by the motorized

control valve. In the secondary water circuit, water from main water supply enters the heat exchanger at a flowrate F2 and after heating up flows to the drain. The output variable of the process is the temperature of the secondary circuit water T2 at the outlet of the exchanger and the manipulated variable is the positioning signal to the servo valve (a current Iv from 4mA to 20mA). During experiments, the flowrate F2 is kept constant. The dynamic behaviour of the plant strongly depends on operating point. Fig. 9 shows normalized step responses at different operating points.

Fig. 11 . Model output and process output temperature The control scheme from Section 3 has been applied to this laboratory plant. Next figures show the control performance in tracking a reference trajectory, which was assumed not to be known in advance.

-, o~-':::OO:---::200=--:300=---::_=--:!OO=-----=eoo:;----:;71lO;;;;--=IOO;;---='OOO _I

Fig. 9. Normalized step responses in different operating points

",:---,""=--,:::':OOO::---::,...=--=ZI\XI=---=.... =--,3O\IO=--=....=--::....=-'

The nonlinear behaviour is only partially characterized by nonlinear servo valve characteristics. Comparing static valve characteristic (upper part of Fig. 10) with input/output static characteristic of the plant (bottom part of Fig. 10), one can conclude, that a lot of different non linear relations are hidden also in other parts of the heat exchange process. Such nonlinear process cannot be mode led by a Hammestein or Wiener models.

Fig. 12. Process output in tracking step-wise reference trajectory

"""I-I

1~1~1 --~cz::J ..

..

e



I



10

10

12

CWNftI ,., (mAl

12

-"1oM)

14

14

"

"

"

"

"

20

Fig. 13. Actuation signal In Figs. 12 and 13 reference trajectory was equal to set-point stepwise trajectory and in Figs. 14 and 15 reference trajectory was specified as first-order linear model response with time constant 80s. The latter case is actually model-reference predictive control. The control parameters in both two experiments were: NI = 2, N2 = 30, Nu = 3, A = 0.002.

~

Fig. 10. Static characteristics For identifying the dynamic and static behaviour of the process, a step-wise excitation signal in combination with amplitude modulated PRBS signal is used. The Takagi-Sugeno fuzzy model was constructed to approximate a first-order nonlinear regression model

NARX: (23) The rule base was chosen to the 25 rules of the zeroth order (25 parameters to be identified) with 5 equally spaced triangular membership functions for each of two inputs. The dead time is assumed to be independent on the operating points (Td 8s) and the sampling rate was chosen to 4s. Note that, the secondary circuit flowrate F2 was kept constant (F2 15Ocm3 /min) during identification phase and also during real-time control experiments. The comparison of the process output temperature T2 and the model output signal (here, model is used in "free run" as parallel model) shows that the static as well as the dynamic behaviour of the process is captured.

=

=

419

. . I,. t.. I. "

-

".:---:IOO=--;'=OOO;;--;;:,...;;;--:ZI\XI=--;;.... =---:;....,=--,.... :--:::....=-' Fig. 14. Process output in tracking first-order reference trajectory In the whole range of operation, presented predictive control is capable of tracking reference signal very well. The control (actuation) signal also reveals good behaviour and it does not amplify the measurement noise. The good control results confirm that DMC con-

6

..

\

- - - --- - - .... Fig. 15. Actuation signal

troller receives adequate infonnation about the changes in process behaviour (gain and dominant time constant) from the step response generator on the basis of the fuzzy model. Up till now (during control experiments and also during identification phase), the secondary circuit flowrate was kept constant at F2 = 15Ocm3 /min. In the following, robustness of the control scheme to process disturbances is investigated. From the operation standpoint, disturbance rejection (in the case of unmeasurable disturbances and/or process-model mismatch) can be more critical than reference tracking. Figs. 16, 17 and 18 show control results in the case of unmeasured disturbances (large step-wise changes in flowrate F2)' Although altering flowrate F2 seriously influence static and dynamic behaviour (and strongly changes dead-time ) of the process, the control scheme is fairly robust.

_.\

".L...--:,..:-:---:'ooo==--:,c::,..=--::::_=---=.... ::---::3000::::--::"...==--:.... =-' Fig. 16. Process output in presence of uknown disturbance

-

1E521 ~

500

_

_

_

_

_

_

....

Fig. 17. Un measured disturbances at flowrate F2

..

..

ConcluSion

In the paper, a new idea of fuzzy model-based predictive control for highly nonlinear processes is presented. Different step responses for current operating points are extracted from the fuzzy model of the process on-line, and this concept is integrated into standard linear DMC predictive control in a simple and easily understandable way. In this way, all the advantages of both fuzzy modeling of nonlinear processes and the existence of analytical solution in the case of DMC control are combined. The effectiveness of the control scheme is shown by using simulated bench scale pH-process and real-life thennal plant. Despite its simplicity (fuzzy rules of zeroth order), the presented fuzzy model has good accuracy in steady-state mapping, as well as in prediction of dynamic behaviour. Proposed novel fuzzy model-based DMC exhibits very good perfonnance in tracking reference trajectory and also good disturbance rejection properties. Computational complexity is much lower than using straightforward non linear MBPC, therefore this approach is suitable for real-time control.

REFERENCES [I] Ayala-Botto, M., van den Boom, TJJ ., Krijgsman, A., da Costa, 1.S. (1996). "Constrained Nonlinear Predictive Control Based on Input-Output Linearization Using a Neural Network" . IFAC World Congress '96. San Francisco. USA. pp. 175-180. [2] Babuska, R., Verbruggen, H.B. (1996). "An Overview of Fuzzy Modeling for Control". Control Eng. Practice. Vol. 4. No. 11 . pp 1593-1606. [3] Braake, te, H., Babuska, R., van Can, E. (1994). "Fuzzy and Neural Models in Predictive Control". JournalA. Vol.35 . No.3. pp. 44-51 . [4] Cutler, c.R., Ramaker, B.L. (1980). "Dynamic Matrix Control. A Computer Control Algorithm". ProceedingsJACC. San Francisco. USA. [5] Gustafsson, T.K., Skrifvars, B.O., Sandstrom, K.Y., Wailer, K.Y. (1995). "Modeling of pH for Control" . Ind. Eng. Chem. Res. 34. pp . 820-827. [6] Gustafsson, T.K., Wailer, K.Y. (1992). "Nonlinear and Adaptive Control of pH ". Ind. Eng. Chem. Res. 31. pp. 2681-2693 . [7] Henson, M.A., Seborg, D.E. (1994). "Adaptive Nonlinear Control of pH Neutralization Process". IEEE Trans. on Control Systems Technology. 3. pp. 169-183. [8] Kavsek-Biasizzo, K., Skrjanc, 1., Milanic, S., Matko, D., Hecker, O. (1996). "Applied Fuzzy and Neural Modeling in Real-Time Predictive Control". 1MACS CESA '96 Multiconference. Lille. France. [9] KavSek-Biasizzo, K., Slujanc, I., Matko, D. (1997). "Fuzzy Predictive Control of Highly Nonlinear pH-Process" , Computerschem. Engng. Vol. 21, Suppl. pp. S613-S618. [10] Lee, S.D., Lee, J., Park, S. (1994). "Nonlinear Self-Thning Regulator for pH Systems". Automatica. 30. pp. 1579-1586 . [11] Nie, J., Loh, A.P., Hang, c.c. (1996). "Modeling pH neutralization processes using fuzzy-neural approaches". Fuzzy Sets and Systems. No. 78. pp. 5-22. [12J Rill, H.M., Krauss, P., Rake, H. (1996). "Predictive Control of a pH-plant Using Gain Schedulling". lMACS CESA '96 Multiconference. Lille, France. pp. 473-478. [l3J Tc:kagi, T., Sugeno, M. (1985). "Fuzzy Identification of Systems and its Application to Modeling and Control". IEEE Tram. on Systems, Man and Cybernetics. Vol.15 . No.l. pp. 116132.

Fig. 18. Actuation signal

420