2 MPC Based on Step Response Models Closed-Loop Analysis Apart from simulation, other tools are available in the MPC Toolbox to analyze the stability and performance of a closed-loop system. We can obtain the state-space description of the closed-loop system with the command mpccl and then determine the pole locations with smpcpole Example %Construct a closed-loop system for no di sturbances % and uwt =0. Determi ne the poles of the system. cl mod mccl(pl ant, model, Kmpc1) poles= smpcpole(cl mod) Result The closed-loop system is stable if all the poles are inside or on the unit-circle Furthermore we can examine the frequency response of the closed-loop system For multivariable systems, singular values as a function of frequency can be obtained using svdf rsp. Example: (mpctutst m % Cal cul ate and pl ot the frequency response of the sensiti vi ty and compl ementary sensi tivity functi ons. -3 ny=1; in=[1: nyl; %input is r for comp. sensi tivity out =[ 1: nyl: out put is yp for comp. sensi tivity [frsp, eyefrspl= mod2frsp(cl mod, freq, out, in) plotfrsp(eyefrsp): sensitivity pl otfrsp(frsp): compl ementary sensi tivity pause; Magni tude= 1 for all frequencies chosen
2 MPC Based on Step Response Models 2-18 Closed-Loop Analysis Apart from simulation, other tools are available in the MPC Toolbox to analyze the stability and performance of a closed-loop system. We can obtain the state-space description of the closed-loop system with the command mpccl and then determine the pole locations with smpcpole. Example: (mpctutst.m) % Construct a closed-loop system for no disturbances % and uwt = 0. Determine the poles of the system. clmod = mpccl(plant,model,Kmpc1); poles = smpcpole(clmod); maxpole = max(poles) Result is: maxpole = 1.0 The closed-loop system is stable if all the poles are inside or on the unit-circle. Furthermore we can examine the frequency response of the closed-loop system. For multivariable systems, singular values as a function of frequency can be obtained using svdfrsp. Example: (mpctutst.m) % Calculate and plot the frequency response of the % sensitivity and complementary sensitivity functions. freq = [ -3,0,30]; ny = 1; in = [1:ny]; % input is r for comp. sensitivity out = [1:ny]; % output is yp for comp. sensitivity [frsp,eyefrsp] = mod2frsp(clmod,freq,out,in); plotfrsp(eyefrsp); % sensitivity pause; plotfrsp(frsp); % complementary sensitivity pause; % Magnitude = 1 for all frequencies chosen
Closed-Loop Analysis BODE PLOTS Frequency(radians/time Frequency (rad ans//ime) BODE PLOTS 10° Frequency(radians/time) 2-19
Closed-Loop Analysis 2-19 10−3 10−2 10−1 10 0 10−2 10−1 10 0 10 1 Frequency (radians/time) Log Magnitude BODE PLOTS 10−3 10−2 10−1 10 0 −100 −500 50 100 Frequency (radians/time) Phase (degrees) 10−3 10−2 10−1 10 0 100 10 1 Frequency (radians/time) Log Magnitude BODE PLOTS 10−3 10−2 10−1 10 0 −800 −600 −400 −2000 Frequency (radians/time) Phase (degrees)
2 MPC Based on Step Response Models Constrained model predictive control The control action can also be computed subject to hard constraints on the manipulated variables and the outputs Manipulated variable constraints umin(≤u(k+≤umax(0 Manipulated variable rate constraints: △u(k+D|≤△umax(0 Output variable constraints Jmin(≤y(k+1k)≤ymax( When hard constraints of this form are imposed, a quadratic program has to be solved at each time step to determine the control action and the resulting control law is generally nonlinear. The performance of such a control system has to be evaluated via simulation Simul ate and pl ot response for unmeasured step di turbance through dpl ant wi th and wi thout input constraints. No pl ant/model mi smatch, Out put Wei ght 1, Input Wei ght =0 Input Hori zon =5, Output Hori zon=20 Mi ni mum Constraint on Input =-0 4 Maxi mum Constraint on Input inf % Del ta Constraint on Input =0. 1 model= pl ant M=5;P=20 tend 245 yl [1: til [] dmodel=[1 dstep= 1: ly9, u9]= cmpc(pl ant, model, ywt, uwt, M P, tend, r, uim, ylim, tfi l ulim=[-0. 4, inf, 0.11: i mpose constraints
2 MPC Based on Step Response Models 2-20 Constrained Model Predictive Control The control action can also be computed subject to hard constraints on the manipulated variables and the outputs. Manipulated variable constraints: umin (l) ≤ u(k +l) ≤ umax (l) Manipulated variable rate constraints: |∆u(k + l)| ≤ ∆umax (l) Output variable constraints: ymin (l) ≤ y(k + l|k) ≤ ymax (l) When hard constraints of this form are imposed, a quadratic program has to be solved at each time step to determine the control action and the resulting control law is generally nonlinear. The performance of such a control system has to be evaluated via simulation. Example: (mpctutst.m) % Simulate and plot response for unmeasured step % disturbance through dplant with and without % input constraints. % No plant/model mismatch, % Output Weight = 1, Input Weight = 0 % Input Horizon = 5, Output Horizon = 20 % Minimum Constraint on Input = -0.4 % Maximum Constraint on Input = inf % Delta Constraint on Input = 0.1 model = plant; ywt = 1; uwt = 0; M = 5; P = 20; tend = 245; r = 0; ulim = [ ]; ylim = [ ]; tfilter = [ ]; dmodel = [ ]; dstep = 1; [y9,u9] = cmpc(plant,model,ywt,uwt,M,P,tend,r,... ulim,ylim,tfilter,dplant,dmodel,dstep); ulim = [ -0.4, inf, 0.1]; % impose constraints
Constrained model predictive Control ly10, u10]= cmpc(pl ant, model, ywt, uwt, M, P, tend, r, lim, ylim, filter, dpl ant, dmodel, dstep) plotall(ly9, y101,[u9, u10, del t2)
Constrained Model Predictive Control 2-21 [y10,u10] = cmpc(plant,model,ywt,uwt,M,P,tend,r,... ulim,ylim,tfilter,dplant,dmodel,dstep); plotall([y9,y10],[u9,u10],delt2); 0 50 100 150 200 250 0 0.2 0.4 0.6 0.8 1 Outputs Time 0 50 100 150 200 250 −0.6 −0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 Manipulated Variables Time
2 MPC Based on Step Response Models Application Idle speed control Process Description An idle speed control system should maintain the desired engine rpm with automatic transmission in neutral or drive. Despite sudden load changes due to the actions of air conditioning, power steering, etc, the control system should maintain smooth stable operation. Because of varying operating conditions and engine-to-engine variability inevitable in mass production, the system dynamics may change. The controller must be designed to be robust with respect to these changes. Two control inputs, bypass valve(or throttle opening and spark advance, are used to maintain the engine rpm at a desired idle speed level. For safe operation, spark advance should not change by more than 20 degrees. Also, spark advance should be at the design point at steady-state for fuel economy. Thus, spark advance is viewed both as a manipulated input and a controlled output. Control problem formulation Here we consider two different operating conditions(transmission in neutral and drive positions) and the models for the two plants are taken from the paper by Hrovat and Bodenheimer. The goal is to design a model predictive controller such that the closed loop performance at both operating conditions is good in the presence of the input constraint specified above. There is no synthesis method available which systematically generates a controller design which guarantees robust performance(or even just robust stability)in the presence of constraints. Thus, we must rely on both design and simulation tools to determine achievable performance objectives when there are both constraints and robustness requirements. The toolbox helps us toward th Consider the following system 1121 01 2. More detail on the problem formulation can be found in the paper by williams et al., "Idle ign Using an Hoo Approach, Proceedings of American Control Conference, 1989, pages1950-1956 3. D. Hrovat and B. Bodenheimer."Robust Automotive idle Control Design Based on A-Synthesis, Proceedings of American Control Conferenc
2 MPC Based on Step Response Models 2-22 Application: Idle Speed Control Process Description An idle speed control2 system should maintain the desired engine rpm with automatic transmission in neutral or drive. Despite sudden load changes due to the actions of air conditioning, power steering, etc., the control system should maintain smooth stable operation. Because of varying operating conditions and engine-to-engine variability inevitable in mass production, the system dynamics may change. The controller must be designed to be robust with respect to these changes. Two control inputs, bypass valve (or throttle) opening and spark advance, are used to maintain the engine rpm at a desired idle speed level. For safe operation, spark advance should not change by more than 20 degrees. Also, spark advance should be at the design point at steady-state for fuel economy. Thus, spark advance is viewed both as a manipulated input and a controlled output. Control Problem Formulation Here we consider two different operating conditions (transmission in neutral and drive positions) and the models for the two plants are taken from the paper by Hrovat and Bodenheimer.3 The goal is to design a model predictive controller such that the closed loop performance at both operating conditions is good in the presence of the input constraint specified above. There is no synthesis method available which systematically generates a controller design which guarantees robust performance (or even just robust stability) in the presence of constraints. Thus, we must rely on both design and simulation tools to determine achievable performance objectives when there are both constraints and robustness requirements. The toolbox helps us toward this objective. Consider the following system: 2. More detail on the problem formulation can be found in the paper by Williams et al., “Idle Speed Control Design Using an H∞ Approach,” Proceedings of American Control Conference, 1989, pages 1950–1956. 3. D. Hrovat and B. Bodenheimer, “Robust Automotive Idle Speed Control Design Based on µ-Synthesis,” Proceedings of American Control Conference, 1993, pages 1778–1783. y1 y2 G11 G21 0 1 u1 u2 Gd 0 = + w