1 Introduction

Microalgae is a photoautotrophic microorganism that uses light as a source of energy and inorganic carbon (CO2) as a carbon source. In general, algae are more efficient than higher plants in converting solar energy. They grow fast and convert carbon dioxide into biomass efficiently; they have the ability to convert about 9–10% of solar power into biomass [1]. Therefore, considerable attention has been given in the last decades to microalgae growth for biofuel production such as biodiesel and CO2 biofixation that address two major problems facing humanity (energy shortage and global warming due to extensive CO2 release to the atmosphere). Microalgae have been used for other applications such as the production of pigments, polysaccharides, vitamins, bioactive compounds, and antioxidants in addition to the treatment of wastewater.

Microalgae growth can be performed in an open bond or in a photobioreactor which is more efficient closed system compared to an open bond. In a photobioreactor, environmental conditions can be controlled and high cell productivity can be achieved [2]. Photobioreactors operate either in batch or continuous flow mode of operation which gives higher cell productivity compared to batch systems. For economic reasons, a huge amount of microalgae biomass is required for the sustainable production of biofuel or CO2 biofixation since the low cell density of microalgae photobioreactor is a major limiting factor for the commercialization of this technology.

Several factors affect microalgae growth in photobioreactors such as intensity of light, temperature, pH, nutrients, and CO2 concentration [3]. The selection of a suitable microalgae strain and environmental conditions have a great impact on the biomass growth and productivity of the photobioreactor. Therefore, growth conditions should be optimized. Either optimization can be carried out experimentally or using a mathematical model of photobioreactor which is cheaper and faster compared to experimental methods.

Mathematical modeling of microalgae growth is necessary for control and prediction of the productivity of PBR and for determining the optimum conditions of operation for biomass productivity and CO2 biofixation. In the literature, several mathematical models are available for PBR, most of the mathematical models reported in this study used the Chlorella vulgaris species as the model organism which is one of the most studied microalgae species [4,5,6,7,8,9,10,11]. Most of the used mathematical models include nonlinear ordinary differential equations, algebraic equations for microalgae cell growth, limiting nutrient uptake, mass, and light transfer. Different model-based optimization methods are used to optimize PBR using C. vulgaris. Tebbani et al. [6] used a nonlinear model predictive control strategy to maximize biomass productivity and CO2 biofixation using green microalgae (C. vulgaris) in continuous flow PBR. Results were validated experimentally and they found that CO2 fixation was 0.4–0.55 g/L day using 5% (v/v) CO2 aeration and incident light intensity of 90 (µE/m2 s). According to this study, the maximum biomass productivity corresponds to 7.5 billion cells/L at a dilution rate of 0.052 h−1. The Tebbani et al. [6] model was also used by Rodriguez-Jara, et al. [12] for the application of robust control design of microalgae in continuous PBR using PCO2 of 5%, incident light intensity of 90 µE/m2 s and dilution rate of 0.052 h−1; the resulting biomass productivity is 0.5 billion cells/L h. More details about C. vulgaris microalgae-based model are also available in the literature [4, 5, 13]. Al Ketife et al. [7] developed a mathematical formula for nutrient removal and CO2 fixation by C. vulgaris in a PBR to determine the effect of the concentration of nutrients and irradiation intensity on PBR performance. The mathematical model was validated by experimental results using the same conditions. Anjos et al. [14] optimized the bio-fixation of CO2 by C. vulgaris in a bubble column photobioreactor at different concentrations of CO2 and aeration rates. Using response surface methodology, the maximum fixation rate of CO2 was 2.22 g/L. d that achieved at 6.5 CO2% and 0.5 vvm after 7 days of culture at 30 °C. The industrial scale of microalgae is still under construction. There are some challenges facing the commercialization and development of this technology. Low biomass concentration is one of the major problems facing commercial production [15]. This is a critical issue for CO2 capture and biofuel production. Therefore, optimization of cultivation conditions is a crucial strategy for enhancing the biomass productivity in PBR.

This work aims to use the mathematical model of Tebbani et al. [6] which is based on C. vulgaris as the model organism for maximizing the biomass productivity of continuous PBR at a steady state. The continuous reactor is known to have high volumetric productivity, lower cost, and constant product quality. The used model [6] is validated by the authors using laboratory experiments. The model-based optimization can be considered the most efficient technique for solving expensive and complex real-world problems [16] such as microalgae growth optimization. The single objective MATLAB optimization function (fmincon) is used in this optimization study. The mathematical model predicts the performance of PBR without conducting several expensive and time-consuming experiments. Optimization of the microalgae (C. vulgaris) growth conditions is an important strategy for maximizing carbon dioxide biofixation and biodiesel production, especially in future large-scale systems. The mathematical model is also used to maximize the microalgae-specific growth rate. The biomass productivity results are compared with that of maximizing the microalgae-specific growth rate. The model-based optimization results are compared with other optimization procedures used to optimize the model. Analysis of sensitivity is carried out to determine the effect of model kinetic constants on the produced biomass concentration.

