0% found this document useful (0 votes)
103 views20 pages

Chapter 5

The document discusses Fuzzy Logic Controllers (FLC), which utilize fuzzy logic to manage systems without precise mathematical models, emphasizing approximate reasoning and human-like intuition. It outlines the advantages of fuzzy control, including ease of understanding, adaptability to noisy inputs, and the ability to handle non-linear systems effectively. The document also details the components of fuzzy control, including fuzzification, rule inference methods (Mamdani and Sugeno), and defuzzification processes.

Uploaded by

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

Chapter 5

The document discusses Fuzzy Logic Controllers (FLC), which utilize fuzzy logic to manage systems without precise mathematical models, emphasizing approximate reasoning and human-like intuition. It outlines the advantages of fuzzy control, including ease of understanding, adaptability to noisy inputs, and the ability to handle non-linear systems effectively. The document also details the components of fuzzy control, including fuzzification, rule inference methods (Mamdani and Sugeno), and defuzzification processes.

Uploaded by

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

C APTER 5

H FUZZY LOGIC CONTROLLER

A Fuzzy control system is a control system based on Fuzzy logic —a mathematical


system that analyses analog input values in terms of logical variables that take on continuous
values between 0 and 1, in contrast to classical or digital logic, which operates on discrete
values of either 1 or 0 (true or False)

Fuzzy logic is a type of multi valued logic. It deals with approximate reasoning rather
than precise. Fuzzy logic derived from fuzzy set theory. Fuzzy logic was first proposed by
Lodi Zadeh in 1965. Fuzzy controller is an innovative technology that modifies the design of
systems with engineering expertise. Fuzzy logic use human knowledge to implement a
system. It is mostly use in system where there are no mathematical equations for handling
system. Common sense, human thinking and judgment arc fuzzy rules. It helps engineers to
solve non linear control problems. It mathematically emulates human knowledge for
intelligent control system and complex application.

Fuzzy Logic Controller (FLC) has some advantages compared to other classical
controller such as simplicity of control, low cost, and the possibility to design without
knowing the exact mathematical model of the process. Fuzzy logic incorporates an alternative
way of thinking which allows modelling complex systems using higher level of abstraction
originating from the knowledge and experience. Fuzzy logic can be described simply as
"computing words rather than numbers" or "control with sentence rather than equations".

There are two famous type of system currently used 2 fuzzy logic which are Mamdani
fuzzy inference, and Sugeno fuzzy inference.

5.1 Fuzzy Theory:

5.1.1 Definitions and Basics:


The Fuzzy theory was first put forward by L.A. Zadeh in 1965. He felt that the
classical theory concentrates much on precision rather than easy and efficient controlling
mechanism. Unlike classical sets, the Fuzzy sets have a certain degree of membership for
each element.
If-Then Rules:
Fuzzy sets depend on certain rules. The rule base is the most important requirement for the
fuzzy logic. The rule base generally consists of various cases of If-Then rules. First the fuzzy
sets and the membership functions are declared. Then the If-Then rules for the membership
functions are decided for the particular control. The output is controlled by these rules on
input. A typical If-Then rule consists of two parts.

They are

1) Antecedent and

2) Consequence or Conclusion.

The ‘If’ statement is the Antecedent and the Then statement is the Consequence. If -
(Antecedent) & Then - (Consequence).

Examples:

 If the fan is slow, then increase the speed.


 If the temperature is high, then decrease the setting on an air conditioner.

5.1.2 Sets and Operations:

Classical Set: In a classical set for a universe of discourse the elements belonging to the set
must satisfy the rules specified by the set. It is represented by

A={x ϵ U| x meets some conditions}

It can also be denoted by


µA(x) = {1 if x ϵ A
0 if x not ϵ A}
Fuzzy set : In a fuzzy set each element has a certain degree of membership unlike the
classical set, with which it belongs to the particular fuzzy set.

𝐴 = {(𝑥, 𝜇𝐴(𝑥))|𝑥𝜖𝑈}
Operations:
Consider two Fuzzy A and B sets such that A, B ∈ U. Where, U is the Universe of
Discourse.
Main set operations are:

1. Complement

2. Intersection

3. Union

Complement:

The Complement of a fuzzy set can defined as a fuzzy set with the membership function
shown below:
(x) = 1 (x)

Intersection:
It can be defined as the biggest fuzzy set in both A and B which contains both the elements in
A and B. It can also written as ‘A ∩ B’. The membership function for Intersection is defined
as:

(x) = (x) (x)

Union:
It can be defined as the smallest set which contains all the elements in ‘A’ or ‘B’. It can be
written as ‘A + B’ or ‘A U B’. The membership function for Union is defined as:

(x) = (x ) (x)

Figure 10: Membership functions of (a) Union (b) Intersection (c) Complement
5.2 Importance of Fuzzy Logic:

5.2.1 Advantages of Fuzzy Control:


It has certain advantages which make it preferable to the other controllers. They are:
 Very easy to comprehend because the concept behind the control is very simple.
 It possesses the intuition like a human which gives it the strength to adapt to the
difficulties in the control.
 It can work well even with noisy inputs.
 It can be worked with multiple inputs and can provide multiple outputs as it solely
works on rule basis. Creating the rule base for fuzzy control is easier than optimizing
the parameters for PID control.
 When any sensor stops working it can be programmed to turn off safely, instead of
keep on working which could be dangerous to the plant.
 It does not consist of complex mathematical analysis, hence very easily designed.
 It does not require high precision sensors but compensates for the precision making
use of the intuitive control which makes this method very economical.
 It operates very well even in highly non-linear systems adapting to the situation. But
designing other conventional controllers to adjust in case of non-linearity in
characteristics is very difficult.
 Very simple user interface. Easier end-user interpretation when the final user is not an
expert.Easy calculation. Extensively existing toolboxes and dedicated integrated
circuits.
 Ambiguousness. Fuzzy logic is a “natural” way of expressing unknown information.
Tools available to the fuzzy logic helps in concluding different actions depending on
the possibility or necessity of certain plant situations.
5.3 Implementation of Fuzzy Logic:

It maps the input to an output in a very efficient and the mapping can be very easily
controlled without much complex knowledge about the process. Steps to be performed in
Fuzzy control:

 First, study how the rule base system and the operator can be applied to this control.

 Understand the concept of membership functions and linguistic variables.

 Analyse the power system to be controlled and decide the state variables to be considered
as inputs to the system.

 Form an understanding as how to control the state variables to get the required control in
the plant.

 Now form the Rule base for the linguistic variables of inputs and outputs.

 Try to optimize the membership functions to make the control more efficient.

 Integrate the fuzzy controller into the plant and check the result.

5.4 Fuzzy Control Method:

5.4.1 Basic Components in Fuzzy control:


Fuzzy logic control mainly depends upon the rules formed by the Linguistic variables.
Fuzzy logic control is free of complex numerical calculations, unlike other methods. It only
uses simple mathematical calculations to control the model. Despite relying on basic
mathematical analysis it provides good performance in a control system. Hence, this method
is one of the best methods available and also easier one to control a plant. Fuzzy logic control
is based on the Fuzzy set theory. In fuzzy set theory, each element has a degree of
membership with which it belongs to any particular set. We can say that fuzzy sets are like
classical sets without much sharper boundaries. Fuzzy Logic Controller (FLC) is more used
when the precision required is moderate and the plant is to be devoid of complex
mathematical analysis. Other advantages are:

 It does not require highly precise Inputs.

 It does not require fast microprocessors to bring about an efficient response.

 It needs very fewer data comparatively which is mainly rules and membership functions.
 It is more efficient and can perform better even in non-linear models. The three main
components of a Fuzzy Logic controller are
1. Fuzzification,

2. Fuzzy Rule base and Interfacing engine,

3. Defuzzification.

Figure 11: Fuzzy Control Internal Block diagram

5.5 Fuzzification module:

The most important step in formulating a design for the fuzzy controller is to identify
the state variables which efficiently control the plant. After figuring out the state variables,
they are to be passed through the fuzzification block to fuzzzify the inputs as the FLC works
with only the Fuzzy inputs. As the Fuzzy Rule base employs rules on only linguistic
variables, the numerical inputs have to be converted to fuzzy linguistic variables first. This
process of converting a numerical state variable into a fuzzy input linguistic variable is called
Fuzzification process. The variables generally used comprise of state error, the rate of change
of state error (derivative of state error), or the area of a state error (integral of state error). The
membership function is the graphical representation of the degree of belonging of an element
to the fuzzy set. We can use different membership functions for an input and output
depending upon the requirement of the precision to be provided. Generally used membership
functions are triangular and trapezoidal membership functions. Gaussian and Bell shaped are
some other available membership functions. For number of membership functions, the
accuracy of control increases and the control works effectively.
Figure 12: Membership Function
Table 3: Rule Base Table
e

Δe NL NM NS Z PS PM PL

NL NL NL NL NL NM NS Z

NM NL NL NL NM NS Z PS

NS NL NL NM NS Z PS PM

Z NL NM NS Z PS PM PL

PS NM NS Z PS PM PL PL

PM NS Z PS PM PL PL PL

