Introduction

Microbial fuel cells (MFC) are being considered for various applications, one of which is for the production of renewable energy. Direct conversion of harmful organic sources (e.g. industrial wastewater) to electricity is the most important advantage of MFC compared to other alternatives [1]. An MFC is an electrochemical bioreactor, used to convert organic materials to electrons, protons and carbon dioxide by utilizing bacteria in the anode chamber. In a dual-chamber MFC, electrons are transferred to the anode by mediator, nanowire or direct mechanism. Then they are moved to the cathode via an external circuit. Protons are also transferred to the cathode by passing through the anolyte, a separating membrane, and the catholyte. In the cathode, electron acceptors (usually oxygen) receive electrons and protons producing water [2].

Zhang and Halm presented the first MFC model in 1995 [3]. Their model was used for simulation of the electrical performance of a dual-chamber MFC [3]. After this research, less attention was paid to MFC modeling for more than ten years. A new period of MFC modeling started in 2007 by introducing two–anode based models [4, 5]. MFC models are classified into two categories of comprehensive and specific models. The primary goal in comprehensive models is modeling the overall behavior of MFCs. These models are divided into two classes based on the limiting factor of the process. The first class of comprehensive models is known as anode and cathode based model, where the performance of an MFC is modeled by the anode and cathode reactions [6]. The second class of comprehensive type models is anode based models. The central assumption of anode based models is the assumption that the cathodic process (including reaction and mass transfer in the cathode chamber) are fast enough and the anodic process is the limiting factor of the MFC performance [4, 5, 7]. One of these two main models should be used for modeling the performance of MFC based on experimental and structural features. Therefore, in some cases [8,9,10] anode based models were the better choice for modeling (anodic process is the limiting factor). Also, in some cases, cathodic reaction must be considered [11,12,13].

Electrochemical model (polarization curve model) is one of the specific models [14, 15]. A practical and simple electrochemical model was introduced by Wen et al. [16]. Based on the electrochemical model, the polarization curve (voltage-current) can be divided into three regions: activation losses, ohmic losses, and concentration losses. The polarization curve model had seven adjustable parameters, which can be fitted on experimental data of a single-chamber continuous MFC with brewery wastewater as substrate [16].

Several researchers have focused on experimental evaluation of influence of structural parameters (electrode materials [17,18,19], and electrode modification [20]), operating parameters (temperature [21], hydraulic retention time (HRT) [22], and pH [23,24,25]) on performance of MFC.

However, modeling studies on the influence of these parameters on MFC performance are scarce. The details of MFC (e.g. source of voltage losses, the effect of operating variables such as temperature and pH) can be understood by electrochemical modeling results. That means electrochemical results help researchers to improve MFC performance by creating MFCs with lower voltage losses.

In the present research, a two-part-specific modeling (polarization curve modeling) for the electrical behavior of MFC was carried out by using genetic algorithm optimization method. In the first part, model parameters of MFC with different substrates were validated against experimental data, and the polarization curve was reproduced by the model. The effect of operating and structural parameters on source of voltage losses cannot be directly investigated by electrochemical modeling. However, in the second part of present research, a simple procedure was suggested and examined for studying the effect of structural and operating parameters on the electrical performance of MFC. To investigate the effect of operating parameters such as temperature, hydraulic retention time and pH, on the electrical performance of MFC, a novel method for estimation of parameters was used by defining model parameters as functions of operating conditions.

Model development

The polarization curve of fuel cells contains three regions: activation, ohmic, and concentration regions. The energy required to overcome the activation barrier of anodic and cathodic reactions is represented by activation loss. Activation loss decreases by modifying the cathode catalyst. Resistances against ions transfer in catholyte, anolyte, separator, and electrodes were defined as ohmic losses. Ohmic losses decrease with increasing conductivity of electrolytes. Limitation of chemical species which were transported in chambers (anode and cathode chamber), considered as concentration loss [16, 26]. The voltage of MFC was defined as follows:

$$V = {\text{OCV}} - \eta_{{{\text{act}}}} - \eta_{{{\text{ohm}}}} - \eta_{{{\text{concen}}}} ,$$
(1)

where, OCV, ηact, ηohm and ηconcen were open-circuit voltage (V) (voltage in no current), activation loss (V), ohmic loss (V) and concentration loss (V), respectively. Activation loss was divided into anode and cathode activation losses. Voltage activation losses were defined by Tafel’s equation (Eqs. 34).

