SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL

Similar documents
Steady State Kalman Filter

SYSTEMTEORI - ÖVNING 5: FEEDBACK, POLE ASSIGNMENT AND OBSERVER

= 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 +

6 OUTPUT FEEDBACK DESIGN

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

6.241 Dynamic Systems and Control

Optimization-Based Control

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

Lecture 5 Linear Quadratic Stochastic Control

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

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

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

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

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

Module 03 Linear Systems Theory: Necessary Background

Limiting Performance of Optimal Linear Filters

SYSTEMTEORI - ÖVNING Stability of linear systems Exercise 3.1 (LTI system). Consider the following matrix:

Exam in Automatic Control II Reglerteknik II 5hp (1RT495)

Lecture 10 Linear Quadratic Stochastic Control with Partial State Observation

Module 07 Controllability and Controller Design of Dynamical LTI Systems

CONTROL DESIGN FOR SET POINT TRACKING

5. Observer-based Controller Design

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

Lecture 2 and 3: Controllability of DT-LTI systems

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

State estimation and the Kalman filter

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

14 - Gaussian Stochastic Processes

EE C128 / ME C134 Final Exam Fall 2014

2 Introduction of Discrete-Time Systems

ME 132, Fall 2015, Quiz # 2

Intro. Computer Control Systems: F9

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

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

Computer Problem 1: SIE Guidance, Navigation, and Control

EL2520 Control Theory and Practice

Linear Discrete-time State Space Realization of a Modified Quadruple Tank System with State Estimation using Kalman Filter

Topic # Feedback Control Systems

1 (30 pts) Dominant Pole

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

Pole placement control: state space and polynomial approaches Lecture 2

Optimization-Based Control

Lecture 19 Observability and state estimation

Control Systems Design

16.31 Fall 2005 Lecture Presentation Mon 31-Oct-05 ver 1.1

Optimization-Based Control

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

Control Systems Design, SC4026. SC4026 Fall 2010, dr. A. Abate, DCSC, TU Delft

Basic Concepts in Data Reconciliation. Chapter 6: Steady-State Data Reconciliation with Model Uncertainties

Introduction to numerical simulations for Stochastic ODEs

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

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

3 Gramians and Balanced Realizations

Robust Control 5 Nominal Controller Design Continued

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

Observability and state estimation

Topic # Feedback Control Systems

Linear State Feedback Controller Design

LMIs for Observability and Observer Design

Problem Set 5 Solutions 1

Chap. 3. Controlled Systems, Controllability

ECEEN 5448 Fall 2011 Homework #4 Solutions

Sequential State Estimation (Crassidas and Junkins, Chapter 5)

ROBUST PASSIVE OBSERVER-BASED CONTROL FOR A CLASS OF SINGULAR SYSTEMS

RECURSIVE ESTIMATION AND KALMAN FILTERING

Linear System Theory

Time Series Analysis

Controllability, Observability, Full State Feedback, Observer Based Control

EE221A Linear System Theory Final Exam

OPTIMAL CONTROL SYSTEMS

Final Exam Solutions

Module 08 Observability and State Estimator Design of Dynamical LTI Systems

Kalman Filter. Predict: Update: x k k 1 = F k x k 1 k 1 + B k u k P k k 1 = F k P k 1 k 1 F T k + Q

1 Kalman Filter Introduction

Optimal control and estimation

DESIGN OF OBSERVERS FOR SYSTEMS WITH SLOW AND FAST MODES

9 Controller Discretization

1 Continuous-time Systems

Stability, Pole Placement, Observers and Stabilization

Extensions and applications of LQ

EECS C128/ ME C134 Final Wed. Dec. 14, am. Closed book. One page, 2 sides of formula sheets. No calculators.

Intro. Computer Control Systems: F8

University of Toronto Department of Electrical and Computer Engineering ECE410F Control Systems Problem Set #3 Solutions = Q o = CA.

Every real system has uncertainties, which include system parametric uncertainties, unmodeled dynamics

The Kalman filter. Chapter 6

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

Lecture 4 Continuous time linear quadratic regulator

Dynamic interpretation of eigenvectors

Optimal Decentralized Control with. Asymmetric One-Step Delayed Information Sharing

Problem 1 Cost of an Infinite Horizon LQR

EE363 homework 2 solutions

Stochastic Optimal Control!

Stochastic contraction BACS Workshop Chamonix, January 14, 2008

COMPOSITE OPTIMAL CONTROL FOR INTERCONNECTED SINGULARLY PERTURBED SYSTEMS. A Dissertation by. Saud A. Alghamdi

