0% found this document useful (0 votes)
45 views

Water Tank Level Control Control Systems Analysis

Uploaded by

muayyadullah11
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Water Tank Level Control Control Systems Analysis

Uploaded by

muayyadullah11
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

lOMoARcPSD|25258607

Water Tank Level Control - Control Systems Analysis

Control Systems Analysis and Design (Queen Mary University of London)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Queen Mary University of London


School of Engineering and Materials
Science

DEN5200 – Control Systems Analysis


and Design
Water Tank Level Control

Ishak Hussain

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

Abstract
The primary aim of this experiment focused on the purpose of a PID controller in order to control
and regulate the fluid level in a water tank in comparison to a basic open loop system – this could
be achieved by calculating the time constants. As a result, the experiment was comprised into two
different sections in order to calculate the time constants: first using a graphical method
(specifically using the CE2000 software) and secondly observing the difference in flow rates and
heights when the system experienced a step input. This report includes an introduction, a design
of the PID model using Simulink, a description of the experiments taken place and finally a results
and discussion section to finalise the findings of the project.

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

Table of contents
Abstract ............................................................................................................................................ 2
1 Introduction ................................................................................................................................ 4
2 Problem Setup............................................................................................................................. 4
3 Controller Design and Numerical Simulation ......................................................................... 7
3.1 Proportional term ............................................................................................................... 8
3.2 Integral term ........................................................................................................................ 8
3.3 Derivative term .................................................................................................................... 8
3.4 PID Design Controller ......................................................................................................... 8
4 Experimental Validation............................................................................................................ 9
4.1 Experiment 1 ........................................................................................................................ 9
4.2 Time Constant (Calculation) .............................................................................................. 9
4.3 Time Constant (Graph) ..................................................................................................... 10
4.4 Time Constant (Comparison) ........................................................................................... 11
4.5 Experiment 1 Set-up .......................................................................................................... 11
4.6 Experiment 2 ...................................................................................................................... 12
5 Discussion.................................................................................................................................. 14
6 Conclusion ................................................................................................................................. 14
7 References ................................................................................................................................. 15

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

1 Introduction
This experiment focused on the effect of a PID controller for the control of a fluid within a water
tank. A PID controller is an instrument used to regulate process variables such as temperature,
flow and pressure using a control loop feedback mechanism – this controller consists of three
modes of control: proportional, integral and derivative. [1] In this experiment, a level transmitter
(LT) was used to measure and regulate the level of fluid in the water tank by converting the water
levels into electrical signals which would then control the actuator – this will allow an error to be
calculated thus establishing whether or not the flow rate needs to be adjusted. [3] As mentioned
previously, the efficiency of the PID was established through a two-part experiment. The first
experiment did not involve a PID controller. Instead, a basic open loop system was used and a
comparison was made between the two time constants calculations: one attained by the graph
from the CE2000 software and the other attained using manual calculation. The second
experiment used a PID controller, in which three different tests were held: the proportional and
integral gains and the derivative remained at zero during these trials. The results from this
experiment were processed into graphs presented in Section 4 and a comparison of the time
constants were calculated.

The aims of the experiment are as follows:

• To design and understand a PID controller using programming software such as


MATLAB/Simulink and validate the control performance in a real-time experiment.
• To acquire first-hand experience in tuning a PID controller as well as establishing a real-
time control system.
• To practise general analytic skills in order to compare all the time constants processed to
determine the effectiveness of a PID controller.

2 Problem Setup
2.1 Overview of the Experiment

The experimental system, as already mentioned, can be separated into two different parts: the
Open Loop level step response and Level Control pump speed which is regulated by the use of the
PID controller. In order for this experiment to take place, the CE117 Process Trainer, the Control
Module and the CE2000 software was required. These were all provided by the laboratory
technicians.

Figure 1: Process Flow Circuit with added labels [3]

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

Figure 2: Picture of the Experimental Procedure taken in the Lab session

2.2 Equipment

The selected equipment used for this experiment as well as outlining their purpose is shown
below:

