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

Similar documents
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)

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

6 OUTPUT FEEDBACK DESIGN

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

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

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

Optimization-Based Control

EECS C128/ ME C134 Final Wed. Dec. 15, am. Closed book. Two pages of formula sheets. No calculators.

EL2520 Control Theory and Practice

Robust Control 5 Nominal Controller Design Continued

Linear State Feedback Controller Design

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

State Feedback and State Estimators Linear System Theory and Design, Chapter 8.

Lecture 7 : Generalized Plant and LFT form Dr.-Ing. Sudchai Boonto Assistant Professor

5. Observer-based Controller Design

EE C128 / ME C134 Final Exam Fall 2014

Homework Solution # 3

Lecture 7 LQG Design. Linear Quadratic Gaussian regulator Control-estimation duality SRL for optimal estimator Example of LQG design for MIMO plant

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

D(s) G(s) A control system design definition

State Feedback and State Estimators Linear System Theory and Design, Chapter 8.

Computer Problem 1: SIE Guidance, Navigation, and Control

CDS 110b: Lecture 2-1 Linear Quadratic Regulators

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

TRACKING AND DISTURBANCE REJECTION

6.241 Dynamic Systems and Control

Autonomous Mobile Robot Design

Problem 1: Ship Path-Following Control System (35%)

Final Exam Solutions

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

EE363 Review Session 1: LQR, Controllability and Observability

Steady State Kalman Filter

Optimization-Based Control

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

SYSTEMTEORI - KALMAN FILTER VS LQ CONTROL

Optimization-Based Control

Control Systems Design

EE221A Linear System Theory Final Exam

H 2 Optimal State Feedback Control Synthesis. Raktim Bhattacharya Aerospace Engineering, Texas A&M University

Lecture 12. Upcoming labs: Final Exam on 12/21/2015 (Monday)10:30-12:30

Lecture 10 Linear Quadratic Stochastic Control with Partial State Observation

MATH4406 (Control Theory) Unit 1: Introduction Prepared by Yoni Nazarathy, July 21, 2012

Übersetzungshilfe / Translation aid (English) To be returned at the end of the exam!

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

Dr Ian R. Manchester

Comparison of Feedback Controller for Link Stabilizing Units of the Laser Based Synchronization System used at the European XFEL

State Feedback MAE 433 Spring 2012 Lab 7

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

CDS 101/110a: Lecture 8-1 Frequency Domain Design

Controls Problems for Qualifying Exam - Spring 2014

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

Automatic Control II Computer exercise 3. LQG Design

DO NOT DO HOMEWORK UNTIL IT IS ASSIGNED. THE ASSIGNMENTS MAY CHANGE UNTIL ANNOUNCED.