PL Z PS PM PL PL PL PL
5.6 Fuzzy Rule Inference:

Fuzzy inference is of two methods. They are Mamdani and Sugeno. They are
explained as below

5.6.1 Mamdani fuzzy inference

The most common method used currently is fuzzy influence system. In 1975,
Professor Ebrahim Mamdani of London University introduced first time fu, systems to
control a steam engine and boiler combination. He applied a set of fuzzy rules experienced
human operators. The mamdani system usually done in four steps. The steps are fuzzification
of the inputs, rule evaluation, aggregation of the rules and defuzzification. Fuzzifications
convert input dam to degree of membership functions. In this process data is matched with
condition of the rule and determined how well data is matched with rule at particular
instance. Thus a degree of membership function is developed.

Then in Rule-base block rules are written according to system requirement. In case of
DC motor there are two input variables error and change in error is selected. Usually rules are
in if, and, then form. In inference engine aggregation is done in which degree of fulfilment is
calculated of the condition specifies by a rule. Defuzzification block converted resulting
fuzzy set into a number that is sent to the system and this number is actually the control
signal. There are seven defuzzification methods which are Centre of gravity (COG). Centre
of gravity method for singletons (COGS). Bisector of area (BOA). Mean of Maxima (MOM).
and Left most maximum (LM), and right most maximum (RM).

5.6.2 Sugeno fuzzy inference

Mamdani style is not computationally efficient as it find the centroid of two-


dimensional shapes by integration of carrying function. Michio Sugeno proposed a new
method to use single spike, singleton. as a membership function inputs mean fuzzy set is at
unity point at one particular point on the universe of discourse and zero at remaining area.
This system is alma,' same of Mamdani method but with the exception of consequent change
and instead of fuzzy set it use a mathematical function as input variable.
5.7 Defuzzification:

General methods adopted for Defuzzifying are:


1. Centre of Gravity Method
2. Bisection Method
3. Bisector of Area Method
4. Mean of minimum Method

The converse of Fuzzification is called Defuzzification. The Fuzzy Logic Controller


(FLC) produces output in a linguistic variable (fuzzy number). As indicated by true
prerequisites, the linguistic variables must be changed to crisp output. Centre of gravity
strategy is the best understood Defuzzification system and utilized as a part of this
exploration work. It acquires the centre of gravity of a region involved in the fuzzy set.
Defuzzification is the methodology of delivering a quantifiable result in the fuzzy form.

A fuzzy control system has certain rules that change various variables into a "fuzzy"
form, that is, the outcome is shown as membership functions and their degree of
membership in fuzzy sets. The easiest but not much useful technique is to select the fuzzy
set with the highest membership belonging, for this situation. The disadvantage of this
methodology is that some data gets lost in this process. The rules that performed "Reduce
Pressure" might as well have been absent with this process.

A helpful Defuzzification procedure should first include the outcomes of the results
together somehow. The most average fuzzy set enrolment capacity has the shape of a triangle.
Suppose, if this triangle were to be cut in a straight level line some place between the top and
the base, and the top segment were to be removed, the remaining figure is in the shape of a
trapezoid. This procedure removes parts of the figures to give trapezoids if the membership
function used earlier was triangular (or different shapes if the initial shapes were not
triangles). Generally these trapezoids are superimposed one upon another, giving a single
shape. Finally, the centroid of this is computed. The abscissa of the centroid gives the
defuzzified output.
5.8 Different Fuzzy Control Methods:

5.8.1 Types of Fuzzy Control Methods:

Fuzzy interface systems can be designed using two different methodologies. They are:

 Mamdani,
 Sugeno.
The outputs of these two methods vary somewhat in these two methods.
5.8.2 Mamdani Method:

Mamdani’s methods of the Fuzzy interface is the most commonly used method. It was
among the first control systems built using fuzzy set theory. This inference method expects
the output variable to be fuzzy sets. It is more advantageous to use a single membership
function of a linguistic variable instead of number of fuzzy sets which can be tedious in some
cases. This method of using a single linguistic variable in output is called as Singleton output
mechanism. It enhances the Defuzzification process because it greatly simplifies the
computation required by the more general Mamdani method which finds the centroid of the
two dimensional function. But in the Sugeno type of inference can be used to model any
inference system in which the output membership function is either linear or constant.

5.8.3 Sugeno Method:

The first two parts namely, fuzzifying the inputs and applying the fuzzy operator, of
the Sugeno method are similar to the Mamdani method.

If the first input is x and the second input is y, then the Output is of the linear form
O = Kx +Ly + M

For a zero-order Sugeno model, the output O will be a constant (K = L = M).


