CDS 110b: Lecture 2-1 Linear Quadratic Regulators

Similar documents
Homework Solution # 3

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

MATH4406 (Control Theory) Unit 6: The Linear Quadratic Regulator (LQR) and Model Predictive Control (MPC) Prepared by Yoni Nazarathy, Artem

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

Autonomous Mobile Robot Design

Problem 1 Cost of an Infinite Horizon LQR

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

CDS 101/110a: Lecture 10-2 Control Systems Implementation

CDS 110b: Lecture 1-2 Introduction to Optimal Control

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

Topic # Feedback Control Systems

CDS 101/110a: Lecture 2.1 Dynamic Behavior

EE C128 / ME C134 Feedback Control Systems

Lecture 9. Systems of Two First Order Linear ODEs

Lecture 5 Linear Quadratic Stochastic Control

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

Control Systems I. Lecture 2: Modeling. Suggested Readings: Åström & Murray Ch. 2-3, Guzzella Ch Emilio Frazzoli

Linear-Quadratic Optimal Control: Full-State Feedback

ECE7850 Lecture 7. Discrete Time Optimal Control and Dynamic Programming

Optimal Control. McGill COMP 765 Oct 3 rd, 2017

Lecture 4 Continuous time linear quadratic regulator

Exam 1 Review. IEA Section 2 2/5/2018 Section 3 2/5/2018

IEOR 265 Lecture 14 (Robust) Linear Tube MPC

Optimization-Based Control

Time-Invariant Linear Quadratic Regulators!

A Tour of Reinforcement Learning The View from Continuous Control. Benjamin Recht University of California, Berkeley

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

Optimal control and estimation

Optimization-Based Control. Richard M. Murray Control and Dynamical Systems California Institute of Technology

Math Partial Differential Equations

CDS 101: Lecture 5-1 Reachability and State Space Feedback

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

Optimal Control Theory

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

CDS 101/110a: Lecture 2.1 Dynamic Behavior

Optimization-Based Control

EE363 Review Session 1: LQR, Controllability and Observability

MATH 251 Ordinary and Partial Differential Equations Summer Semester 2017 Syllabus

CDS 101/110a: Lecture 1.1 Introduction to Feedback & Control. CDS 101/110 Course Sequence

Math/EECS 1028M: Discrete Mathematics for Engineers Winter Suprakash Datta


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

Supplemental Instruction

4F3 - Predictive Control

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

1 Steady State Error (30 pts)

Linear Algebra. P R E R E Q U I S I T E S A S S E S S M E N T Ahmad F. Taha August 24, 2015

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

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

Control Systems I. Lecture 2: Modeling and Linearization. Suggested Readings: Åström & Murray Ch Jacopo Tani

Physics 2D Lecture Slides Lecture 1: Jan

1300 Linear Algebra and Vector Geometry Week 2: Jan , Gauss-Jordan, homogeneous matrices, intro matrix arithmetic

Optimal Control. Lecture 3. Optimal Control of Discrete Time Dynamical Systems. John T. Wen. January 22, 2004

ESC794: Special Topics: Model Predictive Control

ESC794: Special Topics: Model Predictive Control

Nonlinear Optimization for Optimal Control Part 2. Pieter Abbeel UC Berkeley EECS. From linear to nonlinear Model-predictive control (MPC) POMDPs

Lecture 2: Discrete-time Linear Quadratic Optimal Control

CDS 110: Lecture 2-2 Modeling Using Differential Equations

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

Proof by contrapositive, contradiction

Models for Control and Verification

Math 3B: Lecture 1. Noah White. September 23, 2016

CDS 101: Lecture 2.1 System Modeling

Linear State Feedback Controller Design

Lecture 5. September 4, 2018 Math/CS 471: Introduction to Scientific Computing University of New Mexico

AMME3500: System Dynamics & Control

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

ECE317 : Feedback and Control

Optimization-Based Control

= 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

CDS 270-2: Lecture 6-1 Towards a Packet-based Control Theory

Robust Multivariable Control

Nonlinear Optimal Tracking Using Finite-Horizon State Dependent Riccati Equation (SDRE)

PHYS 111 HOMEWORK #5

Contents. 1 State-Space Linear Systems 5. 2 Linearization Causality, Time Invariance, and Linearity 31

EE221A Linear System Theory Final Exam


Optimal Control Theory SF 2852

Lecture 10 Linear Quadratic Stochastic Control with Partial State Observation

EE C128 / ME C134 Final Exam Fall 2014

Computational Modeling for Physical Sciences

MATH 425-Spring 2010 HOMEWORK ASSIGNMENTS

Welcome, Physics Majors!

EE363 homework 2 solutions

Announcements. Topics: Homework: - sections 2.2, 2.3, 4.1, and 4.2 * Read these sections and study solved examples in your textbook!

APPPHYS 217 Tuesday 6 April 2010

Physics 2D Lecture Slides Lecture 1: Jan

MATH 345 Differential Equations

Natural Science I: Quarks to Cosmos V Spring 2010 Meyer 121

Physics I: Oscillations and Waves Prof. S. Bharadwaj Department of Physics and Meteorology. Indian Institute of Technology, Kharagpur

MAT188H1S LINEAR ALGEBRA: Course Information as of February 2, Calendar Description:

Optimal Control - Homework Exercise 3

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

Physics 101 covers. Forces Kinematics Energy/Momentum Rotations Fluids Waves/Sound Thermodynamics. Physics 101: Lecture 1, Pg 1

Course Staff. Textbook

Physics 2BL: Experiments in Mechanics and Electricity Summer Session I, 2012

6. Linear Quadratic Regulator Control

Prediktivno upravljanje primjenom matematičkog programiranja

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

Transcription:

CDS 110b: Lecture 2-1 Linear Quadratic Regulators Richard M. Murray 11 January 2006 Goals: Derive the linear quadratic regulator and demonstrate its use Reading: Friedland, Chapter 9 (different derivation, but same result) RMM course notes (available on web page) Lewis and Syrmos, Section 3.3 Homework #2 Design LQR controllers for some representative systems Due Wed, 18 Jan by 5 pm, in box outside 109 Steele 11 Jan 06 R. M. Murray, Caltech 1

Review from last lecture Trajectory Generation Controller Process Estimator Trajectory Generation via Optimal Control: Today: focus on special case of a linear quadratic regulator 11 Jan 06 R. M. Murray, Caltech 2

Problem Statement Linear Quadratic Regulator (finite time) Factor of 1/2 simplifies some math below; optimality is not affected Solution: use the maximum principle This is still a two point boundary value problem hard to solve Note that solution is linear in x (because is linear in x, treated as an input) 11 Jan 06 R. M. Murray, Caltech 3

Simplified Form of the Solution Can simplify solution by guessing that = P(t) x(t) From maximum principle Substitute = P(t) x(t) Solution exists if we can find P(t) satisfying This equation is called the Riccati ODE; matrix differential equation Can solve for P(t) backwards in time and then apply u(t) = -R -1 B P(t) x Solving x(t) forward in time gives optimal state (and input): x * (t), u * (t) Note that P(t) can be computed once (ahead of time) allows us to find the optimal trajectory from different points just by re-integrating state equation with optimal input 11 Jan 06 R. M. Murray, Caltech 4

Finite Time LQR Summary Trajectory Generation X Controller Process Estimator Problem: find trajectory that minimizes Solution: time-varying linear feedback Note: this is in feedback form can actually eliminate the controller (!) 11 Jan 06 R. M. Murray, Caltech 5

