0% found this document useful (0 votes)
110 views

MPC With Integrators

1) The document presents a simple model predictive control (MPC) algorithm that provides integral action. The algorithm works on deviation models to remove the effects of slowly varying disturbances and trends in the system and measurements. 2) The MPC controller is illustrated through simulations and experiments on a quadruple tank process. 3) The MPC problem is formulated as a quadratic program that minimizes a cost function subject to input and state constraints, providing a simple way to incorporate integral action into MPC.

Uploaded by

ikshar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
110 views

MPC With Integrators

1) The document presents a simple model predictive control (MPC) algorithm that provides integral action. The algorithm works on deviation models to remove the effects of slowly varying disturbances and trends in the system and measurements. 2) The MPC controller is illustrated through simulations and experiments on a quadruple tank process. 3) The MPC problem is formulated as a quadratic program that minimizes a cost function subject to input and state constraints, providing a simple way to incorporate integral action into MPC.

Uploaded by

ikshar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Modeling, Identification and Control, Vol. 34, No. 3, 2013, pp.

119–129, ISSN 1890–1328

Model Predictive Control with Integral Action: A


simple MPC algorithm
David Di Ruscio

Telemark University College, Kjolnes ring 56, 3918 Porsgrunn, Norway. E-mail contact: David.Di.Ruscio@hit.no

Abstract

A simple Model Predictive Control (MPC) algorithm of velocity (incremental) form is presented. The
proposed MPC controller is insensitive to slowly varying system and measurement trends and therefore
has integral action. The presented algorithm is illustrated by both simulations and practical experiments
on a quadruple tank MIMO process.

Keywords: MIMO systems, model predictive control, optimal controller, integral action, constraints

RL
1. Introduction functional J(u) = 0 dt = L and L is free, are opti-
mized with respect to the control action u subject to
Model Predictive Control (MPC) algorithms are stud- a model and constraints. MPC problems are however
ied in a number of books (e.g. Huang and Kadali based on a moving horizon (i.e. a receding horizon)
(2008), Maciejowski (2002), Camacho and Bordons strategy Garca et al. (1989) were we consider the ini-
(1995), Bitmead et al. (1990)) and in numerous pa- tial time of the optimization interval to be equal to the
pers, se e.g. Maeder et al. (2009) and the references present time t, and the final time of the optimization
therein. interval to be equal to the present time plus a predic-
MPC has its origin in the theory of optimal con- tion horizon, say t+L where L is the prediction horizon.
trol problems, Pontryagin et al. (1956) and Bellmann There is no theoretical difference between standard op-
(1957), and in lecture notes on optimal control the- timal control problems and MPC problems and notice
R t+L
ory at MIT in the early 1960-ties which resulted in the that the functional J(u) = t dt = L.
book Athans and Falb (1966). An early description of the moving horizon or reced-
Parts of the optimal control theory are believed de- ing horizon optimal control strategy where the initial
veloped during the Apollo program in the early 60-ties integration time is set equal to the present time, t, and
where there was a great focus on minimum time (time the final horizon is set equal to t + L where L > 0 is a
optimal control) and minimum fuel (fuel optimal con- constant time interval is as presented in Propoi (1963)
trol) problems, see e.g. Athans and Falb (1966) Ch. and Balchen et al. (1970) p. 208 (in Norwegian).
7 where the minimum principle by Pontryagin et al. An early survey paper on MPC is Garca et al. (1989).
(1956) is used to solve the optimal control problems. A survey of both linear and nonlinear MPC is given in,
This also successful resulted in the state feedback opti- e.g. Maeder et al. (2009), Qin and Badgwell (2003).
mal control law in the Apollo Lunar-Module Autopilot Some early work on non-linear MPC is presented in
Widnall (1970). Balchen et al. (1992) and the references therein.
The above mentioned optimal control problems are The Generalized Predictive Control (GPC) algo-
most often based on a fixed time optimization interval rithm by Clarke et al. (1987) is an algorithm based on
from say a constant initial time t0 = 0 to a final time, an input and output Controlled Auto Regressive and
say L, i.e. a time optimal control problem where a cost Integrated Moving Average (CARIMA) model. The

doi:10.4173/mic.2013.3.2
c 2013 Norwegian Society of Automatic Control
Modeling, Identification and Control

