This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.
This chapter describes the modeling and the basic PI controller tuning i.e. Ziegler - Nichols tuning for a CSTR process in detail. Since it is necessary to maintain a temperature level constant always, set point tracking is very essential. So, in order to make a proper and accurate control action, tuning of different parameters of the controller should be very important. A conventional tuning known as Ziegler - Nichols tuning method is described. Dominant pole method is also developed and it is compared with Z-N reaction curve method.
Mathematical modeling is the process of constructing mathematical objects whose behaviors or properties correspond in some way to a particular real-world system. A mathematical object could be a system of equations, a stochastic process, a geometric or algebraic structure, an algorithm, or even just a set of numbers. The term real-world system could refer to a physical system, a financial system, a social system, an ecological system, or essentially any other system whose behaviors can be observed.
There are of course many specific reasons for modeling, but most are related in some way to the following two:
To gain understanding: A mathematical model accurately reflects some behavior of a real-world system of interest which can often gain improved understanding of that system through analysis of the model. Furthermore, in the process of building the model, certain factors are most important in the system, and how different parts of the system are related.
To predict or simulate : Very often it is necessary to know what a real-world system will do in the future, but it is expensive, impractical, or impossible to experiment directly with the system. Examples include nuclear reactor design, space flight, extinction of species, weather prediction, neutralization process, and so on.
2.2.1 The Scheme of Process Modeling
Modeling is important in process industries. There is no definite algorithm to construct a mathematical model that will work in all situations. Modeling is sometimes viewed as an art. It involves taking whatever knowledge it has made of mathematics and of the system of interest and also using that knowledge to create something. Since everyone has a different knowledge base and a unique way of looking at problems, different people may come up with different models for the same system. There is usually plenty of room for argument about which model is "best". It is very important to understand at the outset that for any real system, there is no "perfect " model.
One is always faced with tradeoffs between
Increasing the accuracy of a model generally increases cost and decreases flexibility. The goal in creating a model is usually to obtain a sufficiently accurate and flexible model at a low cost.
Real World Data
Predictions and Explanations
Figure 2.1 Schematic flow of modeling process
One of the most useful ways to view modeling is as a process, as illustrated in Figure 2.1. The starting point is in the upper left-hand corner, real world data. This could represent quantitative measurements of the system of interest, general knowledge about how it works, or both. In any case, there is a need for some information pertaining to the system. From that information, a model has been formulated or constructed. Constructing a model requires:
A clear picture of the goal of the modeling exercise.
A picture of the key factors involved in the system and how they relate to each other. This often requires taking a greatly simplified view of the system, neglecting factors known to influence the system, and making assumptions which may or may not be correct. A model may consist of algebraic, differential, or integral equations, stochastic processes, geometrical structures, etc. The following situations are very common in modeling:
Good models already exist for parts of the system. The goal is then to assemble these "sub models" to represent the whole system of interest.
Good models already exist for a different system, which can be translated or modified to apply to the system of interest.
A general model exists which includes the system of interest as a special case, but it is very difficult to compute with or analyze the general model. The goal is then to simplify or make approximations to the general model which will still reflect the behavior of the particular system of interest. The scientific method goes something like this:
1. Make general observations of phenomena
2. Formulate a hypothesis
3. Develop a method to test hypothesis
4. Obtain data
5. Test hypothesis against data
6. Attempt to confirm or deny hypothesis
2.2.2 Mathematical Modeling of a CSTR process
220.127.116.11 Process Description
Chemical reactions in a reactor are either exothermic (release energy) or endothermic (require energy input) and therefore require that energy either be removed or added to the reactor for a constant temperature to be maintained.
Figure 2.2 shows the schematic of the CSTR process. In the CSTR process model under discussion, an irreversible exothermic reaction takes place. The heat of the reaction is removed by a coolant medium that flows through a jacket around the reactor. A fluid stream A is fed to the reactor. A catalyst is placed inside the reactor. The fluid inside the reactor is perfectly mixed and sent out through the exit valve. The jacket surrounding the reactor also has feed and exit streams. The jacket is assumed to be perfectly mixed and at a lower temperature than the reactor.
Figure 2.2: CSTR process
Table 2.1 The CSTR parameters
Process flow rate
Reaction rate constant
1 Ã- 104 K
Inlet coolant temperature
Heat of reaction
1 Ã- 103 g/l
Inlet feed concentration
Heat transfer coefficient
7 Ã- 105 cal
The parameters of the CSTR process  used in this work are tabulated in Table 2.1.
2.3 Linearization of the Chemical Reactor Model
The component balance for the reactor can be given as:
And the energy balance equation by:
Equation (2.1) can be written as:
Equation (2.1) can be linearized as:
which can be written as:
Rearranging terms and introducing the laplace operator results in:
The second energy equation of the reactor model can be rewritten as:
This equation can be written as:
which can be rewritten as:
Rearranging terms and introducing the Laplace operator results in:
The response of the change in reactor outlet concentration to a change in the reactor throughput F can be obtained by combining equations (2.5) and (2.10) while setting the changes in and to zero.
This equation can be rearranged as:
which is a pseudo-first-order equation.
Similarly, can be obtained.
Substitution of the steady state values in the time constant and process gains Results in:
This equation can be rearranged to:
The above two equations are the transfer function of concentration and temperature of the CSTR models.
2.3.1 State Space Model
The linear state space model of a CSTR is given by
Where X is the state variable, U is the input variable & Y is the output variable.
Substituting the steady state solution for the state space matrices A, B, C & D are :-
By substituting the parameters of CSTR from Table2.1 in above matrix the state space model is:-
Figure 2.3 shows the energy balance model of CSTR in MATLAB SIMULINK block. It is developed from the energy balance equation of CSTR given in equation(2.2).
Figure 2.3 .SIMULINK model of Energy balance Equation
Figure 2.4 .SIMULINK model of component balance Equation
Equation (2.1) implies the component balance equation of the CSTR and is modeled in simulink block as shown in Figure.2.4.Combining these two models gives us the complete nonlinear model of CSTR as the TITO(Two Input Two Output) process is represented in figure 2.5.
Figure 2.5 Nonlinear model of CSTR
The open loop characteristics of CSTR system described above is shown in Figure 2.6 and Figure 2.7. for temperature and Concentration variables. The performance measure of the system obtained from step test is tabulated in Table 2.2.It is observed that the temperature part of the CSTR process implies the under damped response having peak overshoot of 63.7% and settling time of 128.12 seconds, both are undesirable for an chemical industry. Step response .The concentration part of the process yields an over damped response which is more sluggish with 137.66 sec settling time and approximately0% overshoot.
Fig2.6 Open loop step response of CSTR process for Temperature input
Fig2.7 Open loop step response of CSTR process for Concentration input
It is mandatory to design a controller which can cope up with both over damped and under damped parts of the same process .The overshoot and the settling time should be eliminated or reduced without affecting the performance of the system is the main task to be achieved in this work.
Table 2.2 Performance indices of open loop step response of CSTR systems
Rise Time (Secs)
Settling Time (Secs)
Peak Time (Secs)
Peak Overshoot (%)
PID Controller Design
The PID controller is also known as a three mode controller. In industrial practice, it is commonly known as proportional-plus-reset-plus-rate controller. The combination of proportional, integral and derivative mode is one of the most powerful but complex controller operations. This system can be used for virtually any process condition. The equations of proportional mode, integral mode and derivative mode are combined to an have analytic expression for the PID mode,
U(s)/E(s) = Kp(1 + 1/Tis + Tds) (2.17)
This mode eliminates the offset of the proportional mode and still provides a quick response. The three adjustment parameters here are the proportional gain, the integral time and the derivative time. PID controller is the most complex of the conventional control mode combinations. The PID controller can result in better control than the one or two controllers. In practice, control advantage can be difficult to achieve because of the difficulty of selecting the proper tuning parameters.
2.4.1 Proportional term
The proportional term (sometimes called gain) makes a change to the output that is proportional to the current error value. The proportional response can be adjusted by multiplying the error by a constant Kp, called the proportional gain.
The proportional term is given by:
Pout: Proportional term of output
Kp: Proportional gain, a tuning parameter
e: Error = Set Point(SP) - Process Variable(PV)
t: Time or instantaneous time (the present)
A high proportional gain results in a large change in the output for a given change in the error. If the proportional gain is too high, the system can become unstable. On the other hand, a small gain results in a small output response to a large input error and hence, a less responsive (or sensitive) controller. If the proportional gain is too low, the control action may be too small when responding to system disturbances.
2.4.2 Integral term
The contribution from the integral term (sometimes called reset) is proportional to both the magnitude of the error and the duration of the error. Summing up the instantaneous errors over time (integrating the error), gives the accumulated offset that should have been corrected previously. The accumulated error is then multiplied by the integral gain and added to the controller output. The magnitude of the contribution of the integral term to the overall control action is determined by the integral gain, Ki.
The integral term is given by:
: Integral term of output
: Integral gain, a tuning parameter
: Error = Set Point(SP) - Process Variable(PV)
: Time or instantaneous time (the present)
The integral term (when added to the proportional term) accelerates the movement of the process towards the set point and eliminates the residual steady-state error that occurs with a proportional only controller. However, since the integral term is responding to accumulated errors from the past, it can cause the present value to overshoot the set point value.
The derivative action is sensitive to measurement noise. Hence, the derivative term is not used in the design of the controller.
2.5 Loop Tuning
Tuning a control loop is the adjustment of its control parameters (gain/proportional band, integral gain/reset) to optimum values for the desired control response. Stability (bounded oscillation) is a basic requirement, but beyond that, different systems behave differently and the different applications also different applications have different requirements. Further, some processes have a degree of non-linearity and so parameters that work well at full-load conditions don't work when the process is starting up from no-load; this can be corrected by gain scheduling (using different parameters in different operating regions). PI controllers often provide acceptable control even in the absence of tuning, but performance can generally be improved by careful tuning.
2.5.1 Tuning methods
There are several methods for tuning a PI loop. The most effective methods generally involve the development of some form of process model, and then choosing P and I based on the dynamic model parameters. Manual tuning methods can be relatively inefficient, particularly if the loops have response times on the order of minutes or longer. The choice of method will depend largely on whether or not the loop can be taken "offline" both for tuning and for the response time of the system. 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.
Normally PI controllers are used in all process industries. Integral controller adds a pole at the origin and increases the system type by one. It also reduces the steady state error due to a step function input to a zero. The PI controller transfer function is given by:
Figure 2.8 CSTR process with feedback control loop
From the mathematical model of the CSTR process, it is well known that the concentration of the product is affected by the change in temperature of the reactor. The main objective of this work is to maintain the temperature of the reactor at particular value, say 350K in order to keep the concentration at constant rate. The requirement of the controllers developed in this work is to maintain the temperature by manipulating the coolant flow rate.
A PI controller is used to reduce or eliminate the steady state error. The control diagram of the CSTR process is shown in figure 2.8. It uses a feedback controller, which makes the plant less sensitive to changes in the surrounding environment. The feedback controller tries to eliminate the impact of load changes and to keep the output to the desired response. The deviation of the process output to the desired set point value is known as the error (E). A PI controller eliminates the error by manipulating the input (U) with respect to the process. A PI controller is capable of accurate control when properly tuned and used. If the PI controller parameters are chosen incorrectly, the system can be unstable, i.e. its output diverges with or without any oscillation.
2.5.2 Ziegler-Nichols Tuning Rule
The Ziegler-Nichols tuning rule would serve as the basis for the PI technology. The Ziegler-Nichols tuning is not a very limited technology. It is successful in that role because of its improved performance, ease of use and low cost. In 1942, Ziegler and Nichols, both employees of Taylor Instruments, described simple mathematical procedures; the first and second methods respectively, for tuning PI controllers. These procedures are now accepted as standard in control systems practice. Both techniques make a priori assumptions on the system model, but do not require that these models be specifically known. Ziegler-Nichols formulae for specifying the controllers are based on plant step responses. Ziegler and Nichols conducted numerous experiments and proposed rules for determining values of Kp, Ki and Kd based on the transient step response of a plant. Two methods are popular for determining the controller parameters.
18.104.22.168 Z-N Open Loop Method
The first method known as the Ziegler-Nichols Step Response Method (Using the reaction curve) is applied to plants with step responses. It is also typical of a plant made up of a series of first order systems. Figure 2.9 shows the reaction curve for a step response. The S-shaped reaction curve can be characterized by two constants, delay time L and time constant T, which are determined by drawing a tangent line at the inflection point of the curve and finding the intersections of the tangent line with the time axis and the steady-state level line. It does not apply to plants with neither integrator nor dominant complex-conjugate poles, whose unit-step response resemble an S-shaped curve with no overshoot
Figure 2.9 Reaction curve for a unit step response
This S-shaped curve is called the reaction curve. Using the parameters L and T, the values of Kp, Ki and Kd can be set according to the formula shown in the Table 2.4, below .
Table 2.3 Controller Parameters using Reaction Curve Method
These parameters will typically give a response with an overshoot of about 25% and a good settling time. Fine-tuning of the controller using the basic rules relate each parameter to the response characteristics.
22.214.171.124. Model Reduction
The higher order process can be reduced as a First Order process with Dead Time (FODT) by the half rule reduction technique. The largest neglected (denominator) time constant (lag) is distributed evenly to the effective delay and the smallest retained time constant. The half rule  is used to approximate the process as a first or second order model with effective delay. For a first-order model parameters are k, Ï„ and Î¸.
For example, the second order process can be approximated as. It is proposed to cancel the numerator term (T0s+1) against a ''neighbouring'' denominator term (Ï„0s+1) (where both T0 and Ï„0 are positive and real) using the following approximations.
Here ï± is the (final) effective delay, for which the exact value depends on the subsequent approximation of the time constants (half rule), so one may need to guess ï± and iterate. If there is more than one positive numerator time constant, then one should approximate one T0 at a time, starting with the largest T0.
Normally Ï„0 is selected as the closest larger denominator time constant (Ï„0>T0) and use Rules T2 or T3.The exception is if there exists no larger Ï„0, or if there is smaller denominator time constant ''close to'' T0, in which case Ï„0 is selected as the closest smaller denominator time constant (Ï„0<T0) and use rules T1, T1a or T1b. To define ''close to'' more precisely, let Ï„0a (large) and Ï„0b (small) denote the two neighbouring denominator constants to Ï„0.
Then, select Ï„0=Ï„0b (small) if T0/Ï„0b < Ï„0a/ T0 and T0/Ï„0b < 1.6 (both conditions must be satisfied).
Using the half rule reduction technique described above, the CSTR process can be reduced as a FODT (First Order process with Dead Time).
From equation 2.22, To=458, Ï„a=1000, Ï„b = 250 and K=1
Applying half rule, Î¸d=125 and Î¸=375.
Thus FODT transfer function= (2.23)
The step response of equation (2.23) is shown in figure 2.10.The slope can be obtained by drawing tangent on the curve and the process gain K is the ratio of maximum output to input and the value of time constant T which is the time taken to reach 63.2%of final output is 400seconds can also be determined from the figure2.8. This curve is settled at 1700 seconds which is about four times of the time constant obtained.The curve indicates the lag L=125 seconds. The parameters of PID controller Kp= 3.6, Ki = 0.004 and Kd=6 are obtained from Table 2.1.
The closed loop response shown in figure 2.12 is obtained by substitution of these PID controller parameters in the block shown in figure 2.11.
Figure 2.10 Step response of CSTR process after model reduction
Figure 2.11 Simulation of PID controller by reaction curve technique
Figure 2.12 Response of PID controller tuned by reaction curve technique
2.6. Design of PID Controller Using Dominant Pole Method
PID controllers are probably the most commonly used controller structures in industry. They do, however, present some challenges to control and instrumentation engineers in the aspect of tuning of the gains required for stability and a good transient performance. There are several prescriptive rules used in PID tuning. An example could be what was proposed by Ziegler and Nichols in the 1940's. These rules are by and large based on certain assumed models.
2.6.1. Calculation of Kp , Ki and Kd Values Dominant Pole Method
The concentration part implies the transfer function whose step response is in over damped in nature. It is difficult to tune a over damped second order process with Zero using Z-N closed loop tuning method because Z-N closed loop tuning rule based on sustained oscillation. It is difficult to find ultimate gain in a overdamped process since very high gain is required to generate limit cycle oscillation which leads to unstability in system. Dominant pole is one popular way to design PID controller for such a process by placing a pole in a safe and stable region such a way that the effect of zero can be compensated. The effect of Zero in PI controller is cancelled, (Astrom (2001))by the inclusion of new pole. The design start with locating a pole =0.8 and =2.5, the significance of locating a pole in this region will maintain stability and reduce the impact of over damping. The coefficients of PI controller can be obtained by the following design.The transfer function of the concentration of the chemical process can be rearranged as:
Put s=sd , Dominant Pole, in the above equation
The Sd can be found out by the formula
Assume =0.8 and =2.5
Converting into polar form
Therefore D=2 and
Substitute Equation (2.29) in (2.26)
Solving the equation into polar form as
Equation is reduced as
From the above equation number (2.32) Ad and Ï†d can be calculated as
Ad= 0.0589 and Î¦d = -115.33Â°
Where Ad is the magnitude and Î¦d is the phase.
From these values the derivative constant Kd value can be found as by the formula
The proportional constant value Kp can be found out by the formula
The integral constant value Ki can be found out by the formula
The values obtained for the PID controller parameters are summarized as below:
Proportional Constant value,
Integral Constant value,
Derivative Constant value,
A proportional-Integral (PI) controller is a generic control loop feedback mechanism that is widely used in industrial control systems. If a controller starts from a stable state at zero error i.e. Process Variable equals to Set Point (PV = SP), then further changes by the controller will be in response to changes in other measured or unmeasured inputs to the process that impact on the process, and hence on the PV. Variables that impact on the process other than the Manipulated Variable (MV) are known as disturbances. Generally, controllers are used to reject disturbances or implement set point changes. Changes in feed water temperature constitute a disturbance to the temperature control process.
2.7 Simulation Results
The tuning of a PI controller for the CSTR process is carried out by the dominant pole tuning method. Figures 2.13 illustrate the output response of a PI - tuned CSTR process. Table 2.4 shows that the dominant pole tuned method makes the CSTR process produce an output response with a marginally good transient response and a good steady state response.
Figure 2.13 Response of PID controller tuned by dominant pole technique
Table 2.4 Performance indices of Conventional PID Controller
Delay Time (Secs)
Rise Time (Secs)
Peak Time (Secs)
Settling Time (Secs)
Peak Overshoot (%)
Dominant Pole method
In this chapter, the higher order system is reduced into FODT process using a novel technique called half rule and tuning procedures are implemented using Reaction Curve Method and Dominant Pole Analysis Method. From the results, it is inferred that the Dominant Pole Method implies less overshoot and settling time compared with Reaction Curve method. This system should be fine tuned and peak shoot should be nullified. Hence, different tuning algorithms have been developed for improving its performance in the following chapters.