L4-2 Mhe
L4-2 Mhe
L4-2 Mhe
Goals:
• To learn how extended Kalman filters (EKF) and moving horizon
estimation (MHE) works.
• To learn sufficient conditions for stability of MHE.
Reading:
• E.L. Haseltine and J.B. Rawlings: Critical evaluation of extended
Kalman filtering and moving horizon estimation, Ind. Eng.
Chem. Res., vol. 44, no.8, 2005.
• C.V. Rao, J.B. Rawlings, and D.Q. Mayne: Constrained State 1
Estimation for Nonlinear Discrete-Time Systems: Stability and
Moving Horizon Approximations, IEEE TAC, vol.48, no.2, 2003.
Networked Control Systems
x k+1 = f k( x k, wk)
yk = h k ( x k ) + v k
xk ∈ Xk, wk ∈ W k, vk ∈ V k .
Yk = { yi : 0 ≤ i ≤ k},
f k( x k, wk) f k( x̂ kh k, 0) + A k( x k − x̂ kh k) + N kwk
hk( x k) hk( x̂ kh k−1 ) + Ck( x k − x̂ kh k−1 )
where
V V V
f k( x, 0) , Nk = f k( x̂ kh k , w) h k( x, 0) .
Ak = Ck =
Vx x= x̂kh k Vw w=0 Vx x= x̂kh k−1
Assume
wk Qk 0
E [ wTl vTl ] = δ kl = Σ kδ kl
vk 0 Rk
and
5
x̂0h−1 = x̄0
P0h−1 = P0
1. Corrector:
2. One-step predictor:
x̂ k+1h k = f k ( x̂ kh k, 0)
Pk+1h k = A k Pkh k ATk + N k Q k N kT 6
Comments on EKF
8
Another Approach: MAP Estimates
• Idea: “Compute most likely values of the states x0 , . . . , xT ,
given measurements y0 , . . . , yT −1 .”
• Use Bayesian maximum a posteriori (MAP) criteria:
ŷk
wk
0 k 0 k
T T
We note that
• we can try to enforce the constraints x k ∈ Xk, wk ∈ W k,
vk ∈ Vk in the optimization;
• the optimization problem may have multiple local minima;
• the problem complexity grows at least linearly with the
horizon T ;
• for linear systems without constraints and quadratic cost,
the problem can be solved recursively and leads to the
Kalman filter. 11
Moving Horizon Estimation (MHE)
ŷk
ŷT −1
z
yk
yT −1
x̂T − N
T−N k T −1 Time
16
Example 1: EKF vs. MHE (Rao et al. 2003)
• Constraints are important! Make all the difference in this
example.
• Computation time (interpreted code, 500 MHz processor):
– MHE: ∼3 s per time step
– EKF: negligible
• GNU Octave toolbox NMPC is available at
http://jbrwww.che.wisc.edu/home/tenny/nmpc/
(Use CVS version!)
17
Approximate MHE
T −1
!
Φ̂ T = L k(wk, vk) + Ẑ T − N ( z)
X
min
T − N ,{wk } k=T − N
z∈R T −1
k=T − N
Ẑ T − N ( z) = Φ̂ T − N .
i x k − x̂ ki → 0, k → ∞,
20
Three Conditions for Asymptotic Stability
C1. Uniform observability: With initial conditions x1 and x2
k+ N −1
0 ≤ ϕ (i x1 − x2 i) ≤ k.
X
i y1k − y2k i, for all
j =k
0 ≤ Ẑ T − N ( z) − Φ̂ T − N ≤ γ (i z − x̂T − N i).