Linear Parameter Varying and Time-Varying Model Predictive Control

Similar documents
Model Predictive Control

PROPORTIONAL-Integral-Derivative (PID) controllers

CHAPTER 2 CONTINUOUS STIRRED TANK REACTOR PROCESS DESCRIPTION

arxiv: v1 [cs.sy] 2 Oct 2018

Integral action in state feedback control

Prediktivno upravljanje primjenom matematičkog programiranja

Robust Model Predictive Control for Autonomous Vehicle/Self-Driving Cars

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

ECE7850 Lecture 9. Model Predictive Control: Computational Aspects

Recovering from a Gradual Degradation in MPC Performance

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

Model predictive control of industrial processes. Vitali Vansovitš

Chap 4. State-Space Solutions and

Model Predictive Control New tools for design and evaluation

Reachable set computation for solving fuel consumption terminal control problem using zonotopes

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

ANFIS Gain Scheduled Johnson s Algorithm based State Feedback Control of CSTR

Time-Invariant Linear Quadratic Regulators!

Decentralized Linear Time-Varying Model Predictive Control of a Formation of Unmanned Aerial Vehicles

Model Predictive Control Design for Nonlinear Process Control Reactor Case Study: CSTR (Continuous Stirred Tank Reactor)

ESC794: Special Topics: Model Predictive Control

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

ADAPTIVE TEMPERATURE CONTROL IN CONTINUOUS STIRRED TANK REACTOR

BITS-Pilani Dubai, International Academic City, Dubai Second Semester. Academic Year

Model Predictive Control For Interactive Thermal Process

The simplified model now consists only of Eq. 5. Degrees of freedom for the simplified model: 2-1

Power Systems Control Prof. Wonhee Kim. Modeling in the Frequency and Time Domains

Nonlinear Model Predictive Control Tools (NMPC Tools)

Overview of Models for Automated Process Control

Online Model Predictive Torque Control for Permanent Magnet Synchronous Motors

On Practical Applications of Active Disturbance Rejection Control

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

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

Modeling and Control of Chemical Reactor Using Model Reference Adaptive Control

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

Example of Multiparametric Solution. Explicit Form of Model Predictive Control. via Multiparametric Programming. Finite-Time Constrained LQR

= 1 τ (C Af C A ) kc A. τ = V q. k = k(t )=k. T0 e E 1. γ = H ρc p. β = (ρc p) c Vρc p. Ua (ρc p ) c. α =

arxiv: v1 [cs.sy] 20 Dec 2017

ROBUST STABLE NONLINEAR CONTROL AND DESIGN OF A CSTR IN A LARGE OPERATING RANGE. Johannes Gerhard, Martin Mönnigmann, Wolfgang Marquardt

An LMI Approach to the Control of a Compact Disc Player. Marco Dettori SC Solutions Inc. Santa Clara, California

Optimizing Economic Performance using Model Predictive Control

EE 474 Lab Part 2: Open-Loop and Closed-Loop Control (Velocity Servo)

CONTROLLER PERFORMANCE ASSESSMENT IN SET POINT TRACKING AND REGULATORY CONTROL

Course on Model Predictive Control Part II Linear MPC design

Stochastic and Adaptive Optimal Control

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

YOULA KUČERA PARAMETRISATION IN SELF TUNING LQ CONTROL OF A CHEMICAL REACTOR

Stable Hierarchical Model Predictive Control Using an Inner Loop Reference Model

Identification of a Chemical Process for Fault Detection Application

H-Infinity Controller Design for a Continuous Stirred Tank Reactor

Distributed and Real-time Predictive Control

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

sc Control Systems Design Q.1, Sem.1, Ac. Yr. 2010/11

AADECA 2006 XXº Congreso Argentino de Control Automático ITERATIVE LEARNING CONTROL APPLIED TO NONLINEAR BATCH REACTOR E.J.

Systems and Control Theory Lecture Notes. Laura Giarré

ECE Introduction to Artificial Neural Network and Fuzzy Systems

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

Linear Matrix Inequality (LMI)

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

UCLA Chemical Engineering. Process & Control Systems Engineering Laboratory

Adaptive Robust Control

Solutions to Final Exam Sample Problems, Math 246, Spring 2011

Postface to Model Predictive Control: Theory and Design

