MPC Infeasibility Handling

Similar documents
Regional Solution of Constrained LQ Optimal Control

1 Computing with constraints

Course on Model Predictive Control Part II Linear MPC design

Nonlinear Model Predictive Control Tools (NMPC Tools)

A Constraint-Reduced MPC Algorithm for Convex Quadratic Programming, with a Modified Active-Set Identification Scheme

10 Numerical methods for constrained problems

5.6 Penalty method and augmented Lagrangian method

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

A New Penalty-SQP Method

Lecture 13: Constrained optimization

Quadratic Programming

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

Learning Model Predictive Control for Iterative Tasks: A Computationally Efficient Approach for Linear System

Part 4: Active-set methods for linearly constrained optimization. Nick Gould (RAL)

Numerical Optimization. Review: Unconstrained Optimization

Algorithms for constrained local optimization

CO350 Linear Programming Chapter 6: The Simplex Method

2.098/6.255/ Optimization Methods Practice True/False Questions


5 Handling Constraints

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

Optimization. Yuh-Jye Lee. March 21, Data Science and Machine Intelligence Lab National Chiao Tung University 1 / 29

Algorithms for Constrained Optimization

Support Vector Machine (continued)

ISM206 Lecture Optimization of Nonlinear Objective with Linear Constraints

Numerical optimization

Optimization Problems in Model Predictive Control

EE C128 / ME C134 Feedback Control Systems

Numerical optimization. Numerical optimization. Longest Shortest where Maximal Minimal. Fastest. Largest. Optimization problems

Optimality Conditions for Constrained Optimization

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

Lecture 18: Optimization Programming

NONLINEAR. (Hillier & Lieberman Introduction to Operations Research, 8 th edition)

Numerical Optimization Professor Horst Cerjak, Horst Bischof, Thomas Pock Mat Vis-Gra SS09

Support Vector Machine (SVM) & Kernel CE-717: Machine Learning Sharif University of Technology. M. Soleymani Fall 2012

Convex Optimization and SVM

A Warm-start Interior-point Method for Predictive Control

IE 5531: Engineering Optimization I

4TE3/6TE3. Algorithms for. Continuous Optimization

LINEAR PROGRAMMING I. a refreshing example standard form fundamental questions geometry linear algebra simplex algorithm

Chapter 2: Linear Programming Basics. (Bertsimas & Tsitsiklis, Chapter 1)

Multidisciplinary System Design Optimization (MSDO)

Math 273a: Optimization The Simplex method

Lecture slides by Kevin Wayne

MS&E 318 (CME 338) Large-Scale Numerical Optimization

Nonlinear Optimization for Optimal Control

4. The Dual Simplex Method

Prediktivno upravljanje primjenom matematičkog programiranja

2.3 Linear Programming

CE 191: Civil & Environmental Engineering Systems Analysis. LEC 17 : Final Review

IV. Violations of Linear Programming Assumptions

Homework Solution # 3

Efficient Numerical Methods for Nonlinear MPC and Moving Horizon Estimation

Academic Editor: Dominique Bonvin Received: 26 November 2016; Accepted: 13 February 2017; Published: 27 February 2017

Infeasibility Detection and an Inexact Active-Set Method for Large-Scale Nonlinear Optimization

Support Vector Machine (SVM) and Kernel Methods

Optimization. Yuh-Jye Lee. March 28, Data Science and Machine Intelligence Lab National Chiao Tung University 1 / 40

AN AUGMENTED LAGRANGIAN AFFINE SCALING METHOD FOR NONLINEAR PROGRAMMING

Support Vector Machine (SVM) and Kernel Methods

Interior-Point and Augmented Lagrangian Algorithms for Optimization and Control

Support Vector Machines: Maximum Margin Classifiers

CE 191: Civil and Environmental Engineering Systems Analysis. LEC 05 : Optimality Conditions

Hot-Starting NLP Solvers

Decision Procedures An Algorithmic Point of View

Constrained Optimization

Written Examination

CS711008Z Algorithm Design and Analysis

Nonlinear Programming (Hillier, Lieberman Chapter 13) CHEM-E7155 Production Planning and Control

Interior Point Methods in Mathematical Programming

ECE7850 Lecture 9. Model Predictive Control: Computational Aspects

Chapter 3, Operations Research (OR)

Benders Decomposition

