You are on page 1of 10

Northern Technical University Engineering

Technical College of kirkuk


Power Mechanics Techniques Engineering
Department

PID Control of Water in a


Tank

Submitted BY:AHMED NAWFAL & SALLY ADNAN


PID Control of Water in a Tank

Abstract

In certain applications such as chemical and industrial processes, it is important to


keep the level of water or any other liquid in a tank or similar container at a certain
desired level. In this work, we present PID based controller system where the level
of water is controlled by adjusting the rate of the incoming water flow to the
container by varying the speed of a DC motor water pump that is filling the
container.

History of PID Controller


The first evolution of the PID controller was developed in 1911 by Elmer Sperry.
However, it wasn't until 1933 that the Taylor Instrumental Company (TIC) introduced
the first pneumatic controller with a fully tunable proportional controller. A few
years later, control engineers went eliminate the steady state error found in
proportional controllers by resetting the point to some artificial value as long as the
error wasn’t zero. This resetting “integrated” the error and became known as the
proportional-Integral controller. Then, in 1940, TIC developed the first PID
pneumatic controller with a derivative action, which reduced overshooting issues.
However, it wasn’t until 1942, when Ziegler and Nichols tuning rules were
introduced that engineers were able to find and set the appropriate parameters of
PID controllers. By the mid-1950’s, automatic PID controllers were widely adopted
for industrial use

1- Introduction

This work is based on a PID control of the level of the water in a tank. The user has
the power to choose a certain level of water and the system has to be capable of
adjusting itself in order to maintain that certain level. To that, a LabView program
was built, this program gives the user the possibility to choose the level of the water,
and by constant recalculations(Fig.1), involving the error generated by the input
value and the output value, the output value is adjusted in order to be closer to the
desired level.
Fig. 1 - PID Loop Control

To do that is necessary to constantly read the input value that in this case is the
current level of the water, and for that the system has the NI USB-6008 acquisition
board (Fig.2), that enables several inputs and two outputs of 5V. This system has two
inputs and one output, the inputs are the two readings of the level of water in the
tanks, the upper and the lower tank and the single output is the voltage that the
pump needs to receive in order to start working.

Fig. 2 - NI USB-6008 Acquisition Board


As I talked about in the beginning, this system is constituted by a PID control and
by that we know the PID, has explained before; involve several calculations and
several constants that affect the general response of the system. Those constant
need to be found and for that we have several methods, but in this thesis they are
going to be used only two of those methods.
These methods involve different procedures but should, in perfect condition give
the same values for the constants, but in practice that is not true, so in the results
we are going to compare them e conclude which one gave a better result.
Once we are talking about two tanks, when the lower tank is being used we have to
consider that the upper tank is being filled with water to, so we have to consider
that the upper tank may overflow, and by that is justified the need of a warning to
the possibility of the upper tank overflow.

2- Theory

2.1 Feedback Control


The success of feedback control is because this system makes everything faster,
more precise and less sensitive to disturbances. The open loop control, regarding
its simplicity, it‟s only advised in system when the outputs and inputs are known
and in which there is no disturbance associated.
In system with feedback control there is a big disadvantage which is the
probability of the system get unstable, for that the correct controller must be
chosen, and it must be perfect for the system that is being monitored.
The basic structure of conventional feedback control systems is shown in Fig.3, using
a block diagram representation. The purpose if to make the variable y follows the
Set-point r. For that, the variable u is manipulated at the command of the controller.
The variable d is considered as disturbances. The disturbance may be any factor that
influences the process variable

2.2 PID Controller


Feedback loops have been controlling continuous processes since 1700‟s. [2]
Today, there are several more controllers, but most of all derivates from the PID
controller.
“The PID controller is by far the most common control algorithm. Most feedback
loops are controlled by this algorithm or minor variations of it. It is implemented
in many different forms, as a stand-alon controller or as part of a DDC (Direct
Digital Control) package (…). Many thousands of instrument and control
engineers worldwide are using such controllers in their daily work.” [1]
A PID controller is a controller that includes the proportional element ,“P
element”, the integral element, “I element” and the derivative element ,“D
element”.
Defining u(t) as the controller output, the final form of the PID algorithm is:
Where:
Pout: Proportional term of output
Kp: Proportional gain, a tuning parameter
Ki: Integral gain, a tuning parameter
Kd: Derivative gain, a tuning parameter
e: Error = SP − PV
t: Time or instantaneous time (the present)
MV: Manipulated variable

