Professional Documents
Culture Documents
M.A. Hakeem,* Mohd. Masroor Ali, Richa Singhal and Syed Sadiq Ali
Department of Chemical Engineering, Aligarh Muslim University, Aligarh - 202 002, India
Abstract: In the present work, fuzzy logic (FL) has been used to model the performance
of a batch reactor system and, hence, the conversion profile at varying operating
conditions. The transient temperature vs. time data of exothermic reaction was taken from
open literature [1] for modelling with FL. The FL model with properly chosen fuzzy
sets, type of membership function and rule base relate time with temperature very well
in the reactor under experimental condition. The simulated result through FL model was
compared with experimental findings, mathematical model and artificial neural network
(ANN) model. The FL model predictions were found to be in very good agreement with
experimental findings with average absolute error less than 1%.
Introduction
Fuzzy logic (FL) is a comparatively new science that can be used to model and control
a wide range of operations. FL provides a simple way to arrive at a definite conclusion
based upon vague, ambiguous, imprecise, noisy, or missing input information. It is one
of the most innovative, active and fruitful areas of research for science and engineering
applications, especially in the field of industrial processes [2, 3]. It has a variety of
applications starting from household appliances like washing machines and refrigerators
to industrial automation and control [4-9]. A number of applications of FL in process
control and modelling can be found in the literature [10-15].
Batch reactors are widely used in the chemical industry. They are prefered when
relatively small amount of mass is to be processed with high product quality. However,
depending upon the reaction kinetics and its heat effect the performance equations are
highly nonlinear. The dynamic study of batch reactors helps in proper understanding of
temperature and concentration profiles in the reactor, which results in its smooth
functioning. Various modelling techniques aid in the comprehension of the system dynamics.
The primary approach can be the use of first principle model, which is based on mass
and energy balance around the system.
The data were taken from the experimental set-up [1], which consisted of a covered
cylindrical stainless steel (SS) vessel with magnetic stirrer and baffles, to maintain uniformity
of the condition inside the reactor. A SS tube, bent in the form of a helical coil, was
provided inside the vessel to facilitate cooling of the reaction media inside the vessel. The
cooling water, supplied from an overhead tank, was circulated through the helical coil
during the experiments to take out the exothermic reaction heat. The set-up was fitted with
valves to manipulate the cooling water flow-rate, whenever necessary. It was also equipped
with thermocouples (copper-constantan) to measure the temperature inside the reaction
vessel. Acid catalysed hydrolysis of acetic anhydride in the presence of solvent acetic
acid was chosen as the reaction system
H 2SO 4
(CH 3 CO) 2 O + H 2 O 2 CH 3 COOH
The reaction system was found to obey the pseudo-first order kinetics with respect to
acetic anhydride [1, 16]. The transient temperature vs. time data for step changes in
coolant flow rate for the above system was taken from open literature [1]. The reactor
details and operating data are shown in Tables 1 and 2.
The experimental result was compared with the artificial neural network (ANN) model
having network structure 1-3-3-3-1 first corresponding to input layer having one neuron
since time was an input. Three hidden layers each havd three neurons. The output layer
had one neuron related to temperature of reaction mixtures. The number of data chosen
for training and testing of the network was 35 [1]. In the present work, the above-
mentioned reaction system was modelled using FL. The FL model for batch reactor was
developed in MATLAB 7.0 using Fuzzy Logic Toolbox and the authors own source code
using C language. The results of FL model were compared with experimental results. The
fuzzy results obtained from MATLAB and C program were also compared.
Mathematical Modelling
The mass and energy balance equations for a transient unsteady-state non-isothermal
batch reactor can be written as
dNA/dt = kNA = rA (1)
(VCp + Ws) dT/dt = ( H)rAV UA(T Tci) (2)
In the above model, the fluid properties are assumed to be constant. The heat transfer
to air is assumed to be negligible. The above equations were solved by RK method. RK stands for?
t1 t2 t3 t4 t5 t6 t7 t8 t9 t10
1.0
0.5
0.0
0 5 10 15 20
Input variable time (min)
Fig. 1. Membership functions for time for positive step change in coolant flow.
T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11
1.0
0.5
0.0
295 300 305 310 315 320
Output variable temperature (K)
Fig. 2. Membership functions for temperature for positive step change in coolant flow.
to T11 for the output variable (temperature in the reactor), with positive step change in
the coolant flow rate. Universe of discourse for each fuzzy set is self evident. Figures 3
and 4 show how the variable can be converted into fuzzy format and fuzzy output into
the simple numeric variable.
Degree of
membership
x1 x2
5 7.5 10 12.5 min
9 min
Fig. 3. Fuzzification of time t = 9 min.
T7 T9
a2
Degree of
a1
membership
h1 = 0.4 h2 = 0.6
b1 b2
For time (t = 9), the qualifying fuzzy sets are t4 and t5.
Fuzzy membership function at t = 9 min for fuzzy set t4
X1 =95=4
X2 = 10 9 = 1
Slope 1 = 1/2.5 = 0.4
Slope 2 = 1/2.5 = 0.4
Hence, if time is 9 min then reactor temperature is 312.83 K with positive step change in
the coolant flow rate.
Figures 5 and 6 show fuzzy sets for time and temperature in the reactor for negative
step change in the coolant flow rate. As before, at a particular value of time for negative
step input, fuzzified input and output can be determined from Figs. 5 and 6 and Table 4.
0.5
0.0
0 5 10 15
Input variable time (min)
Fig. 5. Membership functions for time for negative step change in coolant flow.
1.0
0.5
0.0
300 305 310 315 320 325 330 335 340
Output variable temperature (K)
Fig. 6. Membership functions for temperature for negative step change in coolant flow.
Rule 1 If time is t1 then Temperature is T1 Rule 13 If time is t10 then Temperature is T12
Rule 2 If time is t2 then Temperature is T2 Rule 14 If time is t10 then Temperature is T14
Rule 3 If time is t3 then Temperature is T3 Rule 15 If time is t11 then Temperature is T7
Rule 4 If time is t4 then Temperature is T4 Rule 16 If time is t11 then Temperature is T9
Rule 5 If time is t5 then Temperature is T4 Rule 17 If time is t11 then Temperature is T12
Rule 6 If time is t6 then Temperature is T5 Rule 18 If time is t12 then Temperature is T6
Rule 7 If time is t7 then Temperature is T6 Rule 19 If time is t12 then Temperature is T8
Rule 8 If time is t7 then Temperature is T7 Rule 20 If time is t13 then Temperature is T5
Rule 9 If time is t8 then Temperature is T8 Rule 21 If time is t14 then Temperature is T4
Rule 10 If time is t8 then Temperature is T10 Rule 22 If time is t15 then Temperature is T3
Rule 11 If time is t8 then Temperature is T11 Rule 23 If time is t16 then Temperature is T2
Rule 12 If time is t9 then Temperature is T15
The fuzzified output values were defuzzified using centroid method as discussed earlier.
For both positive and negative step changes, T values were obtained and compared with
experimental results. Also, error E was estimated by using
R R2
E = 2 100 (4)
R2
where R1 and R2 are results of T from experimental study and FL approach, respectively.
340
Experimental
Simulated
330
Temperature (K)
320
310
300
290
0 5 10 15 20
Time (min)
Fig. 7. Experimental and simulated temperature profile for positive step
change in coolant flow at 313.16K.
325
Experimental
Simulated
320
315
Temperature (K)
310
305
300
295
0 5 10 15 20 25
Time (min)
Fig. 8. Experimental and ANN simulated temperature profile for negative step
change in coolant flow at 313.16 K.
320
Experimental
MATLAB
315 C program
Temperature (K)
310
305
300
295
0 5 10 15 20 25
Time (min)
Fig. 9. Experimental and FL simulated temperature profile for positive step
change in coolant flow rate from 110 to 120 cc/min at 313.6 K.
340
Experimental
335
MATLAB
330 C program
325
Temperature (K)
320
315
310
305
305
300
295
0 5 10 15 20
Time (min)
Fig. 10. Experimental and FL simulated temperature profile for negative step
change in coolant flow rate from 120 to 110 cc/min at 313.6 K.
be under-predicting, which may be due to the assumptions made in the model. The ANN
predicted result did not exhibit perfect matching as that of Figs. 9 and 10. The mean
absolute deviarion (MAD) of the result shown in Fig. 9 were 0.28 and 0.34% for MATLAB
and C-code, respectively, while for Fig. 10 its values were 0.17 and 0.21%, respectively.
Conclusion
The fuzzy logic model developed for a batch reactor was successful as seen from
experimental results and had high accuracy levels. Therefore, this model can be used as
a reference model with various control strategies for the control of temperature in batch
reactor systems. Since both MATLAB and C program values were in close agreement with
experimental values, therefore, both techniques could be used in designing temperature
control depending on the ease and availability to the designer.
Nomenclature
( H) Heat of reaction, cals/g moles
A Area for heat transfer, m2
Cp Specific heat of reaction mixture, cals/g C
CG Centre of gravity
FL Fuzzy logic
k Pseudo first order rate constant, min1
NA Number of moles of component A at any time instant, g moles
rA Rate of reaction of component A, g moles/cm3 (time)
Table 5. Comparison between experimental data and the predicted result with FL
simulation on MATLAB platform and C program code
Positive step change (110-120 cc/min) Negative step change (120-110 cc/min)
T Temperature, K
t Time, min
Tc Inlet coolant Temperature, K
Texp Temperature of the reaction mixture measured experimentally, K
TFL Temperature of the reaction mixture simulated through FL, K
U Heat transfer coefficient, cals/m2 C
V Volume of reactants, cm3
WS Wall capacitance, cals/C
i = N (T TFL ) *100
MAD Mean absolute deviation, i =1 exp
Texp
Greek Symbols
Density of reaction mixture
t5 (t) Membership of variable t in the fuzzy set t5
References
1. Purohit, J.L., Jayakumar, N.S. and Shah, V.A., Modelling of Non-isothermal Batch Reactor,
CHEMCON, Ankeleshwar, Gujarat, India (2006).
2. Shekhan, S.R. and Pai, G.A.V., Neural Network, Fuzzy Logic and Genetic Algorithm: Synthesis
and Application, Prentice Hall of India (2003).
3. Driankow, D., Hellendoom, H. and Reinfrank, M., An Introduction to Fuzzy Control, Narosa
Publishing House, New Delhi, India (1996).
4. Juang, Y.T., Chang, Y.T. and Huang, C.P., Design of Fuzzy PID Controllers Using Modified
Triangular Membership Functions, Information Sciences, 178, pp. 1325-1333 (2008).
5. Vries, B.D., Steins, R.J., Assessing Working Condition Using Fuzzy Logic, Automation in
Construction, 17, pp. 584-591 (2008).
6. Chen, J., Roberts, C. and Weston, P., Fault Detection and Diagnostics for Railway Track
Circuits Using Neuro-Fuzzy Systems, Control Engineering Practice, 16, pp. 585-596 (2008).
7. Cheong, F. and Richard, L., Designing a Hierarchial Fuzzy Logic Controller Using the
Diffrential Evolution Approach, Applied Soft Computing, 7, pp. 481-490 (2007).
8. Unal, O. and Uygunoglu, T., A New Approach to Determination of Compressive Strength
of Fly Ash Concrete Using Fuzzy Logic, J. Scientific and Industrial Research, 65, pp. 894-
899 (2006).
9. Papageorgiou, E.I. and Groumpos, P.P., A New Hybrid Method Using Evolutionary Algorithms
to Train Fuzzy Cognitive Map, Applied Soft Computing, 5, pp. 409-431 (2005).
10. Tepeli, A. and Hortacsu, A., A Fuzzy Logic Approach for Regulation in Flux Balance
Analysis, Biochemical Engineering Journal, 39, pp. 137-148 (2008).
11. Guimaraes, A.C.F. and Lapa, C.M.F., Fuzzy FMEA Applied to PWR Chemical and Volume
Control System, Progress in Nuclear Energy, 44(3), pp. 191-213 (2004).
12. Tsekouras, G., Sarimveis, H., Raptis, C. and Bafas, G., A Fuzzy Logic Approach for the
Classification of Product Qualitative Characteristics, Computers and Chemical Engineering,
26, pp. 429-438 (2002).
13. Huang, H.J. and Wang, F.S., Fuzzy Decision Making Design of Chemical Plant Using Mixed
Integer Hybrid Differential Evolution, Computer and Chemical Engineering, 26, pp. 1649-
1660 (2002).
14. Uhrig, R.E. and Tsoukalas, L.H., Soft Computing Technologies in Nuclear Engineering
Applications, Progress in Nuclear Energy, 34(1), pp. 13-75 (1999).
15. Schmitz, G.P.J. and Aldrich, C., Neurofuzzy Modeling of Chemical Process Systems with
Ellipsoidal Radial Basis Function Networks and Genetic Algorithm, Computer and Chemical
Engineering, 22(Suppl.), pp. S1001-S1004 (1998).
16. Koskikallio, J., Pouli, D. and Whalley, E., Pressure Effect and Mechanism in Acid Catalysis
v. the Hydrolysis of Acetic Anhydride, Can. J. Chem., 37, pp. 1360-1366 (1959).