You are on page 1of 7

Proceedings of international conference on modeling, optimizing and computing (ICMOC 2012)


Ajoy John1 and G. Glan Devadhas2
II M.E. Control and Instrumentation, Noorul Islam University, Kumaracoil
Asso. Professor & HOD, Dept of E&IE, Noorul Islam University, Kumaracoil

Abstract- This paper presents a development of substantially with operating conditions caused due to the non
temperature control of Continuous Stirred Tank Reactor linearity of the CSTR. In this case, different sets of controller
(CSTR) by using a Fuzzy Self-Tuned PID controller. parameters should be used for different operating condition,
CSTR is a highly non-linear process. The reactor has two or, otherwise nonlinear control such as self tuning control
uncertain parameters for a reacting mixture, the should be used. Recently, fuzzy logic control has been
concentration and the temperature. A 2 nd order transfer actively researched and utilized such as fuzzy-PID controller
function has been obtained as the mathematical model of by combining the merits of fuzzy and conventional, self-
the reactor. The temperature control of CSTR using this tuning fuzzy linear control to improve the robustness and
controller overcomes the appearance of nonlinearities and hybrid control of fuzzy and PID. This paper presents the
uncertainties in the systems. The Fuzzy self-tuned PID development of such a temperature control of CSTR by using
controller is the combination of a classical PID and fuzzy this fuzzy self-tuned PID controller to overcome the
controller. It is implemented for controller design for the appearance of nonlinearities and uncertainties in the systems.
Keywords – Continuous Stirred Tank Reactor The temperature profile follows a hysteretic
(CSTR), Fuzzy System, Fuzzy Self Tuned PID Controller, characteristic. Many types of strategies and methods to handle
PID Controller these processes are being studied and developed. In an
implementation and comparative study of fuzzy logic based
intelligent control and the conventional Proportional, Integral
1. INTRODUCTION and Derivative (PID) control in a real time [1], it was found
that fuzzy PI + fuzzy PD controller outperforms the fuzzy PD
The Continuous Stirred-Tank Reactor (CSTR), is a and also the conventional PID controllers. The combination of
common ideal reactor type in chemical engineering. The PID and fuzzy control were put forward and a fuzzy self-
dynamic behavior of a CSTR can be described by mass, adjusting PID controller [2] for heater system was developed.
component and energy balance equations. The mathematical
model of this particular CSTR is described by the set of two 2. CONTINUOUS STIRRED-TANK REACTOR
nonlinear Ordinary Differential Equations (ODEs) which are
constructed with the use of material and heat balances. In Figure 1 shows a schematic of the CSTR. The
improving the performance of the CSTR, a suitable controller reactor vessel volume is V. An agitator is used to make the
is required. An important step in designing a control strategy reactor contents be well mixed. The inlet reactant with feed
is proper modeling of the system to be controlled. An exact rate F, concentration CAi and temperature Ti is fed from the
system model should produce output responses similar to the top of the vessel. The product stream is gathered at the exit. If
actual system. The complexity of most physical systems, the reactor contents are perfectly mixed, then the
however, meets any difficulties in developing the exact compositions are uniform everywhere in the reactor and the
models. In case the model and parameters are unknown, product stream is at the same concentration as the mixture in
appropriate techniques can be applied to overcome those the reactor. In other words, the composition concentration CA
limitations. and temperature T at which reaction takes place are the same
Generally, standard PID algorithms with fixed as the composition concentration and temperature of any exit
parameters may perform poorly when the process gain varies stream. Therefore, progress of reaction can be monitored by

Proceedings of international conference on modeling, optimizing and computing (ICMOC 2012)

observing the product stream concentration CA and the reactor T 0.035s 1

temperature T. 1.294 [6]
Fi 0.052 s 2 1.052s 1


The PID controller encapsulates three of the most

important controller structures in a single package.

Figure 1. Schematic diagram of a CSTR

Developing a mathematical model of the nonlinear Figure 2. Parallel Form or PID Cotroller
system is necessary for the analysis and simulation of the
system response. For this CSTR a simple exothermic reaction The parallel form of a PID controller (Figure 2) has transfer
in considered where A B takes place. In the reactor the function:
temperature is cooled by a coolent flow in the jacket around
the reactor. From the three fundamental quantities we derive
C s Kp 1 Td s [7 ]
the model equations as Ti s

Change in Volume The proportional term in the controller generally

dV helps in establishing system stability and improving the
Fi F [1]
dt transient response while the derivative term is often used
Change in Concentration when it is necessary to improve the closed loop response
dC A Fi E speed even further. Conceptually the effect of the derivative
C Ai C A k0 e RT
cA [ 2] term is to feed information on the rate of change of the
dt V
measured variable into the controller action.
Change in Temperature
dT Fi Hr E Q The most important term in the controller is the
Ti T k0e RT
cA [3]
dt V cP c pV integrator term that introduces a pole at s = 0 in the forward
Where, loop of the process. This makes the compensated open loop
E system (i.e. original system plus PID controller) a type 1
r k0e cA [ 4] system at least; our knowledge of steady state errors tells us
By linearizing the non linear system we obtain a that such systems are required for perfect steady state setpoint
pseudo first order transfer function By substituting the tracking. This is more formally stated in the following
parametric values mentioned in Table 1 we get the equations theorem
CA 0.0668s 1 The rules designed are based on the characteristic of
0.00696 [5] the chemical process tank and properties of the PID
Fi 0.052 s 2 1.052 s 1
controller. Therefore, the fuzzy reasoning of fuzzy sets of
Temperature: outputs is gained by aggregation operation of fuzzy sets