2 Modeling and Optimization of Photobioreactor

2.1 Mathematical Modeling of Photobioreactor

The mathematical model describing the growth of the microalgae species (C. vulgaris) (Tebbani et al. [6]) is used in this optimization study. This microalgae species which is one of the most studied microalgae was used to validate the mathematical model using laboratory experiments. Microalgae growth kinetics which is a biological process involves several areas of sciences such as chemistry, biology, physics, mathematics, and engineering. The growth process is complex and nonlinear which is difficult to model. The mathematical model depends on microalgae cell growth, substrate consumption, kinetics and mass transfer of liquid and gases in the reactor, light absorption, and equilibrium between inorganic carbon ions in the reactor. Biomass balance around the photobioreactor which is assumed a continuously stirred tank reactor (CSTR) is reduced to the following differential equation.

$$\frac{{{\text{d}}X}}{{{\text{d}}t}} = \mu X - DX$$
(1)

where \(\mu\) (1/h) is the microalgae-specific growth rate; X is the concentration of the cell (billion cells/L), and D is the dilution rate (1/h), which is the volume flow rate of reactor feed or effluent divided by the reactor volume. The total inorganic carbon concentration [TIC] is the carbon source in the liquid (mmol/L) which is usually the summation of carbon dioxide, bicarbonate, and carbonate anion concentrations, carbonic acid usually neglected (i.e. [TIC] = [CO2] + [HCO3] + [HCO2]); the relation between [TIC] and [CO2] depends on the pH of the solution as shown below:

$$\left[ {{\text{TIC}}} \right] = \left[ {{\text{CO}}_{2} } \right]*\left( {1 + \frac{{K_{1} }}{{\left[ {H^{ + } } \right]}} + \frac{{K_{1} K_{2} }}{{\left[ {H^{ + } } \right]^{2} }}} \right)$$
(2)

where \({K}_{1}\) and \({K}_{2}\) are the dissociation constants for the equilibrium between (CO2/HCO3) and (HCO3/CO3−2), respectively. \(p{K}_{1}=6.35\) and \(p{K}_{2}=10.3\) at 25 °C. The microalgae specific growth rate is described by following the non-segregated Monod kinetics for the impact of light and Contois kinetics for the impact of carbon source (TIC) [6]:

$$\left( {\mu = f\left( {E,{\text{TIC}},X} \right) = \mu_{\max } *\left( {\frac{E}{{K_{{\text{E}}} + E}}} \right)*\left( {\frac{{\left[ {{\text{TIC}}} \right]}}{{K_{{{\text{CL}}}} \cdot X + \left[ {{\text{TIC}}} \right]}}} \right)} \right)$$
(3)

where \({\mu }_{{\text{max}}}\) is the microalgae maximum specific growth rate (1/h), \({K}_{{\text{E}}}\) is the saturation constant for the intensity of light accessible per cell (μE/s billion cells), E is the specific energy available from light (μE/s billion cells), and \(K_{{{\text{CL}}}} \,{\text{is}}\) the saturation constant for \({\text{TIC}}\) in (mmol/billion cells). The specific energy available from light (E) is given by [17]:

$$E = \frac{{\left( {I_{{{\text{in}}}} - I_{{{\text{out}}}} } \right) A}}{V X}$$
(4)

where \({I}_{{\text{out}}}\),\({ I}_{{\text{in}}}\) are the outgoing and incident intensities of light (µE/m2 s), \(A\) is the illuminated area of the reactor (\({{\text{m}}}^{2}\)). \({I}_{{\text{in}}}\), \({I}_{{\text{out}}}\) are related by the below practical equation [17]:

$${I}_{{\text{out}}}={C}_{1 } {I}_{{\text{in}}} {X}^{{C}_{2}}$$
(5)

where \({C}_{1}\), \({C}_{2}\) are constants mostly depend on bioreactor dimensions.

It should be clear that the effect of nitrogen nutrients on microalgae growth is not taken into consideration in this optimization study. It is assumed that nitrogen is not a limiting nutrient.