Analytic Center Cutting-Plane Method

5.5 Quadratic programming

Support Vector Machines

Generalization to inequality constrained problem. Maximize

Lecture 3. Optimization Problems and Iterative Algorithms

4F3 - Predictive Control

Convex Optimization and Support Vector Machine

What s New in Active-Set Methods for Nonlinear Optimization?

EE363 homework 2 solutions

POWER SYSTEMS in general are currently operating

Lecture 9: Large Margin Classifiers. Linear Support Vector Machines

Constrained Nonlinear Optimization Algorithms

CHAPTER 2: QUADRATIC PROGRAMMING

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

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

Part II: Model Predictive Control

Support Vector Machine (SVM) and Kernel Methods

Dr. Maddah ENMG 500 Engineering Management I 10/21/07

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

The simplex algorithm

Section Notes 9. IP: Cutting Planes. Applied Math 121. Week of April 12, 2010

An Inexact Sequential Quadratic Optimization Method for Nonlinear Optimization

Introduction to Model Predictive Control. Dipartimento di Elettronica e Informazione

Part 1. The Review of Linear Programming

Convex Optimization. Prof. Nati Srebro. Lecture 12: Infeasible-Start Newton s Method Interior Point Methods

Lecture 10: Linear programming duality and sensitivity 0-0

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

Optimization Problems with Constraints - introduction to theory, numerical Methods and applications

Transcription:

MPC Handling Thomas Wiese, TU Munich, KU Leuven supervised by H.J. Ferreau, Prof. M. Diehl (both KUL) and Dr. H. Gräb (TUM) October 9, 2008 1 / 42

MPC General MPC Strategies 2 / 42

Linear Discrete-Time Dynamic Systems - Simple Car Model - Quarter Car Model Linear Model Predictive Control Receding Horizon - Receding Horizon MPC General 3 / 42

Linear Discrete-Time Dynamic Systems Linear Discrete-Time Dynamic Systems - Simple Car Model - Quarter Car Model Linear Model Predictive Control Receding Horizon - Receding Horizon We consider the following linear discrete-time dynamic system which shall be steered to a setpoint: x k+1 = Ax k + Bu k x and u are referred to as states and inputs of the system. example car and quarter car MPC General 4 / 42

- Simple Car Model Linear Discrete-Time Dynamic Systems - Simple Car Model - Quarter Car Model Linear Model Predictive Control Receding Horizon - Receding Horizon (ẋ ) ẍ = ( ) ( ) 0 1 x 0 0 ẋ + ( ) 0 u 1 MPC General 5 / 42

- Quarter Car Model Linear Discrete-Time Dynamic Systems - Simple Car Model - Quarter Car Model Linear Model Predictive Control Receding Horizon - Receding Horizon MPC General 6 / 42

Linear Model Predictive Control Linear Discrete-Time Dynamic Systems - Simple Car Model - Quarter Car Model Linear Model Predictive Control Receding Horizon - Receding Horizon State-space approach Prediction of system behavior Quadratic cost function Hard input and output constraints Results in a nonlinear control law MPC General 7 / 42

Linear Discrete-Time Dynamic Systems - Simple Car Model - Quarter Car Model Linear Model Predictive Control Receding Horizon - Receding Horizon MPC General The linear MPC can be formulated as follows: minimize a cost function Φ(u 0,u 1,...) = k=0,1,... such that the constraints x k+1 x ref,k+1 2 W x + u k 2 W u G u u k b u G x x k+1 b x are satisfied for all future k and the x k are determined by the system dynamics and where x 0 is known. 8 / 42

Receding Horizon Linear Discrete-Time Dynamic Systems - Simple Car Model - Quarter Car Model Linear Model Predictive Control Receding Horizon - Receding Horizon MPC General Infinitely many optimization variables Solution Cut off the sum at term N (N = horizon ) Apply only the first control Repeat at every time step The solution can be found by solving a Quadratic Program (QP) and must be available within the sampling time. 9 / 42

- Receding Horizon Linear Discrete-Time Dynamic Systems - Simple Car Model - Quarter Car Model Linear Model Predictive Control Receding Horizon - Receding Horizon MPC General 10 / 42

MPC - Short Horizon - Car Model - Measurement noise General MPC 11 / 42

