1 Introduction

A solid oxide fuel cell (SOFC) converts gaseous or gasified fuel chemical energy directly into electricity and heat at high temperatures (800–1000 °C). Among various types of fuel cells, SOFC is well known for its high energy conversion efficiency, fuel adaptability, high temperature exhaust gas, and solid state design. In addition, as a promising electricity generation technology, SOFC is particularly attractive for distributed or stationary power plants and mobile applications.

The development of effective control systems is in great demand before achieving successful commercialization of the SOFC. A good dynamic model is becoming a critical tool to study the dynamics of the SOFC, and to design and optimize the stack. Moreover, it is crucial for designing model-based control strategies. In recent years, abundant dynamic models of the SOFC have been developed and researched (Li et al., 2008; Kim et al., 2011; Menon et al., 2012; Jiang et al., 2013; Soryeok et al., 2013). Whereas, most of these models are unsuitable for model-based control design because they are too complex.

For control applications, a lot of first-principles models represented by first-order ordinary differential equations have been proposed (Salogni and Colonna, 2010; Kazempoor et al., 2011; Hajimolana et al., 2013). However, the solution to these differential equations is very difficult and time-consuming (Wang et al., 2008). By far, several identification models of the SOFC have been reported for predicting performance and control-oriented applications (Jurado, 2004; Huo et al., 2008; Yang et al., 2009; Zhang and Feng, 2009; Wu et al., 2011), which avoids using complicated differential equations to describe the stack. The SOFC dynamic identification models developed by Yang et al. (2009) and Wu et al. (2011) include temperature and heat transfer dynamics but no electrochemical dynamics. Jurado (2004), Huo et al. (2008), and Zhang and Feng (2009) considered the electrochemical characteristics in their identification models. However, it is assumed that the SOFC operating temperature is constant in (Jurado, 2004; Huo et al., 2008; Zhang and Feng, 2009). It is well known that electrochemical reactions are tightly coupled with mass transport, charge transport, and heat transfer (Bove and Ubertini, 2006; Entchev and Yang, 2007). Thus, in the present work, a control relevant dynamic identification model based on the least squares support vector regression with genetic algorithm (GA-LSSVR) by considering both electrochemical and thermal aspects of the SOFC will be presented.

Support vector regression (SVR) is a novel machine-learning method, which is developed based on the principle of structural risk minimization (SRM) from statistical learning theory (SLT). SVR can minimize both evaluated errors and model complexity at the same time, which makes it possess good generalization ability and prevents over-fitting (Qu and Zuo, 2012). Lately, the least squares support vector regression (LSSVR) has grown as a new version of SVR (Suykens et al., 2002). Because it has better generalization capability and can accomplish a global optimal value in a shorter training time, LSSVR has been successfully applied to models in numerous fields (Ge and Song, 2008; Wang et al., 2011; Xu and Huang, 2011).

However, to establish a more accurate LSSVR model, how to select the best hyper-parameters becomes a key problem. Generally, the cross-validation (CV) technique is widely used for optimizing the hyper-parameters of the regression model. Though the CV methods are simplicity, reliability, etc., their computational cost is high (Mao et al., 2011). For building a more accurate LSSVR model for the SOFC, genetic algorithm (GA) is chosen to search the optimal hyper-parameters of the LSSVR in this study.

2 Dynamic physical model of the SOFC

A dynamic physical model of the planar SOFC fed with hydrogen and air mainly considers two dynamic responses: the electrochemical dynamics and the thermal dynamics. The main assumptions of the physical model are as follows (Padullés et al., 2000; Murshed et al., 2007):

  1. (1)

    All the gases are considered as ideal gases;

  2. (2)

    The internal operating pressure is constant;

  3. (3)

    Both anode and cathode channel exhaust gases pass through a single “choked” orifice;

  4. (4)

    Temperature in the SOFC stack is uniform;

  5. (5)

    The fuel and air temperatures at the exit of both channels are equal to the inside temperatures;

  6. (6)

    Heat exchange between the stack and the ambient environment is not taken into account.