Mass balance on the concentration of substrate (\({\text{TIC}}\)) is given by:

$$\frac{{{\text{d}}\left[ {{\text{TIC}}} \right]}}{{{\text{d}}t}} = - \mu \frac{X}{Y} - D\left[ {{\text{TIC}}} \right] + K_{{\text{L}}} a \left( {\left[ {{\text{CO}}_{2} } \right]^{ * } - \left[ {{\text{CO}}_{2} } \right]} \right)$$
(6)

where \({K}_{{\text{L}}}\),\(a\) is the carbon dioxide mass transfer coefficient (1/h) in the liquid film. Y is the cell yield coefficient for CO2 (the ratio of cells produced/TIC consumed) in billion cells/mol TIC. [CO2] which is the actual CO2 concentration (mmole/L) is related to [TIC] by Eq. 2, [CO2]* is the carbon dioxide equilibrium concentration in the liquid phase (mmol/L) as defined by Henry’s law.

$$\left[ {{\text{CO}}_{2} } \right]^{*} = \frac{{P_{{{\text{CO}}_{2} }} }}{H}$$
(7)

Where \(P_{{{\text{CO}}_{2} }}\) is the carbon dioxide partial pressure in the gas phase (atm), and \(H\) is Henry’s constant (29 atm L/mmol). The concentration of hydrogen ions [H+] in the reactor medium (mol/L) is related to the pH by:

$$\left[{H}^{+}\right]= {10}^{-pH}$$
(8)

Model parameters used in the optimization study are reported by Tebbani et al. [6] as shown in Table 1. More details about the mathematical modeling of microalgae growth of the species C. vulgaris and related model constants are described in other references [4, 5, 13].

Table 1 Kinetic and model constants for growth of Chlorella vulgaris in a photobioreactor [6]

2.2 Biomass Productivity Optimization in Photobioreactor

In general, the problem of single or one objective optimization can be developed mathematically as:

Max/Min \(F(x)\)

Subject to \({g}_{i }\left(x\right)\le 0 i=1, 2, 3\dots ..m\)

$${h}_{j}\left(x\right)=0j=1, 2, 3\dots ..p$$
$${x}_{k}^{Lb}\le {x}_{k}\le {x}_{k}^{Ub} k=1, 2, 3\dots .n$$

where \(F(x)\), \(g\left(x\right) {\text{and}} h\left(x\right) are the\) objective function, inequality function and equality constraints functions. \(m\) and \(p\) are the inequality and equality constraints number. \(x\) is a vector of the design variables, \(x=\left[x\left(1\right), x\left(2\right), x(3)\dots . \dots X(n)\right]\). \({x}_{k}^{Lb} and {x}_{k}^{Ub}\) are the lower and higher limits of the design variables. \(n\) is the number of the design variables in the optimization problem.

The objective of this work is to maximize the microalgae biomass productivity in PBR using a model-based optimization method. Modeling of photoautotrophic growth as a bioprocess is complex due to its nonlinear behavior. The process is also multivariable with constraints that include both input and output variables such as dilution rate, light intensity and carbon dioxide feed flow rate (input), and pH, biomass concentration as output variables. This makes the optimization of the process challenging and time consuming.

The numerical optimization was executed using the MATLAB function "fmincon" (Math works. Cambridge, MA) [18]. The fmincon function is a gradient-based method that requires continuous objective and constraint functions which also should have a continuous first derivative. The optimization function (fmincon) searches for the best (optimum) operating conditions that maximize the objective function starting with an initial estimate.

In this optimization problem, the objective is to maximize the microalgae biomass productivity (\({P}_{r}\)) or specific growth rate (\(\mu\)). In this work, we selected the design variables that affect the performance of PBR. The optimization function “fmincon” finds out the optimum design and operating variables within the domain tested. The optimization model consists of the objective function and constraints as shown in the following:

$${\text{Max}}.\,P_{r} { }\left( {\frac{{{\text{billion}}\,{\text{cells}}}}{{{\text{L}}\,{\text{h}}}}{ }} \right) = X \left( { \frac{{{\text{billion}}\,{\text{cells}}}}{{\text{L}}} } \right) \cdot D\left( { \frac{1 }{{\text{h}}}} \right)$$
(9)
$${\text{Max}}.\,\mu \left( \frac{1}{h} \right) = \mu_{\max } *\left( {\frac{E}{{K_{{\text{E}}} + E}}} \right)*\left( {\frac{{\left[ {{\text{TIC}}} \right]}}{{K_{{{\text{CL}}}} \cdot X + \left[ {{\text{TIC}}} \right]}}} \right)$$
(10)