AERT 2013 [CA'NTI 19] ALGORITHMES DE COMMANDE NUMÉRIQUE OPTIMALE DES TURBINES ÉOLIENNES

Control Systems Design

1. LQR formulation 2. Selection of weighting matrices 3. Matlab implementation. Regulator Problem mm3,4. u=-kx

Predictive Control of Gyroscopic-Force Actuators for Mechanical Vibration Damping

Lecture 2 and 3: Controllability of DT-LTI systems

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

Contents. PART I METHODS AND CONCEPTS 2. Transfer Function Approach Frequency Domain Representations... 42

Control Systems Lab - SC4070 Control techniques

EE363 homework 2 solutions

ECEEN 5448 Fall 2011 Homework #4 Solutions

An Introduction to Control Systems

Control Systems. Design of State Feedback Control.

MS-E2133 Systems Analysis Laboratory II Assignment 2 Control of thermal power plant

Topic # Feedback Control Systems

OPTIMAL CONTROL AND ESTIMATION

Problem 1 Cost of an Infinite Horizon LQR

ECE557 Systems Control

Lecture 4 Continuous time linear quadratic regulator

EEE 184: Introduction to feedback systems

Control System Design

CONTROL DESIGN FOR SET POINT TRACKING

Control Design. Lecture 9: State Feedback and Observers. Two Classes of Control Problems. State Feedback: Problem Formulation

Linear System Theory. Wonhee Kim Lecture 1. March 7, 2018

LQG/LTR CONTROLLER DESIGN FOR AN AIRCRAFT MODEL

EEE582 Homework Problems

Reduced Basis Method for Parametric

Optimal control and estimation

State Observers and the Kalman filter

Modern Optimal Control

Dr Ian R. Manchester Dr Ian R. Manchester AMME 3500 : Review

Multi-Model Adaptive Regulation for a Family of Systems Containing Different Zero Structures

Cross Directional Control

Topic # Feedback Control Systems

Comparison of LQR and PD controller for stabilizing Double Inverted Pendulum System

Inverted Pendulum: State-Space Methods for Controller Design

6.241 Dynamic Systems and Control

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

Pole placement control: state space and polynomial approaches Lecture 2

ẋ n = f n (x 1,...,x n,u 1,...,u m ) (5) y 1 = g 1 (x 1,...,x n,u 1,...,u m ) (6) y p = g p (x 1,...,x n,u 1,...,u m ) (7)

Linear Quadratic Regulator (LQR) Design I

Lab 6d: Self-Erecting Inverted Pendulum (SEIP)

ELEC4631 s Lecture 2: Dynamic Control Systems 7 March Overview of dynamic control systems

Lecture 5 Linear Quadratic Stochastic Control

CBE507 LECTURE IV Multivariable and Optimal Control. Professor Dae Ryook Yang

An Adaptive LQG Combined With the MRAS Based LFFC for Motion Control Systems

Transcription:

MER42 Advanced Control Lecture 9 Introduction to Kalman Filtering Linear Quadratic Gaussian Control (LQG) G. Hovland 24 Announcement No tutorials on hursday mornings 8-9am I will be present in all practical sessions from now until the end of the semester. PA for 2 hours and 15 minutes in each of the sessions PB, PC, PD and PE. Physical setups for the inverted pendulum will be in the lab this week or early next week. You can arrange individual consultations (by email) leading up to the final exam on Nov. 16.

Review State-Space Control Poles can be placed anywhere, but be careful with input saturation We have two ways of designing K: pole-placement in phase-variable form or optimal LQR control. In both cases we assume knowledge of all states. Review LQR Control from last week Linear Quadratic Regulator

LQR Scalar Case See next slide Matlab Script for Minimising J(k) Divide by b

LQR Controller Gain k 2 General form Summary LQR Controller Keep the proof for the LQR controller in mind he proof for the (steady-state) optimal observer is similar Optimal state feedback gain K R SA 1 + B A Matrices A,B in linear state-space model S S SBR Riccati solution 1 B S + Q Riccati equation Penalty Matrices Controller uning Parameters

State-feedback design using observers A) Unforced observer B) Forced observer Details of forced observer In Lecture 7 we designed the observer by pole-placement. he Kalman filter is the optimal observer. Introduction to the Kalman Filter Kalman filter invented in 196 by R. E. Kalman It is the optimal estimator under a few assumptions. First derived as a discrete filter. his is how it is thought of by many (signal processing, etc.). Kalman and Busy extended the filter to the continuous version in 1961. his is the version commonly used in control systems engineering, and the filter discussed in this presentation.

Starting Point: he State-Space Model Recall a linear system in state-space form:. Know input vector u x Ax + Bu and output vector y, y Cx as well as the matrices A, B, and C perfectly. System of first-order O.D.E. s Controller and Observer Design Controllers can be designed with full state knowledge:. x Ax + Bu y Cx u r - Kx. } x (A BK)x + Br y Cx System poles can be placed anywhere. Observers can be designed to estimate the full state from the output:. x Ax + Bu + L(y Cx) he controller and observer can be designed independently!

How to Choose Gains K and L? Controller gain K can be chosen by direct pole placement. For systems of high order, this loses physical meaning. K can be chosen in an optimal way, using the linear quadratic regulator (LQR) method, by minimising: J K R [x(t) Qx(t) + u(t) Ru(t)]dt 1 SA + A S SBR S + Q Now, how do we choose the observer gain L? B S 1 B State-Space Model with Noise In practice, there are other unknown inputs:. Disturbances on states x Ax + Bu + d y Cx + n Noise in sensors here is no obvious best way to choose L: x x x X(s) Single output system helps visualisation error in estimated state Want L small (si A) -1 (si A) -1 L D(s) + N(s) 1 + C (si A) -1 L 1 + C (si A) -1 L Want L big

