^{1}

^{1}

^{*}

^{1}

Dynamic Models for predicting the concentration profiles of the reactants and product in a Continuous Stirred Tank Reactor for the transesterification of used cooking oil (triglyceride) to biodiesel has been developed using the principle of conservation of mass. The developed system of differential equations were integrated numerically using fourth order Runge-Kutta algorithm embedded in ode 45 solver of 7.5 Mathlab program. The models were validated by solving the model equations with kinetic data and other relevant data from literatures. The results and trends were similar and in agreement with those from these literatures. Simulations of the reactor to (±) step changes in the inlet flowrates of the reactants (used cooking oil and methanol) showed great effect on biodiesel production, (instability—oscillations and reduction in output concentration of biodiesel). A feedback control strategy was developed with a Proportional-Integral (PI) Controller and a close loop model was developed for control studies. The closed loop response of the reactor output (biodiesel concentration) showed continuous oscillatory response with offset. Hence the controller parameters (proportional gain
*K*
* _{c}* and integral time
) were tuned using the “On-Line Trial and Error Method” implemented using MathLab Simulink to obtain optimum values that ensured quick stability of the closed-loop system, reduced or no oscillatory response and no offset. The optimum controller parameters were: proportional gain

*K*

*＝8.306 and integral time = 17.157 minutes.*

_{c}The increased demand for food, better communication technology, housing, means of transportation, clothes and better standard of living has led to considerable increase in the number of industries and manufacturing companies. The resulting effect is increased energy consumption and requirement; hence necessitating increased research into readily available, sustainable and environmentally friendly energy sources. These energy sources include nuclear energy, fossil fuels (petroleum energy), solar energy, wind energy, hydro energy, and other alternative sources such as biofuel. In this group, biofuel has the advantage of producing no net output of carbon in the form of carbon dioxide [

The general reaction scheme and the set of consecutive reversible reactions for the transesterification of triglyceride (fat or oil) as given by [

In a typical esterification process, the triglyceride reacts with alcohol in the presence of a catalyst (usually a strong alkaline like sodium hydroxide) to form the mono-alkyl ester, or biodiesel and crude glycerol. Methanol or ethanol is the alcohol mostly used and produces methyl or ethyl esters respectively with potassium or sodium hydroxide as catalyst.

Research on various aspects of the transesterification process abound: works on the use of various oils as feedstock for the transesterification process include the use of: coconut oil [

Researches on the effects of process parameter aimed at establishing optimum reaction conditions for maximum and profitable biodiesel production include works on the effects of temperature and pressure [

used vegetable oil to biodiesel occurs via a series of three-stage reversible reaction scheme; as with reversible reactions, the reactions can proceed in either direction if not effectively controlled. Implementation of an appropriate control strategy will ensure optimum biodiesel production and process stability. Research on the control of the biodiesel reactor is scanty, except the works of Mjalli & Hussain (2009) [

The mathematical models of the continuous stirred tank reactor (CSTR) were developed by applying the principle of conservation of mass on the reactor. These models (open loop process models) were ordinary differential equations and were solved with industrial process data [

The reaction mechanism for a transesterification process [

( − r T G ) = − K 1 C T G C M E + K 2 C D G C E T 1 (1)

( − r M E ) = − K 1 C T G C M E + K 2 C D G C E T 1 + ( − K 3 C D G C M E + K 4 C M G C E T 2 ) + ( − K 5 C M G C M E + K 6 C G G C E T 3 ) (2)

( − r D G ) = − K 1 C T G C M E + K 2 C D G C E T 1 + ( − K 3 C D G C M E + K 4 C M G C E T 2 ) (3)

( − r M G ) = ( − K 4 C M G C E T 2 + K 3 C D G C M E ) + ( − K 5 C M G C M E + K 6 C D G C E T 3 ) (4)

( − r G L ) = − K 5 C M G C M E + K 6 C D G C E T 3 (5)

( − r B D ) = − K 5 C M G C M E + K 6 C D G C E T 3 (6)

The open loop model is the model of the process without any form of control. In formulating the process (Continuous Stirred Tank Reactor) model, the following simplifying assumptions were made: the reactants were perfectly mixed therefore outlet conditions were the same as conditions within the reactor, density is constant and heat capacity varies negligibly with temperature, the reactor is perfectly insulated and there is no heat loss. Applying the principle of conservation of mass to each reaction component (i) involved in the process gave the model equation for constant reactor volume:

d C i d t = F i V C i o − F V C i − ( r i ) (7)

Equation (7) can be written for each component by substituting the reaction rate of the various components as follows:

Triglyceride:

d C T G d t = F 1 V C T G o − F 1 V C T G − K 1 C T G C M E + K 2 C D G C E T 1 (8)

Methanol:

d C M E d t = F 1 V C M E o − F 1 V C M E − K 1 C T G C M E + K 2 C D G C E T 1 + ( − K 3 C D G C M E + K 4 C M G C E T 2 ) + ( − K 5 C M G C M E + K 6 C G L C E T 3 ) (9)

Diglyceride:

d C D G d t = F 1 V C D G o − F 1 V C D G − K 1 C T G C M E + K 2 C D G C E T 1 + ( − K 3 C D G C M E + K 4 C M G C E T 2 ) (10)

Monoglyceride:

d C M G d t = F 1 V C M G o − F 1 V C M G + ( − K 4 C M G C M E + K 3 C D G C M E ) + ( − K 5 C M G C M E + K 6 C D G C E T 3 ) (11)

Methyl Ester (biodiesel):

d C B D d t = F 1 V C B o − F 1 V C B + K 5 C M G C M E − K 6 C G L C E T 3 (12)

Glycerol:_{ }

d C G L d t = F 1 V C G L o − F 1 V C G L + K 5 C M G C M E − K 6 C G L C E T 3 (13)

These derived equations are the open-loop models for the transesterification process.

The Control Objective was to ensure the concentration of biodiesel (methyl ester) from the reactor was maintained at a maximum pre-specified level (stable and does not fluctuate with time) in the face of changing disturbances (step changes in the inlet feed flow rate—a Servo problem). The closed loop diagram of the process is shown in

The general model equation for the output of a closed loop process [

C E T 3 ( S ) = G f ( s ) G c ( s ) G p ( s ) 1 + G f ( s ) G c ( s ) G m ( s ) G p ( s ) C E T 3 S P ( S ) + G d ( s ) 1 + G f ( s ) G c ( s ) G m ( s ) G p ( s ) d ( s ) (14)

where:

G f ( S ) = Transfer Function for the Final Control Element

G c ( S ) = Transfer Function for the Controller

G P ( S ) = Transfer Function for the Process

G d ( S ) = Transfer Function for the Load

G m ( S ) = Transfer Function for the Measuring Device

For the servo control problem: the set point undergoes step changes while the load does not change ( d ( s ) = 0 ); the feedback controller acts to keep the concentration of biodiesel ( C E T 3 ( S ) ) close to the set point (maximum concentration of biodiesel) C E T 3 S P ( S ) .

The output C E T 3 ( S ) from Equation (14) becomes:

C E T 3 ( S ) = G f ( s ) G c ( s ) G p ( s ) 1 + G f ( s ) G c ( s ) G m ( s ) G p ( s ) C E T 3 S P ( S ) (15)

The transfer function of each component was obtained by expressing the component model equation in deviation variables form, Laplace transform the resulting equation and rearrange the final equation in the input-output form. The transfer function for the various components in the closed loop diagram (

1) Process

The transfer function for the process was obtained as:

G p ( s ) = C E T 3 s C T G s = [ K 1 K 3 K 5 V 3 C M E o 3 ] [ V S + F 1 + K 3 V C M E o ] [ V S + F 1 + K 5 V C M E o ] [ V S + F 1 ] (16)

2) Controller: Proportional-Integral (PI) Controller

The controller of choice varies between the Proportional Integral (PI) and a Proportional Integral Differential controller (PID). As a result of the noise signal which cannot be accounted for within the framework of this study, a PI controller was used. The model equation for the output of a PI controller in deviation variables is [

C E T 3 ( t ) = K c ( ε ¯ ′ ( t ) + 1 τ I ∫ 0 t ε ¯ ′ ( t ) d t ) (17)

Equation (17) was laplaced and rearranged to obtain the Transfer function as:

G c ( s ) = C E T 3 ( s ) ε ¯ ′ ( s ) = K c ( 1 + 1 τ I s ) (18)

where: K c = proportional gain; τ I = reset time.

3) Measuring Device (Differential Pressure Cell)

G m ( s ) = 1 (19)

4) Final Control Element (The Control Valve)

G f ( s ) = 1 (20)

The values of the transfer functions of the measuring device and the final control element as given by Equations (19) and (20) are usually assumed as the transfer functions of these components of the closed loop do not change and have minimal effect on the system [

The reaction rate constants for the transesterification process of palm oil as the triglyceride [

Parameter | K_{1} | K_{2} | K_{3} | K_{4} | K_{5} | K_{6} |
---|---|---|---|---|---|---|

Value m^{3}∙mol^{−1}∙s^{−1} | 0.0001057 | 0 | 0.0001884 | 0.00008187 | 0.00131 | 0.00002011 |

The controller parameters: the proportional gain and reset time for the PI controller were determined using an iterative procedure—the On-Line Trial and Error Method with the initial values of the parameters determined using the Ziegler’s method of direct substitution for stability [

The model equations are a system of coupled non-linear differential equations and were solved using Runge-Kutta 4^{th} order.

Substitution of the expressions for the various components of the close loop model into the close loop model equation, rearrange and invert Laplace transform to obtain the expression for the concentration of biodiesel in the time domain as:

C E T 3 ( S ) = ( 0.00007169 e − 0.519522 t − 0.001712 e − 0.052832 t + 0.00164 e 0.011465 t cos 0.14547 t + 0.1511 e 0.011465 t sin 0.14547 t ) C E T 3 S P ( S ) (21)

The results obtained by solving the open loop model equations for the various components of the esterification reaction give the behavior of these components in the reactor. These results as predicted by the model equations are shown in Figures 4-9.

The concentrations of the reactants—triglyceride and methanol decreased continuously with time as the reaction proceeds and becomes gradually constant—equilibrium gradually attained as reaction stops.

The concentrations of diglycerides increased sharply initially and continuously until it reached a maximum in the first three quarters of the reaction time and thereafter, gradually decreased till the end of the reaction. Similarly, the concentrations of monoglyceride increased slowly and continuously until it reached a maximum and thereafter gradually decreased to a very minute concentration at the end of the reaction. This confirms the formation of monoglyceride as an intermediate product which was almost completely used up during the reaction as shown by its concentration at the end of the reaction. These results and trends were similar and in agreement with similar works on the transesterification of used oil in the literature: Yusuff et al. (2014) [

The results of the concentration of the products—methyl ester (Biodiesel) and glyceride are shown in

From

rate of production of methyl ester (biodiesel) much higher than that of glyceride. The concentrations of these products increased continuously and gradually attained equilibrium towards the end of the reaction.

The effects of step changes (increase and decrease) in the reactants (triglyceride and methanol) flowrates on the concentrations of methyl ester (biodiesel) are shown in

A 10% step increase in the inlet reactants flowrates means more reactants are available for reaction, this results in an increase in the rate of reaction and a corresponding increase in products formed.

The closed loop responses of the biodiesel concentration in the reactor with a feedback PI controller at varying values of the controller parameters (controller gain K_{C} and integral or reset time τ_{I}) aimed at stabilizing the concentration level of biodiesel were investigated. A typical response is shown in

The controller parameters were continuously adjusted in a systematic way until the “best” values of controller parameters for the process—values that gave faster and less oscillatory response that becomes stable in the shortest possible time were obtained. The optimum values of these controller parameters obtained were: K_{C} = 8.306 and τ_{I} = 17.157 mins.

The behavior of the biodiesel concentrations at these values for ±10% step changes in the inlet reactants flowrates is shown in

As seen in these figures the PI control was able to almost eliminated the oscillation (nullify the effect of the disturbances), stabilize the process and gave higher production of biodiesel in both cases compared to when there was no controller in place.

A dynamic model has been developed for the continuous stirred tank reactor for the transesterification of used cooking oil (triglyceride) to biodiesel by applying the principles of conservation of mass. The developed models were used to study the dynamic behaviour of the reactor. The model results gave the concentration time profiles of the reactants and products in the reactor. Simulation of the continuous stirred tank reactor to step changes in inlet reactants flowrate on the concentration time profile of the product—biodiesel showed fluctuations in the concentration time profile for biodiesel. Hence process control was effected using a proportional-integral feedback controller. A closed loop model (process with controller) was developed. The solution of the closed loop model to step changes in the inlet flowrate showed oscillatory response in the biodiesel concentration with offset over a long period. Controller tunning was therefore performed to obtain optimum values of the controller parameters (controller gain K C , the integral or reset time τ I ) of K C = 8.306 ; τ I = 17 . 157 mins which ensured stability and eliminated the offset (steady state error).

The authors declare no conflicts of interest regarding the publication of this paper.

Adokiye, T., Gunorubon, A.J. and Kenkugile, D.K. (2020) Modeling and Control of a Biodiesel Transesterification Reactor. Advances in Chemical Engineering and Science, 10, 210-224. https://doi.org/10.4236/aces.2020.103016