Observer
Design
for
M
r(t) Optimizer u(t)
Reference
x(t)
state
estimate
•
Full
state
x(t)
may
not
be
availa
•
Even
if
available,
noise
should
b
•
State
of
prediction
model
may
b
(e.g.:
model
reduction,
identifica
©
2009
by
A.
Bemporad we
need
to
use
Controllo
di
Processo
e
dei
Siste
MPC y(t) measured
Plant outputs
Observer
able
be
filtered
out
be
different
from
plant
model
x(t)
ation)
a
state
observer
76 /94
emi
di
Produzione
‐
A.a.
2008/09
Model
for
Observer
De
u(k) MVs
(Manipulated
Variables)
v(k) MDs
(Measured
Disturbances) Plan
mod
nd(k) Unmeasured
d(k)
disturbance
white
noise
UMDs
innovations model (Unmeasured
Disturbances)
nm(k
white
nois
innovation
unmeasured
disturbance
model
•
Note:
meas.
noise
model
not
needed
for
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
esign
nt
CVs
(Controlled
Variables) yu(k)
del (Unmeasured
Outputs)
k) m(k)Measurement zm(k)
++
MOs
y (k)noise
se
model m
ns
(Measured
Outputs)
measurement
noise
model
r
optimization
! 77/94
emi
di
Produzione
‐
A.a.
2008/09
Observer
Design
•
Measurement
update
•
Time
update
•NOTE:
separation
principle
holds
!
(und
(Muske,
Meadows,
Rawlings,
ACC94)
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
der
certain
assumptions)
78 /94
emi
di
Produzione
‐
A.a.
2008/09
Kalman
Filter
Design
•
Full
model
for
designing
observer
gain
M
•
nd(k):
represents
source
for
modeling
e
•
nm(k):
represents
source
for
measurem
•
nu(k):
white
noise
on
all
inputs
u
added
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
M
Rudolf
Emil
Kalman
(1930
‐
)
errors
ment
noise
d
for
solvability
of
the
Riccati
equation
emi
di
Produzione
‐
A.a.
2008/09 79 /94
Integral
Action
in
MPC
(and
not
only
in
MPC)
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
emi
di
Produzione
‐
A.a.
2008/09 80 /94
Output
Integrators
u(k)
v(k) Pla
mo
nd(k) Unmeasured
d(k)
disturbance
white
noise
innovations model
ni(k) O
Inte
white
noise
innovations n
•
Introduce
output
integrators
as
additio
•
Under
certain
conditions,
observer
+
co
steady‐state
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
ant
+ yu(k)
odel + zm(k)
Output
egrators
nm(k) Measurement ++ ym(k)
white
noise
noise
m(k)
innovations model
onal
disturbance
models
ontroller
provide
zero
offset
in
emi
di
Produzione
‐
A.a.
2008/09 81 /94
Integrators
and
Steady‐St
•
More
generally,
add
integrators
on
states
n
iwnnh
•
Use
the
above
model
+
meas.noise
mode
(e.g.
Kalman
filter)
•
Main
idea:
observer
makes
MPC
makes
)
the
combination
makes
•
Explanation:
compensates
model
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
tate
Offsets
s
+
outputs: Plant
yu(k)
model
u(k) + ym(k)
v(k)
+
ni(k) Output d(k) Ddm
nhoitvea
ntoioisnes
Integrators
Ddmd(k)
el
to
design
an
observer
(estimation
error)
(predicted
tracking
error)
(actual
tracking
error)
l
mismatch
in
steady‐state 82 /94
emi
di
Produzione
‐
A.a.
2008/09
Error
feedback
•
Idea:
add
integrals
of
measured
outputs
a
state‐feedback
case)
•
Extended
prediction
model:
•
Implementation:
•
Explanation:
if
closed‐loop
asymptotically
and
hence
y(k)
!
r(k)
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
as
additional
states
(similar
to
linear
(Kwakernaak,
1972)
y
stable
)
q(k)
!
cost. 83 /94
emi
di
Produzione
‐
A.a.
2008/09
Reference
Governor
•
Idea:
Apply
MPC
as
the
set‐point
gener
(e.g.:
PID)
actual
reference
r(k) w(k) Local
Feedba
desired Reference
reference Governor
estimated
plant
state
+
controller
s
•
Separation
of
problems:
‐
Local
feedback
designed
for
stability,
dist
without
taking
care
of
constraints
‐
Actual
reference
w(t)
generated
on‐line
b
Objective:
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
rator
to
linear
feedback
loops
(Bemporad,
1997)
control constrained
input outputs
u(k) c(k)
ack Plant
y(k)
¼
r(k)
measured
outputs
Primal
System
x(k)
state
turbance
attenuation,
good
tracking,
by
an
MPC
algorithm
to
take
care
of
constraints
emi
di
Produzione
‐
A.a.
2008/09 84 /94
MPC
frequency
analysis
• Unconstrained
MPC
gain
+
linear
o
(=
2
d.o.f.
dynamic
controller)
• Closed‐loop
MPC
analysis
can
be
p
frequency‐domain
tools
(e.g.
Bod
u(t) Plant
x(t)
MPC
^xe(t)
In
MPC
Tbx:
ss(mpc)
or
tf(mpc)
return
the
LT
(=no
constraints)
MPC
object
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
(inactive
constraints)
observer
=
linear
dynamical
system
performed
using
standard
de
plots
for
sensitivity
analysis)
t ym(t)
C
r(t)
TI
discrete‐time
form
of
the
linearized
85 /94
emi
di
Produzione
‐
A.a.
2008/09
Controller
matching
pro
•
Given
the
controller
u=Kx,
find
we
such
that
− I 0 ... 0
that
is,
the
MPC
controller
coincid
are
not
active
•
QP
matrices:
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
oblem
(Di
Cairano,
Bemporad,
eights
Q,R,P
foErC
Ct’h0e9)
MPC
problem
H−1F = Kfv
des
with
Kfv
when
the
constraints
emi
di
Produzione
‐
A.a.
2008/09 86 /94
Controller
matching
pro
•
Open‐loop
process:
•
Constraints:
•
Desired
controller
(PID):
•
State‐space
form:
©
2009
by
A.
Bemporad controller
matching
based
on
inverse
LQR
Controllo
di
Processo
e
dei
Siste
oblem
‐
Example
emi
di
Produzione
‐
A.a.
2008/09 87 /94
Controller
matching
pro
%&'(&')*+,-
$!
#!
!
!#!
!$! " #! #"
!
01(&')&+,-
/!
$!
!
!$!
!/!
!.! " #! #"
!
what PID would
matched MPC
Note:
it’s
not
trivially
a
saturation
o
sat(PID)
leads
to
instability
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
oblem
‐
Example
%&'(&')*+,-
$! " #! #"
#!
01(&')&+,-
!
!#! " #! #"
!$!
add
output
constraint
y(k)≥-5
!
/!
$!
!
!$!
!/!
!.!
!
d apply
of
PID
controller.
In
this
case
emi
di
Produzione
‐
A.a.
2008/09 88 /94
Example:
MPC
of
a
DC
Se
R
Ve µM Tr µs
JM
bM r
go
to
demo
/demos/linea
mpcmotor
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
ervomotor
sT µL
JL
bL
ar/dcmotor.m (Hyb‐Tbx)
r.m (MPC‐Tbx)
emi
di
Produzione
‐
A.a.
2008/09 89 /94
DC
Servomotor
‐
Model
R
Ve µM Tr µs
JM
bM r
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
sT µL
JL
bL
Step
Response
0
0 5 Time
(sec)10 90 /9415
emi
di
Produzione
‐
A.a.
2008/09
DC
Servomotor:
Specs
R
Ve µM Tr µs
JM
bM r
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
sT µL
JL
bL
emi
di
Produzione
‐
A.a.
2008/09 91 /94
DC
Servomotor:
Exercise
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
emi
di
Produzione
‐
A.a.
2008/09 92 /94
DC
Servomotor:
MPC
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
emi
di
Produzione
‐
A.a.
2008/09 93 /94
DC
Servomotor:
MPC
©
2009
by
A.
Bemporad Controllo
di
Processo
e
dei
Siste
emi
di
Produzione
‐
A.a.
2008/09 94 /94