4F3 - Predictive Control

Similar documents
4F3 - Predictive Control

Theory in Model Predictive Control :" Constraint Satisfaction and Stability!

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

Regional Solution of Constrained LQ Optimal Control

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

Efficient robust optimization for robust control with constraints Paul Goulart, Eric Kerrigan and Danny Ralph

EE C128 / ME C134 Feedback Control Systems

LMI Methods in Optimal and Robust Control

Model Predictive Control Short Course Regulation

Lecture 9: Discrete-Time Linear Quadratic Regulator Finite-Horizon Case

Robust Model Predictive Control

4F3 - Predictive Control

ECE7850 Lecture 9. Model Predictive Control: Computational Aspects

ESC794: Special Topics: Model Predictive Control

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

IMPROVED MPC DESIGN BASED ON SATURATING CONTROL LAWS

Enlarged terminal sets guaranteeing stability of receding horizon control

EE363 homework 2 solutions

Appendix A Solving Linear Matrix Inequality (LMI) Problems

Homework Solution # 3

A Globally Stabilizing Receding Horizon Controller for Neutrally Stable Linear Systems with Input Constraints 1

FINITE HORIZON ROBUST MODEL PREDICTIVE CONTROL USING LINEAR MATRIX INEQUALITIES. Danlei Chu, Tongwen Chen, Horacio J. Marquez

Linear Quadratic Regulator (LQR) Design I

N. L. P. NONLINEAR PROGRAMMING (NLP) deals with optimization models with at least one nonlinear function. NLP. Optimization. Models of following form:

CONSTRAINED MODEL PREDICTIVE CONTROL ON CONVEX POLYHEDRON STOCHASTIC LINEAR PARAMETER VARYING SYSTEMS. Received October 2012; revised February 2013

Introduction to Model Predictive Control. Dipartimento di Elettronica e Informazione

Principles of Optimal Control Spring 2008

MODEL PREDICTIVE CONTROL FUNDAMENTALS

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

Lecture Note #6 (Chap.10)

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

An Introduction to Model-based Predictive Control (MPC) by

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

Improved MPC Design based on Saturating Control Laws

Linear Quadratic Regulator (LQR) I

Whither discrete time model predictive control?

Duality Theory of Constrained Optimization

6.252 NONLINEAR PROGRAMMING LECTURE 10 ALTERNATIVES TO GRADIENT PROJECTION LECTURE OUTLINE. Three Alternatives/Remedies for Gradient Projection

Model predictive control of industrial processes. Vitali Vansovitš

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

Robustly stable feedback min-max model predictive control 1

LINEAR-CONVEX CONTROL AND DUALITY

Numerical Methods for Model Predictive Control. Jing Yang

IEOR 265 Lecture 14 (Robust) Linear Tube MPC

1. Type your solutions. This homework is mainly a programming assignment.

Paris'09 ECCI Eduardo F. Camacho MPC Constraints 2. Paris'09 ECCI Eduardo F. Camacho MPC Constraints 4

Part II: Model Predictive Control

ECE557 Systems Control

Lecture 2 and 3: Controllability of DT-LTI systems

ECE 275B Homework # 1 Solutions Version Winter 2015

Constrained Linear Quadratic Optimal Control

Problem 1 Cost of an Infinite Horizon LQR

EE C128 / ME C134 Final Exam Fall 2014

Nonlinear Model Predictive Control Tools (NMPC Tools)

Control Systems Lab - SC4070 Control techniques

Optimized Robust Control Invariant Tubes. & Robust Model Predictive Control

1 Strict local optimality in unconstrained optimization

UCLA Chemical Engineering. Process & Control Systems Engineering Laboratory

Online Model Predictive Torque Control for Permanent Magnet Synchronous Motors

ECE 275B Homework # 1 Solutions Winter 2018

ESTIMATES ON THE PREDICTION HORIZON LENGTH IN MODEL PREDICTIVE CONTROL

Chapter 2 Optimal Control Problem

Solving Minimax Problems with Feasible Sequential Quadratic Programming

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

Efficient Robust Optimization for Robust Control with Constraints

Prediktivno upravljanje primjenom matematičkog programiranja

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

1 Computing with constraints

Time-Invariant Linear Quadratic Regulators!

LQ and Model Predictive Control (MPC) of a tank process

PDE-Constrained and Nonsmooth Optimization

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

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

Rotational Motion Control Design for Cart-Pendulum System with Lebesgue Sampling

minimize x subject to (x 2)(x 4) u,

Lecture 11 and 12: Penalty methods and augmented Lagrangian methods for nonlinear programming

MPC Infeasibility Handling

Inexact Newton Methods and Nonlinear Constrained Optimization

ECE7850 Lecture 7. Discrete Time Optimal Control and Dynamic Programming

Hamilton-Jacobi-Bellman Equation Feb 25, 2008

Module 02 CPS Background: Linear Systems Preliminaries

Exam. 135 minutes, 15 minutes reading time

Lecture 6: Conic Optimization September 8

Equilibrium points: continuous-time systems

Optimal control and estimation

Nonlinear Optimization for Optimal Control

