39
Project report on Modelling and Control of Three CSTRs in series Under the guidance Of S.K. Sharma(faculty Chemical Engineering dept.) Submitted by: Ms. Promila Yadav

CSTRs Series Project

Embed Size (px)

Citation preview

Page 1: CSTRs Series Project

Project reporton

Modelling and Control ofThree CSTRs in series

Under the guidanceOf

S.K. Sharma(faculty Chemical Engineering dept.)

Submitted by: Ms. Promila Yadav 2K6/CHE/525

Deen Bandhu chhotu Ram University of Science and Technology Murthal Haryana

Page 2: CSTRs Series Project

Certificate

This is certified that Promila Yadav has done her project titled “Modelling and Control of three CSTRs in series” under my guidance. She was found to be very dedicated and hard working to the job assigned to her.

The work is authentic as per my knowledge.

S.K. Sharma(Chemical Engg. Dept.)

Page 3: CSTRs Series Project

Acknowledgement

I am feeling very grateful to my guide for his contineous motivation and encouragement during the project.

I am thankful to Dr. D.P. Tiwari (Chairman Chemical deptt.).I am thankful to the all faculty staff.I am thankful to lab technicians Mr. Paswan, Mr. Vishal and Mr. Devanand of their support in doing this project.

I am also thankful to all of my friends.At last but not least am thankful to everyone who helped me anyhow.

………………Promila Yadav

Page 4: CSTRs Series Project

Table of Content

Sr. no. Content Page no.1.

2.

3.

4.

5.

6.

7.

8.

9.

Introduction

Principles of modelling

Modelling of three CSTRs in series

Contol system and its design

Flow chrat of Program

Computer Program

Output

Results

Conclusions

Page 5: CSTRs Series Project

Introduction

Most chemical processing plants were run essentially manually prior to the 1940s. Only the most elementary types of controllers were used. Many operators were needed to keep watch on the many variables in the plant. Large tanks were employed to act as buffers or surge capacities between various units in the plant. These tanks, although sometimes quite expensive, served the function of filtering out some of the dynamic disturbances by isolating one part of the process from upsets occurring in another part.

With increasing labor and equipment costs and with the development of more severe, higher-capacity, higher-performance equipment and processes in the 1940s and early 195Os, it became uneconomical and often impossible to run plants without automatic control devices. At this stage feedback controllers were added to the plants with little real consideration of or appreciation for the dynamics of the process itself. Rule-of-thumb guides and experience were the only design techniques.

In the 1960s chemical engineers began to apply dynamic analysis and control theory to chemical engineering processes. Most of the techniques were adapted from the work in the aerospace and electrical engineering fields. In addition to designing better control systems, processes and plants were developed modified so that they were easier to control. The concept of examining the many parts of a complex plant together as a single unit, with all the interaction included, and devising ways to control the entire plant is called systems engineer- ing. The current popular “buzz” words artificial intelligence and expert systems are being applied to these types of studies.

The rapid rise in energy prices in the 1970s provided additional needs for effective control systems. The design and redesign of many plants to reduce energy consumption resulted in more complex, integrated plants that were muc more interacting. So the challenges to the process control engineer have contin ued to grow over the years. This makes the study of dynamics and control even more vital in the chemical engineering curriculum than it was 30 years ago.

Prospective :

Lest I be accused of overstating the relative importance of process control to the main stream of chemical engineering, let me make it perfectly clear that the tools of dynamic analysis are but one part of the practicing engineer’s bag of tools and techniques, albeit an increasingly important one. Certainly a solid foundation in the more traditional areas of thermodynamics, kinetics, unit operations, and transport phenomena is essential. In fact, such a foundation is a prerequisite for any study of process dynamics. The mathematical models that we derive are really nothing but extensions of the traditional chemical and physical laws to include the time-dependent terms. Control engineers

Page 6: CSTRs Series Project