$$\, \eta_{{{\text{act}}}} = \, \eta_{{{\text{ca}}}} + \eta_{{{\text{an}}}} ,$$
(2)
$$\, \eta_{{{\text{an}}}} = b_{{{\text{an}}}} \times \ln \left( {\frac{i}{{i_{0} }}} \right),$$
(3)
$$\, \eta_{{{\text{ca}}}} = b_{{{\text{ca}}}} \times \ln \left( {\frac{i}{{i_{0} }}} \right),$$
(4)

where, ban, bca, i0 and i represent Tafel’s slope of the anode (V), cathode (V), exchange current (A) and current (A), respectively. Activation loss (Eqs. 5 and 6) obtained with substituting Eqs. 3 and 4 in Eq. 2.

$$\, \eta_{{{\text{act}}}} = b_{{{\text{ca}}}} \times \ln \left( {\frac{i}{{i_{0} }}} \right) + b_{{{\text{an}}}} \times \ln \left( {\frac{i}{{i_{0} }}} \right),$$
(5)
$$\eta_{{{\text{act}}}} = b_{{{\text{act}}}} \times \ln \left( {\frac{i}{{i_{0} }}} \right),$$
(6)

The Ohmic loss was represented by Eq. 7 [16].

$$\eta_{{{\text{ohm}}}} \, = \, R_{{{\text{ohmic}}}} i.$$
(7)

Based on Eq. 7, the ohmic resistances in MFC are shown by Rohmic (Ω). The concentration loss was introduced as in Eq. 3 [16]:

$$\eta_{{{\text{concen}}}} {\text{ } = \text{ C}} \times \ln \left( {\frac{{i_{l} }}{{i_{l} - i}}} \right).$$
(8)

In Eq. 8, C and il are concentration loss slope (V) and limiting current (A). Limiting current is the maximum producible current in MFC. The general polarization equation was obtained by substituting Eqs. 6 and 7 and 8 into Eq. 1.

$$V = {\text{OCV}} - \left( {b \times \ln \left( {\frac{i}{{i_{0} }}} \right)} \right) - (R_{{{\text{ohmic}}}} i) - \left( {C \times \ln \left( {\frac{{i_{l} }}{{i_{l} - i}}} \right)} \right).$$
(9)

Equation 9, was the final equation utilized for modeling of polarization curve. This equation has five unknown parameters (B, i0, Rohmic, C, and il). These parameters were fitted on experimental data of voltage-current by using the optimization algorithm. Optimization algorithm adjusted unknown parameters by minimizing the objective function. In the present research, relative squared error (RSE) (Eq. 19) was used as an objective function for parameters estimation.

$${\text{RSE}} = \sum {\sqrt {(\frac{{V_{{{\text{Model}}}} - V_{{{\text{Ex}}}} }}{{V_{{{\text{Ex}}}} }})^{2} } } .$$
(10)

Modeling of the polarization curve was carried out by MATLAB software. Search domain of parameter estimation was limited to an acceptable range. Genetic algorithm with a population of 1,000,000 individuals, elite count of 5% and a crossover of 0.8 was used for adjusting unknown parameters. The accuracy of model output was shown by absolute relative error (ARE %) and the coefficient (R2).

Results and discussion

The polarization curve model has five unknown parameters with different effects on voltage overpotential. Voltage losses decreased with an increase in exchange and limiting current. However, increasing Tafel’s slope, ohmic resistance and concentration loss slope led to increasing voltage losses. Modeling the electrical performance of MFC was carried out in two parts:

  • Investigation of the influence of various substrate

  • Investigation of the effect of operating parameters on the performance of MFC.

MFC with various substrates