2.1 Electrochemical sub-model

The SOFC basic reaction principle is depicted in Fig. 1 (Cao et al., 2010), where TBP is the triple phase boundary. When hydrogen is used as fuel, the SOFC electrochemical reactions are given by

((1))
((2))
((3))

The SOFC electrochemical dynamics can be represented by the concentration changes of the chemical species, which take part in the cell reaction. For ideal gases, the changes of concentration and partial pressure are identical in a vessel with fixed volume (Lu et al., 2006).

Fig. 1
figure 1

Basic operating principle of the SOFC

2.1.1 Calculation of the partial pressures

Applying the perfect gas equation for hydrogen, we have

((4))

Taking the time derivative of the above expression, we can obtain:

((5))

Defining

((6))

we have

((7))

where \(p_{H_2 }\), V an, \(n_{H_2 }\), and T s are the partial pressure of hydrogen, the anode compartment volume, the mole number of hydrogen in anode, and the stack temperature, respectively.

The hydrogen molar flow rate \(q_{H_2 }\) consists of three components: the input flow rate \(q_{H_2 }^{{\text{in}}} \), the reactive flow rate \(q_{H_2 }^{\text{r}} \), and the output flow rate \(q_{H_2 }^{{\text{out}}}\). Thus, we can obtain

((8))

Similarly, the partial pressure of the product water vapor inside the anode channel can be expressed as

((9))

Inside the cathode channel, the oxygen partial pressure can be calculated as

((10))

where V ca is the cathode compartment volume. From electrochemical properties, we know that (Chakraborty, 2011)

((11))

Similarly,

((12))

and

((13))

where I is the stack current, and F is Faraday’s constant. Defining a constant as follows:

((14))

we have

((15))

and

((16))