• Process Vessel – Allows the accurate measurement of the water level


• Cooler – Used to reduce the temperature of the water in the process vessel
• Bypass Valve – Via the cooler and proportional valve, it delivers water from the reservoir
to the Process Vessel
• Reservoir – Used to store water
• Drain Valve – Used to deliver water back to the reservoir using the function of gravity
• Level Transmitter (LT) – Provides an electrical signal that is proportional to the level of
water in the Process Vessel.
• Temperature Transmitter – Used to measure temperature before and after leaving the
cooler.
• Pump 2 – Primary function is to deliver water from the Reservoir to the Process Vessel
via the Cooler and Proportional Valve.
• Flow Transmitter – Measures the flow rate in order to produce a calibrated output signal.
• Air Vent – Adds pressure to the Process Vessel in order to regulate and maintain the
required levels for the experiment.

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

Figure 3: The Control Module Panel used in this investigation

The purpose of the Control Module is to provide access to the actuator and transmitter circuits
involved in the Experimental process. It allows the CE117 hardware and CE2000 software to
function together as it allows the conversion of analogue to digital states, and vice versa.

Figure 4: The CE2000 software interface used in the experimental procedure

The software interface shown above tests and regulates a range of controlled circuits, such as the
one in this experiment, by connecting the system to processes in real-time as well as capturing
data using a controller interface.

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

3 Controller Design and Numerical Simulation


Before conducting the experiments, a pre-lab session was held in order to become familiarized
with the control problem in the investigation. By using Simulink (MATLAB), the task was to design
a controller to satisfy the control targets described in the design brief and this was then validated
in the lab in order to make comparisons with the simulation and real-time results. The Simulink
software was used to generate 𝐾 values which would then be inserted into the following equation:

𝐶 = (𝐾𝑑 𝑠 2 + 𝐾𝑝 𝑠 + 𝐾𝑖 )
Where:
• 𝐾𝑑 is the derivative term
• 𝐾𝑖 is the integral term
• 𝐾𝑝 is the proportional term

Following the given lab instructions, a trial and error method was used until the obtained 𝐾 values
were deemed as satisfactory. The obtained 𝐾 values for the pre-lab session were:

𝐾𝑝 = 9.5
𝐾𝑖 = 2.1
𝐾𝑑 = 0.02

These were then inserted into the block diagram shown in Figure 6 in order to produce the graph
in Figure 5 as shown below.

Figure 5: Graph produced from Simulink using the K values mentioned previously.

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

3.1 Proportional term

The proportional term is given by the following equation:

𝑃𝑜𝑢𝑡 = 𝐾𝑝 𝑒(𝑡)

As seen in the equation above, the higher the error the greater the proportional control and from
this it can be concluded that the proportional control leads the system to a fast Setpoint. On the
other hand, there is a possibility of a steady state error involved, which can lead to an overshoot
when the system gets to the Setpoint. A way to avoid this error is to increase the proportional
term, but this can then lead to an unstable system. [6]

3.2 Integral term

The integral term is given by the following equation:


𝑡
𝐼𝑜𝑢𝑡 = 𝐾𝑖 ∫ 𝑒(𝜏) 𝑑𝜏
0
This term eliminates the steady-state error that was mentioned in the previous section, but a
disadvantage of this is that it has a negative effect to the stability of the system. From the equation
above, it can be concluded that the integral term depends on pass values of the error. [6]

3.3 Derivative term

The derivative term is given by:


𝑑
𝑒(𝑡)
𝐷𝑜𝑢𝑡 = 𝐾𝑑
𝑑𝑡
The function of the derivative term is to generate an estimation of the future error and so it can
adjust the speed of correction accordingly by detecting any potential changes on the error -
whether this value needs to be increased or decreased, for example. It can be concluded that if
the derivative term only changes with the rate of change of the error, then the derivative influence
is considered to be negligible. [6]

3.4 PID Design Controller