YTÜ Mechanical Engineering Department

I. D. Landau, A. Karimi: A Course on Adaptive Control Adaptive Control. Part 9: Adaptive Control with Multiple Models and Switching

Part II: Model Predictive Control

Course Background. Loosely speaking, control is the process of getting something to do what you want it to do (or not do, as the case may be).

Principles of Optimal Control Spring 2008

Topic # Feedback Control Systems

Stability and feasibility of MPC for switched linear systems with dwell-time constraints

Model Predictive Controller of Boost Converter with RLE Load

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

MATHEMATICAL MODELING OF CONTROL SYSTEMS

Solutions for Tutorial 10 Stability Analysis

Multiple Model Based Adaptive Control for Shell and Tube Heat Exchanger Process

Exam. 135 minutes + 15 minutes reading time

Model Predictive Control of Magnetic Automotive Actuators

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

MIMO Identification and Controller design for Distillation Column

FAULT-TOLERANT CONTROL OF CHEMICAL PROCESS SYSTEMS USING COMMUNICATION NETWORKS. Nael H. El-Farra, Adiwinata Gani & Panagiotis D.

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

Temperature Control of CSTR Using Fuzzy Logic Control and IMC Control

93 Analytical solution of differential equations

Automatic Control 2. Nonlinear systems. Prof. Alberto Bemporad. University of Trento. Academic year

Dynamic Optimal Control!

Solving Differential Equations Using MATLAB

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

Model Predictive Control of Hybrid Systems. Model Predictive Control of Hybrid Systems. Receding Horizon - Example. Receding Horizon Philosophy

Regional Solution of Constrained LQ Optimal Control

Active Fault Diagnosis for Uncertain Systems

Control Systems Lab - SC4070 Control techniques

Nonlinear State Estimation! Extended Kalman Filters!

Process Modelling, Identification, and Control

4F3 - Predictive Control

MODELING OF CONTROL SYSTEMS

9. Two-Degrees-of-Freedom Design

Optimal control and estimation

Journal of Process Control

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

EE C128 / ME C134 Feedback Control Systems

Transcription:

Linear Parameter Varying and Time-Varying Model Predictive Control Alberto Bemporad - Model Predictive Control course - Academic year 016/17 0-1