GPC algorithm gives integral action of the closed loop process disturbance, and w may be an unknown con-
system and the present state is estimated using the stant or slowly varying measurements noise vector. v
model and some old known input and output data. and w may represent trends or drifts.
Standard MPC algorithms usually do not achieve in- Note that the variables uk and yk in the model eqs.
tegral action and there is one main reason for this. The (1) and (2) are the actual input and output variable,
answer is that integral action is not necessarily optimal. respectively. Furthermore, note that the model eqs.
However, if integral action is wanted there is some com- (1) and (2) may arise from linearizing non-linear mod-
mon methods to achieve this. els around some nominal steady state variables. The
One commonly used method is to augment an in- model may also rise from system identification based on
tegrator at the input, i.e. augment the plant model trended input and output data. Hence, in these cases,
with an integrator uk = uk−1 + ∆uk . MPC algo- the external noise variables v and w are known, but
rithms is of state feedback type and in this case the the resulting control algorithm to be presented in this
MPC algorithm is a function of the plant state esti- paper is insensitive to these noise variables v and w.
mate x̂k and the estimate ûk−1 . The plant control is Furthermore the system and the measurements may be
then uk = uk−1 + ∆u∗k where ∆u∗k is the MPC cal- influenced by drifts and in these cases the noise vari-
culated optimal control deviation. One should notice ables v and w may be unknown and slowly varying.
that in this case and due to unknown disturbances the Hence, the model eqs. (1) and (2) is a realistic model.
actual previous control uk−1 is not necessarily equal We will study the MPC controller subject to the fol-
to the estimate ûk−1 . This method is among others lowing performance index,
described in Mayne et al. (2000). PL
Jk = i=1 ((yk+i − rk+i )T Qi (yk+i − rk+i )
Another commonly used strategy to incorporate in-
tegral action is to augment an integrator model dk = +∆uTk+i−1 Pi ∆uk+i−1 ), (3)
dk−1 of a constant disturbance d influencing the plant where k is the present discrete time, ∆uk = uk − uk−1
model state equation and the output equation. This is the control rate of change (or control increment),
strategy may be viewed as putting the integrator at the rk is a reference signal and Qi and Pi are symmetric
output. This strategy is also among others described positive semi-definite weighting matrices of appropri-
in Mayne et al. (2000). ate dimensions. For finite prediction horizon L, then
Recently in Ruscio (2012) a simple Linear Quadratic QL may be chosen as the solution to Riccati equation
(LQ) optimal controller algorithm with integral action of the problem to ensure closed loop nominal stability.
is presented. In this method constant or slowly vary- The above MPC objective criterion may be written
ing disturbances in the state and output equations are in more compact form as
removed from the problem by working on deviation
models. Jk = (yk+1|L − rk+1|L )T Q(yk+1|L − rk+1|L )
The contributions of this paper may be itemized as +∆uTk|L P ∆uk|L , (4)
follows:
where Q ∈ RLm×Lm is a block diagonal matrix with
• In this paper an MPC algorithm with integral ac- Qi ∀ i = 1, . . . , L on the block diagonal. P ∈ RLr×Lr
tion, along the same lines as used in the LQ op- is defined similar with Pi ∀ i = 1, . . . , L on the block
timal controller with integral action method, in diagonal. The notation used to define the vectors in
Ruscio (2012) is presented. eq. (4) is defined in Appendix A.
In this paper we consider input rate of change and
amplitude constraints. These constraints may be for-
2. Problem formulation mulated as a linear inequality,

Given a process model A∆uk|L ≤ bk , (5)


where the matrix A and the vector bk are defined later
xk+1 = Axk + Buk + v, (1) in Sec. 3.2.
yk = Dxk + w, (2) The MPC problem is now equivalent to a Quadratic
Programming (QP) problem, i.e., the objective func-
where xk ∈ Rn is the state vector, uk ∈ Rr is the control tion eq. (4) with the process model, eqs (1) and (2), is
input vector, yk ∈ Rm is the output (measurement) minimized with respect to the unknown vector of future
vector, A, B and D are system matrices of appropriate control increments, subject to the process constraints
dimensions, and x0 is the initial state. eq. (5), i.e.,
The disturbances v and w may both be unknown,
∆u∗k|L = arg min Jk . (6)
i.e., v may be an unknown constant or slowly varying A∆uk|L ≤bk

120
Di Ruscio, “Model Predictive Control with Integral Action: A simple MPC algorithm”