Subject to the following nonlinear equality constraints:

$$\begin{aligned} \mu - D &= 0 \\ & \quad - \mu \frac{X}{Y} - D\left[ {{\text{TIC}}} \right] + K_{{\text{L}}} a \left( {\left[ {{\text{CO}}_{2} } \right]^{ * } - \left[ {{\text{CO}}_{2} } \right]} \right) = 0 \\ \left[ {H^{ + } } \right] &= 10^{ - pH} \\ [{\text{CO}}_{2} ]^{*} &= \frac{{P_{{{\text{CO}}_{2} }} }}{H} \\ \left[ {{\text{TIC}}} \right] &= \left[ {{\text{CO}}_{2} } \right]*\left( {1 + \frac{{K_{1} }}{{\left[ {H^{ + } } \right]}} + \frac{{K_{1} K_{2} }}{{\left[ {H^{ + } } \right]^{2} }}} \right) \\ \mu &= \mu_{\max } *\left( {\frac{E}{{K_{{\text{E}}} + E}}} \right)*\left( {\frac{{\left[ {{\text{TIC}}} \right]}}{{K_{{{\text{CL}}}} \cdot X + \left[ {{\text{TIC}}} \right]}}} \right) \\ I_{{{\text{out}}}} &= C_{1 } I_{{{\text{in}}}} X^{{C_{2} }} \\ E &= \frac{{\left( {I_{{{\text{in}}}} - I_{{{\text{out}}}} } \right) A}}{V X} \\ \left[ {{\text{TIC}}} \right] &= \left[ {{\text{CO}}_{{2}} } \right] \, + \, \left[ {{\text{HCO}}_{{3}}^{ - } } \right] \, + \, \left[ {{\text{HCO}}_{{2}}^{ - } } \right] \\ \end{aligned}$$
(11)

Since the optimization function, fmincon is a minimization function; it should be multiplied by a minus sign to maximize the objective function.

In this optimization problem, the decision variables that have the most important effect on this process are identified as CO2 percentage in the gas feed, CO2 concentration in liquid, light intensity, dilution rate, concentration of biomass, and reactor pH value (6 variables) as shown in column 1 of Table 2.

Table 2 Optimum values of the design and operating variables for maximum biomass productivity ( Pr) and maximum specific growth rate( \(\upmu\))

All the equations above are written in terms of the 6 decision variables to be determined for maximum objective function as shown in Table 2. Since the model used in this study is validated by comparing the model predictions with experimental results by the authors, therefore, it is assumed that the model predicts the output which is the photobioreactor biomass productivity. Also shown in Table 2, the range of the 6 decision variables (i.e., lower and upper limit) which are selected to assure realistic design conditions. These range of constraints are imposed on the decision variables. The optimization function (fmincon) searches for the best (optimum) decision variables that maximize biomass productivity starting with an initial guess in the range of these variables.

3 Results and Discussion

3.1 Optimum Conditions for Maximum Biomass Productivity in Continuous Flow Photobioreactor

The decision parameters that are expected to determine the maximum biomass productivity (\(DX\)) are listed in Table 2 with the highest and lowest bound values. The percentage of CO2 in the gas feed range is up to 15%. The incident light intensity range is 10 to 100 \(( \mathrm{\mu E} /{{\text{m}}}^{2} {\text{s}})\), dilution rate up to 1 1/h (less than \({\mu }_{{\text{max}}}\)), pH range is 5 to 8. Using the MATLAB optimization function (fmincon), the values of the optimum parameters that produce maximum biomass productivity are shown in Table 2. The achieved maximum productivity of biomass (\(DX\)) at the above range of conditions is 4.03 (\({\text{billion}} {\text{cells}}/\mathrm{L }\)h). This biomass productivity is very high compared with typical values reported in the literature. It is clear that the upper values of CO2 percentage in the gas feed, the upper value of incident light intensity, and the upper value of pH are conditions required for maximum biomass productivity.

3.2 Effects of Operating Parameters on the Maximum Biomass Productivity