MPC - Short Horizon - Car Model - Measurement noise General An MPC problem is called infeasible at time step t (t = 0 in the following) if the constraints cannot be satisfied. How can this happen? The problem is ill-posed The states are subject to measurement errors The prediction or control horizon is too short The predictions are not correct (model/plant mismatch) 12 / 42

- Short Horizon - Car Model MPC - Short Horizon - Car Model - Measurement noise General 13 / 42

- Measurement noise MPC - Short Horizon - Car Model - Measurement noise General 14 / 42

MPC of MPC General 15 / 42

of MPC MPC By elminating the states, the MPC can be expressed as a parametric Quadratic Program (QP): of MPC General subject to 1 min x 2 xt Qx + gx T 0 x Gx b x0 where the gradient g x0 and b x0 depend linearly on the parameter x 0. 16 / 42

MPC General Relaxation Exactness Guaranteeing Exactness 1/2 Guaranteeing Exactness 2/2 Many Objectives General 17 / 42

Relaxation MPC General Relaxation Exactness Guaranteeing Exactness 1/2 Guaranteeing Exactness 2/2 Many Objectives Reformulate MPC such that it is guaranteed to be feasible: min Φ(u 0,...,u N ) = N x k+1 x ref,k+1 2 W x + u k 2 W u k=0 such that the relaxed constraints G u u k ub u + ε G x x k+1 ub x + ε are satisfied for all k {0,...,N} and the x k are determined by the system dynamics and where x 0 is known. 18 / 42

Exactness MPC General Relaxation Exactness Guaranteeing Exactness 1/2 Guaranteeing Exactness 2/2 Many Objectives Strength of MPC: Hard Constraints. To preserve hard constraints the infeasibility handling strategy must be exact. A strategy is called exact if it only relaxes the constraints when the problem is infeasible. 19 / 42

Guaranteeing Exactness 1/2 MPC Embed MPC into a bigger optimization problem: First check for feasibility (e.g. by solving a Linear Program) General Relaxation Exactness Guaranteeing Exactness 1/2 Guaranteeing Exactness 2/2 Many Objectives If feasible: solve original problem Else: solve relaxed problem = 2-step algorithm 20 / 42

Guaranteeing Exactness 2/2 MPC General Relaxation Exactness Guaranteeing Exactness 1/2 Guaranteeing Exactness 2/2 Many Objectives Relax original MPC problem: Formulate the MPC problem with soft constraints Introduce a big linear penalty for slack variables that guarantees exactness (Exact Soft Constraints) : Finding lower bound for the linear penalty 21 / 42

Many Objectives MPC General Relaxation Exactness Guaranteeing Exactness 1/2 Guaranteeing Exactness 2/2 Many Objectives How to return to feasibility? Regain feasibility as quick as possible Minimize total anticipated duration of constraint violations Minimize the maximal amplitude of constraint violations Minimize quadratic sum of constraint violations etc. 22 / 42

MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches 23 / 42

l Penalty One slack variable ε is introduced and the constraints are relaxed by ε. MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches Only one additional optimization variable Minimizes the maximum violation : Can result in large open-/closed-loop mismatch 24 / 42

l Penalty - MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches Before solving the original MPC problem, the following LP must be solved: subject to min ε x 0 = x 0 ε x k+1 = Ax k + Bu k G u u k b u + ε G x x k+1 b x + ε ε 0 k {0,...,N} 25 / 42

l Penalty - MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches 26 / 42

Minimum Time The minimal time τ min after which the problem is feasible again can be computed (solution of a QP and several LPs). MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches only relax constraints before τ min Time-optimal relaxation : Can result in large violations at the start High additional computational cost 27 / 42

MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches Before solving the original MPC problem, τ min must be computed (QP + several LPs). Then the following LP has to be solved: subject to x 0 = x 0 x k+1 = Ax k + Bu k G u u k b u + ε k G x x k+1 b x + ε k ε k 0 G u u k b u G x x k+1 b x min ε s T ε, s 0 k = 0,...,N k = 0,...,τ min k = 0,...,τ min k = 0,...,τ min k = τ min + 1,...,N k = τ min + 1,...,N 28 / 42

MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches 29 / 42

l 1 Penalty MPC Introduce independent slack variables ε k for each constraint. Minimizes the total sum of constraint violations General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches : High additional computational cost 30 / 42

l 1 Penalty - MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches Before solving the original MPC problem, the following LP must be solved: subject to min ε s T ε, s 0 x 0 = x 0 x k+1 = Ax k + Bu k G u u k b u + ε k G x x k+1 b x + ε k ε k 0 k {0,...,N} 31 / 42

l 1 Penalty - MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l1 Penalty - Other Approaches 32 / 42

Other Approaches MPC General l Penalty l Penalty - l Penalty - Minimum Time l 1 Penalty l 1 Penalty - l 1 Penalty - Other Approaches priority based approach: remove constraints in hierarchical order only relax constraints which are later in time (e.g. if infeasibility due to model/plant mismatch) 33 / 42

MPC General Active Set QP Solver Feasible Parameter Space and Critical Regions Homotopy Infeasible Parameter Relaxed QP Relaxed KKT-System Continuity of the Solution Summary 34 / 42

Active Set QP Solver MPC General Active Set QP Solver Feasible Parameter Space and Critical Regions Homotopy Infeasible Parameter Relaxed QP Relaxed KKT-System Continuity of the Solution Summary At the optimal solution, several constraints are active, others inactive. If the set of active constraints is known beforehand, the QP can be reformulated: 1 min x 2 xt Qx + gx T 0 x s.t. G A x = b A,x0 ignoring the inactive constraints. The optimal solution can be found by solving the KKT-system: ( ) ( ) ( ) Q G T A x gx0 = G A 0 λ b A,x0 35 / 42

Feasible Parameter Space and Critical Regions MPC General The parameter space can be divided into critical regions. Each critical region has a certain set G CR A of active constraints at the optimal solution. Active Set QP Solver Feasible Parameter Space and Critical Regions Homotopy Infeasible Parameter Relaxed QP Relaxed KKT-System Continuity of the Solution Summary 36 / 42

Homotopy MPC If we know the optimal solution at x 0, a homotopy to the new optimal solution at x new 0 can be performed. General Active Set QP Solver Feasible Parameter Space and Critical Regions Homotopy Infeasible Parameter Relaxed QP Relaxed KKT-System Continuity of the Solution Summary At each boundary one constraint is added or removed from the active set. 37 / 42

Infeasible Parameter What happens, if a parameter is not inside the feasible set? MPC General Active Set QP Solver Feasible Parameter Space and Critical Regions Homotopy Infeasible Parameter Relaxed QP Relaxed KKT-System Continuity of the Solution Summary 38 / 42

Relaxed QP MPC Only the newly active constraint c j is relaxed, the following optimization problem is solved: General Active Set QP Solver Feasible Parameter Space and Critical Regions Homotopy Infeasible Parameter Relaxed QP Relaxed KKT-System Continuity of the Solution Summary subject to Gx b 1 min x 2 xt Qx + g T x + 1 2 h εε 2 c T j x b j + ε row j dropped 39 / 42

Relaxed KKT-System MPC General Active Set QP Solver Feasible Parameter Space and Critical Regions Homotopy Infeasible Parameter Relaxed QP Relaxed KKT-System Continuity of the Solution Summary The KKT-system is modified accordingly: h ε 1 1 ε 0 Q G T A c j x λ = g b A µ b j G A c T j ε and µ can be eliminated from the system: ε = c T j x b j, µ = h ε ε = h ε (c T j x b j ) ( Q + hε c j c T j G T A G A 0 ) ( ) x λ = ( ) g + hε b j c j b A 40 / 42

Continuity of the Solution MPC General Active Set QP Solver Feasible Parameter Space and Critical Regions Homotopy Infeasible Parameter Relaxed QP Relaxed KKT-System Continuity of the Solution Summary The solutions of the old system and the modified system coincide at the boundary. The homotopy can be continued with a modified Hessian matrix. The Cholesky decomposition of Q can be updated by a rank-1 update, which is computationally cheap. ε will be supervised and removed when it becomes zero. Removal of an infeasible constraint works exactly as addition, but with inverse signs. 41 / 42

Summary MPC General Active Set QP Solver Feasible Parameter Space and Critical Regions Homotopy Infeasible Parameter Relaxed QP Relaxed KKT-System Continuity of the Solution Summary The strategy is exact (as long as the problem is feasible) Very low additional computational cost No additional computational cost when the problem is feasible Possible open-/closed-loop mismatch (open question) 42 / 42