Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (1 vote)
290 views

Water Level Controlling System Using Pid Controller

This document describes a water level control system that uses a PID controller. The system uses a DC motor water pump to pump water into a tank at a rate determined by the motor's speed. The PID controller adjusts the motor's speed based on the difference between the actual and desired water levels in the tank, with the goal of maintaining the desired level.

Uploaded by

Shiva Noersalim
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (1 vote)
290 views

Water Level Controlling System Using Pid Controller

This document describes a water level control system that uses a PID controller. The system uses a DC motor water pump to pump water into a tank at a rate determined by the motor's speed. The PID controller adjusts the motor's speed based on the difference between the actual and desired water levels in the tank, with the goal of maintaining the desired level.

Uploaded by

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

International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 23 (2016) pp.

11223-11227
© Research India Publications. http://www.ripublication.com

Water Level Controlling System Using Pid Controller

Beza Negash Getu


Department of Electrical, Electronics and Communications Engineering (EECE)
American University of Ras Al Khaimah, Ras Al Khaimah, UAE.

ABSTRACT and simplicity in controlling aspects [6]. The DC motor is a


In certain applications such as chemical and industrial highly controllable electrical actuator and is widely used for
processes, it is important to keep the level of water or any robotic manipulators, guided vehicles, steel rolling mills,
other liquid in a tank or similar container at a certain desired cutting tool, overhead cranes, electrical traction and other
level. In this work, we present PID based controller system applications. In comparison to AC drive, DC motor drives are
where the level of water is controlled by adjusting the rate of simple and less expensive [6], [7]. In certain applications, the
the incoming water flow to the container by varying the speed water, which could also be any other liquid in an industrial or
of a DC motor water pump that is filling the container. The chemical process need to be carefully supplied and kept at a
accuracy of the PID based controlling is demonstrated using certain level in the storage system. The intention of
the MATLAB simulation software. controlling the level in the storage is to achieve a perfect
process control and as a result increase efficiency and
Keywords- water level, flow rate, tank, DC motor speed, productivity. A PID control theory and feedback system
feedback control, proportional integral derivative (PID). modelling is applied to design the overall system. As a result
of maintaining the required water set level, the system not
only increases process productivity but also assists towards
INTRODUCTION saving and conserving water by monitoring the level and
Water is an essential natural resource, which is vital not only eliminating overflow in the storage system.
to sustain life for drinking purposes but also used in many
industrial, chemical, commercial and agricultural processes.
The improper use and management of water affects the SYSTEM MODEL
sustainability of our environment. Among others in The proposed system comprises a DC motor water pump that
agricultural areas, water pumps need to be controlled in order pumps water to the container, the PID controller and a water
to supply regulated water for the plantations or farm lands. tank or any other storage system. Consider the diagram in
Controlled water can be given by designing automatic Fig. 1 where the motor pumps water to the container at a rate
electronic control systems as studied in [1], [2]. On the other of qin [m3/s] through an inlet pipe, the container with cross-
hand, in chemical or industrial processes such as treatment of sectional area A[in m2], is filled to water level, h and water is
water in desalination plants, the level of water in a container leaving the container at a rate of qo [m3/s] through an outlet
like a tank need to be kept at certain set desired point. The pipe. Using the balance of the flows into and out of the tank,
level of the water need to be maintained at the desired set the height, h is related to qin and qo as [8]:
point for the proper functioning of the process and achieve the dh
desired target or product. In this case, a controlling system qin  q0  A (1)
such as proportional-integral and derivative (PID) controller dt
plays a significant role in maintaining the accurate level by The out flow from the tank and the height can also be related
implementing the system in a feedback control system. PID assuming linear resistance to flow for simplicity of analysis
controllers are used in most practical control systems ranging and it is given as:
from consumer electronics such as cameras to industrial h
q0  (2)
processes such a chemical processes [3]-[5]. The PID Rf
controller helps to get our desired output, which could be
velocity in moving objects, temperature in particular Where Rf [in s/m2] is the flow resistance.
environment, position at certain location, liquid level in a
container and etcetera where we want to achieve a certain set
point in a short possible time with minimal overshoot and
with little steady state error. The performance of the PID qin
controller are also determined by overshoots, rising time,
settling time and steady state error parameters.
pump
In this work, we assumed a DC motor water pump filling a h water
certain water container or tank and the speed of the motor
determines the rate of water flow to the tank. The DC motors
qo
are used extensively in industries due to their variable speed
that suits them to be used for different applications, their most A
demanding speed-torque characteristics and their reliability Figure 1. Single Tank container filled to level h.

