Vous êtes sur la page 1sur 5

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882

Volume 4, Issue 2, February 2015

Simulink Modeling for Liquid Level Control Using


Fuzzy Logic Controller
Shilpa Sindageri1, S. V. Halse2
1

Department of Electronics, Karnataka State Womens University Vijayapura, Karnataka, India


2
Registrar (Evaluation), Gulbarga University, Gulbarga, Karnataka, India

ABSTRACT
In control systems there are number of generic systems
and methods which are encountered in all areas of
industry and technology. From the dozens of ways to
control any system, it turns out that fuzzy is often the
very best way. The only reasons are faster and cheaper.
One of successful application that used fuzzy control is
liquid level control. The purpose of this project is to
design a simulation system of fuzzy logic controller for
liquid level control by using simulation package which
Is Fuzzy Logic Toolbox in MATLAB 7.9 software. By
doing some modification of this project, the design will
be very useful for the system relates to liquid level
control that widely use in industry now a days. To
strictly limit the over shoot, using Fuzzy Control can
achieve great control effect .In this paper, we take the
liquid level tank, and use MATLAB to design a Fuzzy
Control.

partners initiated a research program investigating the


role of fuzzy logic in industrial control. The primary
question at that time was: What the fuzzy logic control
does that the conventional cannot do? Here we
concentrate on fuzzy logic control (one of the Intelligent
Control Technique) as an alternative control strategy to
the current proportionalintegralderivative (PID)
method widely used in industry. Consider a generic
liquid level control application shown in figure [7].

Keywords - FLC, FIS, Rule Viewer, surface viewer

I.

INTRODUCTION
Fig. 1 generic liquid level control

While modern control theory has made modest inroad


into practice, fuzzy Logic control has been rapidly
gaining popularity among practicing engineers. This
increased popularity can be attributed to the fact that
fuzzy logic provides a powerful vehicle that allows
engineers to incorporate human reasoning in the control
algorithm. As opposed to the modern control theory,
fuzzy logic design is not based on the mathematical
model of the process. The controller designed using
fuzzy logic implements human reasoning that has been
programmed into fuzzy logic language (membership
functions, rules and the rules interpretation) It is
interesting to note that the success of fuzzy logic control
is largely due to the awareness to its many industrial
applications. An industrial interest in fuzzy logic control
as evidenced by the many publications on the subject in
the control literature has created an awareness of its
interesting importance by the academic community.
Starting in the early 90s, the Applied Research Control
Lab at Cleveland State University supported by industry

1.1 Liquid -Tank System


Consider the tank with liquid level is shown in below
figure we want to design a controller that will either
maintain that liquid level at a desired point or one that
can be used to move the level set-point say from 4 feet to
6 feet. It is easier to confine our explanation to the setpoint tracking problem. Suppose that the tank in figure
(2) is 10 feet tall and the tank is empty. We want to fill
the tank level to 5 feet, so we make the current set point,
w to equal to 5. The idea is to fill the tank to the desired
set point as quickly and smoothly as possible. We want
to minimize the amount of overshoot or the time that the
tank has a level greater than the set point value before it
finally settles down.

www.ijsret.org

77

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 2, February 2015

Q, pump flow into tank

A, tank cross sectional area

h
q
Fig. 2 Tank with a liquid level that needs to be controlled

The current level at any time t, is designated as h. liquid


flow out of the tank through an open valve .This flow is
designed by the letter q. liquid flow into the tank. By
means of a pump. The pump flow Q can be regulated by
the controller. The tank cross sectional area A. Equation
(1) describes the mass balance for the liquid in the tank
as a function of time.
(1)
Flow out of the tank q through the outlet pipe and the
valve is described by

C) Pump Controllers: Pump controllers manage pump


flow and pressure output.
D) Flow controllers: Flow controllers allow metered
flow of fluid in one or both directions .Many of them
allow for free flow in one direction and reduced or
metered flow in the reverse direction.
1.3 Industrial Uses
We consider level control a fundamental control
technique [3]. Level controls are used in all types of
applications:
Tank farms
Boilers
Waste treatment Plants
Reactor

II.

DESIGN
OF
CONTROLLER

FUZZY

LOGIC

2.1 The FIS Editor


We have defined two Inputs for the Fuzzy Controller.
One is Level of the liquid in the Tank denoted as level
and the other one is rate of change of liquid in the Tank
denoted as rate. 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
opening of the Valve which is the Output of the
controller and is denoted by valve. It may be shown
as:

(2)
Where is a friction coefficient for the flow through
both the small exit pipe and the valve. The term Ap
represents the cross sectional area of the small exit pipe.
g is the gravitational constant.
Fig.3 Mamdani type Fuzzy Controller

1.2 Classification of Liquid Level Controllers


There are several types of level controllers. Some of
these are:
A) Level Controllers: Level controllers are devices that
operate automatically to regulate liquid or dry material
level values. The rare three basic types of control
functions that level controllers can use, limit control,
linear control and advanced or nonlinear control [2].
B) Integrated motion controllers: Integrated motion
control systems contain matched components such as
controllers, motor drives, motors, encoders, user
interfaces and software. The manufacturer optimally
matches Components in these systems. They are
frequently customized for specific applications.

2.2. Membership function Editor


The Membership Function Editor shares some features
with the FIS Editor. The Membership Function Editor is
the tool that lets you display and edit all of the
membership functions associated with all of the input
and output variables for the entire fuzzy inference
system [5, 6].When you open the Membership Function
Editor to work on a fuzzy inference system that does not
already exist in the workspace, there are not yet any
membership functions associated with the variables that
you have just defined with the FIS Editor.
2.2.1. Fuzzy set of characterizing the input
A) Level
(Range:-1 to 1)