The simplified MPC strategy of including a control Hence, we have a strictly proper state space model of
horizon, 1 ≤ Lu ≤ L, and instead calculating a reduced the form
number of future controls ∆uk|Lu , will be discussed and
solved later in the paper. x̃k+1 = Ãx̃k + B̃∆uk , (14)
yk = D̃x̃k . (15)
2.1. Model discussion The state space model eqs (12), (13) (or equivalently
Note that the model eqs. (1) and (2), when v and w are (14), (15) ) may be used to define a Prediction Model
constant vectors, is not unique. The constant trends v (PM) of the form
and w may be incorporated in the model by including
one additional state. We find that the following model yk+1|L = pL + FL ∆uk|L , (16)
is equivalent
where
x̄k+1 Ā x̄k B̃
z }| { z }| { z }| { z }| { pL = OL Ãx̃k , (17)
xk+1 A v xk
= + B uk , (7)
 
zk+1 01×n 1 zk 0 FL = OL B̃ HLd , (18)

and where OL is the extended observability matrix of


x̄k

z }| { the pair Ã, D̃ and HLd ∈ RmL×(L−1)r the Toepliz matrix
z }| { xk of impulse response matrices D̃Ãi−1 B̃ ∈ Rm×r . See
yk = D w , (8) Appendix A for definitions.
zk
The performance index eq. (4) with the PM eq. (16)
with the initial state vector as can be written as a quadratic function on standard

x0
 form, i.e.,
x̄0 = , (9)
z0 Jk = ∆uTk|L H∆uk|L + 2fkT ∆uk|L + J0 , (19)
and with z0 = 1 in order to take care of the constant
where
trends.
H = FLT QFL + P, (20)
3. MPC algorithm fk = FLT Q(pL − rk+1|L ). (21)

The constant term J0 in eq. (19) is not a function of


3.1. Problem solution the unknown ∆uk|L and then not needed and therefore
In order to solve the MPC optimal control problem not presented.
eq. (6) we need a model which is independent of the Notice that when the constraints in the MPC prob-
unknown disturbances. For the sake of generality we lem eq. (5) is inactive, then the unconstrained MPC
are focusing on state space modeling. controls is given by
From the state eq. (1) we have
∆u∗k|L = −H −1 fk . (22)
∆xk+1 = A∆xk + B∆uk , (10)
Usually we have process constraints and this will be
where ∆xk = xk − xk−1 . From the measurement eq. discussed in the next Sec. 3.2.
(2) we have

yk = yk−1 + D∆xk . (11)


3.2. Constraints
It make sense to specify input rate of change con-
Augmenting eqs. (10) with (11) gives the state space straints, i.e.
model
x̃k+1 Ã x̃k B̃
∆umin ≤ ∆uk|L ≤ ∆umax , (23)
z
 }| { z
 }| { 
z }| { z }| {
∆xk+1 A 0n×m ∆xk
yk
= D Im×m yk−1
+ B0m×r
∆uk , (12)and input amplitude constraints, i.e.

umin ≤ uk|L ≤ umax . (24)


x̃k
D̃ z }| { Using the relationship
{ 
∆xk
z }|
yk = D Im×m . (13) uk|L = S∆uk|L + cuk−1 , (25)
yk−1

121
Modeling, Identification and Control

where S ∈ RrL×rL and c ∈ RrL×r are matrices with In this case we furthermore have a simple PM of the
ones and zeroes as defined in the Appendix A. form
We find that the constraints may be written as the
linear matrix inequality yk+1|L = pL + F ∆uk , (31)

A∆uk|L ≤ bk , (26) where


where F = OL B̃, (32)
 
I(rL×rL)
 −I(rL×rL)  and where OL is the extended observability matrix of
A :=  , (27) the pair (D̃, Ã). The term pL is unchanged and given
 S 
−S by eq. (17).
This gives the control objective as a function of the
and increment ∆uk only, i.e. as follows
 
∆umax
 −∆umin  Jk = ∆uTk H∆uk + 2fkT ∆uk + J0 , (33)
 umax − cuk−1  .
bk :=   (28)
where
−umin + cuk−1
The MPC algorithm is then to minimize the objec- H := F T QF + P1 , (34)
tive eq. (19) with respect to the constraints given by T
fk := F Q(pL − rk+1|L ). (35)
the linear inequality eq. (26).
This is a standard Quadratic Programming (QP) In this case we find that the constraints may be writ-
problem in terms of the unknown future control in- ten as the linear matrix inequality

crements and the optimal solution is ∆uk|L , as defined
A∆uk ≤ bk , (36)
in eq. (6). A receding horizon strategy is used and

only the first control increment ∆uk in the calculated where
∆u∗k|L , is used for control. The actual control action  
to the process is then uk = ∆u∗k + uk−1 . Ir×r
 −Ir×r 
A :=   Ir×r  ,
 (37)
4. Reducing the number of −Ir×r
unknowns future control actions and
Usually when presenting MPC algorithms a control 
∆umax

horizon is defined, and this control horizon is usually  −∆umin 
less than the prediction horizon L in order to reduce bk := 
 umax − uk−1  .
 (38)
the number of unknown and then reducing the compu- −umin + uk−1
tation time.
The MPC algorithm is then to minimize the objec-
4.1. Computing only the present control tive eq. (33) with respect to the constraints given by
the linear inequality eq. (36). This is a standard
action
quadratic programming problem in terms of the un-
Consider now the extreme case in which the future con- known and the optimal minimizing solution is ∆u∗k . A
trol actions are equal to the present control action, i.e. receding horizon strategy is used. The actual control
such that uk+i−1 = uk ∀ i = 1, 2, . . .. In this case the action to the process is, uk = ∆u∗k + uk−1 .
only unknown control action is uk , and equivalently The strategy presented in this section is consider-
∆uk . ably reducing the computational time of the MPC al-
In this case we have that ∆uk+i = 0 ∀ i = 1, 2, . . .. gorithm. This strategy is demonstrated to work con-
This gives siderably well for the control of the quadruple tank
T process.
∆uk|L P ∆uk|L = ∆uk P1 ∆uk , (29)
and hence we have the control objective 4.2. Including a control horizon
T
Jk = (yk+1|L − rk+1|L ) Q(yk+1|L − rk+1|L ) In order to reduce the number of unknown input vari-
+∆uTk P1 ∆uk . (30) ables it is common to include a control horizon, say

122
Di Ruscio, “Model Predictive Control with Integral Action: A simple MPC algorithm”

Lu where 1 ≤ Lu ≤ L. In this section we study the 5. Constant references and large


objective
prediction horizon
1
PL T
Jk = 2 i=1 ((yk+i − rk+i ) Qi (yk+i − rk+i ) We will here discuss a special case which leads to a par-
PLu T
+ i=1 ∆uk+i−1 Pi ∆uk+i−1 ), (39) ticular simple solution to the optimal control problem.
Consider the case where the references are constant,
Hence, the compact form of this objective can be writ- i.e., and that the prediction horizon is large or infinite.
ten as Then we may use the LQ index

1X
Jk = (yk+1|L − rk+1|L )T Q(yk+1|L − rk+1|L ) Ji = ((yk − r)T Q(yk − r) + ∆uTk P ∆uk )
2
k=i
+∆uTk|Lu PLu ∆uk|Lu , (40)

1 X
= (ỹkT Qỹk + ∆uTk P ∆uk ), (48)
where PLu = P (1 : rLu , 1 : rLu ). 2
k=i
In this case we find a PM of the form as in eq. (31)
where we have defined ỹk = yk − r.
with
If r is a non-zero constant reference then the mea-
surements eq. (11) can be written as
F := FL (:, 1 : rLu ), (41)
yk − r = yk−1 − r + D∆xk . (49)
where FL is defined in eq. (18). We are using MAT-
LAB notation in eq. (41) and hence F is defined from The state and output eqs. (12) and (13) can then be
all rows in FL and the first rLu columns. rewritten as
Substituting this PM into the objective eq. (40) z x̃k+1 }|
à x̃k B̃
{ z }| { z }| { z }| {
gives
 
∆xk+1
y −r
= A D I
0n×m ∆xk
y −r
+ B0
∆uk , (50)
k m×m k−1 m×r

Jk = ∆uTk|Lu H∆uk|Lu + 2fkT ∆uk|Lu + J0 , (42)


x̃k
ỹk D̃ z }|
where {  {
z ∆xk
z }| { }|
yk − r = D Im×m . (51)
yk−1 − r
T
H := F QF + PLu , (43)
Hence, we have a strictly proper state space model of
fk := F T Q(pL − rk+1|L ). (44)
the form
The constraints are then formulated as the linear in- x̃k+1 = Ãx̃k + B̃∆uk , (52)
equality ỹk = D̃x̃k (53)

A∆uk|Lu ≤ bk , (45) The state space model (50) and (51) (or equivalently
(52) and (53)) with the performance index (48) defines
where in this case, for 1 ≤ Lu ≤ L we have a standard LQ optimal control problem. The optimal
control is of the form
 
I(rLu ×rLu )
 
  ∆xk
−I(rLu ×rLu ) ∆uk = G1 G2 , (54)

A := 
 yk−1 − r
 S(1 : rLu , 1 : rLu )  , (46)

−S(1 : rLu , 1 : rLu ) which can be rewritten as


uk = uk−1 + G1 ∆xk + G2 (yk−1 − r). (55)
and
  The LQ optimal controller (55) gives y = r in steady
∆umax (1 : rLu ) state since the closed loop system is stable due to the
 −∆umin (1 : rLu )  properties of the LQ optimal controller. The states
bk := 
 umax (1 : rLu ) − cuk−1  .
 (47)
are seldom measured in practice. In this case we can
−umin (1 : rLu ) + cuk−1 use a state observer to define the deviation state ∆xk .
However, another solution is to define ∆xk in terms of
Hence we have a quadratic programming problem in some past and known outputs . . . , yk−1 , yk and some
the unknown vector ∆uk|Lu ∈ RrLu of future control known inputs . . . , uk−1 and the model matrices A, B
actions and only the first vector, ∆uk is used. and D.

123
Modeling, Identification and Control

6. Numerical examples

Example 6.1 (4 tank process (simulations))


y1: Level tank 1
6.5
r1
Consider the quadruple tank process, Johansson y1
6
(2000), with the non-linear state space model derived
from mass balances and Bernulli’s/Torricelli’s law. By 5.5

equating the potential energy and kinetic energy, i.e.


mgh √= 21 mv 2 and solving for the velocity we obtain 5
0 500 1000 1500 2000 2500 3000 3500 4000

v = 2gh. Multiplying with the area, a, of the outlet y2: Level tank 2
hole of the tank we obtain the√volumetric flow-rate, q, 6.6

6.4
out of the tank as q = av = a 2gh. 6.2

6
Hence, a mass balance of the four tank process gives 5.8
the state space model 5.6 r2

5.4 y2

5.2
p p 0 500 1000 1500 2000 2500 3000 3500 4000
Samples
A1 ẋ1 = −a1 2gx1 + a3 2gx3 + γ1 k1 u1 , (56)
p p
A2 ẋ2 = −a2 2gx2 + a4 2gx4 + γ2 k2 u2 , (57)
p
A3 ẋ3 = −a3 2gx3 + (1 − γ2 )k2 u2 , (58)
p Figure 1: Simulation of the quadruple tank process and
A4 ẋ4 = −a4 2gx4 + (1 − γ1 )k1 u1 , (59)
the minimum phase case in Example 6.1 with
MPC control with integral action. Level ref-
where Ai ∀ i = 1, . . . , 4 is the cross-section area of tank erences and actual levels illustrated. Predic-
i, ai ∀ i = 1, . . . , 4 is the cross-section area of the outlet tion horizon L = 100 and control horizon
pipe of tank i. Lu = L.
The flow k1 u1 from pump 1 may be divided into a
flow γ1 k1 u1 into tank 1 and a flow (1 − γ1 )k1 u1 to
tank 4, i.e. such that the flow from pump number 1
is k1 u1 = γ1 k1 u1 + (1 − γ1 )k1 u1 . Similarly, the flow
k2 u2 from the second pump may be divided into a flow
u1: MPC
γ2 k2 u2 into tank 2 and a flow (1 − γ2 )k2 u2 into tank 3.4

3. Here γ1 and γ2 are fixed parameters. The system is 3.2

non-minimum phase when choosing these parameters 3

such that, 0 < γ1 + γ2 < 1, and the system is minimum 2.8

phase when, 1 < γ1 + γ2 < 2. The numerical values 2.6

for the above parameters, as well as nominal values for 0 500 1000 1500 2000 2500 3000 3500 4000
the states and control inputs, are chosen as presented
u2: MPC
in Johansson (2000). 3.4

3.2
The 4 tank process is studied in a number of papers,
3
see e.g. Gatzke et al. (2000) where Internal Model Con-
2.8
trol (IMC) and Dynamic Matrix Control (DMC) were
2.6
used. Here we use the proposed MPC controller with
integral action as presented in Sec. 3.1. 0 500 1000 1500 2000
Samples
2500 3000 3500 4000

The results after using the MPC controller in Sec.


3 in order to control the non-linear model eqs. (56)-
(59) are presented in Figures 1 and 2. The MATLAB
quadprog.m function is used to solve the QP problem Figure 2: Simulation of the quadruple tank process and
as described in Sec. 3.2. The weighting matrices were the minimum phase case in Example 6.1 with
chosen simply as P = I2 and Q = 0.0001I2 . Only the MPC control with integral action. Control
minimum phase case is illustrated. inputs illustrated. Prediction horizon L =
100 and control horizon Lu = L.

124
Di Ruscio, “Model Predictive Control with Integral Action: A simple MPC algorithm”

7. Experimental results on a 6. The subspace system identification method,


Di Ruscio (1996), Di Ruscio (2009) were used.
quadruple tank process The best DSR model with n = 4 states was found
with parameters L = 2 and J = 29. The sim-
A practical experiment with the MPC algorithm were
ulated outputs are illustrated in Fig. (5). The
performed on a quadruple tank process. The quadruple
PE criterion evaluated for the validation data was
tank process is further discussed in Example 6.1.
VDSR = 3.07.
The sampling rate in all experiments is one sec-
ond. We started with empty tanks in all experiments. 7. Two SISO PI controllers were tuned by using the
Hence, this may be viewed as a test for robustness for model based tuning method in Ruscio (2010). The
unknown non-linearities when using the proposed MPC model used was the DSR model. The experimental
controller. The quadruple tank process setup results in results using this decentralized control strategy is
a non-minimum phase behavior. illustrated in Figs. (7) and (8).
The experiments are described in the following
items. 8. The LQ optimal control strategy eq. (19) was im-
plemented. The Kalman filter identified by the
1. The non-linear model, Eqs. (56)-(59) with mea- DSR method were used to identify the present
surements of the levels h1 and h2 in the lower state deviation ∆xk = xk − xk−1 needed in the
tanks, were used in en Extended Kalman Filter controller. The experimental results using this LQ
(EKF) to estimate the four states in vector x optimal controller with integral action strategy is
needed in the MPC algorithm in order to formu- illustrated in Figs. (7) and (8).
late the term pL in the PM.
The conclusions drawn from these experimental re-
The experiment is illustrated in Fig. (3). In order
sults are discussed in the following.
to reduce the computational time using LabView
Interestingly the identified state space models, both
the simple MPC algorithm in Sec 4 were used.
from PEM and DSR, fits the real data better than
From Fig. (3) we see that this MPC algorithm
the FP model. Here the simulated output, i.e. the
performs well.
behavior from the input u, to the output y, is used in
2. An open loop input experiment is designed as il- order to calculate the PE criterion. The results using
lustrated in Fig. (4) and the corresponding out- the FP model, the PEM model and the DSR model
puts, i.e. the levels in the two lower tanks, also are Vfp = 7.57, VPEM = 3.38 and VDSR = 3.07 ,
illustrated in Fig. (5). respectively. Interestingly the DSR model is slightly
better to fit the validation data compared to the PEM
3. The input and output data are collected into model.
data matrices U ∈ RN ×2 , and Y ∈ RN ×2 where Based on this conclusion we are using the identified
the number of samples is N = 5459. The first DSR model for both tuning the PI controllers and for
NID = 4000 first samples were used for identifi- use in the LQ optimal controller with integral action
cation. Hence, the last 1459 samples may be used strategy eq. (20). The deterministic part of the model,
for validation of the identified state space mod- i.e. x k+1 = Axk + Buk and yk = Dxk , were used to
els. The data was also centered before use in the tune the PI controller strategy (by first using the RGA
identification methods. pairing strategy, Bristol (1966)), as well as for the cal-
culation of the feedback matrices G1 and G2 . Further-
4. A First Principles (FP) model, very similar to the more the DSR identified Kalman filter gain matrix K
one presented in Example 6.1, were fitted to the were used in the Kalman filter on deviation form as
process as well as believed possible. Using the presented in Ruscio (2012), for estimating the devia-
input experiment as illustrated in Fig. (4)) gave tion states ∆xk needed in eq. (20).
the simulated outputs as illustrated in Fig. (5). As we see from Figs. (7) and (8) the LQ strategy
The Prediction Error (PE) criterion evaluated for works very well compared to the PI controller strategy.
the validation data was Vfp = 7.57. This is justified by comparing the Integrated Absolute
(IAE) indices. The DSR model gave IAE indices 1.6849
5. The MATLAB IDENT Toolbox system identifica- and 1.3290 for level one and two, respectively, and for
tion function pem.m were used to identify a n = 4 the PI controllers 2.2723 and 2.5141 for level one and
order state space model. The simulated outputs two, respectively. It is also worth mentioning that it is
are illustrated in Fig. (5). The PE criterion eval- very difficult to tune PI controllers for this process due
uated for the validation data was VPEM = 3.38. to the non-minimum phase behavior of the process.

