You are on page 1of 7

MLD systems: modeling and control.

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

Abstract | In this report, we present preliminary results of the


The process we deal with is that of interacting tanks featured
modeling and control of a hydraulic pilot process, currently under
in gure 1.
construction at the Laboratory of Automatics of the ISA depar-
External
tament of Universidad de Valladolid. The system is described by Source

linear inequalities involving both, real and integer variables and


q0
the dynamical and logical decisions are heavily inter dependant.
Hence the characterization as a Mixed Logical Dynamical sys-
Tank 1:
tem. The model obtained is particularly suited to apply a Model T 1, h 1

Based Predictive Control strategy to command the system. Re-


sults of a simulation of the closed loop system are feature.

Keywords | Mixed logical dynamical systems, Model based pre-


q 11 q 12

dictive control, mixed integer programming.

Tank 21: Tank 22:


T 21 , h21 , T 22 , h22 ,
h21_ max , h22_ max ,
I. Introduction h21 _min h22 _min

In this notes, we present preliminary results of the modeling


and control of a hydraulic pilot process, currently under con-
struction at the Laboratory of Automatics of the Dpt. ISA of
External
q 21 q 22 Source

Universidad de Valladolid.
The system was devised in order to have a test bench for
q 23

a wide variety of control experiences including automata and Tank 3:

experiments integrating logic, dynamics and constraints. We


T 3, h 3

will focus here in this last subject.


Mixed logical dynamical (MLD) systems are described by lin- q 31

ear inequalities involving both, real and integer variables [1] and q 32

the dynamical and logical decisions are heavily inter dependent.


This is the case of the pilot process under study. Fig. 1. Plant lay out
There are several approaches to handle the discrete compo-
nent of MLD systems. Some, set hierarchical levels, leaving the In tanks 21 and 22 water is heated by electric resistors and
continuous variables in the lower ones and the discrete (deci- water in and out of those reservoirs is served by on/o pumps.
sions) variables at the higher levels [2]. Tank 3 receives water from reservoirs 21 and 22 as well as from
Other framework [1,3] pro t from the fact that propositional a continuously regulated (valve) external source. Additionally,
logic involving both continuous and discrete variables may be water is re circulated (to tank 1) through a speed regulated
transformed into linear inequalities in order to formulate a pump and also sent out of the system -as nal product-, by an
model of the evolution of the system subject to the restrictions on/o pump.
imposed by the decisions on the discrete variables and where Tank 1 feeds tanks 21 and 22 and receives re circulated prod-
other operating constraints may be simply added to the prob- uct from tank 3. It also receives water from an external source
lem. through an on/o pump.
Once in this framework, techniques such as Model Based Pre- The control objectives are to deliver product out of the system
dictive Control (MBPC) [4] may be used in order to control the at a prescribed -warm-, temperature while keeping the levels of
system. The singularity being that mixed integer optimization tanks 1 and 3 within given maximum and minimum levels
techniques are to be used. We recall that in the MBPC ap- The dynamics in tanks 21 and 22 are commanded by a Pro-
proach an optimal control policy is computed in each iteration grammable Logic Controller (PLC) that follows a prescribed
for the control horizon. Only the rst calculated control law lling-warming-discharging strategy on each of the tanks. The
is applied to the system, the control horizon is move one step decision of start lling or start discharging are taken by the
forward (receding horizon) and the optimal policy recomputed. MBPC. Once the decision is taken, the PLC follows its own
Also, MBPC is the most widely accepted advanced control tech- sequence. Such a sequence is also modeled in the predictive
nique in industry. controller.
In the case of MLD systems, the predictions and constraints In the lab process we denote by:
involve dynamical and logical variables, and hence the mixed
integer optimization nature of the problem.  q11 = Normalized ow out of tank 1 and in tank 21. Logical
This report is organized as follows: in section II a brief de- variable.
scription of the process is presented, we purposely leave the  q21 = Normalized ow out of tank 21 and in tank 3. Logical
small details for the appendix. Section III is dedicated to the variable.
 Q1 = Normalized ow of heat in tank 21. Logical variable.
