0% found this document useful (0 votes)
70 views34 pages

Academic MPC: E.F. Camacho

I. This document describes several model predictive control algorithms used in academia, including state space based MPC and linear quadratic regulator (LQR) control. II. State space based MPC uses state space models to make predictions of the plant output along a finite horizon and optimize control inputs by minimizing an objective function. III. LQR control is a special case where the horizon is infinite and no constraints are present, resulting in an optimal static state feedback law computed using the Riccati equation.

Uploaded by

docyouness
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)
70 views34 pages

Academic MPC: E.F. Camacho

I. This document describes several model predictive control algorithms used in academia, including state space based MPC and linear quadratic regulator (LQR) control. II. State space based MPC uses state space models to make predictions of the plant output along a finite horizon and optimize control inputs by minimizing an objective function. III. LQR control is a special case where the horizon is infinite and no constraints are present, resulting in an optimal static state feedback law computed using the Riccati equation.

Uploaded by

docyouness
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/ 34

Outline

Overview
State Space based MPC
Linear Quadratic Regulator
Generalized Predictive Control

Academic MPC

E.F. Camacho

Universidad de Sevilla

April 11, 2009

E.F. Camacho Academic MPC


Outline
Overview
State Space based MPC
Linear Quadratic Regulator
Generalized Predictive Control

Overview

State Space based MPC

Linear Quadratic Regulator


Riccati equation
Infinite horizon

Generalized Predictive Control


The white noise case
The Coloured Noise Case
An Example
Measurable Disturbances

E.F. Camacho Academic MPCs


Outline
Overview
State Space based MPC
Linear Quadratic Regulator
Generalized Predictive Control

I An overview of some mpc algorithms widely used in Academy.


I Parametric models)
I Rational transfer function models (gpc)
I State space models (dmc)
I Pros: More general and compact models
I Cons: Less intuitive than parametric models

E.F. Camacho Academic MPCs


Outline
Overview
State Space based MPC
Linear Quadratic Regulator
Generalized Predictive Control

x(t + 1) = Ax(t) + Bu(t)


y (t) = Cx(t) (1)

An incremental state space model can be used. If the model input


is the control increment 4u(t) = u(t) − u(t − 1).
· ¸ · ¸· ¸ · ¸
x(t + 1) A B x(t) B
= + 4 u(t)
u(t) 0 I u(t − 1) I
· ¸
£ ¤ x(t)
y (t) = C 0
u(t − 1)

E.F. Camacho Academic MPCs


Outline
Overview
State Space based MPC
Linear Quadratic Regulator
Generalized Predictive Control

I Defining a new state vector as x(t) = [x(t) u(t − 1)]T ,

x(t + 1) = Mx(t) + N 4 u(t)


y (t) = Qx(t) (2)

I Predictions can be obtained recursively:


j−1
X
ŷ (t + j) = QM j x̂(t) + QM j−i−1 N 4 u(t + i)
i=0

I The prediction needs an unbiased estimation of x(t). If the


state vector is not accessible an observer must be included:

x̂(t | t) = x̂(t | t − 1) + K (ym (t) − y (t | t − 1))

I where ym (t) is the measured output.


E.F. Camacho Academic MPCs
Outline
Overview
State Space based MPC
Linear Quadratic Regulator
Generalized Predictive Control

I The predictions along the horizon are given by


   
ŷ (t + 1|t) QM x̂(t) + QN 4 u(t)
P1
 ŷ (t + 2|t)   QM 2
x̂(t) + QM 1−i N 4 u(t + i) 
   i=0

y= ..  =  .
. 
 .   N2 −1
. 
N2 P
QM N2 −1−i N 4 u(t + i)
ŷ (t + N2 |t) QM x̂(t) +
i=0

I which can be expressed in vector form as


y = Fx̂(t) + Hu (3)
I where u = [4u(t) 4 u(t + 1) . . . 4 u(t + Nu − 1)]T
I H is a block lower triangular matrix with its nonnull elements
defined by Hij = QM i−j N
I matrix F is defined as
 QM 
QM 2
F =  .
.

.
QM N2

E.F. Camacho Academic MPCs


Outline
Overview
State Space based MPC
Linear Quadratic Regulator
Generalized Predictive Control

I The objective function can be written as:


J = (Hu + Fx̂(t) − w)T (Hu + Fx̂(t) − w) + λuT u
I If the are no constraints
u = (HT H + λI)−1 HT (w − Fx̂(t))
I As a receding horizon strategy is used, only the first element
of the control sequence, 4u(t), is sent to the plant and all
the computation is repeated at the next sampling time.
I If prediction horizons is infinity and there are no constraints,
the predictive controller becomes the well-known linear
quadratic regulator (lqr). The optimal control sequence is
generated by a static state feedback law where the feedback
gain matrix is computed via the solution of an algebraic
Riccati equation.
E.F. Camacho Academic MPCs
Outline
Overview
Riccati equation
State Space based MPC
Infinite horizon
Linear Quadratic Regulator
Generalized Predictive Control

I The process is modelled by

x(t + 1) = Ax(t) + Bu(t) (4)

with x(0) known,


I The objective is to find the control sequence u(0), u(1), . . .,
u(N − 1) that drives the process from the initial to the final
state minimizing the cost given by
N−1
X
J = x(N)T QN x(N) + x(k)T Qk x(k) + u(k)Rk u(k)
k=0

I where Qk are symmetric positive semidefinite matrices and


Rk > 0.

E.F. Camacho Academic MPCs


Outline
Overview
Riccati equation
State Space based MPC
Infinite horizon
Linear Quadratic Regulator
Generalized Predictive Control

I To obtain the control sequence the problem is solved in


reverse order.
I Let us define I1∗ as the optimal cost of the last stage (from
state x(N − 1) to the end):

I1∗ (x(N−1)) = min x(N)T QN x(N) + u(N − 1)RN−1 u(N − 1)


u(N−1)

I Which can be solved explicitly:

u(N−1) = −(B T QN B+R)−1 B T QN Ax(N−1) = KN−1 x(N−1)


I The control action is a linear feedback of the state
vector.
I The last stage cost is then given by:

I1∗ = (Ax+BKN−1 x)T QN (Ax+BKN−1 x)+x T KN−1


T
RN−1 KN−1 x

E.F. Camacho Academic MPCs


Outline
Overview
Riccati equation
State Space based MPC
Infinite horizon
Linear Quadratic Regulator
Generalized Predictive Control

I Defining
PN−1 = (A + BKN−1 )T QN (A + BKN−1 ) + KN−1
T
RN−1 KN−1
I Which can be written as a quadratic form of the state:

I1∗ = x(N − 1)T PN−1 x(N − 1)


I At this point Bellman’s optimality principle is used to
calculate the next cost:
I2∗ = min x(N − 1)T QN−1 x(N − 1) + u(N − 2)RN−2 u(N − 2) + I1∗
u(N−2)

= min x(N − 1)T (QN−1 + PN−1 )x(N − 1) + u(N − 2)RN−2 u(N − 2)


u(N−2)

I As x(N − 1) can be expressed as a function of x(N − 2) and


u(N − 2). The optimal control action can be obtained:
u(N − 2) = KN−2 x(N − 2)
E.F. Camacho Academic MPCs
Outline
Overview
Riccati equation
State Space based MPC
Infinite horizon
Linear Quadratic Regulator
Generalized Predictive Control

I This procedure can be extended, leading to:


u(k) = Kk x(k) with Kk = −(B T Pk+1 B + R)−1 B T Pk+1 A
I The symmetric semidefinite matrix Pk is given by:
Pk = (A + BKk )T Pk+1 (A + BKk ) + KkT Rk Kk + Qk
I Which after a few manipulations is transformed into:
Pk = AT Pk+1 A + AT Pk+1 BKk + Qk
I This is called the discrete-time Riccati equation which can
be solved recursively starting with PN = QN .
I The problem is solved backwards, starting at time N
I As the controller is a linear feedback of the state, the use of a
state estimator or observer is required to compute the control
action. If the observer is a Kalman filter, then it gives rise to
the well-known control strategy called Linear Quadratic
Gaussian (lqg).
E.F. Camacho Academic MPCs
Outline
Overview
Riccati equation
State Space based MPC
Infinite horizon
Linear Quadratic Regulator
Generalized Predictive Control

I Assume that the terminal time is infinitely far in the future.