125
Modeling, Identification and Control

MPC test: L =1 L=500 h1 vs samples


u
20 10
h −real
1
5 h1−dsr
15
h −pem
1
r1 and y1

0 h −fp
1
10
−5
r1
5
y −10
1

0 −15
0 10 20 30 40 50 60 70 80 0 1000 2000 3000 4000 5000 6000

h vs samples
2
15 10
h −real
2
5 h −dsr
2
10 h2−pem
r1 and y1

0 h −fp
2

−5
5 r2
y −10
2

0 −15
0 10 20 30 40 50 60 70 80 0 1000 2000 3000 4000 5000 6000
Time [Min] Samples

Figure 3: Practical run of the quadruple tank process Figure 5: This figure illustrates the real measurements
as in Sec. 7, and the non-minimum phase of the level in the two lower tanks as well as
case in Example 6.1 with MPC control with the corresponding simulated outputs of the
integral action. A control horizon Lu = 1 system identification models, from DSR and
and the algorithm in Sec. 4. PEM, as well as the simulated outputs from
0.4
the first principles model.
u1 [V]

0.2

−0.2
more flexible with respect to state observers to be used.
−0.4
0 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
Se e.g. Ruscio and Foss (1998) for a state observer
along these lines.
0.4
u2 [V]

0.2