The output level Oi of each rule is only weighted by the weightage Wi of the rule.
Comparison: When the performances of Mamdani and Sugeno models are compared with
each other, the superlative outcome is obtained from the Sugeno mode.
Mamdani Advantages:

 It is instinctual. Can be trained in human intuition.


 More generally acknowledged.
 It is more effective to human input.

Sugeno Advantages:

 It is very effective in calculations and controlling.


 It is generally used to enhance the linear techniques.

 It is used to optimize the parameters and works adaptively.

5.9 Fuzzy Logic Controller Design

The design of a Fuzzy Logic Controller requires the choice of Membership Functions.
The membership functions should be chosen such that they cover the whole universe of
discourse. It should be taken care that the membership functions overlap each other. This is
done in order to avoid any kind of discontinuity with respect to the minor changes in the
inputs. To achieve finer control, the membership functions near the zero region should be
made narrow. Wider membership functions away from the zero region provides faster
response to the system. Hence, the membership functions should be adjusted accordingly [9].
After the appropriate membership functions are chosen, a rule base should be created. It
consists of a number of Fuzzy If-Then rules that completely define the behaviour of the
system. These rules very much resemble the human thought process, thereby providing
artificial intelligence to the system.

5.10 Membership Function Design

5.10.1 Input Linguistic Variables

The inputs to the Fuzzy Logic Controller are:

• Speed Error (e).

• Change in Error (Δe) or derivative of speed error.

5.10.1.1 Fuzzy Sets and MFs for Input Variable Speed Error (e)
Table 4: Fuzzy sets and the respective membership functions for change in voltage

Membership
Fuzzy Set or Label Range
Function

NB [-13.34 -10 -6.665] Triangular

NM [-10 -6.665 -3.335] Triangular

NS [-6.665 -3.335 0 ] Triangular

ZE [-0.3335 0 0.3335] Triangular

PS [0 3.3335 6.6665] Triangular

PM [3.3335 6.6665 10] Triangular

PB [6.6665 10 13.34] Triangular


5.10.1.2 Fuzzy Sets and MFs for Input Variable Change in Error (Δe)

Table 5: Fuzzy sets and the respective membership functions for Change in Power

Membership Function
Fuzzy Set or Label Range

[-2.666e+04 -2e+04 -1.334e+04]


NB (Negative Big) Triangular

[-2e+04 -1.334e+04 -6667]


NM (Negative Medium) Triangular

[-1.334e+04 -6667 0]
NS (Negative Small) Triangular

[-6667 0 6668]
ZE (Zero) Triangular

[0 6668 1.334e+04]
PS (Positive Small) Triangular

[6668 1.334e+04 2e+04]


PM (Positive Medium) Triangular

[1.334e+04 2e+04 2.667e+04]


PB (Positive Big) Triangular
5.10.2 Output Linguistic Variable

These inputs are processed to obtain an output known as the Change of Control (wsl).

5.10.2.1 Fuzzy Sets and MFs for Output Variable Change of Control (wsl)

Table 6: Fuzzy sets and the respective membership functions for Change of Duty cycle

Membership
Fuzzy Set or Label Range
Function

[-0.1333 -0.1 -0.0667]


NB (Negative Big) Triangular

NM (Negative Medium) [-0.1 -0.0667 -0.03334] Triangular

NS (Negative Small) [-0.0667 -0.03334 0] Triangular

ZE (Zero) [-0.03334 0 0.03334] Triangular

PS (Positive Small) [0 0.03334 0.0667] Triangular

PM (Positive Medium) [0.03334 0.0667 0.1] Triangular

PB (Positive Big) [0.0667 0.1 0.1333] Triangular


5.11 Rule Base Design for the Output

The Rule Base for deciding the output of the inference system consists of 49 If-Then
rules in this case since there are 7 fuzzy sets in each of the inputs. The table representing
the rule base is as follows:

Table 7: Fuzzy Rule Table for Output

e
NB
NM NS Z PS PM PB
Δe

NB NB NB NB NB NM NS Z

NM NB NB NB NM NS Z PS

NS NB NB NM NS Z PS PM

Z NB NM NS Z PS PM PB

PS NM NS Z PS PM PB PB

PM NS Z PS PM PB PB PB

PB Z PS PM PB PB PB PB
5.12Design of the Fuzzy Logic Controller using MATLAB

While simulating the block diagram in MATLAB/SIMULINK®, the Fuzzy Logic


Controller has to be programmed according to the aforementioned rules and knowledge base.
The program is saved as an FIS file and it is later embedded into the Fuzzy Logic Controller.
This FIS program can be checked with the help of FIS editor in MATLAB itself. The steps
for the following are shown below, along with the membership functions, the rules and the
surface plot viewed with the help of the FIS editor.