I This leads to a constant feedback gain matrix, which can be
calculated considering that Pk → P∞ ≥ 0
I P∞ Calculated using the algebraic Riccati equation:
P∞ = AT P∞ A + AT P∞ BK∞ + Q
I Now the control action becomes the constant state feedback
law:
u(k) = K∞ x(k) with K∞ = −(B T P∞ B + R)−1 B T P∞ A
I It can be proved that this control law is stabilizing by defining
the Lyapunov function as V (x(k)) = x(k)T P∞ x(k).
I Using the incremental state space model with
x(t) = [x(t) u(t − 1)]T , the error weighting matrix is:
· ¸
Q 0
Q=
0 0
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Generalized Predictive Control gpc was proposed by Clarke et


al. and has become one of the most popular mpc methods in
academia.
I Uses a (carima) model.

e(t)
A(z −1 )y (t) = B(z −1 )z −d u(t − 1) + C (z −1 ) (5)
4
I where d is the dead time of the system and

A(z −1 ) = 1 + a1 z −1 + a2 z −2 + ... + ana z −na


B(z −1 ) = b0 + b1 z −1 + b2 z −2 + ... + bnb z −nb
C (z −1 ) = 1 + c1 z −1 + c2 z −2 + ... + cnc z −nc
4 = 1 − z −1

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Cost function takes the form


N2 Nu
X X
J(N1 , N2 , Nu ) = δ(j)[ŷ (t + j | t) − w (t + j)]2 + λ(j)[4u(t + j − 1)]2
j=N1 j=1

I where
I ŷ (t + j | t) is an optimum j step ahead prediction of the
system output on data up to time t,
I N1 , N2 and Nu define the costing and control horizons,
I δ(j) and λ(j) are weighting sequences and
I w (t + j) is the future reference trajectory.

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I C (z −1 ) = 1
I Consider the following Diophantine equation:

1 = Ej (z −1 )Ã(z −1 ) + z −j Fj (z −1 ) with Ã(z −1 ) = 4A(z −1 )

I The polynomials Ej and Fj are uniquely defined with degrees


j − 1 and na, respectively.
I Can be obtained by dividing 1 by Ã(z −1 ) until the remainder
can be factorized as z −j Fj (z −1 ). The quotient of the division
is the polynomial Ej (z −1 ) .

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I If the model equation is multiplied by 4Ej (z −1 ) z j ,

Ã(z −1 )Ej (z −1 )y (t + j) = Ej (z −1 )B(z −1 ) 4 u(t + j − d − 1)


+ Ej (z −1 )e(t + j)
I Substituting.
(1−z −j Fj (z −1 ))y (t+j) = Ej (z −1 )B(z −1 )4u(t+j −d −1)+Ej (z −1 )e(t+j)
I which can be rewritten as:
y (t +j) = Fj (z −1 )y (t)+Ej (z −1 )B(z −1 )4u(t +j −d −1)+Ej (z −1 )e(t +j)

I As the degree of polynomial Ej (z −1 ) = j − 1, the noise terms


in the prediction equation are all in the future.

ŷ (t + j | t) = Gj (z −1 ) 4 u(t + j − d − 1) + Fj (z −1 )y (t)

I where Gj (z −1 ) = Ej (z −1 )B(z −1 ).
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Consider that Ej and Fj have been obtained by dividing 1 by


Ã(z −1 ) until the remainder of the division can be factorized as
z −j Fj (z −1 ).
Fj (z −1 ) = fj,0 + fj,1 z −1 + . . . + fj,na z −na
Ej (z −1 ) = ej,0 + ej,1 z −1 + . . . + ej,j−1 z −(j−1)
I Suppose that the same is done to obtain Ej+1 and Fj+1 ,
Fj+1 (z −1 ) = fj+1,0 + fj+1,1 z −1 + . . . + fj+1,na z −na
I It is clear that only another step of the division performed to
obtain Ej and Fj has to be taken to obtain Ej+1 and Fj+1 .
Therefore:
Ej+1 (z −1 ) = Ej (z −1 ) + ej+1,j z −j
with ej+1,j = fj,0
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I The coefficients of polynomial Fj+1 can then be expressed as:

fj+1,i = fj,i+1 − fj,0 ãi+1 i = 0 . . . na − 1

I The polynomial Gj+1 can be obtained recursively:

Gj+1 = Ej+1 B = (Ej + fj,0 z −j )B


Gj+1 = Gj + fj,0 z −j B

