FE Notes Current

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/281465291

Optimal State Estimation for Linear Systems with State Constraints

Conference Paper · July 2015


DOI: 10.1016/j.ifacol.2015.08.173

CITATIONS READS

0 80

3 authors, including:

Xiaodong Xu Stevan Dubljevic


University of Texas at Austin University of Alberta
23 PUBLICATIONS   52 CITATIONS    127 PUBLICATIONS   841 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Mechano-electric stabilization of cardiac alternans View project

All content following this page was uploaded by Xiaodong Xu on 17 October 2018.

The user has requested enhancement of the downloaded file.


Optimal State Estimation for Linear
Systems with State Constraints
Xiaodong Xu, Biao Huang, Stevan Dubljevic ∗

Department of Chemical & Materials Engineering, University of
Alberta, Canada, T6G 2V4, Stevan.Dubljevic@ualberta.ca

Abstract: This paper considers the optimal strategies for constrained linear state estimation.
Prior information for estimating state variables is often available in the form of inequality
constraints on states. In the latest developments of optimal state estimation theory consideration
of state constraints has been often neglected since constraints do not fit easily in the structure of
the optimal filter, for example, the issue of state constraints being present has to be addressed
adequately, for example nonnegativity of concentration. In order to address this issue and
to extend previous developments on the accuracy of state estimation, this work develops the
constrained optimal state estimation for finite-dimensional systems. Finally, a numerical example
illustrating the proposed method is presented.

Keywords: Optimal state estimation, Inequality constraints, Linear time-invariant system.

1. INTRODUCTION tinuous time function. The contribution of this paper is its


