Anda di halaman 1dari 28

CBE 4424 Computer Process Control

CONTROL OF STIRRED TANK HEATER





Course Project
Submitted to: Professor s.Rohani










Dawood Al-Mosuli 250715524

CBE 4424 Computer Process Control






Course Project
Submitted to: Professor s.Rohani










Dawood Al-Mosuli 250715524




Abstract
In this course project, we tried to tune PID controllers to control the liquid level and temperature
in a stirred tank.
The method used is tuning the PID controllers using the tuning facility in the Simulink program.
Tuning parameters are got in time, S and discrete domain. Nose is added using Band limited
White noise to the feedback loop of the discrete mode. The effect of noise on the system is
monitored and the highest noise power which could be handled by the system without bringing
the system into instability is recorded. The effects of noise are reduced by adding a first order
filter.
The conclusions and reference are cited at the end and the datasheet of the tank is demonstrated
in the appendix.

















Introduction and Process description
One of the most applicable apparatuses in chemical plants, reservoirs, drums or tanks are
commonly used in industry. These tanks represent continuous stirred tank reactors or are
installed in the outlet of a reactors or distillation towers or may use to keep the material in a
certain situation for a specific period of time, before pumping them to other plant locations.
Often in each tank, the variables that should be controlled are temperature and the liquid level of
the tank in order to avoid overflow, leaking spoilage and other common problems.
In this process, there are 2 streams of liquids at different temperatures to be mixed together in the
tank and come out as a single stream with a flowrate equal to the summation of the input flow
rates and temperature should be kept between the input stream temperatures.
In order to control these variables we use two control valves installed at each of the inlet streams
to control the temperature and liquid level inside the tank.
Density and heat capacity of the streams are assumed to be the same of the tank. The tank
components are assumed to be well mixed.
The controllers used in this tank are PID controllers and all the loops are feedback loops.
First of all, the simulation is offered in time domain, then simulations are given s and discrete
domains. In the discrete domain, the effect of noise and noise filtration are studied.








P&ID of the process and Block diagram
Figure 1-a shows the simple P&ID of the process


I/P I/P


LC
h TC

LT TT

F(t) ,T(t)



Figure 1

Fh(t),T(t)
Fc(t),Tc(t)




Mathematical modeling

Disturbances
Th Tc Fc

FC Process T(t) Control variables
Fh h(t)

Figur2
Manipulated variables
The system can be represented by the above figure. This system requires 8 individual transfer
functions relating h and T to input variables (4 for T and 4 for h) .
Step 1: Linearization of non-linear mass and energy balances.
Mass balance: ; dV/dt=Fh(t)+Fc(t)-F(t) ---------------------1

Energy balance: (dV(t) T(t))/dt=Fh(t)Th(t)+Fc(t)Tc(t)-Ft(t)-----2
Both above equations are nonlinear.
For the mass balance equation, using the linearization of the relationship between F(t) and
h(t)
I.e. F(t)= K*h^0.5
Taylor series y(t)=~ K*hi^0.5+(h-hi)K/(2h^0.5) --------------------3
This is ended by the following equation in the Laplace domain:

h(s) = Fc(s)/(As+B) +Fh(s)/(As+B) ------------------------------------4
Where A is the tank cross sectional area. K is the flow resistance. B =K/(2hi^0.5)
From the energy balance of the system, the following equation is got in the S domain:
T(s)={[(Thi-Ti)/Fi]/(tp*s +1)}* Fh(s) + {[(Tci-Ti)/Fi]/(tp*s + 1)}*Fc(s) + {[(Fhi/Fi]/(tp*s +1)}
*Th(s) + {[(Fci/Fi]/(tp*s +1)} *Tc(s) -------------------------------------------------5
tp is the time constant = A*hi^0.5/K
Fi=K*hi^0.5
The symbol Indicates the initial conditions for the system .
By assuming that the steady state level is 16 meter at outlet flowrate =200 M
3
/min.
The value of K=50 is got. Cross sectional area is assumed to be 20 m^2. Steady state outlet
temperature is choose to be 30
o
C.











Block diagram for the system in S domain

Th(s) (Fhi/Fi)/(tp s +1)



Tc(S) (Fci/F1)/(tp s +1)

+
Fc(s) 1/(A S +B) h(s)
+
((Tci-Ti)/Fi)/(tp s+1)

Fh (s) 1/(A S +B)
+ + +
((Thi-Ti)/Fi)/(tp s+1)
+ T(s)

Figure 3



Time domain simulation and results.





Figure 4 Simulation of the system in time domain simplified by a subsystem.








Figure 5 Details of the subsystem; hot water flow is used to control the tank level while cold
water flow is used to control the tank temperature.












Figure 6 Whole system with its details.







Results in time domain


Time
Figure 7. Response of the system in time domain using PID controller. Temperature in green, level in
blue. 30 is the set point for temperature, 16 is the set point for level









S domain simulation



Figure 8. Simulation of the S in time domain.


S domain results

Time
Figure 9. Response of liquid level with time (solution in S domain)
Time
Figure 10. Response of output temperature with time (solution in s domain)
30 is the set point for temperature, 16 is the set point for level.
Level

Level



Simulation in discrete domain

Figure 11. Simulation of the system in discrete domain simplified by a subsystem.












Figure 12.Details of the discrete subsystem (Zero order hold is added)
Results in discrete mode

Time
Figure 13.Response of liquid level with time.

Time
Figure 14.Response of outlet temperature with time.
30 is the set point for temperature, 16 is the set point for level
Level
Temperature


Discrete mode simulation after adding noise
Band limited white noise is added to the system. It is found that the system can handle a
maximum noise power of till reaching 15.0. The temperature doesnt affect in a significant
manner, but the level suffers from a fluctuation around 25% around its original value. The
effect of adding first order filter is noticed. The discrete transfer function of this filter is a/(1-(1-
a)*z
-1
). The values of a range from 1 for no filtration to 0 for complete blocking of noisy signal.

Figure 15.Simulation of the process after adding noise without filtration. Filter is tuned to be
inactive.
Results of adding noise without filtration.




Time
Figure 16.Response of tank level after adding noise(magnitude=15) with time
Level

Time
Figure 17.Response of outlet temperature after adding noise (magnitude =15) with time.
30 is the set point for temperature, 16 is the set point for level


Noise filtration.
Due to the strong effect of noise, a strong filter with (a) factor=0.1 is added to the level control
loop. Another filter with (a) factor of 0.9 (weaker than that used for the level)is added to the
temperature control loop since the temperature doesnt affect a lot by the noise level. The
simulation is as follows:

Temperature

Figure 18.Simulation of the system after adding Filter.







Results of adding filter

Time
Figure 19.Response of liquid level after adding filters with (a)=0.1 for level ,0.9 for
temperature.

Time
Figure 20.Response of outlet temperature after adding filters with (a)=0.1 for level, 0.9 for
temperature.
Level
Temperature
30 is the set point for temperature, 16 is the set point for level.
If the (a) factor for the temperature controller increased to be 0.9 as in the level controller,
then this will cause over shooting for both temperature and level to an unacceptable values as
in the Figures below.


Time
Figure 21.Response of liquid level after changing the filtration factor (a) of the temperature
controller from 0.9 to 0.1. High over shooting of 37 is noticed. Noise level is still 15.


Level

Time
Figure 22.Response of outlet temperature after changing the filtration factor of the
temperature controller (a) from 0.1 to 0.9. Significant over shooting is noticed. Noise level is
still 15.
30 is the set point for temperature, 16 is the set point for level

Effect of deleting the differential action from the controller.
In order to avoid increasing noise effects, the differential action is deleted and PI controller is
used instead. Noise level is kept 15. The following results are noticed without filtration.
Temperature

Time
Figure 23.Level response when using PI controller at noise level 15 without using filter.

Level

Time
Figure 24.Temperature response when using PI controller at noise level 15 without using filter.
(smoother response than in the case of PID controller).

Time
Effect of adding filters on level response { (a)=0.1 for level, and 0.9 for temperature} to the PI
controller at noise amplitude=15

Level

Time
Effect of adding filters on temperature response { (a)=0.1 for level, and 0.9 for temperature} to
the PI controller at noise amplitude=15


Conclusions and discussion of results
1- It could be seen that in continuous time or s domain, the responses of both level and
temperature with time reach the set-points without offset. This is due to the use of PID
controller. The time domain solution reaches the steady state value in a longer time.
The difference in the solution shapes is due to the approximation of Laplace domain.
2- The solution in discrete mode is stable and reaches set-points without offset for both of
PID and PI controllers.
3- Adding noise causes a lot of instability to the system as seen in the Figures given. When
adding a noise of magnitude of 15, the response is still stable but oscillates with a
magnitude of -+30% around the set point for the level and -+15 for temperature. When
Temperature
the controller is changed into PI, the level response is still oscillating, but the
temperature response is smoother than in the case of PID controller.
4- When adding first order filter to minimize the effect of noise, there is a smoothing of the
curve when strong (a) of first order filter is added. But overshooting of the response
especially with the level is noticed. It causes the level to jump to 25 if filter with (a)=0.1
is used for the level control loop and of 0.9 is used for the temperature control loop at
all noise magnitudes from 1 to 15. If filters of (a) = 0.1 are used for both temperature
and level control loops then an over shooting of magnitude of 37 . If the tank height was
in meter. Then when designing a tank with a level set-point of 16 meter, the tank height
should be around 18 meter. With overshooting of 37 meter, the tank will flood. Similar
results are got with PI controller. Decreasing the filtration power to (a)= 0.9 for both
level and temperature will have similar overshooting in level and larger amount of
oscillation. It is concluded that using filter as a mean for smoothing the response can
cause larger problem of overshooting, and it is better to avoid the noise sources. Tuning
the controller with the existence of filter increase the overshooting, and make the
condition even worse.
5- Noise level of magnitude of 10 is acceptable, since it causes oscillation which reaches
amount of 12.5% in level which could be handled by increasing tank safety height. It has
no significant effect on temperature
Reference
Dr.s.Rohani 2013 advanced process control course notes.