Step 1:

 The program for designing of the Fuzzy Logic Controller is written in a word file.

 The definitions for all the shown membership functions are written in the program.

 The 49 rules shown in tabular form in section 5.4 are written in the program
according to the syntax provided by MATLAB.

 The document is saved with the extension .fis.

All the 49 If-then rules of the rule base used for the design of the fuzzy logic

 1. If (error is NB) and (changeinerror is NB) then (controlled is NB) (1)

 2. If (error is NM) and (changeinerror is NB) then (controlled is NB) (1)

 3. If (error is NS) and (changeinerror is NB) then (controlled is NB) (1)

 4. If (error is Z) and (changeinerror is NB) then (controlled is NB) (1)

 5. If (error is PS) and (changeinerror is NB) then (controlled is NM) (1)

 6. If (error is PM) and (changeinerror is NB) then (controlled is NS) (1)

 7. If (error is PB) and (changeinerror is NB) then (controlled is Z) (1)


 8. If (error is NB) and (changeinerror is NM) then (controlled is NB) (1)

 9. If (error is NM) and (changeinerror is NM) then (controlled is NB) (1)

 10. If (error is NS) and (changeinerror is NM) then (controlled is NB) (1)

 11. If (error is Z) and (changeinerror is NM) then (controlled is NM) (1)

 12. If (error is PS) and (changeinerror is NM) then (controlled is NS) (1)

 13. If (error is PM) and (changeinerror is NM) then (controlled is Z) (1)

 14. If (error is PB) and (changeinerror is NM) then (controlled is PS) (1)

 15. If (error is NB) and (changeinerror is NS) then (controlled is NB) (1)

 16. If (error is NM) and (changeinerror is NS) then (controlled is NB) (1)

 17. If (error is NS) and (changeinerror is NS) then (controlled is NM) (1)

 18. If (error is Z) and (changeinerror is NS) then (controlled is NS) (1)

 19. If (error is PS) and (changeinerror is NS) then (controlled is Z) (1)

 20. If (error is PM) and (changeinerror is NS) then (controlled is PS) (1)

 21. If (error is PB) and (changeinerror is NS) then (controlled is PM) (1)

 22. If (error is NB) and (changeinerror is Z) then (controlled is NB) (1)


 23. If (error is NM) and (changeinerror is Z) then (controlled is NM) (1)

 24. If (error is NS) and (changeinerror is Z) then (controlled is NS) (1)

 25. If (error is Z) and (changeinerror is Z) then (controlled is Z) (1)

 26. If (error is PS) and (changeinerror is Z) then (controlled is PS) (1)

 27. If (error is PM) and (changeinerror is Z) then (controlled is PM) (1)

 28. If (error is PB) and (changeinerror is Z) then (controlled is PB) (1)

 29. If (error is NB) and (changeinerror is PS) then (controlled is NM) (1)

 30. If (error is NM) and (changeinerror is PS) then (controlled is NS) (1)

 31. If (error is NS) and (changeinerror is PS) then (controlled is Z) (1)

 32. If (error is Z) and (changeinerror is PS) then (controlled is PS) (1)

 33. If (error is PS) and (changeinerror is PS) then (controlled is PM) (1)

 34. If (error is PM) and (changeinerror is PS) then (controlled is PB) (1)

 35. If (error is PB) and (changeinerror is PS) then (controlled is PB) (1)

 36. If (error is NB) and (changeinerror is PM) then (controlled is NS) (1)

 37. If (error is NM) and (changeinerror is PM) then (controlled is Z) (1)

 38. If (error is NS) and (changeinerror is PM) then (controlled is PS) (1)
 39. If (error is Z) and (changeinerror is PM) then (controlled is PM) (1)

 40. If (error is PS) and (change in error is PM) then (controlled is PB) (1)

 41. If (error is PM) and (change in error is PM) then (controlled is PB) (1)

 42. If (error is PB) and (change in error is PM) then (controlled is PB) (1)

 43. If (error is NB) and (change in error is PB) then (controlled is Z) (1)

 44. If (error is NM) and (change in error is PB) then (controlled is PS) (1)

 45. If (error is NS) and (change in error is PB) then (controlled is PM) (1)

 46. If (error is Z) and (change in error is PB) then (controlled is PB) (1)

 47. If (error is PS) and (change in error is PB) then (controlled is PB) (1)

 48. If (error is PM) and (change in error is PB) then (controlled is PB) (1)

 49. If (error is PB) and (change in error is PB) then (controlled is PB) (1)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy