Вы находитесь на странице: 1из 39

Republic of the Philippines

Cagayan State University


College of Engineering
Carig Campus, Carig Sur, Tuguegarao City

Dynamics and Control of Two Non-interacting Isothermal CSTR


Submitted to:
Engr. Caesar P. Llapitan
Chemical Engineering Professor

In partial fulfillment to the requirements in the course,


ChE 72 (Process Dynamics and Control)

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

Chapter II: Review of Related Literature


2.1 Modeling a Continuous Stirred Tank Reactor System

2.2 Control Strategies


2.2.1 Feedback Control

2.2.2 Feedforward Control

2.3 Types of Controllers


2.3.1 Proportional Controller (P)

2.3.2 Proportional-Integral Controller (PI)

2.3.3 Proportional-Integral-Derivative Controller (PID)

10

Chapter III: Modeling of the Continuous Stirred Tank Reactor System

11

Chapter IV: Simulation and Results

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;

reaction occurs at isothermal conditions.

reaction from A to B is an equilibrium reaction, A B, with rate constant K

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

Rate of mass flow out

Rate of change of mass within


system

Inlet flowrate x density

Exit flowrate x density

Fin in

d volume density
dt
dV
dt

Referring to table 1 the mass balance is,

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,

Writing the component balance for the stirred tank model


If the concentration of A in the inlet stream is CA in (moles/m3) and in the reactor CA
(moles/m3). Table 2 summarizes the terms that appear in the component balance for reactant A.

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

Molecular weight x outlet


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

2.2 Control Strategies


2.2.1 Feedback Control
Feedback control system is most commonly used process in modern industries and is cheap also.
In feedback control system the disturbance is allowed into the feedback loop and is manipulated
several times to get the desired output. The process is automatic however it does need any
information about the process and disturbance.
A feedback control move makes the accompanying steps:
1. Measures the worth of the yield utilizing proper measuring device.
2. Compares the measured worth with the set point of the yield and finds the deviation.
3. The quality of the deviation is supplied to the fundamental controller. The controller in
turns changes the worth of the manipulated esteem in a manner so is to lessen the greatness of
the deviation.
Advantages of Feedback control system:
1. Corrective action are taken when the variables are deviated from the set point.

2. Feedback control requires insignificant information about the process to be controlled;


it specific, a scientific model of the process is not needed, despite the fact that it could be
exceptionally valuable for control framework plan.
3. The universal PID controller is both adaptable and strong. In the event that process
conditions change, returning the controller generally generates agreeable control
Drawbacks of Feedback control system:
1. No remedial move is made until after a deviation in the controlled variable happens.
Along these lines, flawless control, where the controlled variable does not veer off from the set
point throughout aggravation or set-point progressions, is hypothetically outlandish.
2. Feedback control does not give prescient control activity to make up for the impacts of
known or measurable aggravations.
3. It may not be acceptable for processes with substantial time constants and/or long time
delays. In the event that vast and regular aggravations happen, the process may work ceaselessly
in a transient state and never achieve the sought unfaltering state.
4. In a few circumstances, the controlled variable can't be measured on-line, and, hence,
feedback control is not attainable.
2.2.2 Feedforward Control
Feed forward control measures the disturbances as they enter the process. The
arrangement utilizes a controller to alter manipulated variable with the goal that the influence of
the disturbances on the controlled variable is diminished or killed. Feed forward control requires
a mindfulness and understanding of the impact that the disturbance will have on the controlled
variable. It can compute the precise sum by which the manipulated variables ought to change to
compensate for the disturbances. It requires a precise measurement of disturbances.

Advantages of Feed forward system:


1. Takes curative movement before the process is upset.
2. Theoretically fit for "immaculate control".
3. Does not influence system soundness.
Drawbacks of Feed forward system:
1. The disturbance variables must be measured on-line. In numerous requisitions, this is
not achievable.
2. To make successful utilization of feed forward control, in any event an estimated
process model ought to be accessible. Specifically, we have to know how the controlled variable
reacts to changes in both the disturbance and manipulated variables. The nature of feed forward
control relies on upon the correctness of the process model.
3. Ideal feed forward controllers that are hypothetically equipped for accomplishing
immaculate control may not be physically feasible. Luckily, handy estimates of these perfect
controllers regularly give extremely viable control.
2.3 Types of Controllers
2.3.1 Proportional Controller (P)
The proportional controller is the most basic controller which acts as a gain for the
process. The equation that describes its operation is
m(t) = m + Kc e(t)
where, m(t) = controller output,
Kc = controller gain
m = bias value.
When Kc is increased it increases the error or the offset value.
9

Transfer Function is G(s) = Kc.


Proportional controller is nothing but a gain which increases the output of the response in
sluggish way. It reduces the maximum overshoot.

2.3.2 Proportional-Integral Controller (PI)


Most processes have offset value which is difficult to control; i.e., they are to be
controlled at the set point. Due to this reason we need a proportional controller which removes
offset.

The describing equation is


m t m Kce t

Kc

e t dt

Where i, = integral (or reset) time


Transfer function is

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

Where Kc = controller gain.


e = SP PV
PID controller has advantage of all the control actions, it reduces the over shoot and steady state
error and also increase the response of the system (K. Prakash et al,. 2013).

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)

Figure 3.1.The simple concentration process control.

CA2 (s)

CA1 (s)

CA0 (s)
TANK 1

TANK 2

Figure 3.2. The block diagram of the two tank system.


The value of the concentration in the second tank is desired, but it depends on the
concentration in the first tank.
12

Balance Equation in Tank 1:

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

By taking Laplace transform and rearranging equation 2:

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

Transfer Function of the First Tank:

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

Balance Equation in Tank 2:

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

By taking Laplace transform and rearranging equation 5:

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

Transfer Function of the Second Tank:

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

Table 4.2. Time Constants and Gains


Parameter

Values

Kp1

0.669

Kp2

0.752

8.25 min

9.15 min

17

SIMULATION FOR 2 NON INTERACTING SYSTEMS:

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

SIMULATION RESULTS FOR 2 NON INTERACTING SYSTEMS:

Figure 4.4: Simulation for 2 Non Interacting Tanks Using P Controller

Figure 4.5: Simulation for 2 Non Interacting Tanks Using PI Controller


20

Figure 4.6: Simulation for 2 Non Interacting Tanks Using PID Controller

21

Tuning of Control Algorithms Result and Parameter


Tuning a control loop is the adjustment of its control parameters to the optimum values
for the desired control response. Stability is a basic requirement, but beyond that, different
systems have different behavior, different applications have different requirements, and
requirements may conflict with one another.
The following figures show the fine-tuning of the control parameters of the three
controllers and their fine-tuned parameters.

Figure 4.7: P Controller Tuning

22

Figure 4.8: P Controller Parameters


Fine tuning of the P Controller improves the rise time by 59% and the settling time by
approximately 11.3%.

23

Figure 4.9: PI Controller Tuning

Figure 4.10: PI Controller Parameters

24

Fine tuning of the P Controller improves the settling time by 86% and the overshoot by
approximately 87.6%.

Figure 4.11: PID Controller Tuning

25

Figure 4.12: PID Controller Parameters


Fine tuning of the P Controller improves the settling time by 77.6% and the overshoot by
approximately 87%.

Table 4.3. Comparison Table for the Three Controllers


P Controller

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.

B.W. Bequette, Process Control, Modeling, Design And Simulation, Prentice


Hall India, New Delhi, 644, 2003.

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.

D. Krishna, Tuning Of Pid Controllers For Isothermal Continuous Stirred Tank


Reactor, Elixir Chem. Engg. 44, 2012.

4.

Dr. M.J. Willis, Continuous Stirred Tank Reactor Models, 2000.

5.

J Prakash And K Srinivasan, Design Of Nonlinear Pid Controller And Nonlinear


Model Predictive Controller For A Continuous Stirred Tank Reactor, Isa
Transactions, 48, 2009.

6.

Jose Alvarez-Ramirez, America Morales, Pi Control Of Continuously Stirred


Tank Reactors: Stability And Performance, Chemical Engineering Sciences, 55,
2000.

7.

M. Saad, A. Albagul, D. Obiad, Modeling And Control Design Of Continuous


Stirred Tank Reactor System, Advances In Automatic Control, Modelling &
Simulation, 2009.

29

8.

Nina F Thornhill, Sachin C Patwardhan, Sirish L. Shah, A Continuous Stirred


Tank Heater Simulation Model With Applications, Journal Of Process Control,
18, 2008.

9.

Nise, N.S., Control Systems And Engineering. Addison Wesley, 2000.

10.

Pao C. Chau, Process Control: A First Course With MATLAB, Cambridge


University Press, Pp.103-105.

11.

R. Oza, N. Shah, D.G. Tadse And M. H. Joshipura, Application Of Matlab In


Process Control: Case Study For First Order Reaction In A Cstr, Nirma
Universitty Journal Of Engineering And Technology, Vol.1, No.1, Jan-Jun 2010.

12.

Rudra Pratap, Getting Started With MATLAB 7 - A Quick Introduction For


And Engineers, Oxford University Press.

13.

V. Vishnoi, S. Padhee, G. Kaur, Controller Performance Evaluation Of


Isothermal Continuous Stirred Tank Reactor, International Journal Of Scientific
And Research Publications, Volume 2, Issue 6, June 2012.

30

Appendices
A. P Block Parameters

31

32

B. PI Block Parameters

33

34

B. PID Block Parameters

35

36

37

Вам также может понравиться