novel methodology which first converts the optimal state
estimation problem with inequality constraints into the
In finite-dimensional systems, the Kalman filter is the
problem with equality constraints and embeds the equality
standard choice for estimating the state of a linear system
constraints in the optimal state estimation framework. The
when the measurements are noisy and the process dis-
derivation of a state estimation formulation is demon-
turbances are unmeasured. Another important estimation
strated in Section 2. In Section 3, a numerical example,
technique, given by moving horizon method which is devel-
via simulation, shows that the proposed state estimation
oped by Muske and Rawlings (1993), plays an important
framework in this paper indeed improves the accuracy of
role in finite-dimensional systems estimation. Often in
state estimation compared with the unconstrained optimal
the practice, the additional information for estimation is
state estimation framework (Ray’s method). Finally, the
available in the form of inequality constraints on states. In
conclusion is presented in Section 4.
order to embed the constraints into the state estimation
framework and improve the accuracy of state estimation,
many contributions have been made (see Muske et al.
(1993), Simon and Chia (2002), Simon (2010), and Rao 2. MODEL DESCRIPTION
et al. (2001)).
Thomas et al. Yu et al. (1974) investigated the opti- Let us consider the following linear time-invariant system:
mal state estimation framework for infinite-dimensional
systems by utilizing the framework of the optimal control ẋ(t) = Ax(t) + Bu(t) + Gξ(t), x(0) = x0 (1)
theory. Along the same time, Ray (1981) summarized and y(t) = Cx(t) + η(t) (2)
applied this framework in both lumped parameter and
distributed parameter systems (see Ajinkya et al. (1975);
Soliman and Ray (1979)). The optimal state estimation where x(t) ∈ Rn , u(t) ∈ R, y(t) ∈ R are state, input and
technique developed by Thomas and Ray was formulated output, respectively and A ∈ Rn×n , B ∈ Rn×1 , G ∈ Rn×1 ,
by utilizing variational method for continuous systems and C ∈ R1×n are state, input, disturbance and output
and the resulting estimation formulations are continuous matrices, respectively. ξ(t) and η(t) are the zero-mean
time functions. In this paper, motivated by Ray (1981), random processes with the following stochastic properties:
we extended the framework of continuous optimal state E(ξ(t)) = 0, E(ξ(t)ξ(τ )T ) = R−1 (t)δ(t − τ )
estimation technique to deal with the state estimation
E(η(t)) = 0, E(η(t)η(τ )T ) = Q−1 (t)δ(t − τ ) (3)
problem when the state constraints for continuous linear
time-invariant system are explicitly included. E(ξ(t)η(τ )T ) = 0
Motivated by consideration above, this paper focus-
es on the development of the constrained optimal state The state x(t) in the system (1) is subjected to the
estimation framework. Contrary to the Kalman filtering following constraint:
and moving horizon techniques, this paper deals with the
optimal constrained state estimation problem based on the X min ≤ Γx(t) ≤ X max (4)
continuous systems using the variational method and the
final state estimation formulation which is given as a con- where Γ ∈ R1×n is a vector.
2.1 State Estimation Formulation resolve the optimization problem (8) and (9) subject
to X min < Γx̂(t). According to section 11.2.2 of
In this section, based on the system (1)-(2), we formulate Simon (2006), in this step, the inequality optimization
the constrained optimal state estimation problem as the problem is converted into the equality constrained
solution to the following quadratic problem: optimization problem:
min J(x̂(t)) (5) min J(x̂(t))
x̂(t) (11)
s.t. (9) and S(x̂, t) = −Γx̂(t) + X min = 0
where the objective function is defined by: In the same way, if the estimation results do not
1 satisfy Γx̂(t) < X max , one needs to resolve the
J = [x̂(0) − x0 ]T P0−1 [x̂(0) − x0 ] problem:
2
Ztf  T min J(x̂(t))
1 ˙ (12)
+ x̂(t) − Ax̂(t) − Bu(t) s.t. (9) and S(x̂, t) = −Γx̂(t) + X max = 0
2
0  o 1). In step (P.1), we directly formulate the unconstrained
×GT RG x̂(t) ˙ − Ax̂(t) − Bu(t) dt state estimator according to Ray (1981) and the formula-
Ztf tion will be given at the end of this section.
1 n T 2). In step (P.2), we embed the inequality constraints
+ (y(t) − C x̂(t)) Q (y(t) − C x̂(t))} d
2 within the Ray’s optimal state estimation framework. Es-
0 sentially, the problems (11) and (12) are the same, in this
paper we use the problem (11) as representative to illus-
subject to constraint:
trate the derivation of formulation and finally we directly
X min ≤ Γx̂(t) ≤ X max (6) give the formulation for the case (12).
According to Bryson (1975), it is easier to deal with
where (6) is consistent with (4), tf is terminal time, x̂(t) is the equality constrained optimal control problems through
the estimation of the state x(t), and R(t), Q(t) are chosen variational method when the constrained function contains
in (3) and P0 is defined by: an explicit expression of the control variable i.e. U (t),
T
E([x̂(0) − x0 ] [x̂(0) − x0 ] ) = P0 (7) which is the case in this paper.
Consider the following constraint:
˙
We shall now define U (t) = x̂(t)−Ax̂(t)−Bu(t) to convert S(x̂, t) = −Γx̂(t) + X min = 0 (13)
the optimal state estimation problem to its dual optimal
control problem: Since S(x̂, t) does not contain the explicit expression of
min J(x̂(t)) (8) U (t), an additional formulation needs to be developed. If
U (t) the constraint (13) is applied for all 0 ≤ t ≤ tf , its time
derivative along the path must vanish, i.e.,
where the objective function is defined by:
dS(x̂, t) ∂S ∂S ˙
1 = + x̂ = 0 (14)
J = [x̂(0) − x0 ]T P0−1 [x̂(0) − x0 ] dt ∂t ∂ x̂
2
Ztf n Substituting (9) into (14), one obtains:
1 T
+ U (t) GT RG U (t)} dt
2 ΓAx̂(t) + ΓBu(t) + ΓU (t) = 0 (15)
0
Ztf Apparently, (15) has explicit dependence on U (t) and thus
1 n
T
+ (y(t) − C x̂(t)) Q (y(t) − C x̂(t))} dt plays the role of a control variable constraint of the type
2 (3.3.1) in Bryson (1975). In this case, we formulate the
0
minimization problem as:
subject to constraints: min J(x̂(t))
˙ (16)
x̂(t) = Ax̂(t) + Bu(t) + U (t), x̂(0) unspecified (9) s.t. (9) and ΓAx̂(t) + ΓBu(t) + ΓU (t) = 0
X min ≤ Γx̂(t) ≤ X max (10) We first formulate the augmented Hamiltonian:
One may solve the optimization problem (8), (9) and (10) 1 1 T
H = U T (t)RG U (t) + (y(t) − C x̂(t)) Q (y(t) − C x̂(t))
by realizing the following two algorithmic steps: 2 2
P.1) One solves the optimization problem (8) and (9) with- +λT (t) [Ax̂(t) + Bu(t) + U (t)]
out the constraint (10). Then, inspect if the results −µ(t) [ΓAx̂(t) + ΓBu(t) + ΓU (t)]
satisfy the constraint given by (10). If the results
satisfy the constraint, then one finishes the estimation where RG = GT RG, λ is a Lagrange multiplier vector
work at the current estimation time instant. Other- and µ is a Lagrange multiplier scalar. The last term of
wise, we proceed to step (P.2), in other words, the Hamiltonian originates from the (15).
constraint is not active. In order to guarantee the solvability of the constrained
P.2) In this step, one inspects which part of the constraint minimization problem (16), the following three conditions
(10) is not satisfied. In the case that the estimation have to be satisfied:
results do not satisfy X min < Γx̂(t), one needs to
∂H Applying the same decomposition property on λ(t|tf ), we
(c.1) = U T (t)RG + λT (t) − µ(t)Γ = 0 have:
∂U
T
(c.2) λ̇(t) = C T Q (y(t) − C x̂(t)) − AT λ(t) + (ΓA) µ(t) dλ(tf |tf )
= λt (tf |tf ) + λtf (tf |tf )
(c.3) λ(tf ) = 0 dtf
∂λ(t|tf )