The polarization curve of MFC was modeled by two different types of substrates. The results of estimated parameters of 11 systems with synthetic wastewater are presented in Table 1. References of experimental data, used for validating the model are presented in the last column of Table 1. The results show that ARE < 9% and the coefficient of determination (R2) > 0.87. Therefore, the results are in good agreement between model output and experimental data. Also, modeling behavior of MFC with different anode materials (Graphite rod, Triangles of graphite and Graphite flakes) were studied and the results are shown in Table 1. Based on experimental results, the higher surface area of anode [27] or higher surface contact between microorganisms and anode [28] leads to higher produced power. The results show that the concentration loss was responsible for most of voltage loss in MFC with a graphite rod. However, in other two anode materials, the major part of voltage loss was due to ohmic losses. Comparing the concentration losses in MFC with three anode materials, indicated that concentration loss in MFC with graphite rod anode was higher than the other two materials. As mentioned above, concentration loss of voltage was due to the mass transfer limitations of chemical species into or out of anode. Rate of mass transfer depends on the surface area of anode. The surface areas for graphite rod, triangles of graphite, and graphite flakes were 0.000889, 0.062 and 0.28 m2, respectively. Therefore, concentration loss in MFC with graphite rod was higher than triangles of graphite and graphite flakes [27] due to its higher surface area. According to Table 1, the results show that ohmic resistance of MFC with graphite rod anode electrode was higher than the other MFCs (Rohm., graphite rod > Rohm., triangles of graphite > Rohm., graphite flakes). This result is in accordance with previous experimental results [27]. Nevertheless, MFC with triangles of graphite showed the highest activation loss.

Table 1 Model parameters of MFC with synthetic wastewater as a carbon source

Polarization curve of dual-chamber MFC with various carbohydrates (fructose, glucose, and sucrose with a concentration of 20 g/L) as substrates was modeled and results are presented in rows 5–7 of Table 1. Based on the modeling results, ohmic resistances of MFC remained approximately the same for various substrates. Activation losses in MFC with various carbohydrates as substrates are presented in Fig. 1. Based on Fig. 1, activation loss in MFC with monosaccharides was lower than disaccharides. This was attributed to the different mechanisms in converting disaccharides (sucrose) and monosaccharides (glucose and fructose) to electricity. Concentration loss was small when the mass transfer of chemical species in or from anode was fast. In the same bulk concentration of substrate, higher diffusion coefficient can lead to higher rates of mass transfer to anode [29]. Therefore, concentration loss in MFC with disaccharides (sucrose) was higher than monosaccharides (glucose and fructose).

Fig. 1
figure 1

Activation loss of MFC with carbohydrate as substrate

Experimental and reproduced polarization curve of single- and dual-chamber MFC with ethanol substrate are shown in Fig. 2a, b. The results indicate that ohmic resistance of single-chamber MFC was lower than dual-chamber type. Dual-chamber MFC had two sources of ohmic resistance (separator and catholyte) more than single-chamber MFC. This fact may be the reason for higher ohmic resistance in dual-chamber MFC. According to Fig. 2b major part of voltage loss was due to ohmic resistances in dual-chamber MFC.

Fig. 2
figure 2

Results of polarization curve modeling of a single-chamber, b dual-chamber MFC with ethanol as substrate (o) experimental point (solid line) model output

Results of polarization curve modeling of 14 MFC systems with industrial wastewater as substrate are presented in Table 2. These systems were selected from different types of wastewater, reported in literature [30, 31]. In order to be able to reproduce some of the results, in these systems the open-circuit voltage must be reported. Comparing reproduced polarization curve and experimental data indicated acceptable accuracy of the model (R2 > 0.91 and ARE < 15%).

Table 2 Model parameters of MFC with industrial wastewater as a carbon source

Modeling effect of temperature, pH and HRT on the performance of MFC

The effects of operating parameters (temperature, HRT and pH) on electrical performance were modeled and results are reported in Table 3. MFCs with glucose at temperature 299–308 K and acetate at 277–303 K (Table 3 rows 1–8) were modeled. Ohmic resistance decreased with increasing temperature. However, other parameters (Tafel’s slope, exchange current, concentration loss slope and limiting current) increased when temperature was increased.

Table 3 Modeling results at different operating conditions

It was shown that increasing temperature would lead to decreasing ohmic resistance. This was due to the fact that anolyte resistance against ion transport decreased by increasing temperature. Limiting current depends on diffusion coefficient [29] and diffusion coefficient increases with increasing temperature [32]. Therefore, limiting current increased with increasing temperature. The estimated value of ohmic resistance, exchange and limiting current at different temperatures are reported in Fig. 3. According to Fig. 3 and Table 3 (rows 1–8 and columns 2–7), estimated parameters have linear relation with temperature.

Fig. 3
figure 3

Model parameters (a exchange current, b ohmic resistance and c limiting current) at different temperature based on results reported in Table 3

