Professional Documents
Culture Documents
Control System Design For Continuous Sti PDF
Control System Design For Continuous Sti PDF
by :
Ahmed Babiker Ahmed
Hashim Ahmed Edress
Khalid Osman Mohammed
July 2016
Control System Design for Continuous Stirred
Tank Reactor Using Matlab Simulink
by :
Ahmed Babiker Ahmed
Hashim Ahmed Edress
Khalid Osman Mohammed
July 2016
DEDICATION
beloved mothers
ii
ACKNOWLEDGMENT
iii
Abstract
The temperature of the continuous stirred tank reactor (CSTR) is controlled in three
configurations (feedback, feed forward and cascade). For each type of the control systems
the controllers used was tuned and its optimum parameters were calculated. For the
feedback control system in particular, the proportional integral derivative controller (PID)
was selected other than the proportional (P) and the proportional integral (PI) controllers.
Also for each configuration a stability analysis is made using (Bode, Nyquist and
root-locus) criterions.
A selection for recommended control design has been taken on the output response
of the systems as well as the stability for each system.
iv
Table of contents
Dedication i
Acknowledgement ii
Abstract iii
Table of contents iv
List of tables vi
List of figures vii
vi
List of Tables
Table Page
Contents
No. No.
Zigler-Nichols tuning using the oscillation method
Routh criteria
Routh-Hurwitz criteria
vii
List of Figures
Figure Page
Contents
No. No.
PID action (1)
viii
rood locus of the feedback system
ix
Chapter 1. Introduction
1
Continuous stirred-tank reactor model (CSTR)
In a CSTR, one or more fluid reagents are introduced into a tank reactor equipped
with an impeller (An impeller is a rotating component or a pump) while the reactor
effluent is removed, the impeller stirs the reagents to ensure proper mixing. Simply
dividing the volume of the tank by the average volumetric flow rate through the tank gives
the residence time.
At steady-state, the flow rate in must equal the mass flow rate out, otherwise the
tank will overflow or go empty (transient state). While the reactor is in a transient state the
model equation must be derived from the differential mass and energy balances.
All calculations performed with CSTRs assume perfect mixing.
2
The model must be exact (including dynamics and nonlinearities).
All instruments in the loop must be perfectly calibrated.
Disturbances other than the feed forward variable are not controlled.
Cascade control system
A cascade control system is a multiple-loop system where the primary variable is
controlled by adjusting the set point of a related secondary variable controller. The
secondary variable then affects the primary variable through the process.
The primary objectives in cascade control is to divide an otherwise difficult to
control process, into two portions, whereby a secondary control loop is formed around a
major disturbances thus leaving only minor disturbances to be controlled by the primary
controller.
The advantages of cascade control are all somewhat interrelated. They include:
Better control of the primary variable.
Primary variable less affected by disturbances.
Faster recovery from disturbances.
Improve dynamic performance.
Provide limits on the secondary variable.
PID Control
What is a PID control:
Proportional + Integral + Derivative (PID).
Popular in the industry.
By 1989, more than 90% PID.
Easy to implement.
It is quite robust.
Applies to mechanical systems.
Predominantly 2nd-order systems:
Tuning algorithms not dependent on exact system model.
Two popular tuning techniques.
Step reaction curve experiment.
Closed-loop “cycling” experiment under proportional control around the nominal
operating point.
3
Fig 1.1 PID action (1)
∫ ̇
( ) ( ) ( ) ( )
( ) ( ) ( )
( )
( )
( )
Equivalently,
Let:
( ∫ ̇
( ) ( ) ( )
( )
( ) ) ( )
( )
4
Fig 1. PID action ( )
Objectives
There are some objectives need to be achieved in order to accomplish this project. These
objectives will act as a guide and will restrict the system to be implemented for certain situations.
5
Chapter 2. Mathematical model
Approach
To investigate how the behavior of a chemical process change with time under the
influence of changes in the external disturbances and manipulated variables and
consequently design an appropriate controller, we can use two different approaches.
Experimental approach
In this case the physical equipment of the chemical process is available to us.
Consequently , we change deliberately the values of various inputs (disturbances,
manipulated variables) and through appropriate measuring devices we observe.
How the outputs (temperature, pressure, concentration) of the chemical processes
changes with time. Such a procedure is time and effort consuming and it's usually quite
costly because a large number of such experiments must be performed.
Theoretical approach
It is quite often the case that we have to design the control system for a chemical
process before the process has been constructed. In such a case we cannot rely on the
experimental procedure, and we need a different represented of the chemical process in
order to study its dynamic behavior. This representation is usually given in terms of a set
of mathematical equations (differential, algebraic) whose solution yields the dynamic or
static behavior of the chemical process we examine.
6
Often when engineers analyze a system to be controlled or optimized, they use a
mathematical model. In analysis, engineers can build a descriptive model of the system as
a hypothesis of how the system could work, or try to estimate how and unforeseeable even
could affect the system. Similarly, in control of a system, engineers can try out different
control approaches in simulations.
A mathematical model usually describes a system by a set of variables and a set of
equations that establish relationships between the variables. The values of the variables
can be practically anything; real or integer numbers, Boolean values or strings, for
example. The variables represent some properties of the system, for example, measured
system outputs often in the form of signals, timing data, counters, event occurrence
(yes/no). The actual model is the set of functions that describe the relations between the
different variables.
7
Static vs. dynamic
A static model does not account for the element of time, while a dynamic model
does. Dynamic models typically are represented with difference equations or differential
equations.
A+B R
Input energy – output energy + heat provided by steam = rate of change of energy
( )
( )
8
( )
But
Also put
( )
Let
( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( )
The coefficient of Ms(s) represents the process transfer function (Gp) also the
coefficient of Tf(s) represents the load transfer function (Gd).
For our process we have found that
( )
( )
9
Temperature sensors
The most common are the thermocouples, resistance bulb thermometers and
thermistors. All provide measurements in terms of electrical signals .The temperature
sensing elements is always inside the thermo-well figure (2.2).
We assume that the major resistance to heat transfer is located outside the
thermowell casing. In such a case we have a single capacity with resistance and it is
modeled by a first order system.
( )
11
the value of the manipulated variable. We have chosen the final control element (valve) to
have a first-order response.
( )
11
Chapter 3. Design of control system
The temperature T is the controlled output, while the inlet temperature Tf, mf, is
the load and the coolant is the manipulated variable.
The transfer functions for each component of the feedback loop as illustrated in
Chapter 2 are
The process transfer function=
( )
( )
( )
( )
12
The feedback control action measures the value of the output (temperature)using
the temperature measuring device (thermo-couple), then compares this value with the
desired value (set point) and supplies the deviation signal to the valve which in turn
changes the value f the manipulated variable (coolant). The block diagram of this control
action is shown in figure (3.2) below:
Controller tuning
One of the traditional ways to design controller parameters was to use empirical
tuning rules based on measurements made on the real plant. We suggest that it is
preferable for the controller designer to employ model-based techniques. And one of best
techniques is Ziegler-Nichols method.
This criteria depends on setting the plant under proportional controller and calculating
the ultimate gain (ku) and the ultimate period (Pu) which leads to continuous oscillation.
Then we adjust the controller parameters according to the table developing by
Ziegler-Nichols shown below:
13
We will use Routh criteria to calculate the ultimate gain and period from the
characteristics equation of the feedback configuration.
The transfer functions of the feedback control loop:
( ) ( )
( ) ( )
( )
( )( )
( )
( )( )( )
( ) ( )
( ) ( )( )( )
( ) ( )
( ) ( ) ( )
Then the characteristic equation is:
( ) ( )
Where
( )( ) ( )( )
( )( )
14
In order for the system to be critically stable (continuous oscillation) the first
elements in this third row (A ) must be equal to zero.
Thus:
To find he ultimate period, we must first calculate the ultimate frequency ωu:
From the second row we have:
( )
( )
P
PI
PID
We want to select from the three controllers above
Proportional controller
15
The output of the closed loop using P controller due to step change in the set point is
recorded and graphed using MATLAB and illustrated below
Amplitude
t
Figure 3.4 output response of the system using P controller
Again the output of the closed loop using PI controller due to step change in the set
point is recorded and graphed using MATLAP and illustrate below
16
Amplitude
t
Figure 3.6 output response of the system using PI controller
Also the output of the closed loop using PID controller due to step change in the
set point is recorded and graphed using MALTAB, and illustrate in figure (3.8).
17
Amplitude
t
Figure 3.8 output response of the system using PID controller
Comment
The proportional controller alone accelerates the response of the controller process
(response time = 510 sec), but it produces a considerable offset (0.7).
The proportional integral controller completely eliminates the offset, this
elimination of the offset usually comes at the expense of higher maximum deviation
(maximum deviation = 0.7), it also produces sluggish long oscillation response (response
time = 770 sec).
The proportional integral derivative controller produces a fast response time
(response time = ), and completely eliminating the offset. Thus the proportional
integral derivative controller is recommended.
The above result is acceptable, because; we have two rather slow processes: a heat
transfer between the reacting mixture and the temperature sensor, and heat transfer form
coolant water to the reacting mixture. We expert, therefore, that the overall response will
be rather sluggish and a PI controller will make it even more. Consequently, for such
system a PID controller would be the most appropriate, because it can allow high gains for
faster response without any offset.
18
3.2 Design of feed forward control system
A feed forward control system uses a different approach than the conventional
feedback control system. It measures the temperature of the inlet reactants and adjusts
appropriately the coolant amount. Figure (3.9) shows the feed forward control
configuration. Thus it measures the disturbance directly and then it anticipates the effect it
will have on the process output.
Subsequently, it changes the manipulated variable by such an amount as to
eliminate completely the impact of the disturbance on process output.
The feed forward loop measures the disturbance directly and then it anticipate the
effect it will have on the process output. Subsequently , it changes the manipulated
variable by such an amount as to eliminate completely the impact of the disturbance on the
process output, the block diagram of this control action is shown in figure below
19
In feed forward system the feedforward controller cannot be a conventional
feedback controller (P,PI, and PID). Instead, it should be viewed as a special purpose
computing machine. This is the reason it is sometimes referred to as a feedforward
computer.
Now we have to determine the transfer function of the controller and the set point.
Referred to (Gc,Gsp) respectively.
We can easily show that:
( ) ( ) ( ) ( ) ( )
The design transfer function Gc and Gsp can now be identified by the following two
requirements
Distribute rejection
The controller should be capable of completely eliminating the impact of a
disturbance change on the process output. This implies that the coefficient of d(s) should
be zero:
Or
Set pointtracking
The control mechanism should be capable of making the process output track
exactly any change in the set point (i.e. (s) = Ysp(s)).
( ) ( )
( )
or
( )
And finally,
21
( )
And
( )( )( )
( )( )
( )
We notice that the controller transfer function can be arranged to the form of PID
controller as
( )( )
( )
The output of the feed forward control system due to step change in the load
variable is recorded and graphed using MALTAB, and illustrated in figure (3.12) below
21
Amplitude
t
Figure 3.12 output response of feed forward system
22
We have a process consisting of two parts:
Process I (primary) has as its output the variable we want to control.
Process II (secondary) has an output that we are not interested in controlling but
which effects the output we want to control.
For the CSTR system process I is the reaction in the tank and the controller output
is the temperature T. Process II is the jacket and its output effects process I.
The purpose of the slave loop is to correct for all outside disturbances. Without
allowing them to effect the reaction temperature, thus the cascade loop will not function
properly If the master is faster than the slave. Therefore, the measuring and the final
control elements in the secondary loop is considered to be a zero order transfer function.
The block diagram of this control action is shown in figure (3.14) below
Controlling tuning
We are again going to use Ziegler-Nicols to find the parameters of the proportional
controller in the secondary loop.
After some modifications in the secondary loop in block diagram of figure (3.14),
it becomes
23
The transfer function
( ) ( )
( ) ( )
( )
( )
( )( )
( )
( )
( )( )( )
( ) ( )( )
( ) ( )( )( ) ( )
( ) ( )( )
( ) ( ) ( ) ( )
After we finish our analysis development for mathematical equation now start
analysis the system using Routh-Hurwitz criteria
Table Routh-Hurwitz criteria
S 0.023Kc
S 401.76+124Kc 1+1.61 Kc
S A 0.023Kc
S B
S 0.023Kc
Where
( )( )
( )
(
In order for the system to be critically stable (continuous oscillation) the first
element in the fourth row (B ) must be equal to zero.
( )( )
( )
(
24
And that leads Kc to have the following values:
From the above value of Kc we see that Routh criteria failed to specify the ultimate
gain because all values of Kc have a negative real parts.
To determine the proportional controller parameter we simulate the system for
different values of Kc using MATlAB we find that
25
Chapter 4. Stability analysis of the control system
( ) ( )
( ) ( )
( )
( )
( )( )
( )
( )
( )( )( )
( ) ( )( )
( ) ( )( )( ) ( )
26
After substituting the values of the above parameters:
( )
( )
Nyquist criteria
The Nyquist plot of the feedback transfer function is graphed using MALTAB and
shown in figure (4.2)
27
Figure 4.2 Nyquist plot of the feedback system
Since the Nyquist plot of a feedback system does not encircles the point (-1.0),
thus the system is stable according to Nyquist criterion.
4.1.3 Root locus criteria
Root locus plot of the feedback transfer function is graphed using MALTAB and
shown figure (4.3) below
( ) ( )( )
( ) ( ) ( ) ( )
28
The transfer function becomes:
( )
( )
Nyquist criteria
Also the Nyquist plot of a cascade system does not encircle the point (-1,0), therefore,
the system is stable in sense of Nyquist criteria.
29
A gain, the cascade system cannot go unstable, since the roots of the characteristics
equations cannot have positive real parts (i.e., root locus plot does not cross the imaginary
axis).
31
Chapter 5. Summary and Conclusion
Summary
The mathematical model of the CSTR
The transfer function of the CSTR:
0.503 1
Gp , Gd
12.4S 1 12.4S 1
The transfer function of the final control element (valve)
10
Gf
30S 1
The transfer function of the measuring element
10
Gm
10S 1
The tuned controllers of the CSTR
Feedback controller
0.0045
Gc 0.122 0.82S
S
Feed forward controller
0.02
Gc S (0.8 6S )
S
Cascade controller
Master controller (Gc) = 0.122+
Slave controller Gc = 27
. Recommended design configuration
The physical diagram
31
Figure 5.1 cascade control of CSTR
32
Figure 5.3 Bode plot of the cascade system
Nyquist plot
33
Root locus plot
Conclusion
From preceding chapters, we designed three control systems for our CSTR. The
stability for each design has been investigated with the aid of some criterions.
We studied in this research the behavior and control method s for CSTR by using
deferent feedback controllers (P,PI,PID) , the comparison between three controllers was
investigated and we found that the PID controller has the best response.
In this chapter we are going to select the most appropriate design for our CSTR.
Our selection is based on the output response as well as the stability of each system.
The three control systems (feedback, feed forward and cascade) which are
designed before are considered to be stable according to (Bode, Nyquist and Root- locus)
criterion. Therefore the selection of the recommended system is going to be restricted to
the output response of the system.
The comparison between the output responses of the systems is shown in table
34
Table comparison between the output responses
The offset
Maximum deviation
From table (5.1) it is seen that the feedback control system produces a long response
time with a considerable oscillation.
Although the feed forward control has a faster response time compared to the
feedback control system, it produces a considerable offset a large overshoot.
35
References:
Smith, R.M (2005) Chemical Process: Design and Integration, John Wiley & Sons,
chichester.
36
Appendix
Symbol Meaning
mf Input mass kg
tf Feed temperature k
T Out temperature k
m Output mass kg
Ms Mass of fluid
B Water
R Out put
Kp Proportional gain
Ki Integral gain
Kd Derivative gain
Kc Critical gain
G Gain coefficient
Ts Setting time
tp Peak time
Td Delay time
ωn Angular frequency
ωu Ultimate frequency
V Valve
37
C Controller
P Process
M Measuring element
S Laplace variable
38