Continuous-time Errors-in-variables Filtering
Ivan Markovsky, Jan C. Willems, and Bart De Moor
ESAT-SCD (SISTA), K.U.Leuven, Belgium
Outline
• Errors-in-variables model
• EIV smoothing and filtering
• Misfit and latency
• Estimation in the pure misfit case
• Estimation in the pure latency case
• Conclusion
Errors-in-variables model
consider the continuous-time linear state space system
d
dt
x = Ax + Bu
y = Cx + Du
(1)
let (u
d, y
d) be a
measured input/output trajectory
on the interval [0, t
f]
in general, it is
not a trajectory of the model
, i.e.,
there is no x(0), such that the response of (1) to the signal u
dis y
daccount for
modeling errors
by adding to the system an auxiliary input d
d
dt
x = Ax + Bu + Gd
y = Cx + Du + Hd
(2)
Errors-in-variables model (cont.)
measurement errors are modeled by appending to the system the eqns.
u
d= u + ˜
u,
y
d= y + ˜
y
(3)
the
measurement errors ˜
u, ˜
y
and the
disturbance d
are free variables that
allow us to “explain” the measured trajectory (u
d, y
d)
the system (2,3) is called an
errors-in-variables model
PSfrag replacements
A B G C D Hu
˜
u
y
˜
y
u
dy
dx
(0)
d
1EIV smoothing and filtering
problem:
estimate the
“true” I/S/O trajectory
from the measured traj.
assumptions:
1. the true I/S/O trajectory is generated by (1)
2. the measurements are generated by the EIV model
3. the initial condition, disturbance, and measurement errors are “small”
estimation principle:
find the “smallest” estimated ˆ
x(0), ˆ
d, ˆ
u, and ˆ
˜
y,
˜
that “explain” the measurements by the EIV model, i.e.,
d
dt
x = Aˆ
ˆ
x + B ˆ
u + G ˆ
d,
y = C ˆ
ˆ
x + D ˆ
u + H ˆ
d
u
d= ˆ
u + ˆ
u,
˜
y
d= ˆ
y + ˆ
y
˜
Misfit versus latency interpretation
ˆ
x(0) and ˆ
d are
latent variables
, i.e., variables that modify the system
equations to explain the model-data mismatch
ˆ
˜
u and ˆ
y are
˜
misfit variables
, i.e., variables that modify the data to make
it match the system equations
pure latency case
— consider the data as being error free and blame the
model as being imperfect description of the reality
pure misfit case
— consider the model as being perfect and blame the
measurements as being error corrupted
in general, both misfit and latency can be considered simultaneously, i.e.,
the uncertainty is in both the data and the model
Estimation cost functional
misfit and latency cost functionals:
J
misfit:=
Z
tf 0||ˆ
u(t) − u
d(t)||
2R+ ||ˆ
y(t) − y
d(t)||
2Qdt
J
latency:=
Z
tf 0|| ˆ
d(t)||
2Pdt + ||ˆ
x(0)||
2ΓR > 0, Q ≥ 0, P > 0, Γ ≥ 0 — weighting matrices, reflecting the
relative importance of the terms
total cost functionals:
J := ρJ
misfit+ (1 − ρ)J
latencyvarying ρ from 0 to 1, allows smooth transition from a purely misfit
contribution to a purely latency contribution
Smoothing versus filtering
the general EIV estimation problem, we will consider, is
min
ˆ u,ˆy,ˆx, ˆdρJ
misfit+ (1 − ρ)J
latencys.t.
d dtx = Aˆ
ˆ
x + B ˆ
u + G ˆ
d
ˆ
y = C ˆ
x + D ˆ
u + H ˆ
d
(4)
as defined this is a
smoothing problem
, i.e., the estimates are wanted for
the whole interval [0, t
f]
but we will derive also the solution of the corresponding filtering problem
filtering problem
— design a non-anticipating dynamical system that
assumes as input the measurements and produces as output at each
moment of time the optimal estimate
Common problem
we solve the following optimal control problem
min u,x Z tf 0 u(t) x(t) 1 T M (t) u(t) x(t) 1 dt + x T (0)Γx(0) s.t. dtd x = Ax + Bu (5) where M (t) := Q u Qux qu(t) ∗ Qx qx(t) ∗ ∗ q(t) , Qu > 0, h Qu Qux ∗ Qx i ≥ 0, and Γ ≥ 0
completion of squares approach
Lemma 1. Let K : [0, tf] → Rn×n, K = KT, and s : [0, tf] → Rn be differentiable.
Then, for x and u related by dtd x = Ax + Bu, the following identity holds
0 = − xTKx + 2sTx|t0f + Z tf 0 u x 1 T 0 BTK BTs ∗ dtd K + ATK + KA dtd s + ATs ∗ ∗ 0 u x 1 dt.
Solution of the common problem
Lemma 2. Let Qu > 0, h Qu Qux ∗ Qx i≥ 0, and Γ ≥ 0. Define K as the unique solution of the Riccati differential equation
0 = dtd K + ATK + KA + Qx − (BTK + Qux)TQ−1u (BTK + Qux), K(0) = −Γ,
and assume that K(tf) < 0.Then the unique solution of problem (5) is
u = −Q−1u (BTK + Qux)x + BTs + qu, and d dtx = A − BQ −1 u (B T K + Qux)x − BQ−1u BTs − BQ−1u qu,
with final condition x(tf) = −K−1(tf)s(tf), where s is generated by d dts = − A − BQ −1 u (B T K + Qux) T s − qx + (BTK + Qux)TQ−1u qu, s(0) = 0.
Estimation in the pure misfit and pure latency cases
assume d = 0
⇒
only the misfit contributes to the cost functional
min
ˆ u,ˆy,ˆxZ
tf 0||ˆ
u(t) − u
d(t)||
2R+ ||ˆ
y(t) − y
d(t)||
2Qdt s.t.
d dtx = Aˆ
ˆ
x + B ˆ
u
ˆ
y = C ˆ
x + D ˆ
u
assume
u = 0
˜
˜
y = 0
⇒ only the latency contributes to the cost functional
min
ˆ d,ˆxZ
tf 0|| ˆ
d(t)||
2Pdt + x
T(0)Γx(0) s.t.
d dtx = Aˆ
ˆ
x + Bu
d+ G ˆ
d
y
d= C ˆ
x + Du
d+ H ˆ
d.
this corresponds to the
deterministic Kalman filter
Theorem 1. [Pure misfit smoothing] Let R > 0, Q ≥ 0, and (A, CTQC) be observable. The unique solution of the pure misfit estimation problem is
ˆ u = −N−1 (BTK + DTQC)ˆx + BTs − DTQyd − Rud d dtx = A − BNˆ −1 (BTK + DTQC)Tx − BNˆ −1BTs + BN−1DTQyd + BN−1Rud, ˆx(tf) = −K−1(tf)s(tf) where N := R + DTQD, s is generated by d dts = − A − BN −1 (BTK + DTQC)Ts + CTQyd − (BTK + DTQC)TN−1(DTQyd + Rud), s(0) = 0, and K is generated by (BTK +DTQC)TN−1(BTK +DTQC) = dtd K +ATK +KA+CTQC, K(0) = 0. (6)
Corollary 1. [Pure misfit finite-horizon filtering] Under the assumptions of Theorem 1, the optimal misfit filter is ˆx = −K−1s, ˆy = C ˆx + D ˆu, and
ˆ u = −N−1 BT + (BTK + DTQC)Ks − DTQyd − Rud , d dts = − A − BN −1 (BTK + DTQC)Ts + CTQyd − (BTK + DTQC)TN−1(DTQyd + ud), s(0) = 0, N := R + DTQD and K is generated by (6).
In the infinite-horizon case, assuming in addition that (A, B) is controllable, the differential Riccati equation reduces to the algebraic Riccati equation
0 = ATK + KA + CTQC − (BTK + DTQC)TN−1(BTK + DTQC).
Its unique negative definite solution K− should be used (in place of K) in the optimal
filter.
Theorem 2. [Pure latency smoothing] Let H ∈ Rny×nd be of full rank with n y ≤
nd, P > 0, and Γ > 0. The unique solution of the pure latency estimation problem is
ˆ u = −Q−1u ( ¯BTK + H2TF C)ˆx + ¯BTs − H2TF (yd − Dud), d dtx =ˆ A − ¯¯ BQ −1 u ( ¯B T K + H2TF C) ˆx − ¯BQ−1u B¯Ts + (B − ¯BQ−1u H2TF D − G1H1−1D)ud + (G1H1−1 + ¯BQ−1u H2TF )yd,
with final condition x(tf) = −K−1(tf)s(tf),where s and K are generated by d dts = − ¯A − ¯BQ −1 u ( ¯B T K + H2TF C)Ts + CT − ( ¯BTK + H2TF C)TQ−1u H2TF (yd − Dud), s(0) = 0, ( ¯BTK + H2TF C)TQ−1u ( ¯BTK + H2TF C) = dtd K + ¯ATK + K ¯A + CTF C, K(0) = −Γ. (7) ¯ A := A − G1H1−1C, ¯B := G2 − G1H1−1H2, Qu := P + H2TF H2, F := H1−TP H1−1
Corollary 2. [Pure latency filtering] Under the assumptions of Theorem 2, the optimal latency filter is x = −K−1s, y = C ˆx + D ˆu
u = −Qu−1 B¯T( ¯BTK + H2TF C)Ks − H2TF (yd − Dud), d dts = − ¯A − ¯BQ −1 u ( ¯B T K + H2TF C)Ts + CT − ( ¯BTK + H2TF C)Q−1u H2TF (yd − Dud), s(0) = 0,
where K is generated by (7), and ¯A, ¯B, Qu, and F are defined above.
In the infinite-horizon case, assuming in addition that ( ¯A, ¯B) is controllable and ( ¯A, C) is observable, K should be replaced by the unique negative definite solution of the algebraic Riccati equation
¯
ATK + K ¯A + CTF C = ( ¯BTK + H2TF C)TQ−1u ( ¯BTK + H2TF C).
Misfit+latency case
Theorem 3. [Misfit and latency smoothing] Let R > 0, Q ≥ 0, P > 0, and Γ > 0. The unique solution of (4) for ρ ∈ (0, 1) is
ˆ
u = −Q−1u (Lx + ¯BTs + qu), dtd x = (A − ¯BQu−1L)x − ¯BQ−1u B¯Ts − ¯BQ−1u qu,
with final condition x(tf) = −K−1(tf)s(tf),where s and K are generated by
d dts = −(A − ¯BQ −1 u L) T s + ρCTQyd + LQ−1u qu, s(0) = 0, 0 = dtd K + ATK + KA + ρCTQC − LTQ−1u L, K(0) = −(1 − ρ)Γ (8) ¯ B := [B G], L := B TK + ρDTQC GTK + ρHTQC , qu := −ρ Rud + DTQyd HTQyd Qu := ρ " R + DTQD DTQH ∗ (1−ρ)ρ P + HTQH # .
Corollary 3. [Misfit and latency filtering] Under the assumptions of Theorem 3, the optimal misfit and latency filter is x = −K−1s,
ˆ u = −Q−1u ( ¯BT − LK−1)s + qu, y = − CKˆ −1+ DQ−1u ( ¯BT − LK−1)s − DQ−1u qu, d dts = −(A − ¯BQ −1 u L) T s + ρCTQyd + LQ−1u qu, s(0) = 0,
where K is generated by (8) and ¯B, Qu, L, qu are defined above.
The infinite horizon case, assuming in addition that (A, B) is controllable and (A, CTQC) is observable, the optimal time-invariant filter is obtained by replacing K with K−, the unique negative definite solution of the algebraic Riccati equation
0 = ATK + KA + ρCTQC − LTQ−1u L.
Conclusion
• we posed an estimation problem for continuous-time LTI EIV model
(similar results are available for the discrete-time case)
• the disturbance is interpreted as a latent variable and the measurement errors as
misfit variables
• the estimation problem compensates for disturbance and measurement errors by minimizing an appropriately defined cost functional over all trajectories of the system • the solution of the general estimation problem and its extremes, pure misfit and pure latency, lead to one and the same problem—minimization of a quadratic function of the state and the input subject to the state equation