W. Colmenares and T. Villegas are with the Universidad Simon Bolivar,  q23 = Normalized ow in tank 3 from the external source.
Dpt. Procesos y Sistemas, Apartado 89000, Caracas 1080, Venezuela. E-mail: Continuous variable.
williamc@usb.ve.  q31 = Normalized re-circulating ow from tank 3 to tank 1.
S. Cristea and C. de Prada are with Universidad de Valladolid, Dpt.
Ingenieria de Sistemas y Automatica, Valladolid 47011, Spain. E-mail:  q32 = Normalized ow out of the system (from tank 3). Yield
prada@autom.uva.es. of the system. Logical variable.
 q0 = Normalized ow in tank 1 from an external source. Log- 8. If X (t) = 3 & h21 (t) < hmax
21 ! X (t + 1) = 0
ical variable. where \&" is the \ " Boolean operator and \!" is the
and
 T1 ; T3 ; T21 = Temperatures in tanks 1, 3 and 21 respectively. implication.
Degree Celsius. Actions derived from the actual machine state are:
 h1 ; h3 ; h21 = Levels in tanks 1, 3 and 21 respectively. Cen- 1. If X (t) = 1 $ q11 (t) = 1
timeters. 2. If [X (t) = 1 j X (t) = 2] & ÆT21 = 0 $ Q1 (t) = 1
Remark 1: \normalized" indicates that the variable may take 3. If X (t) = 3 $ q21 (t) = 1
values between 0 and 1. Additional operating rules not depicted in the diagram in
Remark 2: The variables associated to tank 22 are gure 2 are:
q12 ; q22 ; h22 ; T22 ; and their meaning is easily extrapolated from 1. ÆT21 = 0 ! Æp2 = 0.
those of tank 21. where \j" is the Boolean operator and \$" is the equiva-
or

The equations modeling the system are: lence operator.


