You are on page 1of 94

j zcc by A.

8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Model Predlctlve Control: 8uslc Concets
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
Model Predlctlve Control (MPC)
z
! !"#$% #$ %&' ()#*'++ ,+ -+'. %# &'$#()* %&' $-%-)' '/#0-%,#1
#$ %&' ()#*'++ %# #(%,2,3' %&' )"+*'"% +,4150
rocess
modelbused
otlmlzer
reference outut
lnut
meusurements
r(t)
u(t) y(t)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
Recedlng horlzon hllosohy

Cnly uly the frst otlmul move


Predlcted oututs
Munluluted
lnuts
t
t
tN
u
tk
r(t)
t tz tN
At tlme t: Cet new meusurements, reeut the otlmlzutlon. And so on .

Advuntuge of reeuted onllne otlmlzutlon: !""#$%&'(
y
tk
At tlme t: solve un )*+,-./ 1)2+3)/
roblem over u fnlte future horlzon
of N stes:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Recedlng Eorlzon Lxumles
MPC ls llke */.4,25 16788 !
"Rolllng horlzon' ollcles ure
ulso used frequently ,2 92.217
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

: *37;,1+,)2 -);7/
: 1)8+ <=21+,)2
: 1)28+3.,2+8
: 3717;,25 6)3,>)2 -716.2,8-
how vehlcle moves on the mu
mlnlmum tlme,
mlnlmum dlstunce, etc.
drlve on rouds, resect onewuy rouds, etc.
eventbused
(otlmul route relunned when uth ls lost)
: ;,8+=3?.2178 mulnly drlver's lnuttentlon !
: 87+ *),2+ deslred locutlon
x = CPS osltlon
u = nuvlgutlon communds
Fastest route
Shortest route
Avoid motorways
Walking route
Bicycle route
Limited speed
Recedlng Eorlzon Lxumles
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
Cood Models for (MPC) Control
6
#7813,*+,@7 enough to cuture the most slgnlfcunt
dynumlcs of the system
A,-*/7 enough for solvlng the otlmlzutlon roblem
C
D
%
#
"

E
!
!
-./0$ $1$'2*3(+4 /5 5(!&%$ /5 &"55(6%$7 68* +"* 5(!&%$'9:
Albert Llnsteln
B)+7: comututlonul comlexlty und theoretlcul roertles (e.g.
stublllty) deend on chosen modeljobjectlvejconstrulnts
Cood models for MPC:
!/=,; 1.+./4+,1 13.1F,25 (lCC) ls
the most lmortunt converslon
rocess used ln etroleum
refnerles. lt ls wldely used to
convert the hlghbolllng
hydrocurbon fructlons of
etroleum crude olls to more
vuluuble gusollne, olefnlc guses
und other roducts
(htt:jjen.wlkledlu.orgjwlkljCutulytlc_crucklng)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
MPC ln lndustry
Elstory: Comuter control ("Munuul' MPC)
lluld cutulytlc crucklng
(courtesy of Shell j M. Morurl)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
MPC ln lndustry
8
Present lndustrlul Pructlce
llneur lmulsejste resonse models
sum of squured errors
objectlve functlon
executed ln suervlsory mode
Purtlculurly sulted for roblems wlth
muny lnuts und oututs
construlnts on lnuts, oututs, stutes
vurylng objectlves und llmlts on vurlubles
(e.g. becuuse of fuults)
Elstory: , Lynumlc Mutrlx Control (LMC) by Shell
(Motlvutlon: multlvurluble, construlned)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
MPC ln lndustry

(Qln, 8udgewell, ,)
Elerurchy of control system functlons:
&)2@72+,)2./ GH&
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
MPC ln lndustry
c
(Qln, 8udgewell, zcc)
"lor us multlvurluble control ls redlctlve control '
1urlq Sumud, 6#1'78'00 (lLLL Control System Soclety, Presldent) (,)
(snushot survey conducted ln mld)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
MPC ln lndustry

