On the implementation of an adaptive extremum seeking algorithm for hydrogen minimization in PEM fuel cell based systems
Abstract
This work presents initial experimental results of an adaptive sliding-mode extremum seeker that minimizes the hydrogen consumption in a fuel cell based system. The extremum seeker is based on the classical steepest-descent method, the main challenge being the fact that the gradient of the objective function is unknown. The gradient is estimated by means of a sliding-mode adaptive estimator. The strategy is applied in experimental practical situations in a fuel cell test bench, this allows to asses the performance of the scheme as well as the difficulties that arise in real applications
Full text
On the Implementation of an Adaptive Extremum Seeking Algorithm for Hydrogen Minimization in PEM Fuel Cell Based Systems* Cristian Kunusch1Fernando Casta˜nos2 Abstract—This work presents initial experimental results of an adaptive sliding-mode extremum seeker that minimizes the hydrogen consumption in a fuel cell based system. The extremum seeker is based on the classical steepest-descent method, the main challenge being the fact that the gradient of the objective function is unknown. The gradient is estimated by means of a sliding-mode adaptive estimator. The strategy is applied in experimental practical situations in a fuel cell test bench, this allows to asses the performance of the scheme as well as the difficulties that arise in real applications. I. INTRODUCTION Extremum seeking algorithms or self-optimizing controllers deal with the problem of minimizing or maximizing an objective function based on a set of decision variables. Extremum seeking control can be traced back as far as 1922 (see [1] and references therein) and since the 1950’s it has experienced a moderate but sustained development. Early extremum seekers were based on the assumption that the input (decision variable) to output (objective function) map was static. Under this assumption, one possibility to attain an extremum is to first estimate the slope of the input–output map and then design a control law to keep the slope as close to zero as possible. A popular strategy for estimating the slope consists on exciting the plant with a sinusoidal input and multiplying the output by another sinusoidal signal of the same frequency and phase but possibly with a different amplitude. The resulting signal is then delivered to a low-pass filter, the output of which is roughly proportional to the slope (see [2] for details). Intuitively, if a given plant has stable and sufficiently fast dynamics, the actual dynamic input– output map can be considered static and the same (or a similar) algorithm can be used to find the desired extremum. Although the idea is straightforward, the formal analysis is complicated and it was not until the 2000’s that rigorous stability proofs of such schemes were given [2], [3], [4], [5]. Besides the stability proofs, some trade-offs between rate of convergence, domain of attraction and steady-sate error can be found in [3], [4], [5]. However, the absence of quantitative relationships between these variables result *This research has been supported by the Seventh Framework Programme of the European Community through the Marie Curie actions (GA: PCIG09- GA-2011-293876), Puma-Mind project (GA: FCH-JU-2011-1-303419), the CICYT project DPI2011-25649 (MICINN-Espa˜na), the CSIC JAE-DOC Research Programme. 1C. Kunusch is with Institut de Rob`otica i Inform`atica Industrial (CSICUPC), Barcelona, Spain. [email protected] 2F. Casta˜nos is with Centro de Investigaci´on y de Estudios Avanzados del Instituto Polit´ecnico Nacional (CINVESTAV), Mexico D.F., Mexico. [email protected] in a lack of definite guidelines for tuning these algorithms, so the extremum seeking problem is far from closed. Another approach consists on deriving a model for the plant. The slope is then computed analytical as a function of the system states and the known and unknown parameters. Adaptive control techniques are then applied for estimating the unknown parameters (e.g., [1], [6], [7]). The applicability of this strategy clearly breaks down as the system size and complexity increase. A. Contribution In this paper we propose to estimate the slope (or gradient) by exploiting the fact that the gradient is simply a linear (but time-varying) map between the time derivatives of the input and the output. We use a uniform exact differentiator [8] to differentiate the required signals and regard the gradient as parameter to be estimated. We estimate the parameter with an adaptive scheme based on sliding modes. The use of sliding modes is motivated by the need to estimate a time-varying parameter, i.e., as opposed to the classical adaptive schemes, which are only able to track constant parameters1. The algorithm is tested on an experimental PEM fuel cell generation system (FCGS), for which we wish to minimize the hydrogen consumption. The outcomes of the experiment show that the proposed algorithm is simple, effective and easy to implement. B. Paper structure The following section provides details about the FCGS, which mainly comprises a central PEMFC stack and auxiliary units (Fig. 1). It is assumed that the input reactant flows are efficiently humidified, that the stack temperature is well regulated by dedicated controllers and that sufficient compressed hydrogen is available, so the main attention is focused on the air management system. Section III describes the extremum seeker and Section IV presents the experimental results. Conclusions are given on the last section. II. EXTREMUM SEEKING PROBLEM STATEMENT IN PEM FCGS A. PEM Fuel Cell Generation System In a few words, the laboratory test plant considered in this work comprises a central PEMFC stack and auxiliary units. Details of the test station are shown in Fig. 2 and a schematic diagram of the system is depicted in Fig. 1, where the main subsystems can be briefly described as follows: 1See [9] for a similar strategy in the discrete-time scenario.
8 7 6 5 4 3 21 Compressed Air O2 Mass Flow Controller PEM Fuel Cell Line Heater Compressor Filter Hum. H Hum. TH Manual Back Pressure Regulator Mass Flow Controller Mass Flow Meter Compressor Control Filter Filter Vent Bypass Bypass Encoder Thermal Management Pressure measure Diff. Pressure Temp. measure Velocity measure Electrical Conditioning & Load Manual Back Pressure Regulator Vent T Voltage measure Temp. measure Differential Pressure measure Pressure measure H2 N2 Current measure Voltage measure Fig. 1. Schematic diagram of the laboratory PEM fuel cell based generation system (FCGS) at IRI (CSIC-UPC). •Air Compressor: 12 V DC oil-free diaphragm vacuum pump. The input voltage of this device is used as the control action. •Hydrogen and oxygen humidifiers and gases lineheaters: these are used to maintain proper humidity and temperature conditions inside the cell stack, an important issue for PEM membranes. Cellkraftrmembrane exchange humidifiers are used in the current setup, while decentralized PID controllers ensure adequate operation values. •Fuel cell stack: an ZBTr8-cell stack with Nafion 115r membrane electrode assemblies (MEAs) is used, 50 cm2 of active area and 150 W of maximum power. Fig. 2. Picture of the laboratory test station at IRI (CSIC-UPC) In addition, to measure the required and further experimental data, different sensors were incorporated into the system for modeling purposes: an air mass flow meter (range 0- 15 slpm) at the end of the compressor to measure its air flow (Wcp), a piezoresistive pressure transducer (range 0-2 bar) to measure the cathode and anode stack pressure (Pca and Pan), piezoresistive differential pressure transducers (range 0- 250 mbar) to measure the stack pressure drop, a tachometer (range 0-3000rpm) on the motor shaft to measure its speed ( ω cp), a current clamp (range 0-3 A) and a voltage meter (range 0-15V) to measure the motor stator current (Icp) and its voltage (Vcp), respectively. Besides, temperature sensors are arranged in order to register the different operation conditions. For further details refer to [10], where the most relevant components are characterized. In the sequel, the following modeling assumptions have been considered [10], [11]: •The air compressor behaves as a parasitic load to the stack. •A mass flow control device (WH2) ensures a constant hydrogen stoichiometry supply, usually close to 1.5. •An auxiliary control system efficiently regulates temperatures at five points of the plant: cathode and anode humidifiers (Thum,ca and Thum,an), cathode and anode line heaters (Tlh,ca and Tlh,an) and stack (Tst). •A humidity control loop regulates the water injection of the humidifiers to a relative level close to 100%. •The fuel cell model is one dimensional, so the gases and reactions are considered uniformly distributed in the cell. •The electrochemical properties are evaluated at the average stack temperature (70◦C), so temperature variations across the stack are neglected. •The water entering the cathode and anode is only in vapour phase. •The effects of liquid water creation are negligible at the gas flow model level. •The water activity is uniform across the membrane and is in equilibrium with the water activity at the cathode and anode catalyst layers. The nonlinear model of the plant under study was already developed and validated in [10], [11]. In general terms, the modeling process was conducted following a modular methodology, combining a theoretical approach together with empirical analysis based on experimental data. Taking the state vector x∈R7of the complete nonlinear model, the control input for the current study is the compressor voltage Vcp ∈R, the external disturbance is the load power Pload ∈R and the output is the stack current Ist ∈R. Accordingly, the system can be represented by the following continuous statespace equation: ˙x=f(x,Vcp,Pload),(1) where f:R9→R7and the state variables are defined as •x1= ω cp: motor shaft angular velocity; •x2=mhum,ca: air mass inside the cathode humidifier; •x3=mO2,ca: oxygen mass in the cathode channels; •x4=mN2,ca: nitrogen mass in the cathode channels; •x5=mv,ca: vapour mass in the cathode channels; •x6=mH2,an: hydrogen mass in the anode channels; •x7=mv,an: vapour mass in the anode channels. (See [11] for details.)
Fig. 3. Block diagram of the complete system. The fuel cell has state x, control Vcp (compressor voltage) and perturbation Pload (power load). A super twisting controller regulates Wcp (compressor’s air flow) to a desired reference Wcp,ref . For a given Pload and and a given set of parameters, the fuel cell carries a stack current Ist which depends on Wcp,ref . An extremum seeker is placed to find the optimal W∗ cp,ref that yields the minimum Ist. B. Optimization Problem The objective of this case study is to optimize the hydrogen consumption of the FCGS in every operating condition. Recall that both, the hydrogen and the oxygen consumed in the reaction (WH2,react and WO2,react), are directly proportional to the stack current, WH2,react =GH2 nIst 2Fand WO2,react =GO2 nIst 4F, where GH2and GO2stand for the molar mass of hydrogen and oxygen, respectively; nis the total number of cells of the stack and Fis Faraday’s constant [10]. Therefore, minimizing the hydrogen consumption is equivalent to minimizing the stack current for a given (unknown) load power. Instead of using the control Vcp directly as our decision variable for optimizing Ist, we proceed in two steps: First we design a low level controller to regulate the air flow released by the compressor, Wcp. By regulating Wcp, the compressor dynamics are isolated from the fuel cell and, in addition, oxygen starvation can be averted in order to extend the stack’s lifetime. On a second step, we construct an extremum seeker that will look for the value of Wcp for which Ist is minimal. The problem of regulating Wcp is solved by using higherorder sliding-mode control. Roughly speaking, we write Wcp as a function of the states, Wcp =W(x1,x2), and propose the error function s=W(x1,x2)−Wcp,ref with Wcp,ref the desired air flow. The error function is then taken to zero in finite time by means of a super twisting controller (see [12] for details). The regulated system can be regarded as a new system ˙ ξ =F( ξ ,Wcp,ref ,Pload)(2a) Ist =h( ξ ,Wcp,ref ,Pload),(2b) where ξ is the new state vector (consisting on the plant and controller states), Wcp,ref is the new input and Ist the output (see Fig. 3). Notice that low air mass flow implies low stack voltage and, hence, higher stack current in order to deliver the required Pload. At the same time, a higher air mass flow would require a higher compressor current, which would also increase Ist. Thus, if continuity holds, there must be a minimizing value of air mass between the two extrema of air mass flow. Indeed, the input-output maps depicted in Fig. 4 show that such minima exist. What is more, the maps can be reasonably approximated by convex functions. This results were obtained at fixed operation conditions of inlet gases humidities, temperature and hydrogen stoichiometry. Nevertheless, similar results showing the existence of global minima were obtained in other working conditions. We approach the problem of finding the optimal value W⋆ cp,ref by making two more assumptions. The first one is: •The fuel cell dynamics are stable. Pload varies slowly enough and the fuel cell dynamics are fast enough so that the map Wcp,ref 7→Ist can be considered static. More precisely, we assume that for slowly varying Wcp,ref and Pload, the system quickly reaches a unique quasi-static equilibrium ξ = φ (Wcp,ref ,Pload)defined by F φ (Wcp,ref ,Pload),Wcp,ref ,Pload=0. When substituted in (2b), the quasi-static equilibrium yields the static map Ist =HPload,Wcp,ref :=h φ (Wcp,ref ,Pload),Wcp,ref ,Pload. To simplify the notation, we will further define HP(Wcp,ref ):=H(Wcp,ref ,Pload). The second assumption is: •The map Ist =HP(Wcp,ref )is twice continuously differentiable, satisfies the bounds 0< ρ 1≤ ∂ 2HP ∂ W2 cp,ref (Wcp,ref )≤ ρ 2 and attains a minimum I⋆ st at some W⋆ cp,ref . That means that, for every Pload,HPis strictly convex and has a minimum. Fig. 4 and further experiments suggest that this assumption is reasonable within a wide fuel cell’s operation range. For convex HPthe optimal value could be easily obtained using the steepest-descent algorithm ˙ Wcp,ref =− γ∂ HP ∂ Wcp,ref (Wcp,ref )(3) with γ >0 the algorithm’s gain, if the function HPis known. Indeed, it can be shown that for convex HPthe scheme (3) implies that Wcp,ref →W⋆ cp,ref as t→∞. In practice, however, HPcontains many unknown parameters (including Pload) so knowledge of this function is unrealistic. The main idea is to use an adaptive sliding mode scheme to estimate ∂ HP ∂ Wcp,ref (Wcp,ref )on-line. Details are given in the next section.
Fig. 4. Steady-state analysis of the system performance in different load conditions III. ADAPTIVE EXTREMUM SEEKING Since (3) is not implementable, we propose instead ˙ Wcp,ref =− γ ·ˆz+d,(4) where ˆzis an estimate of the gradient z:= ∂ HP ∂ Wcp,ref (Wcp,ref )(5) and dis a dither signal required to obtain a good estimate of z. To perform such estimation, we propose an adaptive sliding-mode estimator of the form ˙ ˆz=kzsign(˙ Ist −ˆz·˙ Wcp,ref )˙ Wcp,ref ,ˆz(0) = 0,(6) where kz>0 is the estimator gain, ˙ Ist is obtained using the uniform exact differentiator described in [8] and ˙ Wcp,ref is obtained directly from (4). The following lemma shows that, for kzlarge enough, ˆz converges to the value of the true gradient zwhenever zis not too far from the origin. Lemma 1: Suppose that ˙ Wcp,ref 6=0 almost everywhere (a.e.) and suppose that kz≥ ρ 2 γ · δ 0+¯ d+ δ 1(7) for some positive constants δ 0and δ 1. Then, for all zsuch that |z|≤ δ 0, the solutions ˆzof the estimator (6) converge to zin finite time. The condition ˙ Wcp,ref 6=0 a.e. corresponds to the so-called persistence of excitation condition [13] and is guaranteed by the dither signal, which is typically a sinusoidal function of small amplitude. Proof: Notice from (5) that ˙ Ist =z·˙ Wcp,ref .(8) Using (8) we can rewrite (6) as ˙ ˆz=kzsign(z−ˆz)˙ W2 cp,ref . Since ˙ Wcp,ref 6=0 almost everywhere, we have ˙ ˆz=kzsign(z−ˆz)a.e. (9) Let s:=z−ˆzbe the sliding variable. Its time derivative is given by ˙s=˙z−˙ ˆz=−kzsign(s)+ ˙za.e. (10) Now we can take the standard approach to prove that s→0 in finite time: Define a Lyapunov function Vs(s) = s2/2 and compute its time derivative along the trajectories of (10), i.e., ˙ Vs=s·˙s≤−|s|(kz−|˙z|)≤−|s|(kz− ρ 2|˙ Wcp,ref |)a.e. (11) From |˙ Wcp,ref |≤ γ ·|z|+¯ d(cf. (4)), (7) and (11), we have ˙ Vs≤− δ 1|s|a.e. (12) Thus, the time derivative is negative. This proves that the point s=0 is an asymptotically stable equilibrium of (10). To show convergence in finite time, notice that (11) can be rewritten as ˙ Vs≤− δ 1√Vs, a.e., which implies that Vs(t)≤pVs(0)− δ 1 2t2 . It follows that at the time t1=2pVs(s(0)) δ 1(13) we have Vs(t1) = 0 (hence s(t1) = 0). For convex HPthe condition z=0 is necessary and sufficient for Ist to attain its minimum value, but because of the presence of d,zcannot be made exactly equal to zero. It is possible, however, to drive |z|to a small value proportional to ¯ d:=supt|d|. Theorem 1: Suppose that the conditions of Lemma 1 hold. Then, limsup t→∞|z|≤ ¯ d γ , that is, zconverges to the ball of radius ¯ d/ γ and center equal to zero. Proof: Define a candidate Lyapunov function Vz(z) = z2/2. Notice from (5) and (4) that ˙z= ∂ 2HP ∂ W2 cp,ref (Wcp,ref )˙ Wcp,ref =− ∂ 2HP ∂ W2 cp,ref (Wcp,ref )( γ ·ˆz−d). From Lemma 1 we know that, during the sliding motion (i.e., for t≥t1), z=ˆzso ˙z=− ∂ 2HP ∂ W2 cp,ref (Wcp,ref )( γ ·z−d). and ˙ Vz=− ∂ 2HP ∂ W2 cp,ref (Wcp,ref )· γ ·z2−z·d ≤− ρ 1|z|· γ ·|z|− ¯ d. Thus, ˙ Vzis negative whenever |z|>¯ d/ γ . This implies that |z|decreases monotonically whenever zis outside the ball of radius ¯ d/ γ .
IV. EXPERIMENTAL RESULTS A. Algorithm Performance In the current section, the performance of the FCGS is evaluated under the action of the extremum seeking supervisor control presented in section III, demonstrating its tracking performance and robustness. The complete control strategy was implemented in the data acquisition & control system. It is composed of two computers (each with four cores i5 processor at 2.6 GHz clock frequency): the host and the real-time operating system (RTOS). The host provides a LabViewrbased development environment and the graphical user interface. It is responsible for the start up, shut down, configuration changes and control settings during operation. The RTOS implements the control algorithms and the data acquisition via a field-programmable gate array (FPGA), in order to have high speed data processing. Control, security and monitoring tasks are conducted by a CompactRIO (reconfigurable Input/Output) system from National Instruments. In order to record the analog sensor signals, a 32- channel 16-bit analog input module from National Instruments is used (NI-9205). A 8-channel, digital input/output (I/O) module generates the necessary transistor-transistor logic (TTL) signals for different security and diagnostic tools. To begin with, the FCGS net power was set to 40 W and the extremum seeking algorithm was connected to check its behaviour in real conditions (Fig. 5). Five different variables can be simultaneously appreciated, the stack current (Ist(t)), the compressor air flow (Wcp(t)), the the stack current first derivative (dIst/dt), the compressor air flow first derivative (dWcp/dt) and the system gradient ( θ (t)). Note that the algorithm efficiently drives the current to its global minimum. In this case, the dither frequency was set to 0.1 Hz and its amplitude to 0.2 slpm. Fig. 5. Extremum seeking test: system tracking at 40 W In Fig. 6 the optimization (hydrogen minimization) at Pnet=60 W is depicted, obtaining efficiency improvements up to 40 %. Moreover, in this operation mode an adequate comburent flow is always ensured through the stack (oxygen stoichiometry >1), while the load demand is satisfied with minimum fuel consumption. The following experiment was conducted imposing a net power change between 40 W and 60 W (Fig. 7). In this test, it Fig. 6. Extremum seeking test: system tracking at 60 W is shown that the system under control efficiently converges to the global minimum once the flow dynamics is elapsed and the plant can be considered as a static one. Fig. 7. Extremum seeking test: Pnet change between 40 W and 60 W In the last figure (Fig. 8) the same test is presented, but the difference is that it clearly shows the system trajectory in the static planar map Wcp vs. Ist. During the first 20 seconds of the experiment (blue line), the system was driven from 40 W to 60 W of net power, note that this change was done gradually and through steps in order to keep the fuel cell stack in a nominal operation. Then once the system was set to 60 W, it can be seen how the extremum seeking algorithm stabilizes the current close to its minimum (red line). For the sake of comparison, please refer to Fig. 4. Fig. 8. Extremum seeking algorithm test: system trajectory on the static planar map Wcp vs. Ist
V. CONCLUSIONS An adaptive sliding-mode extremum algorithm has been proposed to minimize the hydrogen consumption in PEM fuel cell based systems. Special attention has been paid to the implementation aspects and initial experimental results. The algorithm evaluation has been conducted using a laboratory platform under different practical scenarios, showing its viability and suitability for energy efficiency improvement in fuel cells. The proposed control strategy has exhibits promising experimental results since, at least for the experiments carried out so far, the controller steers the air flow to a small neighborhood of its optimal value. REFERENCES [1] J. Sternby, “Adaptive control of extremum systems,” in Methods and Applications in Adaptive Control, H. Unbehauen, Ed. Springer, 1980, pp. 151 – 160. [2] M. Krstich and H. Wang, “Stability of extremum seeking feedback for general nonlinear dynamic systems,” Automatica, vol. 36, pp. 595–601, 2000. [3] M. Krsti´c, “Performance improvement and limitations in extremum seeking control,” Systems and Control Letters, vol. 39, pp. 313 – 326, 2000. [4] Y. Tan, D. Neˇsi´c, and I. Mareels, “On non-local stability properties of extremum seeking control,” Automatica, vol. 42, pp. 889 – 903, 2006. [5] Y. Tan, D. Neˇsi´c, I. Mareels, and A. Astolfi, “On global extremum seeking in the presence of local extremai,” Automatica, vol. 45, pp. 245 – 251, 2009. [6] W. Bamberger and R. Isermann, “Adaptive on-line steady-state optimization of slow dynamic processes,” Automatica, vol. 14, pp. 223 – 230, 1978. [7] M. Guay and T. Zhang, “Adaptive extremum seeking control of nonlinear dynamic systems with parametric uncertainties,” Automatica, vol. 39, pp. 1283 – 1293, 2003. [8] E. Cruz-Zavala, J. A. Moreno, and L. Fridman, “Uniform robust exact differentiator,” IEEE Trans. Autom. Control, vol. 56, pp. 2727 – 2733, Nov. 2011. [9] L. Fu and ¨ U. ¨ Ozg¨uner, “Extremum seeking with sliding mode gradient estimation and asymptotic regulation for a class of nonlinear systems,” Automatica, vol. 47, pp. 2595 – 2603, 2011. [10] C. Kunusch, P. F. Puleston, and M. Mayosky, Sliding-Mode Control of PEM Fuel Cells. Springer-Verlag, 2012. [11] ——, “Control-oriented modelling and experimental validation of a PEMFC generation system,” IEEE Trans. Energy Convers., vol. 26, pp. 851 – 861, Mar. 2011. [Online]. Available: .pdf [12] C. Kunusch, P. Puleston, M. Mayosky, and L. Fridman, “Experimental results applying second order sliding mode control to a PEM fuel cell based system,” Control Engineering Practice, vol. In Press, p. http://dx.doi.org/10.1016/j.conengprac.2012.08.002, 2012. [13] P. A. Ioannou and B. Fidan, Adaptive Control Tutorial. Kluwer Academic Publishers, 2006.