An Inexact Newton Method for Nonlinear Constrained Optimization

Prashant Mhaskar, Nael H. El-Farra & Panagiotis D. Christofides. Department of Chemical Engineering University of California, Los Angeles

Course on Model Predictive Control Part II Linear MPC design

Lecture 5 Linear Quadratic Stochastic Control

CAAM 454/554: Stationary Iterative Methods

MODEL PREDICTIVE CONTROL and optimization

Lecture 6. Foundations of LMIs in System and Control Theory

Optimization Tutorial 1. Basic Gradient Descent

Piecewise-affine functions: applications in circuit theory and control

Quasi-Newton methods for minimization

A new low-and-high gain feedback design using MPC for global stabilization of linear systems subject to input saturation

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

( 3) ( ) ( ) ( ) ( ) ( )

ECE7850 Lecture 8. Nonlinear Model Predictive Control: Theoretical Aspects

Transcription:

4F3 Predictive Control - Lecture 3 p 1/21 4F3 - Predictive Control Lecture 3 - Predictive Control with Constraints Jan Maciejowski jmm@engcamacuk

4F3 Predictive Control - Lecture 3 p 2/21 Constraints on System Variables In practice, system variables are always constrained by: Physical limitations Input constraints eg actuator limits State constraints eg reservoir capacities Safety considerations (eg critical temperatures/pressures) Performance specifications (eg limit overshoot) constraints 1 y 1 4 output set point 1 y 2 3 1 y 3 3 15 y 4 3 15 y 5 3 time

4F3 Predictive Control - Lecture 3 p 3/21 Systems with Input Saturation A common system nonlinearity is input saturation x(k + 1) = Ax(k) + B sat(u(k)) y(k) = Cx(k) (nonlinear) Easily transformed into a constraint on a linear system: u {i} u {i} ū {i} u sat (u) where v {i} is the i th component (row) of a column vector v

4F3 Predictive Control - Lecture 3 p 4/21 Constrained LQR Problem Problem: Given an initial state x(0) at time k = 0, compute and implement an input sequence {u(0),u(1),,} that minimizes the infinite horizon cost function ( ) x(k) T Qx(k) + u(k) T Ru(k) i=0 while guaranteeing that constraints are satisfied for all time It is usually impossible to solve this problem Predictive control provides an approximate solution RHC laws with constraints will be nonlinear

4F3 Predictive Control - Lecture 3 p 5/21 Constrained Finite Horizon Optimal Control Problem: Given an initial state x = x(k), compute a finite horizon input sequence {u 0,u 1,,u N 1 } that minimizes the finite horizon cost function x T NPx N + N 1 ) (x Ti Qx i + u Ti Ru i i=0 where x 0 = x x i+1 = Ax i + Bu i, i = 0, 1,,N 1 while guaranteeing that all constraints are satisfied over the prediction horizon i 0, 1,,N

4F3 Predictive Control - Lecture 3 p 6/21 Receding Horizon Control input output set point constraint constraint time k k + 1 time 1 Obtain measurement of current output/state 2 Compute optimal finite horizon input sequence subject to constraints 3 Implement first part of optimal input sequence 4 Return to step 1

4F3 Predictive Control - Lecture 3 p 6/21 Receding Horizon Control input output set point constraint constraint time k k + 1 time 1 Obtain measurement of current output/state 2 Compute optimal finite horizon input sequence subject to constraints 3 Implement first part of optimal input sequence 4 Return to step 1

4F3 Predictive Control - Lecture 3 p 6/21 Receding Horizon Control input output set point constraint constraint time k k + 1 time 1 Obtain measurement of current output/state 2 Compute optimal finite horizon input sequence subject to constraints 3 Implement first part of optimal input sequence 4 Return to step 1

4F3 Predictive Control - Lecture 3 p 6/21 Receding Horizon Control input output set point constraint constraint time k k + 1 time 1 Obtain measurement of current output/state 2 Compute optimal finite horizon input sequence subject to constraints 3 Implement first part of optimal input sequence 4 Return to step 1

4F3 Predictive Control - Lecture 3 p 7/21 Prediction Matrices Recall that we previously solved for the sequence of predicted states X in terms of the stacked inputs U: x 1 x 2 x N := A A 2 A N x 0 + B 0 0 AB B 0 A N 1 B A N 2 B B u 0 u 1 u N 1 or, defining x := x 0, X := Φx + ΓU The matrices Φ and Γ are the prediction matrices

4F3 Predictive Control - Lecture 3 p 8/21 Incorporating Constraints Now incorporate a set of linear inequality constraints on the predicted states x i and inputs u i M i x i + E i u i b i, for all i = 0, 1,,N 1 M N x N b N Many constraints take this form: M s = 0 Input constraints only E s = 0 State constraints only Can include constraints on outputs or controlled variables For simplicity, assume that E i = E, M i = M and b i = b for i = 0, 1,,N 1

4F3 Predictive Control - Lecture 3 p 9/21 Writing Constraints in Standard Form Suppose we have the following input and output constraints: u low u i u high, i = 0, 1,,N 1 y low y i y high, i = 0, 1,,N Recalling that y i = Cx i, this is equivalent to: 0 0 C +C x i + I +I 0 u i 0 u low +u high y low +y high for i = 0, 1,,N 1 Similar expression for terminal constraint (in terms of x N only)

4F3 Predictive Control - Lecture 3 p 10/21 Writing Constraints in Standard Form From the previous example, we can write the constraints in the form: by defining: M i x i + E i u i b i, for all i = 0, 1,,N 1 M N x N b N 0 I 0 +I M i :=, E i :=, b i := C 0 +C 0 u low +u high y low +y high, for i = 0, 1,,N 1 and M N := C, b N := +C y low +y high

Writing Constraints in Terms of x, X and U Taking all of the constraints together: M 0 0 0 x 0 + 0 0 M 1 0 0 M N x 1 x N + E 0 0 0 E N 1 0 0 u 0 u N 1 b 0 b 1 u N By appropriately defining D, M, E and c (recalling x := x 0 ): Dx + MX + EU c Next, will eliminate X using prediction matrices 4F3 Predictive Control - Lecture 3 p 11/21

4F3 Predictive Control - Lecture 3 p 12/21 Writing Constraints in Terms of x and U Substitute X = Φx + ΓU into Dx + MX + EU c and collect terms The constraints can be written in the form: where and JU c + Wx J := MΓ + E W := D MΦ Our constraints are now in terms of the input sequence U and the initial state x = x 0 = x(k)

4F3 Predictive Control - Lecture 3 p 13/21 Writing Constraints in Terms of x and U In summary, the basic procedure is: Define linear inequalities in u i, x i, y i and z i Write the constraints in the form: M i x i + E i u i b i, for all i = 0, 1,,N 1 M N x N b N Stack the constraints to get them in the form: Dx + MX + EU c Substitute X = Φx + ΓU and rearrange to the form: JU c + Wx

4F3 Predictive Control - Lecture 3 p 14/21 Cost Function Recall that the cost function V (x,u) := x T NPx N + N 1 ) (x Ti Qx i + u Ti Ru i i=0 can be rewritten (with x := x 0 ) as V (x,u) = 1 2 UT GU + U T Fx + x T (Q + Φ T ΩΦ)x }{{} not dependent on U for some matrices F, G and Ω (defined in lecture 2) Remember that G 0 if P 0, Q 0 and R 0

4F3 Predictive Control - Lecture 3 p 15/21 Quadratic Programming Definition Quadratic Program (QP) Given matrices Q and A and vectors c and b, the optimization problem: subject to: is called a quadratic program (QP) 1 min θ 2 θt Qθ + c T θ Aθ b Proposition If Q 0 in the above quadratic program, then 1) The optimization problem is strictly convex 2) A global minimizer can always be found 3) The global minimizer is unique