sometimes have a tendency to get too wrapped up in the dynamics and to forget the steadystate aspects. Keep in mind that if you cannot get the plant to work at steadystate you cannot get it to work dynamically.

An even greater pitfall into which many young process control engineers fall, particularly in recent years, is to get so involved in the fancy computer control hardware that is now available that they lose sight of the process control objectives. All the beautiful CRT displays and the blue smoke and mirrors that computer control salespersons are notorious for using to sell hardware and software can easily seduce the unsuspecting control engineer. Keep in mind your main objective: to come up with an effective control system. How you implement it, in a sophisticated computer or in simple pneumatic instruments, is of muchless importance.

Importance The control room is the major interface with the plant. Automation is increasingly common in all degrees of sophistication, from single-loop systems to computer-control systems.Challenging.

You will have to draw on your knowledge of all areas of chemicalengineering. You will use most of the mathematical tools available (differentialequations, Laplace transforms, complex variables, numerical analysis, etc.) tosolve real problems.

Page 7: CSTRs Series Project

Principles of Modelling

Continuity Equations

1. TOTAL CONTINUITY EQUATION (MASS BALANCE). The principle of the conservation of mass when applied to a dynamic system says,

(mass in the system) - (mass out the system) = ( rate of change mass in the system)

2.COMPONENT CONTINUITY EQUATIONS (COMPONENT BALANCES).Unlike mass, chemical components are not conserved. If a reaction occurs inside a system, the number of moles of an individual component will increase if it is a product of the reaction or decrease if it is a reactant. Therefore the component continuity equation of thejth chemical species of the system says

(flow of moles of ith component into the system) - (flow of moles of the ith components out of the system) + (rate of formation of ith component in the system by reaction) = (time rate of change of moles of components of ith components)

Energy Equation:

The first law of thermodynamics puts forward the principle of conservation of energy. Written for a general “open” system (where flow of material in and out of the system can occur) it is

(Flow of internal, kinetic, andflow of internal, kinetic, and - (flow of energy (KE+PE+U) out the system) potential energy into system)

+ (heat added to the system by any medium) - (work done by the system(PV))

= (rate of change of total energy in the system)

Page 8: CSTRs Series Project

Modelling of three CSTRs in seriesSERIES OF ISOTHERMAL CONSTANT-HOLDUP CSTRs

The system is sketched in Fig. (4) and is a simple extension of the CSTR con- sidered in discussion. Product B is produced and reactant A is consumed in each of the three perfectly mixed reactors by a first-order reaction occurring in the liquid. For the moment let us assume that the temperatures and holdups (volumes) of the three tanks can be different, but both temperatures and the liquid volumes are assumed to be constantb (isothermal and constant holdup). Density is assumed constant throughout the system, which is a binary mixture of A and B. With these assumptions in mind, we are ready to formulate our model. If the volume and density of each tank are constant, the total mass in each tank is constant. Thus the total continuity equation for the first reactor is

……………………(1)

or F1 = F0.F1 = F2 = F3 = F0 = F …………………….(2)

(Fig. (3))

reactant A in each tank are (with units of kg - mol of A/min)

Page 9: CSTRs Series Project

…………………(3) The specific reaction rates k, are given by the Arrhenius equation

k, = CIe-E/RTm n = 1, 2, 3 ……...……………..(4)

If the temperatures in the reactors are different, the k’s are different. The n refers to the stage number. The volumes V, can be pulled out of the time derivatives because they are constant. The flows are all equal to F but can vary with time. An energy equation is not required because we have assumed isothermal operation. Any heat addition or heat removal required to keep the reactors at constant temperatures could be calculated from a steadystate energy balance (zero time derivatives of temperature). The three first-order nonlinear ordinary differential equations given in Eqs. (3) are the mathematical model of the system. The parameters that must be known are V1, V2,V3, kl, k2, and k3, . The variables that must be specified before these equations can be solved are F and CA,. “Specified” does not mean that they must be constant. They can be time-varying, but they must be known or given functions of time. They are theforcingfunctions. The initial conditions of the three concentrations (their values at time equal zero) must also be known. Let us now check the degrees of freedom of the system. There are three equations and, with the parameters and forcing functions specified, there are only three unknowns or dependent variables: CA1, CA2, and CA3. Consequently a solution should be possible.