I That is, the first j coefficient of Gj+1 will be identical to those


of Gj and the remaining coefficients will be given by:

gj+1,j+i = gj,j+i + fj,0 bi i = 0 . . . nb

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I consider the following set of j ahead optimal predictions:

ŷ (t + d + 1 | t) = Gd+1 4 u(t) + Fd+1 y (t)


ŷ (t + d + 2 | t) = Gd+2 4 u(t + 1) + Fd+2 y (t)
..
.
ŷ (t + d + N | t) = Gd+N 4 u(t + N − 1) + Fd+N y (t)
I which can be written as:

y = Gu + F(z −1 )y (t) + G0 (z −1 ) 4 u(t − 1)


I where
     
ŷ (t + d + 1 | t) 4u(t) g0 0 ... 0
 ŷ (t + d + 2 | t)   4u(t + 1)   g1 g0 ... 0 
     
y =  .  u= . G =  . . . . 
 .   .   . . . . 
 .   .   . . . . 
ŷ (t + d + N | t) 4u(t + N − 1) gN−1 gN−2 ... g0

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I The last two terms in Equation only depend on the past and
can be grouped into f leading to:

y = Gu + f

I If all initial conditions are zero, the free response f is also zero.
I If a unit step is applied to the input at time t; that is,
[4u(t) = 1, 4u(t + 1) = 0, . . . , 4u(t + N − 1) = 0]
I The expected output sequence
[ŷ (t + 1), ŷ (t + 2), . . . , ŷ (t + N)]T is equal to the first column
of matrix G.
I The free response term can be calculated recursively by

fj+1 = z(1 − Ã(z −1 ))fj + B(z −1 ) 4 u(t − d + j)

I with f0 = y (t) and 4u(t + j) = 0 for j ≥ 0.


E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I The cost function can be written as

J = (Gu + f − w)T (Gu + f − w) + λuT u

I where
£ ¤T
w = w (t + d + 1) w (t + d + 2) · · · w (t + d + N)

I The cost function can be written as


1
J = uT Hu + bT u + f0 (6)
2
I The minimum of J, assuming there are no constraints can be
found by making the gradient of J equal to zero, which leads
to:
u = −H−1 b = (GT G + λI)−1 GT (w − f) (7)
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I the first element of vector u, given by: 4u(t) = K(w − f)


I where K is the first row of matrix (GT G + λI)−1 GT .
w +
∆ u(t) y(t)
K Process
-

Free response
calculation

I If there are no future predicted errors (w − f = 0), then there


is no control move, since the objective will be fulfilled with the
free evolution of the process.
I However, in the other case, there will be an increment in the
control action proportional to that future error.
I Notice that the action is taken with respect to future errors,
not past errors, as is the case in conventional controllers.
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I C (z −1 ) 6= 1
I Solve the Diophantine equation:
C (z −1 ) = Ej (z −1 )Ã(z −1 ) + z −j Fj (z −1 )
with δ(Ej (z −1 )) = j − 1 and δ(Fj (z −1 )) = δ(Ã(z −1 )) − 1.
I Multiplying the model equation by 4Ej (z −1 )z j and using the
Diophantine equation.
C (z −1 )(y (t+j)−Ej (z −1 )e(t+j)) = Ej (z −1 )B(z −1 )4u(t+j−1)+Fj (z −1 )y (t)
I As the noise terms are all in the future, the expected value of
the left-hand side of this equation is:
E [C (z −1 )(y (t + j) − Ej (z −1 )e(t + j))] = C (z −1 )ŷ (t + j|t)
I The expected value of the output can be generated by the
equation:
C (z −1 )ŷ (t +j|t) = Ej (z −1 )B(z −1 )4u(t +j −1)+Fj (z −1 )y (t)
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Previous equation could be used to generate the predictions


recursively.
I An explicit expression can be obtained. Consider the
Diophantine equation
1 = C (z −1 )Mj (z −1 ) + z −j Nj (z −1 )
with δ(Mj (z −1 )) = j − 1 and δ(Nj (z −1 )) = δ(C (z −1 )) − 1.
I Multiplying the prediction equation by Mj (z −1 ),
−1 −1 −1 −1 −1
ŷ (t + j|t) = Mj Ej (z )B(z ) 4 u(t + j − 1) + Mj (z )Fj (z )y( t) + Nj (z )y (t)