The pH of the algae medium is the main parameter in the cell photosynthesis rate. pH regulates cell metabolism and cell formation. Each strain of algae has an optimal small range of pH. Most algae favored a pH of around 7. The pH in the photobioreactor is related to the concentration of carbon dioxide; pH increases due to the consumption of CO2 by algae. The form of the TIC (CO2, H2CO3, HCO3 and CO3−2) in the solution depends greatly on the pH. CO2 is dominant at pH below 7, while CO3−2 is dominant above pH 10. H2CO3 is generally neglected. Figure 1a shows that a pH increase led to an increase in the maximum biomass productivity and the corresponding concentration of biomass. At a pH of 5, the CO2 is dominant in the reactor solution (more than 95% of TIC). Increasing the pH, the CO2% of TIC decreases to less than 2% at a pH of 8. The effect of pH on biomass production is mainly because of carbon dioxide gas concentration. Increasing the pH from 5 to 8 increased TIC concentration which is mainly HCO3 at a pH of 8 (Fig. 1b). HCO3 is the most suitable inorganic carbon form by microalgae [19]. The reactor TIC increases steadily due to CO2 consumption.

Fig. 1
figure 1

The impact of pH on the maximum biomass productivity of photobioreactor

Figure 2 is a contour plot that shows the impact of pH and biomass concentration on the reactor biomass productivity. Increasing the pH and biomass concentration caused an increase in the productivity of biomass. The highest productivity is 4.03 (billion cells/L h) achieved at a pH of 8 and biomass concentration of 82.45 billion cells/L.

Fig. 2
figure 2

Contour plot of the impact of pH and biomass concentration on reactor biomass productivity

The mathematical formula used in this optimization work assumes carbon dioxide as the only carbon source (autotrophic microalgae). In addition to be a substrate, CO2 reduces the pH of the microalgae solution (weak acid), and a series of chemical species forms when CO2 is dissolved in water (CO2(aq), HCO3, CO3−2) depending on the pH. As mentioned before, the pH is governed by the addition of CO2 to the photobioreactor. As shown in Fig. 3, increasing the partial pressure of CO2 in the feed (\(P_{{{\text{CO}}_{2} }}\)) increases the TIC. At low PCO2, the carbon is limiting cell growth. Increasing \(P_{{{\text{CO}}_{2} }}\) increases the biomass productivity that approaching to 4.03 billion cells/L h at 15% \(P_{{{\text{CO}}_{2} }}\)PCO2 in the gas feed. The biomass and TIC concentrations increase with increasing \(P_{{{\text{CO}}_{2} }}\)PCO2 while the concentration of CO2 is almost constant and very close to zero and bicarbonate is dominant at pH of 8. The feed PCO2 should not be very high that cause inhibition and should not be below the lowest level that limits the growth of the cells [20].

Fig. 3
figure 3

Effect of PCO2 in the feed gas on the maximum biomass productivity of photobioreactor

Light energy is used in photosynthesis for algae growth and metabolism. Cell growth and productivity are related to light energy. In general, the limit of the required applied intensity of light for different algae is 15–150 \(\mathrm{\mu E}\)/m2 s [21]. Figure 4 describes the effect of the incident light intensity on the maximum biomass productivity in a photobioreactor. According to the mathematical model, the specific growth rate is correlated with the intensity of light by Monod saturation kinetics. At low incident light intensity, the rate of microalgae photosynthesis is determined by the rate of photon capture. At high light intensity, saturation is achieved, and at these conditions, the rate of microalgae photosynthesis is maximum [22]. Further increase in light intensity above the saturation value will not increase the concentration or productivity of biomass. Figure 4 shows an increase in the concentration and maximum productivity of biomass with an increase in the intensity of incident light. The TIC declines with increasing the intensity of light due to an increase in cell growth while the CO2 concentration stays almost constant and close to zero during the whole range of light intensity selected for optimization.

Fig. 4
figure 4

Effect of the intensity of light on the maximum biomass productivity of photobioreactor

The dilution rate is an important parameter for the optimization of the performance of the photobioreactor. It is inversely correlated with the hydraulic retention time. The microalgae-specific growth rate increases with increasing dilution rate, while the concentration of biomass decreases. At a low dilution rate (Fig. 5), increasing D resulted in an increase in biomass productivity. Biomass productivity passes through maximum value at the optimum dilution rate (0.049 1/h). A higher dilution rate (low residence time) resulted in lower biomass concentration and lower TIC while the CO2 concentration was kept almost constant close to zero. It should be clear that there is a critical zone of the dilution rate above which washout takes place and the reactor does not produce biomass if operated at a dilution rate above the critical.

Fig. 5
figure 5

Impact of the dilution rate (D) on the maximum biomass productivity of photobioreactor

Figure 6 is a contour plot showing the effect of PCO2 and dilution rate on the maximum biomass productivity. The conditions for maximum biomass productivity are 15% \(P_{{{\text{CO}}_{2} }}\) and a dilution rate of 0.049 1/h which produce a maximum biomass productivity of 4.03 (billion cells/L h) achieved at a pH of 8 and biomass concentration of 82.45 billion cells/L.

