1. 1
Fuzzy Logic in Level Controller
by
Ajeet Kumar (11CH10006)
Jitendra Lodha (11CH30008)
Vivek Yadav (11CH100**)
Department of Chemical Engineering
Indian Institute of Technology, Kharagpur - 721302, India
Abstract
This paper presents the fuzzy controller for adjustment of liquid level in the tank
and presents the theoretical concepts of triangular fuzzy numbers mathematics.
Using the fuzzy controller will be maintained constant the liquid level. We
incorporated the SISO system – Single Input Single Output to simulate the system,
single input of which is Error in height of the water column in the tank under study
which after fuzzification & operations is defuzzified to get the single output which is
Flow Rate of water. We had made a rule base which is used to interpret the input so
as to get the output using Mamdani’s Procedures.
Introduction
Fuzzy controllers are known for their ability to provide very good control of this type
of system. Fuzzy controllers are particularly suited to applications where it is not
necessary to find the global optimum solution, that is, where a near optimum
solution is sufficient. Fuzzy controllers have their origin in the concept of fuzzy sets,
which was first proposed by Zadeh in 1965. The concept was quickly expanded and
there exist today extensive theories related to fuzzy sets and their corresponding
fuzzy logic. While mathematically more complicated than classical sets, fuzzy sets
provide a more natural representation of the world.
Fuzzy logic provides an inference morphology that enables approximate human
reasoning capabilities to be applied to knowledge-based systems. The theory of
fuzzy logic provides a mathematical strength to capture the uncertainties associated
2. 2
with human cognitive processes, such as thinking and reasoning. The conventional
approaches to knowledge representation
lack the means for representation the meaning of fuzzy concepts. As a consequence,
the approaches based on first order logic and classical probability theory do not
provide an appropriate conceptual framework for dealing with the representation of
commonsense knowledge, since such knowledge is by its nature both lexically
imprecise and non categorical.
The In this report, we have presented the use of fuzzy logic in the level controller,
one of the most common chemical engineering equipment used in process control.
Some of the essential characteristics of fuzzy logic relate to the following
(Zadeh, 1992):
In fuzzy logic, exact reasoning is viewed as a limiting case of approximate
reasoning.
In fuzzy logic, everything is a matter of degree.
In fuzzy logic, knowledge is interpreted a collection of elastic or,
equivalently, fuzzy constraint on a collection of variables.
Inference is viewed as a process of propagation of elastic constraints.
Any logical system can be fuzzified
There are two main characteristics of fuzzy systems:
Fuzzy systems are suitable for uncertain or approximate reasoning,
especially for the system with a mathematical model that is difficult to
derive.
Fuzzy logic allows decision making with estimated values under
incomplete or uncertain information.
Control system:
3. 3
Here the input to the tank is coming from a stream 𝐹𝑖 and is the output stream is 𝐹𝑜.
Our control objective is to keep the output constant in spite of the variation in the
input stream,
Presentation of fuzzy controller
The implementation of fuzzy controller involves three stages:
information fuzzification;
inference operation;
information defuzzification
fuzzy inference system
4. 4
The Level transmitter measures the height of the tank and gives the error (ℎ 𝑠𝑝 − ℎ).
This error is classified as follows:
NL (ℎ 𝑠𝑝 − ℎ) < - 50
NS -50 < (ℎ 𝑠𝑝 − ℎ) < -25
Z -25 < (ℎ 𝑠𝑝 − ℎ) < 0
PS 0 < (ℎ 𝑠𝑝 − ℎ) < 25
PL (ℎ 𝑠𝑝 − ℎ) >25
Hence based upon the error in height it gives the output of the input stream by
manipulating the control valve.
The outputs are classified as below:
Z 𝐹𝑖 <25
S 0 < 𝐹𝑖 <50
M 25 <𝐹𝑖 < 75
L 𝐹𝑖 >75
5. 5
Rule evaluation :
Error Flow rate
NL Z
NS S
Z M
PS M
PL L
Membership function of input
Membership function of output
6. 6
Sample Calculation:
Initial Data :
Initial output flow rate = 40 𝑚3
/ℎ𝑟
Area of the tank = 1 𝑚2
Time interval = 1s
Set point of height ℎ 𝑠𝑝 = 50 cm
Initial Height of the tank ( at t=0 )ℎ0 = 40 cm
Error = 10 cm
For membership value:
7. 7
From the Input data , we have calculated the membership values of the error
(ℎ 𝑠𝑝 − ℎ) which turn out to be as follows :
Z(.6) and PS (.4).
From this output membership values are M(0.6) and M(0.4) respectively.
By using Min-max rules , the output is M(.6)
In general we fallow the c.g method to find out the output
i.e xcg =(A1x1+A2x2)/(A1+A2);
But in this case we can easily see by symmetry that cg of the area will be 50
After defuzzification, input flow rate = 50 𝑚3
/ℎ𝑟
ℎ𝑖+1 = ℎ𝑖 + 𝐹𝑖 − 𝐹0
Do more calculation
And give the result
Conclusion
The fuzzy controller used maintains constant the liquid level in tank at a same value,
initially established, through adjustment of adduction and evacuation pipes valves,
8. 8
because in tank interfere the perturbations. 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.
Code for the membership function (input and output)....DocumentsTerm
Paper on 'Level Controller using Fuzzy Logic' by Kumar,Ajeet et. al..docx