dynamic model of non-interacting isothermal cstr

39
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 Republic of the Philippines Cagayan State University College of Engineering Carig Campus, Carig Sur, Tuguegarao City

Upload: anita-busilan

Post on 11-Apr-2016

49 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Dynamic Model of Non-interacting isothermal CSTR

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

Republic of the Philippines

Cagayan State University

College of Engineering

Carig Campus, Carig Sur, Tuguegarao City

Page 2: Dynamic Model of Non-interacting isothermal CSTR

ii

Table of Contents

Contents Page

Chapter I: Introduction

1.1 Introduction 1

1.2 Objectives 2

1.3 Assumptions 2

Chapter II: Review of Related Literature

2.1 Modeling a Continuous Stirred Tank Reactor System 4

2.2 Control Strategies

2.2.1 Feedback Control 7

2.2.2 Feedforward Control 8

2.3 Types of Controllers

2.3.1 Proportional Controller (P) 9

2.3.2 Proportional-Integral Controller (PI) 9

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

Page 3: Dynamic Model of Non-interacting isothermal CSTR

1

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.

Page 4: Dynamic Model of Non-interacting isothermal CSTR

2

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;

Page 5: Dynamic Model of Non-interacting isothermal CSTR

3

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

Page 6: Dynamic Model of Non-interacting isothermal CSTR

4

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:

Page 7: Dynamic Model of Non-interacting isothermal CSTR

5

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

d volume density

dt

in inF F 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,

Page 8: Dynamic Model of Non-interacting isothermal CSTR

6

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.

Page 9: Dynamic Model of Non-interacting isothermal CSTR

7

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

wA in AinM F C wA AM FC A wAkVC M A

wA

d VCM

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.

Page 10: Dynamic Model of Non-interacting isothermal CSTR

8

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.

Page 11: Dynamic Model of Non-interacting isothermal CSTR

9

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.

Page 12: Dynamic Model of Non-interacting isothermal CSTR

10

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

cc

i

Km t m K e t e t dt

Where Ʈi, = integral (or reset) time

Transfer function is

1

1c

i

G s Ks

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

Page 13: Dynamic Model of Non-interacting isothermal CSTR

11

c

c c d

i

de tKm t m K e t e t dt K

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).

Page 14: Dynamic Model of Non-interacting isothermal CSTR

12

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.

Figure 3.1.The simple concentration process control.

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.

F

F

F

CA0 (s)

CA1 (s)

CA2 (s)

V1

V2

CA0 (s) CA1 (s) CA2 (s)

TANK 1 TANK 2

Page 15: Dynamic Model of Non-interacting isothermal CSTR

13

Balance Equation in Tank 1:

11 0 1 1 1

AA A A

dCV FC FC V KC

dt 1

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

11 0

1 1

1AA A

dC FC C

dt V 2

Where:

11

1

V

F KV

is the time constant of the first tank.

By taking Laplace transform and rearranging equation 2:

11 0

1 1

1AA A

dC FL C C

dt V

1 1 0

1 1

1A A A

FsC s C s C s

V

Page 16: Dynamic Model of Non-interacting isothermal CSTR

14

1 1 0 1

1 1

1A A A

FsC s C s C s

V

1 1 1 1 0

1

A A A

FsC s C s C s

V where 1

1

1

V

F KV

11 1 1 0

1 1

A A A

VFsC s C s C s

V F KV

1 1 0

1

1 A A

Fs C s C s

F KV

Transfer Function of the First Tank:

3

Where:

1

1

p

FK

F KV

is the gain of the transfer function of the first tank.

Balance Equation in Tank 2:

22 1 2 2 2

AA A A

dCV FC FC V KC

dt 4

Where:

V2 and CA2 are the volume and the inlet concentration of the second tank respectively.

Equation 4 can be rearranged to be

11

0 1 1

pA

A

KC s

C s s

Page 17: Dynamic Model of Non-interacting isothermal CSTR

15

22 2

2 2

1AA A

dC FC C

dt V 5

Where:

22

2

V

F KV

is the time constant for the second tank.

By taking Laplace transform and rearranging equation 5:

22 2

2 2

1AA A

dC FL C C

dt V

2 2 2

2 2

1A A A

FsC s C s C s

V

2 2 2 2

2 2

1A A A

FsC s C s C s

V

2 2 2 2 2

2

A A A

FsC s C s C s

V where 2

2

2

V

F KV

22 2 2 2

2 2

A A A

VFsC s C s C s

V F KV

2 2 2 2

2

A A A

FsC s C s C s

F KV

2 2 2

2

1 A A

Fs C s C s

F KV

Page 18: Dynamic Model of Non-interacting isothermal CSTR

16

Transfer Function of the Second Tank:

6

Where:

2

2

p

FK

F KV

is the gain of the transfer function of the second tank.

22

1 2 1

pA

A

KC s

C s s

Page 19: Dynamic Model of Non-interacting isothermal CSTR

17

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

τ1 8.25 min

τ2 9.15 min

Page 20: Dynamic Model of Non-interacting isothermal CSTR

18

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

Page 21: Dynamic Model of Non-interacting isothermal CSTR

19

Figure 4.3: Block Diagram for 2 Non Interacting Tanks Using PID Controller

Page 22: Dynamic Model of Non-interacting isothermal CSTR

20

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

Page 23: Dynamic Model of Non-interacting isothermal CSTR

21

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

Page 24: Dynamic Model of Non-interacting isothermal CSTR

22

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

Page 25: Dynamic Model of Non-interacting isothermal CSTR

23

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%.

Page 26: Dynamic Model of Non-interacting isothermal CSTR

24

Figure 4.9: PI Controller Tuning

Figure 4.10: PI Controller Parameters

Page 27: Dynamic Model of Non-interacting isothermal CSTR

25

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

Page 28: Dynamic Model of Non-interacting isothermal CSTR

26

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%

Page 29: Dynamic Model of Non-interacting isothermal CSTR

27

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.

Page 30: Dynamic Model of Non-interacting isothermal CSTR

28

CHAPTER V

Conclusion

The mathematical model of the dynamic behavior of isothermal process in a two non-

interacting 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.

Page 31: Dynamic Model of Non-interacting isothermal CSTR

29

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. Eng’g. 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.

Page 32: Dynamic Model of Non-interacting isothermal CSTR

30

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.

Page 33: Dynamic Model of Non-interacting isothermal CSTR

31

Appendices

A. P Block Parameters

Page 34: Dynamic Model of Non-interacting isothermal CSTR

32

Page 35: Dynamic Model of Non-interacting isothermal CSTR

33

B. PI Block Parameters

Page 36: Dynamic Model of Non-interacting isothermal CSTR

34

Page 37: Dynamic Model of Non-interacting isothermal CSTR

35

B. PID Block Parameters

Page 38: Dynamic Model of Non-interacting isothermal CSTR

36

Page 39: Dynamic Model of Non-interacting isothermal CSTR

37