Sei sulla pagina 1di 6

Predictive control by local linearization of a Takagi-Sugeno fuzzy model

J.A. Roubos R. Babuška P.M. Bruijn H.B. Verbruggen


Control Engineering Laboratory, Faculty of Information Technology and Systems
Delft University of Technology, Mekelweg 4, P.O. Box 5031, 2600 GA Delft, The Netherlands
tel: +31 15 783371, fax: +31 15 626738, e-mail: j.a.roubos@et.tudelft.nl

Abstract and outputs. Often the difference between system outputs


and a reference trajectory is used in combination with a cost
Linear model based predictive control (MBPC) has many function on the control effort. A special case is the quadratic
advantages but also drawbacks over nonlinear MBPC. In form (Eq. 1), mostly referred to as generalised predictive
this paper a possibility of using Linear MBPC to control non- control (GPC), which can be solved analytically for linear
linear systems is investigated. Takagi-Sugeno fuzzy models systems without constraints. With constraints, the optim-
are chosen as the model structure. Local linear models can ization problem is a convex Quadratic Programming (QP)
be derived from the linear rule consequents in a straight- problem, which can efficiently be solved numerically. The
forward way. Each sample time a local linear model is cal- quadratic form is given by:
culated and used to calculate the next incremental control Hp
X Hc
X
action using Linear MBPC. This receding horizon controller J= k(rk+i , y^k+i )k2P + k(uk+i,1 )k2Q ; (1)
i=1 i=1
i i
is used in the IMC scheme to correct for model mismatch.
Two simulation examples are given: a SISO liquid level pro- where P i and Qi are positive definite weight matrices. On
cess and a MIMO liquid level process with two inputs and the other hand, when the model is nonlinear or the objective
four outputs. function is not quadratic, a nonlinear optimization prob-
lem must be solved. Nonlinear optimization techniques are
Keywords: Predictive control, multivariable (MIMO) mostly slow due to computational complexity and are not
systems, Takagi-Sugeno fuzzy model. always able to find the global optimum. These problems
become worse in the MIMO case. In this paper, MBPC
of a continuously linearized (every sample) Takagi-Sugeno
1 Introduction fuzzy model [6] is investigated to overcome this problem.
The TS-fuzzy model is used to model the nonlinear system
The term fuzzy model based predictive control (FMBPC) is and the linear consequents are used to obtain a linear model
used with several different meanings in the literature. First, at each sample instant. The obtained model is used in GPC
a fuzzy model can be used as a predictor in MBPC [1, 2, 3], in the IMC scheme [8].
second, the constraints or objective functions can be fuzzy
[4], and third, the optimizer can be based on fuzzy rules [5]. 2 Modeling and Control
In this paper, the use of Takagi-Sugeno fuzzy models [6] in
2.1 Fuzzy Modeling
MBPC is investigated. Model based controllers use an in-
ternal model to predict future outputs. These future outputs Takagi-Sugeno (TS) fuzzy models are suitable to model a
can be calculated by using different optimization methods, large class of nonlinear systems [9, 10, 11]. Consider a
dependent on the system and objective description. Gener- MIMO system with ni inputs: u 2 U  IRni , and no
ally, preference is given to problems that can be optimized y n
outputs: 2 Y  IR . This system will be approximated
o

by using convex optimization methods. by a collection of coupled MISO discrete-time fuzzy models.
MBPC [7] consist of four basic elements; (i) a model, which Denote q ,1 the backward shift operator: q ,1 y k( )= (
def
y k,
describes the process, (ii) a goal, defined by an objective 1) , where y is a signal sampled at discrete time instants k .
function, (iii) optional constraints on the system and control  
Denote by and polynomials in q ,1 , e.g., = + 0
variables, and (iv) an optimization procedure. The model + +
1 q,1 2 q,2 : : :. Given two integers, m  n, define
must give a good description of the system and may be an ordered sequence of delayed samples of the signal y as:
black-box, gray-box or a white-box model.The objective
function is a function of the predicted future system inputs fy(k)gnm def
=[y(k,m); y(k,m,1); : : : ; y(k,m,n+1)] :
The MISO models are of the input–output NARX type: 2.2.1 Linear state-space MBPC
yl (k + 1) = Fl (xl (k)) ; l = 1; 2; : : :; no ; (2) In Linear MBPC [7], a linear model is used to predict
^
where the regression vector xl (k ) is given by:
the output y as a function of the predicted control signal
^( + )
u k; : : : ; k Hp , with Hp the prediction horizon. The ob-
xl (k) = fy1(k)gn0 1 ; : : : ; fyn (k)gn0 ;
yl
o
ylno jective function, given by Eq.(1), is minimized for a given

