<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">ACES</journal-id><journal-title-group><journal-title>Advances in Chemical Engineering and Science</journal-title></journal-title-group><issn pub-type="epub">2160-0392</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/aces.2020.103016</article-id><article-id pub-id-type="publisher-id">ACES-101703</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Chemistry&amp;Materials Science</subject></subj-group></article-categories><title-group><article-title>
 
 
  Modeling and Control of a Biodiesel Transesterification Reactor
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Tombomieye</surname><given-names>Adokiye</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Akpa</surname><given-names>Jackson Gunorubon</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Dagde</surname><given-names>Kenneth Kenkugile</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>Department of Chemical/Petrochemical Engineering, Rivers State University, Port Harcourt, Nigeria</addr-line></aff><pub-date pub-type="epub"><day>13</day><month>05</month><year>2020</year></pub-date><volume>10</volume><issue>03</issue><fpage>210</fpage><lpage>224</lpage><history><date date-type="received"><day>19,</day>	<month>June</month>	<year>2020</year></date><date date-type="rev-recd"><day>21,</day>	<month>July</month>	<year>2020</year>	</date><date date-type="accepted"><day>24,</day>	<month>July</month>	<year>2020</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p><html>
 <head></head>
 
  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 (&#177;) 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 
  <em>K</em>
  <em><sub>c</sub></em> and integral time 
  <img src="Edit_b22777c4-287e-4ff4-a82a-0b5c9393b5ab.bmp" alt="" />) 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 
  <em style="white-space:normal;">K</em>
  <em style="white-space:normal;"><sub>c</sub></em> ＝8.306 and integral time 
  <img src="Edit_7ad87ff7-7563-48b0-865b-70efc6c433cd.bmp" alt="" />= 17.157 minutes. 
    
 