As a novel method, the model parameters were fitted on a temperature-dependent relation. This relation was obtained based on modeling results and is shown in Eq. 11. Also, the performance of this relation was examined. Reducing the number of fitting parameters of MFC with glucose from 20 to 6 and MFC with acetate from 25 to 6 adjustable parameters was one of the most important advantages of the new method of parameter estimation.

$$i_{0} = A_{T} T,\;b = B_{T} T,\;R_{{{\text{ohm}}}} = R_{1T} T + R_{2T} ,\;C = C_{T} T,\quad i_{l} = D_{T} T,$$
(11)

where, AT, BT, R1T, R2T, CT, and DT were six adjustable parameters, fitted on experimental data at different temperatures. New model Parameters (six unknown parameters of Eq. 11) were estimated and reported in Table 4. Model error was defined as the difference between reproduced polarization curve by model and experimental data. This error remained at an acceptable level, while adjustable parameters decreased significantly.

Table 4 Estimated parameters of Eq. 11

Effects of HRT and pH on performance of MFC were more complicated, compared to temperature. There is an optimum value of these parameters, where MFC shows its optimum performance [22, 33, 34]. Based on the results presented in Table 3, exchange and limiting current show a maximum, while ohmic resistance shows a minimum. So Second-order relations (Eqs. 12 and 13) were suggested for modeling the effect of HRT and pH.

$$\begin{array}{*{20}c} {i_{0} = A_{1h} {\text{HRT}}^{2} + A_{2h} {\text{HRT}} + A_{3h} } \\ {R_{{{\text{ohm}}}} = R_{1h} {\text{HRT}}^{2} + R_{2h} {\text{HRT}} + R_{3h} } \\ {i_{l} = D_{1h} {\text{HRT}}^{2} + D_{2h} {\text{HRT}} + D_{3h} } \\ \end{array} ,$$
(12)
$$\begin{gathered} i_{0} = A_{1p} {\text{pH}}^{2} + A_{2p} {\text{pH}} + A_{3p} \hfill \\ R_{{{\text{ohm}}}} = R_{1p} {\text{pH}}^{2} + R_{2p} {\text{pH}} + R_{3p} , \hfill \\ i_{l} = D_{1p} {\text{pH}}^{2} + D_{2p} {\text{pH}} + D_{3p} \hfill \\ \end{gathered}$$
(13)

where Aih, Aip, Rih, Rip and Dih, Dip (i = 1, 2 and 3) were adjustable parameters, fitted on experimental data at different HRT and pH. There are eleven unknown parameters, which must be fitted on polarization curve data at different operating conditions (HRT and pH). In order to use Eqs. 12 and 13, the polarization curve must be known in at least three pH or HRT values. Equations 1113 can be used for reproducing polarization curve of MFC in each point between the minimum and maximum value of operating parameters (temperature, HRT and pH). This is advantageous compared to the usual methods, where estimated parameters are limited to conditions of their adjustment (Table 5).

Table 5 Estimated parameters of Eqs. 12 and 13

Results of the new method of parameter estimation in terms of temperature show that the average number of adjustable parameters decreased by more than 70%, while R2 remained higher than 95%. For HRT and pH, the number of unknown parameters decreased more than 45 and 25% while, ARE increased by about 4 and 5%, respectively. It should be noted that operating conditions changed during electricity production by MFC [35, 36]. Also, the new method can be used between the minimum and maximum value of operating parameters with an acceptable level of error. Finally, it was shown that Eqs. 1113 were suitable in modeling the practical application of MFC in real conditions.

Conclusion

In the present research, the polarization curve model was used for simulation of the electrical performance of an MFC at different conditions. In the first part of the current study, the electrical performance of MFC was modeled for two different types of substrates. Polarization curves of 12 synthetic and 14 industrial wastewater systems were modeled with R2 > 0.87 and R2 > 0.91, respectively. Moreover, the effects of anode materials and type of MFC (single- or dual-chambers) on the electrical behavior of MFC were modeled. The results showed that ohmic resistance in dual-chamber MFC was higher than single-chamber type. In the second part, the effect of three operating parameters (temperature, HRT and pH) on the performance of MFC was simulated with two different methods of parameter estimation. A new method of parameter estimation was proposed and the results showed that the model error remained at an acceptable level (R2 > 0.95), while the number of adjustable parameters decreased significantly.