fu1 (k + 1)gnn 11 ; : : : ; fun (k + 1)gnn :


 reference trajectory. The signal u may change over the con-
ul
dl i
ulni
dlni ( )
trol horizon Hc Hc  Hp and remains constant between
Here ny and nu are the number of delayed outputs and
Hc and Hp . A linear model in state-space description is
inputs, respectively, and nd is the number of pure (transport)
given by:
delays from the input to the output. ny is an no  no (k + 1) = Ax(k) + Bu(k) ;
matrix, and nu , nd are no  ni matrices. Fl are rule-based
x
fuzzy models of the Takagi–Sugeno (TS) type [6]. With the y(k ) = C x(k ) : (5)
antecendent in the conjunctive form, the rules are: For the locally linearized system, these equations become:
Rli : ()

If xl1 k is li1 and : : : and xlp (k) is


lip (k + 1) = x(k) + Ax(k) , x0) + B(u(k) , u0) ;
( + 1) =  y( ) +  u(k) + li
x
then yli k li k li y(k ) = C x(k ) ;
i = 1; 2; : : :; Kl :
(6)
(3)
where x0 and u0 define the linearization point. The A , B  ,
Here
li is the antecedent fuzzy set of the ith rule,  and
and C matrices are used in a Linear MBPC algorithm (given
 are vectors of polynomials and  is the offset vector. in appendix A). Constraints on the control action (u; u)
Kl is the number of rules in the lth model. The fuzzy and the system output y) are handled in a straightforward
sets
can be defined by multivariate membership func-
tions ! (x(k )): IRp ! [0; 1], where pl =
Pn
j =1 ylj +
n
l o
way. The resulting Quadratic Programming (QP) problem
Pn can efficiently be solved with a standard MATLAB function.
j =1 nulj is the dimension of the antecedent space [9].The
i

MIMO TS rules are estimated from input-output system


2.2.2 Linearization of TS model
data. A Gustafson-Kessel cluster algorithm is used to obtain
multivariate membership functions. Thereafter TS-rules are A
At each sample time, the local  and  matrices are B
derived with a least squares algorithm. A description of calculated as follows: Calculate the degrees of fulfillment
the used method and the MATLAB software for automatic (x( ))
!i k of the antecedents, using product as the fuzzy
MIMO TS model extraction is given in [12]. logic and operator. The rule inference gives:
The choice of the right NARX structure is very important.
!li (xl (k))  yli (k + 1)
PK
One can use physical knowledge to choose a proper struc-
ture (see Sec. 3.2). Another method is a search through a
yl (k + 1) = i=1 P
K ! (x (k )) ; (7)
i=1 li l
l

(large) set of possible structures. Furthermore, the quality


of the model is highly dependent on the information con- yli (k + 1) = ( li y(k) + li u(k) + li ) ; (8)
Define   and   as:
tent of the input-output data set. It is difficult to design a
good identification signal, especially for MIMO systems. l l
i=1 !li (xl (k ))   li
Filtered random signals with additional white noise seem PK
 =l ;
i=1 !li (xl (k ))
to be appropriate at the moment. These signals go slowly PKl (9)
through the whole control domain and continuously excite

i=1 !li (xl (k ))   li


the system. The performance of the models is measured by PK
the variance accounted for (VAF) index given by: l = ;
i=1 !li (xl (k ))
PK (10)

(Y , Ym) ;  l

VAF = 100%  1 , varvar (Y ) (4) Define x; u and y for the state-space description as:

where Y is the true output and Ym is the simulated output. x(k) = [x1(k); x1(k , 1); : : : ; x1 (k , ny1); : : : ; (11)
xn (k ); xn (k , 1); : : : ; xn (k , nyn )]T ;
o o o o

2.2 Linear Model Based Predictive Control


u (k)=[u1(k , nd1 + 1); u1(k , nd1); : : : ; (12)
u1 (k , nd1 , nu1 + 1); : : : ; un (k , nd + 1);
Local linearization of Takagi-Sugeno fuzzy models is in-
i ni
vestigated in order to extend the operation range of linear
model based predictive controllers. un (k , nd ); : : : ; un (k , nd , nun + 1)]T ;
i ni i ni i
yk ()=[ () ()
x1 k ; x2 k ; : : : ; xno k T : (13) ( )] 0.1
A

Flow (l/s)
The local linear system matrices are now derived as follows:
A  is a Pno nyj  Pno nyj 1 matrix:
j =1 j =1 (= ) 0.05

2 1;1 1;2 : : : : : : : : : : : : 1; 1 3


0
6 1 0 0 ::: 0 7
0 500 1000 1500 2000 2500
6 .. .. 7 1
6 0 1 0 7 B

Level (m)
. .
6 7
6 .. .. .. 7
6 0 ::: . . . 7 0.5
6   
2;1 2;2 : : : : : : : : : : : : 2; 1 7
A =6
6
7
7 ; (14) 0
6 .. .. .. .. 7
0
0 500 1000 1500 2000 2500
6 . . . . 7
6
6
  
n ;1 n ;2 : : : : : : : : : : : : n ; 1 7
7
1
C

Level (m)
::: 0 1 ::: 0
o
0 0
o o
6 7
6 7 0.5
4 .. .. .. .. .. .. 5
. . . . . .
0 ::: 0 0 ::: 1 0 0

B is a j=1 n2uj  j=1 nuj (= 2) matrix:3


 Pn o
Pn i
2500 3000 3500 4000
Time (s)
4500 5000

1;1 1;2 : : : 1; 2


6 0 ::: ::: 0 7 Figure 1. A. Control signal for identification,
6 .. ..7 B. Identification data, C. TS model (dashed
6 7
6 . .7
6 0 ::: ::: 0 7 line) validation.
B =6
6 2;1 2;2 ::: 
2; 2 77; (15)
6 7
6 .. .. .. .. 7
6 . . . . 7
6
4 n ;1 n ;2 : : :
o o

no ; 2 7
5 3.1 SISO liquid level process
. .. .. .
.. . . ..
The proposed controller is simulated for a SISO liquid level
and C is a no  Pnj=1 nyj matrix:
o
process. The process involves a tank of uniform horizontal
2 3 cross-section, with a restricted liquid outlet in its base. The
1 0 ::: ::: ::: ::: 0 control problem is to follow level setpoint changes by ad-
C=4 ..
.
..
.
..
.
.. 5 :
. (16) justing the flow rate of the liquid entering the tank. This
0 ::: ::: 1 0 ::: 0 example is taken from [14], where the process is described
The ones in C are positioned such that yl(k) = xl (k). by the equation:
p
2.2.3 IMC scheme h_ = 1=S (Fi , h)) ; (17)