11223
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 23 (2016) pp. 11223-11227
© Research India Publications. http://www.ripublication.com

The overall system is a feedback control system as shown in R L


the block diagram given in Fig. 2. Firstly, a reference input
height level, h0(t), is set that shows the desired level the tank
T 
has to be filled. In the forward path, we have the PID +
V
controller that controls the speed of the DC motor. The speed i
of the motor is directly related to the water flow rate qin e  K e J
supplying the tank. At the output of the overall system, we armature circuit -
rotor
have the water level, h(t) and this information is feedback at b
the input and compared with the reference desired level. The
error signal between the actual output and the reference, e(t)
will be an input signal to the PID controller and the speed of Figure 3. Equivalent circuit of the DC motor
the motor [ (t) in rad/s] will be adjusted (either increased or
decreased) to control the flow rate qin until the required target Using the properties of Laplace transform, the above
water level is achieved. The speed information of the motor is equations can be expressed in the Laplace or ‘s’ domain as
assumed to be obtained from speed measurement device such [10]:
as tachometer. The speed will be transformed by the speed to s 2 J (s)  sb (s)  Kt I (s) (6)
height transformation (STH) block that relates the speed to the
flow rate and then to the water level h(t). For simplicity
purposes of the study, we assume a simple linear relationship sLI (s)  RI (s)  V (s)  sKe (s) (7)
between the speed and the incoming flow rate to the tank
given as: The angular speed in the Laplace domain is related to the
 (t )  K f qin (t ) (3) angular position as (s)= s(s) and hence can be substituted in
the above equations. By eliminating the current I(s) in (6) and
(7) and after some steps, the motor rotational speed output,
h0 ( t ) e (t ) v (t )  (t ) (s), is related to the armature voltage input, V(s), as:
PID Motor STH h (t )


Controller pump
 ( s) Kt
Pm ( s)   (8)
V ( s) s JL  s( JR  bL)  Rb  Kt K e
2

The relation in (8) represents the input–output relations of the


Figure 2. Block diagram of the water level controlling system motor-pump block shown in Fig. 2.

The PID controller is the other part of the system as shown in


MODELING THE MOTOR PUMP AND THE PID Fig.2. The job of the PID controller is to adjust the output, in
CONTROLLER this case the water level at the desired set point so that in the
The water pump is a DC motor with the electric equivalent ideal case there is no error between the sensed output, h(t),
circuit of the armature and the free-body diagram of the rotor as and the desired reference level. In general design of the PID,
shown in Fig. 3 [9]. The input to the motor is a voltage source the error e(t) is related to the output v(t) as [11]:
(V) applied to the motor's armature, the output is the rotational
speed of the shaft (t) =d/dt. The rotor and shaft are assumed de(t )
to be rigid. We further assume a viscous friction model, that is, v(t )  K p e(t )  Ki  e(t )  K d (9)
the friction torque is proportional to shaft angular velocity. The dt
physical parameters of the motor are J: moment of inertia of
the rotor [kg.m2], b: motor viscous friction constant [in N.m.s], Where Kp, Ki and Kd are called the proportional gain, the
Ke: electromotive force constant [in V/rad/sec], Kt: motor integral gain and the derivative gain respectively. The
torque constant [in N.m/Amp], R: electric resistance [in ]. L: proportional gain provides an overall control action
electric inductance [in H]. Assuming armature controlled proportional to the error signal, the integral gain action is to
motor, the torque is proportional to the armature current reduce steady-state errors through low-frequency
(T=Kti) and the back emf is proportional to the angular compensation by an integrator and the derivative gain
velocity of the shaft, e=Ke . Using the above facts and based improves transient response through high-frequency
on Newton’s second law and Kirchhoff’s voltage law, the DC compensation by a differentiator. By tuning the three
motor equations relating the motor speed to the physical parameters of the model, a PID controller can deal with
parameters of the motor can be written as: specific process requirements. Using the Laplace domain, the
input-output relation for the controller is given as:
J  b  T  Kt i (4)
V ( s) K
di C ( s)   K p  i  sKd (10)
L  Ri  e  V  K e (5) e( s ) s
dt
Where   d / dt   is the angular speed of the motor.