4F3 Predictive Control - Lecture 3 p 16/21 Nature of Solutions to QPs θ 2 constrained minimum constraints Aθ b level set of cost function unconstrained minimum θ 1

4F3 Predictive Control - Lecture 3 p 17/21 Writing Problems as QPs Many problem types can be cast as QPs: Example: Nonlinear constraint subject to: 1 min θ 2 θt Qθ + c T θ max{e T θ,f T θ} b subject to: 1 min θ 2 θt Qθ + c T θ e T θ b, f T θ b Example: Nonlinear cost function subject to: min θ c T θ Aθ b subject to: min θ,δ δ Aθ b c T θ δ 0 c T θ δ 0

4F3 Predictive Control - Lecture 3 p 18/21 Constrained Optimal Control as a QP Our constrained optimal control problem is: min U subject to: 1 2 UT GU + U T Fx JU c + Wx This is a quadratic program in standard form Substitute θ U Q G c Fx A J b (c + Wx) The optimal solution is 1 A global minimum (when G 0) 2 Unique (when G 0)

4F3 Predictive Control - Lecture 3 p 19/21 Solution via Quadratic Programming Some QP parameters are functions of the current state x Without constraints, U (x) is a linear function of x With constraints, U (x) is nonlinear Must calculate U (x) by solving a QP online for each x See JMM 32 and 33 for an introduction to solving QPs In Matlab, our QP can be solved using U = quadprog(g,f*x,j,c+wx)

4F3 Predictive Control - Lecture 3 p 20/21 Implementing the RHC Law The RHC input is the first part of the optimal input sequence: ( ) κ rhc (x) := u 0(x) = I m 0 0 U (x) Since U (x) is no longer linear, κ rhc : R n R m is a nonlinear control law The dynamics of the closed loop system are nonlinear x(k + 1) = Ax(k) + Bκ rhc (x) κ rhc ( ) (QP Solver) u(k) DT System x(k)

4F3 Predictive Control - Lecture 3 p 21/21 Complexity of Solutions Example: Double integrator x(k + 1) = 1 1 x(k) + 0 u(k) 0 1 1 Constraints: 6 4 Solution: Controller with 57 regions Each region i has u 0(x) = v i + K i x u 1, y 12 Horizon length = 12 Quadratic cost with Q = 1 0, R = 1, P = 1 0 1 x {2} 2 0 2 4 6 x {1} 10 5 0 5 10