Fig. 6
figure 6

Contour plot shows the impact of PCO2 and dilution rate on the optimum productivity of biomass

3.3 Maximizing the Microalgae-Specific Growth Rate and Biomass Concentration as Single Objectives.

The MATLAB optimization function (fmincon) was used to maximize the cell-specific growth rate (\(\upmu\)) and biomass concentration as single objective functions. Table 2 also shows the optimum operating parameters that maximize the specific growth rate. As seen in the table, the optimum specific growth rate is (1 \(1/h\)) attained at a dilution rate of (1 1/h) which satisfies the theory for chemostat operating at steady state (\({\text{i}}.{\text{e}} \mu =D=1 1/h)\). \(P_{{{\text{CO}}_{2} }}\) and pH are close to the upper bound of the range of operating parameter values. The required light intensity is 49 \(\mathrm{\mu E}/{{\text{m}}}^{2} {\text{s}}\) and biomass concentration is 0.196 billion cells/L. Figure 7 shows the effect of \(P_{{{\text{CO}}_{2} }}\) on the optimum specific growth rate. Increasing the \(P_{{{\text{CO}}_{2} }}\) increases the specific growth rate and the optimum value is the maximum specific growth rate. At the conditions of maximum specific growth rate, the concentration of biomass is low. The biomass productivity corresponding to the maximum specific growth rate is 0.196 billion cells/L h, which is equal to biomass concentration since the dilution rate is 1 1/h. This biomass productivity is very low compared to the value obtained when maximizing biomass productivity (i.e., 4.03 billion cells/L. h). Maximizing the biomass concentration is carried out as a single objective optimization. The maximum value of 1451 (billion cells/L) was achieved. This was obtained at PCO2 of 15%, pH of 8 and light intensity of 100 \((\mathrm{\mu E}/{{\text{m}}}^{2 }{\text{s}})\), but the dilution rate is very low (10–3 1/h, the lower bound allowed for D) that correspond to biomass productivity of 1.45 (billion cells/L h) which is very low compared to maximizing the biomass productivity. Figure 8 shows the effect of \(P_{{{\text{CO}}_{2} }}\) on the maximum achieved biomass concentration. The maximum concentration of biomass and TIC increases with increasing \(P_{{{\text{CO}}_{2} }}\); the corresponding biomass productivity is achieved at \(P_{{{\text{CO}}_{2} }}\) of 15%.

Fig. 7
figure 7

Impact of PCO2 on the optimum microalgae-specific growth rate

Fig. 8
figure 8

Effect of PCO2 on the maximum biomass concentration in the photobioreactor

3.4 Estimation of CO2 Fixation Rate at the Optimum Photobioreactor Operating Conditions

Optimization of microalgae biomass productivity is very important for CO2 bio-fixation. Several indirect and direct methods were used to determine the CO2 fixation rate in photobioreactor [23]. Measurement of the carbon content of algal biomass is considered an accurate method to determine CO2 fixation in PBR taking into consideration that only one carbon source such as autotrophic CO2 substrate used in the kinetic model [24]. In this optimization study, the maximum productivity of biomass is 4.03 (billion cells/L h). Converting cell number into cell mass, i.e., concentration of biomass in g/L = 0.02 (concentration of biomass in billion cells/L) [6]. Then, the biomass productivity can be calculated in cell mass, not cell number.

$${\text{Biomass productivity }}\left( {{\text{Pr}}} \right)\, = \,{4}.0{3 }\left( {0.0{2}} \right) \, \left( {{24}} \right)\, = \,{1}.{93} {\text{gbiomass}}/{\text{L}}\,{\text{h}}$$
(12)

This is very high biomass productivity compared to that reported in the literature for Chlorella species, for example, the best productivity is 0.18 to 0.34 g/L day using 5–18% CO2 in the PBR gas feed [6]. 2014). Knowing the carbon content of biomass, the biofixation rate of carbon dioxide (RCO2) can be estimated by the following equation [25].

$$R_{{{\text{CO}}_{2} }} \left( {{\text{g}}/{\text{L day}}} \right) = P_{r} \left( {{\text{g}}/{\text{L}}\,{\text{day}}} \right)C_{{{\text{CO}}_{2} }} \frac{{M_{{{\text{CO}}_{2} }} }}{{M_{{\text{C}}} }}$$
(13)