Assumptions about the Noise d(t) and n(t) are stationary, zero mean, Gaussian white noise processes E[d(t)] E[n(t)] E[d(t)d(τ) ] Q δ(t-τ) E[n(t)n(τ) ] R δ (t-τ) Initial state has mean and covariance x E[x()] Q x E[(x() x )(x() x ) )] Covariances Q and R }Constant spectral densities delta function 1 Assume d(t), n(t), and x() are mutually uncorrelated E[d(t)n(t) ] E[x()d(t) ] E[x()n(t) ] Minimisation of Mean-Square Error he Kalman filter generates the linear estimate of the plant that minimises the mean square estimation error: J E[(x(t) x(t)) (x(t) x(t))] he optimal linear estimator can be found by setting the differential of the mean square error, with respect to the estimator parameters, to. Results in a necessary condition: E[(x(t) x(t))y(t) ] his results in enough equations to find the optimal gain L (using the definition of optimal above).

Kalman Filter Equations Optimal Gain Error Covariance Matrix L(t) S e (t)c R -1. where S e (t) E[(x(t) x(t))(x(t) x(t)) ] S e (t) S e (t)a + AS e (t) + Q - S e (t)c R -1 C S e (t) Ricatti Equation S e (t) can be computed off-line with numerical integration (just need S e () S ), therefore, L(t) can be computed off-line. S e (t) gives a constant measure of the error in the filter! Note: he optimal L has very similar structure to the LQR controller gain K. B replaced by C and A is transposed he Steady-State Kalman Filter What if we are going to run the system for a long time, or we don t have a good estimate of the error in the initial state? L S e C R -1 Sub-optimal Gain where S e E[(x(t) x(t))(x(t) x(t)) ] S e A + AS e + Q - S e C R -1 C S e Error Covariance Matrix Algebraic Ricatti Equation For solution to A.R.E., we can integrate S e (t) forward in time until a steady-state is reached, OR we can use the Hamiltonian matrix (better conditioned numerically). Suboptimal solution approaches optimal as time goes on. Requires (A,C) is detectable and (A,Q) is stabilisable

Proof of Steady-State Kalman Filter Equations Formulate Kalman Filter as an LQR problem x& xˆ & z x xˆ z& Az + LCz z& Ax + B u Axˆ + Bu + L( y yˆ ) z A + z C L State estimation error z LQR Analogy: C acts as B L acts as K A matrix transposed Comparison LQR and Kalman Solutions K R 1 B S LQR SA + A S SBR 1 B S + Q L L S S R e e C A R CS + 1 e AS e R S 1 e CS C e R 1 CS Note: Q and R are penalty matrices in LQR Q and R are noise covariances in Kalman Filter e Steady-State Kalman Filter + Q LQR Analogy: C acts as B L acts as K A matrix transposed

Kalman Filter: Performance Index J Optimality Criterion: Same as LQR where zx and y-y ^ u J ( x xˆ) ( y z Qz + ( y yˆ ) e yˆ ) Q( x xˆ) + ( y S ( y yˆ ) dt R( y Can be shown yˆ) dt yˆ ) R( y yˆ ) dt he Kalman filter minimises the squared prediction error Summary so Far: Kalman Filter Produces best possible state estimate under the following conditions: Gaussian process noise with covariance Q Gaussian measurement noise with covariance R Perfect knowledge of linear state-space model he state prediction error x-x ^ is optimal, ie. x-x ^ contains only zero mean white noise with smallest possible covariance.

What if the Noise is not White? Create a coloured noise filter, and add it to the system. Coloured noise filter: coloured noise output. x f (t) A f x f (t) + B f w(t) d(t) C f x f (t) white noise input Add it to original system, for a new system:. x(t) + + x. A C x(t) f B u(t) w(t) f (t) A x f f (t) y(t) [ C ] x(t) + v(t) x f (t) B f LQG Controller If a controller is designed using the LQR method, and the observer is designed using the Kalman filter, the resulting system is referred to as Linear Quadratic Gaussian (LQG) control. Advantage: We can control multivariable systems without measuring the entire state vector x. Disadvantage: he LQG controller does not have the 6 o phase margin and the gain margins of the LQR controller.