Infinite Time LQR Extend horizon to T = and eliminate terminal constraint: Solution: same form, but can show P is constant Remarks In MATLAB, K = lqr(a, B, Q, R) Require R > 0 but Q 0 + must satisfy observability condition Alternative form: minimize output y = H x State feedback (constant gain) Algebraic Riccati equation Require that (A, H) is observable. Intuition: if not, dynamics may not affect cost ill-posed. We will study this in more detail when we cover observers 11 Jan 06 R. M. Murray, Caltech 6

Applying LQR Control Trajectory Generation Controller Process Estimator Application #1: trajectory generation Solve for (x d, y d ) that minimize quadratic cost over finite horizon (requires linear process) Use local controller to regulate to desired trajectory Application #2: trajectory tracking Solve LQR problem to stabilize the system to the origin feedback u = K x Can use this for local stabilization of any desired trajectory Missing: so far, have assumed we want to keep x small (versus x x d ) 11 Jan 06 R. M. Murray, Caltech 7

LQR for trajectory tracking Goal: design local controller to track x d : u d Trajectory Generation x d e Controller v Process Estimator x Approach: regulate the error dynamics Let e = x - x d, v = u - u d and assume f(x, u) = f(x) + g(x) u (simplifies notation) Now linearize the dynamics around e = 0 and design controller v = K e Final control law will be u = K (x - x d ) + u d Note: in general, linearization will depend on x d u = K(x d )x gain scheduling 11 Jan 06 R. M. Murray, Caltech 8

Choosing LQR weights Most common case: diagonal weights Weight each state/input according to how much it contributes to cost Eg: if error in x 1 is 10x as bad as error in x 2, then q 1 = 10 q 2 OK to set some state weights to zero, but all input weights must be > 0 Remember to take units into account: eg for ducted fan if position error is in meters and pitch error is in radians, weights will have different units Remarks LQR will always give a stabilizing controller, but no gauranteed margins LQR shifts design problem from loop shaping to weight choices Most practical design uses LQR as a first cut, and then tune based on system performance 11 Jan 06 R. M. Murray, Caltech 9

Example: Ducted Fan ( x, y) f 2 f 1 Stabilization: Given an equilibrium position (x d, y d ) and equilibrium thrust f 2d, maintain stable hover Full state available for feedback Equations of motion Tracking: Given a reference trajectory (x r (t), y r (t)), find a feasible trajectory and a controller u = (x, x d, u d ) such that x x d LQR design: see lqr_dfan.m (available on course web page) 11 Jan 06 R. M. Murray, Caltech 10

Variation: Integral Action u d Trajectory Generation x d e Controller v Process Estimator x Limitation in LQR control: perfect tracking requires perfect model Control law is u = K (x - x d ) + u d. u d must be perfect to hold e = 0 Alternative: use integral feedback to give zero steady state error integral of (output) error Now design LQR controller for extended system (including integrator weight) equilibrium value y = r 0 steady state error 11 Jan 06 R. M. Murray, Caltech 11

Example: Cruise Control Linearized around v 0 : Step 1: augment linearized (error) dynamics with integrator Step 2: choose LQR weights and compute LQR gains Step 3: implement controller Note: linearized about v 0 but try to maintain speed r (near v 0 ) PI controller 11 Jan 06 R. M. Murray, Caltech 12

Summary: LQR Control Trajectory Generation Controller Process Estimator Application #1: trajectory generation Solve for (x d, y d ) that minimize quadratic cost over finite horizon Use local controller to track trajectory Application #2: trajectory tracking Solve LQR problem to stabilize the system Solve algebraic Riccati equation to get state gain Can augment to track trajectory; integral action 11 Jan 06 R. M. Murray, Caltech 13

Announcements Mailing list If you didn t get e-mail about TA office hours, send email to murray@cds Late homework policy No late homework with out prior permission Usually willing to give a few extra days the first time you ask Sickness, conferences and other unavoidable conflicts usually work Lecture recordings Will be posting audio recordings of lectures (along with slides) on web site 11 Jan 06 R. M. Murray, Caltech 14