The Linear MBPC algorithm is used within the internal where S is the horizontal cross-sectional area ( ,3 m2 ), h 10
model control (IMC) scheme, which is used to compensate is the level of liquid in the tank, is a flow coefficient (equal
for process disturbances, measurement noise and modeling to 1), and Fi is the inlet liquid flowrate. This model was
errors [9, 13]. In general, the IMC scheme consists of three simulated in SIMULINK in order to obtain input-output data
parts [8]: 1) an internal model to predict the effect of control sequences for identification (Fig. 1a,b). The control signal
actions on the process output, 2) a feedback filter to achieve is limited to [0.02, 0.1] (l/s) and has a sample time of 10 (s).
robustness, and 3) a controller to optimize the process. Fig. The first 250 sample points are used for identification and the
2 gives the local linearized model in the LMBPC scheme next 250 sample points are used for model validation (Fig.
with an internal model and a feedback to compensate for 1c). The fuzzy model contains three rules with projected
disturbances and modeling errors. m is the output of the y clusters in the antecedents (Fig. 3) and a first order NARX
at every sample step locally linearized TS model. This structure in the consequents. The VAF performance index
block has its own state and is integrated internally. The for this model is 98.0%. The rules of the TS model are:
difference between the process output and the linearized y
y
model output m is fed back with a feedback gain. 1: If y(k) is
11 and u(k) is
12 then
y(k + 1) = 3:69  10,1 y(k) + 4:35  10,1 u(k) , 6:31  10,2 ;
3 Examples
2: If y(k) is
21 and u(k) is
22 then
In this section, two examples with water vessel systems y(k + 1) = 5:30  10,1 y(k) + 5:73  10,1 u(k) , 1:69  10,1 ;
are presented. Both examples are simulations and easy to
3: If y(k) is
31 and u(k) is
32 then
understand. The dynamic structure however is similar to y(k + 1) = 6:11  10,1 y(k) + 7:61  10,1 u(k) , 3:75  10,1 :
real applications in industry.
Figure 2. Locally linearized TS model in the MBPC scheme with an internal model and a feedback to
compensate for disturbances and modeling errors.
Membership (−)

1
1 1

0.5 0.5 0.8

0 0
0 0.5 1 0 0.05 0.1 0.6

Level (m)
Level (m) Flow (l/s)

0.4
Figure 3. Membership functions for single
vessel liquid level process; 11 ; 12 ; 13 (left)

and 21 ; 22 ; 23 (right). 0.2

0
0 200 400 600 800 1000
Time (s)
This model is used in the IMC scheme (Fig. 2) with
a one-step-ahead prediction, i.e. Hc Hp , the cri- = =1
terion weights P and Q are 1 and 0, respectively and the
Figure 4. System tracking of three different
reference trajectories with step changes.
feedback gain is set at 0.5. The tracking performance for
three reference trajectories with step changes of 0.05 and
0.10 (m) is shown in Fig. 4. The system reacts with small 2
overshoot after each step change. This overshoot is due to 0 0 3
p 6 01 0
linearization errors and can be influenced by changing the h + 4 S1 3 0 75 Fin ; (18)
weights in the criterion, a different feedback gain or, a differ- 1
0 S1 4
;

;
ent reference filter. The performance is good in comparison
with the fuzzy relational model based controller described where S1;j and S2;j are the inlet and the outlet area of tank j ,
by Postlethwaite [14]. The overshoots are smaller and the g is the gravity constant (equal to 9.81), ri;j is the restriction
controller anticipates very well on future references. parameters from vessel i to vessel j and fin;j the water flow
into vessel j . In this case, the variables are chosen:
h
3.2 MIMO liquid level process r3;1 r3;2 i =
0:8 0:2 i ; h
r4;1 r4;2
0:2 0:8 (19)

The same controller is used for a liquid level process in a h ,3


S = 10 10,3 10,3 10,3 i :
10 10,6 10,6 10,6
, 6
dual cascaded configuration (Fig. 7) given by: (20)

2
, SS21 11 p2g
;
0 r3;1 SS21 31 p2g r4;1 AS21 41 p2g 3
; ; The structure of the MIMO model is selected by using the
, SS21 22 2g r3;2 SS21 32 p2g r4;2 AS21 42 p2g 7
p
; ; ; insight in the physical structure of the system as follows:
6 0 ; ; ;
1 2
0 1 13 2
0 03 2
0 03
h_ = 6
6
;
S 2 3p
; ; 7
7
4 0 0 , S1 3 2g 0 5 ny = 4 00 1 1 1 5 ; nu = 4 0 05; n = 40 05 :
;
d
, SS21 44 p2g
;
0 1 0 1 0 1 0 (21)
0 0 0 ;
; 0 0 0 1 0 1 0 1
1.5 Q1 Q2