Figure 6 below shows the block diagram that was used to produce a voltage against time graph
using the 𝐾 values produced through Simulink (shown in Section 4.1). These were then inserted
into the block diagram – the circled areas on the figure below show where the 𝐾 values were
placed. This system was then ‘run’ in order to produce the graph shown in Figure 5.

Figure 6 : The PID design controller used to initially produce a graph with certain K values but then used to validate the
controller in the Lab sessions.

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

4 Experimental Validation

4.1 Experiment 1

The aim of this experiment was to investigate the response of the system after increasing the step
input by 0.5V. As the initial pump voltage was measured at 4V, the water level was slowly
increased to the desired pump voltage of 4.5V and was allowed to stabilise. This level was taken
to be level A – the height and flow rate for this level was recorded as shown in Table 1. The step
input was again increased by 0.5V to 5V which in turn resulted the flow rate to increase. Again,
this was allowed to stabilize, and the flow rate and height for this level B was recorded. This
difference in flow rate and height allowed for the determination of the time constants for
experiment 1, with a manual calculation shown in Section 4.2 as well as a calculation from the
graph in Section 4.3. The two time constants were then compared in Section 4.4 and a percentage
error was calculated – a percentage error of less than 20% would deem the experiment as
successful.

4.2 Time Constant (Calculation)

As shown in Table 1, the flow rates were measured in volts and was then converted to 𝐿/𝑚𝑖𝑛 for
calculation purposes. Using equation 1 below the flow rate was then converted into 𝑚 3 /𝑠.

1 1
𝑞 = (𝐹𝑙𝑜𝑤 𝑟𝑎𝑡𝑒(𝐿/𝑚𝑖𝑛)) × × (1)
1000 60

The cross-sectional area was calculated where the water level was controlled using equation 2

𝜋𝑑2 (2)
𝑆=
4

where 𝑆 refers to the cross-sectional area and 𝑑 is the diameter of the vessel (in this case, it is
150𝑚𝑚 as given in the lab handout)[3]

𝜋 × (0.15𝑚)2
𝑆= = 0.0177𝑚 2
4

The outflow resistance, 𝑅, is calculated by multiplying the difference in height (𝑚) by the flow rate
(𝑚 3 /𝑠) using equation 3. These equations are shown in more detail in source [3] in the Resources
section.

∆ℎ
𝑅= (3)
∆𝑞

0.018
𝑅= = 3600
0.5 × 10−5

The first time constant can now be calculated by multiplying the area, S, with the outflow
resistance, R, as shown by equation 4.

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

𝜏 = 𝑆𝑅 (4)

𝜏 = 0.0177𝑚 2 × 3600 = 𝟔𝟑. 𝟕𝟐 𝑠𝑒𝑐𝑜𝑛𝑑𝑠

The results obtained from Experiment 1 is shown in the two tables below.

Flow Rate (𝑉𝑜𝑙𝑡) Flow Rate (𝐿/𝑚𝑖𝑛) Flow Rate (𝑚 3 /𝑠) × 10−5 Height (𝑚)

Level A 3.8 3.8 6.33 0.115


Level B 4.1 4.1 6.83 0.133
Difference 0.5 0.018
Table 1: Raw data produced in experiment 1 with the flow rate converted to (L/min)

S (Area) 0.0177𝑚 2
R (Outflow Resistance) 3600
Time constant 𝜏 63.7secs
Table 2: Values of Area, Outflow resistance and Time constant τ produced from experiment 1

The first calculated time constant is 63.7 seconds as shown in Table 2 with the process of
calculation shown in Section 4.2. Another calculation is required to work out the second time
constant, and this is shown in the next section.

4.3 Time Constant (Graph)

Voltage against Time (Experiment 1)


10
B
9

6 A
Voltage (V)

3 LT

2 Pump Flow

1 Flow Voltage

0
-100 0 100 200 300 400 500 600 700
Time (sec)
Figure 7: A graph showing voltage against time for the results produced in Experiment 1

10

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

