Steady State Kalman Filter

Similar documents
CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems. CDS 110b

SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL

Lecture 10 Linear Quadratic Stochastic Control with Partial State Observation

6 OUTPUT FEEDBACK DESIGN

CALIFORNIA INSTITUTE OF TECHNOLOGY Control and Dynamical Systems. CDS 110b

OPTIMAL CONTROL. Sadegh Bolouki. Lecture slides for ECE 515. University of Illinois, Urbana-Champaign. Fall S. Bolouki (UIUC) 1 / 28

6.241 Dynamic Systems and Control

Optimization-Based Control

Linear-Quadratic-Gaussian (LQG) Controllers and Kalman Filters

LQR, Kalman Filter, and LQG. Postgraduate Course, M.Sc. Electrical Engineering Department College of Engineering University of Salahaddin

Topic # Feedback Control Systems

Quadratic Stability of Dynamical Systems. Raktim Bhattacharya Aerospace Engineering, Texas A&M University

There are none. Abstract for Gauranteed Margins for LQG Regulators, John Doyle, 1978 [Doy78].

5. Observer-based Controller Design

Lecture 5 Linear Quadratic Stochastic Control

9 Controller Discretization

Stochastic and Adaptive Optimal Control

Linear Quadratic Optimal Control Topics

CONTROL DESIGN FOR SET POINT TRACKING

RECURSIVE ESTIMATION AND KALMAN FILTERING

POLE PLACEMENT. Sadegh Bolouki. Lecture slides for ECE 515. University of Illinois, Urbana-Champaign. Fall S. Bolouki (UIUC) 1 / 19

OPTIMAL CONTROL AND ESTIMATION

Robotics. Control Theory. Marc Toussaint U Stuttgart

Optimization-Based Control

Robust Control 5 Nominal Controller Design Continued

Optimization-Based Control

Lecture 4 Continuous time linear quadratic regulator

Linear System Theory

1. Find the solution of the following uncontrolled linear system. 2 α 1 1

MODERN CONTROL DESIGN

EE C128 / ME C134 Final Exam Fall 2014

Hamilton-Jacobi-Bellman Equation Feb 25, 2008

Lecture 9. Introduction to Kalman Filtering. Linear Quadratic Gaussian Control (LQG) G. Hovland 2004

Lecture 5: Control Over Lossy Networks

Optimal control and estimation

Deterministic Kalman Filtering on Semi-infinite Interval

Australian Journal of Basic and Applied Sciences, 3(4): , 2009 ISSN Modern Control Design of Power System

Optimal Control. Lecture 18. Hamilton-Jacobi-Bellman Equation, Cont. John T. Wen. March 29, Ref: Bryson & Ho Chapter 4.

Linear Systems. Manfred Morari Melanie Zeilinger. Institut für Automatik, ETH Zürich Institute for Dynamic Systems and Control, ETH Zürich

Here represents the impulse (or delta) function. is an diagonal matrix of intensities, and is an diagonal matrix of intensities.

Linear State Feedback Controller Design

State estimation and the Kalman filter

Chapter 3. LQ, LQG and Control System Design. Dutch Institute of Systems and Control

EE363 homework 2 solutions

Time-Invariant Linear Quadratic Regulators!

Outline. Linear regulation and state estimation (LQR and LQE) Linear differential equations. Discrete time linear difference equations

Kalman Filter and Parameter Identification. Florian Herzog

Exam. 135 minutes, 15 minutes reading time

Nonlinear Observers. Jaime A. Moreno. Eléctrica y Computación Instituto de Ingeniería Universidad Nacional Autónoma de México

Optimal Polynomial Control for Discrete-Time Systems

Linear Quadratic Zero-Sum Two-Person Differential Games Pierre Bernhard June 15, 2013

Homework Solution # 3

Suppose that we have a specific single stage dynamic system governed by the following equation:

1 Kalman Filter Introduction

= m(0) + 4e 2 ( 3e 2 ) 2e 2, 1 (2k + k 2 ) dt. m(0) = u + R 1 B T P x 2 R dt. u + R 1 B T P y 2 R dt +

Linear-Quadratic Optimal Control: Full-State Feedback

Final Exam Solutions

Lecture 8. Applications

Optimal Control. Quadratic Functions. Single variable quadratic function: Multi-variable quadratic function:

= 0 otherwise. Eu(n) = 0 and Eu(n)u(m) = δ n m

x(n + 1) = Ax(n) and y(n) = Cx(n) + 2v(n) and C = x(0) = ξ 1 ξ 2 Ex(0)x(0) = I

LINEAR QUADRATIC GAUSSIAN

State Regulator. Advanced Control. design of controllers using pole placement and LQ design rules

Sequential State Estimation (Crassidas and Junkins, Chapter 5)

Subject: Optimal Control Assignment-1 (Related to Lecture notes 1-10)

Time-Invariant Linear Quadratic Regulators Robert Stengel Optimal Control and Estimation MAE 546 Princeton University, 2015

EL2520 Control Theory and Practice

Lecture 2: Discrete-time Linear Quadratic Optimal Control

Min-Max Output Integral Sliding Mode Control for Multiplant Linear Uncertain Systems

Bayesian Decision Theory in Sensorimotor Control

EL 625 Lecture 10. Pole Placement and Observer Design. ẋ = Ax (1)

Problem 1 Cost of an Infinite Horizon LQR

EE221A Linear System Theory Final Exam

Course Outline. Higher Order Poles: Example. Higher Order Poles. Amme 3500 : System Dynamics & Control. State Space Design. 1 G(s) = s(s + 2)(s +10)

Stochastic Optimal Control!

Extensions and applications of LQ

Intro. Computer Control Systems: F9

Linear Quadratic Optimal Control

Topic # Feedback Control. State-Space Systems Closed-loop control using estimators and regulators. Dynamics output feedback

Deterministic Dynamic Programming

Module 07 Controllability and Controller Design of Dynamical LTI Systems

DECENTRALIZED CONTROL OF INTERCONNECTED SINGULARLY PERTURBED SYSTEMS. A Dissertation by. Walid Sulaiman Alfuhaid

OPTIMAL CONTROL SYSTEMS

Problem 2 (Gaussian Elimination, Fundamental Spaces, Least Squares, Minimum Norm) Consider the following linear algebraic system of equations:

Observability. It was the property in Lyapunov stability which allowed us to resolve that

Advanced Mechatronics Engineering

Observability and state estimation

Controlled Diffusions and Hamilton-Jacobi Bellman Equations

1 Continuous-time Systems

Lecture 2 and 3: Controllability of DT-LTI systems

Lecture 19 Observability and state estimation

(q 1)t. Control theory lends itself well such unification, as the structure and behavior of discrete control

Outline. 1 Linear Quadratic Problem. 2 Constraints. 3 Dynamic Programming Solution. 4 The Infinite Horizon LQ Problem.

Linear Quadratic Zero-Sum Two-Person Differential Games

Chapter 9 Observers, Model-based Controllers 9. Introduction In here we deal with the general case where only a subset of the states, or linear combin

Linear-Quadratic-Gaussian Controllers!

ECEEN 5448 Fall 2011 Homework #4 Solutions

Stochastic Tube MPC with State Estimation

Topic # /31 Feedback Control Systems. Analysis of Nonlinear Systems Lyapunov Stability Analysis

EN Applied Optimal Control Lecture 8: Dynamic Programming October 10, 2018

Transcription:

Steady State Kalman Filter Infinite Horizon LQ Control: ẋ = Ax + Bu R positive definite, Q = Q T 2Q 1 2. (A, B) stabilizable, (A, Q 1 2) detectable. Solve for the positive (semi-) definite P in the ARE: A T P + P A P BR 1 B T P + Q = 0. Optimal feedback gain: u = Kx K = R 1 B T P A BK stable. Steady State Kalman Filter: ˆx = Aˆx + Bu + L(y Cˆx) Choose L so that A LC or A T C T L is stable. So solve LQ control problem for the dual problem: ẋ = A T x + C T u (60) M.E. University of Minnesota 276

Transform the Algebraic Riccati Equation: C T B, A T A. AP + P A T P C T R 1 CP + Q = 0. Stabilizing feedback gain K for (60) is: K = L T = R 1 CP L = P C T R 1 This generates the observer: ˆx = Aˆx + Bu + P C T R 1 (y Cˆx) with observer error dynamics: x = (A P C T R 1 C) x which will be stable, as long as 1. (A T, C T ) is stabilizable. This is the same as (A, C) being detectable. 2. (A T, Q 1 2) is detectable. This is the same as (A, Q 1 2) being stabilizable. M.E. University of Minnesota 277