Results from u recent survey (November ,, zcc) ubout the use of MPC technlques j
reultlme otlmlzutlon ln u set of US lndustrles:
courtesy:
#)78 4)=3 1)-*.24 =87 GH& I
,c 6c c c c zc c c
.8
.z
.c
Sometlmes
Routlnely
No
#) 4)= 877 4)=3 =87 )< GH& .117/73.+,25J
8+.4,25 1)28+.2+J )3 ;71/,2,25I
cc 8c 6c c zc c
6.8
z8.8
lncreuslng
Constunt
Lecreuslng
c z zc c c
Refnlng
Chemlculs
Cll & Cus
Cther
Pul & Puer
Power
Llectronlcs
Plustlcs & Rubber
Metuls
Cement & Cluss
Mlnlng
Automotlve
Aerosuce
lood & 8everuge
Muchlnery
Phurmuceutlculs
z.
zc.6
.
.c
.
.
.
z.
z.z
z.z
.
.
c.,
c.,
c.,
c.,
K2;=8+3,./ .37. )< 378*)2;72+8 +) +67 8=3@74L
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
Model Predlctlve Control 1oolbox
Model Predlctlve Control 1oolbox
z
GH& C))/?)M NOP (8emorud, Rlcker, Morurl, 8toduy):
- Cbjectorlented lmlementutlon (MPC object)
- MPC Slmullnk Llbrury
- MPC Cruhlcul User lnterfuce
- R1v extenslon (code generutlon)
[xPC 1urget, dSuce, etc.|
- Llnked to CPC 1oolbox vz.c.
Cnly llneur models ure hundled
http://www.mathworks.com/products/mpc/
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

MPC Slmullnk Llbrury
Slngle MPC und multlle swlcthed MPC blocks suorted
Referencejdlsturbunce revlew und tlmevurylng llmlts suorted
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

MPC Cruhlcul User lnterfuce
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

MPC 1unlng Advlsor
Eybrld models: deslgn, slmulutlon, verlfcutlon
Control deslgn for llneur systems wj construlnts
und hybrld systems (onllne otlmlzutlon vlu QPjMlLPjMlQP)
Lxllclt MPC control (vlu multlurumetrlc rogrummlng)
Ccode generutlon
Slmullnk llbrury
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
Eybrld 1oolbox for MA1LA8
6
!7.+=378L
(8emorud, zcczcc)
http://www.dii.unisi.it/hybrid/toolbox
QRSPT ;)U2/).; 37V=78+8
8,217 E1+)?73 QPPR
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
8uslcs of Construlned Ctlmlzutlon
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8
Muthemutlcul Progrummlng
ln generul, roblem ls dlmcult to solve
=87 8)<+U.37 +))/8
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Ctlmlzutlon Softwure
http://www-fp.mcs.anl.gov/otc/Guide/SoftwareGuide/
1uxonomy of most known solvers, for dlerent clusses of
otlmlzutlon roblems:
Network Lnubled Ctlmlzutlon Server (NLCS) for remotely
solvlng otlmlzutlon roblems:
http://neos.mcs.anl.gov/neos/solvers/
http://www.coin-or.org/
Cood oensource otlmlzutlon softwure
http://plato.la.asu.edu/bench.html
Comurlson on benchmurk roblems:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
zc
Convex sets
Convex set
Nonconvex set
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z
Convex functlon
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
zz
Convex Ctlmlzutlon Problem
very emclent numerlcul ulgorlthms exlst
Clobul solutlon uttulned
Lxtenslve useful theory
Cften occurrlng ln englneerlng roblems
1ructuble ln theory und ructlce
f und C convex
Lxcellent reference textbook: "Convex Ctlmlzutlon' by S. 8oyd
und L. vundenberghe http://www.stanford.edu/~boyd/cvxbook/
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z
A convex olyhedron ls the lntersectlon of u fnlte
set of hulfsuces of R
d
A convex olytoe ls u bounded convex olyhedron
Polyhedru
A
x
=
b

A
z
x
=
b z

A

x=b


Eyerlune reresentutlon:
A
z
A

