Dynamic Model of Non-Interacting Isothermal CSTR
Dynamic Model of Non-Interacting Isothermal CSTR
Dynamic Model of Non-Interacting Isothermal CSTR
Submitted by:
Anita P. Busilan
Theresa Lean Roma B. Tuliao
November 2015
Date Submitted
Table of Contents
Contents
Page
Chapter I: Introduction
1.1 Introduction
1.2 Objectives
1.3 Assumptions
10
11
16
Chapter V: Conclusion
27
References
28
Appendix
30
ii
Chapter I
Introduction
Chemical reactors are the most important part of a chemical plant. They form the heart of
the process where raw materials are converted into products. There are several types of stirred
reactors used in chemical or biochemical industry. Continuous Stirred Tank Reactors (CSTRs)
are commonly used because of their technological parameters.
The dynamic behaviors of chemical reactors vary from quite straightforward to highly
complex, and to evaluate the dynamic behavior, the engineer often must develop fundamental
models. The first step is introducing of the mathematical model which describes relations
between state variables in the mathematical way. This mathematical model comes from material
or heat balances inside the reactor. Simulation usually consists of steady-state analysis which
observes behavior of the system in steady-state and dynamic analysis which shows dynamic
behavior after the step change of the input quantity.
A PID controller is a control loop feedback mechanism used in most of the industrial
control systems. A PID controller evaluates the error as the difference between a measured
process variable and a desired set point. The controller reduces the error, overshoots and
increases the response. The PID controller algorithm includes the 3 constant parameters the
proportional (P), the integral (I) and derivative (D) values. P depends on the present error, I on
the accumulation of past errors, and D is a prediction of future errors, based on current rate of
change. These 3 actions are used together to reduce the error via a control element such as the
position of a control valve, a damper, or the power supplied.
1
There are several methods for tuning a PID loop. The most effective methods generally
involve the development of some form of process model by choosing P, I and D values. If the
system can be taken offline, the best tuning method often involves subjecting the system to a step
change in input, measuring the output as a function of time, and using this response to determine
the control parameters. The objective of automatic process control structure is to change the
controlled variable to keep up the controlled variable at its set point slighting all aggravations.
Advanced control systems are in fact designed to cope with the industries aims to reduce
operating cost, to improve product quality and to make better use of the energy resources.
1.2 Objectives:
1. Develop a mathematical model for a two non-interacting isothermal CSTR;
2. Develop a closed loop feedforward control strategy for a system that will maintain the
desired product concentration despite the disturbances and to simulate this in MATLAB;
3. Apply P, PI, and PID controller in the closed loop system and obtain their block
parameters; and
4. Fine-Tune the block parameters using automatic tuning of MATLAB and compare the best
performance among the three controllers.
1.3 Assumptions:
We must introduce some simplifications before we start to build the mathematical model of the
process.
To simplify the description of the reactor, the following assumptions have been made:
it is assumed that the reactor is completely filled, i.e. the level is assumed to
be constant;
2
the reactor is ideally mixed, i.e. there are no concentration gradients and the
reactor concentration is the same as the outlet concentration;
the density is the same throughout the process and independent of the
concentration of components and temperature;
Chapter II
Review of Literature
This chapter presents a review of literature and studies conducted by different
researchers, institutions, and agencies that are related on the subject matter of this term paper.
The correlation of this studies and literature are important and will help supplement this term
paper.
2.1 Modeling a Continuous Stirred Tank Reactor System
A mathematical model is a description of a system using mathematical concepts and
language. The process of developing a mathematical model is termed mathematical modeling. A
model may help to explain a system and to study the effects of different components, and to
make predictions about behavior. Mathematical modeling is the method of translating the
problems from real-life systems into conformable and manageable mathematical expressions
whose analytical consideration determines an insight and orientation for solving a problem and
provides us with a technique for better development of the system.
To describe the dynamic behaviour of a CSTR mass, component and energy balance
equations must be developed. This requires an understanding of the functional expressions that
describe chemical reaction. A reaction will create new components while simultaneously
reducing reactant concentrations. The reaction may give off heat or my require energy to
proceed.
The mass balance (typical units, kg/s) without reaction, the basic mass balance
expression for a system (e.g. tank) is written:
Rate of mass flow in Rate of mass flow out = Rate of change of mass within system
Writing the mass balance expression for a stirred tank
Consider a well-mixed tank of liquid. The inlet stream flow is Fin (m3/s) with density
in (kg/m3). The volume of the liquid in the first tank is V1(m3), the volume in the second tank is
V2 with constant density (kg/m3). The flow leaving the tank is F (m3/s) with liquid density
(kg/m3). Table 1 summarizes each term that appears in the mass balance.
Table 2.1: The Terms in the Mass Balance for the Stirred Tank System.
Rate of mass flow in
Fin in
d volume density
dt
dV
dt
For liquid systems equation (1) normally can be simplified by making the assumption
that liquid density is constant. Additionally as V = Ah then,
The component balance (typical units, kg/s) to develop a realistic CSTR model the
change of individual species (or components) with respect to time must be considered. This is
because individual components can appear / disappear because of reaction (remember that the
overall mass of reactants and products will always stay the same). If there are N components N
1 component balances and an overall mass balance expression are required. Alternatively a
component balance may be written for each species. A component balance for the jth chemical
species is,
Rate of flow of jth component in rate of flow of jth component out + rate of
formation of jth component from chemical reactions = rate of change of jth component
Adding a chemical reaction to the stirred tank model
Assume that the reaction may be described as, A B, i.e. component A reacts
irreversibly to form component B. Further, assume that the reaction rate is 1st order. Therefore
the rate of reaction with respect to CA is modelled as,
Table 2.2: The terms for the Component Balance for the Stirred Tank System.
Rate of flow
of A in
Rate of flow
of A out
Rate of change A
caused by chemical
reaction
Rate of change of
A inside the tank
Molecular weight x
inlet flowrate x conc.
Of A
{Conc. Of A} x
molecular weight
Molecular weight x
d volume conc. A
dt
M wA FinC Ain
M wA FC A
kVC A M wA
M wA
d VC A
dt
Kc
e t dt
1
G s K c 1
is
To summarize the PI controller it reduces the steady state error.
2.3.3 Proportional-Integral-Derivative Controller (PID)
A new controller is merged with PI controller known as derivative controller, which is
also known for pre act. Its purpose is to anticipate where the process is heading by looking at the
time rate of change of the error, its derivative.
The describing equation is
10
m t m Kce t
Kc
e t dt K
c d
de t
dt
11
Chapter III
3.1 Modeling of the Continuous Stirred Tank Reactor System
The concentration of the outlet flow of two chemical reactors will be forced to have a
specified response in this section. Figure 1 shows the simple concentration process control. It is
assumed that the overflow tanks are well-mixed isothermal reactors, and the density is the same
in both tanks. Due to the assumptions for the overflow tanks, the volumes in the two tanks can
be taken to be constant, and all flows are constant and equal. It is assumed that the inlet flow is
constant. The figure below shows the block diagram of two tanks of chemical reactor.
F
CA0 (s)
F
V1
CA1 (s)
F
V2
CA2 (s)
CA2 (s)
CA1 (s)
CA0 (s)
TANK 1
TANK 2
V1
dC A1
FC A0 FC A1 V1 KC A1
dt
Where:
V1 is the volume of the first tank
F is the flow
CA0 is the inlet concentration of the first tank
CA1 is the outlet concentration of the first tank and inlet concentration of the second tank
K is the reaction rate
Equation 1 can be rearranged to be
dC A1 1
F
C A1 C A0
dt
1
V1
Where:
V1
is the time constant of the first tank.
F KV1
dC
1
F
L A1 C A1 C A0
1
V1
dt
sC A1 s
C A1 s
F
C A0 s
V1
13
1
F
sC A1 s C A1 s C A0 s 1
1
V1
1sC A1 s C A1 s
F
1C A0 s
V1
1sC A1 s C A1 s
F V1
C A0 s
V1 F KV1
where 1
V1
F KV1
F
C A0 s
F
KV
1s 1 C A1 s
CA1 s
C A0 s
K p1
1s 1
Where:
K p1
F
is the gain of the transfer function of the first tank.
F KV1
V2
dC A2
FC A1 FC A2 V2 KC A2
dt
Where:
V2 and CA2 are the volume and the inlet concentration of the second tank respectively.
Equation 4 can be rearranged to be
14
dC A 2 1
F
C A2 C A2
dt
2
V2
Where:
V2
is the time constant for the second tank.
F KV2
dC
1
F
L A2 C A2 C A2
2
V2
dt
sC A 2 s
C A2 s
F
C A2 s
V2
1
F
sC A2 s C A2 s C A2 s 2
2
V2
2 sC A 2 s C A 2 s
F
2C A 2 s
V2
2 sC A2 s C A2 s
F V2
C A2 s
V2 F KV2
where 2
V2
F KV2
F
C A2 s
F KV2
2 sC A2 s C A2 s
F
C A2 s
F
KV
2 s 1 C A2 s
15
CA2 s
CA1 s
K p2
2 s 1
Where:
K p2
F
is the gain of the transfer function of the second tank.
F KV2
16
Chapter IV
Simulations and Results
Tables 1 and 2 shows the CSTR parameters, time constant and gains used for the simulation of
the 2 non-interacting CSTR.
Table 4.1. CSTR Operating Conditions
Parameters
Values
Flow rate
0.085 m3/min
Volume of Tank 1
1.05 m3
Volume of Tank 2
0.7 m3
Reaction Rate
K=0.04 min-1
Values
Kp1
0.669
Kp2
0.752
8.25 min
9.15 min
17
Figure 4.1: Block Diagram for 2 Non Interacting Tanks Using P Controller
Figure 4.2: Block Diagram for 2 Non Interacting Tanks Using PI Controller
18
Figure 4.3: Block Diagram for 2 Non Interacting Tanks Using PID Controller
19
Figure 4.6: Simulation for 2 Non Interacting Tanks Using PID Controller
21
22
23
24
Fine tuning of the P Controller improves the settling time by 86% and the overshoot by
approximately 87.6%.
25
PI Controller
PID Controller
Rise Time
1.9 seconds
3.83 seconds
4.42 seconds
Settling Time
10.2 seconds
11.1 seconds
14.4 seconds
Overshoot
19.9%
8.04%
6.65%
26
From the obtained performance and robustness data, tuning of the P controller produces
the shortest rise time and the shortest settling time but it has the highest percent overshoot among
the three. The fine-tuned PID controller on the other hand has the lowest percent overshoot.
27
CHAPTER V
Conclusion
The mathematical model of the dynamic behavior of isothermal process in a two noninteracting continuous stirred tank reactor (CSTR) was studied and developed.
A closed loop feed forward control strategy was developed and simulated through
MATLAB Simulink. The block parameters were obtained from the simulation of the three
controllers. The P, PI and PID controller block parameters are then fine-tuned to produce a
heuristic optimal response.
From the data obtained in the fin-tuning of the controllers, it was obtained that P
controller has the shortest settling time and rise time. The PID controller on the other hand has
the lowest percent overshoot. Because these criterions cannot be achieved at one time, it is
necessary to decide which criterion we want the most. For CSTR system, the most required
criterion is that the system has the lowest percent overshoot and the fastest settling time. The
simulation results show that the PID controller has the best performance because it has the
lowest percent overshoot and it takes the shortest time to reach the steady state. Hence, it can be
concluded that between the three controllers, the best controller for the continuous stirred tank
reactor system (CSTR) is the PID controller.
28
REFERENCES
1.
2.
Brian Roffel & Ben Betlam, Process Dynamics And Control Modeling For
Prediction And Control, John Wiley And Sons,P. 169-178. C Udra Pratap,
Getting Started With MATLAB 7 - A Quick Introduction For Scientists And
Engineers, Oxford University Press.
3.
4.
5.
6.
7.
29
8.
9.
10.
11.
12.
13.
30
Appendices
A. P Block Parameters
31
32
B. PI Block Parameters
33
34
35
36
37