In summary, on tank 21, the PLC will load it up to hmax 21
dh1 = 0:1154 (q31 + q0 q11 q12 ) (=15cm), whenmax the MBPC determines so through Æp1 , heat the
dhdt3 = 0:1154 (q21 + q22 + q23 q31 q32 ) water up to T21 (=25C) and then unloads itmin-again when
dt1
h1 dTdt = 0:1154 (q31 (T3 T1 ) + q0 (10 T1 ))) the MBPC determines so through Æp2 {up to h21 (=5cm){.
h3 dTdt = 0:1154 (q21 (T21 T3 ) + q22 (T22 T3 ) +
3 Loading and unloading are non stop task once started. There
q23 (10 T3 )) (1) canmaxbe no unloading unless in tank 21 temperature has reach
dh21 = 0:1346 (q11 q21 ) T21 .
dt For tank 22, a similar to gure 2 state diagram may be drawn.
h21 dTdt21 = 0:1346 (7:102Q1 + q11 (T1 T21 ))
dh22 = 0:1346 (q12 q22 ) Similar rules will command the evolution of the state Y , the
dt
h22 dTdt22 = 0:1346 (7:102Q2 + q12 (T1 T22 ))
consequences (actions) on q12 , q22 and Q2 and prescription to
unload tank 22. To make the problem a little harder we impose
For all the tanks in the system, there are two types the restriction that there can not be parallel unloading of tanks
Remark 3:
of dynamical equations, those associated to the balance of mass 21 and 22, i.e., q21 and q22 can not be on at the same time.
(which are depicted in terms of levels) and those associated to
the balance of energy (that are described in terms of tempera- III. The mixed logical dynamical model

As we mentioned earlier, MLD systems are represented by


ture) [5]. Here, we simply write the nal nonlinear equations to a set of linear equations and constraints, since our process is
ease the lecture and focus on the MLD model and control. nonlinear, our rst task is to provide ourselves with a linear ap-
The PLC command sequence is described as follows: let X proximation of the system. Furthermore, in order to frame the
represent the state of the automata ( nite state machine) in problem in the MBPC environment we need to have a discrete
tank 21. We de ne the states as follows: time model of the pilot process.
 X = 0 ! waiting to load tank 21
 X = 1 ! loading tank 21 Even though there will be no smooth behavior of the process,
 X = 2 ! waiting to unload tank 21 due mainly to the on/o nature of some control variables and
 X = 3 ! unloading tank 21. to the sequence introduced by the PLC, it is necessary to have
Also, let Æp1 and Æp2 be the logical variables representing per- a point to linearize the system. We choose for the continuous
missionsmax to start loading and unloading tank 21 and ÆT21 = 1 if variables the desirable operating point {the point where we want
T21  T21 (=25C) else ÆT21 =0. Let Y ; Æp3 ; Æp4 ; ÆT22 represent to have the system most of the time{, on the grounds that the
the state, permissions to load and unload tank 22 and whether control actions will tend to regulate the system on those values
its temperature is above the maximum (T22max=25C) or not . most of the time or around them in average.
The state Y with similar meaning in tank 22 as X in tank 21. The desirable operating point is: h^1 = h^ 21 = h^ 22 = ^h3 =
The state sequence for tank 21 is shown in gure 2: 15cm, T^1 = 15C , T^3 = 20C , T^21 = T^22 = 25C and q^31 = q^23 =
0:5.
Remark 4: Observe that this operating point is not an equi-
h 21 h 21 max
librium in any condition of the logical control variables and that
δ p1 δ p2
in some cases the system will not be so closed to them, such as
x=0 x=1 x=2 x=3
the case when tanks 21 and 22 are loaded.
There are 8 logical variables (q0 , q11 , q12 , q21 , q22 , q32 , Q1 ,
∼δ p2 h 21 h 21 min Q2 ), in order to obtain just one linear approximation we should
generate the 28 (=256) possible continuous linear system {
∼δ p1 h 21 < h 21 max

around8 the above mentioned operating point{ and from them


the 2 discrete ones. So, for instance, with all logical variables
set to zero (q0 = q11 = q12 = q21 = q22 = q32 = Q1 = Q2 = 0),
h 21 < h 21 min

Fig. 2. Evolution of X the continuous linear approximation is:


dh1 = 0:1154q31
The evolution of the state as indicated in gure 2 is: dhdt3 = 0:1154(q23 q31 )
1. If X (t) = 0 & Æp1 (t) = 0 ! X (t + 1) = 0 dTdt1
2. If X (t) = 0 & Æp1 (t) = 1 max
! X (t + 1) = 1 dTdt3
= 0:0013h1 0:0038(T1 T3 ) + 0:0385q31
3. If X (t) = 1 & h21 (t) < h21max ! X (t + 1) = 1 dhdt21
= 0:0026h3 0:0038T3 0:0077q23 + 0:0385 (2)
4. If X (t) = 1 & h21 (t)  h21 ! X (t + 1) = 2 dTdt21
= 0
5. If X (t) = 2 & Æp2 (t) = 0 ! X (t + 1) = 2 dhdt22
= 0
6. If X (t) = 2 & Æp2 (t) = 1 max
! X (t + 1) = 3
dTdt21
= 0
7. If X (t) = 3 & h21 (t)  h21 ! X (t + 1) = 3 dt = 0
From the di erent continuous systems, a sample time is de- continuous variables will imply the existence of constant terms
cided based on the system with the fastest time constant. The in the equations.
chosen sample time was: Ts = 30s.
The corresponding discrete time systems are readily obtained. The total non linear MLD model obtained is:
Once the discrete linear systems are calculated, each of the
sampled models are \multiplied" by the corresponding combi-
nation of logical variables and then added up to obtain the one h1 (k + 1) = h1 (k) + 3:46615q31 (k) 3:4615(q11 (k)+
single model [1]. So for instance, in the case of all logical vari- q12 (k)) + 3:4615q0 (k)
ables set to zero (2), we have: h3 (k + 1) = h3 (k) 3:4615q31 (k) + 3:4615q23 (k)+
3:4615(q21 (k) + q22 (k)) 3:4615q32 (k)
L0 = (1 q11 )(1 q21 )(1 Q1 )(1 q12 )(1 q22 )(1 q0 )(1 q32 ) T1 (k + 1) = 0:363h1 (k) + 0:891T 1(k) + 0:1028T3 (k)+
0:0041h3 (k) + 1:0208q31 (k) 0:1185q23 (k)+
and the discrete non linear MLD system: 0:0617 + 0:0641(q11 (k) + q12 (k))+
0:0688q0 (k)h1 (k) 0:0003q0 (k)h3 (k)
h1 (k + 1) = (h1 (k) + 3:4615q31 (k))L0 0:1836q0 (k)T1 (k) 0:011q0 (k)T3 (k)+
h3 (k + 1) = (h3 (k) + 3:4615(q31 (k) q23 (k)))L0 0:0094q0 (k)q3 1(k) + 0:0086q0 (k)q23 (k)+
T1 (k + 1) = ( 0:0363h1 (k) + 0:004h3 (k) + 0:891T1 (k)+ 1:0304q0 (k) 0:1236(q11 (k)q0 (k)+
0:1028T3 (k) + 1:0208q31 (k) q12 (k)q0 (k)) 0:0041(q21 (k)h3 (k)+
0:1185q23 (k) + 0:0617)L0 q22 (k)h3 (k)) 0:011(q21 (k)T3 (k)+
T3 (k + 1) = (0:0727h3 (k) + 0:891T3 (k) q22 (k)T3 (k)) + 0:0114(q21 (k)T21 (k)+
0:1282q31 (k) 2:0513q23 (k) + 1:0898)L0 q22 (k)T22 (k)) + 0:0048(q21 (k)q31 (k)+
h21 (k + 1) = h21 (k)L0 q22 (k)q31 (k)) + 0:004(q21 (k)q23 (k)+
h22 (k + 1) = h22 (k)L0 q21 (k)q23 (k)) + 0:0528(q21 (k) + q22 (k))
T21 (k + 1) = T21 (k)L0 0:0048q32 (k) + 0:0048(q21 (k)q32 (k)+
T22 (k + 1) = T22 (k)L0 q22 (k)q32 (k)) 0:0039(q21 (k)q0 (k)+
(3) q22 (k)q0 (k))
Observe that (3) is obtained from (2) sampled at Ts and then T3 (k + 1) = 0:0727h3 (k) + 0:891T3 (k) 0:1282q31 (k)
multiplied by L0 . 2:0513q23 (k) + 1:0898 0:0727(q21 (k)h3 (k)+
As mentioned above, the total nonlineal discrete model should q22 (k)h3 (k)) 0:1836(q21 (k)T3 (k) + q22 (k)T3 (k))+
be obtained by summing all 256 discrete systems so obtained, 0:1951(q21 (k)T21 (k) + q22 (k)T22 (k))+
that is: 0:1282(q21 (k)q31 (k) + q22 (k)q31 (k))+
0:1007(q21 (k)q23 (k) + q22 (k)q23 (k))+
X
255 0:8609(q21 (k) + q22 (k)) 0:1282q32 (k)
Total model= (Discrete)i Li : (4) 0:1282(q21 (k)q32 (k) + q22 (k)q32 (k))
i=0 h21 (k + 1) = h21 (k) + 4:0384q11 (k) 4:0384q21 (k)
Before writing explicitly the total model let us state some T21 (k + 1) = T0:210046 (k) 0:1275Q1 (k)h21 (k) + 3:8241Q1 (k)
q11 (k)h1 (k) + 0:1223q11 (k)T1 (k)+
remarks: 0 :0132q11 (k)T3 (k) + 0:1574q11 (k)h21 (k)
Remark 5: Observe that the parameters Li ; i = 0; : : : ; 255 let 0:236q11 (k)T21 (k) + 0:1311q11 (k)q31 (k)
us select the linear approximation of the nonlinear system 1. In 0:0102q11 (k)q23 (k) 2:0176q11 (k)+
fact, depending on the state of the logical variables, one and 0:0157Q1 (k)q11 (k)h21 (k) 0:7073Q1 (k)q11 (k)+
only one out of the 256 Li 's will be 1 and the rest will be zero. 0:0088q11 (k)q0 (k)h1 (k) 0:0244q11 (k)q0 (k)T1 (k)
For example L0 = 1 only when all eight logical variables are 0:001q11 (k)q0 (k)T3 (k) + 0:1211q11 (k)q0 (k)
zero. h22 (k + 1) = h22 (k) + 4:0384q12 (k) 4:0384q 22(k)
Indeed, the number of linear models to be gen-
erated is much less than 256. In our case q11 and q12 {and T22 (k + 1) = T0:220046 (k) 0:1275Q2 (k)h22 (k) + 3:8241Q2 (k)
Remark 6:

q12 (k)h1 (k) + 0:1223q12 (k)T1 (k)+


similarly q21 and q22 , Q1 and Q2 {, a ect the system in much 0 :0132q12 (k)T3 (k) + 0:1574q12 (k)h22 (k)
the same way, so only the variables associated to tank 21 are to 0:236q12 (k)T22 (k) + 0:1311q12 (k)q31 (k)
be considered and then those of tank 22 may5 be easily included 0:0102q12 (k)q23 (k) 2:0176q12 (k)+
later. That reduces the combinations to 2 (=32). Also, there 0:0157Q2 (k)q12 (k)h22 (k) 0:7073Q2 (k)q12 (k)+
are some combinations physically impossible such as q11 and q21 0:0088q12 (k)q0 (k)h1 (k) 0:0244q12 (k)q0 (k)T1 (k)
on at the same time or Q1 and q22 , because of the regulations we 0:001q12 (k)q0 (k)T3 (k) + 0:1211q12 (k)q0 (k)
have imposed on the operations. The actual number of linear (5)
models generated were only 20.
Contrary to the usual practice when linearizing,
where the linear variables are usually referred to the point of theModel 5 is a non linear mixed logical dynamical system where
Remark 7:

^
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 de ning new vari-
h1 h ^ 1 for any possible combination of the logical variables), its ables [1,3]. So for instance, if we de ne 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 di erent 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 de ne (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 de ned 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 de ne
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 a ected 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 simpli cation 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 simpli cation (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 de ne 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

26: T21 5ÆT21  25 and


27: 0  Q1 + ÆT21 Æ1
28: Q1 + ÆT21  1 [ll]i  Vxi ( ) + ui ( )  [ ]i ; = ; : : : ; : (8)
X k V U k ul i 1 61
29: 0  Æ1 Q1 where \ll" and \ul" stand for lower and upper limit of the re-
30: 0  ÆT 21 Æp2 straint in consideration. Let 0 be the initial condition of the
X

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 satis ed 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

6 Vui AB Vui B Vui ::: 0 7 6 .. 7  [ul]i


Æf1 = q11 +q21 . In (6) we have use such a relation and replace q11 6
4 .. 7
564 . 7
5
(and q12 ) in the prediction equations. Also we have introduced .
logical variables Æh1 ; Æmax
h2 (and Æh3 ; Æh4 for tank 22) to indicate Vui AN 2 B ::: Vui (
U N )1
tank 21 level above h21 (Æh1 = 1 else Æh1 = 0) or below hmin 21 (10)
i = 1; : : : ; 61. error is included to account for uncertainties in
V
the linear model.
30

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

and h3 where weighted. All other states control variables do 15

not appear in the objective function. The function used was: 10

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

T3 near set point is, according to the objective function, more


15

important than the other weighted outputs.


10

The error vector error is included to accounts for the model-


5
0 1 2 3 4 5 6 7
time (hours)
V
ing errors and disturbances a ecting the system and is handled
as a rst order discrete lter with an integrator [6,9,10]. Fig. 4. Evolution of Levels in tanks 1 and 3.

IV. The simulation results

In this section we present the results of the MBPC strategy


applied on the simulation of the pilot process. We have chosen
15

to simulate 7 hours of plant operation. The set points for h1 and 14

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

external source, setting its temperature value in 12 (2C higher


than the originally set value), to incorporate di erent season 11

temperatures. All other states and controls are not commanded


but to remain within their upper-lower limits. 10

The result for temperature T3 is shown in gure 3 and the


evolution of levels in tanks 1 and 3 are featured in gure 4.
9
0 1 2 3 4 5 6 7
time (hours)

24
Fig. 5. Temperature pro le in tank 1.

22

dynamical MBPC interacts with the PLC to ful ll its control


objectives. It is evidenced, for example, in gures 6 and 7.
20

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)

integer programming problem is solved in each iteration using


Fig. 3. Temperature in tank 3. Dashed line is the reference NAG [13] h02bbc C-routine transformed into proper \dll" Mat-
lab library.
In gure 5 is shown the pro le of temperature in tank 1, Even with the signi cant reduction on the number of opti-
in gure 6 and 7 we feature the rst 2 hours of temperature mization variables the problem cannot be solved in proper time
and level evolution of tanks 21 and 22. These variables where if we consider long prediction horizons, taking into account that
only constrained to remain within their operating limits. The there is a sampling time of 30s. In this case we set the prediction
pro les in tanks 21 and 22 are heavily determine by the PLC. horizon (N ) to 6 sampling time (3min). Bigger time horizons
Only the rst 2 hours are shown since the evolution in time is would result in fairly the same outputs with signi cant increase
fairly repetitive (loading, warming, unloading) and we wanted in the time to solve the mixed real-integer optimization prob-
to stress such pro le. Including the 7 hours of operation would lem.
have called for bigger gures and worst appreciation of the na- Other important result is that under the assumptions made,
ture. the plant cannot met some of the set point values for the tem-
From the results obtained, we observe that the controlled pro- perature in tank 3 (for instance, reference in 15C), there are
cess tends to follow the control objectives, especially the most physical limits that cannot be better by the control system.
important one, that is, the temperature in tank 3. The temper-
ature T3 is better regulated in 20C (the value of linearization) V. Conclusions

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 e ort 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

ing the decision taking at higher levels of the command pyramid


22

where decisions are taken on longer time spans.


20

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

Applications, Oxford University Press, New York 1995.


15
[4] Clarke D.W., Mohtadi C. And Tu s P.S., Generalized Predictive Control.
Level (cm)

10 Part I: The Basic Algorithm, Automatica, 23(2):137-148,1987.


[5] Luyben W.L., Process Modeling, Simulation and Control for Chemical Engi-
5
neers. Second edition, Mc Graw Hill, New York 1990.
0
[6] Camacho E. F. and Bordons C., Model Predictive Control, Springer-Berlag,
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
London 1998.
[7] Rao S.S., Optimization: Theory and Applications, Wiley Eastern Ltd, New
28
Delhi 1995.
26
[8] Bemporad A., M. Morari, V. Dua and E.N. Pistikopoulos, The Explicit Solu-
Temperature (ºC)

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-in nite
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.

pilot process currently under construction at Universidad de


Valladolid. The rst conclusion to draw is that, in e ect, such
a controller may be developed and that logical variables and
rather complicated sequences as well as the common continuous
variables and processes may be successfully set up as predictor
model and constraints to command a whole MLD system.
The framework proposed in [1] is, in e ect, a powerful tool to
model systems integrating integer and real dynamical variables.
There are some draw backs that have to be pointed out. The
number of auxiliary variables (logical and/or real) and extra
variables (and their associated restrictions) required to get a
\solid" MLD predictor may grow to a point where it is not
possible to obtain a fast enough solution in time. As an example,
even if we could get away with no auxiliary variables at all, 14
out of the 20 elements in the control are logical extra variables
required. Similarly, for a given prediction moment, 79 out of the
93 constraints imposed are related to the extra, so for instance,
if we set a rather short prediction horizon of N = 10. In each
iteration we would have 200 optimization variables (140 extra
ones) and 930 constraints (790 extra ones).
Additionally, the mixed real-integer programming problem re-
quires a number of {in our case{ quadratic programming prob-
lems to be solved, each of them in a possible combination the
logical variables. Even if there are very eÆcient algorithms, the
problem is still a time consuming one.
On the other hand, we have not made any e ort to eÆ-
ciently reduced the number of logical variables and constraints
in our model. More over, we are convinced that since there
is no unique way of expressing the logical implications, there

You might also like