Professional Documents
Culture Documents
Experience with generation of the MLD model and section IV presents the pre-
a pilot process liminary simulation results. Finally, some conclusions and com-
ments.
W. Colmenares, S. Cristea, C. De Prada and T. Villegas
II. The laboratory process
Universidad de Valladolid.
The system was devised in order to have a test bench for
q 23
ear inequalities involving both, real and integer variables [1] and q 32
^
linearization (operating point), e.g. h1 = h1 h1 , in our logical and continuous non linearities are due to multiplication of pure logical or
variables. Terms with parameters smaller
case we have retain the absolute value of the variable (e.g. h1 ). than 0.001 have been neglected.
We have done so primarily because the operating point is not
an equilibrium and therefore, even if for all 20 linear systems Such a model (5) may be transformed into a linear mixed
the relative linear variables may seem the same (e.g. h1 = logical dynamical system with constraints by dening new vari-
h1 h ^ 1 for any possible combination of the logical variables), its ables [1,3]. So for instance, if we dene a new real variable (see
derivative will not be so, that is, the derivative dh1 =dt, will not equation of T21 ) : z(k) = q11 (k)T1 (k) and use it in the expres-
be the same for the dierent alternatives of the logical control sion of T21 (k + 1), it will be linear in z(k) but this new variable
variables (q11 ; q21 ; Q1 ; q12 ; q22 ; Q2 ; q0 ; q32 ). Keeping the absolute will have to satisfy the following constraints that would have to
be added to the system model: (Æ1 ; Æ2 2 [0; 1]) which is the usual strategy to transform integer
programming problems into 0-1 programming ones [7]. Indeed,
z (k) 25q11 (k) Æ1 ; Æ2 are the binary numeric representation of X , that is:
z (k) 10q11 (k)
z (k) T1 (k) 10(1 q11 (k)) X = 0 $ Æ1 = 0 & Æ2 = 0
z (k) T1 (k) 25(1 q11 (k)) X = 1 $ Æ1 = 1 & Æ2 = 0
X = 2 $ Æ1 = 0 & Æ2 = 1
where (25,10) are the maximum and minimum values of T1 . X = 3 $ Æ1 = 1 & Æ2 = 1
Similarly we could dene (see equation of T21 (k + 1)) a new
logical variable: Æ(k) = Q1 (k)q11 (k). Again, the equation on Consequently, the evolution of the state and the actions and
T21 (k + 1) will be linear in the newly dened variable, but the
rules derived from this evolution may be written in terms of this
following constraints would have to be added: new variables. For instance, the command sequence:
Æ (k) Q1 0 If X (k) = 2 & Æp2 (k) = 1 ! X (k + 1) = 3;
Æ (k) q11 0
Q1 + q11 Æ (k) 1 may now be written as:
To obtain a linear model, an important number of auxiliary If Æ1 (k) = 0 & Æ2 (k) = 1 & Æp2 (k) = 1 !
logical and real variables would have to be generated and corre- Æ1 (k + 1) = 1 & Æ2 (k + 1) = 1:
sponding constraints. Since our aim is to formulate the control
problem as a MBPC one, and what we need is a good prediction It, may now be transformed into a couple of equivalent linear
constraints [3] as follows:
model with as few extra variables as possible we have preferred
not to generate any auxiliary variable. Observe that in MBPC,
one optimization problem is solved in each iteration and the [Æ1 (k) = 0 & Æ2 (k) = 1 & Æp2 (k) = 1 !
higher the number of variables, the longer it takes to obtain a Æ1 (k + 1) = 1 & Æ2 (k + 1) = 1] $
solution of the optimization problem. This is particularly so [ ( Æ1 (k) & Æ2 (k) & Æp2 (k)) j (Æ1 (k + 1) & Æ2 (k + 1))]
with mixed integer programming problems where each new log- $ [(Æ1 (k + 1) j Æ1 (k) j Æ2 (k) j Æp2 (k))]
ical variables may duplicate {in the worst possible case{ the & [(Æ2 (k + 1) j Æ1 (k) j Æ2 (k))] $
iteration number required to arrive to a solution. Æ1 (k + 1) + Æ1 (k) + 1 Æ2 (k) + 1 Æp2 (k) 1 and
Our aim is to provide a formulation of the problem in such a Æ2 (k + 1) + Æ1 (k) + 1 Æ2 (k) + 1 Æp2 (k) 1
way that the Model Based Predictive Control approach [6] could
be implemented to stabilize the system. Therefore, we need where the additional \" (= ) Boolean operator has been
not
a prediction model, suitable enough, to predict with adequateintroduced. In order to work in the same time frame we dene
two new logical variables:
accuracy the outputs of the system but also small enough as to
assure a solution of the optimization problem in proper time. Æf1 (k) = Æ1 (k + 1); Æf2 (k) = Æ2 (k + 1):
As mentioned above, we decided not to introduce any auxil-
iary variable because if we had, the optimization problem would
In terms of the new variables, the evolution of the state is rep-
have grown in such a way that would have preclude obtaining resented by:
a solution (a control decision) in small enough time. On the
other hand, there is physical knowledge that can help us avoid Æf1 (k) + Æ1 (k) + 1 Æ2 (k) + 1 Æp2 (k) 1 together with
in this case, auxiliary variables, so for instance when q11 is on Æf2 (k) + Æ1 (k) + 1 Æ2 (k) + 1 Æp2 (k) 1
Q1 will always be also on, so the product q11 Q1 = q11 , simi-
larly, when q21 is discharging on tank 3, temperature T21 will Now we are ready to write the prediction linear model and
be around 25C so q21 T21 25q21 . In other cases, only the the constraints that will rule the evolution of the variables.
second or third decimal will be aected by one of the non lin- The MBPC model is:
ear variables going from one extreme to the other (see for in-
stance in the equation of T1 (k+1) the terms 0:0048q21 (k)q31 (k)).
h1 (k + 1) = h1 (k) + 3:4615(q31 (k) Æf1 (k) Æf3 (k)+
Some other variables will change very little most of the time, q21 (k) + q22 (k))
T1 2 [10; 15]; T3 2 [15; 20] so taking one xed value will not h3 (k + 1) = h3 (k) + 3:4615(q23 (k) q31 (k) + q21 (k)+
imply much loss in accuracy . Finally, we want to get the max- q22 (k))
imum yield out of the process so it is natural to impose that q0T1 (k + 1) = 0:0325h1 (k) + 0:0041h3 (k) + 0:7074T1 (k)+
and q32 be on (=1) all the time. 0:9018T3 (k) 0:1099q23 (k) + 1:0302q31 (k)
With these considerations in mind, we have set all the con- 0:0595(Æf1 (k) + Æf3 (k)) + 0:1211(q21 (k)+
tinuous variables to their operating point values, and also q22 (k))
q0 = q32 = 1 and solve logical products (such as q11 Q1 ) a priori,
T3 (k + 1) = 0:0727h3 (k) + 0:891T3 (k) 2:0513q23 (k)+
in all the non linear terms in model 5. Such simplication will 0:1282q31 (k) + 1:2186(q21 (k) + q22 (k))
provide a linear MLD model without generating auxiliary vari- h21 (k + 1) = h21 (k) + 4:0384Æf1 (k) 8:0768q21 (k)
ables. Inaccuracies generated by this simplication (and in fact
T21 (k + 1) = T21 (k) + 1:9116Q1 (k) 2:5713(Æf1 (k) q21 (k))
also by the linearization) can be handle adequately by adding h22 (k + 1) = h22 (k) + 4:0384Æf3 (k) 8:0768q22 (k)
additional error terms to the model [6]. T22 (k + 1) = T22 (k) + 1:9116Q2 (k) 2:5713(Æf3 (k) q23 (k))
Æ1 (k + 1) = Æf1 (k)
A. The predictive control frame
Æ2 (k + 1) = Æf2 (k)
To handle the sequential aspects of the operation of the Æ3 (k + 1) = Æf3 (k)
process, rst we transform the evolution of the state (inte- Æ4 (k + 1) = Æf4 (k)
ger X 2 [0; 3]) into the evolution of 2 new binary variables (6)
Subject to at time k: (Æh2 = 1 elseminÆh2 = 0). High level (hmax
21 ) is set in 15 cm and
low level (h21 ) in 5 cm.
1: 0 Æ1 + Æ2 + Æp1 Æf1 Remark 9: In (6) In order not to work with constant terms in
2: 0 Æ1 + Æ2 + Æp1 Æf2 the prediction equations, we have made 3 change of variables,
3: 0 Æf1 + Æ1 + Æ2 Æp1 even though to make it simple, we have kept the same notation
4: 1 Æ1 + Æ2 Æp1 Æf2 for them. The changes made were: q31 = q31 + 1, T1 = T1
5: 15Æh1 h21 0 2:9627, T3 = T3 8:822. That is why, q31 limits are between [1-2]
6: 15Æh1 + h21 < 15 instead of [0-1], T1 is within, roughly rounded, [7-22] instead of
7: 25Æh2 + h21 < 30 [10-25] and T3 within, roughly rounded, [1-21] instead of [10-30].
8: 5 h21 + 5Æh2 Remark 10: Constraint number 24 was not included in the
9: 0 Æf1 Æ1 + Æ2 + Æh1 rst list of problem requirements. It stands for the fact that
10: 1 Æ2 Æf2 Æ1 + Æh1 decision to load and unload can not be taken simultaneously. It
11: 2 Æ2 Æf1 Æ1 Æh1 is included to avoid appearance of impossible situations.
12: 1 Æf2 + Æ2 Æ1 Æh1
13: 1 Æ1 Æf1 Æ2 Æp2 B. The prediction formulae
14: 0 Æf2 + Æ1 Æ2 + Æp2 From the model and constraints (6), we are now ready to
15: 1 Æf1 + Æ1 Æ2 Æp2 formulate the prediction algorithm. With such an aim, rst we
16: 1 Æf2 + Æ1 Æ2 Æp2 dene the state ( ) and control vectors ( ).
17: 1 Æf1 Æ1 Æ2 + Æh2
X U
Let
18: 1 Æf2 Æ1 Æ2 + Æh2
19: Æf1 + Æ1 + Æ2 + Æh2 3 X= [h1 h3 T1 T3 h21 T21 Æ1 Æ2 h22 T22 Æ3 Æ4 ]T
20: Æf2 + Æ1 + Æ2 + Æh2 3 U= [q31 q23 q21 Æf1 Æf2 Æp1 Æp2 Æh1 Æh2 ÆTT21 Q1
21: 1 Æ21 Æf1 Æf2 q22 Æf3 Æf4 Æp3 Æp4 Æh3 Æh4 ÆT22 Q2 ]
22: 0 Æf1 q21 It is relatively simple to write (6) and constraints as:
23: 0 Æf2 q21
24: Æp1 + Æp2 1 ( + ) = ( )+ ( ) (7)
25: ÆT21 + T21 < 10 X k 1 AX k BU k
This constraints are relative to the evolution of the state X state at the present time (t = 0), the predictions of the states
associated to tank 21 and another 30 similar constraints are to from k = 1 up to N (= the prediction horizon) may be calcu-
be written for the state Y associated to tank 22. They will lated as [8]:
not be repeated here. There rest only one additional constraint 2 3 2 32
relative to the operation imposition that tanks 21 and 22 can
not unload at the same time and that we depict as follows: (
X 1 ) B 0 0 ::: 0 () 3
U 0
6
6 (
X 2 ) 7
7 6
6 AB B 0 ::: 0 7
7 6
6 ( ) 77
U 1
q21 + q22 1
6 ( ) 7 = 66 A2 B AB B ::: 0 7 6 .. 7 +
6
4
X 3
.. 7
5 4 .. 7
564 . 7
5
. .
In total, the operation of tanks 21 and 22 introduces 61 con- ( ) 2 3 AN 1 B
::: AB B ( )
straints that must be satised at each prediction estimate.
X N U N 1
A
We have also introduced common MBPC restrictions which 6 7A2
are for some of the states: 6
6 .. 77 X0 + Verror :
0 h1 ; h3 30 4 . 7
6 5
7 T1 22 AN
1 T3 21 (9)
0 h21 ; h22 25 and the restrictions imposed on the predictions by:
10 T21 ; T22 30
and for some of the controls: 2 Vxi
3
6 Vxi A 7
0 q23 ; q11 ; q12 ; q21 ; q22 1 6
[ll] 66
i Vxi A2
7
7 X0 +
1 q31 2 4 .. 7
5
.
Some remarks are now in order. 2 Vxi AN 1
32
Remark 8: Following equivalencies of states 1 and 3 of X , Vu i 0 ::: 0 () 3
it is relatively simple to determine that q11 = Æf1 (1 Æf2 ) and
U 0
6 Vui B Vui 0 ::: 0 7 6 ( ) 77
q21 = Æf1 Æf2 (similarly for [q12 ; q22 ] and [Æf3 ; Æf4 ] ) and therefore: 6 7 6 U 1
The objective function used for the MBPC was the standard 25
Level h1 (cm)
quadratic cost function, but only temperature T3 and levels h1 20
PN
0 1 2 3 4 5 6 7
J (t3 ; H1 ; h3 ) =
ref 2 ref 2
ref i2=1 10(T3 (i) T3 ) + (h1 (i) h1 ) +
(h3 (i) h3 ) :
35
30
Level h3 (cm)
25
All the \ref " values are desire (set point) outputs. Keeping 20
h3 are 15cm. For T3 we have set 17C for the rst hour, 20 for
the second 15 for the third, 20 again for the next 2 hours, 22 in 13
hour six and 18 in last hour. Starting in the fourth hour we have
Temperature T1 (ºC)
introduced a small perturbation on the water that comes from 12
24
Fig. 5. Temperature prole in tank 1.
22
The decisions to start pumps q11 and q12 as well as q21 and q22
Temperature T3 (ºC)
18
depend on the MBPC (Æp1 ; Æp2 ; Æp3 ; Æp4 ) and then the control
of such pumps is taken by the PLC that completes the proper
16
14
-
ow, temperature- sequence.
The results also feature the in
uence of the prescribed se-
12
quences on the control objectives, i. e., there is strong variance
on the controlled variables.
All the simulations were run under Matlab [12] and the mixed
10
0 1 2 3 4 5 6 7
time (hours)
when a small perturbation in the temperature of the water com- The main objective of this work was to device a mixed log-
ing from an external source is introduced. The mixed logical ical dynamical model based predictive control strategy for the
tank 21 are better strategies to face the modeling problems (with fewer
variables and/or constraints), for instance looking at the states
20
15
of the whole system and not only to those of one small part
of it. Also, more and more computational power is available
Level (cm)
10
5
(to reasonable costs) and so the computational burden tend to
diminish in time. Neither we have made any eort in eÆciently
handling unfeasibility or uncertainty such as proposed for in-
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
28
stance in [9,11]. Future results and real plant handling will
26
incorporate such issues.
For the moment, there seems more likely to be a tool for aid-
Temperature (ºC)
24
18
16
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
time (hours)
References
[1] Bemporad A. and Morari M., Control of Systems Integrating Logic, Dynam-
Fig. 6. Temperature and level evolution in tank 21. ics, and Constraints, Automatica, Special issue on hybrid systems, Vol.
35(3):407-427, 1999.
[2] Grossmann R.L., Nereode A., Ravn A.P. (Eds), Hybrid Systems, Springer
Verlag, New York 1993.
[3] Floudas C.A., Nonlinear and Mixed-Integer Optimization. Fundamentals and
tank 22
20
24
tion of Model Predictive Control via Multiparametric Quadratic Programming.
22
Proc. American Control Conference, Chicago 2000.
20
[9] Mejas D., Serrano J. and de Prada C., Min-max constrained quasi-innite
18 horizon model predictive control using linear programming. AdCHEMC An-
16
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 nual meeting, 2000.
time (hours)
[10] De Keyser R., A gentle introduction to MBPC, Proc. International Confer-
ence on Control engineering & Signal Processing, Piura 1998.
[11] Alvarez T. and de Prada C., Handling infeasibility in predictive control in
Fig. 7. Temperature and level evolution in tank 22. predictive control. Computers and Chemical Engineering, 21:557-582,1997.
[12] Matlab: The Language of Technical Computing, The MathWork Inc. 1999.
[13] NAG C Library, Mark 5, Numerical Algorithms Group, 1998.