introduction to model predictive...
TRANSCRIPT
![Page 1: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/1.jpg)
Introduction to Model Predictive ControlRiccardo ScattoliniRiccardo ScattoliniDipartimento di Elettronica e Informazione
![Page 2: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/2.jpg)
2Finite horizon optimal control
Consider the system
At time k we want to compute the sequence of future controlAt time k we want to compute the sequence of future control variables
minimizing the performance index
where
Riccardo Scattolini Dip. di Elettronica e Informazione
and N is the so-called prediction horizon
![Page 3: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/3.jpg)
3Finite horizon (FH) optimal controlclosed-loop solution
The optimal solution is given by the state-feedback control law
where the gain K(i) is
and P(i) is the solution of the difference Riccati equation ( ) q
with initial condition
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 4: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/4.jpg)
4Infinite horizon (IH) LQ control
Consider the IH performance index
If the pair (A B) is reachable and the pair (A C) is observableIf the pair (A,B) is reachable and the pair (A,C) is observable,the optimal control law is
where
P is the unique positive definite solution of the algebraic Riccati equationRiccati equation
Riccardo Scattolini Dip. di Elettronica e Informazione
and the closed-loop system is asymptotically stable
![Page 5: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/5.jpg)
5Finite horizon (FH) optimal controlopen-loop solution - 1
Recall the Lagrange equation
and define
Then the future state variables are given by
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 6: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/6.jpg)
6Finite horizon (FH) optimal controlopen-loop solution - 2
Moreover define
and note that the problem consists of minimizing with respect toand note that the problem consists of minimizing with respect toU(k) the performance index
where with respect to the original cost function the termwhere, with respect to the original cost function, the termhas been ignored
hi h d t d d U(k)
Riccardo Scattolini Dip. di Elettronica e Informazione
which does not depend on U(k)
![Page 7: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/7.jpg)
7Finite horizon (FH) optimal controlopen-loop solution - 3
The performance index is a quadratic function of U(k)
It’s minimum easily turns out to be
which is the sequence of future control variables computed at k.
Riccardo Scattolini Dip. di Elettronica e Informazione
which is the sequence of future control variables computed at k.
![Page 8: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/8.jpg)
8Finite horizon (FH) optimal controlopen-loop solution - 4
Note that, letting
The optimal sequence of future control moves isp q
or equivalentlyor equivalently
Riccardo Scattolini Dip. di Elettronica e Informazione
which is an open-loop solution for i>0
![Page 9: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/9.jpg)
9
Comments
In the nominal case, the closed-loop solution
and the open-loop one
coincide
The open-loop solution has been computed by showing p p p y gthat the future states depend on
1. The current state x(k), known at time k
Riccardo Scattolini Dip. di Elettronica e Informazione
2. The future values U(k) of the control variables
![Page 10: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/10.jpg)
10
Constrained problems - 1What happens when there are constraints on the control and/or state variables? Consider for example classical saturations due to actuators (row-by-row inequalities)
The closed-loop solution is not available, while lettingp , g
while the open-loop one can be reformulated as a mathematical programming problem
Riccardo Scattolini Dip. di Elettronica e Informazione
p g g p
![Page 11: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/11.jpg)
11
Constrained problems - 2
Performance index to be minimized with respect to U(k)
with constraints
This problem can be easily solved by means of a QPThis problem can be easily solved by means of a QPmethod with reduced computational time (which obviously depends on the size)
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 12: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/12.jpg)
12The Receding Horizon (RH) principle - 1
In any case (open- or closed-loop solutions) at time k the sequence of optimal control valuessequence of optimal control values
is computed over the prediction horizon. This is a time-varying control law defined over a finite horizon. How to bt i ti i i t t l l ?obtain a time-invariant control law?
The Receding Horizon (moving horizon) principle: at anyThe Receding Horizon (moving horizon) principle: at any time k solve the optimization problem over the prediction horizon [k,k+N] and apply only the first input uo(k) of thehorizon [k,k N] and apply only the first input u (k) of the optimal sequence Uo(k). At time k+1 repeat the optimization over the prediction horizon [k,k+N+1]
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 13: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/13.jpg)
13Receding Horizon
past future
predicted state
future control moves
k K+N
K+1K+N+1
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 14: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/14.jpg)
14The RH control law
The RH principle allows one to obtain the state-feedback time-invariant control law
For constrained systems this is implicitly defined, while inFor constrained systems this is implicitly defined, while in the unconstrained case it coincides with the first element of the open-loop solution
and with the first element of the closed loop solutionand with the first element of the closed-loop solution
obtained by iterating the Riccati equation backwards from
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 15: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/15.jpg)
15RH and stability
It is not a-priori guaranteed that the RH control law stabilizes the closed-loop. Consider the systemp y
and the performance indexand the performance index
Thereforeandand
Riccardo Scattolini Dip. di Elettronica e Informazione
Stability is achieved only for N>2
![Page 16: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/16.jpg)
16Reference signals and disturbances - 1
Consider the system with disturbances
and the cost function penalizing the tracking error withand the cost function penalizing the tracking error with respect to the reference signal yo
Again, define
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 17: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/17.jpg)
17Reference signals and disturbances - 2
Then, the future outputs are
and the problem is equivalent to minimize the cost functionand the problem is equivalent to minimize the cost function
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 18: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/18.jpg)
18Reference signals and disturbances - 3
In the unconstrained case the optimal solution is
which depends on the future reference signals Yo(k) and on the future disturbances D(k). For this reason, MPC can “anticipate” future reference variations or the effect of known disturbances.When the future disturbance is unknown, it is a common practice to set
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 19: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/19.jpg)
19
Comments - 1
Concerning the RH control law obtained from
In all the considered cases the state x(k) has been assumed to be measurable. Otherwise an observer can b d l t ti t th di t b d(k)be used, also to estimate the disturbance d(k).No integral action has been forced in the feedback control law so that (provided that closed loop stabilitycontrol law, so that (provided that closed-loop stability can be assumed), no steady state zero error regulation can be achieved for constant reference signal.can be achieved for constant reference signal.
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 20: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/20.jpg)
20
Comments - 2For constant reference signals , assuming that there exists a pair such that p
a more significant performance index is
which penalizes the control deviation with respect to the desired equilibrium point.desired equilibrium point.Note also that these performance indices do not penalize the state, so that a observability (detectability) assumption is
Riccardo Scattolini Dip. di Elettronica e Informazione
, y ( y) padvisable.
![Page 21: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/21.jpg)
21Insertion of anintegral action - 1
It is a common practice in MPC to plug an integral action at the inputs
Process
I t tIntegrators
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 22: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/22.jpg)
22A tricky problem withthe integral action - 1
System + integrators (no disturbances)
Performance index with tracking error and control variationsg
Unconstrained case: the RH control law is linearUnconstrained case: the RH control law is linear
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 23: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/23.jpg)
23A tricky problem withthe integral action - 1
Yo
Ky+
-++δu u P x1
z-1v
y
Kv
- - z 1
v
Kx
The integrator disappears due to the feedback term on vThe integrator disappears due to the feedback term on v
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 24: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/24.jpg)
24A tricky problem withthe integral action - 2
If an observer is used to estimate also the state of the integrator (a-priori known) the integral action is preservedintegrator (a-priori known), the integral action is preserved
Yo
Ky+
-δu u P yz
z-1
x
Kx Kv Observerv
This problem can be avoided with other formulations of MPC
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 25: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/25.jpg)
25An alternativeformulation - 1
Consider the system
and write it as
or
and in final form with integral action
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 26: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/26.jpg)
26An alternativeformulation - 2
For the system
it is possible again to consider the performance index
In the unconstrained case and with proper redefinitions, the solution issolution is
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 27: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/27.jpg)
27An alternativeformulation - 3
In view of the system structure, for constant reference signals yo
Then, letting
the unconstrained control law takes the form
Riccardo Scattolini Dip. di Elettronica e Informazione
which clearly has an integral action on the error signal e(k)
![Page 28: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/28.jpg)
28An alternativeformulation - 4
yo+
-δu u P yz
z-1-Ke+
Kx
- z 1e
δxx
In steady-state conditions δx=0 so that δu=0 only for e=0In steady state conditions δx 0, so that δu 0 only for e 0
Riccardo Scattolini Dip. di Elettronica e Informazione
![Page 29: Introduction to Model Predictive Controlusers.dimi.uniud.it/~franco.blanchini/scuolasidra09/Ch3_Intro_MPC.pdfFinite horizon (FH) optimal control 3 closed-loop solution The optimal](https://reader034.vdocument.in/reader034/viewer/2022051805/5ff9eaa51121ae18b92e26e3/html5/thumbnails/29.jpg)
29References
BooksR.R. Bitmead, M. Gevers, W. Wertz: “Adaptive optimal control – the thinking
man’s GPC” Prentice Hall 1990man s GPC , Prentice Hall, 1990.R. Soeterboek: “Predictive control: a unified approach”, Prentice Hall, 1992. J. Maciejowski: “Predictive control with constraints”, Prentice Hall, 2002.J A Rossiter: “Model based predictive control: a practical approach” CRC PressJ.A. Rossiter: Model based predictive control: a practical approach , CRC Press,
2003.E.F. Camacho, C. Bordons: “Model predictive control”, Springer, 2004.
Survey papersC.E. Garcia, D.M. Prett, M. Morari: “Model predictive control: theory and practice
– a survey”, Automatica, Vol. 25, n. 3, pp. 335-348, 1989.M M i J H L “M d l di ti t l t t d f t ”M. Morari, J. H. Lee: “Model predictive control: past, present and future”,
Computers and Chemical Engineering, Vol. 23, n. 4-5, pp. 667-682, 1999.D.Q. Mayne, J.B. Rawlings, C.V. Rao, P.O. Scokaert: “Constrained model
predictive control: stability and optimality”, Automatica, Vol. 36, pp. 789-814, p y p y , , , pp ,2000.
J.B. Rawlings: “Tutorial overview of model predictive control”, IEEE Control Systems Magazine, Vol. 20, n.3, pp. 38-52, 2000.
Riccardo Scattolini Dip. di Elettronica e Informazione