0604 PDF
0604 PDF
0604 PDF
9-11, 2008
ThC18.1
An MPC design ow for automotive control and applications to idle speed regulation
S. Di Cairano, D. Yanakiev, A. Bemporad, I.V. Kolmanovsky, D. Hrovat
Abstract This paper describes the steps of a model predictive control (MPC) design procedure developed for a broad class of control problems in automotive engineering. The design ow starts by deriving a linearized discrete-time prediction model from an existing simulation model, augmenting it with integral action or output disturbance models to ensure offset-free steadystate properties, and tuning the resulting MPC controller in simulation. Explicit MPC tools are employed to synthesize the controller to quickly assess controller complexity, local stability of the closed-loop dynamics, and for rapid prototype testing. Then, the controller is ne-tuned by rening the linear prediction model through identication from experimental data, and by adjusting from observed experimental performance the values of weights and noise covariances for lter design. The idle speed control (ISC) problem is used in this paper to exemplify the design ow and our vehicle implementation results are reported.
I. I NTRODUCTION Model predictive control (MPC) [1], [2] is an optimization-based closed-loop control strategy for shaping the response of a process through minimization of a performance criterion and for handling constraints on system inputs, states, and outputs. The optimal input sequence is computed during each control update cycle by optimizing the predicted system trajectory, computed through a suitable prediction model. The MPC controller can be synthesized as a piecewise linear state-feedback control [3], with no need for on-line optimization, and processes with fast dynamics, such as the ones in automotive applications, can be addressed, see [4][6] for some examples. We describe an MPC design ow that is composed of a sequence of procedural steps which exploit both simulation models and experimental data in order to tune the behavior of the MPC controller in a way that leads to fast prototyping and experimental evaluation. We suggest to rst use a simulation model of the process, which is normally available if a model-based control system design approach is followed, and to generate from it a suitable prediction model for the MPC controller. The MPC controller based on such a model can be evaluated through simulations. For the actual implementation, an explicit model predictive controller [3] can be synthesized. The controller complexity can be easily assessed, and, if needed, the prediction model structure
A. Bemporad and S. Di Cairano are with Dipartimento di Ingegneria dellInformazione, Universit` a di Siena, bemporad,dicairano@dii.unisi.it D. Yanakiev, I.V. Kolmanovsky and D. Hrovat are with Ford Motor Company, Dearborn, Michigan, USA. dyanakie,ikolmano,dhrovat@ford.com S. Di Cairano has recently joined Ford Motor Company, sdicaira@ford.com
can be revised to trade-off controller performance versus complexity. Furthermore, the stability of the closed-loop dynamics and the region where feasible commands are issued can be easily analyzed. After a satisfactory complexityperformance balance has been found, the prediction model has to be tuned by means of experimental data. The effect of noise and disturbances has to be evaluated and quantied to be used in estimator design. Finally, the source code of a candidate set of controllers is automatically generated and experimentally validated. In this paper, the design ow is illustrated on the idle speed control (ISC) problem. For this problem we design and synthesize MPC controllers of different structure, complexity and performance, and we discuss their implementation on the vehicle. Historically, idle speed control is related to one of the oldest closed-loop systems discussed in the controls literature, the so called Watts governor (1787), which may be viewed as a speed controller for a steam engine. The continuing interest in ISC fo spark-ignition engines is motivated by the opportunities to reduce fuel consumption at idle by lowering idle speed set-point and reducing spark reserve. A higher performing ISC based on MPC techniques may be able to avoid engine stalls even with lower idle speed set-point and spark reserve, thereby enabling substantial fuel consumption improvements. To the best of the authors knowledge, an MPC design for the ISC problem was rst proposed in [7]. At the time this approach could not have been easily implemented, as it required an optimization problem to be solved on-line in real-time. In this paper, we complete the development and implementation of an MPC solution for ISC by exploiting the newly available techniques to compute the MPC law as an explicit state feedback. In this form, the MPC solution is easily implemented in the electronic control unit (ECU). A. Notation R and Z denote the set of real and integer numbers, respectively. Z0+ denotes the set of nonnegative integer numbers and Z[a,b] denotes the set {r Z : a r b}. In is the identity matrix of dimension n, and 1 and 0 are vectors or matrices entirely composed of 1 and 0, respectively. Given a vector a, [a]i is the ith coordinate. Relational operators are applied componentwise to vectors. II. M ODEL - BASED D ESIGN : P REDICTION M ODEL Model-based design, in which the control system is developed with the help of a dynamical model of the process, is
5686
ThC18.1
The parameters ki , i , i , i = 1, 2, and a can be estimated by analyzing the step and frequency responses of the engine model running at 650 rpm, which is our linearization point for linearization input uspk = 0, uair = 2.13. After sampling with period Ts = 30 ms and converting to discrete-time statespace form, the estimated transfer functions are expressed as = Aair xair (k ) + Bair u air (k ), = Cair xair (k ), = Aspk xspk (k ) + Bspk u spk (k ) = Cspk xspk (k ),
uair esTair
u air
yrpm
uspk e sTspk
u spk
Fig. 1.
an evolving trend in automotive engineering. The dynamical model is usually derived from rst principles, and further rened for consistency with experimental data and strategies implemented in the ECU. For the ISC problem considered in this paper, a nonlinear engine and crankshaft model that represents engine speed dynamics and torque converter behavior was used as a starting point. In the ISC problem, the manipulated inputs are the spark advance uspk and the airow uair , and the controlled output is the engine speed yrpm . The spark advance command is measured in degrees [deg], and it is commanded with respect to a nominal set-point for idle, which allows about 15 degrees reserve with respect to maximum break torque (MBT) spark. For our problem, uspk is thus constrained in the interval [15, 15]deg. The airow command is measured in pounds per minute and it is normalized to the interval [0, 10]. The engine speed is measured in revolutions per minute [rpm]. A set of specications is given. The idle engine speed reference is 650 rpm, and the engine speed must remain in the interval [450, 2000] rpm. The idle speed controller runs with a sampling period Ts = 30 ms. Only the signals uair , uspk , and yrpm are available for closing the control loop. Frequently, the simulation model is very detailed, and it must be approximated to obtain a prediction model that is simple enough to yield a tractable MPC optimization problem, but that still captures the most signicant dynamics. As discussed in [8], for idle speed control the engine model can be reduced to two transfer functions with delays, one from each input to the output, see Figure 1. The transfer function parameters can be easily obtained by running the simulation model. The delays are approximately Tair = 0.12s, Tspk = 0.03s at 650 rpm. A. Transfer function from delayed inputs We rst estimate the transfer function from the delayed input to the output, that is, from u air to yair , and from uspk to yspk in Figure 1. As pointed out in [8], the transfer function from the delayed airow to the engine speed has no zeros, while the transfer function from the delayed spark advance to the engine speed has a stable zero. Hence, Gair (s) = k1 Gspk (s) = k2 1
s2 1 s2 2 1 2 + 2 s + 1 1 s a +1 2 2 + 2 s + 2 2
yspk (k )
where xair , xspk R2 . B. Delay modeling The effect of the delay can be accounted for in the prediction model in several ways. The approach of this paper is to model in discrete time the transfer function from the delayed inputs u air (x), uspk (x), and then to introduce the delays as additional states. Tspk Tair In the ISC problem, n air = Ts = 4 and nspk = Ts = 1 are integer valued. The discrete-time model of a generic signal u() delayed by n Z0+ steps is x (k + 1) = A x (k ) + B u(k ), u (k ) = C x (k ), where x Rn and 0 0 B = [1 0 0]T , . . A = . , In 1 C = [0 0 1]. 0 Let xf air (k + 1)
f yair (k ) f f = Af air xair (k ) + Bair uair (k )
f xf Cair air (k ),
xf spk (k + 1)
f yspk (k )
f Cspk xf spk (k ),
f 6 3 where xf air R , xspk R , be the state-space models obtained, respectively, by cascading the fourth order statespace model of the airow delay with (2), and by cascading the rst order model of the spark delay with (3). The resulting linear model of the engine is
xp (k + 1) = Ap xp (k ) + B p up (k ), yrpm (k ) = C p xp (k ), xp = Bp =
xf air xf spk
f Bair f Bspk air , up = [ uspk ] , Ap =
(6a) (6b)
Af air 0 0 Af spk
, (6c) (6d)
, .
(1a) (1b)
f , C p = [ Cair
f Cspk
].
where xp R9 , and up R2 .
5687
ThC18.1
rst step is to setup the MPC optimization problem
N 1 ,u(k)
min
2 +
i=0
y (i|k ) ry (k )
Q 2
+ u(i|k )
R 2
(9a)
s.t.
x(i + 1|k ) = Ax(i|k ) + Bu(i|k ), i Z[0,N 1] (9b) y (i|k ) = Cx(i|k ), i Z[0,N 1] umin u(i|k ) umax , i Z[0,N 1] (9c) (9d)
umin u(i|k ) umax , i Z[0,N 1] (9e) ymin 1 y (i|k ) ymax + 1, i Z[0,Nc 1] (9f) u(i|k ) = u(Nu 1|k ), i Z[Nu 1,N 1] u(1|k ) = u(k 1) x(0|k ) = x (k ) 0,
Q 2
(7a) (7b)
A 00 Ts C p 1 0 0 01
p
u = up , A = , C=
Cp 0 0 0 10 0 01
(7c) (7d)
An alternative approach to ensure offset-free tracking is to introduce a disturbance model [10]. In particular, in [10] the authors show that under mild technical conditions, output additive integrated white noise can be used as a disturbance model. An MPC controller whose prediction model is augmented with such a disturbance model guarantees asymptotic rejection of constant disturbances. The disturbance is estimated concurrently with the state vector, for instance by a Kalman lter based on the estimation model x(k + 1) = Ax(k ) + Bu(k ) + Ew(k ), y (k ) = Cx(k ) + Dv (k ), x= B=
xp xd qspk
, u = up , A = , C=
Ap 0 0 0 Ad 0 0 0 1
Bp 0 0 0 Ts
Cp Cd 0 0 0 1
where xd Rnd is the state of the disturbance model, Ad and C d are the matrices of the disturbance model used for prediction, and in the case of integrated white noise nd = 1, Ad = 1, and C d = 1. In equation (8), w(k ) and v (k ) are Gaussian white noise vectors with zero mean and covariance matrices W and V , respectively. The noise vectors are assumed to be zero in prediction because of the certainty equivalence principle. However, they are important tuning knobs for the estimator, as explained later in Section IV, and, when the output disturbance model is used, they strongly affect the tracking and disturbance rejection performances. Instead, when integral action is used, the estimator noise covariances have smaller impact in disturbance rejection performance. III. MPC DESIGN AND SYNTHESIS Once a simple yet representative prediction model is available, a model predictive controller can be designed. The
where a = aT Qa, u(i|k ) = u(i|k ) u(i 1|k ), x is the state estimate, ry is the output reference, and u(k ) = {u(0|k ), . . . , u(N |k )}. N Z+ is the prediction horizon, Nc N the constraint horizon, and Nu N is the control horizon. In problem (9), (9a) represents the performance criterion to be optimized, and (9b), (9c) are the prediction model for idle speed control, namely either (7) or (8) (where w(k ) = 0, v (k ) = 0). Constraints (9d), (9e) and (9f) are bounds on input, input variation, and output. In particular, (9f) denes soft output constraints, that prevent problem (9) to be infeasible, so that the control action is always dened. Soft constraints can be violated at the price of a penalty, modelled by the optimization variable R, weighted by the large (i.e., at least two orders of magnitude larger than the other weights) positive constant . Finally, (9g) limits the free moves to Nu , and (9h) and (9i) set the previously applied input value, and the initial state to the value of the state estimate at time k , respectively. Algorithm 1 (implicit MPC): At each control cycle k do: 1. read the measurements and compute the state estimate x (k ); 2. solve the quadratic programming problem (9) to obtain the optimal input sequence u (k ); 3. apply the input u(k ) = u (0|k ); The MPC controller that implements Algorithm 1 is tuned in closed-loop with the simulation model. This process requires adjusting the weights , Q, R and the horizons N , Nu , Nc in problem (9) and, possibly, revising the prediction model, if a satisfactory performance is not achieved. A. Explicit MPC synthesis and controller analysis To avoid ECUs in commercial vehicles to run optimization software, the explicit implementation of the MPC controller [3] has to be computed. The explicit MPC is an alternative way of evaluating the control action on line. Multiparametric quadratic optimization is used off line to pre-compute the solution of problem (9) as a function of the parameters x (k ), u(k 1) and ry (k ). This approach provides a piecewise afne continuous control law in the form u(k ) = Fi x (k ) + Gi u(k 1) + Ti ry (k ) (10a) i Z[1,nr ] : Hi x (k ) + Ji u(k 1) + Ki ry (k ) 0,(10b)
5688
ThC18.1
to 1.5 106 operations per second. By considering xed reference values, the operation number is reduced by about 20%. The data memory usage for the controller is about 100 KB. For conventional ECUs, the MPC controller use in the worst case 1.5% 5% of the total computational power, resulting feasible. In fact, at idle the ECUs are under-utilized, due to low activation rate of tasks triggered by engine events, hence the needed computational power is available. The MPC controller based on (9) does not guarantee closed-loop stability. Stability guarantees can be obtained by applying the techniques surveyed in [12]. However, those typically require long prediction horizons and hence generate complex controllers. If the origin is in the interior of the feasible region of problem (9), there exists an index Z[1,nr ] such that the origin is also in the interior of the polyhedral region described by (10b) for i = . Thus, in a neighborhood of the origin, the explicit controller (10) is equal to the linear state feedback (10a) where i = , and it can be proven that G = 0. As a result, considering ry (k ) = 0 for all k Z0+ , the local stability of the closed-loop dynamics can be studied by analyzing the system x(k + 1) u(k ) By calling (x) = = Ax(k ) + Bu(k ) = F x(k ) + G u(k 1).
x(k) u(k1)
(12a) (12b)
BF BG if the spectral radius of the matrix Acl = A+ F G is smaller than 1. For the idle speed control problem, in the MPC tuning described before, (Acl ) = 0.9726, ensuring that the system is locally stable. A global stability analysis can be performed a posteriori by considering the piecewise afne (PWA) [13] constructed from the prediction model (9b) in closed-loop with the explicit MPC (10), and using the tools described in [14].
, umin = , ymin =
0uFF
15 450yss
, ,
B. Closed-loop simulations Closed-loop simulation tests were performed in S IMULINK with the MPC in closed-loop with the engine simulation model. The feedforward on the airow is uFF = 2.5, a value slightly different from the one that achieves stabilization at 650 rpm, in order to test the regulation capabilities of the controller and the effects of a nonzero steady-state value of uair . The controller is enabled at t = 5 when the initial transient of the engine is completed, and it rst has to regulate the system to 650 rpm. Then, a disturbance rejection test is performed by introducing an unmeasured torque disturbance load d [Nm] of 20 Nm that is subtracted from the engine generated torque, starting at t = 8 s, and ending at t = 17 s, simulating the effect of power steering. Figure 2 shows the resulting closed-loop behavior. Note that both inputs reach saturation, and that the spark input remains saturated at its maximum until the disturbance has been almost completely rejected. The behavior shown in Figure 2 can be changed by tuning the weights Q, R, in (9a). For instance, an overdamped
umax = umin = [ ], where yss = 650 rpm is the engine speed around which the linear prediction model is estimated, and uFF is the corresponding airow equilibrium input for uspk = 0, that is sent to the engine as a feedforward input. For yss = 650 rpm, the correct value of the feedforward is uFF = 2.13. After performing some tests with the implicit MPC algorithm, 3 0 0 we tuned Q = 0 200 0 , R = I2 , and computed the 0 0 5 explicit control law (10) using the toolbox [11]. In this case, nr = 131, and the partition is over a 16-dimensional space: 11 components are the estimated state vector (6 from (4), 3 from (5) and 2 from the integral action on yrpm and uspk ), 2 are previous input values, and 3 are references (engine speed, integral of engine speed tracking error, integral of spark command). For the above controller the maximum number of operations per control cycle is less than 45 103 , which leads
5689
ThC18.1
After re-tuning the MPC with the new model (and repeating the stability analysis of Section III-A), the controller has been tested in simulation against disturbances. We have applied additive input disturbances and sensor disturbances to evaluate the closed-loop behavior of the controller and to tune the parameters of the state estimator. In simulation we have used the linearized prediction model rened by experimental data as plant model, since the focus of this test is the behavior with respect to noise and disturbances. This approach becomes particularly important if the disturbance model approach in [10] is used, since the trade-off between steady-state convergence speed and noise ltering is set by the estimator parameters. In the idle speed problem, we use the stationary Kalman lter x (k + 1) = [I Kf C ](Ax (k ) + B u (k )) + Kf y (k + 1) (13) where A, B , and C are the prediction model matrices, and Kf = P C T (CP C T + V )1 is the stationary lter gain constructed from the solution P of the Riccati equation P = AP AT + W AP C T (CP C T + V )1 CP AT . (14) The tuning parameters of the Kalman lter are the matrices W and V , that in the case of a linear system subject to Gaussian noise are set equal to the process noise and to the sensor noise, respectively, for (13) to result in the optimal estimator. In practice, it is very difcult to quantify W , V a priori, as the plant dynamics are not purely linear and the noise is not exactly white and Gaussian. Hence, the matrices have to be tuned according to standard rules. When W V , the observer relies on measurements, and it converges faster. When W V , the measurements are not trusted, causing slow estimate convergence, but also reduced sensitivity to measurement noise. A. Experimental results for idle speed MPC control We have tested several MPC controllers in a vehicle, in order to nd the best tradeoff between closed-loop convergence performance, robustness, and actuator excitation. We mainly performed disturbance rejection tests, since stall avoidance, and hence quick and robust disturbance rejection, is the most critical requirement for idle speed control. The test vehicle is a Ford pickup truck with a V8 4.6L gasoline engine, equipped with a developmental ECU. The C-code for the MPC controllers is automatically generated by the H YBRID T OOLBOX [11], and compiled in a dSPACE rapid prototyping system connected to the cars ECU. The MPC controller is compared with an available baseline controller implemented in the ECU. The reference idle speed ry is controlled by the ECU and may vary depending on the engine conditions. The results of three experiments are reported in Figure 3, where the MPC controller (solid line) is compared to the baseline controller (dashed line) in different disturbance rejection tests (solid thin line, the idle speed reference). In Figure 3(a), the vehicle is in neutral gear, and the torque disturbances are obtained by activating power steering (PS) at the end of the steering wheel travel. The power steering
t[s]
15
20
25
uair
10
t[s]
15
20
25
uspk [deg]
10
t[s]
d [Nm]
t[s]
Fig. 2. Simulation of the MPC controller for idle speed in closed-loop with the S IMULINK engine model
behavior, where the engine speed settles more slowly without overshoot, can be obtained. The controller tuning is in general selected by considering requirements such as drivers feelings, effects on engine wear, and fuel consumption. IV. DATA - BASED TUNING AND EXPERIMENTS The model-based design described in Section III is important to evaluate whether the specications can be met. In particular, it allows one to assess whether the prediction model is detailed enough, and also, through the explicit controller computation, the worst-case number of operations per control cycle, and the closed-loop (local) stability. However, when implementing the controller on the real process, the design may need to be revised. First of all it is possible that the real process dynamics are quantitatively different from the simulated dynamics. Also, in a real process there are several disturbances acting, including sensor noise and disturbances on the actuators. Thus, a fundamental role is played by the estimation algorithm, that trades off between noise rejection and convergence speed of the estimator. For the experimental implementation we chose to apply MPC only to the throttle input and retained the existing control loop (of Proportional plus Derivative type) for spark. With this approach, the implementation is further simplied while the loss in performance is not greatly appreciable. The MPC design strategy easily allows one to recongure the design to use only the airow as controlled variable, by simply removing uspk from problem (9), and the corresponding terms in the cost functions and constraints. The plant model (6) is now composed only of the delayed state space model from the airow to the engine speed (4) (the integral action on the input uspk has been obviously removed from prediction model (7)). The resulting MPC controller is signicantly simpler (nr = 7 regions in a 10-dimensional space), and the worst case number of operations per control cycle of the explicit controller is only 450. In order to account for the modied plant, composed of the engine in closed loop with the spark controller, we used experimental data to tune the numerical parameters of prediction model (9b), (9c), without changing its complexity.
5690
ThC18.1
the idle speed reference to increase to 600rpm. In this test the superior performance of MPC is even more evident. The MPC not only attenuates the engine speed drop due to the disturbance, it is also much faster in recovering the setpoint. When the second disturbance occurs the MPC has already recovered from the rst one. This is not the case for the baseline controller, and as a consequence it oscillates heavily. Note also that by the end of the test the baseline controller has not reached yet the setpoint, while the MPC has settled more than 5s before. Finally, in Figure 3(c) a cold start test where the idle speed reference progressively decreases is shown. Several PS and AC disturbances are introduced, as well as two driver tip-in (around t = 150s). Even if the engine speed is far from the linearization value (650rpm) the MPC controller can handle the model variation. V. D ISCUSSION We have proposed a design ow to develop model predictive controllers targeted to automotive applications, that makes use of simulation model and experimental data to tune the different parameters of the controller. The procedure has been applied to idle speed control. An improved idle speed controller can reduce the need for a spark reserve, and hence consistently improve the fuel efciency. The results show that the MPC largely outperforms the available baseline controller. R EFERENCES
[1] J. Maciejowski, Predictive control with constraints. Englewood Cliffs, NJ: Prentice Hall., 2002. [2] A. Bemporad, Model-based predictive control design: New trends and tools, in Proc. 45th IEEE Conf. on Decision and Control, San Diego, CA, 2006, pp. 66786683. [3] A. Bemporad, M. Morari, V. Dua, and E. Pistikopoulos, The explicit linear quadratic regulator for constrained systems, Automatica, vol. 38, no. 1, pp. 320, 2002. [4] F. Borrelli, A. Bemporad, M. Fodor, and D. Hrovat, An MPC/hybrid system approach to traction control, IEEE Trans. Contr. Systems Technology, vol. 14, no. 3, pp. 541552, 2006. [5] P. Ortner and L. del Re, Predictive Control of a Diesel Engine Air Path, IEEE Trans. Contr. Systems Technology, vol. 15, no. 3, pp. 449456, 2007. [6] S. Di Cairano, A. Bemporad, I. Kolmanovsky, and D. Hrovat, Model predictive control of magnetically actuated mass spring dampers for automotive applications, Int. J. Control, vol. 80, no. 11, pp. 1701 1716, 2007. [7] D. Hrovat, MPC-based idle speed control for IC engine, in Proc. of FISITA conference, Prague, Czech Rep., 1996. [8] D. Hrovat and J. Sun, Models and control methodologies for IC engine idle speed control design, Control Engineering Practice, vol. 5, no. 8, pp. 10931100, 1997. [9] H. Kwakernaak and R. Sivan, Linear optimal control systems. New York: Wiley-Interscience, 1972. [10] G. Pannocchia and J. Rawlings, Disturbance models for offset-free model-predictive control, AIChE Journal, vol. 49, no. 2, pp. 426437, 2003. [11] A. Bemporad, Hybrid Toolbox Users Guide, Dec. 2003, http://www. dii.unisi.it/hybrid/toolbox. [12] D. Mayne, J. Rawlings, C. Rao, and P. Scokaert, Constrained model predictive control: Stability and optimality, Automatica, vol. 36, no. 6, pp. 789814, June 2000. [13] A. Bemporad, W. Heemels, and B. D. Schutter, On hybrid systems and closed-loop MPC systems, IEEE Trans. Automatic Control, vol. 47, no. 5, pp. 863869, 2002. [14] G. Ferrari-Trecate, F. Cuzzola, D. Mignone, and M. Morari, Analysis of discrete-time piecewise afne and hybrid systems, Automatica, vol. 38, pp. 21392146, 2002.
yrpm [rpm]
20
30
40
50 time (s)
60
70
80
90
yrpm [rpm]
1200
1100
yrpm [rpm]
1000
900
800
700
50
100
150
250
300
350
(c) Disturbance rejection (PS,AC,tip-in) during cold start Fig. 3. Experimental results of the MPC for idle speed control in the test vehicle, and comparison with a baseline controller.
is activated at t = 20s and t = 60s. The engine speed drop is reduced by 50% and the convergence to the setpoint is about 10s faster. Figure 3(b) shows the results of a double disturbance test, where PS and air conditioning (AC) are activated at t = 20s, and they are deactivated at t = 31s. This test is executed with vehicle in drive gear, where the idle sped reference is lower (525 rpm), and also the engine speed lower bound for the MPC is reduced (350 rpm). The activation/deactivation of AC is delayed by a couple of seconds by the vehicle ECU, so that in fact the disturbances occur sequentially (AC becomes active around t = 22s, and inactive around t = 33s). The AC activation causes
5691