Flow (l/s)
1
0.5
h3 h4
0
1.5 3 4
Flow (l/s)
1
0.5
0
1.5
Flow (l/s)

1
h1
0.5 h2
0 1 2
1.5
Flow (l/s)

1
0.5
0
0 2000 4000 6000 8000 10000
Figure 7. Liquid level process with four cas-
caded vessels.
Figure 5. Comparison of the process out- 1
put (solid line) with the fuzzy model (dashed-

h1 (m)
0.5
dotted line).
0
1

h2 (m)
0.01 0.5
Q1 (l/s)

0
0.005
1

h3 (m)
0
0 2000 4000 6000 8000 10000 0.5
0.01
0
Q2 (l/s)

0.005
1
h4 (m)

0.5
0
0 2000 4000 6000 8000 10000
Time (s)
0
0 2000 4000 6000
Time (s)
Figure 6. Input data for identification.
(a) Outputs for four vessel liquid level process.
0.01
Q1 (l/s)

Vessel 1 and 2 cannot influence vessel 3 and 4 because the 0.005

water cannot flow back. Also vessel 1 cannot influence ves- 0


sel 2, and vessel 3 cannot influence vessel 4. The inputs for 0.01
Q2 (l/s)

identification are shown in Fig. 5. Because of the symmetry 0.005


in the system, the same data set with interchanged inputs
and outputs can be used for validation, i.e., the outputs h1
0
0 2000 4000 6000

and h3 are put in place of h2 and h4 . The identified model


Time (s)

has a VAF-value of [99.3, 98.7, 99.5, 99.0]% which shows (b) Control input for solid lines.
a high similarity with the simulated process. A comparison 0.01
Q1 (l/s)

of the TS model with the process data is shown in Fig. 6. 0.005

The MIMO TS model is used in the proposed LMBPC struc- 0


ture. The controller is simulated for various setpoint changes
= 1
0.01
using Hp Hc , . First, a set of steady states is determ-
Q2 (l/s)