We will use this simple system in many subsequent parts of this book. When we use it for controller design and stability analysis, we will use an even simpler version. If the throughput F is constant and the holdups and tem- peratures are the same in all three tanks, Eqs. (3) become

Page 10: CSTRs Series Project

………………..(5)

where r(tau) = V/F with units of minutes.There is only one forcing function or input variable, CA0 .

Control and its design for the systemDynamics Time-dependent behavior of a process. The behavior with no controllers in the system is called the openloop response. The dynamic behavio with feedback controllers included with the process is called the closedloop response. Variables

a. Manipulated variables. Typically flow rates of streams entering or leaving aprocess that we can change in order to control the plant.

b. Controlled variables. Flow rates, compositions, temperatures, levels, an pressures in the process that we will try to control, either trying to hold them as constant as possible or trying to make them follow some desire time trajectory.

c. Uncontrolled variables. Variables in the process that are not controlled.

d. Load disturbances. Flow rates, temperatures, or compositions of stream entering (but sometimes leaving) the process. We are not free to manipulat them. They are set by upstream or downstream parts of the plant. The control system must be able to keep the plant under control despite the effects of these disturbances.

Page 11: CSTRs Series Project

Feedback control

The traditional way to control a process is to measure the variable that is to be controlled, compare its value with the desired value (the setpoint to the controller) and feed the difference (the error) into a feedback controller that will change a manipulated variable to drive the controlled variable back to the desired value. Information is thus “fed back” from the controlled variable to a manipulated variable, as sketched in Fig. 1.Feedforward control. The basic idea is shown in Fig. 2. The disturbance is detected as it enters the process and an appropriate change is made in the manipulated variable such that the controlled variable is held constant. Thus we begin to take corrective action as soon as a disturbance entering the system is detected instead of waiting (as we do with feedback control) for the disturbance to propagate all the way through the process before a correction is made.

Stability. A process is said to be unstable if its output becomes larger and larger (either positively or negatively) as time increases. Examples are shown in Fig.3. No real system really does this, of course, because some constraint will be met; for example, a control valve will completely shut or completely open, or a safety valve will “pop.” A linear process is right at the limit of stability if it oscillates, even when undisturbed, and the amplitude of the oscillations does not decay.Most processes are openloop stable, i.e., stable with no controllers on the system. One important and very interesting exception that we will study in some detail is the exothermic chemical reactor which can be openloop unstable. All real

Page 12: CSTRs Series Project

processes can be made closedloop unstable (unstable when afeedback controller is in the system) if the controller gain is made large

(Fig. (3))

Page 13: CSTRs Series Project

enough. Thus stability is of vital concern in feedback control systems.The performance of a control system (its ability to control the processtightly) usually increases as we increase the controller gain. However, we get closer and closer to being closedloop unstable. Therefore the robustness of the control system (its tolerance to changes in process parameters) decreases: a small change will make the system unstable. Thus there is always a trade-off between robustness and performance in control system design.

Design of control for the three CSTRs in series

Now if feedback control system is added to the process system we have to make caculations for the manupulated varriable. The controller will look at the concentration CA3 leaving the tank 3 and make the adjustment for any change in the inlet concentration CA0 to its set value Cset.

CA0 = CAM + CAD

(idealized system) (Fig. (4))

Page 14: CSTRs Series Project

Where,

And,

E = Cset A3 - CA3

KC = controller feedback gain

Tau I = reset or feedback intergral time constant.

Page 15: CSTRs Series Project