Linear Parameter-Varying (LPV) MPC LTI prediction model ( xk+1 = A(p(t))x k + B u (p(t))u k + B v (p(t))v k y k = C(p(t))x k + D v (p(t))v k Model depends on time t but does not change in prediction quadratic performance index NX 1 min kw y (y k r(t))k + kw u (u k u ref (t))k U k=0 QP min z 1 s.t. z0 H(p(t))z + 0 (t)f (p(t)) 0 z G(p(t))z apple W (p(t))+s(p(t)) (t) constraints ( umin apple u k apple u max y min apple y k apple y max All QP matrices are constructed on line LPV models can be obtained from linearization of nonlinear models or from black-box LPV system identification 0 -

Linear Time-Varying (LTV) MPC LTV prediction model ( xk+1 = A k (p(t))x k + B uk (p(t))u k + B vk (p(t))v k y k = C k (p(t))x k + D vk (p(t))v k Model depends on time t and prediction step k quadratic performance index NX 1 min kw y (y k r(t))k + kw u (u k u ref (t))k U k=0 QP min z 1 s.t. z0 H(p(t))z + 0 (t)f (p(t)) 0 z G(p(t))z apple W (p(t))+s(p(t)) (t) constraints ( umin apple u k apple u max y min apple y k apple y max LTV-MPC still leads to a convex QP LTV models can be obtained from linearizing NL models around time-varying reference trajectories (e.g.: previous optimal trajectory) 0 -

LTV-MPC example 1.4 Output 1. 1 0.8 0.6 0.4 0. mpcmoveadaptive mpcmovetimevarying mpcmove 0 0 5 10 15 0 5 0 5 40 45 50 Process model is LTV: LTV-MPC is quite good d y y dt +d dt +dy + (6 + sin(5t))y dt =5 du dt + (5 + cos(5 t))u LPV-MPC tries to catch-up with time-varying model LTI-MPC is not good (See demo TimeVaryingMPCControlOfATimeVaryingLinearSystemExample, MPC Toolbox) 0-4

LTV-MPC example Define LTV model Models = tf; ct = 1; for t = 0:0.1:10 Models(:,:,ct) = tf([5 5+*cos(.5*t)],[1 6+sin(5*t)]); ct = ct + 1; end Ts = 0.1; % sampling time Models = ss(cd(models,ts)); Design MPC controller sys = ss(cd(tf([5 5],[1 6]),Ts)); % average model time p = ; % prediction horizon m = ; % control horizon mpcobj = mpc(sys,ts,p,m); mpcobj.mv = struct('min',-,'max',); % input constraints mpcobj.weights = struct('mv',0,'mvrate',0.01,'output',1); 0-5

LTV-MPC example Simulate LTV system with LTI MPC controller for ct = 1:(Tstop/Ts+1) real_plant = Models(:,:,ct); % Get the current plant y = real_plant.c*x; u = mpcmove(mpcobj,xmpc,y,1); % Apply LTI MPC x = real_plant.a*x + real_plant.b*u; end Simulate LTV system with LPV MPC controller for ct = 1:(Tstop/Ts+1) real_plant = Models(:,:,ct); % Get the current plant y = real_plant.c*x; u = mpcmoveadaptive(mpcobj,xmpc,real_plant,nominal,y,1); x = real_plant.a*x + real_plant.b*u; end 0-6

LTV-MPC example Simulate LTV system with LTV MPC controller for ct = 1:(Tstop/Ts+1) real_plant = Models(:,:,ct); % Get the current plant y = real_plant.c*x; u = mpcmoveadaptive(mpcobj,xmpc,models(:,:,ct:ct+p),... Nominals,y,1); x = real_plant.a*x + real_plant.b*u; end Simulate in Simulink A B C Clock Zero-Order Hold t D U Y X DX Time Varying Predictive Model model mo ref Adaptive MPC mv t y u Time-Varying Plant ysim To Workspace1 mpc_timevarying.mdl 1 Reference Adaptive MPC Controller usim To Workspace 0-7

LTV-MPC example Simulink block need to provide D array of future models mpc_timevarying.mdl 0-8

Linearization and TIme-Discretization Assume model is nonlinear and continuous-time dx dt = f(x(t),u(t)) Linearize around a nominal state x(t) and input u(t), such as: - an equilibrium - a reference trajectory - the most updated value dx dt (t + ) ' @f @x x(t),ū(t) (x(t + ) + @f @u x(t),ū(t) (u(t + ) x(t)) ū(t)) + f(x(t),u(t)) Conversion to discrete-time linear prediction model discrete-time LPV model A(t)! @f x k+1 = I + T s x k + @x x(t),ū(t) B(t) f(t)! @f T s u k + f k @u x(t),ū(t) model matrices depend on current time t 0-9

Example: LPV-MPC of a nonlinear CSTR system MPC control of a diabatic continuous stirred tank reactor (CSTR) Process model is nonlinear: F Tf CAf dc A dt dt dt = F V (C Af C A ) C A k 0 e E RT = F V (T f T )+ UA C p V (T j T ) H C p C A k 0 e E RT T : temperature inside the reactor [K] (state) T Tj CA C A : concentration of the reagent in the reactor [kgmol/m ] (state) T j : jacket temperature [K] (input) T f : feedstream temperature [K] (measured disturbance) C Af : feedstream concentration [kgmol/m ] (measured disturbance) Objective: manipulate Tj to regulate CA on desired set-point >> edit ampccstr_linearization (MPC Toolbox) 0-10

Example: LPV-MPC of a nonlinear CSTR system Process model >> mpc_cstr_plant 1 CAi Ti Tc Feed Concentration Feed Temperature Coolant Temperature CSTR Reactor Temperature Reactor Concentration 1 T CA % Create operating point specification. plant_mdl = 'mpc_cstr_plant'; op = operspec(plant_mdl); op.inputs(1).u = 10; % Feed concentration known @initial condition op.inputs(1).known = true; op.inputs().u = 98.15; % Feed concentration known @initial condition op.inputs().known = true; op.inputs().u = 98.15; % Coolant temperature known @initial condition op.inputs().known = true; [op_point, op_report] = findop(plant_mdl,op); % Compute initial condition % Obtain nominal values of x, y and u. x0 = [op_report.states(1).x;op_report.states().x]; y0 = [op_report.outputs(1).y;op_report.outputs().y]; u0 = [op_report.inputs(1).u;op_report.inputs().u;op_report.inputs().u]; % Obtain linear plant model at the initial condition. sys = linearize(plant_mdl, op_point); sys = sys(:,:); % First plant input CAi dropped because not used by MPC 0-11

Example: LPV-MPC of a nonlinear CSTR system MPC design (1/) % Discretize the plant model Ts = 0.5; % hours plant = cd(sys,ts); % Design MPC Controller % Specify signal types used in MPC plant.inputgroup.measureddisturbances = 1; plant.inputgroup.manipulatedvariables = ; plant.outputgroup.measured = 1; plant.outputgroup.unmeasured = ; plant.inputname = {'Ti','Tc'}; plant.outputname = {'T','CA'}; % Create MPC controller with default prediction and control horizons mpcobj = mpc(plant); % Set nominal values in the controller mpcobj.model.nominal = struct('x', x0, 'U', u0(:), 'Y', y0, 'DX', [0 0]); 0-1

Example: LPV-MPC of a nonlinear CSTR system MPC design (/) % Set scale factors because plant input and output signals have different orders of magnitude Uscale = [0 50]; Yscale = [50 10]; mpcobj.dv(1).scalefactor = Uscale(1); mpcobj.mv(1).scalefactor = Uscale(); mpcobj.ov(1).scalefactor = Yscale(1); mpcobj.ov().scalefactor = Yscale(); % Let reactor temperature T float (i.e. with no setpoint tracking error penalty), because the objective is to control reactor concentration CA and only one manipulated variable (coolant temperature Tc) is available. mpcobj.weights.ov = [0 1]; % Due to the physical constraint of coolant jacket, Tc rate of change is bounded by degrees per minute. mpcobj.mv.ratemin = -; mpcobj.mv.ratemax = ; 0-1

Example: LPV-MPC of a nonlinear CSTR system Simulink diagram Measurement Noise u0(1) u0() Disturbance CAi Ti Tc plant model CSTR T CA Reactor Feed Temperature u0(1) [x] A T A [x] B B [x] C CA C [x] D D [x1] CAi U U [x1] Y Y Ti [x1] X X [x1] DX DX Tc [x1] poles Successive Linearizer [x] [x] [x] [x] [x1] [x1] [x1] [x1] Poles 8{4} [x1] Pole Concentration True Estimated Selector Coolant mv est.state Adaptive MPC model mo ref md Adaptive MPC Controller Reference 8{4} 0 CA Reference linearize + discretize Copyright 1990-014 The MathWorks, Inc. LPV-MPC >> ampc_cstr_linearization 0-14

Example: LPV-MPC of a nonlinear CSTR system Closed-loop results 0-15

Example: LTI-MPC of a nonlinear CSTR system Let us try with a fixed (LTI) MPC controller Noise u0(1) CAi CAi T Reactor u0() Ti Ti Tc CA Feed Disturbance CSTR Temperature Coolant mo LTI-MPC mv MPC ref md 0 CA Reference MPC Controller Reference Concentration True Copyright 1990-014 The MathWorks, Inc. Same tuning of MPC parameters 0-16

Example: LTI-MPC of a nonlinear CSTR system Closed-loop results very bad tracking! 0-17

Example: LTI-MPC of a nonlinear CSTR system Closed-loop results 0-18

Example: LTV-MPC for UAV navigation Goal: navigate two planar vehicles among obstacles to a target position The dynamical model of each vehicles is described by p(t) = 0 s + 0 s + 0 p c (t) p = [x,y] vehicle position pc = commanded position Vehicle dynamics converted to discrete-time by exact sampling Five square obstacles placed in workspace 0-19

LTV-MPC for obstacle avoidance Goal: Use linear time-varying (LTV) MPC to generate desired positions to stabilizing controller in real-time to avoid obstacles and other UAVs Problem: feasible space is non-convex! target position Main idea: get a convex inner approximation of the feasible space that is Polyhedral =linear constraints on predicted states in LTV-MPC problem Very simple to compute on-line initial position Can handle polytopic obstacles of arbitrary shape and dimension Alternative: non-convex feasible space modeled by mixed-integer constraints, guidance problem solved by (time-invariant) hybrid MPC (Bemporad, Rocchi, IFAC 011) 0-0

Fast greedy approximation algorithm (1/) Assume (for the moment) that vehicle and obstacles are points in space (Bemporad, Rocchi, CDC 011) p 0 R d = current vehicle position qm q 1,q,...,q M R d = obstacle positions p0 q Polyhedral approximation: q1 P = 8 >< >: p Rd : 6 4 (q 1 p 0 ) 0. (q M p 0 ) 0 7 5 p apple 6 4 (q 1 p 0 ) 0 q 1. (q M p 0 ) 0 q M 9 >= 7 5 >; p 0 6= q i, 8i =1,...,M P contains p0 and does not contain any of the obstacles q1, q,..., qm in its interior 0-1

Fast greedy approximation algorithm (/) Assume now polyhedral obstacles with shapes W1, W,... WM WM For each obstacle j define the scalar g j qm g j = min wr d (q j p 0 ) 0 w s.t. w W j p0 If the vertices of WM are available, simply g j = min h=1,...,s j A j cw jh (wjh = vertex of Wj) q W Polyhedral approximation: P = 8 >< >: p Rd : 6 4 (q 1 p 0 ) 0. (q M p 0 ) 0 7 5 p apple 6 4 (q 1 p 0 ) 0 q 1 + g 1. (q M p 0 ) 0 q M + g M 9 >= 7 5 >; q1 W1 If P is nonempty, then P contains p0 and does not contain any of the obstacles B j = {q j } in its interior W j 0 -

Fast greedy approximation algorithm (/) Assume polyhedral obstacles and polytopic UAV qm WM V, conv(p 0 + d 1,...,p 0 + d r ) V q W p0 q1 Polyhedral approximation: 8 >< (q 1 p 0 ) 0 P = >: p 6 Rd : 4. (q M p 0 ) 0 7 5 p apple 6 4 (q 1 p 0 ) 0 (q 1 d i )+g 1. (q M p 0 ) 0 (q M d i )+g M W1 9 >= 7 5, i =1,...,r >; If P is nonempty, then P contains V and does not contain any of the obstacles B j = {q j } in its interior W j 0 -

LTV-MPC guidance algorithm: prediction model Linear approximation of stabilized dynamics of UAV #i p i (t + 1) = A i p i (t)+b i p ci (t) p i (t) = Polytopic shape of UAV #i at time t p ci (t) = 4 x i(t) y i (t) z i (t) 4 x ci(t) y ci (t) z ci (t) 5 position of vehicle #i at time t 5 position commanded at time t V(t) ={p(t)} + conv(d 1 (t),...,d r (t)) p(t) V(t) Polyhedral shape of obstacle #j at time t B j (t) ={q j (t)} W j (t) qj(t) Bj(t) Note: other vehicles in formation are treated as polytopic obstacles (Bj = V ) 0-4

LTV-MPC guidance algorithm: optimization model At time t, select the desired position pc(t) for the UAV by solving the optimal control problem (=quadratic programming) prediction horizon min + N 1 X k=0 desired position kw y (p k p d (t))k + kw u (p c,k p c,k 1 )k s.t. bounds on p k+1 = Ap k + Bp c,k, k =0,...,N 1 input min apple p c,k p c,k 1 apple max, k =0,...,N u 1 increments A c,k p k apple b c,k + g k A c,k d h,k +1I k =0,...,N 1, h =1,...,r i p c,k = p c,nu 1, k = N u,...,n blocked moves UAV dynamics (soft)obstacl e avoidance constraints A c = 6 4 (q 1 p 0 ) 0. (q M p 0 ) 0 7 5, b c = 6 4 (q 1 p 0 ) 0 q 1. (q M p 0 ) 0 q M 7 5 0 -

Example: navigation demo Initial position #1 = (0,0) Target position #1 = (5,0) Initial position # = (5,-) Target position # = (0,0) ROBMPC project Robust Model Predictive Control (MPC) for Space Constrained Systems MPCSofT Toolbox for MATLAB (Bemporad, 010-011) 0-6

Example: navigation demo (cooperative MPC) Two vehicles avoiding each other and obstacles towards their targets vehicle dynamics #1 vehicle dynamics # MPC # MPC #1 previous optimal sequences are exchanged 0-7