LQG Controller: Schematics Kalman Filter Gain Normal LQR design Useful Matlab Functions lqe: kalman: estim: lqg: lqgreg: Returns stationary Kalman estimator gain L Returns entire stationary Kalman estimator General estimator design (pole-placement or Kalman Filter) LQG controller (LQR + Kalman filter) Designs LQG controller given an estimator

LQG Control: Vertical-Plane Aircraft Dynamics Example from: Hung and MacFarlane, "Multivariable feedback: A quasi-classical approach", Lecture Notes in Control and Information Sciences, Vol. 4, 1982. x 1 : x 2 : x 3 : x 4 : x 5 : altitude in (m) forward speed (m/s) pitch angle (deg) pitch rate (deg/s) vertical speed (m/s) www.boeing.com/commercial/7e7 u 1 : spoiler angle (deg/1) u 2 : forward acceleration (m/s 2 ) u 3 : elevator angle (deg) Aircraft: Linearised State-Space Model x& Ax + Bu + w y Cx + v Linearised model at an operating point (for example at cruising altitude and speed) A B.12 4.419 1.575 1.132.538.1712.485.299 1 1.665.732 1.75 1.8556 1.13 1.532 C.6859 1 1 1 x 4 and x 5 are not measured. Kalman filter will be used to estimate these states.

Simulink Model Process Noise w Covariance Q Measurement Noise v Covariance R x& y Ax Cx + Bu + + v w Matrix Gains Uncontrolled Response: u x& y Ax + Bu + Cx + v w y 1 y 2 x [ 1 1 ] y 3 Q diag R Random walk when noise is integrated. Noise Covariance Q (9,9,16,1,4)

Uncontrolled Response: Sensor Noise x& Ax + Bu + y Cx + v w y 1 Sensor Noise Covariance R y 2 y 3 x [ 1 1 ] Q R diag(.1,.4,.9) Kalman Filter: Simulink Implementation Process: Hardware Kalman Filter: Software

^ Actual (y) vs Filtered (y) Measurements x ˆ x Filtered y ^ 3 ^ Actual (y) vs Filtered (y) Measurements Initial y ^ 1 Filter ransient x ˆ

^ Actual States (x) vs Filtered States (x) x 1 and x ^ 1 x 4 and x 5 are not measured. x ^ 4 x^ 5 x 2 and x ^ 2 ^ x 3 and x 3 Hence, in practice it will not be possible to verify these two estimates. Summary: Kalman Filter Example If you know the noise covariances Q and R, no tuning of the Kalman Filter is required. In practice, it is easy to estimate the noise covariance R, but Q can be difficult to estimate. Hence, fix R to the correct covariance and "tune" Q until you get satisfactory estimates. he Kalman Filter is only optimal for linear state-space models. As a control engineer you will meet the term "he Extended Kalman Filter". his filter is used on nonlinear models by frequent linearisation around the operating state estimate. he Extended Kalman Filter is not optimal.

LQG Control Separation Principle Design Observer (Kalman Filter) and Controller (LQR) separately. Simulate total system with process noise w and sensor noise v to verify your design. When simulation works satisfactorily, replace the simulated model with physical plant / process. Aircraft: LQR assuming known states x

LQR Control: Faster Altitude Response LQG Control Architecture

^ Actual (y) vs Filtered (y) Outputs Controls to zero, x ^ Actual (x) vs Filtered (x) States

Summary LQG Controller General control method for multivariable input, multivariable output systems. Optimal for linear systems with Gaussian process and measurement noise. Overcomes the limitation of full state vector knowledge. In this lecture, the regulation problem has been presented (final x) he Kalman filter works regardless of regulation or tracking. he LQG controller can be extended to reference tracking exactly the same way as the LQR controller (see lecture notes 8). Course Evaluation 3 Evaluation Forms Course: MER42 Lecturer: G. Hovland utor: J. Bray Anonymous Feedback - your feedback will only be public after exams. Use black/blue pen or HB pencil. Only one answer per question. he purpose of the feedback is to identify what teaching material is of good quality and what needs improvement in 25. Please also evaluate the CIEC lecture and workshop.