Where \({C}_{{\text{CO}}2}\) is the carbon content of the algae biomass (0.49 as determined in [6]).

\({M}_{{\text{CO}}2}\) is the CO2 molecular weight (44). \({M}_{{\text{C}}}\) is the carbon molecular weight (12). Then, the predicted carbon dioxide biofixation rate is:

$$R_{CO2} \left( {g/L d} \right) = 1.93 \left( {0.49} \right)\left( {\frac{44}{{12}}} \right) = 3.47{\text{gCO}}_{{2}} /{\text{L}}.{\text{ h}}$$
(14)

From above, it is clear that the rate of CO2 fixation is related to biomass concentration. Based on the literature, one g of dry microalgae biomass can fix 1.83 g of CO2 [26]; this agrees with the previous equation.

3.5 Local Sensitivity Analysis of the Kinetic Parameters of the Microalgae Growth Model

In this section, sensitivity analysis is used to examine the relation between biomass concentration and the kinetic parameters in the used mathematical model (\({K}_{{\text{E}}}\), \({K}_{{\text{CL}}}\), \({\mu }_{{\text{max}}}\), \({K}_{{\text{L}}}a\)). Normalized sensitivity indicates a proportional change in the output due to a proportional change in the model parameter. Positive or negative sensitivity means an increase or decrease in the output due to an increase in the model parameter. The larger sensitivity of the parameter indicates that the parameter has a strong effect on the model output, which is biomass concentration. The conditions for maximum biomass productivity were used as the base case of this sensitivity analysis (i.e., \(P_{{{\text{CO}}_{2} }}\) of 15%, \({I}_{{\text{in}}}\) of \(100 \mathrm{\mu E}/ {{\text{m}}}^{2} {\text{s}}\), pH of 8 and dilution rate of 0.0489 1/h). Figure 9 shows the effect of the change in the kinetic parameters (\({K}_{{\text{E}}}\), \({K}_{{\text{CL}}}\), \({\mu }_{{\text{max}}}\), \({K}_{{\text{L}}}a\)) on the steady-state biomass concentration due to decrease and increase of these parameters by 30% and 15% around the base-case which is the optimum conditions of biomass concentration (82.41 billion cells/L). As shown in Table 3, when \({K}_{{\text{E}}}\) is reduced by a factor of 30 and 15%, the biomass concentration increased by 10.35 and 4.78%, respectively. When the KLa parameter is reduced by a factor of 30 and 15%, the biomass concentration decreased by 19.33 and 8.98%, respectively. From Table 3, it is clear that KLa and µmax have positive sensitivity, while KE and KCL have negative sensitivity. It is also shown that KLa has the largest sensitivity followed by µmax, KCL and KE which has the smallest sensitivity for biomass concentration. In a different PBR mathematical model [7], sensitivity analysis showed that the microalgae maximum specific growth rate (µmax) and biomass death rate constant (Kd) which is not used in the model of the current study were the most sensitive parameters in Al Ketife et al. [7] model. In another sensitivity analysis for parameters of the algae growth kinetic model, Juneja and Murthy [27] studied the effect of variation of the following kinetic parameters on biomass concentration, nitrogen half saturation constant (\({K}_{{\text{N}}}\)), dissolved carbon half saturation constant (\({K}_{{\text{C}}}\)), microalgae maximum specific growth rate (\({\mu }_{{\text{max}}}\)) and mass transfer coefficient (\({K}_{L}a\)). Variations of \({K}_{N}\) have a significant change in the biomass concentration, \({K}_{{\text{C}}}\) has little effect on biomass concentration, \({\mu }_{{\text{max}}}\) has a substantial effect, while \({K}_{{\text{L}}}a\) has minimum effect on biomass concentration which is not the case for \({K}_{{\text{L}}}a\) in this work where variation in \({K}_{{\text{L}}}a\) resulted in a large change of biomass concentration.

Fig. 9
figure 9

Impact of the change in the kinetic parameters (KE, KCL, µmax, KLa) on the biomass concentration obtained by decrease or increase of 30 and 15% of the parameters around the base case

Table 3 Percentage change in biomass concentration when each model kinetic parameter value is varied one at a time

3.6 Comparison Between the Optimization Results and the Literature

