Volterra Model Based Predictive Control, application to a Pem Fue Cell
Abstract
This paper presents a non linear model predictive controller for a PEM fuel cell for which the starvation control is the main objective. A second order Volterra model for control is obtained using input/output data for which the power supplied by the fuel cell is considered as a measurable disturbance. The controller developed allows to solve the nonlinear objective function in a way that it can be actually implemented in fast systems like Fuel cells. The use of a nonlinear controller is justified while comparing the outcome obtained with a linear controller of the same class.
Full text
VOLTERRA MODEL BASED PREDICTIVE CONTROL, APPLICATION TO A PEM FUEL CELL. F.Dorado, J.Gruber, C.Bordons, E.F.Camacho Escuela Superior de Ingenieros. Universidad de Sevilla, Camino de los descubrimientos s/n 41092 Sevilla, Spain e-mail: {fdorado,jgruber,bordons,eduardo}@cartuja.us.es Abstract: This paper presents a non linear model predictive controller for a PEM fuel cell for which the starvation control is the main objective. A second order Volterra model for control is obtained using input/output data for which the power supplied by the fuel cell is considered as a measurable disturbance. The controller developed allows to solve the nonlinear objective function in a way that it can be actually implemented in fast systems like Fuel cells. The use of a nonlinear controller is justified while comparing the outcome obtained with a linear controller of the same class. Keywords: Model Identification, Model predictive control, Fuel Cells. 1. INTRODUCTION Fuel cells technology has proven a great development in recent years, mainly in the search of efficient and less polluting alternative sources of energy to the traditional ones. There are still many open issues regarding the practical use of this technology, depending on the type of fuel cell being considered. These research topics range from manufacturing issues to materials science, and process control is among those areas of active work (Prukushpan et al., 2004b), (Prukushpan et al., 2004a). In this paper, a Polymer Electrolyte Membrane (PEM) fuel cell is considered, whose fast dynamical response and low temperature operation makes it suitable for mobile applications. Linear controller design techniques are widely employed in industry, although a great deal of processes are non-linear. In many situations the process is operating in the vicinity of a nominal operating point and therefore a linear model can provide good performance. The simplicity and the existence of tested identification techniques for linear models allows an easy and successful implementation of linear controllers in many situations. However, there exist many situations in which non-linear effects justify the need of nonlinear models, such as in the case of strong nonlinear processes subject to big disturbances or setpoint tracking problems where the operating point is continually changing, showing the nonlinear process dynamics. When the model is nonlinear the resulting control schemes present some challenging problems. A clear example is Linear Model Predictive Control, (mpc) which is arguably the most popular advanced control technique in industry, due to the intuitive control problem formulation and its ability to deal with economic objectives and operating constraints (Camacho and Bordons, 2004). However, its nonlinear formulation has a lot of open issues, and its scarce influence on industrial control practice is nowadays due to two main reasons: on one hand its online computational complexity and on the other, its inability to construct a nonlinear model on a reliable and consistent basis (Lee, 2000), despite nonlinear dynamics are significant in industrial processes. 169
Using a nonlinear model changes the predictive control problem from a convex quadratic program to a non-convex nonlinear problem, which is much more difficult to solve. Furthermore, in this situation there is no guarantee that the global optimum can be found, especially in real time control, when the optimum has to be obtained in a prescribed time. The solution of this problem requires the consideration (and at least a partial solution) of a nonconvex, nonlinear problem (nlp), which gives rise to a lot computational difficulties related to the expense and reliability of solving the nlp on line. Nevertheless, when the process is described by a Volterra model, efficient solutions for the model predictive control problem can be found. This solution makes use of the particular structure of the model, giving an on-line feasible solution. The main advantage about the use of Volterra models relies in the fact that being a natural extension of the linear convolution models, they are quite straight forward to obtain from input/output data without any prior consideration about the process model structure. Hence, in this paper the ability to capture non linear dynamics of the process combined with the explicit consideration of operation constraints are taken into account. The paper is organized as follows. First the PEM fuel cell is described, as well as the control objective. In the following section, the model prediction equations and the optimization procedure that involves the controller is presented. Then the proposed control strategy is tested under simulation of a PEM fuel cell model, where a comparison with other control techniques is performed. Finally, the major conclusions are drawn. 2. PEM FUEL CELL Polymer Electrolyte Membrane (PEM) Fuel Cells is one group of fuel cells that run at low temperature and show fast dynamical response, making them suitable for mobile applications. As in all fuel cells there are many components making up the whole power system in order to be able to supply electrical power. Typical components include DC/DC or DC/AC converters, batteries and in the case the fuel cell is not fed directly with hydrogen, a reformer must also be used. Therefore, there are many control loops schemes depending on the devices that must be controlled. The lower control level takes care of the main control loops inside the fuel cell, which are basically fuel/air feeding, humidity, pressure and temperature. The work carried out in this paper deals with the low level control of the fuel cell, where several techniques exist to fulfil one of three main possible objectives to achieve: maximum efficiency, voltage control or starvation prevention. In all cases, the controller manipulates air and fuel feeding, playing with compressor voltage and hydrogen supply valve. The controller developed will consider that the operating temperature inside the cells and reactive humidity are controlled, so these variables can be considered to be constant. Hydrogen supply is controlled using the inlet valve in such a way that hydrogen pressure in the anode tracks oxygen pressure in the cathode. This is done by a simple proportional controller in order to avoid high differential inlet pressure which could spoil the device. The main control action is therefore oxygen (or air) pressure, which is manipulated by acting on the compressor voltage. The control criterion considered for the controller will be starvation. This is the worst phenomenon that can take place in a fuel cell, since once it has appeared the only way to deal with it is to switch the cell off or in other case the cell could be destroyed. Starvation is related to the amount of available oxygen inside the cell and takes place when this amount drops below a certain limit. Oxygen excess ratio is an indicative of the occurrence of this situation and can be considered a good performance index. It is defined as: λO2=WO2,in WO2,react (1) Being WO2,in the amount of oxygen that reaches the cathode and WO2,react the amount of oxygen that really reacts. This variable must be supervised and kept above a threshold to maintain a safe operation regime. The objective criterium must be achieved independently of the load demand, that is, the current that the cell must supply at each moment, which is the main disturbance. Therefore the process inputs are the compressor voltage which is the manipulated variable and the load current that is the disturbance. The main process outputs are oxygen excess ratio and cell voltage. 3. VOLTERRA MODEL BASED PREDICTIVE CONTROLLER Volterra models are given, in their quadratic formulation, by equation (2). In which the additional second order terms in form of crossed products of former inputs are able to capture some nonlinear behavior of industrial processes. In table (1) the are explained the meaning for the parameters involved in the model. 170
y(k+d) = h0+ N1 X i=0 h1iu(k−i) + N2 X i=0 N2 X j=i h2iju(k−i)u(k−j) (2) Table 1. Volterra Model Structure d Delay N1Linear Truncation Order N2Quadratic truncation Order Once the model has been defined it is possible to build the prediction equations, whose structure reminds of those of the linear mpc (Clarke et al., 1987), except for new terms that appear due to the nonlinear extension: y=Gu +c+f c=Hupast +p+g(3) In equation (3) all the elements for the prediction are presented. The vector of predicted system outputs ydepends both of past plant inputs cand future inputs that will be given during the control horizon. The vector of future control actions is u, which is the one that has to be calculated, and fis a vector containing all the quadratic terms of future control actions. This is the term giving the nonlinear characteristic to the optimization problem. On the other hand, all the past history of the dynamic is contained in cwhose dependence of past input / outputs of the system is explained trough the past control actions upast, prediction error p, and the quadratic past inputs g. Considering Npand Nuas the prediction horizon and control horizon respectively, the matrices involved in equation (3) are: G= h1(1) 0 ... 0 h1(2) h1(1) 0 . . .. . ....h1(1) . . .. . .h1(1) + h1(2) . . .. . .. . . h1(p)h1(p−1) ... Pp+m−1 i=1 h1(i) H= h1(2) h1(3) . . . h1(N1) 0 h1(3) . . . h1(N1) 0 . . . . . .. . . 0 . . . h1(N1−1) h1(N1). . . h1(N1) 0 . . .. . .. . .. . .. . . 0 0 0 0 0 The prediction error pis calculated as the difference between the measured value of the process output and predicted model output at each sample time, and it is considered constant for the rest of the prediction horizon. The computation of the elements in vectors f and gis done through a proper partition of the quadratic terms. The rearrangement is as follows: The crossed future-future and future-past control action terms will be included in f. On the other hand gwill account only for past-past input terms. Defining a matrix Bcontaining the second order coefficients as in (4), the calculation of the terms of fiand gican be written as in (5) and (6) respectively. In order to illustrate this structure it has been chosen N2= 4 B= h2(1,1) h2(1,2) h2(1,3) h2(1,4) 0h2(2,2) h2(2,3) h2(2,4) 0 0 h2(3,3) h2(3,4) 000h2(4,4) (4) f1=u(k) 0 0 0B u(k)u(k−1) u(k−2) u(k−3)T f2=u(k+ 1) u(k) 0 0B u(k+ 1) u(k)u(k−1) u(k−2)T . . . fp=u(k+p−1) . . . u(k+p−4) B u(k+p−1) . . . u(k+p−4)T (5) g1=0u(k−1) u(k−2) u(k−3) B0u(k−1) u(k−2) u(k−3)T g2=00u(k−1) u(k−2) B00u(k−1) u(k−2)T . . . gp=0000B0 0 0 0T(6) The control action is computed in order to minimize a quadratic function, that has been taken as shown in equation (7). J= Np2 X j=Np1 [ˆy(t+j|t)−w(t+j)]2+ Nu X j=1 λ[∆u(t+j−1)]2(7) 171
Following the ideas of Doyle et al. (Doyle et al., 2002), an iterative algorithm is proposed to obtain an approach to the optimization problem that arises while dealing with vpc. For the unconstrained case, the iterative algorithm is: Step 1. set i= 1. Step 2. Calculate cand usolving the least squares control problem in (8). c=Hupast +g+p u= (GtG)−1Gt(s−c−f) (8) Step 3. Determine if the condition to end the iteration process is met: |ui(k)−ui−1(k)| ≤ ∆ (9) where ∆ is the desired tolerance. •If the condition is achieved, then u(k) = ui(k) •If not, recalculate fusing ui(k) for present and future values of the input. Set i=i+ 1, and return to step 2. 4. IDENTIFICATION OF VOLTERRA MODEL While trying to identify a linear input/output model for a linear mpc it is usually used an prbs signal to feed the input of the system. Thus, with the output signal obtained it is possible to identify a model adjusting the resulting data set. For the linear case, this is an ordinary least squares problem. The actions required to identify a second order Volterra model are slightly different, but still sharing much of this straightforward method. The main difference lies in the fact that a three level input signal is needed rather that a prbs signal. However, for the rest of the identification procedure nothing else is changed, since the identification problem to be solved remains an ordinary least squares problem, and thus not needing any special formulation to identify a model (Pearson, 1999). In order to identify a model for the PEM fuel cell it has been used a non linear simulator ((del Real et al., 2007)). This model combines theoretical equations and experimental relations, resulting in a semi-empirical formulation. It describes the following areas: fluid dynamics in the gas flow fields and gas diffusion layers (oxygen, nitrogen, liquid water and vapor); thermal dynamics and temperature effects; and a novel algorithm to calcule an empirical polarization curve. As a result, this model can predict both steady and transient states due to variable loads (such as flooding and anode purges), as well as the system start-up. Figure 1 shows the data set used to obtain the second order Volterra model for the system. The identification data was obtained for three different loads for the fuel cell, represented by the current supplied, starting at 5 Aand ending at 30 A. The manipulated variable, that is, the compressor voltage, is set to three different levels for each operation point, so that the non linear behavior of the plant, mainly the nonlinear gain can be extracted through the identification procedure. On the other hand it can be seen how the output variable can take values between 1.5 and 3.8. 0 100 200 300 400 500 600 40 60 80 t [s] u [%] 0 100 200 300 400 500 600 0 10 20 30 t [s] w [A] 0 100 200 300 400 500 600 1 2 3 4 t [s] λ [−] Fig. 1. Identification Data Set The Volterra model that was chosen for this process was taken accordint to the following truncation orders shwon in table 2. Table 2. Model parameters Parameter Value N140 N220 The values for the model are presented in figures 2 and 3. The linear parameters of the model (2) are displayed in (2), in which the typical impulse response for a linear model can be recognized. On the other hand, the second order parameters are presented in 3, where it can be seen the fading memory of the system through the decay of the parameters value towards zero while time passes. This behavior could be interpreted as an extended second order impulse response. Finally in 4 the results of identifying the system are shown. In the upper graph the identification data set is presented with the outcome of the model, whereas in the bottom plot, the validation set is displayed. 172
0 5 10 15 20 25 30 35 40 −0.2 0 0.2 0.4 0.6 0.8 1 1.2 i [−] h1i Fig. 2. Volterra model: Linear parameters 0510 15 20 0 5 10 15 20 −4 −3 −2 −1 0 1 2 i [−] j [−] h2ij Fig. 3. Volterra model: Second order parameters 0 100 200 300 400 500 600 1 1.5 2 2.5 3 3.5 4 t [s] λ [−] real model 0 100 200 300 400 500 600 1 1.5 2 2.5 3 3.5 4 t [s] λ [−] real model Fig. 4. Outcome of model. Identification (top) and validation (bottom) sets 5. CONTROLLER PERFORMANCE Finally, the Volterra model based predictive controller was implemented in Simulink and applied to the mathematical model of the fuel cell. A second controller, a linear model predictive controller, was used to obtain simulation results allowing comparison between the linear and non linear controllers. During the simulations, different steps in the measurable perturbation w(current in the fuel cell) were applied. In first place, the linear predictive controller was tested with the fuel cell model. The controller is based on a convolution model with N1= 40 and N1= 1 parameters considering the influence of input uand perturbation w. As prediction horizon Np= 40 and as control horizon Nu= 10 was used. For the weight parameter λ, considering the control action in the cost function, a value of 1000 was chosen. Figure 5 shows the simulation results of the fuel cell model controlled by the linear controller. As can be seen in the results, the linear controller is able to compensate the discrepancy between the oxygen excess ratio and its reference. In steady state, the linear controller avoids errors and stabilizes the oxygen excess ration in λ= 2. On the other hand, the results show clearly that the controller changes its behavior for different values of the perturbation. For low values of the perturbation, the output of the system tends to oscillate. For high values of w, the system response gets very slowly needing nearly 10 seconds to reach steady state. 0 20 40 60 80 100 120 140 1 2 3 t [s] λ [−] 0 20 40 60 80 100 120 140 25 30 35 t [s] Vst [V] 0 20 40 60 80 100 120 140 0 20 40 t [s] w [A] 0 20 40 60 80 100 120 140 40 60 t [s] u [%] Fig. 5. Results of the linear controller In second place, the designed nonlinear controller was applied to the simulation model. For the different horizons and the weighting parameter the same values as in the case of the linear controller were used. The results in figure 6 show that the nonlinear controller has a fast reaction on errors in the oxygen excess ratio λprovoked by sudden changes in the perturbation w. It can clearly be seen that the output of the system controlled by the nonlinear controller oscillates less for low values of the perturbation than in the case of the linear controller. For high perturbation values, the reaction of the system is considerably faster and needs only 5 seconds to reach steady state. With respect to the computational effort of the nonlinear controller, the results show that the calculation of the new control action requires in the maximum case 10 iterations (after a sudden change in the perturbation) but normally only 1 to 3 iterations (nearly steady state). In the maximum case of 10 iterations, the used computer (Pentium 173
Error linear nonlinear J 168.13 131.74 Table 3. Comparison of the sum of square errors during the simulation with the linear and nonlinear controller. 4 with 3 GHz) needed 0.0244 seconds and stayed clearly below the sampling time of 0.1 seconds. 0 20 40 60 80 100 120 140 1 2 3 t [s] λ [−] 0 20 40 60 80 100 120 140 25 30 35 t [s] Vst [V] 0 20 40 60 80 100 120 140 0 20 40 t [s] w [A] 0 20 40 60 80 100 120 140 40 60 t [s] u [%] 0 20 40 60 80 100 120 140 0 5 10 t [s] iter [−] Fig. 6. Results of the non linear controller For better comparison of the results, the oxygen excess ratio of the simulations with the linear and the nonlinear controller is shown in 7. As can be seen, both controllers show a similar behavior for intermediate values of the perturbation. For low and high values, the nonlinear controller shows a better control behavior and the oxygen excess ratio reaches steady state rapidly with few oscillation. Finally, to give an idea of the control quality, the sum of the square errors was calculated: J=X i=1 (s(i)−y(i))2 The resulting errors obtained in the simulation with the linear and the non linear controller can be seen in table 3. 0 20 40 60 80 100 120 140 1 1.5 2 2.5 3 t [s] λ [−] nonlinear linear reference Fig. 7. Direct comparison of the oxygen excess ratio controlled by the linear/non linear controller. 6. CONCLUSIONS This paper has presented a non linear model predictive controller based on Volterra models for a PEM fuel cell. In order to test the performance of the controller it was tested under simulation on a full non linear model of the real process. The advantages in performance obtained have been shown when compared to a linear counterpart. The complexity introduced by the non linear controller does not jeopardize the solution of the optimization problem, being able to deliver the control signal within the required time. 7. REFERENCES Camacho, E.F. and C. Bordons (2004). Model Predictive Control, Second Edition. SpringerVerlag, London. Clarke, D. W., C. Mohtadi and P. S. Tuffs (1987). Generalized Predictive Control: Part I: The Basic Algorithm. Automatica 23(2), 137–148. del Real, A., A. Arce and C. Bordons (2007). Development and experimental validation of a pem fuel-cell dynamic model. Journal of Power Sources. doi:10.1016/j.jpowsour.2007.04.066. Doyle, F.J., R.K. Pearson and B.A. Ogunnaike (2002). Identification and Control using Volterra Models. Springer-Verlag. Lee, J.H. (2000). Nonlinear Model Predictive Control. Chapter: Modelling and Identification for Non-linear Model Predictive Control: Requirementes, Current Status, and Future Research Needs. Birkh¨auser. Pearson, R.K. (1999). Discrete-Time Dynamic Models. Oxford Univeristy Press. Prukushpan, J. T., A. G. Stefanopoulou and H. Peng (2004a). Control of fuel cell breathing. IEEE Control Systems Magazine. Prukushpan, J. T., A. G. Stefanopoulou and H. Peng (2004b). Control of fuel cell power systems: Principles, modeling and analysis and feedback design. series Advances in Industrial Control, Springer. 174