ECE 388 Automatic Control

Control engineering sample exam paper - Model answers

Introduction to Modern Control MT 2016

Linear Quadratic Zero-Sum Two-Person Differential Games

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science : Dynamic Systems Spring 2011

Lecture 1: Pragmatic Introduction to Stochastic Differential Equations

Transcription:

SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL 1. Optimal regulator with noisy measurement Consider the following system: ẋ = Ax + Bu + w, x(0) = x 0 where w(t) is white noise with Ew(t) = 0, and x 0 is a stochastic variable with Ex 0 x T 0 = P 0. Consider the following cost function: { t1 } J(u) = E [x T Qx + u T Rudt + x T (t 1 )Sx(t 1 ) t 0 where R > 0, Q 0 and S 0. The problem of determining for each t the input u(t) as a function of the past such that the cost function is minimized is called the stochastic state feedback regulator problem. Note that since all the variables are stochastic, we consider the average of the usual cost function. It is possible to prove that the solution of the stochastic state feedback regulator problem is the same as in the deterministic case. The presence of white noise does not alter the solution, except to increase the minimal value of the cost function. That is, the optimal control input, u(t), is given by: (1.1) u(t) = R 1 B T P (t)x(t) where P (t) is the solution of the (RE): (1.2) (1.3) P = A T P P A + P BR 1 B T P Q P (t 1 ) = S Until now we have considered the unrealistic situation that we can somehow measure the state vector x(t) in order to compute the optima control input u(t). A more realistic situation is the case of output feedback, where we use the measured variable y(t) to make an estimation ˆx(t) of the state, see section 6.2 in the compendium. Now, we want to formulate the optimal linear regulator problem when the observation of the system are noisy. That is, consider the system: ẋ(t) = Ax(t) + Bu(t) + w 1 (t), x(0) = x 0 where x 0 is a stochastic vector with zero mean and covariance P 0. The observed variable is given by: y(t) = Cx(t) + Dw 2 (t) where Ew 2 = 0 and Ew(t)w T (s) = δ(t s)i Then, the stochastic optimal output feedback regulator problem is the problem of finding the functional u(t) = f[y(τ), t 0 τ t such that the cost function: { t1 } J(u) = E [x T Qx + u T Rudt + x T (t 1 )Sx(t 1 ) t 0 is minimized. 1

2 SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL It is possible to prove that the solution of the stochastic optimal output feedback regulator problem is the same as the solution of the corresponding optimal state feedback regulator problem, eq. (1.1) and (1.2), except that in the control law (1.1) the state x(t) is replaced with the Kalman filter estimator ˆx(t), that is the optimal control input is chosen as: (1.4) u(t) = R 1 B T P (t)ˆx(t) where P (t) is the solution of the (RE): (1.5) (1.6) P = A T P P A + P BR 1 B T P Q P (t 1 ) = S The estimate ˆx(t) is obtained as the solution of (1.7) (1.8) ˆx(t) = Aˆx(t) + Bu(t) + L(t)[y(t) C ˆx(t) ˆx(t 0 ) = 0 where (1.9) L(t) = P (t)c T R 1 and P (t) is the solution of the (RE): (1.10) (1.11) P = AP + P A T P C T R 1 CP + Q P (t 0 ) = P 0 2. Examples 2.1. Es. 1 (from Tentamen 20 oktober 1998). Consider the following differential equation describing a simple electrical circuit: L d2 i dt 2 + R di dt + 1 C i = dw dt where i is the current and w is a standard wiener process. Suppose we simplify it, by setting R = 0. By substituting the appropriate numerical values we get: d 2 i dt 2 + i = 3v where v is a normal distributed white noise with Ev(t) = 0, Ev(t)v(s) = δ(t s) The measurement, s(t), are taken with an ampere meter where s(t) = i(t) + e(t) where e(t) is a normal distributed white noise, uncorrelated from the system noise v(t), and such that: Ee(t) = 0, Ee(t)e(s) = δ(t s) Your assignment is to determine a steady-state Kalman filter to estimate the current, i(t), from the noisy observation, {s(τ), 0 τ t}, by using the associated linear system.

SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL 3 First, let us rewrite the problem in the standard form. Let x 1 = i, and x 2 = di/dt. The, we have that: that is: and ẋ = y(t) = [ 0 [ 0 1 1 0 ẋ 1 = x 2 ẋ 2 = x 1 + 3v [ 0 x + 3 v = Ax + Bv 1 x(t) + e(t) = Cx(t) + De(t) In section 9.2.3 of the compendium it is proven that the covariance matrix of the estimation error, P (t), tends to a limit P as t. If (A, B) is completely reachable, and (A, C) is completely observable, then P is the unique positive definite symmetric solution of the (ARE): AP + P A P C (DD ) 1 CP + BB = 0 and consequently the Kalman filter gain tends to K = P C (DD ) 1 In our case the system is a minimal realization. In fact, we have that the reachability and observability matrices are: Γ = [ B AB [ [ [ 0 3 = C 0 1, Ω = = 3 0 CA 1 0 and they both are full rank. In order to solve the (ARE) we define the matrix P as [ p1 p P = 2 p 2 p 3 and we plug it in the (ARE): [ [ [ 0 1 p1 p 2 p1 p + 2 1 0 p 2 p 3 p 2 p 3 [ 0 1 1 0 [ p1 p 2 p 2 p 3 So, we get the following system: 2p 2 p 2 1 = 0 p 3 p 1 p 1 p 2 = 0 2p 2 p 2 2 + 3 = 0 [ 1 0 0 0 [ p1 p 2 p 2 p 3 By solving the system, and taking the solution that gives a positive definite P we get: [ 2 1 P = 1 2 2 Then, the steady state Kalman gain is: [ K = P C R 1 2 = 1 Note that the estimator system matrix is: [ 2 1 A KC = 2 0 [ 0 0 + 0 3 = 0

4 SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL which has the following eigenvalues: (2) χ A KC (λ) = (λ + + 2 1 2 2 ) λ 1,2 = 1 3 ± i 2 2 that is, A KC is a stability matrix. 2.2. Es. 2 (from Tentamen 1981). Consider the system: ẋ = x + 2u y = x + e where x(0) N (0, 3), and e is a process of independent, normal distributed increments, with Ee = 0, Ee 2 = 2. We want to determine a control input û(t, ˆx) such that the cost function: T J(u) = E( 2x 2 + u 2 dt) t is minimized. a: Determine the optimal feedback gain, K(t), and the optimal estimator gain, L(t). b: Suppose there is an additive, non-white noise with independent, normal distributed increments and with correlation function e τ. That is, the process is described by: ẋ = x + 2u + w, x(0) N (0, 3) Let T =, and determine the optimal steady-state gains K and L under the assumption that e and w are independent. Hint: Use the following equation for w(t): where E(v) = 0 and E(v) 2 = 2 c: Is the overall system stable? dw(t) = wdt + dv a: By using the separation principle, we can first design an optimal feedback gain, where we neglect the measurement noise. Then, we can design an optimal estimator, where instead we take into account the noise. The problem in the usual LQ framework becomes: subject to min u J(u) = T t ẋ = x + 2u (2x 2 + u 2 )dt The optimal control input is û = Kx where: K = R 1 B T P = 2P and P is the solution of the (RE) P (T ) P = A T P P A + P BR 1 B T P Q = S

SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL 5 that is P = 2P + 4P 2 2 P (T ) = 0 In order to solve the previous nonlinear scalar differential equation, we suppose that P (t) has the following form: P (t) = k ż(t) z(t) If we substitute it in the original differential equation we get that: k z z k ż2 z 2 = 2k ż z 2 ż2 + 4k2 2 z k z z + ż2 z 2 ( k 4k2 ) + 2k ż z + 2 If we take k = 1/4 the expression simplifies and finally we get that: z + 2ż 8z = 0 z(t) = c 1 e 4t + c 2 e 2t P (t) = 1 4c 1 e t + 2c 2 e 2t 4 c 1 e 4t + c 2 e 2t = 1 2 By imposing P (T ) = 0, we finally get: P (t) = e 6(t T ) 1 e 6(t T ) + 2 = and hence, the optimal control input is: u(t, x) = 2 e 6(t T ) 1 e 6(t T ) + 2 x 2e 6t c e 6t + c Next, we have to find the optimal estimator (Kalman-Buchy filter). In this case we do not consider the input u. We have that: ẋ = x y = x + 2v where x(0) N (0, 3), and v(t) is white noise uncorrelated from x(0) and with Ev(t)v(s) = δ(t s). This is a standard problem with: A = 1, B = 0,, C = 1, D = 2 Therefore, the optimal estimator is given by: with P (t) solution to the (RE): where L(t) = P (t)c T R 1 P = A T P + P A P C T R 1 CP + Q P (0) = P 0 R = DD T, Q = BB T By inserting the numerical values, we get: L(t) = 2P (t), R = 2,, Q = 0,, P 0 = 3

6 SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL and the (RE) becomes: P = 2P P 2 /2 P (0) = 3 We can solve the differential equation by using the following substitution P (t) = 1 z(t) : ż + 2z 1/2 = 0 which can be easily solved: z(0) = 1/3 z(t) = 1 12 e 2t + 1 4 And so we have that the optimal gain is: 6 L(t) = e 2t + 3 and the optimal estimator is: dˆx dt = ˆx + 2u + L(t)(y ˆx) ˆx(0) = 0 b: We have that the overall system can be described by the following equations: ẋ = x + w + 2u ẇ = w + v y = x + e with x 0 and w 0 independent processes such that: [ [ x0 [ 3 0 Ex 0 = Ew 0 = 0, E x0 w 0 = 0 1 w 0 We introduce the new variable z = [x T, w T T and we determine the gains K and L by using the separation principle, like before. First, we consider the previous system without measurement noise, e(t), and we solve the corresponding LQ problem. That is, we have the following linear system: [ [ 1 1 2 ż = z + u 0 1 0 y = [ 1 0 z and we want to minimize the cost function: J(u) = 0 (2y 2 + u 2 )dt To solve this LQ problem we have to check if the realization is minimal. The reachability and observability matrices are: Γ = [ B AB [ [ [ 2 2 C =, Ω = = 2 0 0 0 CA 2 2 Unfortunately, the system is not completely reachable. Clearly, we can not control the noise w(t)! However, since the system is asymptotically stable,

SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL 7 the (ARE) has anyway a positive definite solution. So, the optimal solution, û, is given by: û = Kz with K = B T P and where the matrix P is the unique positive solution of the (ARE): where A P + P A P BB P + Q = 0 [ 2 0 Q = 00 By inserting the numerical values, we get: [ [ [ [ [ 1 0 p1 p 2 p1 p + 2 1 1 p1 p 2 1 1 p 2 p 3 p 2 p 3 0 1 p 2 p 3 So, we get the following system: 2p 2 1 + 2 4p 2 1 = 0 p 2 + p 1 p 2 4p 1 p 2 = 0 2(p 2 p 3 ) 4p 2 2 = 0 [ 4 0 0 0 [ p1 p 2 p 2 p 3 By solving the system, and taking the solution that gives a positive definite P we get: [ 1 1/4 P = > 0 1/4 1/8 and so, the optimal gain, K, is: K = [ 2 0 [ 1 1/4 = [ 2 1/2 1/4 1/8 Next, we have to determine the optimal observer, that is the Kalman- Bucy filter. We have the following system: [ [ 1 1 ż = z + 2 0 v 0 1 y = [ 1 0 z + 2η Therefore, we have a standard problem with the following numerical data: [ [ 1 1 A =, B = 2 0, C = [ 1 0, D = 2 0 1 [ R = DD = 2, Q = BB 0 0 = 0 2 Note that in this case the realization is minimal. In fact, we have that the reachability and observability matrices are: Γ = [ B AB [ 0 2 =, Ω = 2 2 [ C CA = [ 1 0 1 1 So, we know we have an unique positive solution to the (ARE). The steadystate Kalman filter gain L is given by: L = P C T R 1 and where the matrix P is the unique positive solution of the (ARE): AP + P A P C R 1 CP + Q = 0 [ 2 0 + 0 0 = 0

8 SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL By inserting the numerical values, we get: [ [ [ [ [ [ 1 1 p1 p 2 p1 p + 2 1 0 p1 p 2 1/2 0 0 1 p 2 p 3 p 2 p 3 1 1 p 2 p 3 0 0 with solution (we obtained it numerically) [ 4.3947 0.4337 P = 0.4337 0.9530 and the Kalman gain becomes K = P C T R 1 = [ 2.1974 0.2168 [ [ p1 p 2 0 0 + p 2 p 3 0 2 c: The overall system is stable according to the theory studied in chapter 8 and 9 of the compendium. However, we can check it by computing the eigenvalues of the matrix: [ A + BK BK 0 A LC That is, the eigenvalues of A + BK and of A LC: χ A+BK (λ) = (λ + 3)(λ + 1) λ 1,2 = 3, 1 χ A LC (λ) = (λ + 1) 2 + 1 λ 1,2 = 1, 1.1974 1 and so the overall system is asymptotically stable. = 0