Questions we need to ask are: In what way is this observer optimal? How does finite time LQ extend to observer design? M.E. University of Minnesota 278

Deterministic Kalman Filter Problem statement: Suppose we are given the output y(τ) of a process over the interval [t 0, t f ]. It is anticipated that y(τ) is generated from a process of the form: ẋ = A(t)x + B(t)u y = C(t)x To account for model uncertainty and measurement noise, the process model used is modified to: ẋ(t) = A(t)x(t) + B(t)u + B w (t)w y = C(t)x(t) + v (61) The state ˆx(t t f ) = estimate of the state of the actual process at time t given all the measurements up to time t f. ˆx(t t f ) means derivative w.r.t. t. The final time is assumed to be fixed. In (61), w and v are unknown process and measurement noise. M.E. University of Minnesota 279

Initial state ˆx(t 0 t f ) unknown. The deterministic Kalman filter problem is to so choose the initial state ˆx(t 0 t f ) and the measurement and process noises w(τ t f ), v(τ t f ) for τ [t 0, t f ], so that: 1. The measured output is explained: i.e. y(τ) = C(τ)ˆx(τ t f ) + v(τ t f ) for all τ [t 0, t f ]. 2. Minimize the following objective function: J(y( ), ˆx(t 0 t f ), w( t f )) = 1 2ˆxT (t 0 t f )S 1ˆx(t 0 t f )+ + 1 2 tf t 0 w T (τ t f )Q 1 (τ)w(τ t f ) + v T (τ t f )R 1 (τ)v(τ t f ) dτ where v(τ t f ) = y(τ) C(τ)x(τ t f ). M.E. University of Minnesota 280

Remarks: Thus, the goal is to use as little noise or initial condition as possible so as to explain the measured output y(τ). Set R 1 large when measurement is accurate, i.e. assume little measurement noise v. Set Q 1 large when process model is accurate, i.e. assume little process noise w. Set S 1 large when estimate of ˆx(t 0 t f ) = 0 is a confident guess of the initial state. If a non-zero estimate (say x 0 ) for the initial state is desired, it is possible to modify the cost function so that: 1 2ˆxT (t 0 t f )S 1ˆx(t 0 t f ) 1 2 (ˆx(t 0 t f ) x 0 ) T S 1 (ˆx(t 0 t f ) x 0 ). It is clear that the optimal estimate at t 0 given no measurements is: ˆx(t 0 t 0 ) = x 0. M.E. University of Minnesota 281

In the observer problem, we are interested in ˆx(t t) where t is the current time. Thus, we need to solve ˆx(t f t f ) and then determine how this varies with t f. Conceptually, we need to resolve this problem when t f changes. But, in practice, this is not necessary. Filtering problem is to solve ˆx(t t f ) where t < t f. Prediction problem is to solve ˆx(t t f ) where t > t f. When solving the problem, we drop the B(t)u term in ẋ = A(t)x + B(t)u for convenience. It can be carried through. M.E. University of Minnesota 282

Optimal filtering / observer Problem The free variables in the optimal filtering / observer problem are: ˆx(t 0 t f ), the estimate of the initial state and process noise w(τ). Notice that once these have been chosen, v(τ t f ) = y(τ) C(τ)ˆx(τ t f ) is fixed. Let the final time t f be fixed. We omit the final time argument t f. Use ˆx(τ) to denote ˆx(τ x f ) etc. The constraint of the system is: ˆx(τ) = Aˆx(τ) + w(τ), τ [t 0, t f ]. We can convert this constrained optimal control problem into unconstrained optimization problem using the Lagrange multiplier λ(τ) R n. The cost function for the unconstrained optimization M.E. University of Minnesota 283