The figure 3 show the simple structure of a PID controller.


 Plant – The physical parts of the system that is supposed to be controlled;
 Feedback – from the devices that measure the variable we want to control;
 SetPoint – This is a value, which is converted to a voltage that the process drives
towards;
 Error Signal – Error = SetPoint – Measured;
 Disturbances – A disturbance is all of the things that can drive a system to error, not
considering the error talked above. A disturbance in the system that is talked after is for
example, interference on the electrical system.
 Controller – The controller can be considerate the most important part of this system.
It will read the SetPoint, process the error, and give the output to the Plant. It‟s very
important that the system works correctly, and for that there are several methods of
tuning the constant talked above. Those methods are being explained ahead.
2.2.1 Proportional term
The proportional term is given by:

The higher the error the higher the proportional control which is clearly seen in the
equation. That conclusion leads us to another one that is that: the proportional
control leads the system to a fast SetPoint. But it has a disadvantage, it has steady-
state error, and that error can lead to an overshoot when the system gets to the
SetPoint. One way to avoid it is to increase the proportional term, but that can led to
an unstable system.

2.2.2 Integral term


The integral influence is proportional to the variation of the error on time.

The integral term is given by:

The most important benefit is that this term eliminates the steady-state error, but it
has a disadvantage which is the fact that the stability of the system is affected to.
Regarding the upper equation we can conclude that this integral term depends on
pass values of the error.

2.2.3 Derivative term


The derivative term is proportional to the rate of change of the error, as we can see
on the equation below.

The derivative term is given by:

This term makes an estimation of the future error and by that it can increase or
decrease the speed of correction, because it can work in an early way when there
are detected any changes on the error. This term is very sensitive to disturbances.

If the derivative term only changes with the rate of change of the error, if the error
do not change then we don’t have derivative influence.
3- SYSTEM MODEL
The proposed system comprises a DC motor water pump that pumps water to the
container, the PID controller and a water tank or any other storage system.
Consider the diagram in Fig. 1 where the motor pumps water to the container at a
rate of qin [m3/s] through an inlet pipe, the container with cross-sectional area
A[in m2], is filled to water level, h and water is leaving the container at a rate of qo
[m3/s] through an outlet pipe. Using the balance of the flows into and out of the
tank, the height, h is related to qin and qo as :

The out flow from the tank and the height can also be related assuming linear
resistance to flow for simplicity of analysis and it is given as:

Where Rf [in s/m2] is the flow resistance

Figure 1. Single Tank container filled to level h.


Digram of the feedback control loop for a water tank system
4- Conclusions

This paper presents a PID controlled water pump system in order to maintain a
desired water level in a storage tank that is used in private, chemical, industrial or
other related applications. The speed of the motor and hence the rate of water flow
into the tank is controlled by adjusting the parameters of the PID controller. A step
reference water level is set and the step response of the overall system is
investigated in MATLAB environment in order to minimize the overshoot, improve
the settling time (improved transient response) and the steady state error of the
system. Various forms of the controller, P, PI, PD, and PID are studied and the PID
controller achieves super performance. It is shown that suitable values for Kp, Ki, Kd
parameters can be found for the PID controller by tuning to maintain the desired
water level for the target design specifications. The system is essential in those
places where maintaining water or any other liquid level is critical for achieving the
required productivity. Such controllers are powerful in controlling any similar
processes that essentially require close monitoring (tight control) of the process
variables or parameters that have significant impact on quality and amount of
production.

References

[1] Beza Negash Getu, Hussain A. Attia, “Automatic Control of Agricultural


Pumps Based on Soil Moisture Sensing,” Proceedings of the IEEE AFRICON 2015
Conference, 14-17 September 2015, pp. 667-671.
[2] Beza N. Getu, Nasser A. Hamad, Hussain A. Attia, „Remote Controlling of an
Agricultural Pump System Based on the Dual Tone Multi-Frequency (DTMF)
Technique,” Journal of Engineering Science and Technology (JESTECH), Vol. 10,
No.10 (2015), pp. 1261 – 1274.
[3] Bequette, B. W., Process Control: Modellingv Design and Simulation, Prentice
Hall, 2003.

You might also like