The MATLAB optimization mathematical function codes (fmincon) are used to predict the best (optimum) decision variables for microalgae (C. vulgaris) growth and compare that with the literature using the same mathematical model. Tebbani et al. [6] used a nonlinear model predictive control strategy for the enhancement of the CO2—biofixation of microalgae in a continuous PBR. This is carried out by keeping the biomass at optimal operating conditions in the reactor. In Tebbani et al. [6] study, the selected operating conditions for algae growth were determined as: Temperature of 25 °C, pH of 6.3, and intensity of incident light 90 µE/m2 s and inlet CO2 partial pressure of 0.05 atm. They determined the optimum productivity at these conditions to be \({P}_{r}\) = 0.525 billion cells/L h (0.27 g/L h) which corresponds to a cell concentration of 7.5 billion cells/L and dilution rate of 0.07 1/h and fixation rate of CO2 of 0.45 gCO2/L day. Using the same conditions as Tebbani, et al. [6], in this work, the optimization function (fmincon) produces almost similar results as follows: Optimum cell concentration of 7.24 billion cells/L and an optimum dilution rate of 0.073 1/h. This corresponds to biomass productivity of 0.53 billion cells/ L. h (0.26 g/L day) and CO2 fixation rate of 0.467 gCO2/L day.

Sangregorio-Soto et al. [28] optimized PBR for maximum biomass productivity using the same model utilized in this work that was developed and calibrated by [4] for C. vulgaris and later used by [6]. Sangregorio-Soto et al. [28] used simultaneous optimization procedures in Python package to find the best productivity of biomass at steady flow mode. Using the same model of [4], Sangregorio-Soto et al. [28] achieved maximum biomass productivity of 10.13 billion cells/L h at a dilution rate of 0.094 1/h. The work in this manuscript which is carried out under some conditions that are different from that of [5] and [28] achieved different biomass productivity. However, using the same range of operating parameters and the same carbon conversion yield (Y in billion cells/mol TIC), the resulting maximum biomass productivity is almost the same as [28] and at the same optimum dilution rate.

For controlling the optimal production of biomass in a continuous photobioreactor using dilution rate D as a manipulating variable, Garzon-Castro et al. [13] used numerical simulation to describe the performance of an active disturbance rejection. Using a dilution rate of 0.0934 1/h resulted in a microalgae cell number of 100 billion cells/L that corresponded to biomass productivity of 9.34 billion cells/L h.

A comparison is shown in Table 4 for the results obtained in this work with two references in the literature who used the same model for the microalgae growth of C. vulgaris species and at the same operating conditions. Similar biomass productivity is reported using the same dilution rate. It is shown by [28] that biomass productivity is strongly affected by \({K}_{{\text{L}}}a\) in the bioreactor that depends on the aeration system which was not considered as an optimization parameter in their used mathematical model. It was observed that high levels of \({K}_{{\text{L}}}a\) and \({P}_{{\text{CO}}2}\) can improve biomass productivity by 147% [28].

Table 4 Comparison of the maximum biomass productivity obtained with similar studies in the literature

4 Conclusions

Optimization of biomass productivity in continuous flow photobioreactor is a key factor for biofuel production and carbon dioxide fixation rate. Several operating parameters affect biomass productivity such as dilution rate, partial pressure of CO2 in the gas feed, intensity of light, and pH. Model-based optimization was carried out in a flow photobioreactor using the MATLAB optimization function (fmincon). The mathematical model used for C. vulgaris growth was validated by authors compared with experimental results. A maximum biomass productivity of 4.03 \((\mathrm{billion cell}/\mathrm{L h })\) was attained at a dilution rate of 0.0489 (\(1/h\)) and biomass concentration of 82.45 \(\left(\mathrm{billion cells}/{\text{L}}\right).\) For the range of parameters tested in this optimization study, the productivity of biomass increased with an increase in the pH (alkaline medium is more suitable), and percentage of the CO2 in the gas feed (carbon source) in addition to the intensity of incident light (energy source). Results showed that an optimal dilution rate exists which ensures the achievement of maximum microalgae biomass productivity. Maximizing the cell-specific growth rate or concentration of biomass resulted in lower biomass productivity compared to maximizing biomass productivity as a single objective. Good agreement was obtained between the predictions of fmincon optimization function and other model-based optimization methods in the literature. Sensitivity analysis was used to determine the relation between biomass concentration and the kinetic parameters in the mathematical model. Results showed that KLa has the highest sensitivity followed by µmax, KCL, and KE which has the lowest sensitivity for the biomass concentration. Results obtained in this study are of technological importance for the optimization of operating conditions required to achieve maximum CO2 biofixation and production of biofuel using microalgae. Future studies should be carried out to optimize microalgae growth using more adequate mathematical models especially models that include nitrogen in addition to carbon as limiting substrate and also study biomass productivity of other promising microalgae species.