11224
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 23 (2016) pp. 11223-11227
© Research India Publications. http://www.ripublication.com

OVERALL SYSTEM TRANSFER FUNCTION response of the DC motor combined with the STH block. The
As shown in Fig. 2, the overall system response is the combined performance without controller is very poor in terms of
response of the forward path and the feedback loop. Here the settling time with very high steady state error and a final value
gain for the feedback loop is assumed unity and in the forward 50 % of the required reference target. It shows the
path we have the PID controller, the motor pump and the speed requirement of a controller to obtain the desired water or
to height (STH) transformation block. The model for the motor liquid level. The proportional controller reduces the rise time,
pump and the PID controller is as discussed in section III. Let improves the steady state error to some extent but a ringing
the impulse response of the STH system is, g(t) that represents and an over shoot starts to appear. A proportional controller
the relation between h(t) and (t). We can find an expression with Kp=10 looks better in terms of reducing the steady state
for G(s) the Laplace transform of g(t) by combining (1), (2) and error compared with Kp=5. For Kp=10, the settling time is
(3). Combining (1), (2) and (3), (t) is related to h(t) as: about 2.95 s, an overshoot of 47%, and steady state value of
0.83. The high overshoot, settling time and steady state error
dh necessitate the requirement of integral and derivative part to
R f  (t )  K f h  K f R f A (11) be added in the controller as not all of the design requirements
dt can be met with a simple proportional controller.

The relation in (11), in the Laplace domain is given as: 1.4


step response

R f  (s)  K f h(s)  K f R f Ash(s) (12)


1.2
Without PID controller
Kp=10
Kp=5
1
Therefore the transfer function G(s) becomes
h( s ) Rf amplitude
0.8

G( s)   (13)
 ( s) K f  sK f R f A
0.6

0.4

The overall transfer function of the forward path, F(s), can be 0.2

obtained by combining (8), (10) and (13) 0


0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5
h( s ) time in seconds

F ( s)   C ( s) Pm ( s)G( s) (14)
e( s) Figure 4. Step response with and without proportional
controller
The overall transfer function, Gsys(s), of the overall system
including the unity feedback loop is given as: Fig. 5. shows the system response with the proportional-
h( s ) F ( s) integral (PI) controller with Kp=Ki=10. The addition of the
Gsys ( s)   (15) integral part to the proportional part eliminates the steady state
h0 ( s) 1  F ( s)
error getting a final value near the required level compared
with the Fig. 4. However, there is still a high overshoot and
the settling time is also getting large.
RESULTS AND DISCUSSIONS
MATLAB simulations were done to study the performance of
Step Response
the system and its capability to maintain and control a desired 1.5
System: sys_clpi
1.4
water level in the tank. Since the PID controller is integrated Peak amplitude: 1.49
Overshoot (%): 49.2
Kp=10, Ki=10

At time (seconds): 0.64


in MATLAB, it is easy to simulate the system and observe the 1.2

results for different values of Kp, Ki and Kd parameters of the System: sys_clpi
Settling time (seconds): 4.64
System: sys_clpi
Final value: 1

controller. An optimum or acceptable result can be obtained 1

by tuning the parameters until the design requirements are


Amplitude

0.8

met. For this study, we assumed the following parameter


values for the motor, the tank, and the STH system. 0.6

 Motor: -J = 0.01 Kg.m2, b = 0.1 N.m.s, Kt = 0.1 0.4

N.m/A, Ke=0.01 V/rad/s, R = 1 , L = 0.5 H.


 Tank:- A=0.5 m2, Rf =0.5 s/m2 0.2

 STH:-Kf =1 0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
Time (seconds)

Furthermore, for a unit step input reference water level for the Figure 5. Step response with proportional-integral (PI)
overall system, our design criteria are to achieve an output controller
with a settling time less than 2 seconds an overshoot less than
5% and a steady-state error less than 1%. The other variety of controller is the proportional-derivative
(PD) controller. Fig. 6 shows the system step response with
Fig. 4. shows the system response with and without
the PD controller with Kp=10 and Kd=5. It reduces the over
proportional controller. As seen in the Figure, the results
without the PID controller (red color) is simply the step shoot, improves the rise time and settling time but with a

11225
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 23 (2016) pp. 11223-11227
© Research India Publications. http://www.ripublication.com

significant amount of steady state error. The final value is still 1.4
Step Response

not close to the desired level. Kp=9, Ki=15, Kd=2

System: sys_clpid
1.2 Peak amplitude: 1.03
Overshoot (%): 3.24
At time (seconds): 0.48 System: sys_clpid
Final value: 1
1
Step Response System: sys_clpid
1.4 Settling time (seconds): 1.39

0.8

Amplitude
Kp=10, Kd=5
1.2 System: sys_clpd
Peak amplitude: 1
Overshoot (%): 20.5
At time (seconds): 0.23 0.6
1
System: sys_clpd
Final value: 0.832 0.4
0.8
Amplitude

System: sys_clpd
Settling time (seconds): 0.537
0.2
0.6

0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
0.4
Time (seconds)

0.2 Figure 8. Step response with proportional-integral derivative


0
(PID) controller (Kp=9, Ki=15, Kd=2).
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6
Time (seconds)

Figure 6. Step response with proportional-derivative (PD) 1.5


step response

controller 1.4 without controller


P, Kp=10
PI, Kp=10, Ki=10
1.2 PD, Kp=10, Kd=5
Fig. 7 shows the proportional-integral and derivative (PID) PID, Kp=9, Ki=15, Kd=2

controller with Kp=12, Ki=15 and Kd=3. In this case the initial 1

design specifications are met with overshoot less than 5%,


amplitude

0.8
settling time less than 2 seconds and steady state value of one,
which is the required water level specifications. In this case, 0.6

the rise time is also reduced. Therefore, with the PID 0.4
controller, the desired design target is achieved. Furthermore,
as shown in Fig. 8, the overshoot can be reduced at the 0.2

expense of a slight increase in the settling time for the PID 0


controller with Kp=9, Ki=15 and Kd=2. 0 0.5 1 1.5 2 2.5 3
time in seconds
3.5 4 4.5 5 5.5 6

Step Response
1.4 Figure 9. Step response showing the uncontrolled system, the
1.2
System: sys_clpid
Peak amplitude: 1.04
proportional, the PI, PD and the PID controllers in one plot,
Overshoot (%): 4.45
At time (seconds): 0.33 System: sys_clpid
Final value: 1
1
System: sys_clpid
Settling time (seconds): 0.81
Table I shows a comparison of the different controllers in
0.8
terms of rise time, settling time, overshoot and steady state
Amplitude

0.6 values. From the table, we observe that a proportional


0.4
controller tends to reduce the rise time and settling time but
never eliminate the steady state error. There is also a large
0.2

overshoot. A proportional-integral (PI)controller has the effect


0
0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 of eliminating the steady state error with the final value
Time (seconds)

achieving the desired reference input but it makes the transient


response worse with larger overshoot and also large settling
Figure 7. Step response with proportional-integral derivative
time. A proportional-derivative (PD) controller has the effect
(PID) controller (Kp=12, Ki=15, Kd=3).
of increasing the stability of the system by reducing the
overshoot, the rise time, the settling time and overall improves
Fig. 9 shows all the controllers plotted in one graph in order to
the transient response. However, there is still large steady
have better visualization of their performances and clearly
state error. The proportional-integral derivative (PID)
showing the super-performance of the PID controller
controller performs well in all the parameters and satisfies the
compared with the others. With such PID controlled system,
design requirements. Therefore, it is possible to fulfill the
the water level can be controlled continuously without the
design requirements and obtain optimum performance with
need of manual operation, which saves time and manpower
good accuracy by carefully tuning and selecting the proper
from automation. The PID controller automatically responds
values for Kp, Ki and Kd.
to the system so that the system is stabilized near the desired
set point.

11226
International Journal of Applied Engineering Research ISSN 0973-4562 Volume 11, Number 23 (2016) pp. 11223-11227
© Research India Publications. http://www.ripublication.com

TABLE I. COMPARISON OF THE DIFFERENT CONTROLLERS REFERENCES

Type of Performance parameters [1] Beza Negash Getu, Hussain A. Attia, “Automatic Control
controller of Agricultural Pumps Based on Soil Moisture Sensing,”
Rise Settlin Oversho Steady Proceedings of the IEEE AFRICON 2015 Conference,
time g time ot (%) state 14-17 September 2015, pp. 667-671.
(s) (s) value [2] Beza N. Getu, Nasser A. Hamad, Hussain A. Attia,
‘Remote Controlling of an Agricultural Pump System
Proportional 0.228 2.95 47.2 0.832
Based on the Dual Tone Multi-Frequency (DTMF)
(P), Kp=10
Technique,” Journal of Engineering Science and
PI, Kp=10, 0.237 4.64 49.2 1.0 Technology (JESTECH), Vol. 10, No.10 (2015), pp. 1261
Ki=10 – 1274.
PD, Kp=10, 0.1 0.537 20.5 0.832 [3] Bequette, B. W., Process Control: Modellingv Design
Kd=5 and Simulation, Prentice Hall, 2003.
PID, Kp=12, 0.17 0.81 4.45 1.0 [4] Carl Knopse, Guest Editor, “PID Control,“ IEEE Control
Ki=15, Kd=3 System Magazine, February 2006.
PID, Kp=9, 0.233 1.39 3.24 1.0 [5] S. Bennett, “Development of the PID controller,” IEEE
Ki=15, Kd=2 Control System. Magazine, Vol. 13, 1993, pp. 58–65.
[6] Khan M.R., Khan A. A. Umer G. “Speed Control of DC
Motor under Varying Load Using PID Controller,”
International Journal of Engineering (IJE), Vol. 9 , Issue
CONCLUSIONS 3, 2015, pp. 38-48.
This paper presents a PID controlled water pump system in [7] Sen P.C. ,Principles of Electrical Machines & Power
order to maintain a desired water level in a storage tank that is Electronics, John Wiley & Sons,1996.
used in private, chemical, industrial or other related Elke Laubwald, Coupled Tank Systems. Available at
applications. The speed of the motor and hence the rate of http://www.control-systems-
water flow into the tank is controlled by adjusting the principles.co.uk/whitepapers/coupled-tanks-systems.pdf.
parameters of the PID controller. A step reference water level [8] Arthur G.O. Mutambara, Design and Analysis of Control
is set and the step response of the overall system is investigated Systems, CRC Press, 1999.
in MATLAB environment in order to minimize the overshoot, [9] Oppenheim A. V. , Willsky A. S. , Hamid S., Signals and
improve the settling time (improved transient response) and the Systems, 2nd Ed., Prentice-Hall. , 1997.
steady state error of the system. Various forms of the [10] Ang, K.H. and Chong, G.C.Y. and Li, Y., “PID control
controller, P, PI, PD, and PID are studied and the PID system analysis, design, and technology,“ IEEE
controller achieves super performance. It is shown that Transactions on Control Systems Technology, 13(4),
suitable values for Kp, Ki, Kd parameters can be found for the 2005, pp. 559-576.
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.

ACKNOWELEDGMENT
The author appreciates the support and the incentive provided
by the American University of Ras Al Khaimah (AURAK)
through the initiation and continuous encouragement of the
School of Graduate Studies and Research to be active and stay
involved in research.

11227

You might also like