Proceedings of international conference on modeling, optimizing and computing (ICMOC 2012)

inputs and the designed fuzzy rules. The aggregation and The membership functions of these inputs fuzzy sets
defuzzification method are used respectively max-min and are shown in Figure 4 and 5. The linguistic variable levels are
centroid method. assigned as NB: negative big; NS: negative small; ZE: zero;
Regarding to the fuzzy structure, there are two inputs PS: positive small; PB: positive big. These levels are chosen
to fuzzy inference: error e(t) and derivative of error de(t), and from the characteristics and specification of the chemical
three outputs for each PID controller parameters respectively process tank. The ranges of these inputs are from -0.1 to 0.1,
K’p, K’i and K’d. Mamdani model is applied as structure of which are obtained from the absolute value of the system
fuzzy inference with some modification to obtain the best error and its derivative through the gains,
value for Kp, Ki and Kd .

Figure 4. Membership function of e(t)

Figure 3. Fuzzy Inference block

Suppose the variable ranges of the parameters Kp, Ki

and Kp of PID controller are respectively [Kp min, Kp max][Ki
min, Ki max][Kd min, Kd max]. The range of each parameter was
determined based on the simulation on PID controller to Figure 5. Membership function of de(t)
obtain a feasible rule bases with high inference efficiency.
The range of each parameters are,[Kp‟ [10, 100], Ki‟ [0.01,
1], Kd‟ [0.001, 0.01]] . Therefore, they can be calibrated over Whereas the membership functions of outputs K’p,
the interval [0, 1] as follows: K’i and K’d, are shown in Figure 6. The linguistic levels of
these outputs are assigned as S: small; MS: medium small; M:
medium; MB: medium big; B: big, where the ranges from 0 to
Kp K p min K p 10
[8] 1.
K p max K p min 100 10

K i K i min K p 0.01
K i max K i min 1 0.01

K d K d min K d 0.001 Figure 6. Membership Function of Kp', Ki', Kd'

K d max K d min 0.01 0.001
Generally, the fuzzy rules are depended on the plant
to be controlled and the type of the controller and from
Hence, obtain:
practical experience. Regarding to the above fuzzy sets of the
Kp 90K p 10 [11] inputs and outputs variables, the fuzzy rules are perform in
Ki 0.9 K i 0.1 [12] rules table as shown in Table 2 and composed as follows:
Kd 0.009 K d 0.001 [13] Rule i: If e(t) is A1i and de(t) A2i then Kp Bi and
Ki Ci and K d Di .

Proceedings of international conference on modeling, optimizing and computing (ICMOC 2012)

Where i= 1, 2, 3,..., n, and n is number of rules. 5. RESULTS

From the table, since we have 5 variables as input and 5
variables as output, hence, in the design we have 25 fuzzy In this paper, the control of temperature by using
rules. concentration at output as feedback has been simulated. The
control objective in this simulation-based work was to
maintain the CSTR at steady state operating point. Fuzzy self-
STRUCTURE OF FUZZY CONTROLLER tuned controller was applied to tune the value of Kp, Ki and
Fuzzy logic controller as shown in Figure 7 consists Kd of the PID controller. The system responses indicate the
of main four parts fuzzification, rule base, inference engine performance of the chemical process was improved and
and defuzzification. satisfied compare to conventional PID controller. The results
are shown in figure in the following sections. The tank is
considered to be well stirred, which implies that the
temperature of the effluent is equal to the temperature of the
liquid in the tank. Our aim is to keep the effluent temperature
T and concentration at a desired value which has been


Figure 7. FUZZY Logic control block


Self-tuning fuzzy PID controller means that the three
parameters Kp, Ki and Kp of PID controller are tuned by
using fuzzy tuner. The coefficients of the conventional PID
controller are not often properly tuned for the nonlinear plant
with unpredictable parameter variations. Hence, it is
necessary to automatically tune the PID parameters. The Figure 9. Comparison between Outputs Of Linearized TF And Actual
structure of the fuzzy self-tuned PID controller is shown in Nonlinear Equations

Figure 8.

Figure 10. Internal Structure Of CSTR

Figure 8. Structure of a fuzzy self tuned PID control

Where e(t) is the error between desired position set

point and the output, de(t) is the derivation of error. The PID
parameters are tuned by using fuzzy inference, which provide
a nonlinear mapping from the error and derivation of error to
PID parameters.

Proceedings of international conference on modeling, optimizing and computing (ICMOC 2012)


