Assignment title: Information
Investigate the application of PID controllers in process control using MATLAB
Instrumentation & Control
Assessment: Investigate the application of PID controllers in process control using MATLAB
MATLAB Lab Assignment No. 1: Design of a Liquid Level Control System
Objective:
To design an open loop control system for liquid level control in a liquid tank.
To simulate the open loop control system using the Matlab software.
To investigate the step response and application of the open loop system.
Theoretical back ground
Parameters of the given liquid level system
Height of Tank = 4 m,
Maximum fuel level = 3 m,
Radius of Tank = 2 m
Tank capacity (volume) = 37.68 m3,
Process valve position: 0 – 25 mm,
Process input signal: 0 – 6 bar,
Exit pipe restrictance parameter = 140 s/ m2.
Defining main process control elements
2.1 The process is the change in the level of liquid in the Tank.
The input is the inflow, qi(t). The Output is the height (liquid level), h(t)
2.2 The Measurement Transducer is a gauge pressure sensor:
Height can then be found from the relationship: h(t)=(P(t))/?g
Where ? is the liquid density, and g is the gravity, 9.8 [m/s2].
Transducer converts measured pressure to an equivalent electrical current signal (mA).
2.3 The Actuator is a current-to-pressure converter; the pressure signal then drives a linear valve. The valve position determines the flow rate out of the valve, qi(t).
By combining the Actuator – Process – Transducer block diagrams we find the total process block diagram:
3. Defining the transfer function of the process control elements.
3.1 The process block
Find the relationship between input and output signals. The physical equation governing the change in the liquid is given as:
rate of change of volume of liquid = inflow – outflow
Then, the mathematical equation will be: d/dt (h(t)A)=qi(t)- qo(t)
Assume A is constant, and the outflow is given by: qo(t)=(h(t))/R
where R is a parameter due to pipe restrictance.
Applying the differential equation, yields:
A dh/dt=q_i (t)-(h(t))/R ? RA dh/dt-h(t)=?Rq?_i (t)
Time constant, t = RA = p r2 R = 3.14 * 22 * 140 = 1758 s = 29.3 [min] and system gain K = R = 140 [s/m2].
Applying Laplace transformation: t(sH(s)-h0) + H(s) = K Qi(s).
Assuming level starts at zero (i.e. h0 = 0):
H(s)=?G_p (s)Q?_i (s)=K/(ts+1) Q_i (s)
3.2 The transducer block – Pressure gauge transducer
To model this transducer we need to consider the following:
Relationship between tank level and pressure
Relationship between pressure and current signal
?
Gm = G1 G2
For G1, consider the physical law:
Pressure = density * gravitational constant * head
p(t) = ? g h(t) [pascal]
For water: ? = 1000 kg/m3
p(t) = 1000 * 9.8 * h(t) = 9810 h(t) [Pa]
p(t) = 0.0981 h(t) [bar]
G1 = p(t) / h(t) = 0.0981 [bar/m]
For G2, the relationship between pressure and current; consider the range (span) of input and output signals. From technical specifications for pressure transducer:
Output signal: 4 to 20 [mA]
Span limit: 130 [kPa] (1.3 bar)
Input signal: -100 to 130 [kPa] (-1 to 1.3 bar)
Note: 1.3 [bar] maximum pressure corresponds to a height, approximately equals to: h(t) = p(t) / 9.81 = 13.3 [m]
The maximum head in the given system is 3 [m]; then the lower and upper limits of the instrument can be set to:
Lower limits: 0 [bar] ? 4 [mA]
Upper limits: 1.3*(13.3) = 0.294 [bar] ? 20 [mA]
G2 is found by considering the ratio of the change in output to the change in input:
G_2=(i(t))/(p(t))=(20-4)/(0.294-0)=54.4 [mA/bar]
Combining the two elements, results:
Applying Laplace transform:
Hm(s) = Gm H(s) , Gm = 5.34 [mA/m]
3.3 Actuator block
Consider a diaphragm valve to control the flow of liquid in the tank. The actuator block diagram can be given as follows:
Typical information for G3 – current to pressure converter:
ic(t) 4 – 20 [mA]
pc(t) 0 – 6 [bar]
Hence, G_3=(p_c (t))/(i_c (t))=(6-0)/(20-4)=0.375 [mA/bar]
The physical equation for G4 can be written as:
pressure * diaphragm area = spring stiffness constant * stem position
pc(t) Ad = Ks x(t) ? x(t)=A_d/K_s p_c (t)=G_4 p_c (t)
Let diameter be 100 mm and spring stiffness is 188400 [kg/m], then:
G_4=?p(0.05)?^2/188400=4.17*?10?^(-8) [m/N]˜4.17[mm/bar]
For G5 – relationship between valve stem position and liquid flow
The flow that passes through a valve is given by:
f(t)=a(t)Cvv(?p(t)/?)
a(t)-fractional opening of the valve, Cv-flow coefficient of the valve
?p(t)-pressure drop across the valve, ?-density of the liquid
For a linear valve a is the stem position, x(t); then assuming ?p constant:
qi(t) = G5 x(t) [(m^3/s)/mm]
For a linear valve, the gain, G5 = rated flow /100% change in input signal
For example: For a rated flow of 200 [m^3/hr] = 0.56 [m^3/s],
G5 = 0.56 * 10-3 [m^3/s] for 1% change in input.
By knowing the range of input (say 0 – 25 mm), we can determine the valve gain for 1 [mm] change (that is 4% of input range in our example) in stem position:
G5 = 0.56 * 10-3 *4 = 0.00224 [m^3/s] for 4% change in input
Total actuator block diagram:
qi(t) = Gv ic(t) The Laplace transform: Qi(s) = Gv I(s)
3.4
Complete Actuator – Process – Transducer block diagram
4. MATLAB Simulink simulation of open loop control system and analysis
The following diagram shows modelling the open loop control system for the liquid level in the tank. The above calculated parameters of the control elements are to be used in the model.
Note: 1) The element Qo=h(t)/R shown in the diagram is added to monitor the liquid out flow as a function of height.
2) The limiter "Tank height, 4m" is added as liquid level cannot exceed 4m as liquid will start flooding from the top of the tank if the level keeps rising to the top.
5. Assignment
a) Use MATLAB Simulink software to model the system using the parameters of the control elements as derived above.
b) Apply a 1mA current step representing a control signal to the Actuator and comment on the system response using the results shown in the two Oscilloscopes.
1. Show the liquid level change in meters and its corresponding change in mA at the output of the transducer using appropriate scales.
2. How much is the change in the liquid level as a result of the step control signal?
3. What makes the level reach a steady state condition?
4. Show the inflow and out flow rates in a graph with appropriate scales.
5. What is the inflow and out flow rates in m3/s?
c) Apply an 8mA current representing a control signal to the Actuator to open the inflow valve even more and comment on the response in this case.
1. Show the liquid level change in meters and its corresponding change in mA at the output of the transducer in a graph with appropriate scales.
2. How much is the change in the liquid level as a result of the 8mA control signal?
3. Show the inflow and out flow rates in a graph with appropriate scales.
4. Compare the inflow and out flow rates in m3/s and explain your observations?
d) Write your conclusion about the application of open-loop control for the liquid level control.