0% found this document useful (0 votes)
16 views10 pages

Research On Control Algorithm of Water-Tank Water Level Control System

Uploaded by

nadiakhaliza48
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views10 pages

Research On Control Algorithm of Water-Tank Water Level Control System

Uploaded by

nadiakhaliza48
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

International Journal of Control and Automation

Vol. 9, No. 12 (2016), pp.1-10


http//dx.doi.org/10.14257/ijca.2016.9.12.01

Research on Control Algorithm of Water-tank Water


Level Control System

Mianmian Dong and Baoyi Guo


School of Electronic Information Engineering, Xi'an Technological University,
Xi'an
710021, PR China
[email protected]

Abstract
To eliminate control error of water level, this paper researches the control algorithm
of water-tank in water level control system, and uses the fuzzy controller to improve the
control performance, two-dimensional fuzzy controller is designed taking advantaging of
Fuzzy Logic Controller, set up the structure mode of the water-tank water level control
system according to the characteristics of the water-tank water level control system, give
the simulation result of the performance of the fuzzy controller, acquiring waveform
graphs of real water level and fixed level, and compared with PID controller. The
simulation results show that the fuzzy controller has better control performance than the
PID controller.

Keywords: water level control, fuzzy controller, simulation

1. Introduction
The traditional water level monitoring in water-tank is realized by a float or simpler
manual monitoring, but it is imprecise and difficult to control for traditional monitoring
methods. To the tank-water device of providing water for the users and fire, the traditional
control methods make water overflow or shortage, in some emergency cases, which will
cause great distress for human life[1-2]. In order to solve these questions, it is necessary
to design a controller which can automatically control water level and keep the position of
the water level unchanged.
Methods of controlling water-tank water level have traditional control method and
intelligent control method [3]. The traditional control methods are established on the basis
of the accurate mathematical model of the controlled objects, then building the
control structure model through the mathematical formula of system influence factors.
However, in practice and mixed use, there are many interference factors in the water-tank
control system, such as: the fluctuation of water level, leaking, unstable water flow speed
and so on [4-5]. These interference factors can’t be described by the mathematical
formula; the traditional control methods have many flaws to some extent, so it is
necessary to introduce intelligent control to improve the control performance of the
system [6]. The fuzzy Control is an intelligent control, and also a closed-loop feedback
control, which don’t need to build model of the controlled objects. The fuzzy controller is
easy to come true and build, with good stability and strong adaptability. The PID control
and the fuzzy control are applied to the water level control system, in addition, simulating
and verifying the performance of the fuzzy controller and the conventional PID controller.

ISSN: 2005-4297 IJCA


Copyright © 2016 SERSC
International Journal of Control and Automation
Vol. 9, No. 12 (2016)

2. The Principle of the Water Level


The purpose of the tank water level control system is to overcome all the interference
factors to keep the water level unchanged. The structure of the water level control system
includes pipeline linking liquid line, valve, water-tank, Liquid Level Sensor, water pump
and electric regulating valves. The control process of system: Firstly, the water level
signal which is detected by liquid level sensor is amplified , and then the amplified signal
is converted into digital signal by the AD converter, the error is that the digital signal is
subtracted from the given value[7]. Finally, the error E and the error rate of change EC
are regarded as input data of MCU, designed fuzzy control algorithm program have been
stored in the MCU, the output can control the size of electric control valve to control the
speed of the water in order to make sure that the water-tank water level is a fixed position.
Tank level fuzzy inference system as shown in Figure 1.

r e
+ A/D Controller

-
de/dt

Vavle

Water level
detection Water outlet
sensor

Figure 1. Tank Level Fuzzy Control System

3. The Design of Fuzzy Control System


The structure of fuzzy control system is composed of the traditional feedback control
system on the basis of the fuzzy inference system; the main component of the
fuzzy inference system is fuzzy controller, which includes the fuzzy processing of the
input and output variables, the design of fuzzy rule, fuzzy inference, fuzzy solution,
etc[8]. This paper selects the two-dimensional fuzzy controller, the input variables of the
fuzzy control system are error and rate of error, and the output variable is valve control
signal. The fuzzy control rules are generated according to the fuzzy relationship between
the input variables and human experience, eventually the fuzzy control rule table of
realizing the automatic control of water level is established. The function of the output
variable is controlling the opening of the valve in order to keep the water level
unchanged. The fuzzy control system block diagram is shown in Figure 2.

