Design Fuzzy Logic Controller For Liquid Level Control

Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

International Journal of Emerging Science and Engineering (IJESE)

ISSN: 2319 6378, Volume-1, Issue-11, September 2013

Design Fuzzy Logic Controller for Liquid


Level Control
Abdelelah Kidher Mahmood, Hussam Hamad Taha

Abstract This paper investigates the usage of Fuzzy Logic The controller designed using fuzzy logic implements human
Controller (FLC) in controlling the liquid level in the second tank reasoning that has been programmed into fuzzy logic
of Coupled-Tanks plant through variable manipulation of liquid language (membership functions, rules and the rules
pump in the first tank. System modeling involves developing a
interpretation)It is interesting to note that the success of fuzzy
mathematical model by applying the fundamental physical laws of
science and engineering. Simulation studies are then conducted logic control is largely due to the awareness to its many
based on the developed model using MatlabR2012a for Simulink. industrial applications. Industrial interests in fuzzy logic
In this papers also study behavior system in terms of time response control as evidenced by the many publications on the subject
(e.g., steady state error, a certain rise-time, and overshoot) and in the control literature has created an awareness of its
compare FLC adverse PID controller. interesting importance by the academic community[8].
Index Terms Fuzzy Logic Controller, Simulink , System
Model. II. SYSTEM MODEL
I. INTRODUCTION Two interacting tanks in series with outlet flow rate being
function of the square root of tank height[1] shown Fig.1.
The industrial application of liquid level control is
tremendous especially in refineries petroleum and chemical
process industries[11]. Usually, level control exists in some of
the control loops of a process control system. An evaporator
system is one example in which a liquid level control system
is a part of control loop. Evaporators are used in many
chemical process industries for the purpose of separation of
chemical products. Level control is also very important for
mixing reactant process. The quality of the product of the
mixture depends on the level of the reactants in the mixing
tank. Mixing reactant process is a very common process in
chemical process industries and food processing
industries[5].Many other industrial applications are
concerned with level control, may it be a single loop level
A. Modeling equations
control or sometimes multi-loop level control. In some cases,
level controls that are available in the industries are for By applying the laws of physics to get a mathematical
interacting tanks. Hence, level control is one of the control model of the system to become the dynamic equation of the
system variables which are very important in process system, as in equations (1)&(2).
industries[8].. Nowadays, chemical engineering systems are dh1 F R1 (1)
- h1 h2
also at the heart of our economics[10]. The process industries dt A1 A1
such as refineries petrol, petro-chemical industries, paper dh2 R1 R2
h1 h2 (2)
making and water treatment industries require liquids to be dt A2 A2
pumped, stored in tanks, and then pumped to another tank[7].
In the design of control system, one often has a complicated
Where :
mathematical model of a system that has been obtained from
fundamental physics and chemistry . The above mentioned F =steady-state liquid flow rate ,c m3/sec.
industries are the vital industries where liquid level and flow F1 = out flow rate from first tank, cm3/sec.
control are essential[9]. Many times the liquids will be F2 = out flow rate from second tank, cm3/sec.
processed by chemical or mixing treatment in the tanks, but
always the level fluid in the tanks must be controlled, and the R1 and R2 = coefficients, cm2.5/sec.
flow between tanks must be regulated. Level and flow control ( h1 = level first tank ,cm . h2 = level second tank ,cm).
in tanks are the heart of all chemical engineering systems[11].
A1 =the cross sectional area for first tank, cm2.
A2 =the cross sectional area for second tank ,cm2.

III. SIMULINK BLOCK DIAGRAM DESCRIPTION


Manuscript received September, 2013.
Dr. Abdelelah Kidher Mahmood, department of Electrical, University Simulink model for liquid level control and Fuzzy Logic
of Mosul / College Engineering, Mosul, Iraq, Controller and by using program MatlabR2012a. Based on
Hussam Hamad Taha, department of Electrical, University of Mosul/ the dynamic equations (1) and (2) a simulink block diagram
College Engineering, Mosul, Iraq,
Design Fuzzy Logic Controller for Liquid Level Control

Fig.2 showing the nonlinear model of the plant can be formed B. Inputs and Output for System
successively .Fig.3 shows the subsystem embedding the We have defined two inputs and one output for the fuzzy logic
Simulink block diagram of the nonlinear model of the plant. controller may be shown as Fig.5. One is error that range of
For pumping liquid is pumping capacity ( F = 5 cm3\sec).
error h ref h 2 h ref
represented if the set point for
level that control on it, and the other one is ratio of change of
liquid The highest value
of the liquid level is 13, which represents the height of each
tank of two tanks that the error rate ranging from -13 to 13, so
the error range of input is from -13 to 13 either input
range from -0.2to 0.2 ,the range output -100 to 100 that
represents The input is divided into three
membership functions are "low" , "okay" and "high", either
input is divided into three membership functions
"negative" , "none" and "positive", the output is
divided into five membership functions "close fast" , "close
low" and "no change" , "open low" and "open fast" and are
used triangular membership functions in the inputs and output
Fig.6 illustrate this. Both these inputs are applied to the rule
editor. According to the rules written in the rule editor the
controller takes the action and governs the running of the
pump which is the output of the controller and is denoted by

IV. DESIGNING OF FUZZY LOGIC CONTROLLER


A. Fuzzy Logic Controller Review
Fuzzy logic is a part of artificial intelligence or machine

have been successfully used in control in several fields. Fuzzy


logic is a form of logic whose underlying modes of reasoning
are approximate instead of exact. The general idea about
fuzzy logic is that it takes the inputs from the sensors which is
a crisp value and transforms it into membership values
ranging from 0 to 1[3]. Unlike crisp logic ,it emulates the

Fuzzy logic controllers (FLCs) are knowledge-based


-TH
be constructed using the knowledge of experts in the given

controller structures, the Fig.4 is shown all common types of


controllers consist of:
-to-fuzzy [B/F] conversion)

-to-binary [F/B] conversion)


[4].

C. The Fuzzy Rule


on Constructing rules using the graphical Rule Editor interface is
very clearly. Based on the descriptions of the input and output
variables defined with the FIS Editor, the Rule Editor allows
you to construct the rule statements automatically, by
clicking on and selecting one item in each input variable box,
International Journal of Emerging Science and Engineering (IJESE)
ISSN: 2319 6378, Volume-1, Issue-11, September 2013

one item in each output box, and one connection item[8].Fig.7 response of second tank if acquire any leakage or disturbance
illustrate rule bases that used in the fuzzy logic controller. in tank and that demonstrates how to return the controller to
control the liquid level and the same performance in transients
with presence oscillations or overshoot that lead to instability
system.

V. PID CONTROLLER
We are using PID controller to compare with fuzzy logic
controller ,for finding constants controller use tool "PID" in
simulation of MatlabR2012a program, which depends on the
frequency response at the calculate of constants controller

Fig.8 illustrate the method calculate constants controller.

VII. DISCUSSION
The FLC is applied to the plant ,the results have been obtained
from simulation are plotted against with that of conventional
Fig.9 simulink for control system with PID Controller. controller PID controller for comparison purposes. The
simulation results are obtained using a 5 rule FLC. Rules
VI. SIMULATION RESULTS shown in Rule Editor provide inference mechanism strategy
Response of second tank level using fuzzy logic controller and producing the control signal as output. For comparison
Fig.10 provide good performance in terms of oscillations and purposes ,simulation plots include a conventional PID
overshoot in the absence of a prediction mechanism and controller, and the fuzzy algorithm. FLC provide good and
Fig.11 illustrate response of second tank if acquire any satisfactory time domain response performance in terms of
leakage or disturbance in tank and that demonstrates how to oscillations and overshoot are quite absence due to
return the controller to control the liquid level and the same prediction mechanism. The FLC algorithm adapts quickly to
performance without get any oscillations or overshoot longer time delays and provides a stable response while the
.Otherwise, Response of liquid level controller using PID PID controllers may drive the system unstable due to
controller Fig.12 it is seen that PID controllers provide mismatch error generated by the inaccurate time delay
performance in terms of oscillations and overshoot in the parameter used in the plant model. From the simulations, in
presence of a prediction mechanism and Fig.13 illustrate the presence of unknown or possibly varying time delay, the
Design Fuzzy Logic Controller for Liquid Level Control

proposed FLC shows a significant improvement in [10] Elke Laubwald, " Coupled Tanks Systems 1 " Visiting Scientist,
control systems principles.co.uk
maintaining performance and preserving stability over
[11] Abdul Rasyid Bin Mohammd Ali,"Optimization of Controller
standard PID method .To strictly limit the overshoot, a Fuzzy Parameters for A Couple Tanks System using Metamodelling
Control can achieve great control effect. In this paper, we take Technique",Thesis submitted for Bachelor of Electrical Engineering
the liquid level tank , and use MatlabR2012a to design a (Mechatronics), University Technology Malaysia, 2009,147 pp.
Fuzzy Control. Then we analyze the control effect and
Abdelelah Kidher Mahmood: was boring
compare it with the effect of PID controller. As a result of onJuly-1955,Kirkuk-IRAQ, he received
comparing, Fuzzy Control is superior to PID control. Ph.D. in Control Engineering from Saint
Especially, it can give more attention to various parameters, Peters burg. University Russia in 1992.
such as the time of response, the error of steadying and M.Sc., Pg. Dip ,B.Sc. in Electronic and
Communication, Department of Electrical
overshoot. Comparison of the control results from these two Engineering, University of Mosul, IRAQ,
systems indicated that the fuzzy logic controller significantly 1981, 1979, and 1978, respectively.
reduced overshoot and steady state error. Comparison results Assistance Professor from 2008, Lecturer
of PID and FLC are shown Table I below. The overall 1993-2008, Assistance Lecturer 1984-1993. Member of IEEE-2009. His
research interest include Control Engineering, Fuzzy Logic, Intelligent
performance may be summarized as: Techniques, Real Time Digital Control. Fractional order controller.

Table I. Comparison results of PID and FLC Hussam Hamad Taha: was boring on February
Parameter PID FLC -1985, Kirkuk IRAQ ,he received B.Sc. in
Control and System Engineering from Technology
Overshoot Present Not Present University IRAQ in 2007, M.Sc. student in
Settling Time More Less Control, Department of Electrical Engineering,
University of Mosul, IRAQ . His research interest
Transient Present Not Present include Control Engineering, Fuzzy Logic,
Rise Time Less More Intelligent Techniques, Real Time Digital Control.
Process Control.
VIII. CONCLUSION
Unlike the conventional PID controller the Fuzzy Logic
Controller has benefits on the system response ,a unique FLC
using a small number of rules and straightforward
implementation has been proposed to solve a class of level
control problems with unknown dynamics or variable time
delays commonly found in industry. Additionally, the FLC
can be easily programmed into many currently available
industrial process controllers. The FLC on a level control
problem with promising results can be applied to an entirely
different industrial level controlling apparatus .As a future
work one can develop design a FLC for a couple tanks system
as adaptive Fuzzy Logic Controller like PID algorithm, which
gives high performance for systems and high intelligence.

REFERENCES
[1] Katsuhiko Ogata, Modern Control Engineering , Fifth Edition, 2010,
905pp.
[2] User's Guide of Matlab for Fuzzy Logic Toolbox.2012.B.
[3] Elmer P. Dadios," Fuzzy Logic Controls, Concepts, Theories and
Applications", First Edition ,Janeza Trdine 9, 51000 Rijeka, Croatia,
2012,428pp.
[4]
and Applications", CRC Press Taylor & Francis Group, 2006,392pp.
[5] Carlos A. Smith, Ph.D., P.E. &Armando B. Corripio, Ph.D.,
P.E."Principles and Practice of Automatic Process Control" Second
Edition, 1997,783pp.
[6] S. N. Sivanandam, S. Sumathi and S. N. Deepa"Introduction to Fuzzy
Logic using MATLAB",Springer-Verlag Berlin Heidelberg
2007,441pp.
[7] P. Berk*, D. Stajnko, P. Vindis, B. Mursec, M. Lakota "Synthesis
water level control by fuzzy logic" International OCSCO World Press,
Volume 45,Issue 2,April 2011,pp.204-210.
[8] Dharamniwas , Aziz Ahmad , Varun Redhu and Umesh Gupta,"
Liquid Level Control by using Fuzzy Logic Controller", International
Journal of Advances in Engineering & Technology, July 2012. Vol. 4,
Issue 1, pp. 537-549.
[9] G.Sakthivel & T.S.Anandhi & S.P.Natarajan," Design of Fuzzy Logic
Controller for a Spherical tank system and Its Real Time
Implementation",G.Sakthivel,T.S.Anandhi,S.P.Natarajan/
International Journal of Engineering Research and Applications
(IJERA), Vol. 1, Issue 3, pp.934-940.

You might also like