Water Tank Level Control - Control Systems Analysis PDF

Title Water Tank Level Control - Control Systems Analysis
Course Control Systems Analysis and Design
Institution Queen Mary University of London
Pages 15
File Size 639.3 KB
File Type PDF
Total Downloads 64
Total Views 131

Summary

Module Covenor:
Guang Li

Final coursework report...


Description

Queen Mary University of London School of Engineering and Materials Science

DEN5200 – Control Systems Analysis and Design Water Tank Level Control

Ishak Hussain

Ishak Hussain

Water Level Tank Control

Ab Abst st stra ra racct 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.

2

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

3

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 realtime 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]

4

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.

5

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.

6

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: Where: • 𝐾𝑑 is the derivative term • 𝐾𝑖 is the integral term • 𝐾𝑝 is the proportional term

𝐶 = (𝐾𝑑 𝑠2 + 𝐾𝑝 𝑠 + 𝐾𝑖 )

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.

7

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.

8

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 × 1000 60

(1)

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

𝜋𝑑 2 4

(2)

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. 𝑅= 𝑅=

∆ℎ ∆𝑞

0.018

0.5 × 10−5

(3) = 3600

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

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 (𝐿/𝑚𝑖𝑛)

3.8 4.1

3.8 4.1

Level A Level B Difference

Flow Rate (𝑚3 /𝑠) × 10−5

Height (𝑚)

6.33 6.83 0.5

0.115 0.133 0.018

Table 1: Raw data produced in experiment 1 with the flow rate converted to (L/min)

0.0177𝑚 2 3600 63.7secs

S (Area) R (Outflow Resistance) Time constant 𝜏

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 8

Voltage (V)

7

A

6 5

4 3

LT

2

Pump Flow

1

Flow Voltage

0 -100

0

100

200

300

400

500

600

Time (sec) Figure 7: A graph showing voltage against time for the results produced in Experiment 1

10

700

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

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

Voltage/V

10 8 6 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

Ishak Hussain

Water Level Tank Control

Voltage against Time for both components (Given PID) 8 7

Voltage /V

6 5 4 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

Voltage /V

6

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

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 ...


Similar Free PDFs