which can be expressed as


ŷ (t + j|t) = G (z −1 ) 4 u(t + j − 1) + Gp (z −1 ) 4 u(t + j − 1)
+ (Mj (z −1 )Fj (z −1 ) + Nj (z −1 ))y (t)
with δ(G (z −1 )) < j. These predictions can be used in the cost
function which can be minimized as in the white noise case.
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Another way of computing the prediction is by considering the


filtered signals from the plant input/output data
1 1
y f (t) = y (t) u f (t) = u(t)
C (z −1 ) C (z −1 )
I so that the resulting overall model becomes

e(t)
A(z −1 )y f (t) = B(z −1 )u f (t) +
4
I The white noise procedure for computing the prediction can
be used. The predicted signal ŷ f (t + j|t) obtained this way
has to be filtered by C (z −1 ) in order to get ŷ (t + j|t).

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Consider the system:


e(t)
(1 + az −1 )y (t) = (b0 + b1 z −1 )u(t − 1) +
4
I The noise polynomial C (z −1 ) = 1, a = −0.8, b0 = 0.4 and
b1 = 0.6, N1 = 1 and N2 = Nu = 3.
I Predictor polynomials Ej (z −1 ), Fj (z −1 ) from j = 1 to j = 3
will be calculated solving the Diophantine Equation:
Ã(z −1 ) = A(z −1 )(1 − z −1 ) = 1 − 1.8z −1 + 0.8z −2
I The polynomials can be obtained by dividing 1 by Ã(z −1 )
E1 (z −1 ) = 1 F1 (z −1 ) = 1.8 − 0.8z −1
E2 = 1 + 1.8z −1 F2 = 2.44 − 1.44z −1
E3 = 1 + 1.8z −1 + 2.44z −2 F3 = 2.952 − 1.952z −1
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Gi (z −1 ) = Ei (z −1 )B(z −1 ) are

G1 = 0.4 + 0.6z −1
G2 = 0.4 + 1.32z −1 + 1.08z −2
G3 = 0.4 + 1.32z −1 + 2.056z −2 + 1.464z −3

The predicted outputs can be written as:


    
ŷ (t + 1 | t) 0.4 0 0 4u(t)
 ŷ (t + 2 | t)  =  1.32 0.4 0   4u(t + 1) 
ŷ (t + 3 | t) 2.056 1.32 0.4 4u(t + 2)
 
0.6 4 u(t − 1) + 1.8y (t) − 0.8y (t − 1)
+  1.08 4 u(t − 1) + 2.44y (t) − 1.44y (t − 1) 
1.464 4 u(t − 1) + 2.952y (t) − 1.952y (t − 1)
| {z }
f

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I If λ = 0.8
 
0.133 0.286 0.147
(GT G + λI)−1 GT =  −0.154 −0.165 0.286 
−0.029 −0.154 0.1334

I As only 4u(t) is needed, only the first row of the matrix is


used for the control law:
4u(t) = −0.604 4 u(t − 1) − 1.371y (t) + 0.805y (t − 1)
+0.133w (t + 1) + 0.286w (t + 2) + 0.147w (t + 3)

u(t) = 0.396u(t − 1) + 0.604u(t − 2) − 1.371y (t) + 0.805y (t − 1)


+0.133w (t + 1) + 0.286w (t + 2) + 0.147w (t + 3)

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Many processes are affected by external disturbances caused


by variables that can be measured.
I Consider, for instance, a cooled jacket continuous reactor
where the temperature is controlled by manipulating the water
flow entering the cooling jacket. Any variation of the reactive
flows will influence the reactor temperature.
I These perturbations, also known as load disturbances, can
easily be handled by the use of feedforward controllers.
I Known disturbances can be taken explicitly into account in
mpc, as will be seen in the following.

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Consider a process described by:


1
A(z −1 )y (t) = B(z −1 )u(t − 1) + D(z −1 )v (t) + C (z −1 )e(t)
4
where the variable v (t) is the measured disturbance at time t
and D(z −1 ) is a polynomial defined as:
D(z −1 ) = d0 + d1 z −1 + d2 z −2 + . . . + dnd z −nd
I Multiplying the model equation by 4Ej (z −1 )z j :
Ej (z −1 )Ã(z −1 )y (t + j) = Ej (z −1 )B(z −1 ) 4 u(t + j − 1)
+ Ej (z −1 )D(z −1 ) 4 v (t + j) + Ej (z −1 )e(t + j)
I By using the Diophantine equation, and after some
manipulation, we get:
y (t + j) = Fj (z −1 )y (t) + Ej (z −1 )B(z −1 ) 4 u(t + j − 1)
+ Ej (z −1 )D(z −1 ) 4 v (t + j) + Ej (z −1 )e(t + j)
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Applying the expectation operator and considering that