0.005
ined for the system using constant inputs. The reference
0
trajectories with setpoint changes are designed using these 0 2000 4000 6000
Time (s)
steady states. The feedback gain is set at 0.5. The sim-
ulation result for two different sets of reference trajector- (c) Control input for dashed dotted lines.
ies is given in Fig. 8a. The weight matrices in Eq.(1) are
P= diag ; ; ; and ([1 1 1 1]) Q=
diag ; . The calcu- ([0 0]) Figure 8. Controller performance for two dif-
lated control actions are given in Fig. 8b and Fig. 8c. ferent trajectories.
4 Conclusions
Linear model based predictive control of nonlinear pro- References
cesses, using locally linearized TS models, shows good res-
ults for the given examples. However, these results are very [1] J.M. Sousa, R. Babuška, and H.B. Verbruggen. Branch-and-
bound optimization in fuzzy predictive control: An applic-
preliminary. In this paper some of the advantages of Linear
ation to an air conditioning system. Control Engineering
MBPC are highlighted. Two of them are: fast computation
Practice, 5:1395–1406, 1997.
of the resulting QP problems and efficient dealing with sys-
tem and control constraints. The proposed controller with a [2] D.A. Linkens and S. Kadiah. Long-range predictive control
using fuzzy process models. IChemE, 74:77–88, 1996.
locally linearized TS model results in a convex optimization
problem, which is a main advantage in comparison with the [3] J. Valente de Oliveira and J.M. Lemos. Long-range predictive
use of relational models [2, 14, 3], where nonlinear optimiz- adaptive fuzzy relational control. Fuzzy Sets and Systems,
ation methods are necessary. A promising research direction 70:337–357, 1995.
is the use of longer control and prediction horizons, based [4] U. Kaymak, J.M. Sousa, and H.B. Verbruggen. A comparat-
on linearizations in the future, which is under investigation. ive study of fuzzy and conventional criteria in model-based
Also a stability analysis for the developed controller must predictive control. In FUZZ-IEEE, volume 2, pages 907–914,
be done [15]. Barcelona, Spain, 1997.
[5] Y.-Z. Lu, M. He, and C.-W. Xu. Fuzzy modeling and expert
Acknowledgements This work has been done as part of optimization control for industrial processes. IEEE Trans. on
the FAMIMO project funded by the European Commission Control Systems Technology, 5:2–12, 1997.
(ESPRIT LTR 21911). More information is available at [6] T. Takagi and M. Sugeno. Fuzzy identification of systems and
http://iridia.ulb.ac.be/FAMIMO/ its application to modeling and control. IEEE Transactions
on Systems, Man and Cybernetics, 15:116–132, 1985.
Appendix A [7] C.E. García, D.M. Prett, and M. Morari. Model predictive
Given the linear state space system as described by Eq.(6) and
the objective function described by Eq.(1), the constrained Linear control: Theory and practice – a survey. Automatica, 25:335–
MBPC problem can be solved by solving the quadratic program: 348, 1989.
n
min 1 ~uT H ~u + cT ~uo ; (22) [8] C.E. Garcia and M. Morari. Internal model control: 1. a
~u 2 unifying review and some new results. Ind. Eng. Chem.
with: n
H = 2(RTu PRu + Q) Process Des. Dev., 21(308-323), 1982.
c = 2[RTu P T (Rx Ax(k) , r~)]T ; (23)
[9] R. Babuška. Fuzzy modeling and identification. PhD thesis,
and satisfying the constraints on u, u, and y: Delft University of Technology, Department of Electrical En-
~u  ! ; (24) gineering, Delft, The Netherlands, 1997.
with [10] R. Babuška and H. B. Verbruggen. Fuzzy set methods for
2
Iu 3
umax , Iu u(k , 1) 3
2
,Iu min , Iu u(k , 1)
6 ,u
local modeling and identification. In R. Murray-Smith and
6 7 7
=6 IH m
p 7 6
7; ! = 6
umax 7
7:
T. A. Johansen, editors, Multiple Model Approaches to Non-
6
4 ,I H mp
5 4 max,u
min 5
(25) linear Modeling and Control, pages 75–100. Taylor & Fran-
Ru y , Rx Ax(k) cis, London, UK, 1997.
,Ru ,ymin , Rx Ax(k) [11] M. Setnes, R. Babuška, and H. B. Verbruggen. Rule-based
IH pm is a (Hp m  Hp m) unity matrix. The matrices Rx ; Ru ; Iu ; modeling: Precision and transparency. To appear in IEEE
and Iu are defined: Transactions on Systems, Man and Cybernetics, Part A: Sys-
2 3
C tems and Humans, 1998.
CA
Rx =6
4 ..
7
5; (26) [12] R. Babuška, J.A. Roubos, and H.B. Verbruggen. Identifica-
.
CAH ,1 p
tion of MIMO systems by input-output TS fuzzy models. In
FUZZ-IEEE, Anchorage, Alaska, 1998.
2 CB 0 ::: 0 3
CAB CB ::: 0 [13] H.A.B. te Braake. Neural Control of biotechnological pro-
Ru = 6
4 .. .. .. ..
7
5; cesses. PhD thesis, Delft University of Technology, De-
. . . .
CAH ,1 B CAH ,2 B : : : CAH ,H B
p p p c
partment of Electrical Engineering, Delft, The Netherlands,
1997.
(27)
2 u(k) 3 2 I 3 2
I 0 : : : 0 3 2 u(k) 3 [14] B.E. Postlethwaite. Building a model-based fuzzy controller.
6
u~(k+1) 7 6 I 7 6 II : : : 0 7 6 ~ u(k+1) 7 Fuzzy Sets and Systems, 79:3–13, 1996.
4 5 4 .. 5 4 .. .. . . .. 5 4 5
..
= . u(k,1) + . . . .  ..
: [15] T.A. Johansen. Fuzzy model based control: stability, robust-
.
u~(k+H ,1)
c
I
| {z }
II
| {z }
: : : I u
~
.
(k+H ,1) c ness, and performance issues. IEEE Transactions on fuzzy
Iu Iu systems, 2:221–234, 1994.
(28)

Potrebbero piacerti anche