www.ijsret.org

78

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 2, February 2015

Fuzzy Variable
High
Ok
Low

MF used
trapmf
trapmf
trapmf

Fig.6 Membership function for valve

2.3.1 Constructing the Fuzzy rules


In figure (7) shows the fuzzy rules for liquid level in the
tank constructing rules using the graphical Rule Editor
interface is fairly self-evident. 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 on
item in each input variable box, one item in each output
box, and one connection item [4].Choosing none as one
of the variable qualities will exclude that variable from a
given rule.

Fig.4 Membership function for level

B) Rate

(Range:-1 to 1)

Fuzzy Variable
Negative
Zero
Positive

MF used
trapmf
trapmf
Trapmf

Fig.5 Membership function for rate

2.2.2. Fuzzy Set of Characterizing the Output


In the output triangular membership function used and
the Range is -1 to 1
(Range:-1 to 1)
A) valve
Fuzzy Variable
MF used
Close_fast
triangularmf
Close_low
triangularmf
No_change
triangularmf
Open_slow
triangularmf
Open_fast
triangularmf

Fig. 7 Rule editor

2.3.2. Fuzzy rule matrix for liquid level

www.ijsret.org

RULE
MATRIX
Negative

Table 1: rule matrix


low
ok

High

OF

OS

CF

zero

OF

NC

CF

positive

OF

CS

CF

79

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 2, February 2015

OF
OS
CF
CS
NC

III.

OPEN FAST
OPEN SLOW
CLOSE FAST
CLOSE SLOW
NO CHANGE

SIMULINK BLOCK DIAGRAM AND


RESULT

A continuous square wave is applied at the input to the


controller for creating continuous disturbance. Another
I/P to the controller come from feedback .The controller
takes the action and decides the position of the valve
which gives the desired flow of the liquid into the tank.
The positioning of the valve is decided by the rules
written in the Fuzzy Logic Controller Rule Editor. If the
liquid level in the tank is low then the valve open
completely and if the liquid level is high in the tank then
the valve closes or opens up to an extent. When the level
is full then the valve closes completely.
Figure (9) show that the system response time is reduced
using fuzzy controller is obtaining a constant value for
the liquid level.

3.1.1. The Rule Viewer


The Rule Viewer allows interpreting the entire fuzzy
inference process at once. The rule viewer also shows
how the shape of certain membership functions
influences the overall result. Since it plots every part of
every rule, it can become unwieldy for particularly large
systems, but, for a relatively small number of inputs and
outputs, it performs well (depending on how much
screen space you devote to it) with up to 30 rules and as
many as 6 or 7 variables[9]. The Rule Viewer shows one
calculation at a time and in great detail. In this sense, it
presents a sort of micro view of the fuzzy inference
system. If you want to see the entire output surface of
your system, that is, the entire span of the output set
based on the entire span of the input set, you need to
open up the Surface Viewer.
3.1.2. Response of Fuzzy Logic Controller using Rule
Viewer
When the value of the level is 0.55 and the rate is 0.074
then the value of valve is -0.25.

Fig.10 fuzzy rule viewer

Fig.8 Simulink block diagram

3.2. Surface viewer

Fig.9 System response

Fig.11 fuzzy surface viewer

www.ijsret.org

80

International Journal of Scientific Research Engineering & Technology (IJSRET), ISSN 2278 0882
Volume 4, Issue 2, February 2015

IV.

CONCLUSION

The fuzzy controller used maintains constant the liquid


level in tank at a same value, because, the fuzzy
controller work with linguistic variables the liquid level
will be modified with a high precision. The fuzzy
controller of system provide at output modification of
liquid level hold of system perturbations. The
characteristics of the fuzzy controller that were observed
during its performance validation stage were quite
satisfactory. In fact, based on the results of the
performance validation, it was concluded that the fuzzy
controller developed was suitable for application to the
control of the liquid level.

REFERENCES
[1] Matlab/Simulink. User Manual. Math Works SUA,
2004.
[2] Q .Li, Y .Fang, J. Song, J. Wang, "The application
of fuzzy control in liquid level system",
IEEE/ICMTMA, Vol.3,pp.776-778, Mar.2010.
[3] P. King and E .Mamdani, The application of fuzzy
control to industrial process, Automatic, vol.13,pp.235
242,1997.
[4] Fuzzy System Hand BookCox. E-Academic Press.
[5] E.H. Mamdani, Applications of fuzzy logic to
approximate reasoning using linguistic synthesis, IEEE.
[6] P.J. King, and E.H .Mamdani*, The application of
Fuzzy logic control systems to industrial processes,
Automated vol.11, 1997, pp. 235-212.
[7] Dharamniwas and AzizAhmad and VarunRedhu and
UmeshGupta liquid level control by using fuzzy logic
controller, IJAET, Vol. 4, Issue 1, JULY 2012. pp.
537-549.
[8] Mihaela Raduca, Eugen Raduca, Cornel Hatiegan,
and Dan Ungureanu Fuzzy controller for adjustment
of liquid level in the tank, Annals of the University of
Craiova, Mathematics and Computer Science Series,
Volume 38(4), 2011, pp. 33-43.
[9] Using Fuzzy Logic Yan, Jan, Ryan & Power:
Prentice Hall, New York.

www.ijsret.org

81

Vous aimerez peut-être aussi