0
9. Concluding remarks
−0.2

−0.4
0 500 1000 1500 2000 A simple state space MPC controller with integral ac-
2500 3000
Samples
3500 4000 4500 5000

tion on velocity (incremental) form for MIMO systems


Figure 4: Open loop system identification input exper- is presented.
iment, i.e. the volt input to the pumps.

8. Discussion Acknowledgment
The presented MPC algorithm is based on a state The author acknowledges the assistance of Mr.
space model of the plant and is therefore flexible to Danuskha who did the practical implementation on the
be used for MIMO systems. The algorithm may be quadruple tank process.
combined with any state observer for estimating the
present state, e.g. the Kalman filter, Jazwinski (1989)
or simply with a state observer based on past inputs
A. Notations used
and outputs as described in Ruscio and Foss (1998). The special structure of a Hankel matrix as well as
The algorithm as presented in this paper is believed some matching notations, which are frequently used
to work very similar as the GPC algorithm in Clarke throughout the paper, are defined in the following.
et al. (1987). However, as mentioned in the introduc- Given a vector
tion Sec. 1 the GPC algorithm is based on the use of
an input and output CARIMA model. Such models sk ∈ Rnr ∀ k = 0, 1, 2, . . . , (60)
are practical only for SISO systems. CARIMA mod-
els are capable of removing the influence of constant where nr is the number of rows in sk .
disturbances as in the state space model description in Define integer numbers j and i and define the vector
Eqs. (1) and (2) (SISO systems assumed). sj|i ∈ Rinr as follows
The PM used in the GPC algorithm may be written  
on the form as in Eqs. (16) - (18). Se e.g. Bitmead sj
et al. (1990). One difference between the presented def  sj+1 
sj|i =  ,
 
..
MPC algorithm and the GPC algorithm, is that the  . 
state estimate in the GPC algorithm, e.g. as in Eq. sj+i−1
(17) is calculated based on the smallest number of past
inputs and outputs. The presented MPC algorithm is which is defined as an extended vector.

126
Di Ruscio, “Model Predictive Control with Integral Action: A simple MPC algorithm”

Level in tank 2: Reference and outputs using PI and proposed LQ controller


18
PI
LQ
16 r
20 2

15 14

12
h1

10
1) FP L=300 Lu=5
2) FP+DSR L=300 Lu=5
5 3) DSR L=300 Lu=5 10
r1

h2
0 8
0 500 1000 1500 2000 2500 3000 3500 4000
Samples

6
20

4
15

2
h2

10
1) FP L=300 Lu=5
2) FP+DSR L=300 Lu=5
0
5 3) DSR L=300 Lu=5 0 500 1000 1500 2000 2500 3000 3500 4000
r2 Samples

0
0 500 1000 1500 2000 2500 3000 3500 4000
Samples

Figure 8: Quadruple tank process. Level in tank one.


Figure 6: Quadruple tank process. Level in tank one Illustrating the reference and the outputs
upper and tank two lower. Illustrating the from the process controlled by two single loop
reference and the outputs from the process PI controllers, and the proposed LQ optimal
controlled by the proposed MPC controller, controller with integral action. The LQ con-
for three different cases. Case 1: FP model troller where constructed by using the DSR
used in EKF to estimate the present state method for system identification. The DSR
and linearized FP model in the MPC. Case model was used to identify a Kalman filter
2: FP model used in EKF to estimate the for the system. The states where estimated
present state and identified DSR model in with this Kalman filter and the determinis-
the MPC. Case 3: DSR model and the corre- tic part of the model were used to design the
sponding Kalman filter used to estimate the controller.
present state and DSR model in the MPC.