∂λ(tf |T ) (23)
= +
Remark 1. The novel part in this work is to show how to ∂t t=tf ∂T
T =tf
embed the equality constraint (13) into the framework, i.e
the minimization problem (11). According to Section 3.4 Combining (18)-(23) and (ce .3), we finally obtain:
of Bryson (1975), one can easily solve the problem (11) ˙ f |tf ) = Ax̂(tf |tf ) + Bu(tf )
x̂(t
by setting the initial conditions of x̂(t) to satisfy (13) and −1 T −1 T −1

solving the problem (16). In the realization of the state −RG Γ ΓRG Γ (ΓAx̂(tf |tf ) + ΓBu(tf ))
estimation process, one can regard the estimation results +P (tf |tf )C T Q (y(tf ) − C x̂(tf |tf ))
(24)
at the last estimation time instant as the initial condition +P (tf |tf )C T Q Γx̂(tf |tf ) − X min
at the current estimation time instant. Particularly, when T −1 T −1

−P (tf |tf )(ΓA) ΓRG Γ ΓAx̂(tf |tf )
state estimation results are around the constraints, i.e. T −1 T −1

(13) at the last estimation time instant, one can formulate −P (tf |tf )(ΓA) ΓRG Γ ΓBu(tf )
solution for (16) such that the results satisfy (13) so that
the initial conditions at the current estimation time instant Then, the state estimation equation is of the form:
satisfy the constraint (13) approximately. ˙
x̂(t) = Ax̂(t) + Bu(t)
In order to drive x̂(t) to satisfy the constraint (13) exactly, −1 T −1 T −1

−RG Γ ΓRG Γ (ΓAx̂(t) + ΓBu(t))
we take constraint (13) into the conditions (c.1-c.2-c.3) and (25)
+P (t)C T Q y(t) − C x̂(t) + Γx̂(t) − X min
obtain the following extended conditions: T −1 T −1

−P (t)(ΓA) ΓRG Γ (ΓAx̂(t) + ΓBu(t))
∂H
(ce .1) = U T (t)RG + λT (t) − µ(t)Γ = 0
∂U Now, we proceed with the differential sensitivities P (tf |tf ).
(ce .2) λ̇(t) = C T Q y(t) − C x̂(t) + Γx̂(t) − X min

It can be noted that:
T
−AT λ(t) + (ΓA) µ(t) ∂   ∂
x̂tf (t|tf ) = [x̂t (t|tf )] (26)
(ce .3) λ(tf ) = 0 ∂t ∂tf
∂   ∂
λtf (t|tf ) = [λt (t|tf )] (27)
∂t ∂tf
From (ce .1) and (15), one can calculate:
−1 T −1
  −1  With the help of (22), (26) and (19), the left side of (26)
µ(t) = ΓRG Γ ΓRG λ(t) − Ax̂(t) − ΓBu(t) (17) is of the form:
∂   ∂  
Based on (9), (ce .2) and (17), it is easy to calculate the x̂tf (t|tf ) = − P (t|tf )λtf (tf |tf )
following coupled ordinary differential equations: ∂t ∂t
= − Pt (t|tf ) − P (t|tf )AT

˙
x̂(t) = Ax̂(t) + Bu(t) − RG−1
λ(t) +P (t|tf )C T Q (C − Γ) P (t|tf ) (28)
−1 T −1 T −1
 −1
 (18) T −1 T −1
 −1
+RG Γ ΓRG Γ ΓRG λ(t) − ΓAx̂(t) − ΓBu(t) +P (t|tf )(ΓA) ΓRG Γ ΓRG
−1 T −1
i
T 
T
λ̇(t) = C Q y(t) − C x̂(t) + Γx̂(t) − X min
 T
− A λ(t) +P (t|t f )(ΓA) ΓR G Γ ΓAP (t|t f ) λtf (t|tf )
T −1 T −1
 −1
 (19)
+(ΓA) ΓRG Γ ΓRG λ(t) − ΓAx̂(t) − ΓBu(t)
The right side of (26) can be calculated by (18):
To produce the filter equations, we need to utilize a ∂ −1 T −1 T −1
 −1
[x̂t (t|tf )] = RG Γ ΓRG Γ ΓRG λtf (t|tf )
more explicit notation x̂(t|tf ), λ(t|tf ) denoting the optimal ∂tf
estimates and adjoint variables at time t, conditional on −1 T −1 T −1
 (29)
+R  G Γ ΓRG Γ−1  ΓAP (t|tf )λtf (t|tf )
data y(t) up to time tf . According to Ray (1981), the
− AP (t|tf ) + RG λtf (t|tf )
following holds:
dx̂(tf |tf ) From (26), (28) and (29), we see for (26) to hold for
= x̂t (tf |tf ) + x̂tf (tf |tf ) (20) all λtf (t|tf ) the coefficient of λtf (t|tf ) must vanish, then
dtf
the formulation of Pt (t|tf ) can be obtained. Usually, we
use Pt (t|tf ) to represent Pt (tf |tf ), then the differential

∂ x̂(t|tf ) ∂ x̂(tf |T )
where x̂t (tf |tf ) = ∂t , x̂tf (tf |tf ) = ∂T .
sensitivities have the approximate solution:

t=tf T =tf
−1
According to the form of the equation (18), there exists a Ṗ (t) = AP (t) + P (t)AT + RG
−1 T −1 T
 −1 −1

nonlinear transformation: −RG Γ ΓRG Γ ΓRG + ΓAP (t)
(30)
x̂(t|tf ) = x̂(λ(t|tf )) (21) −P (t)C T Q (C − Γ) P (t)
T −1 T −1 −1
 
−P (t)(ΓA) ΓRG Γ ΓRG + ΓAP (t)
If one applies the chain rule in (21), the following is
obtained: Using the same formulation in Ray (1981), the initial
∂ x̂(t|tf ) ∂ x̂(t|tf ) ∂λ(t|tf ) ∂λ(t|tf ) conditions are:
= = −P (t|tf ) (22)
∂tf ∂λ(t|tf ) ∂tf ∂tf x̂(0) = x0 , P (0) = P0 (31)
Hereto, we finish the derivation of the solution for the
 
−(1 + Da1 ) Da2
problem (11) in step (P.2). In the same way, one can easily A=
Da1 −(1 + Da2 + Da3 )
provide the solution for the problem (12). To sum up, at    
every estimation time instant, we may need to perform 0 1
B= , G= , C = [0 1]
two steps (P.1)-(P.2). At every estimation time instant, we 1 1
first perform step (P.1). In step (P.1), we directly apply the
method presented by Ray and then the state estimation Essentially, we can regard the system (35) as a finite-
equation, and the approximate differential sensitivities are dimensional model for the continuous-stirred tank reactor
given as (for further details, see Ray (1981)): in which the following isothermal multi-component chem-
ical reaction is carried out:
˙
x̂(t) = Ax̂(t) + Bu(t) + P (t)C T Q(y − C x̂(t)) A→←B →C
−1
Ṗ (t) = P (t)AT + AP (t) + RG − P C T QCP (32)
P (0) = P0 The states of the system (35) denote the concentrations.
Consequently, it is reasonable that we assume that the
After step (P.1), one inspects if or not the estimation state constraint is 0 < Γx(t) ≤ 0.75, where Γ = [ 0 1 ], i.e.
results satisfy the constraint X min ≤ Γx̂(t) ≤ X max . In 0 < x2 (t) ≤ 0.75.
the case that the estimation results do not satisfy the In order to make the system (35) satisfy the constraint:
constraint, one proceeds to perform step (P.2). 0 < x2 (t) ≤ 0.75, we apply the constrained MPC technique
In step (P.2), when the results do not satisfy X min ≤ to guarantee the state x2 (t) to stay within (0, 0.75], see
Γx̂(t), one performs the formulation (25) and (30) to Fig-(1). We set the initial value of the estimation state is
guarantee the estimation within the constraint. Similarly,
when the estimation results do not satisfy the constraint 0
Γx̂(t) ≤ X max , one performs the following formulations: x2 (t)
u(t)
˙
x̂(t) = Ax̂(t) + Bu(t)
−1 T −1 T −1

−RG Γ ΓRG Γ (ΓAx̂(t) + ΓBu(t))
+P (t)C T Q (y(t) − C x̂(t)) 1 −2

+P (t)C T Q (Γx̂(t) − X max ) (33)


x2 (t)

−1 T −1

u(t)
T 
−P (t)(ΓA) ΓRG Γ ΓAx̂(t)
T −1 T −1

−P (t)(ΓA) ΓRG Γ ΓBu(t)
x̂(0) = x0 , 0.5 −4

−1
Ṗ (t) = AP (t) + P (t)AT + RG
−1 T −1 T −1 −1
 
−RG Γ ΓRG Γ ΓRG + ΓAP (t)
−P (t)C T Q (C − Γ) P (t) (34)
T −1 T −1 −1 0
 
−P (t)(ΓA) ΓRG Γ ΓRG + ΓAP (t) 0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
t
P (0) = P0
Fig. 1. Manipulated input u(t) (solid line) and state x2 (t)
(dashed line) under the formulation of constrained M-
3. SIMULATION STUDY PC calculated as in the reference Muske and Rawlings
(1993).
In this section, a numerical example illustrating implemen-
tation of constrained optimal state estimation framework T
x̂(0) = [ 1.2 0.1 ] and the initial value of a sensitivities
is presented. T
matrix P0 = E([x̂(0) − x0 ] [x̂(0) − x0 ] ).
Example 3.1- Let us consider the coupled ODE systems: Compared with the unconstrained optimal state esti-
dx1 (t) mation method, we apply the constrained optimal state
= −(1 + Da1 )x1 (t) + Da2 x2 (t) + ξ(t) estimation method to the example system.
dt (35) In Fig-(2) and Fig-(3), the solid line is the evolution of
dx2 (t)
= Da1 x1 (t) − (1 + Da2 + Da3 ) x2 (t) + u(t) + ξ(t) the state of system, the black dashed line is the evolution
dt
of the state estimation under constrained optimal state
x1 (0) = x10 , x2 (0) = x20 (36) estimation framework and the red dash line is the evolution
y(t) = x2 (t) + η(t) (37) of the state estimation under unconstrained optimal state
estimation framework. In Fig-(3), one can see that under
where Da1 = 40, Da2 = 0.5, Da3 = 1 x10 = 1.0 and the framework of constrained optimal state estimation
x20 = 0. ξ(t) and η(t) are zero mean random processes the estimation result x2 (t) is much closer to the actual
and have the following stochastic property: state of the system. Moreover, in Fig-(2), the estimation
−1 T
E(ξ(t)) = 0, R (t) = E(ξ(t)ξ(t) ) = 2.2615 of the state x1 (t) is more closed to the real state of the
−1 T
E(η(t)) = 0, Q (t) = E(η(t)η(τ ) ) = 0.2457 system under the constrained optimal state estimation
T
E(ξ(t)η(τ ) ) = 0 formulation.

4. CONCLUSION
We shall now use the matrix form of (1)-(2) to express the
system and then,
We have demonstrated the optimal strategy for the
T
x(t) = [ x1 (t) x2 (t) ] constrained state estimation for the finite-dimensional
Control Conference, 1993, 900–904. IEEE.
1.2 Rao, C.V., Rawlings, J.B., and Lee, J.H. (2001). Con-
true
unconstrained strained linear state estimation−a moving horizon ap-
1 constrained proach. Automatica, 37(10), 1619–1628.
Ray, W.H. (1981). Advanced process control. McGraw-Hill
0.8 0.3 New York.
0.25 Simon, D. (2006). Optimal state estimation: Kalman, H
0.6
0.2
infinity, and nonlinear approaches. John Wiley & Sons.
x1 (t)

Simon, D. (2010). Kalman filtering with state constraints:


0.15
0.4 a survey of linear and nonlinear algorithms. IET Control
0.1 Theory & Applications, 4(8), 1303–1318.
0.2 0.05 Simon, D. and Chia, T.L. (2002). Kalman filtering with
0.04 0.05 0.06 0.07 0.08 state equality constraints. Aerospace and Electronic
0 t Systems, IEEE Transactions on, 38(1), 128–136.
Soliman, M. and Ray, W.H. (1979). Nonlinear state
−0.2
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
estimation of packed-bed tubular reactors. AIChE
t Journal, 25(4), 718–720.
Fig. 2. State x1 (t) and the constrained and unconstrained Yu, T., Seinfeld, J.H., and Ray, W.H. (1974). Filtering in
estimation of x1 (t). nonlinear time delay systems. Automatic Control, IEEE
Transactions on, 19(4), 324–333.
1
true
0.9 unconstrained
constrained
0.8

0.7

0.6
x2 (t)

0.5

0.4

0.3

0.2

0.1

0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8
t
Fig. 3. State x2 (t) and the constrained and unconstrained
estimation of x2 (t).
systems. The inequality constraints on the states is
utilized as the prior information for estimating state.
This paper combines the inequality constraints and the
traditional optimal state estimation formulation together
to develop a novel constrained optimal state estimator
for finite-dimensional systems. Finally, compared with the
traditional optimal state estimation method, a numerical
example shows that the proposed constrained optimal
state estimation method enhances the accuracy of the state
estimation.

REFERENCES
Ajinkya, M.B., Ray, W.H., Yu, T.K., and Seinfeld, J.H.
(1975). The application of an approximate non-linear
filter to systems governed by coupled ordinary and
partial differential equations. International Journal of
Systems Science, 6(4), 313–332.
Bryson, A.E. (1975). Applied optimal control: optimiza-
tion, estimation and control. CRC Press.
Muske, K.R. and Rawlings, J.B. (1993). Model predictive
control with linear models. AIChE Journal, 39(2), 262–
287.
Muske, K.R., Rawlings, J.B., and Lee, J.H. (1993). Re-
ceding horizon recursive state estimation. In American

View publication stats

You might also like