The relation of gas molar flow through the valve and its partial pressure inside the channel can be given as (Padull#x00E9;s et al., 2000)

((17))
((18))

and

((19))

By substituting the expressions of the reaction flow rates and the output flow rates into Eqs. (8)(10) and applying the Laplace transforms, the dynamic relationships of partial pressure for hydrogen, water, and oxygen can be expressed in the following forms:

((20))
((21))
((22))

where

((23))
((24))
((25))

where \(K_{{\text{H}}_2 }\), \(K_{{\text{O}}_2 }\), and \(K_{{\text{H}}_2 {\text{O}}} \), are the valve molar constants for hydrogen, oxygen, and water, respectively; \(\tau _{{\text{H}}_2 }\) , \(\tau _{{\text{O}}_2 }\), and \(\tau _{{\text{H}}_2 {\text{O}}}\) are the response times for hydrogen flow, oxygen flow, and water flow, respectively; and s is the Laplace operator.

2.1.2 Output voltage of the SOFC

When only ohmic loss is considered, applying Nernst’s equation and Ohm’s law, the DC output voltage of the SOFC stack consisting of N 0 cells in series is represented by

((26))

and the open circuit voltage E is

((27))

where E 0, N 0, and r are the standard reversible cell potential, the cell numbers in the stack, and the ohmic resistance, respectively.

2.2 Energy balance sub-model

Suppose the SOFC stack is an adiabatic operation. Therefore, the energy consumption into the environment is not considered. It is assumed that the electrode, interconnector, and gases inside the channels of the SOFC are isothermal in any case. Ignoring the gas heat capacities, the energy balance of the SOFC stack can be expressed as (Murshed et al., 2007)

((28))

where m s and are the mass and average specific heat of the fuel cell solid materials; c p,i and \(\Delta \hat H_{\text{r}}^0\) are the specific heat of species i entering the stack and the enthalpy change of reaction of Eq. (3), respectively; T in is the inlet temperature of the SOFC, and T ref is the reference temperature. Table 1 presents some key design parameters of the SOFC studied in this work (Sedghisigarchi, 2004; Murshed et al., 2007).

Table 1 Design parameters of the SOFC

3 GA-LSSVR for nonlinear system modeling

3.1 LSSVR

The aim of this study is to find a regression function f(x) based on the given training data set, which can be used to precisely predict the output property. A training data set is assumed to be {(x i , y i ), i=1, 2, …, N}∈ ℝn ×ℝ, where x i is the input vector, and y i is the output vector. The regression function is usually formulated as

((29))

where ϕ (x i ) is a nonlinear mapping function, which maps the original input data to a high dimensional space, w is the weight vector in the feature space, and b is the bias term.

The optimization problem for the LSSVR model is formulated as

((30))
((31))

where C (a positive constant) is called the regularization parameter which is used for avoiding over-fitting, and e i is the error between the actual and the predicted outputs.

To solve the optimization problem, we construct the Lagrangian as follows:

((32))

where α i (i>=1, 2, …, N) is called the Lagrange multiplier. The conditions for optimality can be obtained by solving the following partial differential equations:

((33))

By some simple algebraic manipulations, after eliminating w and e, the matrix equation only relative to a and is obtained as

((34))

where

and

Therefore, the LSSVR model can be obtained by

((35))

K(x, x i ) is the kernel function. In this study, the radial basis function (RBF) kernel, i.e., \(K(x,x_i ) = \exp ( - ||x - x_i ||2/(2\sigma ^2 ))\), where σ is the kernel function parameter, is selected because the RBF kernel function has been widely used in a lot of nonlinear regression problems. Furthermore, there exist few parameters to be determined.

To achieve high regression performance, the hyper-parameters should be accurately chosen and this is a key issue in LSSVR modeling. To establish an efficient LSSVR model for the SOFC, two essential hyper-parameters, i.e., the regularization parameter C and the kernel function parameter σ, have to be carefully chosen in advance. The parameter C ascertains the compromise between the training error and the model complexity. The kernel parameter σ defines the variance of the nonlinear mapping function. A too small σ will lead to over-fitting, while a too big σ will result in lower modeling accuracy but higher generalization performance.

Generally, the CV techniques are widely adopted to choose the values of the LSSVR’s hyper-parameters, but they are computationally expensive. GA is a kind of evolutionary algorithm. It has been successfully used to solve a great number of optimization problems in different fields. To build a more accurate LSSVR model for the SOFC, GA is used simultaneously to optimize the LSSVR’s hyper-parameters for increasing the modeling accuracy and generalization ability.

3.2 Optimization of the LSSVR’s parameters based on GA

The hyper-parameters optimization process of the GA-LSSVR model is depicted in Fig. 2. GA is adopted to seek the optimal combination of the LSSVR’s parameters so as to obtain a smaller root mean square error (RMSE) during the LSSVR modeling. The detailed description of the optimization steps for the LSSVR’s parameters is as follows (Hsu et al., 2006; Yan, 2009; Yang et al., 2010; Yang and Shieh, 2010; Qu and Zuo, 2012):

  • Step 1. Both LSSVR’s hyper-parameters, C and σ 2, are directly coded in binary to randomly construct the chromosome. Here, each chromosome consists of 20 bit binary numbers.

  • Step 2. To obtain the optimal LSSVR’s parameters, a fitness function must be specified in advance for assessing the performance of each chromosome. In this study, the RMSE is selected as the fitness function for evaluating the modeling accuracy of the GA-LSSVR model. The fitness function is defined as

    ((36))

    where y i and \(\hat y_i\) are the actual and the predicted values, respectively.

  • Step 3. The roulette wheel selection (fitness-proportional selection) strategy is adopted to select the chromosomes with the highest fitness values to reproduce.

  • Step 4. After duplicating, the single-point crossover is applied to generate a new population by exchanging the parent chromosomes information at the assigned positions.

  • Step 5. The mutation operation with a smaller mutation operator, which is beneficial to the diversity of the population, is carried out after the crossover operation. The mutation probability is usually chosen within the limit of [0.001, 0.1].

  • Step 6. The maximum evolutional generation is selected as the termination criterion in this study. If the stopping condition is not reached, we must repeat steps 2 to 5 until the termination criterion is met.

  • Step 7. When the termination condition is satisfied, the optimal combination of the hyper-parameters, C and σ 2, is used to construct the desired SOFC dynamic model.

Fig. 2
figure 2

Process of optimizing the LSSVR’s parameters based on GA

4 Modeling the SOFC based on GA-LSSVR

4.1 Identification structure of the SOFC stack

A nonlinear autoregressive model with exogenous inputs (NARX) is usually used to describe a wide class of discrete-time nonlinear systems. Therefore, the thermal and electrochemical dynamic characteristics of the SOFC can be represented by the following NARX model:

((37))

where y(k) and x(k) are the output and input vectors at the time step k of the SOFC, respectively, n y is the output lag, n x is the input lag, and f(·) is a unknown nonlinear function needed to be identified. To analyze the load tracking performance and the temperature dynamic characteristics of the SOFC simultaneously, we choose \(x(k) = [q_{{\text{H}}_2 }^{{\text{in}}} (k),q_{{\text{O}}_2 }^{{\text{in}}} (k),I(k)]\) (i.e., the gas molar flow rates of the inlet hydrogen and inlet oxygen, and the stack current) as the input vector and \(y(k) = [V_s (k),T_s (k)]\) (i.e., the stack voltage and the operating temperature) as the output vector.

Providing that

((38))

we have

((39))

Based on the collected training data set \((\tilde x(k),y(k + 1))\), the following LSSVR model can be constructed using the LSSVR theory:

((40))

4.2 Preparation of the simulation data

In this study, the SOFC stack can be regarded as a system with three inputs and two outputs. The nominal operating parameters of the SOFC are given in Table 2 (Padullés et al., 2000; Murshed et al., 2007). Using the physical dynamic model, the modeling data for the GA-LSSVR model can be gathered. When the load step changes from 500 A to 600 A at t=200 s and from 600 A to 450 A at t=600 s, a group of input/output data \(([q_{{\text{H}}_2 }^{{\text{in}}} (i),q_{{\text{O}}_2 }^{{\text{in}}} (i),I(i),V_s (i),T_s (i)],\,\,\,i = 1,2, \ldots,1000)\) is collected by means of simulation when the sampling time is set as 1 s. The database consisting of 1000 cases with five dimensions is also divided into two sets. Here, the data \(([q_{{\text{H}}_2 }^{{\text{in}}} (1),q_{{\text{O}}_2 }^{{\text{in}}} (1),\,I(1),V_s (1),T_s (1);q_{{\text{H}}_2 }^{{\text{in}}} (2),q_{{\text{O}}_2 }^{{\text{in}}} (2),I(2),V_s (2),T_s (2); \cdots ;q_{{\text{H}}_2 }^{{\text{in}}} (800),\,q_{{\text{O}}_2 }^{{\text{in}}} (800),I(800),V_s (800),T_s (800)]\,\) is selected as the training set to identify the GA-LSSVR model of the SOFC, and the data [V s(2), T s (2); V s (3), T s (3); …; V s (1000), T s (1000)] is chosen as the testing set to validate the established GA-LSSVR model.

Table 2 Nominal operating parameters of the SOFC

To eliminate the dimension differences, all the training and testing data should be normalized in the range of [0, 1] by

((41))

4.3 Selection of the optimal LSSVR parameters

To build an efficient LSSVR model for the SOFC, two parameters of the LSSVR, C and σ 2, must be carefully determined. In contrast with the CV methods, GA is adopted to seek the optimal combination of the LSSVR’s parameters in this study.

During the LSSVR modeling, the extents of the parameters C and σ 2 are distributed in (0, 100] and [0,°1000], respectively. The original population size of GA is P=20, the maximum iterations is 200, each chromosome consists of 20 bit binary numbers, and the probabilities of the crossover and the mutation are selected as p c=0.4 and p m=0.01, respectively. Then, the identification model of the SOFC can be constructed using the optimal LSSVR’s parameters for predicting.

4.4 Identification results of the GA-LSSVR model

By minimizing the RMSE, a GA-LSSVR model of the SOFC is established based on the training data using the optimal parameters obtained in Section 4.3. To further assess the predicting performance of the GA-LSSVR model, the voltage and the temperature dynamic characteristics of the SOFC will be simulated under different conditions. For comparison, the standard LSSVR whose parameters are determined by a simulated annealing algorithm (SAA-LSSVR) is used to model the same plant. During the modeling, the initial temperature of the SAA is set to 280°, the length of the MapkoB chain is 300, and the step lengths for parameters C and σ 2 are both selected as 0.2. In addition, the corresponding results of the LSSVR with a 5-fold cross-validation (5FCV-LSSVR) model are also presented.

When the load changes from 500 A to 600 A at t=200 s and from 600 A to 450 A at t=600 s, it executes the simulations for the output voltage and the temperature dynamics of the SOFC. Fig. 3a depicts the output voltage of the physical model and the predicting results of the GA-LSSVR model. Furthermore, the simulation results for the output voltage of the SAA-LSSVR and the 5FCV-LSSVR models under the same load conditions are also shown in Figs. 3b and 3c, respectively. Fig. 4a gives the temperature comparison between the GA-LSSVR and the physical models in this load situation. At the same time, the predicted temperature of the SAA-LSSVR model and the 5FCV-LSSVR model are described in Figs. 4b and 4c, respectively.

Fig. 3
figure 3

Output voltage responses of the physical model and the models of GA-LSSVR (a), SAA-LSSVR (b), and 5FCV-LSSVR (c)

Fig. 4
figure 4

Temperature responses of the physical model and the models of GA-LSSVR (a), SAA-LSSVR (b), and 5FCV-LSSVR (c)

Figs. 3a and 4a show that the prediction results of the established GA-LSSVR model almost agree with those of the physical model, indicating that the GA-LSSVR model is valid for dynamic performance prediction of the SOFC.

By comparing the simulation results of the output voltage among Figs. 3a3c, and the prediction results of the temperature among Figs. 4a4c, one will notice that the prediction performance of the GA-LSSVR model for the SOFC has been greatly improved.

To further evaluate the modeling accuracy of the GA-LSSVR model, the mean relative error (MRE) and the RMSE of the GA-LSSVR, the SAA-LSSVR, and the 5FCV-LSSVR models for the output voltage and the temperature are given in Tables 3 and 4, respectively. Moreover, in our study, the prediction time of the GA-LSSVR, the SAA-LSSVR, and the 5FCV-LSSVR models are also recorded in Table 5. The results indicate that compared with the 5FCV-LSSVR technique, the GA-LSSVR can simultaneously predict the output voltage and the temperature dynamics of the SOFC with a higher accuracy and a faster convergence rate. In addition, in comparison with the SAA-LSSVR method, the GA-LSSVR model needs a little more time to predict the output voltage characteristics of the SOFC; however, the GA-LSSVR has a higher precision accuracy in appropriating both the output voltage and the temperature.

Table 3 MRE of the GA-LSSVR, the SAA-LSSVR, and the 5FCV-LSSVR models
Table 4 RMSE from the GA-LSSVR, the SAA-LSSVR, and the 5FCV-LSSVR models
Table5 Prediction time of the GA-LSSVR, the SAA-LSSVR, and the 5FCV-LSSVR models

5 Conclusions

To investigate the dynamic behaviors of the SOFC and facilitate the model-based controller design, the LSSVR identification model whose parameters are optimized by GA is proposed to simultaneously describe the electrochemical and thermal characteristics of the SOFC. The performance of the GA-LSSVR model has been tested and compared with the SAA-LSSVR and the 5FCV-LSSVR models. The results indicate that the prediction accuracy of the GA-LSSVR model has been immensely improved; in addition, its convergence rate is much faster. These results verified the applicability of the GA-LSSVR model in modeling the transient behaviors of the SOFC. It provides the foundation for further study of the dynamic characteristics of the SOFC under different conditions considering valid control strategies.