The time constant 𝜏 refers to the time measured in seconds to charge a capacitor through the
resistor, from an initial charge of zero to roughly 63.2% of the value of an applied DC voltage. [4]
In order to calculate the time constant 𝜏 from the graph above, the voltage at A was subtracted
from the voltage at B (both are labelled on the displayed in Figure 7 above). This was then
multiplied by 0.632 (63.2%). This value was then added to the value at A, and this was then
correlated to find a time reading at this particular voltage reading. This time can be referred to as
𝑡1 . The measured time reading at 𝑡0 (time at A) was subtracted from 𝑡1 to calculate the time
constant. A detailed calculation of this is shown below:

Time at level A (before step increase) – 440.1 seconds

Voltage from LT at Level A – 5.40

Voltage from LT at Level B – 8.99

(𝐿𝑒𝑣𝑒𝑙 𝐵) − (𝐿𝑒𝑣𝑒𝑙 𝐴) = 8.99 − 5.40 = 3.59

63.2% 𝑜𝑓 3.59 = 0.632 × 2.99 = 2.27

2.27 + 5.40 (𝐿𝑒𝑣𝑒𝑙 𝐴) = 7.67

The time reading at Voltage = 7.67 is 492 seconds.

Calculated time reading – time at A:


(492 − 440) = 52 seconds

Time constant obtained from the graph is 𝟓𝟐 seconds.

A comparison between the time constants calculated in sections 4.2 and 4.3 is shown in the next
section by calculating a percentage error.

4.4 Time Constant (Comparison)

Percentage error between time constant from calculations and from graph is shown below:

63.72 − 54
× 100 = 15.3%
63.72

4.5 Experiment 1 Set-up

Figure 8 : A block diagram representing the Open Loop System for experiment 1

11

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

4.6 Experiment 2

The aim of this part of the experiment was to plot a graph using the given CE2000 software but
this time with the presence of a PID controller – this will allow the calculation of certain
characteristics (e.g. settling time, steady state error, etc) which will determine whether or not the
PID was effective. The first graph in Figure 9 shows a trial run (initial conditions) in which LT and
Output were plotted with each other and the other two graphs (Figure 10 & 11) represent the
data produced in the given PID and the experimental PID respectively.

PID: Initial Conditions (Test 1)


12

10

8
Voltage/V

4
LT
2
Output
0
0 50 100 150 200 250 300 350 400 450
Time/s

Figure 9: A graph representing Voltage against Time for PID:Initial Conditions (Experiment 2)

A comparison was made between the voltage against time graphs for the given PID with a PID
controller designed myself with the 𝐾 values used in Section 3. This allowed for the analysis for
rising time, settling time, etc which were all determined from the observation of Figures 10 & 11.
The results of these are shown in Tables 3 & 4. A discussion regarding both these graphs and
tables is included in Section 5.

12

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

Voltage against Time for both components (Given PID)


8

5
Voltage /V

3
LT
2
Setpoint
1

0
0 50 100 150 200 250 300
Time /s

Figure 10: A Voltage against Time graph for the given PID

Rise time (sec) Peak time (sec) Settling Time (sec) Percentage overshoot Steady State error
48.2 160 246.2 2.3% 0.02
Table 3: Analysis of Results of given PID

Voltage against Time for both components (Own PID)


8
7
6
Voltage /V

5
4
3
LT
2
Setpoint
1
0
0 50 100 150 200 250 300 350 400 450
Time /s

Figure 11: A Voltage against Time graph for the designed PID

Rise time (sec) Peak time (sec) Settling Time (sec) Percentage overshoot Steady State error
40.4 223.2 345 3.1% 0.2
Table 4: Analysis of results of own PID

13

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

5 Discussion
From the first experiment, a percentage error was calculated to be 15.3% and although this is
below the desired 20%, this value is still relatively high. Inaccuracies from the experiment could
be due to several errors. Firstly, the reading of the height at each water level was difficult to read
from the meniscus due to the constant fluctuations. There may also have been incorrect
judgement of the stability of water level as, again, the constant fluctuations, resulted in a human
error of measuring a few millimeters off the actual value. A small inaccuaracy like this, can result
in an incorrect time constant calculation (Section 4) as even a milimeter difference can vastly
change the outflow resistance value which in turn will affect the time constant. A systematic error
of this experiment could be related to a parallax error, which means that there is a displacement
error involved based on the viewing angle of, in this case, the water level. [2] A way to reduce this
error in a future experiment is to have the same person reading off the meniscus every time or
have several people check the reading in order to increase the reliability of the result observed.
A way of improving the reliability of the results, in general, would be to repeat the experiment
several times in order to obtain similar readings. However, due to the time-consuming nature of
these experiments, repeats were unable to be taken and so there is a significant possibilty of
random error involved in these results.

When comparing the two PID systems, it can be seen from Figures 10 and 11 that there was a
significant difference between the two settling times. The open loop system produced a settling
time of 345 seconds while the closed loop system (PID Controller) produced a settling time of
246.2 seconds. The difference in settling time can therefore be determined as 98.8 seconds. This
suggests that the PID controller, as opposed to an open loop system, is more efficient at producing
a stable system at a quicker rate. It can also be concluded that there is a greater control of the
system in the second experiment (PID Controller) because a feedback loop is utilised here instead
of the open loop system present in the first experiment. A closed loop system has negligible
sounds effects, unlike an open loop system, as they are composed of a feedback system and hence
there is a reduction of errors between input and out signals which would otherwise result in
external noise sources. On the other hand, there is a possibility that this feedback system can lead
to an oscillatory response which would then reduce the overall gain of the system. The gain of the
system was not specifically measured in this experiment, so it can be ignored in this project. An
advantage of the open loop system is that it has the capability to manually control and observe
precisely what is required from the experiment.[5] It typically is a much simpler system and from
an economic perspective, it is an attractive focal point as the construction costs are considerably
lower. [7] Despite this however, the PID Controller (closed loop system) will still be the favoured
system due to its very accurate nature which cannot be replicated by human application. As
mentioned already, the lack of a feedback mechanism in open loop systems may result in large
inaccuracies in terms of result output. [7]

6 Conclusion
As shown in the graphs from Section 4, the PID system (closed loop) stabilised at a much quicker
rate compared to the open loop system, as the PID recognises instability without additional
assistance as it considers its surroundings by assessing and changing any potential errors, which
in turn minimises fluctuations. In comparison, the open loop system is largely dependent on the
person manually changing the voltage values. To improve the PID system in this laboratory, the
derivative mode of the controller could be involved as only the proportional and integral modes
were in engagement but not the derivative mode which is the mode that reduces percentage
overshoot. Therefore, simply by tuning the PID controller correctly improvements can be made
to its efficiency and therefore increase the validity of the results of this experiment.

14

Downloaded by M 11 ([email protected])
lOMoARcPSD|25258607

Ishak Hussain Water Level Tank Control

7 References
[1] What is a PID Controller? Omega Engineering
https://www.omega.com/prodinfo/pid-controllers.html (available online) Accessed 16/03/19

[2] UK Farnell. Parallax-error-definition


https://uk.farnell.com/parallax-error-definition (available online) Accessed 18/03/19

[3] Den5200 Lab Sheet. Control Systems and Analysis. Water Level Tank Control

[4] Hamstudy, Time Constant


https://www.hamstudy.com/freeadvanced/a-001-1.html (available online) Accessed 18/03/19

[5] Comparative study of P, PI and PID controller for speed control, K Smriti Rao, Ravi Mishra

[6] Control Solutions Minnesota, CSI Pages, PID


https://www.csimn.com/CSI_pages/PIDforDummies.html (available online) Accessed 19/03/19

[7] Speaking Technology. Open & Closed Loop Systems Advantages and Disadvantages
https://www.123mylist.com/2012/01/open-closed-loop-system-advantages.html (available
online) Accessed 19/03/19

15

Downloaded by M 11 ([email protected])

You might also like