E [e(t)] = 0, the expected value for y (t + j) is given by:
ŷ (t + j|t) = E [y (t + j)] = Fj (z −1 )y (t) + Ej (z −1 )B(z −1 ) 4 u(t + j − 1)
+ Ej (z −1 )D(z −1 ) 4 v (t + j)

I By making Ej (z −1 )D(z −1 ) = Hj (z −1 ) + z −j Hj0 (z −1 ), with


δ(Hj (z −1 )) = j − 1, the prediction equation can now be
written as:

ŷ (t + j|t) = Gj (z −1 ) 4 u(t + j − 1) + Hj (z −1 ) 4 v (t + j)
+Gj0 (z −1 ) 4 u(t − 1) + Hj0 (z −1 ) 4 v (t) + Fj (z −1 )y (t) (8)
I Which can be rewritten as

ŷ (t + j|t) = Gj (z −1 ) 4 u(t + j − 1) + Hj (z −1 ) 4 v (t + j) + fj

with fj = Gj0 (z −1 ) 4 u(t − 1) + Hj0 (z −1 ) 4 v (t) + Fj (z −1 )y (t).


E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Let us now consider a set of N j ahead predictions:

ŷ (t + 1|t) = G1 (z −1 ) 4 u(t) + Hj (z −1 ) 4 v (t + 1) + f1
ŷ (t + 2|t) = G2 (z −1 ) 4 u(t + 1) + Hj (z −1 ) 4 v (t + 2) + f2
..
.
ŷ (t + N|t) = GN (z −1 ) 4 u(t + N − 1) + Hj (z −1 ) 4 v (t + N) + fN

E.F. Camacho Academic MPCs


Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I Because of the recursive properties of the Ej polynomial, these


expressions can be rewritten as
 
 ŷ (t + 1|t)  g0 0 ··· 0 ··· 0  
 g1 g0 ··· 0 ··· 0  4u(t)
 ŷ (t + 2|t)    4u(t + 1) 
   . . .. . . .  
 .   . . . . .  . 
 .   . . . . . .  . 
    
 . =  . 
 ŷ (t + j|t)   .  
   .  4u(t + j − 1) 
   gj−1 gj−2 ··· g0 . 0  
 .    . 
 .   . . . . .  . 
.  . . . . .. .  .
 . . . . . . 
ŷ (t + N|t) 4u(t + N − 1)
gN−1 gN−2 ··· ··· ··· g0
 
h0 0 ··· 0 ··· 0    f 
 h1 h0 ··· 0 ··· 0  4v (t + 1) 1
  4v (t + 2)   f2 
 . . .. . . .    
 . . . . .  .   . 
 . . . . . .  .   . 
    . 
  . + 
+ .    fj 
 .  4v (t + j − 1)
 hj−1 ··· h1 h0 . 0    
  .   . 
  .
 
  .

 .
.
.
.
.
.
.
..
.
..
.
.  . .

 . . . . 
4v (t + N) fN
hN−1 ··· ··· ··· h1 h0

Pj
where Hj (z −1 ) = i=1 hi z −i and hi are the coefficients of
the system step response to the disturbance.
E.F. Camacho Academic MPCs
Outline
The white noise case
Overview
The Coloured Noise Case
State Space based MPC
An Example
Linear Quadratic Regulator
Measurable Disturbances
Generalized Predictive Control

I By making f 0 = Hv + f, the prediction equation is now

y = Gu + f 0

I The control moves are computed as

u = (GT G + λI)−1 GT (w − f 0 )

I The disturbances measures enters in V


I Notice that the predicted values of the disturbances are
needed.
I Known in some cases (trajectories, batch processes, ...)
I in other cases it can be predicted (target following, electric
load forecast, ...)
I it can be considered that it will keep as the last reading, or as
the expected value, ...

E.F. Camacho Academic MPCs

You might also like