The integer numbers j and i have the following in-


terpretations:

18
Level in tank 1: Reference and outputs using PI and proposed LQ controller • j start index or initial time in the sequence used
16
to form sj|i , i.e., sj , is the upper vector element in
14
the extended vector sj|i .
12

10
• i is the number of nr-rows in sj|i .
h1

8
PI
LQ
Examples of such vector processes, sk , to be used in
6
r1
the above definition, are the measured process outputs,
4

2
yk ∈ Rm , inputs, uk ∈ Rr and references, rk ∈ Rm .
0
The extended observability matrix, Oi , for the pair
0 500 1000 1500 2000 2500 3000 3500 4000
Samples
(D, A) is defined as
 
Figure 7: Quadruple tank process. Level in tank one. D
 DA
Illustrating the reference and the outputs

def 
Oi =  .  ∈ Rim×n , (61)

from the process controlled by two single loop  .. 
PI controllers, and the proposed LQ optimal DAi−1
controller with integral action. The LQ con-
troller were constructed by using the DSR where the subscript i denotes the number of block rows.
method for system identification. The DSR The reversed extended controllability matrix, Cid , for
model was used to identify a Kalman filter the pair (A, B) is defined as
for the system. The states were estimated
with this Kalman filter and the determinis- def 
Cid = Ai−1 B Ai−2 B · · · B ∈ Rn×ir , (62)

tic part of the model were used to design the
controller.
where the subscript i denotes the number of block
columns.

127
Modeling, Identification and Control

The lower block triangular Toeplitz matrix, Hid ∈ Clarke, D. W., Mohtadi, C., and Tuffs, P. S. Gener-
im×(i+g−1)r
R , for the quadruple matrices (D, A, B, E). alized Predictive Control-Part I. Automatica, 1987.
  23(2):137–148. doi:10.1016/0005-1098(87)90087-2.
E 0m×r 0m×r · · · 0m×r
 DB
 E 0m×r · · · 0m×r 
 Di Ruscio, D. Combined Deterministic and Stochas-
d def  DAB
Hi =  DB E · · · 0m×r 
 tic System Identification and Realization: DSR - A
 .. .. .. . . ..  Subspace Approach Based on Observations. Model-
 . . . . . 
