Application: Idle Speed Control where yi is engine rpm, y2 and u are spark advance, u is bypass valve, wis torque load (unmeasured disturbance), and Gu, G21 and Gd are the corresponding transfer functions. After scaling, the constraints on spark advance become±0.7,i.e.|u2|≤0.7 Plant #1 corresponds to operation in drive at 800 rpm and a load of 30 Nm and e transfer functions are given by 9.62 2.4s+5.05 15.9(S+3)e 0.04s 2.4s+5.05 -19.1(s+3) Plant #2 corresponds to operation at 800 rpm in neutral with zero load and the transfer functions are given by 0.16s 11 47.6(s+3.5) 0.04s +22s+12.8 24+12 The goal is to design a model predictive controller such that the closed-loop performance is good for plants #1 and #2 when subjected to an unmeasured torque load disturbance 2-23
Application: Idle Speed Control 2-23 where y1 is engine rpm, y2 and u2 are spark advance, u1 is bypass valve, w is torque load (unmeasured disturbance), and G11, G21 and Gd are the corresponding transfer functions. After scaling, the constraints on spark advance become ±0.7, i.e., |u2| ≤ 0.7. Plant #1 corresponds to operation in drive at 800 rpm and a load of 30 Nm and the transfer functions are given by Plant #2 corresponds to operation at 800 rpm in neutral with zero load and the transfer functions are given by The goal is to design a model predictive controller such that the closed-loop performance is good for plants #1 and #2 when subjected to an unmeasured torque load disturbance. G11 9.62e –0.16s s 2 + + 2.4s 5.05 = ----------------------------------------- G21 15.9(s + 3 )e –0.04s s 2 + + 2.4s 5.05 = ----------------------------------------------- Gd –19.1( ) s + 3 s 2 + + 2.4s 5.05 = ---------------------------------------- G11 20.5e –0.16s s 2 + + 2.2s 12.8 = ---------------------------------------- G21 47.6(s + 3.5 )e –0.04s s 2 + + 2.2s 12.8 = ---------------------------------------------------- Gd –19.1( ) s + 3.5 s 2 + + 2.2s 12.8 = -----------------------------------------
2 MPC Based on Step Response Models Simulations Since the toolbox handles only discrete-time systems, the models are discretized using a sampling time of 0. 1. We approximate each of the discrete transfer functions with 40 step response coefficients. The function cmpc is used to generate the controller and to simulate the closed-loop response because it determines optimal changes of the manipulated variables subject to constraints. For comparison(Simulation #4), we also use the functions mrcase for controller design and mpcsi m for simulating closed-loop responses. On- amputations are simpler but the resulting controller is linear and the constraints are not handled in an optimal fashion. The following additional functions from the toolbox are also used tfd2step and pl tall. The mAtlaB code for the following simulations can be found in the file idl ectr m in the directory mpcdemos Outputs 12345678910 Time Manipulated Variables Time Figure 2-1 Responses to a Unit Torque Disturbance for Plant #1(no model/ Simulation #1. No model/plant mismatch. The following parameters are used M=10.P=inf,ywt=[51l,uwt=[0.50.5 filter I The larger weight on the first output(engine rpm)is to emphasize that controlling engine rpm is more important than controlling spark advance Figure 2-1 and Figure 2-2 show the closed-loop response for a unit step torque 2-24
2 MPC Based on Step Response Models 2-24 Simulations Since the toolbox handles only discrete-time systems, the models are discretized using a sampling time of 0.1. We approximate each of the discrete transfer functions with 40 step response coefficients. The function cmpc is used to generate the controller and to simulate the closed-loop response because it determines optimal changes of the manipulated variables subject to constraints. For comparison (Simulation # 4), we also use the functions mpccon for controller design and mpcsim for simulating closed-loop responses. On-line computations are simpler, but the resulting controller is linear and the constraints are not handled in an optimal fashion. The following additional functions from the toolbox are also used: tfd2step and plotall. The MATLAB code for the following simulations can be found in the file idlectr.m in the directory mpcdemos. Figure 2-1 Responses to a Unit Torque Disturbance for Plant #1 (no model/ plant mismatch) Simulation #1. No model/plant mismatch. The following parameters are used: M = 10, P = inf, ywt = [5 1], uwt = [0.5 0.5], tfilter = [ ] The larger weight on the first output (engine rpm) is to emphasize that controlling engine rpm is more important than controlling spark advance. Figure 2-1 and Figure 2-2 show the closed-loop response for a unit step torque 0 1 2 3 4 5 6 7 8 9 10 5 0 -5 0 1 2 3 4 5 6 7 8 9 10 5 0 -5 10 Outputs Time Manipulated Variables Time y2 y1 u1 u2
Application: Idle Speed Control load change. No model/plant mismatch is introduced, i.e., we use Plant #1 and Plant #2 as the nominal model for simulating the closed loop response for Plant #1 and Plant #2, respectively As we can see, both controllers perform well for their respective plants Because of the infinite output horizon, i. e, P= inf, nominal stability is guaranteed for both systems. In some sense, the performance observed in Figure 2-1 and Figure 2-2 is the best which can be expected, when the spark dvance constraint is invoked and there is no model/plant mismatch Obviously, if we want to control Plant #l and Plant #2 with the same controller the nominal performance for each plant will deteriorate Outputs 0 Manipulated variables -5 8 Time Figure 2-2 Responses to a Unit Torque Disturbance for Plant #2 (no model/plant mismatch)
Application: Idle Speed Control 2-25 load change. No model/plant mismatch is introduced, i.e., we use Plant #1 and Plant #2 as the nominal model for simulating the closed loop response for Plant #1 and Plant #2, respectively. As we can see, both controllers perform well for their respective plants. Because of the infinite output horizon, i.e., P = inf, nominal stability is guaranteed for both systems. In some sense, the performance observed in Figure 2-1 and Figure 2-2 is the best which can be expected, when the spark advance constraint is invoked and there is no model/plant mismatch. Obviously, if we want to control Plant #1 and Plant #2 with the same controller the nominal performance for each plant will deteriorate. Figure 2-2 Responses to a Unit Torque Disturbance for Plant #2 (no model/plant mismatch) 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 0 -2 -4 2 Outputs Time Manipulated Variables Time 5 0 -5 y2 y1 u1 u2
2 MPC Based on Step Response Models Outputs 0 Manipulated variables 12 气 -10 10 Figure 2-3 Responses to a Unit Torque Disturbance for Plant #1 (nominal model Plant #2) Simulation #2. Model/plant mismatch. All parameters are kept the same as in Simulation #1. Shown in Figure 2-3 is the response to a unit torque disturbance for Plant #1 using Plant #2 as the nominal model. Figure 2-4 depicts the response to a unit torque disturbance for Plant #2 using Plant #1 as the nominal model. As one can see, both systems are unstable. Therefore, the controllers must be detuned to improve robustness if one wants to control both plants with the same controller
2 MPC Based on Step Response Models 2-26 Figure 2-3 Responses to a Unit Torque Disturbance for Plant #1 (nominal model = Plant #2) Simulation #2. Model/plant mismatch. All parameters are kept the same as in Simulation #1. Shown in Figure 2-3 is the response to a unit torque disturbance for Plant #1 using Plant #2 as the nominal model. Figure 2-4 depicts the response to a unit torque disturbance for Plant #2 using Plant #1 as the nominal model. As one can see, both systems are unstable. Therefore, the controllers must be detuned to improve robustness if one wants to control both plants with the same controller. 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 10 0 -10 20 Outputs Time Manipulated Variables Time 20 0 -20 y2 y1 u1 u2
Application: Idle Speed Control Manipulated Variables m nuL 4 model =Plant +unses to a Unit Torque Disturbance for Plant#2(nominal Figure 2-4 Resp Simulation #3. The input weight is increased to [10 20] to improve robustness. All other parameters are kept the same as in Simulation #1. Plant #1 is used as the nominal model. The simulation results depicted in Figure 2-5 and Figure 2-6 seem to indicate that with an input weight of [10 20] the controller stabilizes both plants. However, we must point out that the design procedure guarantees global asymptotic stability only for the nominal system, i.e., Plant # 1. Because of the input constraints, the system is nonlinear. The observe tability for Plant #2 in Figure 2-6 should not be mistaken as an indication of global asymptotic stability. 2-2
Application: Idle Speed Control 2-27 Figure 2-4 Responses to a Unit Torque Disturbance for Plant #2 (nominal model = Plant #1) Simulation #3. The input weight is increased to [10 20] to improve robustness. All other parameters are kept the same as in Simulation #1. Plant #1 is used as the nominal model. The simulation results depicted in Figure 2-5 and Figure 2-6 seem to indicate that with an input weight of [10 20] the controller stabilizes both plants. However, we must point out that the design procedure guarantees global asymptotic stability only for the nominal system, i.e., Plant # 1. Because of the input constraints, the system is nonlinear. The observed stability for Plant # 2 in Figure 2-6 should not be mistaken as an indication of global asymptotic stability. 0 1 2 3 4 5 6 7 8 9 10 0 1 2 3 4 5 6 7 8 9 10 2 0 -2 4 Outputs Time Manipulated Variables Time 5 0 -5 y2 y1 u1 u2