Engine Limit Management with Model Predictive Control

This chapter introduces the concept of model predictive control and develops basic prediction formulas based on linear state-space models. The constrained optimization problem is formulated using compact matrix formulas suitable for incorporation in Matlab’s quadratic program solver. Model predictive control is then applied to the engine control problem to address input and output constraints. The chapter also discusses computational complexity and approaches aimed at its reduction. Matlab code and simulations using the CMAPSS nonlinear engine model are included.Model predictive control (MPC) is a technique conceived to incorporate constraints explicitly at the outset of the control law derivation process. As its name implies, MPC relies on predictions generated using a mathematical model of the plant. In this regard, the philosophy behind the construction of MPC laws is radically different from traditional error-feedback control approaches. Instead of producing a control action in response to the current and past errors, MPC evaluates the results of applying candidate control input sequences, selecting the sequence that minimizes a performance measure. Only the first term of the sequence is then injected to the plant, and the process is then repeated. The effects of applying a candidate control input sequence must be evaluated through a performance figure whose value depends on the predicted plant response.System operation under MPC resembles a game of chess, where the player analyzes several moves in advance, using the rules of the game and his/her perception of the opponent’s playing strategy as a “model” that allows him/her to make predictions. Piece values and strategic considerations lead the player to determine an optimal course of events for the next few moves. Naturally, the player is allowed only one turn, so only the first term of the optimal sequence is implemented. In a control system, the opponent’s move is analogous to the reaction of the plant to a control input. The player must then repeat his/her predictions and select a new optimal move, given the current situation.An insightful comparison between MPC and error-based feedback (say, PI control) can also be made by analogy with the act of steering a car on a winding road, with limited visibility. Normal driver actions correspond to MPC: the visible portion of the road’s centerline provides predictions used by the brain to make anticipatory corrections to the steering wheel and the speed of the vehicle. Note that visible portion of the road constitutes a moving, or receding horizon, a key concept associated with MPC. In contrast, error-feedback control is analogous to using the rearview mirror as the only source of visual information: the driver reacts to errors that have already occurred, such as deviating excessively from the centerline.Because of its anticipatory character, MPC is well suited to handle constraints, since only sequences predicted to satisfy the constraints are considered as suitable control candidates. Since candidates are evaluated through a performance function (typically an LQR-like cost), good transient performance is ensured in addition to constraint satisfaction. Constraints are easily formulated to capture limits on the state variables and output and input magnitudes and rates.Despite its many attractive features, MPC has a significant shortcoming in its computational burden. The calculations involved in prediction and optimal sequence determination must be completed quickly enough, so that the plant state has not deviated excessively from the value it had at the beginning of prediction. The requirement of fast control computation is not exclusive to MPC, of course. Digital control implementations use sample periods significantly smaller than the fastest time constant found in the design plant. In GTE control, sample times near 0.01’s are typical. The digital control system must complete various operations in less than the sample time: reading sensors, calculating the control law, commanding the control inputs to the actuators and other operations. A safe latency time must also be allowed where the control system is in a wait state until the next sample instant comes up. This means that the time allotted for control law calculations is a small percentage of the sample period. As it will be seen below, the MPC calculation involves a numerically intensive quadratic constrained optimization problem, known as a quadratic program.Studies have been conducted to determine the applicability of MPC to the GTE control problem, including some by the author of this book aimed at reducing computational complexity. Examples of this research include the work of Brunell and co-workers [74], De Castro [75], Richter [76], and Van Essen [77].In this chapter, the standard state-space formulation of MPC for linear plants is presented, maintaining the exposition at an introductory level. Basic examples and Matlab code are provided for nominal linear plants, followed by realistic CMAPSS simulations. Readers interested in a more comprehensive and in-depth exposition of MPC techniques are referred to Camacho and Bordons [78] or Rossiter [79].