Fuzzy inference systen

Given
value
*
et blur
obfuscatio defuzzificatio
n n
de/dt

Electric
Liquid level Controlled regulating
detection sensor object value

Figure 2. The Fuzzy Control System Block Diagram

2 Copyright © 2016 SERSC


International Journal of Control and Automation
Vol. 9, No. 12 (2016)

3.1. Determining the Fuzzy Subset and Fuzzing the Input and Output
The output of the liquid level sensor is a continuous variable, however, the input of the
fuzzy controller is a discrete variable based on the fuzzy logic, so it is necessary to fuzzy
the input data, the basic range of error and output variables of water-tank water level
system are set up to be -1 to 1, the quantity fields are -3 to 3 and quantitative factor is 3;
The basic range of the error rate of change are -0.1 to 0.1,the quantity are -3 to 3 and
quantitative factor is 0.03.
When the system error is smaller, it is better to choose the narrower and thinner
membership function, which has a higher resolution and can improve the sensitivity of the
system. When the system error is larger, it is better to choose the wider and fatter
membership function, which has a lower resolution and can improve the stability of the
system[9]. This paper chooses membership function of Triangle and Gauss function
through the analysis of control system, in order to improve the sensitivity of the system
under the conditions of stably working. The fuzzy language of the system is set up to be
seven levels: "NB" , "NM" , "NS" , "ZE", "PS" , "PM","PB". Among them the NB and PB
are Gauss function curve. The membership functions of error E , error rate of change and
the output variables U are shown in Figure 3.

NB
NM NS 1 ZE PS PM PB

0.5

-3 -2 -1 0 1 2 3

Figure 3. Membership Functions of Input and Output Variables

The ranges of input and output variables are discrete, and the numbers of discrete
variables are limited, the membership function of the fuzzy set can be described by the
numerical method. Assignment table of the membership function of the variables are
shown in Table 1.

Table 1. Assignment Table of the Membership Function of the Variables

Value Element -3 -2 -1 0 1 2 3
NB 1 0.2 0 0 0 0 0
NM 0 0.65 0.65 0 0 0 0
NS 0 0 0.65 0.65 0 0 0
ZE 0 0 0 0.65 0.65 0 0
PS 0 0 0 0 0.65 0.65 0
PM 0 0 0 0 0 0.65 0.65
PB 0 0 0 0 0 0.2 1

3.2. The Fuzzy Rule Base of Fuzzy Controller


The fuzzy control rules can ensure that the output of the controller makes dynamic
characteristic of the system output response in the best state, it can acquire fuzzy rules
through continuous practice and human experiences. The fuzzy rule is described by the
statement of "if E and EC then U" .If the error is negative and small , it need determine
that the error is how to change according to the error rate of change in order to avoid the

Copyright © 2016 SERSC 3


International Journal of Control and Automation
Vol. 9, No. 12 (2016)

overshoot of the system. When the error rate of change is positive, which shows that the
error has a tendency of decreasing, so the control variable is smaller; when the error rate
of change is negative, which shows that the error has a tendency of increasing, at this time
the control variable is larger [10]. So the following table is summarized according to the
control rules, as shown in Table 2.

Table 2. The Fuzzy Rule Base of the Water Level System

3.3. The Fuzzy Inferential Method of Fuzzy Controller


In order to achieve the real time and fast control of the system ,the fuzzy output
variable can be acquired by the fuzzy control rule table ,which is calculated through that
the fuzzy rule base taking advantage of Mamdani fuzzy inferential method[11] .
The process of the Mamdani fuzzy inference: First, the fuzzy relations R described by
all the fuzzy rule are calculated, as shown in formula (1) to (3); Then, all the fuzzy control
relations R are calculated which can describe the water level control system,
namely, R  R1  R2      RN .  show the intersection of each element of all
matrices; Finally, the fuzzy query table are built[12].

R1  NL( E )  NL( EC)  NLT  NL


1 0 0 0 0 0 0 0 0.2 1 
0.2 0 0 0 0 0 0 0 0.2 0.2
  
0 0 0 0 0 0 0 0 0 0
    (1)
0 0 0 0 0 0 0 0 0 0
  0   0 0 0 0 0 0 0 0.2 1  0 0 0 0 0 0 0 0 0
   
0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0
   
0 0 0 0 0 0 0 0 0 0
0 0 0 
   0 0 0 0 0 0 0
T
The column vector R1 is straight for the row vector R1 :
R1 (0 0 0 0 0 0.2 0    0)
T T
1 0 0 0 0 0 0.2 0.2 (2)
The fuzzy relationship matrix:

4 Copyright © 2016 SERSC


International Journal of Control and Automation
Vol. 9, No. 12 (2016)

R1  R1 U 1
T

(0 0 0 0 0 0.2 1 0 0 0 0 0 0.2 0.2 0    0)


T
(0 0 0 0 0.65 0.65 0)
0  0 0 
           

0    0.2 0 
 
           
 
0    0.2 0 
           
 
0  0 0 
0 0 0 0 497

(3)
In the same way, all the fuzzy relations are deduced from the corresponding rules by
deducing the 49 fuzzy rules; the fuzzy matrix of the whole rules is calculated by taking
the union of the fuzzy relations, as shown in formula (4).
R  R1  R2      R49 (4)
When the input variables are determined, the fuzzy relations of the fuzzy rules can
calculated , and then the fuzzy set of seven output variables are obtained by taking the
intersection of each element of the fuzzy relations and the general fuzzy matrix ,as shown
in formula (5).
1 2 3 4 5  6 7
U       (5)
3 2 1 0 1 2 3

3.4. Defuzzification
The output variable gained by querying the fuzzy control rule table is fuzzy-valued, so
it is necessary to convert the fuzzy value into the exact value in order to control the valve
by the fuzzy solution method. The method of the fuzzy solution chooses the gravity
method of the area, which can make the output signal smooth when the input signal has
small changes. The calculation formula is shown in (6).
n

 (U ) U
i 1
i i
U= n
, (6)
 (U )
i 1
i

In (6), i=1,2,...7. Ui is the first i language variable of the output variables, U = (Ui ) is
membership function value of the output Ui from the first i fuzzy rule.

4. The Simulation of the Water-Tank Water Level Control System


The fuzzy controller has been designed according to the working principle of the
water-tank, the performance of the fuzzy controller is simulating in which input variables
are error and error rate of change and the output variable is the valve control signal in
MATLAB/SIMULINK.
Firstly, the fuzzy inference relationship of the two-dimensional fuzzy controller in the
fuzzy toolbox of MATLAB is established, the schematic diagram of the inference system
include two input variables and an output variable as shown in Figure 4, the membership
function of input and output variables as shown in Figure 5, the designed fuzzy control
rule base as shown in Figure 6,the observer of the control rules as shown in Figure 7, The
three-dimensional curved surface between the input and output variables as shown in
Figure 8.

Copyright © 2016 SERSC 5


International Journal of Control and Automation
Vol. 9, No. 12 (2016)

Figure 4. Fuzzy Inference Relations

Figure 5. Membership Function of Input Variable

Figure 6. The Fuzzy Rule Base

6 Copyright © 2016 SERSC


International Journal of Control and Automation
Vol. 9, No. 12 (2016)

Figure 7. The Fuzzy Control Rule

Figure 8. The Three-Dimensional Curved Surface of Input and Output


Variables

Because the system has the error, when error is -2,error rate of change is -0.725,the
output is 0; when the error is -2, the error rate of change is1.23, then the output is-1.6,
when the error is -2, the error rate of change is -1.5, then the output is 0.303

5. The Performance Simulation of the Water-Tank Water Level Fuzzy


Control System
The structural model of fuzzy control system of the water-tank water level in the
SIMULINK toolbox of MATLAB is shown in Figure 9, the control system is mainly
composed of five parts, including signal generator, water-tank system module, fuzzy
control module, the oscilloscope, the PID controller. The switch connects PID controller
when the property constant1 of the switch is more than 0, the system simulates PID
controller, the structure of the PID controller is shown in Figure 10.The output waveform
of the real water level and the given water level are shown in Figure 11.
When the property constant1 of the switch is less than 0, the switch connects fuzzy
controller, at this time the icon of fuzzy controller is clicking in order to fuzzy controller,
the system simulates fuzzy controller, the simulation waveform of the water level is
shown in Figure 12.

Copyright © 2016 SERSC 7


International Journal of Control and Automation
Vol. 9, No. 12 (2016)

Figure 9. The Structural Model of Fuzzy Control System of the Water-Tank


Water Level

Figure 10. The Traditional PID Controller

2.0

1.5
H/m

0.5
Input
signal
0
0 10 20 30 output signal

t/s

Figure 11. The Simulation Waveform of PID Control System of Water-Tank


Water Level

8 Copyright © 2016 SERSC


International Journal of Control and Automation
Vol. 9, No. 12 (2016)

2.0

1.5

0.5
Input
signal
0
Output signal
0 10 20 30 40
t/s

Figure 12. The Simulation Waveform of Water-Tank Water Level Fuzzy


Control System

Table 3 is the results by comparing Figure 11 with Figure 12.

Table 3. The Performance of the Simulation Result


Controller PID Fuzzy
Overshoot 8.9% 3.7%
Response time 9s 7s
From the Table 3, it can be seen that the overshoot of the fuzzy controller is better than
the conventional PID controller; the response time of the fuzzy controller has 2s faster
than PID controller.

6. Conclusions
The paper research the performance of water-tank liquid level control system on the
basis of methods of the fuzzy control and the traditional PID control, the fuzzy controller
is designed, the input of which are the error and error rate of change of the water-tank
water level system, and the fuzzy rules are built according to human experience, then
fuzzy solution take advantage of the center of gravity method, finally, it can achieve the
adaptive control of water level in order to keep the water level unchanged. The structural
model of fuzzy control system of the water-tank water level is built and simulated under
the condition of the two controllers. The simulation results show that the performance of
the fuzzy control has better control than the conventional PID controller in the water tank
level control system.

References
[1] J.-L. Song,Y. Yang and K.-K. Xu, “Active Disturbance Rejection Control of the Stabilizing Circuits
for Inertial Platform”, Journal of System Simulation, vol. 14, no. 391, (2002).
[2] X.R. Song and H. Chen, “Research on Adaptive AUV Tracking Control System Based on Least Squares
Support Vector Machine”, Computer Modeling and New Technologies, vol. 18, no. 33, (2014).
[3] H. S. Yan and D. Xu, “An approach to estimating product design time based on fuzzy v-support vector
machine”, IEEE Transactions on Neural Networks, vol. 18, no. 72, (2009).
[4] C. Sung Moon, H. O. Sang and L. Soo-Young, “Support Vector Machines with Binary Tree
Architecture for Multi-Class Classification”, Neural Information Processing Letters and Reviews, vol. 2,
no. 47, (2004).
[5] H. Li, J. Gao and Z. Wang, “Target location fire precision test technology by using
intersectingphotoelectric detection target”, Optik, vol. 125, no. 1325, (2014).
[6] G. Chen, X. Wang, S. Fan, H. Tang, L. Lin and A. Wang, “ESD-Induced Noise to Low Noise Amplifier
Circuits in BiCMOS Original Research Article”, Tsinghua Science & Technology, vol. 15, no. 259,
(2010).

Copyright © 2016 SERSC 9


International Journal of Control and Automation
Vol. 9, No. 12 (2016)

[7] S.K. Nayar, K. Ikeuchi and T. Kanade, “Surface reflection:Physical and Geometrical Perspectives”,
IEEE Transactions on Pattern. Analysis and Machine Intelligence, vol. 13, no. 611, (1991).
[8] F. Pastor and E. Loute, “Limit analysis decomposition and finite element mixed method Original
Research Article”, Journal of Computational and Applied Mathematics, vol. 234, no. 2213, (2010).
[9] H. Li and Z. Lei, “Study and analysis on a new optical detection design method for photoelectric
detection target”, Sensor review, vol. 33, no. 315, (2013).
[10] C. Wang and J. Wei, “Photoelectric imaging system in the analysis of atmospheric transmission
characteristics calculation problems”, Journal of Beijing institute of technology, vol. 23, no. 617, (2003).
[11] C. Lei,S. Zhang and X. Guan, “Extended target optical properties of the theoretical analysis and the
research”, Laser and particle beam, vol. 25, no. 1671, (2013).
[12] J.-Y.Zhang,M. Ji and H.-L. Wang, “Modeling and simulation of airborne stabilized sighting system”,
Journal of Applied Optics, vol. 27, no. 491, (2006).

Authors

Mianmian Dong (1981- ), she is a Lecturer, Master of


Engineering, graduated from Xidian University, Shaanxi Xi'an,
China. The main research direction is communication and
information processing.

Baoyi Guo(1979-), he is a Lecturer. Master of Engineering,


graduated from Xi'an Technological University, Shaanxi Xi'an,
China.. The main research direction is control theory and control
engineering.

10 Copyright © 2016 SERSC

You might also like