j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z
Llneur Progrum
Stundurd form:
f
f'x
Sluck vurlubles
W7)357 #.2+>,5
XYZYR : QPPS[
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z
Llneur Progrum
trusformutlon
from mux to mln:
Chunge lnequullty
dlrectlon:
lt ls ulwuys osslble to formulute LP roblems
uslng "-,2' und "!' lnequulltles
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z6
Quudrutlc Progrum
Convex otlmlzutlon lf P " c

Eurd roblem lf P ! c
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z,
Mlxedlnteger Llneur Progrum
Some vurlubles ure contlnuous, some ure dlscrete (cj)
ln generul, lt ls u NPhurd roblem
Rlch vurlety of ulgorlthmsjsolvers uvulluble
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z8
Modellng lunguuges
GEA"\, ussocluted wlth commerclul uckuge ressMP
EH\ (Ctlmlzutlon Progrummlng Lunguuge), ussocluted wlth
commerclul uckuge llogCPLL
%GH\ (A Modellng Lunguuge for Muthemutlcul Progrummlng)
most used modellng lunguuge, suorts severul solvers
W%GA (Cenerul Algebrulc Modellng System) ls one of the frst
modellng lunguuges
\KBWE, modellng lunguuge of Llndo Systems lnc.
WB] G.+6H3)5, u subset of AMPL ussocluted wlth the
$)'' uckuge CLPl (CNU Llneur Progrummlng llt)
^ !\EH&TT #('1 +#-)*' modellng lunguuge (C cluss llbrury)
^ &_` mutlubbused modellng lunguuge (from Stunford)
^ a%\GKH unother mutlubbused modellng lunguuge
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z
Llneur MPC
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
Unconstrulned Ctlmul Control
Llneur model:
Coul: fnd thut mlnlmlze
ls the lnut sequence thut steers the
stute to the orlgln "otlmully'
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
[comututlon of cost functlon|
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
Unconstrulned Ctlmul Control
?.+16 /7.8+
8V=.378
Alternutlve urouch: use dynumlc rogrummlng to fnd U*
1he otlmum ls obtulned by zerolng the grudlent
und hence
(Rlccutl lterutlons)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Construlned Ctlmul Control
Llneur model:
Construlned Ctlmul Control
Construlned otlmul control roblem (quudrutlc erformunce lndex):
Construlnts:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Construlned Ctlmul Control
&)2@7M b]%#D%CK& HDEWD%G XbH[
(quudrutlc)
(llneur)
Ctlmlzutlon roblem:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Llneur MPC Algorlthm
Predlcted
oututs
Munluluted
79%:;<%=
lnuts
% %:>
%:?
future ust
-9%:;=
Aly only und dlscurd the remulnlng otlmul lnuts
Solve the QP roblem
und let U={u
*
(0),...,u
*
(N-1)] be the solutlon
(=fnltehorlzon construlned oenloo otlmul control)
Reeut otlmlzutlon ut tlme t. And so on ...
Cetjestlmute the current stute x(t)
At tlme t:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6
Unconstrulned Llneur MPC
Unconstrulned llneur MPC ls nothlng else thun u stundurd
llneur stutefeedbuck luw !
Predlcted oututs
Munluluted
lnuts
t
t
tN
u
tk
r(t)
y
tk
Solutlon:
Assume no construlnts
Problem to solve onllne:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
Louble lntegrutor Lxumle
System:
Construlnts:
Control objectlve: mln
Ctlmlzutlon roblem mutrlces:
8.-*/,25 T cEd
C
8
eY 8
cost:
construlnts:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8
Louble lntegrutor Lxumle
go to demo jdemos/linear/doubleint.m
see ulso mpcdoubleint.m
(Eyb1bx)
(MPC1bx)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Louble lntegrutor Lxumle
Add u stute construlnt:
Ctlmlzutlon roblem mutrlces:
cost:
construlnts:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
c
Louble lntegrutor Lxumle
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Llneur MPC 1rucklng
Lxtended system: let x
u
(t)=u(t)
Aguln u llneur system wlth stutes x(t), x
u
(t) und lnut !u(t)
ldeu: urumeterlze the roblem uslng lnut lncrements
Cbjectlve: muke the outut y(t) truck u reference slgnul r(t)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z
Note:
Llneur MPC 1rucklng
Convex
Quudrutlc
Progrum (QP)
Ctlmlzutlon roblem:
Ctlmul control roblem (quudrutlc erformunce lndex):
sume formulutlon us before (W=Cholesky fuctor of welght mutrlx Q)
otlmlzutlon
vector:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Llneur MPC Lxumle
Plunt:
Model:
go to demo linear/example3.m (Eyb1bx)
Sumllng tlme:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Llneur MPC Lxumle
Performunce lndex:
Closedloo MPC:
go to demo linear/example3.m (Eyb1bx)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Llneur MPC Lxumle
Construlnt c.8 ! u(t) ! .z (umlltude)
Construlnt c.z ! !u(t) ! c.z (slewrute)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6
Antlclutlve Actlon
Reference not known ln udvunce
(cuusul):
@ luture reference sumles (urtlully)
known ln udvunce (untlclutlng uctlon):
go to demo mpcpreview.m
(MPC1bx)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
Meusured und Unmeusured Llsturbunces
Llneur model
for MPC
otlmlzutlon
(n
d
(k) = whlte Cuusslun nolse, n
d
(tk|t)=c over the redlctlon horlzon)
Plunt
Model
Cututs
79;=
Munluluted vurlubles
-9;=
Unmeusured
Llsturbunces
.9;=
Meusured Llsturbunces
/9;=
A9;=
#,8+=3?.217
G);7/
1
.
9;=
A 9;=
.
more detulls ubout dlsturbunce models luter on .
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8
Soft Construlnts
1o revent QP lnfeuslblllty, relux outut construlnts:
lnfeuslblllty cun be due to:
- modellng errors
- dlsturbunces
- wrong MPC setu (e.g., redlctlon horlzon ls too short)
! = "unlc' vurluble
V
mln
, V
mux
= vectors wlth entrles #c (the lurger the entry, the
relutlvely softer the corresondlng construlnt)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Leluys - Method
Llneur model wj deluys:
Mu deluys to oles ln z=c:
Aly MPC to the extended system
u(t) = f
MPC
( x(t +))
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
c
Leluys - Method z
Llneur model wj deluys:
Leluyfree model:
Leslgn MPC for deluyfree model:
Comute the redlcted stute
Comute MPC uctlon uccordlngly:
lor better closedloo erformunce
one cun redlct x(t") wlth u much
more comlex model thun (A,8,C) !
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
MPC vs. Conventlonul Control
Slngle lnutjslngle outut control loo wj construlnts:

equlvulent erformunce cun be obtulned wlth other
slmler control technlques (e.g.: PlL untlwlndu)
MPC ullows (ln rlnclle) UNllCRMl1Y
(l.e. sume technlque for wlde runge of roblems)
- reduce trulnlng
- reduce cost
- eusler deslgn mulntenunce
ECvLvLR
Sutlsfylng control secs und wulklng on wuter ls slmllur .
both ure not dlmcult lf frozen !
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z
MPC leutures
Multlvurluble construlned "nonsquure' systems
(l.e. #lnuts und #oututs ure dlerent)
@ Leluy comensutlon
@ Antlclutlve uctlon for future reference chunges
@ "lntegrul uctlon', l.e. no oset for stellke lnuts
Substuntlul onllne comututlon
lor slmle smulljfust systems other technlques domlnute
(e.g. PlL untlwlndu)
Prlce to uy:
New osslbllltles for MPC: exllclt lecewlse llneur forms
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

MPC 1heory
Elstorlcul Coul: Lxluln the success of LMC
@ Present Coul: lmrove, slmllfy, und extend lndustrlul ulgorlthms
@ Areus:
Llneur MPC: llneur model
Nonllneur MPC: nonllneur model
Robust MPC: uncertuln (llneur) model
Eybrld MPCB model lntegrutlng loglc, dynumlcs,
und construlnts
@ lssues:
f leuslblllty
f Stublllty (Convergence)
f Comututlons
(Muyne, Ruwllngs, Ruo, Scokuert, zccc)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

N=$ lnfnlte number of construlnts !
leuslblllty
!7.8,?,/,+4: Cuuruntee thut the QP roblem ls feuslble ut ull sumllng tlmes t
Muxlmum outut udmlsslble set theory: N<$ ls enough
vhen N<$ there ls no guuruntee thut the QP roblem
wlll remuln feuslble ut ull future tlme stes t
b]%#D%CK&
HDEWD%G XbH[
(Cllbert, 1un, CDDD E!FG), (lerrlgun, Muclejowskl,FHFGzccc),
(Chmlelewskl, Munouslouthukls, I7+J F#1%J K'%%')+, 6)
lnut construlnts only: no feuslblllty lssues !
Eurd outut construlnts:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Stublllty
Stublllty ls u comlex functlon of the MPC urumeters
N, Q, R, P, u
min
, u
max
, y
min
, y
max
A+.?,/,+4 1)28+3.,2+8 und welghts on the termlnul stute cun be lmosed over
the redlctlon horlzon to ensure stublllty of MPC
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6
Convergence Result
(leerthl und Cllbert, 88)(8emorud '% 50., )
Proof: Use vulue functlon us Lyuunov functlon
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
Convergence Proof
W/)?./ )*+,-=- ,8 2)+ 277;7; +) *3)@7 1)2@7357217 (
Lyuunov functlon
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8
Convergence Result (u llttle more generul)
(leerthl und Cllbert, 88)(8emorud '% 50., )
Proof: Use vulue functlon us Lyuunov functlon
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

Convergence Proof
W/)?./ )*+,-=- ,8 2)+ 277;7; +) *3)@7 1)2@7357217 (
Lyuunov functlon
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6c
Convergence Proof
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6
Convergence Proof
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6z
Stublllty Construlnts
. No construlnt, lnfnlte outut horlzon:
(leerthl und Cllbert, 88) (Ruwllngs und Muske, )
. Reluxed termlnul construlnt:
z. Lndolnt construlnt:
(lwon und Peurson, ,,) (leerthl und Cllbert, 88)
. Contructlon construlnt:
(Scokuert und Ruwllngs, 6)
All the roofs ln (,z,) use the vulue functlon
us u Lyuunov functlon
(Poluk und Yung, ) (8emorud, 8)
V (t) = min
U
J(U, t)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6
Predlcted und Actuul 1rujectorles
Lven ussumlng erfect model & no dlsturbunces:
*37;,1+7; oenloo trujectorles muy be
dlerent from .1+=./ closedloo
trujectorles
Seclul cuse: for ,292,+7 6)3,>)2, oenloo trujectorles und losedloo
trujectorles colnclde. 1hls follows by 8ellmun's rlnclle of otlmullty.
D,16.3; $7//-.2
XYZQP : YZgR[
c t
x(t)
x
*
(t|t)
t+N
=x(tz)
x
*
(tz|t)
=x(t)
x
*
(tz|t)
0 "
0
"
otlmul stute x
*
(t)
otlmul lnut u
*
(t)
x
*
(t)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6
lnut und Cutut Eorlzons
lnut horlzon N
u
cun be shorter thun outut horlzon N

N
u
<N = less degrees of freedom, und hence:
- Loss of erformunce
- Lecreused comututlon tlme (QP ls smuller)
- leuslblllty stlll mulntulned (construlnts ure stlll checked u to N)
tylcully N
u
=c
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6
MPC und LQR
Conslder the MPC control luw:
h.1)*) !3.21781)
D,11.+, XYiji : YjSR[
X]21)28+3.,27;[ GH& e \bD
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
66
MPC und LQR
Conslder the MPC control luw:
ln u olyhedrul reglon uround the orlgln the MPC control luw ls equlvulent to
the construlned LQR controller wlth welghts Q,R
1he lurger the horlzon, the lurger the reglon where MPC=LQR
(Chmlelewskl, Munouslouthukls, 6)
(Scokuert und Ruwllngs, 8)
h.1)*) !3.21781)
D,11.+, XYiji : YjSR[
GH& e 1)28+3.,27; \bD
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6,
Louble lntegrutor Lxumle
System:
Construlnts:
Control objectlve: mln
Ctlmlzutlon roblem
8.-*/,25 T cEd
C
8
eY 8
(cost functlon wus normullzed by
mux svd(E))
solutlon of ulgebrulc Rlccutl equutlon
LQ guln
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
68
Lxumle: Al1l6
Llneurlzed model:
afti16.m
go to demo jdemos/linear/afti16.m
(Eyb1bx)
(MPC1bx)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
6
Lxumle: Al1l6
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,c
Lxumle: Al1l6
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
Lxumle: Al1l6
UNS1A8LL !!!
Unconstrulned MPC
uctuutor suturutlon z
o
(=llneur controller, % LQR)
Suturutlon needs to be consldered ln the control deslgn !
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,z
Suturutlon
Suturutlon needs to be consldered ln the control deslgn
llneur
controller
lunt
sut
u
v=Kx
x
MPC tukes lt lnto uccount uutomutlcully (und otlmully)
MPC
controller
lunt
sut
u
v=f(x)=u
x
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
1unlng Culdellnes
^ k7,56+8: the lurger the rutlo W
y
#W
!u
the more uggresslve the controller
^ K2*=+ 6)3,>)2: the lurger N
u
, the more "otlmul' but the more comlex the controller
^ E=+*=+ 6)3,>)2: the smuller N, the more uggresslve the controller
^
\,-,+8: controller less uggresslve lf $u
mln
, $u
mux
ure smull
Alwuys try to set N
u
us smull us osslble !
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
Scullng
Eumuns thlnk lnfnlte reclslon ...
Comuters do not !
Numerlcul dlmcultles muy urlse lf vurlubles ussume very smull or very lurge vulues
"M.-*/7L y

& [e,e| (v)
y
z
& [e,e| (Pu)
use lnsteud: y

& [c.,c.| (mv)
y
z
& [c,c| (kPu)
ldeully ull vurlubles should runge ln [,|. lor exumle, one cun reluce y
wlth yjy
mux
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
Cbserver Leslgn ln MPC
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,6
Cbserver Leslgn for MPC
Plunt
Cbserver
Ctlmlzer
Reference
U7 277; +) =87 . 8+.+7 )?873@73
lull stute x(t) muy not be uvulluble
Lven lf uvulluble, nolse should be fltered out
Stute of redlctlon model muy be dlerent from lunt model x(t)
(e.g.: model reductlon, ldentlfcutlon)
r(t)
meusured
oututs
stute estlmute
u(t) y(t)
x(t)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,,
Model for Cbserver Leslgn
meusurement nolse model
m(k)
y
u
(k)
y
m
(k)
u(k)
v(k)
d(k)
Plunt
model
Cvs (Controlled vurlubles)
Mvs (Munluluted vurlubles)
UMLs
(Unmeusured
Llsturbunces)
MLs (Meusured Llsturbunces)
]2-7.8=37;
;,8+=3?.217
-);7/
G7.8=37-72+
2),87
-);7/


MCs
(Meusured Cututs)
(Unmeusured
Cututs)
whlte nolse
lnnovutlons
whlte nolse
lnnovutlons
n
m
(k)
n
d
(k)
Note: meus. nolse model not needed for otlmlzutlon !
unmeusured dlsturbunce model
z
m
(k)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,8
Cbserver Leslgn
Meusurement udute
1lme udute
NC1L: 87*.3.+,)2 *3,21,*/7 holds ! (under certuln ussumtlons)
(Muske, Meudows, Ruwllngs, ACC)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
,
lulmun lllter Leslgn
lull model for deslgnlng observer guln M
n
d
(k): reresents source for modellng errors
n
m
(k): reresents source for meusurement nolse
n
u
(k): whlte nolse on ull lnuts u udded for solvublllty of the Rlccutl equutlon
D=;)/< "-,/
'./-.2
XYZNP : [
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8c
lntegrul Actlon ln MPC
(und not only ln MPC)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8
Cutut lntegrutors
lntroduce outut lntegrutors us uddltlonul dlsturbunce models
Under certuln condltlons, observer controller rovlde >73) )l87+ ln
steudystute
Plunt
model
]2-7.8=37;
;,8+=3?.217
-);7/
G7.8=37-72+
2),87
-);7/


whlte nolse
lnnovutlons
whlte nolse
lnnovutlons
E=+*=+
K2+753.+)38

whlte nolse
lnnovutlons

n
i
(k)
m(k)
y
u
(k)
y
m
(k)
u(k)
v(k)
d(k)
n
m
(k)
n
d
(k)
z
m
(k)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8z
lntegrutors und SteudyStute Csets
y
u
(k)
u(k)
v(k)
d(k)
Plunt
model
E=+*=+
K2+753.+)38

whlte nolse
lnnovutlons

n
i
(k)
y
m
(k)
D
dm
More generully, udd lntegrutors on stutes oututs:
Use the ubove model meus.nolse model to deslgn un observer
(e.g. lulmun flter)
D
dm
d(k)
Muln ldeu: observer mukes
' the comblnutlon mukes
MPC mukes
(estlmutlon error)
(redlcted trucklng error)
(uctuul trucklng error)
Lxlunutlon: comensutes model mlsmutch ln steudystute
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8
K;7.: udd lntegruls of meusured oututs us uddltlonul stutes (slmllur to llneur
stutefeedbuck cuse)
Lxtended redlctlon model:
lmlementutlon:
Lrror feedbuck
(lwukernuuk, ,z)
Lxlunutlon: lf closedloo usymtotlcully stuble ' q(k) ( cost.
und hence y(k) ( r(k)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8
ldeu: Aly MPC us the setolnt generutor to llneur feedbuck loos
(e.g.: PlL)
Reference Covernor
(8emorud, ,)
Locul feedbuck deslgned for stublllty, dlsturbunce uttenuutlon, good trucklng,
8,%&#-% %5;,14 *5)' #$ *#1+%)5,1%+
Actuul reference w(t) generuted onllne by un MPC ulgorlthm %# %5;' *5)' #$ *#1+%)5,1%+

Cbjectlve:
Reference
Covernor
Locul
w(k)
Plunt
y(k) % r(k)
r(k)
x(k)
leedbuck
Prlmul System
u(k)
c(k)
deslred
reference
uctuul
reference
control
lnut construlned
oututs
meusured oututs
estlmuted lunt stute controller stute
Seurutlon of roblems:
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8
Unconstrulned MPC guln llneur observer = llneur dynumlcul system
(= z d.o.f. dynumlc controller)
Closedloo MPC unulysls cun be erformed uslng stundurd
frequencydomuln tools (e.g. 8ode lots for sensltlvlty unulysls)
u(t) y
m
(t)
r(t)
H/.2+
GH&
x(t)
x
e
(t)
^
MPC frequency unulysls (lnuctlve construlnts)
ln MPC 1bx: ss(mpc) or tf(mpc) return the L1l dlscretetlme form of the llneurlzed
(=no construlnts) MPC object
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
86
Clven the controller u=Kx, 92; U7,56+8 Q,R,P for the MPC roblem
such thut
thut ls, the GH& 1)2+3)//73 1),21,;78 U,+6 K
fv
when the construlnts
ure 2)+ .1+,@7
QP mutrlces:
Controller mutchlng roblem

I 0 . . . 0

H
1
F = K
fv
(Ll Culruno, 8emorud,
LCC'c)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8,
Cenloo rocess:
Leslred controller (HK#):
Stutesuce form:
Construlnts:
Controller mutchlng roblem Lxumle
controller
mutchlng
bused on
lnverse LQR
0 5 10 15
!20
!10
0
10
20
output y(k)
0 5 10 15
!60
!40
!20
0
20
40
input u(k)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
88
what PID would apply
matched MPC
Note: lt's not trlvlully u suturutlon of PlL controller. ln thls cuse
sut(PlL) leuds to lnstublllty
Controller mutchlng roblem Lxumle
udd outut construlnt y(k)!-5
0 5 10 15
!20
!10
0
10
20
output y(k)
0 5 10 15
!60
!40
!20
0
20
40
input u(k)
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
8
Lxumle: MPC of u LC Servomotor
mpcmotor.m
go to demo jdemos/linear/dcmotor.m
(Eyb1bx)
(MPC1bx)
V
R
J
M
J
L
%
M
%
L
T
r
b
M
b
L
%
s
T
r
e
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
c
LC Servomotor Model
c
c c
Ste Resonse
1lme (sec)
V
R
J
M
J
L
%
M
%
L
T
r
b
M
b
L
%
s
T
r
e
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

LC Servomotor: Secs
V
R
J
M
J
L
%
M
%
L
T
r
b
M
b
L
%
s
T
r
e
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc
z
LC Servomotor: Lxerclse
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

LC Servomotor: MPC
j zcc by A. 8emorud
Controllo dl Processo e del Slsteml dl Produzlone A.u. zcc8jc

LC Servomotor: MPC

You might also like