scieee AI-readable full text Open interactive document viewer

Implementation of min–max MPC using hinging hyperplanes. Application to a heat exchanger

Rodríguez Ramírez, Daniel; Camacho, Eduardo F.; Arahal, Manuel R.

Abstract

Min–max model predictive control (MMMPC) is one of the few control techniques able to cope with modelling errors or uncertainties in an explicit manner. The implementation of MMMPC suffers a large computational burden due to the numerical min–max problem that has to be solved at every sampling time. This fact severely limits the range of processes to which this control structure can be applied. An implementation scheme based on hinging hyperplanes that overcome these problems is presented here. Experimental results obtained when applying the controller to the heat exchanger of a pilot plant are given.

Full text

IMPLEMENTATION OF MIN-MAX MPC USING HINGING HYPERPLANES. APPLICATION TO A HEAT EXCHANGER D.R. Ramírez E.F. Camacho Departamento de Ingeniería de Sistemas y Automática, Universidad de Sevilla Escuela Superior de Ingenieros Camino de los Descubrimientos s/n 41092 Sevilla Phone: +34 954487357 Fax: +34 954487340 email: {danirr,eduardo}@cartuja.us.es Abstract: Min-max model predictive controllers (MMMPC) have been proposed for the control of linear plants subject to bounded uncertainties. The implementation of MMMPC suffers a large computational burden due to the numerical optimization problem that has to be solved at every sampling time. This fact severely limits the range of processes in which this control is suitable. Here an implementation scheme based on hinging hyperplanes is presented. Experimental results obtained when applying the controller to a heat exchanger are given. Keywords: Predictive control, Minimax techniques, Hinging hyperplanes, Uncertain linear systems, Process control. 1. INTRODUCTION Mathematicalmodels,especiallycontrolmodels which havetobekeptsimple,canonlydescribethedynamics of a process in an approximate way. There are different approaches for modelling uncertainties mainly dependingon the type of techniqueused for designing the controllers. The approach considered here is that of global uncertainties. In this, uncertainties are considered to affect the 1-step ahead prediction equation, i.e. the uncertainties affect the prediction capability of the model. The global uncertainties approach can be found in (Camacho and Bordons, 1999). Min-Max control techniques have a great computational burden in common which limits the range of processes to which they can be applied to those with slow dynamics. Few applications of Min-Max MPC can be found in the literature even for slow dynamics (Kim and Kwon, 1998; Camacho and Berenguel, 1997). The application of Min-Max MPC to plants with fast dynamics cannot be based on numerical methods. In (Ramírez et al., 2001) a neural network based implementationis shown. Neuralnetworks have proven themselves to be good for nonlinear function approximation, but there is always an approximation error. Furthermore patterns from a large region of the process output space have to be computed. A better solution is the use of explicit forms of the control law. An explicit form for the Min-Max MPC with an ∞- norm based cost function can be found using multiparametric programming as shown in (Bemporad et al., 2001). However, there are no techniques available to solve multiparametric min-max problems when the cost function is a quadratic criterion. In (Ramírez andCamacho, 2001)it is shownthat Min- Max MPC results in a piecewise linear control law when additiveuncertainties are taken into account and a quadratic cost function is used. Thus, an approximation made with hyperplanes would be a better option than the neural network approach. Such approximation could be made practically error free. Hinging Hyperplanes (Breiman, 1993) is a nonlinear function approximation technique that uses hinge functions, i.e. hyperplanes joined together. With this technique, piecewise linear functions can be described using a basis function expansion. This paper presents a way to implement Min-Max MPC with additive uncertainties and quadratic cost Copyright © 2002 IFAC 15th Triennial World Congress, Barcelona, Spain function for linear plants using closed formulae of the control law. These formulae are obtained using the hinging hyperplanes technique over a set of patterns computed by solving the min-max problem numerically. Another difficulty arises when the plant has a large dead time. In this case, the effect of past values of the control signal have to be taken into account in the min-max optimization. This paper shows how to overcome this problem without loosing the robustness properties of Min-Max MPC and with only a gain of conservativeness in the control law. The paper is organized as follows: section 2 presents the basic Min-Max MPC with bounded global uncertainties algorithm. Section 3 is devoted to the Min- Max MPC with bounded global uncertainties algorithm for plants with long delays. The hinging hyperplanes technique for nonlinear function approximation is reviewed in section 4. Finally, section 5 shows the application of the MMMPC to a heat exchanger and section 6 presents the conclusions. 2. MIN-MAX MPC WITH BOUNDED GLOBAL UNCERTAINTIES The objective of MPC control is to compute the future control sequence u  t  u  t  1  u  t  N  1  in such a way that the optimal j-step ahead predictions y  t  j  t  are driven close to the set point sequence w  t  w  t  1  w  t  N  1  for the prediction horizon. The way in which the system will approach the desired trajectories will be indicated by a function J which depends on present and future control signals and uncertainties. When boundeduncertainties are explicitly considered, it would seem that a more robust control is obtained if the controller tries to minimize the objective function for the worst situation. That is, by solving the following min-max problem: minmax θ  ΘJ  θ  u  (1) where θ represents the sequence of future uncertainties. The min-max problem (1) can be rewritten as: minmax θ  ΘJ  θ  u  minJ   u  with: J   u  max θ  ΘJ  θ  u  being Θ  θ  ℜN2  θ  θ  θ  . The function to be minimized, J   u  , is the maximum of the objective function J  θ  u  which measures how closely the process output follows the reference trajectories. The form of J  θ  u  is a quadratic criterion: J  θ  u  N2 ∑ j  N1  yk  j  k  wk  j  2  λ Nu ∑ j  1  ∆uk  j  1  2 where: ∆  1  z  1,N1and N2define the beginning and end of the cost horizon, Nuis the control horizon and yk  j  kis the worst-case prediction output. When a global uncertainties approach is used, the way to model the uncertainties is to assume that all modelling errors are globalized in a vector of parameters, in such a way that the plant can be described by the following family of models: ˆy  t  1  ˆ f  y  t  y  t  nna  u  t  u  t  nnb  θ  t  In (Camacho and Bordons, 1999) it is shown that global uncertainties can be related to other types of uncertainties. In this work the prediction model used is a CARIMA model with integrated uncertainties: ∆A  z  1  y  t  z  dB  z  1  ∆u  t  1  θ  t  with θ  t  Θ. 3. WORST CASE PREDICTION OF DELAYED OUTPUT MIN-MAX MPC When the prediction model has a dead time d, the start of the prediction horizon should be set to N1  d  1, so if dis large, then long prediction horizons should be used. Also, past values of the control signal have to be taken into account in the optimization and later used as input arguments for the approximation of the control law. On the other hand, predicted outputs up to ddo not depend on the values of the decision variables. The computational burden and the number of input arguments in the approximation would be greatly reduced if an estimation of the process output after thedead time werecomputed.Then,the min-max problem can be solved taking into account only the possible uncertainty extreme realizations for yk  N1to yk  N2. However, the estimation of the process output up to the dead time should include some form of uncertainty. Thus, bounds of the uncertainty in the estimation of yk  dhave to be computed; they can then be used as an additional source of uncertainty to predict the future process outputs from yk  N1to yk  N2. This strategyappliedfor a first orderCARIMA prediction model can be formulated as the following steps: First, compute the bounds for y  k  d  and y  k  d  1  : θ ! k  d  1  max θ  yk  d  1  ˆyk  d  1  θ ! k  d  1  min θ  yk  d  1  ˆyk  d  1  θ ! k  d  max θ  yk  d  ˆyk  d  θ ! k  d  min θ  yk  d  ˆyk  d  where ˆyk  d  1y ˆyk  dare nominal values for yk  d  1and yk  d. Second, obtain the control law solving the minmax problem for the nominal plant without dead time using the following function: f  yk  d  yk  d  1  min ∆umax θ  k  d  θ J  ∆u  θ ! k  d  θ  taking into account the uncertainties in the plant output for y  k  d  and y  k  d  1  , which have to be reflected in the future output predictions. Thus, the future output predicted will be: yk  d  1   1  a   yk  d  θ ! k  d   a  yk  d  1  θ ! k  d  1  θ k  d  1 yk  d  2   1  a  yk  d  1  a  yk  d  θ ! k  d   θ k  d  2  It can be seen that the prediction model is an affine function of θ ! k  d  1  θ ! k  das well as of θ . This implies that the maximum of Jfor θ ! k  d  1  θ ! k  dwill be reached on one of the vertexes of the hypercube  θ ! k  d  1  θ ! k  d  . This strategy is more conservative than a traditional Min-Max MPC in the sense that only the maximum and minimum values for y  k  d  and y  k  d  1  are considered as starting points for the min-max optimization. To reduce this excess of conservatism only the vertexes  θ ! k  d  1  θ ! k  d  and  θ ! k  d  1  θ ! k  d  are considered in the optimization, with the assumption that the other two vertexes  θ ! k  d  1  θ ! k  d  and  θ ! k  d  1  θ ! k  d  describe very unrealistic situations. The total of vertexes to be considered for the max part of the problem will be 2N2  d  1, instead of the 2N2of the original formulation. On the other hand, it can easily be seen that the bounds values  θ ! k  d  1  θ ! k  d  and  θ ! k  d  1  θ ! k  d  are independent of the values of  yk  1  yk  and they are also independentof past andfuture controlactions. These considerations imply that the bounds for y  k  d  and y  k  d  1  have only to be computed once. Figure 1 illustrates the behaviour of a Min-Max MPC controller using this strategy compared to a traditional Min-Max MPC controller and a conventional MPC controller, using the same values for control and prediction horizons and control effort weighting. For the Min-Max MPC controllers the bounds for the uncertainty were θ  Θ   0  5 and θ  Θ  0  5. This faster response compared to the traditional Min-Max MPC is due to the greater conservatism of considering only the maximumand minimumvalues of yk  d  1and yk  d. 0 20 40 60 80 100 120 140 160 180 30 31 32 33 34 35 36 37 38 MPC, Min−Max MPC and Modified Min−Max MPC for Heat Exchanger Model (d=6) samples Heat Exchanger Output Temperature (o C) MPC Min−Max MPC Modified Min−Max MPC Fig. 1. Output of a MPC, Min-Max MPC and Min- Max MPC modified controllers applied to the plant yk  1  0  9048yk  0  0128uk  6. 4. HINGING HYPERPLANES Thenonlinearfunctionapproximationtechniquenamed hinging hyperplanes was introduced by (Breiman, 1993). It can be described as a basis function expansion: f  x   K ∑ i  1 hi  ϕ i  x  where hiare called the hinge functions. A hinge function consists of two hyperplanes joined together. These two hyperplanes are given by: h   ϕ  x h   ϕ  x where x   1  x1  xm  . The hyperplanes are joined at  ϕ   ϕ   x  0. The hinge is defined by ϕ   ϕ  or its multiples. The hinge function is given by: h  max  h   h   or h  min  h   h   The correct form is that which gives a smaller approximation error when the parameters, ϕ  and ϕ  , are estimated. In the hinging hyperplanes approach there are two key elements: the hinge finding algorithm (HFA) and the hinginghyperplanesalgorithm (HH). In (Breiman, 1993) and (Pucar and Sjöberg, 1996) different types of algorithms are presented. In this work, the original algorithms presented in (Breiman, 1993) are used. In the following, short descriptions of these algorithms are given. 4.1 Hinge finding algorithm The initial data are N regression pairs  yi  xi  . The algorithm takes the following steps: (1) Choose an initial partition of  yi  xi  into two sets named S  and S  with approximately half the data of  yi  xi  in each set. (2) Compute ϕ  as the parameter vector of the hyperplane with the best fit in the least squares sense. Also, compute ϕ  from S  in the same way. (3) Update S  and S  according to S    xi: ϕ xi  0  and S    xi: ϕ xi  0  . (4) Repeat from step 2, until the convergence criterion is satisfied. In this work the decrease of the squared sum of errors is used. In (Pucar and Sjöberg, 1996) it is reported that this algorithm shows convergence problems, but convergence is guaranteed if the function to be approximated is a hinge function. Although the function to be approximated here is not a hinge function (but a piecewise linear function), this algorithm has been applied with success. 4.2 The hinging hyperplanes algorithm More than one hinge is usually necessary to approximate a function. The HH algorithm allows as many hinges to be used as necessary to approximate a function. Here, the refitting method (Breiman, 1993) is used: (1) For K  1, find h1  x  with the HFA. (2) For K  1: (a) Run the HFA over the residuals f  x   ∑K  1 k  1hk  x  to find hK  x  . Add hK  x  to the set of computed hinges. (b) Refit all the computed hinges according to the following scheme: refit h1  x  using f  x   ∑K k  2hk  x  refit h2  x  using f  x   ∑K k  1  k   2hk  x  for j  Krefit hj  x  using f  x   ∑K k  1  k   jhk  x  (c) Repeat from step (b), until the convergence criterion is satisfied. In this case until f  x   ∑K k  1hk  x  ceases to significantly decrease. 5. APPLICATION TO A HEAT EXCHANGER The controller presented in section 2 and 3 has been applied to a heat exchanger which in turn is part of a pilot plant. A diagram of the pilot plant which shows its main elements as well as the localization of the various instruments is given in Figure 2. The main elements are: Feed circuit. The plant has two input pipes, a cold water one (whose temperature is regulated by a cooling plant) and a hot water one (at about 70 oC) with nominal flow and pressure conditions of 10 l/min and 2 bars for the cold water and 5 l/min and 1 bar for the hot. The temperatures and the flows of the inputs are measured by thermocouples and orifice plates V8 V4 V5 FT1 TT1 FT2 TT2 LT1 PT1 TT5 FT3 TT3 waterHot waterCold Heat exchanger Tank Heater Waste Pump TT4 Fig. 2. Diagram of the Pilot Plant respectively, with controlled pneumatic valves for regulating the input flows. Tank. This has a height of 1 m and an interior diameter of 20 cm, it is thermically insulated, and with an approximate volume of 31 l. It can work pressurized (up to a limit of 4 bars) or at atmospheric pressure, depending on the position of the vent valve. In its interior there is a 15 kW electric resistor for heating, also an overflow pipe, an output pipe and another one for recirculating the water through the exchanger. Recirculation circuit. The hot water in the tank can be cooled by entering cold water through the cooling circuit.This circuit is composedof a centrifugal pump that circulates the hot water from the bottom of the tank through a tube bundle heat exchanger returning at a lower temperature at its top. The plant control elements are connected to a PMC10 unit operated under the ORSI CUBE control software. The PMC10 architecture allows control algorithms programmed in a PC using CUBE’s ITER II language to be implemented. However, the execution time is restricted to 100 milliseconds and taking into account the fact that PMC10 CPU is an old Intel 8086 it is clear that the min-max problem cannot be solved numerically in the PMC10. Therefore it is a suitable scenario for the hinging hyperplane implementation described in this paper. A first order lineal model for the transfer function from V8 to TT4 has been obtained by step response. The initial conditions were V8  50%  TT4  31  73  C,TT5 controlled with a PID around 50  C, constant tank level of 76  8% and the set point for the cooling plant to get TT2around 23  3  C. A step in the aperture of valve V8 from 50% to 70% yields the following model: G  s   0  135 6s  1e  6s(2) A CARIMA model is obtained by sampling model (2) with a sampling time of 1 second (thus, d  6) and the controller parameters have been chosen to be Nu  3  N1  7  N2  N θ  12  λ  3  0  θ  0  2  θ   0  2. The experiments carried out use set point values of 32oC, 35oCand 37oC. For each value a controller is computed using the algorithms of section 4. Three training sets are generated, each set having 500 patterns obtained from a temperature range of set point  0  5oC. Each pattern represent the first control move (i.e. ∆uk) of the optimal sequence of future control moves for a given process state. The HH algorithm is applied to each set until the squared sum of errors ceases to have any significant decrease. In each sets two hinges lead to a squared sum of errors of less than 10  4. Such a small amount of error means that only three hyperplanes exist in this region of the process state space, each one for a different type of solution to the min-max problem (Ramírez and Camacho, 2001). Theoretically the error should be zero, but the numerical method used in the MATLAB function fmincon sometimes fails to find the solution accurately. Each controller has the following hinging hyperplanes description: ∆uk  f  y   h1  ϕ 1  y  h2  ϕ 2  y   min  y  4  6716  5  5061 5  3652   y  274  9840 15  3927  23  9867    max  y   271  5947  15  0956 23  5778   y   0  9158 5  8031  5  7738   ∆uk  f  y   h1  ϕ 1  y  h2  ϕ 2  y   min  y  14  0144  4  5948 4  1988   y  309  6598 16  3106  25  1589    max  y   305  9432  16  0135 24  7503   y   9  9174 4  8917  4  6074   ∆uk  f  y   h1  ϕ 1  y  h2  ϕ 2  y   min  y  294  2144 14  6098  22  5621   y   18  1357  6  3451 6  8398    max  y   290  2772  14  3128 22  1536   y  22  4706 6  6421  7  2488   Each expression was tested with a test set of 100 patterns obtained from a temperature range of 29oCto 41oCandthe squaredsum of errorswas again less than 10  4in each set. This illustrates that, as expected, the hinging hyperplane descriptions obtained are closed formulae of the control law and not an approximation. The resulting controller was applied to the heat exchanger and some of the experimental results are depicted in figures 3 and 4. Figure 3 shows a set point tracking experiment. It is noteworthy that the set point is much higher than the operating point considered for modelling the heat exchanger dynamics. The noisy output is due to the variationsin the tanktemperature(TT5) whichis regulated by a local PI. The first set point change raises the V8 aperturewhich in turn lowers the tank temperature. This causes the V8 to be opened even more because a greater flow through the heat exchanger is required to reach the set point. As TT5 returns to its nominal value, V8 closes to keep the output near the set point. Disturbance rejection is illustrated in figure 4. In this case the manual valve of cold water was closed for 12 and 11 seconds, causing the temperature to greatly deviate from the set point. The controller reacts by closing the recirculationvalveV8 to lowerthe temperature by having less hot water to be cooled. Re-opening the valve is another disturbance and the controller has to open the V8 valve again to bring the temperature TT4 to the desired value. Moreover,before the second disturbance a change in the set point of TT5 is brought about, forcing it to reach a much higher value than that existing when the model was identified. This is a slow variation of plant dynamics. The controller is able to keep the outputclose to the set point as soon as the tank temperature reaches the new operating point. Meanwhile, a small offset is observed as is expected, because the uncertainty grows like a ramp and the integrated uncertainties MMMPC are formulated to reject step disturbances. Finally, it is noteworthy that the disturbance rejectionis similar to the first time that the cold water valve was closed, even when the plant dynamics have changed from the nominal values 6. CONCLUSIONS A Min-Max MPC controller has been proposed and applied to a pilot plant. Problems related to process delay have been tackled and discussed taking into account real time implementation requirements. The implementation has been brought to practice by means of closed formulae obtained using the hinging hyperplanes algorithm. Further investigations will be needed to include constraints in the control strategy. 7. ACKNOWLEDGMENTS The authors acknowledge MCYT-Spain for funding this work (contract QUI99-0663-C02-01). Also the anonymous reviewers are thanked for their helpful comments and suggestions. 8. REFERENCES Bemporad, A., F. Borrelli and M. Morari (2001). Robust Model Predictive Control: Piecewise Linear Explicit Solution. In: Proc. European Control Conference, ECC’01. 0 500 1000 1500 2000 2500 31 32 33 34 35 36 37 38 seconds TT4 oC (a) 0 500 1000 1500 2000 2500 50 60 70 80 90 100 V8 % 0 500 1000 1500 2000 2500 46 48 50 52 54 TT5 oC 0 500 1000 1500 2000 2500 23 24 25 26 seconds TT2 oC (b) Fig. 3. Set point tracking experiment: a) set point and heat exchanger output temperature b) Valve V8 aperture, tank temperature TT5 and cold water temperature TT2 Breiman, L. (1993). Hinging hyperplanes for regression, classification and function approximation. IEEE Trans. on Information Theory. Camacho, E. F. and Manuel Berenguel (1997). Robust adaptive model predictive control of a solar plant with bounded uncertainties. International Journal of Adaptive and Signal Processing 11, 311– 325. Camacho, E.F. and C. Bordons (1999). Model Predictive Control. Springer-Verlag. Kim, Y.H. and W.H. Kwon (1998). An application of min-max generalized predictive control to sintering processes. Control Engineering Practice 6, 999–1007. Pucar, Predrag andJonas Sjöberg(1996).On the hinge finding algorithm for hinging hyperplanes. IEEE Trans. on Information Theory. Ramírez, D.R. and E.F. Camacho (2001). On the piecewise linear nature of Min-Max Model Predictive Control with bounded uncertainties. In: Proc. 40th Conference on Decision and Control, CDC’2001. Ramírez, D.R., M.R. Arahal and E.F. Camacho (2001). Neural network based Min-Max MPC. 0 200 400 600 800 1000 33 34 35 36 37 38 39 40 41 42 seconds TT4 oC (a) 0 200 400 600 800 1000 40 50 60 70 80 V8 % 0 200 400 600 800 1000 50 55 60 65 TT5 oC 0 200 400 600 800 1000 23 24 25 26 27 seconds TT2 oC (b) Fig. 4. Disturbance rejection experiment: a) set point and heat exchanger output temperature b) Valve V8 aperture, tank temperature TT5 and cold water temperature TT2 application to a heat exchanger. In: IFAC Workshop on Adaptation and Learning in Control and Signal Processing, ALCOSP’2001.