Flow Chart

Page 16: CSTRs Series Project

Computer Program

// Three CSTRs in series(controlled by feedback controller)#include<iostream.h> // header file for input and output streams#include<conio.h> // header file for the funtion getch();#include<iomanip.h> float dif1(float c0,float c1,float k,float t)//function declaration for the CA1 estimation { return (((c0-c1)/t - k*c1));//funtion definition } float dif2(float c1,float c2,float k,float t)//funtion declaration for the CA2 estimation { return (((c1-c2)/t - k*c2));//funtion definition } float dif3(float c2,float c3,float k,float t)//funtion declaration for the CA3 estimation {

return (((c2-c3)/t - k*c3));//funtion definition } void main()//main function starts { textbackground(RED);//to specify the text backround color textcolor(YELLOW); // to specify the font color float cm;//manupulated concentration float taui=5,error=0,cset=0.1,kc=30,erint=0,cad=0.5;//control varrialbes are declared and initialized float f1,f2,f3;// varriables for the function values double c[5];//varriable for concentration float k;// varriable for rate constant float t0;//varriable for initial time input float delta,tau;//varriable for the time interval and Tau // entering the initial vlaues for time and concentration

cprintf("\n\n\n\n THIS IS THE #3_CSTRs in series model# \n"); cout<<"\n\n\n ************************************************\n"; cout<<" \n\n\n Enter the initial values of Time,CA0,CA1,CA2,CA3\n"; cin>>t0>>c[0]>>c[1]>>c[2]>>c[3];//intial values input // entering the values for the rate constant and delta in time progress cout<<" enter the value of k , Tau and delta \n"; cin>>k>>tau>>delta;//initil values input clrscr();//funtion to clear the screen cout<<"Time"<<" "<<"CA1"<<" "<<"CA2"<<" "<<"CA3"<<" "<<"CAM\n";//to display idex to the output //loop for the time control and concentration calculations for(float i=t0;i<3;i=i+delta)//for loop for the interval control starts

Page 17: CSTRs Series Project

{ //for loop starts for time control

cout<<i<<"\n"<<i<<setw(10)<<c[1]<<setw(10)<<c[2]<<setw(10)<<c[3]<<setw(10)<<cm;//displays the values f1 = dif1(c[0],c[1],k,tau);//first funtion calculation f2 = dif2(c[1],c[2],k,tau);//second funtion calculation f3 = dif3(c[2],c[3],k,tau);//third funtion calculation

c[1] = c[1] + delta*f1;//CA1 calculation c[2] = c[2] + delta*f2;//CA2 calculation c[3] = c[3] + delta*f3;//CA3 calculation error= cset - c[3];//error is generated for the controller to take suitable action cm = (0.8 + kc*(error+erint/taui));//manupulated varriable calculated c[0] = cm + cad; erint = erint + error*delta;

} // for loop closed for the time control

getch();//funtion to freeze the screen

} //main funtion closed } //main funtion closed

Page 18: CSTRs Series Project

OUTPUT:

Tau= 2

Page 19: CSTRs Series Project

Tau= 3

Page 20: CSTRs Series Project

Tau= 4

Page 21: CSTRs Series Project

Tau= 2.5

Page 22: CSTRs Series Project

Tau=3.5

Page 23: CSTRs Series Project

Tau=4.5

Page 24: CSTRs Series Project

Tau=1.5

Page 25: CSTRs Series Project

Tau=2.6

Page 26: CSTRs Series Project

Tau=3.6

Page 27: CSTRs Series Project

Tau = 4.6

Page 28: CSTRs Series Project

Tau = 1.5

Page 29: CSTRs Series Project

Graphical analysis of output:

Result

Page 30: CSTRs Series Project

Conclusions

Page 31: CSTRs Series Project

References:

WILLIUM L.Luben,process modelling and simulation control for chemical engineersC++ for Dummies,by Stephen Randy Davis