Figure 14. Simulink Block Of The System And Control Block

Figure 11. Concentration Curve Between Linear And Nonlinear System

From the graph we can conclude the difference in

response of a linearized process and an implementation of
direct non linear equation.
Figure 15- Simulink Block Of Fuzzy PID Regulator


TEMPERATURE TRANSFER FUNCTION The value of parameter Kp, Ki and Kd are tuned by
using signals from fuzzy logic block based on the changes in
the error between reference signals and output signals. In
order to perform the output of the system, two types of input
signal are applied respectively step input and square wave

The outputs of the simulation for both inputs are

represented in Figure 16 and 17 below.

Figure 12. Simulink For Temperature Transfer Function With And

Without PID Controller

Figure 16- Output with PID Controller

Figure 13. Step Response For Temperature Transfer Function With And
Without PID Controller
Here the step response obtained is a negative going curve
since the gain is a negative value. A small overshoot is
obtained here and it can be observed in the graph.
Figure 17- Output with Fuzzy PID Controller for square input

Proceedings of international conference on modeling, optimizing and computing (ICMOC 2012)

TCo Inlet Coolant Temperature 350 K

H Heat of Reaction -2 105 cal/mol
6. CONCLUSION Cp, Cpc Specific heats 1 cal/gK
, c Liquid Densities 1 103 g/l
Modeling was done on the CSTR and fuzzy self-tuned CAi Inlet feed Concentration 1 mol/l
PID controller was proposed successfully. In mathematical ha Heat Transfer Coffecient 7 105 cal
Steady State Outlet Concentration =0.1 mol/L
modeling, Taylor series was employed to obtain the linear
Steady state output temperature = 438.544K
discrete model of the reactor system. Fuzzy Self-Tuned Flow rate of coolent = 103.406l/min
controller was applied to tune the value of Kp, Ki and Kd of
Table 2
the PID controller. Through some simulation tests on the
Rules of fuzzy inference
system by using square wave signals and step input signals.
The system responses indicate the control of the temperature
system was improved and satisfied compare to conventional
PID controller. NB S S MS MS M

Constant Parameters ZE MS MS M MB MB
Table 1
Parameters for steady state CSTR PS MS M MB MB B

Variable Description Nominal value PB M MB MB B B

The linguistic variable levels are assigned as
Fi Process flow Rate 100 l/min
NB: negative big;
V Reactor Volume 100 l
NS: negative small;
k Reaction Rate Constant 7.2 1010 l/min ZE: zero;
E/R Activation Energy 1 104 K PS: positive small;
T0 Feed Temperature 350 K PB: positive big.

[1] Kumar V.; Rana K.P.S.,“Real time comparative study of [5] K. Liu and EL. Lewis „Robust Control of a Continuous
the performance of FPGA based PID and fuzzy controllers for Stirred-Tank Reactor‟ Proceedings of the American Control
a rectilinear plant.” 2010 India International Conference (Jan. Conference Maryland, June 1994.
2011) [5] Emad Ali „Control of Non-linear Chemical Processes
[2]Zhao Xin; Liu Jinhao; Wang Dian; “Design and Using Adaptive PI Algorithms‟ .
Simulation of Fuzzy Self-Adjusting PID Controller” [6] Isin Erenoglu, Ibrahim Eksin, Engin Yesil, Mujde
Computing, Control and Industrial Engineering (CCIE), 2010 Guzelkaya “An Intelligent Hybrid Fuzzy Pid Controller”
International Conference (June 2010).
[3]Rahul Upadhyay and Rajesh Singla, „Analysis of CSTR
Temperature Control with Adaptive and PID Controller (A [7] Suja Malar R.M.& Thyagaraajan T.“Modelling of
Comparative Study), IACSIT International Journal of Continuous Tank Reactor Using Artificial Intelligence
Engineering and Technology.(October 2010) Techniques.”
[4]G. Glan Devadhas1 and S. Pushpakumar2 “An Intelligent [8] P.Dorsal, M. Bakosava and V. Bobal “An Approach to
Design for a Continuous Stirred Tank Reactor” World Adaptive Control of a CSTR” October 2002, Chemical Paper
Applied Science Journal, 2011 2004.

Proceedings of international conference on modeling, optimizing and computing (ICMOC 2012)

[9] Homayoun Seraji “A New Class of Nonlinear PID

[10] Zhen-Yu Zhao1, Masayoshi Tomizuka2, Satoru Isaka3
“Fuzzy Gain Scheduling Of PID Controllers” IEEE
Transactions On Systems, Man, And Cybernetics.
September/October 1993. [11] Gregor Gregorcicaa and
Gordon Lightbodyb “Nonlinear Model-Based Control of
Highly Nonlinear Processes” (2010)
[12] Yonghong Tan and Xuanju Dang Achiel Van
Cauwenberghe “Generalized Nonlinear PID Controller Based
On Neural Networks”
[13] Rajani K. Mudia1, Chanchal Dey2, Tsu-Tian Lee3 “An
improved auto-tuning scheme for PI controllers” ISA
Transactions (2008)