problem is: J = 1 2ˆxT (t 0 )S 1ˆx(t 0 ) + 1 2 tf t 0 w T Q 1 (τ)w +v T R 1 (τ)v + 2λ T (τ)[ ˆx (A(τ)ˆx + w)] dτ Using integration by parts and considering variation in ˆx(τ), w(τ), ˆx(t f ) and ˆx(t 0 ). δ J = tf t 0 [ w T (τ)q 1 (τ) λ T (τ) ] δw(τ)+ [ v T (τ)r 1 (τ)c T (τ) λ ] T (τ) λ T (τ)a(τ) + λ T (t f )δˆx(t f ) + [ˆx(t 0 )S 1 λ T (t 0 ) ] δˆx(t 0 ). δˆx(τ) dt Since δx(τ), δw(τ), δˆx(t 0 ) and δˆx(t f ) can be arbitrary, as long as ˆx = A(τ)ˆx + w, the necessary condition for optimality is: δw(τ) w(τ) = Q(τ)λ(τ) δˆx(τ) λ(τ) = A T (τ)λ(τ) C T (τ)r 1 (τ)[y(τ) C(τ)ˆx(τ)] M.E. University of Minnesota 284

So that the differential equations are: ( ) ˆẋ λ = ( A Q T)(ˆx ) C T R 1 C A λ and the boundary conditions are: ( ) 0 C T R 1 y(τ) (62) δˆx(t f ) λ(t f ) = 0 δˆx(t 0 ) λ(t 0 ) = S 1ˆx(t 0 ) This is a two point boundary value problem. Notice that there is some similarity to the Hamilton- Jacobi-Bellman equation we saw for LQ control problem. We solve this using a similar technique as for LQ to resolve the two point boundary value problem. Assume that ˆx(t) = P(t)λ(t) + g(t) (63) Here g(t) is used to account for the exogenous term C T (τ)r 1 (τ)y(τ). For (63) to be consistent with the HJB equations and M.E. University of Minnesota 285

boundary conditions, we need: P = A(τ)P + PA T (τ) + Q(τ) PC T (τ)r 1 (τ)c(τ)p (64) ġ = A(τ)g P(τ)C T (τ)r 1 (τ)[c(τ)g y(τ)] (65) with initial condition g(t 0 ) = 0 and P(t 0 ) = S. The first differential equation is the Filtering Riccati Differential Equation, which reduces to the CTRDE for LQ control if A A T, C B T and τ (t f τ). Notice that all boundary conditions are assigned at τ = t 0. Thus, (64)-(65) can be integrated forward in time. Substituting (63) into (62), λ = (A T C T R 1 CP)λ + C T R 1 [Cg(t) y]; (66) with boundary condition λ(t f ) = 0. λ(t) can be integrated backwards in time, using P(t) and g(t) obtained from (64)-(65). M.E. University of Minnesota 286

Once λ(t) is obtained, the optimal estimate of the state at τ = t is then given by: ˆx(t t f ) = P(t t f )λ(t t f ) + g(t t f ). Here we re-inserted the argument t f to emphasize that the measurements y(t) is available on the interval [t 0, t f ]. M.E. University of Minnesota 287

Det. Kalman Filter: Summary Forward pass differential equations P = A(τ)P + PA T (τ) + Q(τ) PC T (τ)r 1 (τ)c(τ)p ġ = A(τ)g P(τ)C T (τ)r 1 (τ)[c(τ)g(τ) y(τ)] Backward pass differential equation λ = (A T C T R 1 CP)λ + C T R 1 [C(τ)g(τ) y(τ)]. Boundary conditions: g(t 0 ) = 0, P(t 0 ) = S λ(t f ) = 0. State estimate: ˆx(t t f ) = P(t t f )λ(t t f ) + g(t t f ). P(t) and g(t) are integrated first (forward in time). We will see that g(t) is an estimate of ˆx(t t). The backward integration of λ updates the estimate of ˆx(t t) using future information. M.E. University of Minnesota 288

Deterministic Optimal Observer Let us denote P(t t f ) and g(t t f ) as the solutions to (64)-(65) with the available measurement upto t f. Then, the solution ˆx(t t) is given by taking t f = t, ˆx(t t) = P(t t)λ(t t) + g(t t) = g(t t) since λ(t t) = λ(t f ) = 0. Now, since the boundary conditions for (64)-(65) are given at t 0, so for any > 0, P(t t f ) = P(t t f + ); g(t t f ) = g(t t f + ) Hence, as t f increases, the solution for P(t t f ) and g(t t f ) can be resused. In fact, the terminal time t f does not enter into the solution of P( ) or g( ). M.E. University of Minnesota 289