</html></p></abstract><kwd-group><kwd>Transesterification</kwd><kwd> Biodiesel</kwd><kwd> Reactor Model And Simulation</kwd><kwd> Feedback Con-trol</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><sec id="s1_1"><title>1.1. Background of Study</title><p>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 [<xref ref-type="bibr" rid="scirp.101703-ref1">1</xref>], and is rapidly biodegradable and completely non-toxic; hence spillages are of less risk than fossil diesel spillages [<xref ref-type="bibr" rid="scirp.101703-ref2">2</xref>]. An important type of biofuel is biodiesel, which has become the foremost alternative biofuel being developed to reduce the World’s dependence on fossil fuels. Also, growing concern on the use of fossil fuel particularly due to its environmental effects has made biodiesel an alternative fuel to those refined from petroleum feedstock as it reduces greenhouse emissions [<xref ref-type="bibr" rid="scirp.101703-ref3">3</xref>]. Its higher flash point than fossil diesel makes it safer in the event of a crash and it also has fuel properties similar to diesel fuel [<xref ref-type="bibr" rid="scirp.101703-ref4">4</xref>]. Biodiesel can be produced from renewable sources such as vegetable and animal oils, as well as from wastes, such as used cooking oil through a process called transesterification [<xref ref-type="bibr" rid="scirp.101703-ref5">5</xref>] which is the chemical reaction between triglyceride and alcohol in the presence of a catalyst to produce biodiesel and glycerol.</p></sec><sec id="s1_2"><title>1.2. Biodiesel Production</title><p>The general reaction scheme and the set of consecutive reversible reactions for the transesterification of triglyceride (fat or oil) as given by [<xref ref-type="bibr" rid="scirp.101703-ref6">6</xref>] are shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><p>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.</p><p>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 [<xref ref-type="bibr" rid="scirp.101703-ref7">7</xref>], cottonseed oil [<xref ref-type="bibr" rid="scirp.101703-ref8">8</xref>], cashew nut shell liquid oil [<xref ref-type="bibr" rid="scirp.101703-ref9">9</xref>], jatropha oil [<xref ref-type="bibr" rid="scirp.101703-ref10">10</xref>], sunflower [<xref ref-type="bibr" rid="scirp.101703-ref11">11</xref>], palm oil [<xref ref-type="bibr" rid="scirp.101703-ref12">12</xref>] and beef tallow by [<xref ref-type="bibr" rid="scirp.101703-ref13">13</xref>].works on catalysts used include: chemical (homogeneous—alkali or acid, heterogeneous—solid acid or solid alkali catalyst) and biological (immobilized lipases) [<xref ref-type="bibr" rid="scirp.101703-ref14">14</xref>], heterogeneous base catalyst from waste eggshell [<xref ref-type="bibr" rid="scirp.101703-ref15">15</xref>] [<xref ref-type="bibr" rid="scirp.101703-ref16">16</xref>]; reaction kinetics of transesterification of: sunflower oil [<xref ref-type="bibr" rid="scirp.101703-ref17">17</xref>], jatropha oil [<xref ref-type="bibr" rid="scirp.101703-ref18">18</xref>] and of palm oil [<xref ref-type="bibr" rid="scirp.101703-ref6">6</xref>], [<xref ref-type="bibr" rid="scirp.101703-ref19">19</xref>].</p><p>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 [<xref ref-type="bibr" rid="scirp.101703-ref20">20</xref>]; methanol-oil molar ratio [<xref ref-type="bibr" rid="scirp.101703-ref21">21</xref>], mixing rate [<xref ref-type="bibr" rid="scirp.101703-ref18">18</xref>], catalyst type [<xref ref-type="bibr" rid="scirp.101703-ref16">16</xref>] [<xref ref-type="bibr" rid="scirp.101703-ref22">22</xref>] and optimization of reactor parameters by [<xref ref-type="bibr" rid="scirp.101703-ref23">23</xref>] and [<xref ref-type="bibr" rid="scirp.101703-ref24">24</xref>]. The reaction mechanism for the transesterification of</p><p>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 &amp; Hussain (2009) [<xref ref-type="bibr" rid="scirp.101703-ref25">25</xref>] that compared the predictive and self-tuning adaptive control strategies for biodiesel reactor and Olufemi &amp; Ogbeide (2017) [<xref ref-type="bibr" rid="scirp.101703-ref26">26</xref>] that designed non-linear controllers for the biodiesel reactor. In this work a model for a feedback control strategy with Proportional Integral (PI) controller was developed for the continuous stirred tank reactor and used to study the effect of disturbance and determine optimum controller parameters that will ensure increased biodiesel production and stability of the reactor.</p></sec></sec><sec id="s2"><title>2. Methods</title><p>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 [<xref ref-type="bibr" rid="scirp.101703-ref21">21</xref>] [<xref ref-type="bibr" rid="scirp.101703-ref26">26</xref>] [<xref ref-type="bibr" rid="scirp.101703-ref6">6</xref>] using the ode45 solver from MATLAB 7.5.0. The open loop models were used for reactor simulation to determine the effects of step-changes of &#177;10% in the reactants flowrate on the reactor performance—the concentrations of biodiesel produced. Simulation results showed instabilities in biodiesel concentrations due to changing reactants flowrate, hence requiring reactor control. The control objective was to ensure maximum production (concentration) of biodiesel as fluctuations in the inlet reactants flowrate occur. The feedback control configuration with Proportional-Integral (PI) controller was used to effect the control action. A closed loop block diagram of the process was drawn, from which the closed loop model of the process output (biodiesel concentration) was developed. The closed loop model equation of the process was developed in terms of the transfer functions of the components of the closed loop block diagram. To effectively ensure this control which is to minimize the effects of disturbances, obtain rapid and smooth responses to set point changes with little or no oscillations and eliminate steady state error (offset); the optimum values of the controller parameters (controller gain K C , the integral or reset time τ I ) had to be determined. This was achieved by controller tuning. This is a systematic selection of controller parameter values that achieves control objectives. An iterative procedure using 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 [<xref ref-type="bibr" rid="scirp.101703-ref27">27</xref>] implemented with MathLab Simulink was developed. The values of these parameters that stabilize the output in the reactor are the optimum controller setting for effective control of the process.</p><sec id="s2_1"><title>2.1. Reaction Kinetics</title><p>The reaction mechanism for a transesterification process [<xref ref-type="bibr" rid="scirp.101703-ref6">6</xref>] is given in <xref ref-type="fig" rid="fig1">Figure 1</xref> was used to obtain the corresponding reaction rates for the reactions assuming first order elementary reaction rate as follows:</p><p>( − r T G ) = − K 1 C T G C M E + K 2 C D G C E T 1 (1)</p><p>( − 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)</p><p>( − 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)</p><p>( − 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)</p><p>( − r G L ) = − K 5 C M G C M E + K 6 C D G C E T 3 (5)</p><p>( − r B D ) = − K 5 C M G C M E + K 6 C D G C E T 3 (6)</p></sec><sec id="s2_2"><title>2.2. Model Development</title><sec id="s2_2_1"><title>2.2.1. Open Loop Reactor Model</title><p>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:</p><p>d C i d t = F i V C i o − F V C i − ( r i ) (7)</p><p>Equation (7) can be written for each component by substituting the reaction rate of the various components as follows:</p><p>Triglyceride:</p><p>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)</p><p>Methanol:</p><p>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)</p><p>Diglyceride:</p><p>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)</p><p>Monoglyceride:</p><p>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)</p><p>Methyl Ester (biodiesel):</p><p>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)</p><p>Glycerol:<sub> </sub></p><p>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)</p><p>These derived equations are the open-loop models for the transesterification process.</p></sec><sec id="s2_2_2"><title>2.2.2. Closed Loop Reactor Model-Process Control</title><p>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 <xref ref-type="fig" rid="fig2">Figure 2</xref> and the block diagram in <xref ref-type="fig" rid="fig3">Figure 3</xref>.</p><p>The general model equation for the output of a closed loop process [<xref ref-type="bibr" rid="scirp.101703-ref27">27</xref>] was applied to obtain the output (concentration of biodiesel, methyl ester: C E T 3 ) of the closed loop process in the Laplace domain in terms of transfer functions of the various components in <xref ref-type="fig" rid="fig3">Figure 3</xref> due to set point ( C E T 3 S P ( S ) ) and load/ disturbance ( d ( s ) ) changes to give:</p><p>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)</p><p>where:</p><p>G f ( S ) = Transfer Function for the Final Control Element</p><p>G c ( S ) = Transfer Function for the Controller</p><p>G P ( S ) = Transfer Function for the Process</p><p>G d ( S ) = Transfer Function for the Load</p><p>G m ( S ) = Transfer Function for the Measuring Device</p><p>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 ) .</p><p>The output C E T 3 ( S ) from Equation (14) becomes:</p><p>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)</p></sec><sec id="s2_2_3"><title>2.2.3. Determination of the Transfer Functions</title><p>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 (<xref ref-type="fig" rid="fig3">Figure 3</xref>) was therefore obtained following this procedure as follows:</p><p>1) Process</p><p>The transfer function for the process was obtained as:</p><p>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)</p><p>2) Controller: Proportional-Integral (PI) Controller</p><p>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 [<xref ref-type="bibr" rid="scirp.101703-ref25">25</xref>]:</p><p>C E T 3 ( t ) = K c ( ε &#175; ′ ( t ) + 1 τ I ∫ 0 t ε &#175; ′ ( t ) d t ) (17)</p><p>Equation (17) was laplaced and rearranged to obtain the Transfer function as:</p><p>G c ( s ) = C E T 3 ( s ) ε &#175; ′ ( s ) = K c ( 1 + 1 τ I s ) (18)</p><p>where: K c = proportional gain; τ I = reset time.</p><p>3) Measuring Device (Differential Pressure Cell)</p><p>G m ( s ) = 1 (19)</p><p>4) Final Control Element (The Control Valve)</p><p>G f ( s ) = 1 (20)</p><p>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 [<xref ref-type="bibr" rid="scirp.101703-ref27">27</xref>].</p></sec></sec><sec id="s2_3"><title>2.3. Determination of Model Parameters</title><sec id="s2_3_1"><title>2.3.1. Reaction Rate Constants</title><p>The reaction rate constants for the transesterification process of palm oil as the triglyceride [<xref ref-type="bibr" rid="scirp.101703-ref6">6</xref>] was used in this study are as follows (<xref ref-type="table" rid="table1">Table 1</xref>).</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> Reaction rate constants</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Parameter</th><th align="center" valign="middle" >K<sub>1</sub></th><th align="center" valign="middle" >K<sub>2</sub></th><th align="center" valign="middle" >K<sub>3</sub></th><th align="center" valign="middle" >K<sub>4</sub></th><th align="center" valign="middle" >K<sub>5</sub></th><th align="center" valign="middle" >K<sub>6</sub></th></tr></thead><tr><td align="center" valign="middle" >Value m<sup>3</sup>∙mol<sup>−1</sup>∙s<sup>−1</sup></td><td align="center" valign="middle" >0.0001057</td><td align="center" valign="middle" >0</td><td align="center" valign="middle" >0.0001884</td><td align="center" valign="middle" >0.00008187</td><td align="center" valign="middle" >0.00131</td><td align="center" valign="middle" >0.00002011</td></tr></tbody></table></table-wrap></sec><sec id="s2_3_2"><title>2.3.2. Controller Parameter/Constants</title><p>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 [<xref ref-type="bibr" rid="scirp.101703-ref27">27</xref>].</p></sec></sec><sec id="s2_4"><title>2.4. Solution Techniques</title><sec id="s2_4_1"><title>2.4.1. Open Loop Model</title><p>The model equations are a system of coupled non-linear differential equations and were solved using Runge-Kutta 4<sup>th</sup> order.</p></sec><sec id="s2_4_2"><title>2.4.2. Closed Loop Model</title><p>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:</p><p>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)</p></sec></sec></sec><sec id="s3"><title>3. Results and Discussion</title><sec id="s3_1"><title>3.1. Open Loop Model Results/Response</title><p>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.</p><p><xref ref-type="fig" rid="fig4">Figure 4</xref> and <xref ref-type="fig" rid="fig5">Figure 5</xref> show how the concentrations of the reactants—triglyceride and methanol vary in the reactor with time.</p><p>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.</p><p><xref ref-type="fig" rid="fig6">Figure 6</xref> and <xref ref-type="fig" rid="fig7">Figure 7</xref> show the behavior of the intermediate products (diglyceride and monoglyceride) produced in the course of the reaction.</p><p>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) [<xref ref-type="bibr" rid="scirp.101703-ref21">21</xref>]; Olufemi &amp; Ogbeide (2017) [<xref ref-type="bibr" rid="scirp.101703-ref26">26</xref>]; Leevijit et al. (2006) and Theerayut et al. (2006) [<xref ref-type="bibr" rid="scirp.101703-ref6">6</xref>].</p><p>The results of the concentration of the products—methyl ester (Biodiesel) and glyceride are shown in <xref ref-type="fig" rid="fig8">Figure 8</xref> and <xref ref-type="fig" rid="fig9">Figure 9</xref>.</p><p>From <xref ref-type="fig" rid="fig8">Figure 8</xref> and <xref ref-type="fig" rid="fig9">Figure 9</xref>, the concentrations of methyl ester and glyceride increased gradually continuously throughout the course of the reaction with the</p><p>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.</p></sec><sec id="s3_2"><title>3.2. Effect of Disturbance—Step Changes in Reactant Flow Rates</title><p>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 <xref ref-type="fig" rid="fig1">Figure 1</xref>0 and <xref ref-type="fig" rid="fig1">Figure 1</xref>1.</p><p>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. <xref ref-type="fig" rid="fig1">Figure 1</xref>0 shows an initial sharp increase in biodiesel concentration which became gradual, then there was a decrease for a while then an increase. This increase-decrease trend continued throughout the reaction period and finally increased gradually at the end of reaction. Similarly, a 10% step decrease in the inlet reactants flowrates means less reactants are available for reaction, results in a decrease in the rate of reaction and a corresponding decrease in products formed. <xref ref-type="fig" rid="fig1">Figure 1</xref>1 shows an increase-decrease trend in the biodiesel concentrations but with a decreased actual value at each time and at the end of the reaction when compared to the concentrations when there were no disturbances. For both cases there were varying distortions in the concentrations of biodiesel and the concentration did not attain equilibrium.</p></sec><sec id="s3_3"><title>3.3. Closed-Loop Response: Effect of the Controller</title><p>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<sub>C</sub> and integral or reset time τ<sub>I</sub>) aimed at stabilizing the concentration level of biodiesel were investigated. A typical response is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>2. The concentration levels during these variations oscillated progressively with increasing amplitude and a low or high period of oscillation. This showed that the process was still unstable and the controller required more tuning.</p><p>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<sub>C</sub> = 8.306 and τ<sub>I</sub> = 17.157 mins.</p><p>The behavior of the biodiesel concentrations at these values for &#177;10% step changes in the inlet reactants flowrates is shown in <xref ref-type="fig" rid="fig1">Figure 1</xref>3 and <xref ref-type="fig" rid="fig1">Figure 1</xref>4.</p><p>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.</p></sec></sec><sec id="s4"><title>4. Conclusion</title><p>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).</p></sec><sec id="s5"><title>Conflicts of Interest</title><p>The authors declare no conflicts of interest regarding the publication of this paper.</p></sec><sec id="s6"><title>Cite this paper</title><p>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</p></sec></body><back><ref-list><title>References</title><ref id="scirp.101703-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Zaher, F.A. and Soliman, H.M. (2015) Biodiesel Production by Direct Esterification of Fatty Acids with Propyl and Butyl Alcohols. Egyptian Journal of Petroleum, 24, 439-443. https://doi.org/10.1016/j.ejpe.2015.10.007</mixed-citation></ref><ref id="scirp.101703-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Benavides, P.T. and Diwekar, U. (2012) Optimal Control of Biodiesel Production in a Batch Reactor: Part I: Deterministic Control. Fuel, 94, 211-217. https://doi.org/10.1016/j.fuel.2011.08.035</mixed-citation></ref><ref id="scirp.101703-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Hoekman, S.K. (2009) Biofuels in the US—Challenges and Opportunities. Renewable Energy, 34, 14-22. https://doi.org/10.1016/j.renene.2008.04.030</mixed-citation></ref><ref id="scirp.101703-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Babulal, K.S., Pradeep, A. and Muthukumar, P. (2015) Experimental Performance and Emission Analysis of C.I. Engine Fueled with Biodiesel. International Journal of Innovative Research in Science, Engineering and Technology, 4, 133-138. https://doi.org/10.15680/IJIRSET.2015.0402019</mixed-citation></ref><ref id="scirp.101703-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Lin, C.W. and Tsai, S.W. (2015) Production of Biodiesel from Chicken Wastes by Various Alcohol-Catalyst Combinations. Journal of Energy in Southern Africa, 26, 36-45. https://doi.org/10.17159/2413-3051/2015/v26i1a2219</mixed-citation></ref><ref id="scirp.101703-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Theerayut, L., Worawut, W., Gumpon, P., Charktir, T. and Michael, A. (2006) Transesterification of Palm Oil in Series of Continuous Stirred Tank Reactor. Asian Journal of Energy and Environment, 7, 336-346.</mixed-citation></ref><ref id="scirp.101703-ref7"><label>7</label><mixed-citation publication-type="other" xlink:type="simple">Rismawati, R., Zakir, S., Ainun, P.H., Rasdin, J. and Rahmania, M. (2018) The Production of Biodiesel from a Traditional Coconut Oil Using NaOH/γ-Al2O3 Heterogeneous Catalyst. IOP Conference Series: Earth and Environmental Science, 175, Article ID: 012025. https://doi.org/10.1088/1755-1315/175/1/012025</mixed-citation></ref><ref id="scirp.101703-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Shankar, A.A., Pentapati, P.R. and Prasad, R.K. (2017) Biodiesel Synthesis from Cottonseed Oil Using Homogeneous Alkali Catalyst and Using Heterogeneous Multi Walled Carbon Nanotubes: Characterization and Blending Studies. Egyptian Journal of Petroleum, 26, 125-133. https://doi.org/10.1016/j.ejpe.2016.04.001</mixed-citation></ref><ref id="scirp.101703-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Nivetha, K., Prethika, M., Suhanika, P. and Sivarajasekar, N. (2019) Production of Biodiesel from Anacardium occidentale Shell Coat Oil. American International Journal of Research in Science, Technology, Engineering &amp; Mathematics, 217-221.</mixed-citation></ref><ref id="scirp.101703-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Eboibi, B.E., Eboibi, O., Okputu, J. and Okpohwo, K.A. (2018) Production and Analysis of Biodiesel from Jatropha curcas Seed. Journal of Applied Sciences and Environmental Management, 22, 26-33. https://doi.org/10.4314/jasem.v22i1.6</mixed-citation></ref><ref id="scirp.101703-ref11"><label>11</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Jabbari</surname><given-names> H. </given-names></name>,<etal>et al</etal>. (<year>2018</year>)<article-title>Production of Methyl Ester Biofuel from Sunflower Oil via Transesterification Reaction</article-title><source> Asian Journal of Nanoscience and Materials</source><volume> 2</volume>,<fpage> 52</fpage>-<lpage>55</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.101703-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Nattee, A., Amaraporn, K. and Attasak, J. (2019) Production of Biodiesel from Palm Oil under Supercritical Ethanol in the Presence of Ethyl Acetate. Energy Fuels, 33, 5322-5331. https://doi.org/10.1021/acs.energyfuels.9b00641</mixed-citation></ref><ref id="scirp.101703-ref13"><label>13</label><mixed-citation publication-type="other" xlink:type="simple">Ali, J.A., Abdulrahman, R.K. and Zangana, M.H. (2015) The Production of Biodiesel from Animal Tallow to Be Used for Electric Generators: A Case Study. Energy and Power, 5, 17-23.</mixed-citation></ref><ref id="scirp.101703-ref14"><label>14</label><mixed-citation publication-type="other" xlink:type="simple">Eevera, T., Rajendran, K. and Saradha, S. (2009) Biodiesel Production Process Optimization and Characterization to Access the Suitability of the Product for Varied Environmental Conditions. Renewable Energy, 34, 762-765. https://doi.org/10.1016/j.renene.2008.04.006</mixed-citation></ref><ref id="scirp.101703-ref15"><label>15</label><mixed-citation publication-type="other" xlink:type="simple">Leevijit, T., Wisutmethangoon, W., Prateepchaikul, G., Tongurai, C. and Allen, M. (2006) Design and Test of a Continuous Reactor for Palm Oil Transesterification. Songklanakarin Journal of Science and Technology, 28, 791-802.</mixed-citation></ref><ref id="scirp.101703-ref16"><label>16</label><mixed-citation publication-type="other" xlink:type="simple">Thangaraj, B., Solomon, P.R., Muniyandi, B., Ranganathan, S. and Lin, L. (2019) Catalysis in Biodiesel Production—A Review. Clean Energy, 3, 2-23. https://doi.org/10.1093/ce/zky020</mixed-citation></ref><ref id="scirp.101703-ref17"><label>17</label><mixed-citation publication-type="other" xlink:type="simple">Manash, J.B., Ankur, D., Valentina, D., Borah, M.J., Das, A., Das, V., Bhagan, N. and Daka, D. (2019) Catalyst Low Cost Heterogeneous Catalyst from Waste Egg Shell. Fuel, 242, 345-354. https://doi.org/10.1016/j.fuel.2019.01.060</mixed-citation></ref><ref id="scirp.101703-ref18"><label>18</label><mixed-citation publication-type="other" xlink:type="simple">Mjalli, F.S. and Hussain, M.A. (2009) Approximate Predictive versus Self-Tuning Adaptive Control Strategies of Biodiesel Reactors. Industrial &amp; Engineering Chemistry Research, 48, 11034-11047. https://doi.org/10.1021/ie900930k</mixed-citation></ref><ref id="scirp.101703-ref19"><label>19</label><mixed-citation publication-type="other" xlink:type="simple">Okullo, A.A. and Temu, A.K. (2015) Modelling the Kinetics of Jatropha Oil Transesterification. Energy and Power Engineering, 7, 135-143. https://doi.org/10.4236/epe.2015.74013</mixed-citation></ref><ref id="scirp.101703-ref20"><label>20</label><mixed-citation publication-type="other" xlink:type="simple">Olufemi, A.S. and Ogbeide, S.E. (2017) Dynamics and Control System Design for Biodiesel Transesterification Reactor. International Robotics &amp; Automation Journal, 2, 1-6. https://doi.org/10.15406/iratj.2017.02.00036</mixed-citation></ref><ref id="scirp.101703-ref21"><label>21</label><mixed-citation publication-type="other" xlink:type="simple">Claire, M. (2008) Evaluation of Heterogeneous Catalysts for Biodiesel Production. PhD Thesis, School of Chemical Engineering and Advanced Materials, Newcastle University, Newcastle upon Tyne, 6-12.</mixed-citation></ref><ref id="scirp.101703-ref22"><label>22</label><mixed-citation publication-type="other" xlink:type="simple">Lin, V.S., Cai, Y., Kern, C., Dulebohn, J.I. and Nieweg, J.A. (2009) Solid Catalyst System for Biodiesel Production. Patent No. WO2009058324 A1, Univ. Iowa State Res. Found Inc., Iowa.</mixed-citation></ref><ref id="scirp.101703-ref23"><label>23</label><mixed-citation publication-type="other" xlink:type="simple">Darnoko, D. and Cheryan, M. (2000) Kinetics of Palm Oil Transesterification in a Batch Reactor. Journal of American Oil Chemical Society, 77, 1263-1267. https://doi.org/10.1007/s11746-000-0198-y</mixed-citation></ref><ref id="scirp.101703-ref24"><label>24</label><mixed-citation publication-type="other" xlink:type="simple">Tan, Y.H., Abdullah, M.O., Hipolito, C.N. and Taufiq-Yap, Y.H. (2015) Waste Ostrich and Chicken Eggshells as Heterogeneous Base Catalyst for Biodiesel Production from Used Cooking Oil: Catalyst Characterization and Biodiesel Yield Performance. Applied Energy, 160, 58-70. https://doi.org/10.1016/j.apenergy.2015.09.023</mixed-citation></ref><ref id="scirp.101703-ref25"><label>25</label><mixed-citation publication-type="other" xlink:type="simple">Luyben, W.L. (1990) Process Modeling, Simulation and Control for Chemical Engineers. 2nd Edition, McGraw-Hill Publishing Company, Singapore.</mixed-citation></ref><ref id="scirp.101703-ref26"><label>26</label><mixed-citation publication-type="other" xlink:type="simple">Vicente, G., Martinez, M., Aracil, J. and Estaban, A. (2005) Kinetics of Sunflower Oil Methanolysis. Industrial Engineering Chemistry Research, 44, 5447-5454. https://doi.org/10.1021/ie040208j</mixed-citation></ref><ref id="scirp.101703-ref27"><label>27</label><mixed-citation publication-type="other" xlink:type="simple">Yusuff, A.S., Ekwonu, M.C., Ajala, I., Adeyi, A.A. and Awofolaju, T.T. (2014) Modelling and Simulation of Transesterification Reaction in a Batch Reactor. Journal of Bioprocessing and Chemical Engineering, 1, 1-5. https://doi.org/10.1155/2014/42640</mixed-citation></ref></ref-list></back></article>