Tj Project Report-final 1 23

Embed Size (px)

Citation preview

  • 8/3/2019 Tj Project Report-final 1 23

    1/31

    1

    CHAPTER 1

    INTRODUCTION

    1.1 INTRODUCTION

    In order to develop a model that is mathematical for a non-linear system is a

    vital theme in a lot of disciplines of engineering. The models can be used for

    a variety of things such as simulations, for the analysis of the behaviour of

    the system, for a better understanding of the mechanisms in the system and to

    create new processes and new controllers. Two broad methods can be

    followed in obtaining the mathematical model. The first one being the

    formulation of the model from the first principles by using the laws

    governing the system. 'This method is usually referred to as mathematical

    modelling. The second method requires the experimental data which is

    obtained by exciting the plant and measuring its response. This method is

    known as system identificationand is preferred in the case in which the plant

    or process involves really complex physical phenomena or in which the plant

    shows strong nonlinearities.'[1].

    Getting a model which is mathematical and for a system which is complex

    might be time consuming as it needs assumptions such as the defining of an

    operating point,ignoring some system parameters doing linearization about

    that point.etc[6]

    Many process models are non-linear. When a model has only one different

    equation the solution of that model might or might not be very complicated.

    Whereas, when more than one differential equations are present it tends to get

    difficult to understand the dynamics of the processes. Thus we tend to

    linearise transfer process models. Linearization is beneficial in the following

    ways:

  • 8/3/2019 Tj Project Report-final 1 23

    2/31

    2

    1) Systems that are linear can be analyzed easily using mathematical tools.[3]

    2) The behaviour of the system can be studied and analyzed because the

    relationship between the process inputs and the outputs are expressed in terms

    of process variables and operating conditions.

    3) The stability of a linear system is generally easy to investigate.

    If one needs to write the model equations in transfer function format it is

    necessary to use Laplace transformation as well. Hence to apply Laplace

    transform to non linear equations, we need to linearise the equations first.

    1.2 AIMS AND OBJECTIVES

    1) To study the dynamics of a CSTR process taken for the case study.[5]2) Develop a non linear model by relating a subsystem in the MATLAB

    software and to simulate the response of the non linear model of a CSTR

    process.

    3) To develop linear model of a CSTR process.4) Design of suitable control strategies for the process mentioned above.5) Testing the performance of the controller through time domain

    specifications.

    1.3 ORGANISATION OF THE PROJECT

    The work presented in this report starts with a description of what a

    continuously stirred jacketed tank reactor is. This is followed by the

    description of the problem that has been taken up. Using this description and

    linearization, the material balance equations of the CSTR have been arrived at.

    The Modeling has further been completed by the two point method. This is

    followed by the control of the process which is done using Cohen-coon and

    IMC based control. The time domain characteristics of the closed loop

    responses have been tabulated and compared.

  • 8/3/2019 Tj Project Report-final 1 23

    3/31

    3

    CHAPTER 2

    CONTINUOUSLY STIRRED TANK REACTOR

    2.1 JACKETED CSTRThe jacketed continuously stirred reactor is a self adaptable process. This

    means that the measured process variable (PV) logically tries to reach a steady

    operating level if the controller output (CO) and the major disturbances (D) are

    held constant for a particular amount of time. As can be seen from Fig 2.1, in a

    CSTR a reactant feed flow enters through the top of the vessel. After entering

    a chemical reaction tends to convert most of the feed into the desired product

    as the material moves gradually through the stirred tank. The stream that exits

    from the bottom of the vessel includes the newly created product as well as the

    portion of the feed that did not get converted while in the vessel. It is necessary

    to keep in mind certain assumptions such as that the residence time which is

    (the probability distribution function that describes the amount of time a fluid

    element can spend inside the reactor.) or overall flow rate of reactant feed as

    well as the product through the vessel are kept constant. The chemical

    reaction that occurs in the reactor is exothermic that means that the heat energy

    is released as feed gets converted to product.[7]

  • 8/3/2019 Tj Project Report-final 1 23

    4/31

    4

    Fig 2.1-- Jacketed stirred reactor

    2.2 DESCRIPTION OF THE COOLING JACKET

    The chemical reaction that takes place releases heat, this energy in turn leads

    to the rise in temperature of the material in the vessel. As the temperature

    increases the conversion of feed to product happens faster and thus leads to the

    release of even more heat. In order to prevent the hotter temperatures from

    further increasing the rate of reaction that will eventually produce even more

    heat, the vessel is enclosed within an outer shell (jacket). A cooling liquid

    moves through the jacket that collects heat energy from the outer surface of the

    reactor vessel and carries the heat away along with itself as it exits from the

    jacket.[7]

    As the flow of the cooling liquid through the jacket increases even more heat is

    removed. As this happens the reactor temperature is lowered and thus it slows

    the rate of the reaction and decreases the amount of feed that is converted to

    product. But when the flow of cooling liquid through the jacket decreases

    some of the energy that is given off from the heat-producing reaction

    accumulates in the vessel and drives the reactor temperature higher rather than

    being carried away with the cooling liquid. This results in an increased

    conversion of reactant feed to product.

  • 8/3/2019 Tj Project Report-final 1 23

    5/31

    5

    As it is known that the reactor has a constant residence time the amount of heat

    energy which is given off inside the vessel is directly related to the percent of

    feed converted to product. Thus by controlling the temperature in the reactor

    the percent conversion to the desired value can be maintained. Because the

    vessel is well mixed the temperature inside the reactor is almost the same as

    the temperature flowing out the exit stream and therefore our measured

    process variable (PV) becomes our reactor exit temperature.[7]

    The major disturbance in this jacketed stirred reactor is the cooling liquids

    temperature that enters the jacket and that changes over time. Because the

    temperature of the cooling liquid entering the jacket changes so does its ability

    to remove heat energy from the reactor.

    PV = reactor exit stream temperature (measured process variable, oC)

    CO = signal to valve that adjusts cooling jacket liquid flow rate (controller

    output,%)

    D = temperature of cooling liquid entering the jacket (major disturbance,

    o

    C)

    SP = desired reactor exit stream temperature (set point,oC)

  • 8/3/2019 Tj Project Report-final 1 23

    6/31

    6

    CHAPTER 3

    PROBLEM FORMULATION

    3.1 PROCESS DESCRIPTION

    Fig 3.1 Schematic diagram of a CSTR

    The figure above 3.1 shows us a schematic diagram of a CSTR process and

    the variables associated with it. In the CSTR a first order irreversible

    exothermic reaction A B takes place. "The heat that is produced due to the

    reaction is removed by the coolant that flows through the jacket around the

    reactor. The transfer characteristics of the above mentioned process are shown

    below."[3]

  • 8/3/2019 Tj Project Report-final 1 23

    7/31

    7

    Fig 3.2 Transfer characteristics of a CSTR

    Curve A in the above fig 3.2 describes the amount of heat released by the

    exothermic reaction and is shown by a sigmoid function of the temperature (T)

    in the reactor. Whereas the heat that is removed from the reaction by the

    coolant is shown by a linear function that of the temperature (T) and is

    represented by the curve B.[4]

    Accordingly we know that when the CSTR is at

    a steady state the heat produced by the reaction should be equal to the heat

    removed by the coolant. This need gives us the steady states shown in the fig

    no and is represented by P1, P2, P3 at the junction of curves A and B. The

    steady states P1 and P3 are known as stable while P2 is unstable.

  • 8/3/2019 Tj Project Report-final 1 23

    8/31

    8

    3.2 PROBLEM DESCRIPTION

    The process under our study is a first order exothermic irreversible CSTR

    process. A feed of a pure substance say "A" is mixed with a perfect recycle

    stream with the recycle flow rate (1-)F.[5] The primary interest is in the

    conversion that takes place inside the reactor which is basically the outlet

    concentration of component A .Certain assumptions are made so as not to

    complicate our model. The assumptions are as follows :

    1) The reactor is mixed ideally.2) The heat losses to the environment are ignored.3) Physical properties are assumed constant.

    It is also assumed that the level is constant. This is because if the level is

    variable the system becomes convoluted as then there is a need to deal with a

    total mass balance equation, an energy balance equations and a component

    balance equation. By assuming the level to be constant the total mass balance

    is eliminated as our inlet flow will be equal to the outlet flow.[4]

    Our model equations are as follows:

    The component balance for the reactor is given by[2]:

    dCA

    V = FCAin + F(1-) CAFCAVkeE/RT

    CA (3-1)dt

    Putting =1 which means that it is zero cycle :

    dCA

    V = F (CAin -CA)VkeE/RT CA (3-2)

    dt

  • 8/3/2019 Tj Project Report-final 1 23

    9/31

    9

    Similarly the energy balance equation is given by[2]

    :

    dT

    VCp = FCp(Tin-T) + Vke E/RTCAH + Q (3-3)dt

    Putting =1 which means that it is zero cycle we get:

    dT

    VCp = FCp(Tin-T) + VkeE/RT

    CAH + Q (3-4)dt

    The linearised model which relates changes in the reactor flow to the changes

    in the concentration of the component A, is given by[2]

    dCA 457.6s + 1

    = 6.69*104 (3-5)dF 2.55*105 s2 + 1254.4 s +1

    Nomenclature:

    The variables which have been used in the model along with their steady state

    values:[1]

    1) V Reactor Volume = 5m32) CAOutlet Concentration of Component A = 200.13 kg/m33) CAin Inlet Concentration Of Component A = 800 kg/m34) F Total Volumetric Flow Rate = 0.005 m3/s5) k Pre Exponential Constant = 18.75 s-16) E Activation Energy For The Reaction = 30 kj/mol

  • 8/3/2019 Tj Project Report-final 1 23

    10/31

    10

    7) T Reactor Temperature = 413K8) Tin Temperature of inlet flow = 353K9) Density = 800 kg/m310) Cp Specific Heat = 1.0 kj/kg.K11) H Heat Of Reaction (exothermic) = 5.3 kj/kg12) Q Heat Supplied To The Reactor = 224.1 kj/sec13) R Gas Constant =0.0083kj/mol.K

    It can be see from equation (3-2) and (3-4) that both the equations are non

    linear. The problem we face with these equations is that we cannot estimate the

    behaviour of the outlet concentration CA when the reactor itself is changing

    throughout. In order to rectify this we need to linearise the model which in turn

    helps us to get an idea of the process behaviour [7]

    3.3 SIMULATION OF A CSTR PROCESS

    Process simulation in MATLAB simulink is explained to develop a linear and

    a non linear model for a CSTR process and to compare them

    First a separate exponent block is created this is because the exponent of the

    temperature is calculate twice.[6]

    This is then created as a subsystem and can be

    used further in the material balance and energy balance equations.

  • 8/3/2019 Tj Project Report-final 1 23

    11/31

    11

    Fig 3.3 Calculation of the exponent

    Fig 3.4 the Exponent Part Shown As A Subsystem

    Now the mass balance equation has been used to create another subsystem

    known as the reactor component balance with inputs as F and T and the output

    being CA.

  • 8/3/2019 Tj Project Report-final 1 23

    12/31

    12

    Fig 3.5 Reactor Component Balance

    The structure above closely resembles the equation 1-1 which has been

    adjusted in such a way that the derivative dCA/dt becomes the left hand side of

    the equation

    Fig 3.6 Reactor Component Balance Represented As A Subsystem

  • 8/3/2019 Tj Project Report-final 1 23

    13/31

    13

    Similarly the energy balance equation 1-3 has been represented as a subsystem

    below

    Fig 3.7 Reactor Energy Balance

    Fig 3.8 Reactor Energy Balance Represented As A Subsystem

  • 8/3/2019 Tj Project Report-final 1 23

    14/31

    14

    The linear and the non linear reactor model of a CSTR has been shown below Fig 3.9

    Fig 3.9 Non linear and linear reactor model of a CSTR process

    The Final open loop response is shown below

    Fig 3.10 Response of reactor concentration using original and linearised model

  • 8/3/2019 Tj Project Report-final 1 23

    15/31

    15

    3.4 TWO POINT METHOD:

    The Two-Point Method helps to determine the parameters of the PID

    controller. With the method one can find the times, t1 and t2 which are the time

    when the process amplitude reaches 63.2 % and 28.3 % of the final

    steady value respectively.[1]

    Fig.3.11 response of the linearised model

    From the Fig.3.11 above it is noticed that

    t1 = which is the time taken to reach 63.2% of the steady-state value = 2500 sec

    t2 = which is the time taken to reach 28.3 % of the steady-state value = 900 sec

    = Process time constant = 1.5(t1-t2) =2400 sec

    td = Dead-time = t1- = 100 sec

    K = Static Gain = = 163793.1

  • 8/3/2019 Tj Project Report-final 1 23

    16/31

    16

    CHAPTER 4

    CONTROL OF THE CSTR PROCESS

    4.1 COHEN-COON METHOD OF CONTROL

    Using the values above the PID values of the controller are calculated below.

    These formulas are based on the cohen-coon method of tuning. Cohen-Coon

    were two physicist who designed formulas to tune the parameters for a PID

    controller.[2]

    These formulas were derived so as to get minimum integral

    square error.

    Now using the values of , td as obtained above and substituting in the aboveequations we get the following values of KC, I, D :

    KC = Proportional Gain = 15

    I = Integral time = 0.050

    D = Derivative time = 0.2

    Putting the values of P, I D obtained above in the process below:

    )2

    11

    4(

    )8

    13

    632

    (

    )43

    4(

    p

    d

    p

    pi

    pc

    T

    T

    T

    TT

    TK

    4-1

    4-2

    4-3

  • 8/3/2019 Tj Project Report-final 1 23

    17/31

    17

    Fig .4.1 Block diagram for the closed loop response of a CSTR process under

    PID controller(Cohen-Coon tuning method)

    Fig .4.2 Closed loop response of a CSTR process under PID controller(Cohen-

    Coon tuning method)

  • 8/3/2019 Tj Project Report-final 1 23

    18/31

    18

    4.2 INTERNAL MODEL CONTROL (IMC)

    Internal Model Control (IMC), was developed by Morari and coworkers.It is

    based on an understood process model and thus leads to methodical

    expressions for the controller settings. The viewpoint behind IMC is that

    control will be reached only if the system encapsulates either completely or

    clearly some representation of the process to be controlled.This strategy has

    the "POTENTIAL" to achieve the perfect control.The block diagram is shown

    below:[6]

    Fig.4.3 Block diagram for internal model control

    From fig no 4.3 it can be seen that a process model and the controlleroutput

    P are used to calculate the model response. This response of the model is

    subtracted from the actual response of the system Y. The difference -Y isthen fed into the input of the IMC controller.[5]

    Using the block diagram reduction technique the following relation is derived

    4-4

  • 8/3/2019 Tj Project Report-final 1 23

    19/31

    19

    Incase of a special scenario when =G (perfect model) the above equation ca

    be reduced to :

    Now using the values of , td and K that have been obtained using the two-

    point method we calculate the value of the PID controller by using the internal

    model control (IMC method).

    IMC approximation for a first order +time delay process:

    1)()(

    sTp

    sKpesG

    (4-6)

    Where

    Kp=163793.1, p= 2400 & =100

    Now using a first order Pade approximation for dead time:

    15.0

    15.0

    s

    s

    se

    (4-7)

    Using equations (4-6) and (4-7)

    )15.0)(1)((

    15.0)(

    ssTp

    sKpsG

    (4-8)

    Putting the values

    )1100*5.0)(1)(2400(

    1)100(5.01.163793)(

    ss

    ssG (4-9)

    Now factoring out the non-invertible elements

    4-5

  • 8/3/2019 Tj Project Report-final 1 23

    20/31

    20

    )15.0)(1)(()(

    ssTp

    KpsG

    (4-10)

    Now the idealized controller is shown by

    (4-11)

    1.163973

    )1100*5.0)(12400(

    ss(4-12)

    Now we add the filter

    = G-1

    (s).f(s) (4-13)

    Substituting (4-12) into (4-13)

    1s

    1

    1.163973

    )1100*5.0)(12400(

    ss(4-14)

    The corresponding PID is

    (4-15)

    Using the values obtained in the equations above the formulas mentioned below are

    arrived at

    Where, = filter factor

    p

    p

    p

    p

    T2

    T

    0.5T

    )0.5(

    0.5T

    d

    i

    pc

    T

    T

    KK4-16

    4-17

    4-18

  • 8/3/2019 Tj Project Report-final 1 23

    21/31

    21

    From the two point method we calculated our G(s) as

    (4-19)

    G(s) = 163793.1e-100

    (4-20)2400(s) +1

    Now using the values of Kp , p and from equation (4-10) we get:

    Kc = 32.24

    Ti = 0.1333

    Td = 10 ; = 0.2

    Fig.4.4 Closed loop response of a CSTR process under PID controller(IMC-

    tuning method)

  • 8/3/2019 Tj Project Report-final 1 23

    22/31

    22

    CHAPTER 5

    PROCESS SIMULATION AND RESULTS

    5.1 ADDITION OF DISTURBANCES TO THE PROCESS

    It is necessary to consider the effect of disturbances on a process. One cannot

    simply ignore its effect as disturbances can cause the output of the process to

    deviate from the set point by a substantial amount.

    Fig.5.1 Process with disturbance

    The block labelled Step-1 acts as the disturbance to the system. The simulation

    for the fig 5.1 has been shown below:

  • 8/3/2019 Tj Project Report-final 1 23

    23/31

    23

    Fig.5.2 Closed loop response with disturbance applied at 50 secs for a set point change

    (200-400)

    From Fig 5.2 it can be seen that the disturbance has been given at a time of 50

    seconds and the range of the value of the disturbance is 30 units.

    Thefig below (fig no 5.3) shows the regulatory response for the process when

    the disturbance is applied at a time of 50 seconds and the range of the value of

    disturbance is 30 units. However the difference being that the step input in this

    process has been varied from (200-300) .

    Fig.5.3 Closed loop response with disturbance applied at 50 secs for a set point change (200-300)

  • 8/3/2019 Tj Project Report-final 1 23

    24/31

    24

    5.2 TIME-DOMAIN SPECIFICATIONS

    Peak time, settling time and percentage overshoot are some of the

    characteristics that have been looked at:

    1) Settling time is the time that the response takes to reach and remain inside a

    particular tolerance level. This level may vary but it is usually taken to be 2%-

    5% of the eventual value.[3]

    2) Peak time is the time the response takes to reach its highest point at the very

    first instant.

    3) Overshoot is defined as the output that exceeds the eventual steady-state

    output.

    4) Percentage overshoot is shown by the subsequent formula :

    (4.1)

    A = Amplitude at peak time

    B = final value of the response

    5) Integral square error (ISE) and Integral absolute error (IAE) help to measure

    a systems performance. They have been calculated for the process and the

    output is shown using MATLAB.

  • 8/3/2019 Tj Project Report-final 1 23

    25/31

    25

    Fig.5.4 Calculation of ISE and IAE (step input 200-400) using Cohen-coon

    From the Fig no 5.4 above it is seen that the ISE and IAE values have been

    calculated. This has been done for a process with a step input change of 200-

    400 units. A disturbance has been added to the system and the process is being

    controlled by a PID controller which has been modelled by the Cohen-Coon

    method.

    In the figure above the block showing 'Display' gives the ISE whereas the

    block which reads 'Display1' gives the IAE.

    Below are all the MATLAB simulations which show the closed loop response

    with the applied disturbances for various set point changes and various tuning

    methods. These responses have been used to calculate the time domain

    specifications.

  • 8/3/2019 Tj Project Report-final 1 23

    26/31

    26

    Fig.5.5 Closed loop response for time domain characteristics (step input

    200-400) using cohen-coon

    Fig.5.6Closed loop response for time domain characteristics (step input 200-300)

    using cohen-coon

  • 8/3/2019 Tj Project Report-final 1 23

    27/31

    27

    Fig.5.7Closed loop response for time domain characteristics (step input 200-400)

    using IMC

    Fig.5.8Closed loop response for time domain characteristics (step input 200-300)

    using IMC

    From the responses obtained above and from the block diagrams it is seen that

  • 8/3/2019 Tj Project Report-final 1 23

    28/31

    28

    Table.5.1 Time domain specifications, ISE & IAE results using Cohen-coon based control and IMC

    based control

  • 8/3/2019 Tj Project Report-final 1 23

    29/31

    29

    CHAPTER 6

    SUMMARY AND CONCLUSION

    6.1 WORK DONE

    The work done includes:

    Introduction: It deals with understanding the dynamics of the process.It gives us knowledge as to why one needs to develop a mathematical

    model and linearise certain processes.

    CSTR: This describes what a continuously stirred jacketed tank reactoris and tells us how it functions.

    Problem Formulation: Used the mathematical model, the materialbalance and energy balance equations to get a linear and a non linear

    model.

    Modeling: The two point method has been used to get the values ofcertain parameters that are required.

    Control: IMC based control and Cohen-Coon based control has beenapplied to get the closed loop responses of the process.

    Time Domain Specifications: Various time domain characteristics werecalculated and they help to show which tuning method is more

    effective.

    The checking of the performance of the controller for various set pointchanges and analysing which control strategy is better suited for the

    purpose of control.

    6.2 CONCLUSIONFrom the analysis and discussions it is seen that the IMC tuning

    method is a better method for controlling the response for the CSTR

    process as compared to the Cohen-Coon method. This is because with

    the IMC the settling time, ISA & ISE values are smaller as compared

    to those of the Cohen-Coon method.

  • 8/3/2019 Tj Project Report-final 1 23

    30/31

    30

    It is noticed that the with the IMC controller

    1) Process variable generally does not overshoot its set point aftera disturbance or set point change.

    2) Less sensitive to error made in measuring the dead time.3) Absorbs the disturbance better and passes less of it to the

    process.

    4) The closed loop time constant is user defined; hence it has one parameter which can help in speeding up or slowing down the

    process.

    Whereas with the Cohen-Coon controller

    1) It can give really bad results if the dead time is measuredincorrectly.

    2) Aims for quarter amplitude damping rather than a first orderProcess with dead time.

    3) Leads to low damping and high sensitivity in the system.

    6.3 SCOPE FOR FUTURE WORKIn the present work an attempt has been made for modeling , and the

    control of a CSTR process through simulation using MATLAB

    software. The present work can be extended by doing real time

    experimental work for a CSTR process and to implement the above

    said controllers. .

  • 8/3/2019 Tj Project Report-final 1 23

    31/31

    REFERENCES

    1. Patterson D.W, "Artificial Neural Networks-Theory and Applications",Patience Hill, 2008

    2. Bequette, B.W. "Process Control: Modelling, Design and Simulation",Patience Hill, Upper Saddle River

    3. N.Kanagaraj, P.Sivashanmugam and S.Paramasivam, "Fuzzy CoordinatedPI Controller: Application to the Real-Time Pressure Control Process",

    Hindaai Publishing Corporation,Volume 2008.

    4.

    Stephanopoulos, George. Chemical Process Control: An Introduction toTheory and Practice. New Delhi: Prentice-Hall of India Private Limited,

    2003.

    5. Doug Cooper, Robert Rice, Jeff Arbogast, "Cascade vs. Feed Forward forImproved Disturbance Rejection" Presented at the ISA 2004, 5-7 October

    2004, Reliant Center Houston, Texas.

    6. Takagi S, Sugeno M. "Fuzzy identification of fuzzy systems and itsapplication to modelling and control", IEEE Trans. Systems Man Cybern.,

    Vol 15, 116-132

    7. Brian Rofell, Ben Betlem. " Linearization of model equations" in ProcessDynamics and Control, 1

    stedition, John Wiley and Sons limited, 2006, pp

    97-127.