QUADRATIC INDEX ANALYSIS IN PREDICTIVE CONTROL J.S. Senent M. Martnez J. Sanchis Departamento de Ingeniera de Sistemas y Automatica. Universidad Politecnica de Valencia. Camino de Vera, 14 E-46022 Valencia ESPAA e-mail: juanse@isa.upv.es Fax : + 34 963879579 Abstract: The formulation of the cost index has a remarkable inuence in the performance of a predictive controller. In most of predictive control articles and industrial applications the only approximation used is quadratic. These indices produce optimal control actions, as they minimise the objective function, but at the same time, these actions can be suboptimal from the process control point of view. This problem is due to four factors: multiple objectives appear in a single index it is dicult to nd the weight factors controller performance depends on prediction horizon (HP) and the most important, the index is not a process control oriented. This paper shows, with some simple examples, why these indices are not process control oriented and how to solve some of the problems mentioned using new index formulations. Keywords: Predictive control, Quadratic performance indices, Performance analysis 1.1 Motivation 1. MOTIVATION AND GOALS In all the formulations of model predictive control (MPC) the process inputs, or manipulated variables (MV), are computed to optimise the future behaviour of the process. To carry out this idea three components are needed: A process model: to predict the future behaviour of the process variables or controlled variables (CV). An optimiser: to compute the MV. A performance index of the process: objective function used by the optimiser to compute the MV. The main process model formulations are: impulse response models, step response models (Keyser et al., 1988), transfer functions (Clarke et al., 1987), linear state-space models (Camacho and Bordons, 1995), non-linear state-space models (Michalska and Mayne, 1993), neural networks (Zamarreno and Vega, 1997). As for the optimiser, the more frequently used are: quadratic programming (Chow and Clarke, 1994) non-linear programming (Chen and Allgower, 1997), dynamic programming (de Madrid, 1995), genetic algorithms (Martnez et al., 1998) and simulated annealing (Senent et al., 1998). But in the case of the performance index, the quadratic approximation is mainly used. Is a quadratic index the best aproximation? Most of the criticisms of this index come from the users of commercial programs that implement
MPC (Qin and Badgwell, 1996) and they can be summarised as follows: It becomes increasingly dicult to translate control requirements into relative weights for a single objective function... Even when a consistent set of relative weights can be found, care must be taken to avoid scaling problems. Is the only possible formulation? Non-linear MPC (NLMPC) (Michalskaand Mayne, 1993) and (Chen and Allgower, 1997) makes possible the use of non-linear process models, nonlinear constraints and non-quadratic performance indices. But it is dicult, in reference literature to nd formulations other than quadratic. 1.2 Goals The main goal is to describe the problems caused by the use of quadratic indices in MPC. First an analysis of the main criticisms of the index are stated and then several solutions for each problem are sketched. This article is organised as follows: in section 2 the main criticisms of the quadratic index approximation are enumerated and explained using a set of simple examples. In section 3 several solutions to the above problems are described and nally a new index formulation is proposed. 2. QUADRATIC INDEX ANALYSIS IN MPC 2.1 Index formulation In the most frequent formulation, quadratic indices penalise future errors and MV moves (it is also possible to penalise the increment of MV moves). Also, two weight matrices Q and R (academic denomination) are included to improve the robustness and performance of the control loop. The inverse of the Q elements are called equal concern factors, and the elements of R are called move suppression factors in the commercial programs. The quadratic index used in most commercial MPC programs (Qin and Badgwell, 1996) is: J = k e(k + j) k 2 Q + X HC;1 j=0 k u(k + j) k 2 R (1) where e(k +j) are the future errors of the process, u(k + j) are future control actions, HP is the length of the prediction horizon, HC is the length of the control actions sequence and Q y R are the weighting matrices. Finally, y k e(k + j) k 2 Q= e(k + j) T Qe(k + j) k u(k + j) k 2 R= u(k + j) T Ru(k + j) 2.2 Criticisms of the quadratic index Four criticisms of quadratic indices are found in the reference literature: (1) Multiple objectives in a single index: Two kinds of contributions appear: those coming from the error penalisation and those from the control moves penalisation. But these two contributions are in conict: aggressive control actions must be applied to obtain small errors, and when control actions are not aggressive then error can be high. Some commercial MPC programs solve this problem by performing a two-step optimisation (Qin and Badgwell, 1996): rst, errors are minimised and then, if several solutions to this optimisation problem exist, the solution with the smallest norm is chosen. Several solutions will exist only when dealing with fat plants (the number of MV is greater than the number of CV) or when the reference trajectory is a funnel. (2) Finding weighting factors: The question is how to nd the weight matrices Q and R in equation 1. Even when performing a two-step optimisation the factors to weigh errors or control actions are dicult to nd. An economic criteria is used in these cases, but sometimes it is dicult to evaluate the economic cost produced by VC deviations or MV moves (Cifuentes, 1998). Besides the economic criteria, VC units are another reason that leads to weighing or normalising the terms in the index. For instance, one CV can be the temperature in a tank o C and the MV can be the opening percentage %. But even when a consistent set of relative weights can be found, care must be taken to avoid scaling problems that lead to an ill-conditioned solution (Qin and Badgwell, 1996). An illconditioned problem arises when small errors produce large MV moves. (3) Prediction horizon dependence: The performance of the control loop depends (once the Q and R matrices are found) on the length of HP.Such length xes the weights in the index of the transient and steady-state response. And it is remarkable to remind that this parameter is tuned by trial and
error in most commercial programs (Qin and Badgwell, 1996) (cut and try). (4) It is not control process oriented. Itis not possible to dene the closed loop behaviour, for example settling time or steadystate error. Once the Q and R matrices are dened the only tuning parameter is the HP. But when HP is tuned it is not possible to know which contribution -the transient response or the steady-state -will be more important. In general, the weight of the transient response and the steady-state in the index depends on: the number of terms (the HP length) the weight factors and the formulation of the terms (usually squared error). To solve this problem some authors explicitly include the time in the index, for example (Yoon and Clarke, 1993): J = j k e(k + j) k 2 Q + X HC;1 j=0 j k u(k + j) k 2 R (2) where 0, 0y>1toweigh the steady-state or <1 to weigh the transient response. However, more tuning parameters appear in this index (equation 2), and although some rules of thumb exist to tune them, they are only for rst and second order linear models. The performance index will be: J q = e 2 (k + j) (4) that comes from equation 1 with Q = 1 and R =0.To simplify the analysis, the control actions have been excluded from the index (R = 0). Finally, it is assumed that the operator objective, when the index is programmed, is to obtain a small steady-state error. [Case 1] If, in the instant k, the optimiser must choose between two possible sequences of control actions u1 and u2 (where HP = 41, and HC = 2): u1 =[3 1 1 40 ^ 1]! J(u1) q =2:28 u2 =[2 1:1 1:1 40^ 1:1]! J(u2) q =1:92 the optimiser would choose u2. But if the evolution of the error is observed (gure 1) this sequence produces a greater steady-state error than the one produced by u1 (although the transient response is better). The lower cost solution is dierent from the one that the operator would choose. This is because the steady-state behaviour of the process has not enough weight in the index. Therefore, the HP must be longer. 2.3 Illustrative examples With the following simple examples we want to illustrate the problems related to points three and four above. It will be shown that the index can make the optimisation algorithm obtain optimal solutions, producing the minimum cost, but they are not the best from the process control point of view 1. In all the examples the process model will be: Y (s) U(s) = G(s) = 1 s 2 + s +1 (3) with y(0) = 0, set-point y SP = 1 and sample time T = 1 (time units). Fig. 1. Temporal evolution of future errors over the HP. 1 It is important to remember that most of the available optimisation algorithms (Quasi-Newton or Sequential Quadratic Programming) perform local searches in the solution space. They start evaluating the objective function in one point (or in a set of points) and with the results of the evaluation they compute the search direction where the solution is estimated to be (MathWorks Inc., 1996). [Case 2] The same control action sequences as in case 1 are considered, only the HP is changed (HP = 81). The sequences and cost index values are:
u1 =[3 1 1 80 ^ 1]! J(u1) q =2:28 u2 =[2 1:1 1:1 80 ^ 1:1]! J(u2) q =2:32 As the weight of the steady-state is greater than in case 1, the optimiser would choose the solution expected by the operator. Due to the fact that the steady-state terms in the index are equal to 0.01 (0:1 2 ) the length of HP must be increased to get these results. One alternative to reduce the number of terms is to use indices without error deformations. For example: J a = je(k + j)j (5) The results for the two previous cases would be: Case 1: J(u1) a =3:15 J(u2) a =5:98 Case 2: J(u1) a =3:15 J(u2) a =9:98 In both cases the minimum cost is found in the sequence whose trajectory nishes in the set-point (operator's objective). Therefore it is not necessary to increase the HP length to weigh the steady-state as was necessary when a squared error index was used. But it is possible that, even with these non-deforming indices, the optimiser chooses sequences different from the operator's point of view. [Case 3] In this case HP = 21 and the control action sequences and costs are: u1 =[8 1 1 20 ^ 1]! J(u1) q =20:48 J(u1) a =9:96 u2 =[0:5 1:25 1:25 20^ 1:25]! J(u2) q =3:11 J(u2) a =6:92 Fig. 2. Temporal evolution of the future errors over the HP. P e 2 j Pje j j 1 u 2 u 1 u 1 2 u 1 u 1 u 1 3 u 2 u 2 u 1 operator Table 1. Summary of the results of the three cases. Each column contains the solution using the three criteria: P e 2 j, P jej j, operator. and the simplex method, both produce the same solution). On the other hand, the u2 sequence is proposed by an expert operator. The results are (with HP = 21 and HC =2,y SP =5): u1 =[7:95 4:88 4:88 20^ 4:88]! J(u1) q =33:47 u2 =[5 5 5 20^ 5]! J(u2) q =37:58 With both indices the optimiser would choose the u2 sequence, because it has the minimum cost. But only the trajectory generated by u1 nishes in the set-point (operator's objective). 2.4 A complete example In this case the two compared sequences will be obtained by dierent methods. On one hand, the u1 sequence is the best solution computed through the minimisation of equation 4 (using two optimisation algorithms: a quasi-newton method Fig. 3. Temporal evolution of future errors over the HP.
J(u1) q <J(u2) q as u1 is the optimal sequence, but the trajectory generated has a steady-state error and more overshoot that the one generated by the operator's sequence u2. Therefore, u2 is better from the process control point of view. If instead of using the squared error the absolute value of the error appears in the index (equation 5) the results would be: u1 =[6:47 4:99 4:99 20^ 4:99]! J(u1) a =10:34 u2 =[5 5 5 20 ^ 5]! J(u2) a =11:14 (1) Multiple objectives in a single index. This problem will be solved, as in some commercial MPC programs, through the two-step optimisation procedure mentioned above. (2) Prediction horizon dependence. Using indices with an innite or quasi-innite HP (Michalska and Mayne, 1993) and (Chen and Allgower, 1997) will solve the problem. (3) It is not control process oriented. The terms in the index should be replaced by variables representing the performance of the CV, without HP dependence. As an example, the time one CV needs to achieve the setpoint within some error limits (settling time) could be used, for instance set-point=20 o C 1 o C. The index formulation could be: where: nx J = j jst(j) ; stsp(j)j (6) n j st(j) stsp(j) is the number of CV. is the weight factor. is the settling time predicted for CV j. is the settling time desired for CV j. Fig. 4. Temporal evolution of future errors over the HP. Now, the only dierence is that the trajectory generated by u1 has more overshoot than the one generated by u2, as the steady-state error and settling time are practically the same. Remarks: The weight in the index of the transient response and steady-state is not known and cannot be set before the simulation. Also, when using squared error indices some terms can have more or less weight depending on the error to be greater olower than 1. Absolute value indices need fewer terms (a shorter HP) than squared error indices to get the same specications because there is no error deformation, so computing time is reduced. But those optimisation algorithms based on gradient information present numerical problems when dealing with indices like the one in equation 5. In these cases the computing time is longer than when dealing with indices like equation 1. 3. SOLUTIONS After reviewing the problems or limitations of using these indices we will sketch some solutions for each: (4) Finding weight factors. The number of weight factors must be reduced or, at least, they should be directly understood by the operator. For example, the above index (equation 6) is a good candidate. The weight factors j are found easily as all the terms have the same units (time units). 4. CONCLUSIONS The main problems using quadratic indices in predictive control are: they have multiple objectives in a single index it is dicult to nd the weight factors the performance of the controller depends on the HP and the most important, it is not control process oriented. In this article it is shown, with four simple examples, how the last two problems can lead the optimiser to obtain suboptimal solutions from the process control point of view. In these examples it is also shown that using squared error indices produces worse solutions than using absolute value indices (with the same HP). Finally, in section 3 several solutions to the mentioned problems are described. Also, a new index is presented. This index has none of the problems
mentioned above, but the computing time needed to obtain the optimal solution is greatly increased. After the analysis of the problems, the next step will be the use of indices which recommendations in section 3, but avoiding: A huge computational time, and so allowing their use in real applications. Numerical problems due to the non-continuity or non-derivability of the objective function. As an alternative to the current optimisation tools used in predictive control, we propose the heuristic optimisation tools (for example, simulated annealing or genetic algorithms) because they are numerically robust and the computing time is not very high when dealing with complex indices. 5. REFERENCES Camacho, E.F. and C. Bordons (1995). Model Predictive Control in the Process Industry. Springer. Chen, H. and F. Allgower (1997). A quasi-innite horizon nonlinear model predictive control scheme with guaranteed stability. Accepted for Automatica. Chow, C.M. and D.W. Clarke (1994). Actuator nonlinearities in predictive control. In: Advances in Model-Based Predictive Control (D. W. Clarke, Ed.). pp. 245{260. Oxford University Press. Cifuentes, F. (1998). Developing multivariable control proyects in the REPSOL company. Technical report. Repsol Company. Clarke, D.W., C. Mohtadi and P.S. Tus (1987). Generalized Predictive Control-Part I. Automatica 23(2), 137{148. de Madrid, A. Perez (1995). Aplicacion de tecnicas de programacion dinamica a control predictivo basado en modelos. PhD thesis. Universidad Nacional de Educacion a Distancia. Facultad de Ciencias. Keyser, R.M.C. De, G.A. Van de Velde and F.A.G. Dumortier (1988). A Comparative Study of Self-adaptive Long-range Predictive Control Methods. Automatica 24(2), 149{ 163. Martnez, M., J.S. Senent and F.X. Blasco (1998). Genelarized Predictive Control Using Genetic Algorithms (GAGPC). Engineering Applications of Articial Intelligence. MathWorks Inc. (1996). Optimization Toolbox. User's Guide. Version 5. The MathWorks Inc. Michalska, H. and D.Q. Mayne (1993). Robust Receding Horizon Control of Constrained Nonlinear Systems. IEEE Trans. on Automatic Control 38(11), 1623{1633. Qin, S. Joe and T. A. Badgwell (1996). An Overview of Industrial Model Predictive Control Technology. Technical report. Dept. of Chemical Engineering, The University of Texas at Austin. Senent, J.S., M.A. Martnez, X. Blasco and J. Sanchis (1998). MIMO predictive control of temperature and humidity inside a greenhouse using simulated annealing (SA) as optmizer of a multicriteria index. In: Lecture Notes in Articial Intelligence 1416.. Vol. II. pp. 271{ 279. Springer. Yoon, T.W. and David W. Clarke (1993). Receding-horizon predictive control with exponential weighting. Int. J. Systems Sci. 24(9), 1745 1757. Zamarreno, J.M. and P. Vega (1997). Identication and predictive control of a melter unit from the sugar industry using recurrent neural nets. Articial Intelligence in Engineering (11), 365{373.