This means that the optimal observer is given by: d t) = ġ(t) dtˆx(t =A(t)g(t) P(t)C T (t)r 1 (t)[c(t)g(t) y(t)] (67) =Aˆx(t t) P(t)C T (t)r 1 (t)[c(t)ˆx(t t) y(t)]; }{{} L(t) (68) with initial condition ˆx(t 0 t 0 ) = x 0 = 0, and P = A(t)P + PA T (t) + Q(t) PC T (t)r 1 (t)c(t)p; P(t 0 ) = S and L(t) is the observer gain. The Filtering Riccati Equation becomes the control Riccati Equation: A T A, C T B, τ (t f τ) The asymptotic solution P(t ) for the Kalman Filtering problem is analogous to P(t 0 ) for the LQ control problem. Asymptotic properties of the Kalman filter can be obtained using this analogy. M.E. University of Minnesota 290

The ARE to be solved is obtained using the above substitutions: AP + P A T + Q P C T (t)r 1 CP = 0. In the time invariant case, P(t ) converges if (A, C) is detectable. If (A T, Q 1 2) is detectable, i.e. stabilizable, then (A, Q 1 2 T ) is A c = A P C T R 1 C is stable. Notice that although Q 1 is used in the performance function, the Riccati equation uses Q. So, it is possible to implement a Kalman filter with Q not invertible. In this case, this means that process noise does not affect each state directly: ẋ = Ax + B w w The matrix Q 1 in the performance criteria can be modified accordingly. M.E. University of Minnesota 291

Stochastic Kalman Filter Consider a stochastic process: ẋ = Ax + w; x(t 0 ) = x 0 y = Cx + v (69) Here w(t) and v(t) are random noise, and x 0 is a random variable: such that E[w(t)w T (τ)] = Q(t)δ(t τ) (70) E[v(t)v T (τ)] = R(t)δ(t τ) (71) E[v i (t)w j (τ) = 0 (72) E[x 0 x T 0 ] = S (73) where E(x) is the expected value (mean) of the random variable x. In other words, w(t) is un-related to w(τ) whenever τ t. v(t) is un-related to v(τ) whenever τ t. v(t) is not related to w(τ) at all. M.E. University of Minnesota 292

Q(t) is the expected size of w(t)w T (t). R(t) is the expected size of v(t)v T (t). S is the expected size of x 0 x T 0. Assume that y(τ) is measured for τ [t 0, t]. If we apply the deterministic Kalman Filter to this stochastic process to obtain ˆx(t t), and let x(t) = ˆx(t t) x(t). Then, it turns out that this estimate minimizes: E[ x(t) x T (t)] Moreover, the solution to the Filtering Riccati Equation is P(t) = E[ x(t) x T (t)] See Goodwin Chapter 22.10 for the derivation of this result. M.E. University of Minnesota 293

Pink Noise Noise does not uniformly cover a broad frequency spectrum, but instead is concentrated in some bands, are pink. They can be modeled by the output of a bandpass filter with input of white noise. w pink (s) = F(s)w white (s) In states space, where ẋ w = A p x w + B p w white w pink = C p x w + D p w white F(s) = C p (si A p ) 1 B p + D p The states space model is then incorporated into the plant equation with the augmented state, with white noise as inputs. Procedure is applied for both process noise or output measurement nosie. M.E. University of Minnesota 294

Linear Quadratic Gaussian (LQG) Consider the system driven by Gaussian noise: where ẋ = Ax + Bu + w y = Cx + v E[w T (t)w(τ)] = Q w (t)δ(t τ) (74) E[v T (t)v(τ)] = R w (t)δ(t τ) (75) E[v i (t)w j (τ) = 0 (76) E[x 0 x T 0 ] = S w (77) Moreover, assume that the probability distributions of w and v are zero mean, and Gaussian. Suppose that one wants to minimize: J = E where T. { 1 T t0 +T t 0 [ x T Qx + u T Ru ] dt } M.E. University of Minnesota 295

This is called the Linear Quadratic Gaussian (LQG) problem. It turns out that the optimal control in this sense is given by: u = Kˆx where K is the gain obtained by considering the LQR problem. ˆx is the state estimate obtained from using the Kalman Filter. From the separation theorem, we know that the observer estimated state feedback generates a stable controller such that the closed loop system has eigenvalues given by the eigenvalues of the observer error and the eigenvalues of the state feedback controller. The LQG result shows that Kalman Filter and LQ generates an Optimal Controller in the stochastic sense. The LQG controller is optimal over ALL causal, linear and nonlinear controllers! M.E. University of Minnesota 296