i−2 i−3 i−4 ing, Identification and Control, 1996. 17(3):193–230.
DA B DA B DA B · · · E
doi:10.4173/mic.1996.3.3.
where the subscript i denotes the number of block rows
Di Ruscio, D. Closed and Open Loop Subspace Sys-
and i+g −1 is the number of block columns, and where
tem Identification of the Kalman Filter. Model-
0m×r denotes the m × r matrix with zeroes.
ing, Identification and Control, 2009. 30(2):71–86.
Define ∆uk = uk − uk−1 . Using that uk = ∆uk +
doi:10.4173/mic.2009.2.3.
uk−1 , uk+1 = ∆uk+1 + uk = ∆uk+1 + ∆uk + uk−1 and
so on, we have Garca, C. E., Prett, D. M., and Morari, M. Model pre-
dictive control: Theory and practiceA survey. Au-
uk|L = S∆uk|L + cuk−1 (63)
tomatica, 1989. 25(3):335–348. doi:10.1016/0005-
where S ∈ R Lr×Lr
and c ∈ R Lr×r
are given by 1098(89)90002-2.

Ir 0r ··· 0r
 
Ir
 Gatzke, E. P., Meadows, E. S., Wang, C., and Doyle,
 Ir Ir ··· 0r   Ir  F. J. I. Model based control of a four-tank sys-
S=

.. .. .. .. , c = 
 
.. ,

(64) tem. Computers and Chemical Engineering, 2000.
 . . . .   .  24(2):1503–1509. doi:10.1016/S0098-1354(00)00555-
Ir Ir ··· Ir Ir X.
where Ir is the r × r identity matrix and 0r is the r × r Huang, B. and Kadali, R. Dynamic Modeling, Predic-
matrix of zeroes. tive Control and Performance Monitoring. Springer,
2008.
References Jazwinski, A. H. Stochastic processes and filtering the-
ory. Academic Press, 1989.
Athans, M. and Falb, P. L. Optimal Control: An Intro-
duction to the Theory and its Applications. McGraw- Johansson, K. H. Interaction bounds in multivariable
Hill, 1966. control systems. Automatica, 2000. 38(2):1045–1051.
doi:10.1016/S0005-1098(01)00285-0.
Balchen, J. G., Fjeld, M., and Solheim, O. A. Reguler-
ingsteknikk Bind 3. Tapir, 1970. Maciejowski, J. Predictive control: with constraints.
Balchen, J. G., Ljungqvist, D., and Strand, Pearson Education, 2002.
S. State-space predictive control. Modeling, Maeder, U., Borrelli, F., and Morari, M.
Identification and Control, 1992. 13(2):77–112. Linear offset-free Model Predictive Con-
doi:10.4173/mic.1992.2.2. trol. Automatica, 2009. 45(2):2214–2222.
Bellmann, R. Dynamic Programming. Princeton Uni- doi:10.1016/j.automatica.2009.06.005.
versity Press, 1957.
Mayne, D. Q., Rawlings, J. B., Rao, C. V., and
Bitmead, R. R., Gevers, M., and Wertz, V. Adap- Scokaert, P. O. M. Constrained model predictive
tive Optimal Control: The Thinking Man’s GPC. control: Stability and optimality. Automatica, 2000.
Prentice-Hall, 1990. 36(2):789–814. doi:10.1016/S0005-1098(99)00214-9.

Bristol, E. H. On a new measure of interac- Pontryagin, L. S., Boltyanskii, V. G., Gamkrelidze,


tions for multivariable process control. Transac- R. V., and Mishchenko, E. F. The Mathematical
tions on Automatic Control, 1966. 11(11):113–114. Theory of Optimal Processes. English translation:
doi:10.1109/TAC.1966.1098266. Interscience 1962., 1956.

Camacho, E. F. and Bordons, C. Model Predictive Con- Propoi, A. I. Use of linear programming methods for
trol in the Process Industry. Springer-Verlag, Berlin, synthesizing sampled-data automatic systems. Au-
1995. tomation and remote control, 1963. 24(7):837–844.

128
Di Ruscio, “Model Predictive Control with Integral Action: A simple MPC algorithm”

Qin, S. J. and Badgwell, T. A. A survey of in-


dustrial model predictive control technology. Con-
trol Engineering Practice, 2003. 11(11):733–764.
doi:10.1016/S0967-0661(02)00186-7.
Ruscio, D. D. On Tuning PI Controllers for In-
tegrating Plus Time Delay Systems. Modeling,
Identification and Control, 2010. 31(4):145–164.
doi:10.4173/mic.2010.4.3.
Ruscio, D. D. Discrete LQ optimal control with integral
action: A simple controller on incremental form for
MIMO systems. Modeling, Identification and Con-
trol, 2012. 33(2):35–44. doi:10.4173/mic.2012.2.1.
Ruscio, D. D. and Foss, B. On state space model based
predictive control. In IFAC Symposiu on Dynam-
ics and Control of process Systems (DYCOPS-5),
Corfu, Greece, June. 1998 .

Widnall, W. S. The Minimum-time Thrust-Vector


Control Law in the Apollo Lunar-Module Autopilot.
Automatica, 1970. 6(6):661–671. doi:10.1016/0005-
1098(70)90039-7.

129

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy