Control Full Paper
Control Full Paper
Control Full Paper
Faculty of Engineering
Supervised by:
Prepared by:
2020-2021
Abstract
Fuzzy logic control (FLC) system is an effective tool for dealing with the
complicated processes. The researches and investigations on the fuzzy logic
control systems have progressed continually. The quantity and diversity of fuzzy
logic applications have grown substantially in recent years, these applications
cover a wide range of consumer products including microwaves, washing
machine, and cameras to the industrial scale processes such as portfolio choosing,
decision support system, along with medical instrument controlling. This paper
aims to provide a comprehensive review about the basic concepts of fuzzy logic
control system, the main reasons behind using this control system, its advantages
and drawbacks along with presenting two case studies in which fuzzy control
system were used.
Key words: Fuzzy Logic Control (FLC), Air Condition System, Fluid Level
Control
1
1. Introduction
Fuzzy logic system is a well-known soft computing tool that progresses the
practicable algorithm through embedding an organized human comprehension and
knowledge. Fuzzy logic system is a logical framework which offers a model that
is designed for human elucidation approaches which are imprecise (fuzzy) rather
than exact. On the basis of knowledge and information demonstrated in human
languages, the fuzzy logic systems may be used in designing expert and intelligent
systems(1). Fuzzy logic systems are sort of an artificial intelligence, though in
terms of history and applications are newer and younger than the artificial
intelligence-based expert systems in comparison. Fuzzy logic systems deal with
issues and problems which possess lack of exactness and accuracy, ambiguity,
estimations, unreliability, uncertainties, qualitative disorganization, along with
incomplete veracity.
2
Mamdani fuzzy systems, which are described through IF-THEN rules correlated
with the linguistically variables as below:
Rule R i : IF x1 is ℳ1 i x2 is ℳ2 i … xm is ℳm i
THEN γ is ℋ i i = 1/ 2/3 … n
Where ℋ i and ℳj i , j = 1/2/3 … m, represent the fuzzy sets ,and the number
of the fuzzy rules is showed by (n). Second fuzzy system is Takagi-Sugeno (T-S)
fuzzy system, which have the following functional consequent:
Rule R i : IF x1 is ℳ1 i x2 is ℳ2 i … xm is ℳm i
f i (x1 /x2 / … xm ) = bi + a1 i x1 + a2 i x2 + ⋯ + am i xm
Rule R i : IF x1 is ℳ1 i x2 is ℳ2 i … xm is ℳm i
THEN γ is bi i = 1/2/3 … n
Where (bi ) represents a singleton like a real number. The singleton fuzzy
system is lately being called as piecewise multi-affine (PMA) system, because the
system input-output relationship regarding an affine incontrol system is
discovered to be in a form of a multi-affine function(7). These kind of fuzzy
systems are used to be called piecewise bilinear systems (PB), or biaffine systems
more exactly, because for the two dimensional case the system output is expressed
like below(6,8):
3
γ = ax1 + bx2 + cx1 x2 + d (1)
Because the fuzzy variables are employed in both of the consequent along with
the premise, the Mamdani fuzzy systems are comprehensible linguistically. The
T-S fuzzy systems, on the other hand, do not own the linguistic variables as solely
the functional membership functions (MFs) are applied without any labels.
Piecewise multi-affine systems (PMA) are a clarified particular case of both of the
previous fuzzy system types. As a matter of fact, piecewise multi-affine systems
(PMA) are Mamdani fuzzy systems but with a singleton consequent, they may
also be attained from the T-S fuzzy systems in the case when just the constants
present in the consequent. The T-S fuzzy systems are just apprehensive with the
fuzzy sets in the premise, on the other hand, the Mamdani fuzzy systems are
extremely apprehensive with the logic and fuzzy sets.
Piecewise multi-affine systems (PMA) are independent of the logic and fuzzy
sets, because neither membership functions (MFs) nor linguistic variables are
required to be used. In the piecewise multi-affine systems (PMA), these premises
functions have a triangular form and solely play roles like an interpolation
parameter, and they are not always regarded like a membership functions in the
typical fuzzy meaning. On the other hand, the piecewise multi-affine systems
(PMA) obtained from the Mamdani fuzzy systems can preserve their stature in the
fuzzy control, and if required, linguistic labels might be added to the singletons. It
is worth noting that all three categories of fuzzy systems have widespread
estimation capacity for non-linear functions. T-S fuzzy system models may
dramatically minimize the fuzzy rule numbers, mainly in the case of high
dimensional complicated systems(9,10). Researchers encountered many criticisms
from the traditional control theories over the first 10 years following the successful
implementation of fuzzy control by Mamdani as reported, and this was due to the
4
absence of the stability analysis for the fuzzy control back then (6,11). T-S fuzzy
systems were presented in 1985 for addressing these problems and criticisms.
Because the T-S fuzzy systems, in their consequents are related with the linear
type models, both of the model-based stability analysis process and control design
process may be carried out for fuzzy system through applying traditional
Lyapunovbased techniques. The T-S fuzzy modeling may be utilized to precisely
describe a nonlinear type system within a compact set of state space, in which the
nonlinearities are fixed within the membership functions (MFs). As a result,
making a non-conservative stability analysis for a given nonlinear system through
T-S fuzzy modeling techniques is nearly impossible(12,13).
For the purpose of overcoming this issues of T-S fuzzy models, piecewise
multi-affine (PMA) models were introduced. piecewise multi-affine (PMA)
models are totally parametric like linear type systems, however, in their nature
they are estimated models for nonlinear systems, based on this advantage, for
piecewise multi-affine (PMA) models, the required and adequate stability analysis
can be obtained like in the linear system conditions(14–16). In the recent years, fuzzy
logic control literature has grown quite rapidly, which makes it impossible to offer
a full and comprehensive review of the extensive variation of the applications that
have been developed.
5
2. Overview of Fuzzy Logic Control System (FLC)
The used variables are mainly composing of state error, change rate of state
error (state error differentiation), or state error area (state error integration). The
membership functions (MFs) are graphical depictions of an element's extent of
belonging to the fuzzy set. Base on the required accuracy, various membership
functions for the input and output can be used. Triangular and trapezoidal
membership functions are the commonly used membership functions, Bell and
Gaussian shaped membership functions are also available. The control precision
enhances as the number of membership functions increase, and the control
6
operates efficiently. Time delay and complication because of the calculations rises
with the number of used membership functions for the linguistic variables. As a
result, the number of the membership functions to be utilized is a decision which
must be taken based on the required control capability and quickness.
7
The second step is the fuzzy inference process in which membership functions
and the control rules are combined together to obtain the fuzzy control output. The
derived outputs are organized in to a table which called lookup table. Fuzzy
inference process can be designed through applying two different methods,
Mamdani and Sugeno. The obtained outputs of these two methods differ slightly.
Fuzzy control system is shown in figure 2. The methods of Mamdani are the most
widely applied methods, this method anticipates the output variable to be the fuzzy
sets and it is preferable to use a single linguistic variable's membership function
rather than a large number of fuzzy sets, that may be monotonous in some
circumstances(1,17). This method in which a single linguistic variable is utilized in
output is known as Singleton output method. In designing the fuzzy inference
process with Sugeno method the output membership function is either a constant
or linear. Fuzzification of the inputs and implementing the fuzzy operators in the
Sugeno method are resemble to those of Mamdani method. If the input one is (𝑥)
and input two is (𝑦), then the output has a linear form as(1,19):
𝑂 = 𝐾𝑥 + 𝐿𝑦 + 𝑀 (2)
The output (𝑂) will be a constant for the Sugeno model of a zero order as:
𝐾=𝐿=𝑀 (3)
In fuzzy inference process, the fuzzy control rules are the most essential and
critical, these rules are as close as that of human being’s intuition and inference
for the action course. The third step is Defuzzification process which is reverse of
Fuzzification process, it is the process of converting the fuzzy control outputs from
the linguistic variables into crisp variables (crisp outputs). For working out the
relevant control outputs different methods including center of gravity (COG),
8
bisector of area, mean of maximum (MOM) have been applied, each of the control
outputs have to be organized into the lookup table. A fuzzy control output has to
be selected from the lookup table created in the previous step depending on the
present input for real life applications. Real life implementations are commonly
related with input variables of more than one dimension. In this case, the
membership functions for each of the dimensional variable must be developed
individually, and the related operation must be performed if the system has multi-
output variables(19). Fuzzy sets rely on the specific rules, the most essential
prerequisite for fuzzy logic is the rule base. The rule base is usually comprised of
several cases of (If-Then) rules. The fuzzy sets and the membership functions are
defined firstly. After that, the (If-Then) rules are decided for the membership
functions for the specific control, the outputs are manipulated through these rules
on the inputs. Typical (If-Then) rule comprises of two sections: antecedent and
conclusion or result. The antecedent part refers to (If) statement and the conclusion
part refers to (Then) statement in this manner: If − (antecedent) & Then −
(consequent). For instance: If the temperature is low, then increase the settings on
the air conditioner. In fuzzy logic, the AND, OR, and NOT Boolean logic
operators also exist, which are generally described as minimum, maximum, and
complement. These are called Zadeh operators once they are described in this
manner, due to being defined like this firstly in the original papers of Zadeh. For
(x) and (y) fuzzy variables(20,21):
Other operators, such as hedges, are much more linguistic by nature and can
be used also, these are usually adverbs like very or somewhat, that adjust the set
9
meaning through a mathematical equation. In the fuzzy set each one of the
elements has a specific membership degree, in which it belongs to the certain fuzzy
set as below:
Considering two Fuzzy sets A and B in which (A, B) ϵ (U). The Universe of
Discourse is represented by (U), the principal set operations include: Complement,
Intersection and Union. The fuzzy set's Complement is described as a fuzzy set
with membership function revealed below:
μA (x) = 1 − μA (x)
̅̅̅ (8)
Union is described as the smallest set that includes all of the elements in set A
or B, it can be represented as (A+B) or A ∪ B and its membership is given as:
A fuzzy expert system is a system which employs fuzzy logic rather than
Boolean logic. The most widespread use of fuzzy logic is fuzzy expert systems,
they are utilized in variety of fields, like Financial systems, Pattern recognition,
along with Linear and nonlinear control(17).
10
3. Why Fuzzy Logic Control System?
Fuzzy logic control system is applied in variety of fields due to many reasons,
including the following(22,23):
Fuzzy logic control system exhibits several advantages including the following
ones(23,24):
Fuzzy logic control systems are easy for understanding, due to the
simple concepts of the control.
Fuzzy logic control system has human-like instincts and intuitions,
giving it the ability to adjust the complications in the controlling.
Fuzzy logic control system functions efficiently with disruptive and
noisy inputs.
11
Fuzzy control system can be operated with multi-inputs and provide
multi-outputs because it only operates on rule basis. It is an easier task to create
the rule base for fuzzy logic control than optimizing the proportional integral
derivative (PID) control parameters.
Whenever any sensor fails, fuzzy logic control system can be
programmed to switch-off securely and safely rather than keeping it on the
operating mode, that may be dangerous to the safety of the plant.
Fuzzy logic control systems do not comprise of complex
mathematical analysis as a result, they are designed in a very easy manner.
Fuzzy logic systems do not demand sensors with high precision and
accuracy but compensate for the exactness and precision making use of the
intuitive control that makes this approach considerably economical.
Fuzzy logic system functions effectively even in highly nonlinear
systems adjusting to the circumstance. On the other hand, designing the other
conventional controllers for adapting in nonlinearity situation is considerably
a difficult task.
Fuzzy system has a very simple user interface. Once the final user is
not a specialist, end-user interpretation is much easier.
Easy calculation process, substantially presenting toolboxes along
with devoted integrated circuits.
Ambiguousness, fuzzy logic represents a natural manner of revealing
the unknown knowledge and information. The available tools to the fuzzy logic
system assists in concluding various actions and responses based on the
probability or necessity of specific plant conditions.
12
5. Disadvantages of Fuzzy Logic Control (FLC)
Beside its advantages, fuzzy logic control system has some drawbacks
including(24,25):
13
functions including linear functions. Other methods, like multi-layer neural
networks, can acquire and generalize even more effectively with much smaller
set of parameters including the number of neurons or rules, but in terms of cost
possibly the training development is slower and slighter understandability.
Fuzzy logic control system requires a lot of data.
Fuzzy logic control systems necessitate a high level of human
knowledge and proficiency.
Regular updating of the rules with time is required in fuzzy logic
system.
Fuzzy logic systems are comprehensible only in the case of being
simple.
14
Algorithms for hydrometeor categorization in polarimetric weather
radar.
Mineral deposit approximations.
Fuzzy logic control systems have also been included in some of the
microprocessor and microcontroller.
7. Case Study
In this study, a fuzzy logic controller was developed for Air Condition control
system for the purpose of controlling operation mode, fin direction, fan speed,
compressor motor speed for maintaining the room temperature at the set point or
close to it along with saving energy and preventing the system form damage. This
system comprises of four basic sensors for feedback control: the first one for input
electric volt that applied for keeping the system devices from damage caused by
varying voltages, second one for temperature, third one for humidity, and the
fourth one for dew point. MATLAB is used to simulate the Fuzzy logic algorithm
for the Air Conditioning Control System in this study. The Air Conditioning Fuzzy
logic control System takes into account four variables as below(28):
Before directing the system data to fuzzification step, the user temperature is
subtracted from the actual temperature. These variables are subjected to a fuzzy
15
arithmetic and criteria step, with the final result being Defuzzified to obtain the
following crisp results as illustrated in figure (3):
1. Compressor Speed.
2. Fan Speed.
3. Mood of Operation.
4. Fin Direction.
In this system, the membership function for each of the input variables and
output variables are defined individually. The input variables include following:
16
Table 1: Classification of user temperature (UT)
1 x ≤ 22
25−x
μlow (x) = { 22 ≤ x ≤ 25 (11)
3
0 other wise
x−22
22 ≤ x ≤ 25
3
μoptimal (x) = {28−x (12)
25 ≤ x ≤ 28
3
x−25
25 ≤ x ≤ 28
3
μhigh (x) = f(x) = { 1 28 ≤ x ≤ 30 (13)
0 other wise
17
Temperature difference (Tdif): The difference in between the actual
room temperature and the user temperature are represented through four
membership functions as negative, zero, positive, and large as shown in table
(2).
1 − 1 ≤ x ≤ −0.9
μnegative (x) = { −0.9x − 0.9 ≤ x ≤ 0 (14)
0 other wise
2(x + 0.5) − 0.5 ≤ x ≤ 0
μzero (x) = { (15)
2(0.5 − x) 0 ≤ x ≤ 0.5
x 0≤x≤1
μpositive (x) = { (16)
2−x 1≤x≤2
18
1−x 1≤x≤2
μnegative (x) = {1 2≤x≤3 (17)
0 other wise
Dew Point (Td): The term dew point defines information regarding
dew point temperature within the room, two membership functions are used for
dew point as optimal, humid as shown in table (3).
1 10 ≤ x ≤ 11
14−x
μoptimal (x) = { 3
11 ≤ x ≤ 14 (18)
0 other wise
19
x−12
12 ≤ x ≤ 15
3
μhumid (x) = { 1 15 ≤ x ≤ 18 (19)
0 other wise
1 130 ≤ x ≤ 160
180−x
μlow (x) = { 20 160 ≤ x ≤ 180 (20)
0 other wise
20
x−170
170 ≤ x ≤ 190
20
μregular (x) = {1 190 ≤ x ≤ 220 (21)
0 other wise
21
1 0 ≤ x ≤ 30
50−x
μlow (x) = { 30 ≤ x ≤ 50 (22)
20
0 other wise
x−40
40 ≤ x ≤ 60
20
μmedium (x) = { 80−x 60 ≤ x ≤ 80 (23)
20
0 other wise
x−70
70 ≤ x ≤ 90
20
μfast (x) = { 1 90 ≤ x ≤ 100 (24)
0 other wise
Fan Speed (Fc): Fan speed is specified as low, medium and high with
a range of (0−100 %), for calculating the membership functions through
scaling the ranges from (0-100) depending on the speed, the calculated
membership functions along with the range are shown in table (6).
22
1 0 ≤ x ≤ 30
50−x
μlow (x) = { 30 ≤ x ≤ 50 (25)
20
0 other wise
x−40
40 ≤ x ≤ 60
20
μmedium = { 80−x
60 ≤ x ≤ 80 (26)
20
0 other wise
x−70
70 ≤ x ≤ 90
20
μfast (x) = { 1 90 ≤ x ≤ 100 (27)
0 other wise
23
Fin direction (Fn): Fin directions manages the air from air condition towards
or aside from inhabitant. Presuming the top mounted air condition case, θ =
0° can be taken into account like towards and θ = 90° like aside from the
inhabitant.
It was concluded from this study that fuzzy control system exhibited a good
performance concerning the controlling process of the air conditioning system.
24
7.2 Fluid Level Control
In this study a fuzzy logic based system was designed for the purpose of
controlling the fluid level in a tank at the desired set point in a short period of time
through an adjustment in the output valve. The system comprises of two inputs
which are error and change in the error, along with one output which is output
valve. For controlling the inlet flow and the outlet flow of the fluid within the tank,
the controller has to read the level of fluid along with its flowrate at every single
sampling period. MATALB program was applied for designing a simulation of
the system. The MATALB fuzzy logic toolkit was used for designing the fuzzy
logic controller, and the tank simulations were carried out in Simulink. The
function of the controller is controlling the water tank inlet valve based on the
amount of the fluid needed in the tank depending on the outlet flow. Base on the
various probabilities of inputs, the output valve is controlled through fuzzy logic
controller. Mamdani method was used in designing the fuzzy logic controller for
this system(29).
First Input:
The first input is defined like E (Error) which has three membership functions
as negative, ok and positive shown in figure (5). The first membership function is
negative and ranging from (−1 to 0), the second membership function is ok and
ranging from (−0.6746 to 0.659), and the third membership function is positive
which ranges from (0 to 1).
Second Input:
25
membership function is negative and ranging from (−0.1 to 0), and the second
membership function is positive ranging from (0 to 0.1).
Output:
26
Figure 5: Inputs of fuzzy logic based system(29).
27
Rules for Opening and Closing Valve of Tank:
The fuzzy logic controller design depends on the rules which are described in
the MATLAB/fuzzy rule editor, the applied rules depend on the mamdani
inference method as shown in figure (6). The design of the controller is based on
the five rules as bellow:
Rule 1
If there is no distinction between the inlet flow and outlet flow of the fluid
within the tank, then the error is (ok) and there will be no adjust in the valve
position.
Rule 2
If the distinction between the outlet flow and the inlet flow of the fluid within
the tank is positive, for instance the water flows out from the tank more than it is
being added to it, then for balancing the inlet flow and the outlet flow the valve
will be opened fast.
IF (E) is positive (P) and CE is ZE then OV is open fast (OF).
Rule 3
If the distinction between the outlet flow and inlet flow of the fluid within the
tank is negative, for instance the inlet flow of water is more than its outlet flow,
then for balancing that difference and reducing the inlet flow the valve will be
closed fast. IF E is negative (N) and CE is ZE then OV is close fast (CF).
Rule 4
If there is no distinction between the outlet flow and inlet flow of the fluid
within the tank just a slight distinction between water entering and leaving the
28
tank, then for balancing the flow the valve will close slowly.
IF E is OK and CE is P then OV is close slow (CS).
Rule 5
If the error between the outlet flow and inlet flow of the fluid within the tank
is (ok) but the water is flowing out from the tank a little more than its flowing in,
then for balancing the water flow the valve will open slowly.
IF E is OK AND CE is N then OV is open slow (OS).
29
Table 7: Rules for implementation of fuzzy controller
Calculation of OV
The rule viewer demonstrates how the overall result is affected by the shape of
the membership functions, as shown in figure (7). The output valve (OV)
mathematical calculations shown on the rule viewer are represented below:
Considering two points from the rule viewer as 0.3486 on the first input along
with 0.7545 on the second input, in the first rule the index of 𝑒(𝑡) is at 0.38, so
𝐷𝑒𝑔𝑟𝑒𝑒 𝑜𝑓 𝑓𝑟𝑒𝑒𝑑𝑜𝑚 = 𝐷𝑂𝐹1 = 𝛼1 = 0.38
30
𝛼𝑜𝑢𝑡 = 𝐷𝑂𝐹1 ⋀ 𝐷𝑂𝐹2 ⋀𝐷𝑂𝐹3 ⋀ 𝐷𝑂𝐹4 ⋀ 𝐷𝑂𝐹5 (28)
𝛼𝑜𝑢𝑡 = 0.114
In this study same process has been carried out by using PID controller, and
the results were compared to those of fuzzy logic controller (FLC), it can be seen
form figure (8) that PID controller has less rise time but a longer overshoot and
more settling time at about 15 seconds. However, fuzzy logic controller has a little
overshoot also a steady-state error along with stabilizing quickly which gives an
accurate and precise level control at desired value. The suggested fuzzy logic
controller gives smooth operation in the transient period. The output of PID
controller stabilizes in 15 seconds while that of fuzzy logic controller just in 4
seconds. As a result, it is concluded through this study that
the traditional PID controller could not be applied for controlling the non-linear
processes such as level control. The fuzzy output may be made more precise
31
through fine tuning like adjustment of the range parameters. The implementation
of fuzzy controller and PID controller in Simulink are shown in figure (9).
32
Conclusions
Fuzzy logic control (FLC) has shown to be a useful technique for handling
systems with uncertainties, inaccuracy along with complex systems. In several
industrial circumstances, in which the process models are either imprecise or
completely absent, fuzzy logic system in able to integrate the control along with
managing the tasks in a user friendly manner and accommodating the proportional
integral derivative (PID) approaches. Despite the fact that fuzzy logic control
systems exhibit a variety of advantages in many different situations but they
require a lot of data, necessitate a high level of human knowledge, and they are
understandable only in the case of being simple. Fuzzy logic control systems are
frequently used in combination with other systems and hybrid fuzzy systems
appeared to be more effective than pure fuzzy systems in variety of applications.
From this review it can be concluded that further improvements are required
regarding the design and modeling of fuzzy logic control along with enhancing its
performance.
33
References
(4) Guan J, Aral MM. Remediation System Design with Multiple Uncertain
Parameters Using Fuzzy Sets and Genetic Algorithm. J Hydrol Eng.
2005;10(5):386–94.
(5) Han JC, Huang GH, Zhang H, Zhuge YS, He L. Fuzzy constrained
optimization of eco-friendly reservoir operation using self-adaptive genetic
algorithm: A case study of a cascade reservoir system in the Yalong River,
China. Ecohydrology. 2012;5(6):768–78.
(6) Guerra TM, Sala A, Tanaka K. Fuzzy control turns 50: 10 years later.
Fuzzy Sets Syst. 2015;281:168–82.
(9) Li L, Chadli M, Ding SX, Qiu J, Yang Y. Diagnostic Observer Design for
T-S Fuzzy Systems: Application to Real-Time-Weighted Fault-Detection
34
Approach. IEEE Trans Fuzzy Syst. 2018;26(2):805–16.
(11) A. Sala, T.-M. Guerra and RB. Perspectives of fuzzy systems and control.
Fuzzy Sets Syst. 2005;156(3):432–444.
(12) Kazuo Tanaka HOW. Fuzzy Control Systems Design and Analysis: A
Linear Matrix Inequality Approach. 2004. 320 p.
35
http://dx.doi.org/10.1038/s41598-017-18329-3
(18) Roland S.Burns. Advanced Control Engineering. Adv Control Eng. 2001;
(19) Shukla PK, Tripathi SP. On the design of Interpretable Evolutionary Fuzzy
Systems (I-EFS) with improved accuracy. Proc Turing 100 - Int Conf
Comput Sci ICCS 2012. 2012;11–4.
(20) Chen G. Introduction to Fuzzy Sets, Fuzzy Logic, and Fuzzy Control
Systems. 2001.
(23) Ross TJ. Fuzzy Logic with Engineering Applications: Third Edition. Fuzzy
Logic with Engineering Applications: Third Edition. 2010.
(27) Etik N, Allahverdi N, Sert IU, Saritas I. Fuzzy expert system design for
operating room air-condition control systems. Expert Syst Appl [Internet].
36
2009;36(6):9753–8. Available from:
http://dx.doi.org/10.1016/j.eswa.2009.02.028
37