You are on page 1of 109

INTRODUCTION TO FUZZY LOGIC & DESIGN OF

FUZZY LOGIC CONTROLLER

Dr.M.MOHAMED THAMEEM ANSARI


Professor
Department of Electrical Engineering
Annamalai University.
CRISP LOGIC
HEIGHT MEMBERSHIP
6' 1
1
5'10" 0
5'8" 0
5'6" 0
5'4" 0
5'2" 0
5 6 7

5' 0
CRISP SETS
 Classical sets are called crisp sets
 either an element belongs to a set or not, i.e.,

x A or x A
 Member Function of crisp set

0 x  A
 A ( x)  
1 x  A
Membership function of crisp logic

True

HOT
False

0
80F Temperature

If temperature >= 80F, it is hot (1 or true);


If temperature < 80F, it is not hot (0 or false).
CRISP LOGIC
 Crisp logic is concerned with absolutes-true or false, there is
no in-between.
 Example:
Rule:
If the temperature is higher than 80F, it is hot; otherwise, it is not hot.
Cases:
 Temperature = 100F Hot
 Temperature = 80.1F Hot
 Temperature = 79.9F Not Hot
 Temperature = 50F Not Hot

Drawbacks of crisp logic

 The membership function of crisp logic fails to distinguish


between members of the same set.
Conception of Fuzzy Logic
 Many decision-making and problem-solving tasks are too
complex to be defined precisely.

 However, people succeed by using imprecise knowledge.

 Fuzzy logic resembles human reasoning in its use of


approximate information and uncertainty to generate
decisions.
Fuzzy Logic

 An approach to uncertainty that combines real values [0…1]


and logic operations

 Fuzzy logic is based on the ideas of fuzzy set theory and fuzzy
set membership often found in natural (e.g., spoken)
language.
FUZZY LOGIC
Fuzzy values

Short Medium Tall

5’ 5’ 6’’ 6’
HEIGHT TALL MEDIUM SHORT
6’ 1 0 0
5’10” 0.9 0.1 0
5’8” 0.8 0.2 0
5’6” 0.5 0.4 0.1
5’4” 0 0.5 0.5
5’2” 0 0.3 0.7
5’ 0 0 1
Membership function of fuzzy logic

Fuzzy values
DOM
Degree of
Membership
Young Middle Old
1

0.5

0
25 40 55 Age

Fuzzy values have associated degrees of membership in the set.


Example: “Young”
 Example:
 Ann is 28, 0.8 in set “Young”
 Bob is 35, 0.1 in set “Young”
 Charlie is 23, 1.0 in set “Young”

 Unlike statistics and probabilities, the degree is not describing


probabilities that the item is in the set, but instead describes to
what extent the item is the set.
Benefits of fuzzy logic
 You want the value to switch gradually as Young becomes
Middle and Middle becomes Old.This is the idea of fuzzy logic.
Crisp set vs. Fuzzy set

A traditional crisp set A fuzzy set


Crisp set vs. Fuzzy set
Excerpts from History
 “So far as the laws of mathematics refer to reality, they are not certain. And so
far as they are certain, they do not refer to reality.”

Albert Einstein
Theoretical Physicist and Nobel laureate
“Geometrie und Erfahrung,” Lecture to Prussian Academy, 1921
Motivation OF FUZZY LOGIC
 Boolean logic assumes that every fact is either
entirely true or false.
 Fuzzy logic allows for varying degrees of truth.
 Computers can apply this logic to represent
vague and imprecise ideas, such as “hot”, “tall”
or “balding”.
 The term “fuzzy logic” refers to a logic of
approximation
History
 The precision of mathematics owes its success in large part to
the efforts of Aristotle and the philosophers who preceded
him.
 Their efforts led to a concise theory of logic and mathematics.
 The “Law of the Excluded Middle,” states that every
proposition must either be True or False.
 There were strong and immediate objections. For example,
Heraclitus proposed that things could be simultaneously True
and not True.
HISTORY
 Plato laid a foundation for what would become fuzzy logic,
indicating that there was a third region (beyond True and False)
where these opposites “tumbled about.
 The modern philosophers, Hegel, Marx, and Engels, echoed this
sentiment.
 Lukasiewicz proposed a systematic alternative to the bi-valued
logic of Aristotle.
HISTORY
 In the early 1900’s, Lukasiewicz described a three-valued logic.
The third value can be translated as the term “possible,” and he
assigned it a numeric value between True and False.
 Later, he explored four-valued logics, five-valued logics, and
declared that in principle there was nothing to prevent the
derivation of an infinite-valued logic.
HISTORY
 Knuth proposed a three-valued logic similar to Lukasiewicz’s.
 He speculated that mathematics would become even more elegant
than in traditional bi-valued logic.
 His insight was to use the integral range [-1, 0 +1]
rather than [0, 1, 2].
HISTORY
 Lotfi Zadeh, at the University of California at Berkeley, first
presented fuzzy logic in the mid-1960's.
 Zadeh developed fuzzy logic as a way of processing data.
Instead of requiring a data element to be either a member or
non-member of a set, he introduced the idea of partial set
membership.
Lotfi A. Zadeh
HISTORY began to develop a fuzzy control system for the
Sendai subway. They finished the project in 1987.
On a single route of 13.6km and 16 stations, the
 1965 – L.A.Zadeh – seminal paper titled fuzzy train runs along very smoothly.
sets.
 In 1985 researchers at Bell laboratories
 1968 – L.A.Zadeh – proposed the concept of developed the first fuzzy logic chip.
fuzzy algorithm

 1970 – L.A.Zadeh – proposed the concept fuzzy


decision making.  1990’s – A large number of fuzzy consumers
product appeared in the market.

 1975 – Mamdani and Assilian established the basic


frame work of fuzzy logic controller and applied  In Feb 1992, the first IEEE international
the fuzzy controller to control a steam engine. conference on fuzzy systems was held in San
They found that the fuzzy controller was very easy Diego.
to construct and worked remarkably well.
 1993, IEEE transaction on fuzzy systems was
 1978 – Holmblad and Ostergaurd of Denmark inaugurated.
developed a fuzzy system to control cement kiln.
The fuzzy controller ran for six days in the cement
kiln.

 1980’s – fuzzy systems were largely ignored in the


US, at that time they were associated with AI.

 1980 –Yasunobu and Miyamoto from Hitachi


Why Fuzzy Logic? - What the Experts Have to Say!
 Fuzzy theory is wrong, wrong, and pernicious. What we need is more logical
thinking, not less. The danger of fuzzy logic is that it will encourage the sort of
imprecise thinking that has brought us so much trouble. Fuzzy logic is the
cocaine of science.
Professor William Kahan
University of California at Berkeley
 "Fuzzification" is a kind of scientific permissiveness. It tends to result in socially
appealing slogans unaccompanied by the discipline of hard scientific work and
patient observation.
Professor Rudolf Kalman
University of Florida at Gainesville
 As complexity increases, precise statements lose meaning and meaningful
statements lose precision.
Professor Lofti Zadeh
University of California at Berkeley
 WHEN SHOULD FUZZY LOGIC BE USED?

• When parameters change (conventional controllers require


 significant redesign when plant characteristics, plant
configuration, plant environment change)
• When existing traditional controllers must be replaced
 (e.g, to provide self tuning, to give more flexibility of
controller adaptively, to monitor plant etc.,)
• WHEN SHOULD FUZZY LOGIC BE USED?

• When it is easier to design and implement a fuzzy rule base that will
control a complex plant.

• To obtain solutions when inputs are uncertain or area conflicting or


when solution are not possible by using other techniques.

• To enable rapid development, simplifications, cost effectiveness, high


competitiveness, new markets.
Mathematical Equations

Model free methods

Fuzzy Systems

Precision in
the Model

Complexity of System
 Based on intuition and judgement.
 No need for a mathematical model.
 Relatively simple, fast and adaptive.
 Less sensitive to system fluctuations.
 Can implement design objectives, difficult to express.
 Can implement design objectives, difficult to express mathematically,
in linguistic or descriptive rules.
In the city of Sendai in Japan, a 16-station subway system is controlled
by a fuzzy computer (Seiji Yasunobu and Soji Miyamoto of Hitachi) –
the ride is so smooth, riders do not need to hold straps

Nissan – fuzzy automatic transmission, fuzzy anti-skid braking system

CSK, Hitachi – Hand-writing Recognition


Sony - Hand-printed character recognition
Ricoh, Hitachi –Voice recognition
Tokyo’s stock market has had at least one stock-trading portfolio based
on Fuzzy Logic that outperformed the Nikkei exchange average
SAMPLE APPLICATIONS
NASA has studied fuzzy control for automated space docking:
simulations show that a fuzzy control system can greatly reduce
fuel consumption
Canon developed an auto-focusing camera that uses a charge-
coupled device (CCD) to measure the clarity of the image in six
regions of its field of view and use the information provided to
determine if the image is in focus. It also tracks the rate of change
of lens movement during focusing, and controls its speed to
prevent overshoot.

The camera's fuzzy control system uses 12 inputs: 6 to obtain the current clarity data
provided by the CCD and 6 to measure the rate of change of lens movement. The output
is the position of the lens. The fuzzy control system uses 13 rules and requires 1.1
kilobytes of memory.
For washing machines, Fuzzy Logic control is almost becoming
a standard feature
fuzzy controllers to load-weight, fabric-mix, and dirt sensors and automatically set
the wash cycle for the best use of power, water, and detergent.

GE WPRB9110WH Top Load Washer

Haier ESL-T21 Top Load Washer

LGWD14121 Front LoadWasher

MieleWT945 Front Load All-in-OneWasher / Dryer

AEG LL1610 Front LoadWasher

Zanussi ZWF1430W Front LoadWasher

Others: Samsung, Toshiba, National, Matsushita, etc.


Operations on Classical Sets
 Union:
A  B = {x | x  A or x  B}
 Intersection:
A  B = {x | x  A and x  B}
 Complement:
A’ = {x | x  A, x  X}
X – Universal Set
 Set Difference:
A | B = {x | x  A and x  B}
Set difference is also denoted by A - B
Properties of Classical Sets
Commutativity
A B=BA
A B=BA

Associativity
A  (B  C) = (A  B)  C
A  (B  C) = (A  B)  C
Distributivity

A  (B  C) = (A  B)  (A  C)
A  (B  C) = (A  B)  (A  C)
Idempotency

AA=A
AA=A
Identity
A X=X
A X=A
A =A
A =

Transitivity
If A  B  C, then A  C

De Morgan’s Law:
(A  B)’ = A’  B’
(A  B)’ = A’  B’

Law of the excluded middle:


A  A’ = X
Excluded middle Laws
Law of the Contradiction:
A  A’ = 
Fuzzy Set Theory
 A Fuzzy Set is a generalized set to which objects can
belongs with various degrees (grades) of
memberships over the interval [0,1].
 Fuzzy systems are processes that are too complex to
be modeled by using conventional mathematical
methods.
 In general, fuzziness describes objects or processes
that are not amenable to precise definition or precise
measurement. Thus, fuzzy processes can be defined
as processes that are vaguely defined and have some
uncertainty in their description. The data arising
from fuzzy systems are in general, soft, with no
precise boundaries.
Properties of Fuzzy Sets

Commutativity
AB=BA
AB=BA
Associativity
A  (B  C) = (A  B)  C
A  (B  C) = (A  B)  C
Distributivity
A  (B  C) = (A  B)  (A  C)
A  (B  C) = (A  B)  (A  C)
Idempotency
AA=A AA=A
Identity
AX=X AX=A
A=A A=
Transitivity If A  B  C, then A  C
A’’ = A
De Morgan’s Law also holds:
(A  B)’ = A’  B’
(A  B)’ = A’  B’
But, in general
A  A’  X
A  A’  
Linguistic Variables
 Linguistic variable is “a variable whose
values are words or sentences in a natural
or artificial language”.

 Each linguistic variable may be assigned one


or more linguistic values, which are in turn
connected to a numeric value through the
mechanism of membership functions
Operations of fuzzy sets
 Complement
 Crisp Sets: Who does not belong to the set?
 Fuzzy Sets: How much do elements not belong to
 the set?
 The complement of a set is an opposite of this set.
 For example, if we have the set of tall men, its
 complement is the set of NOT tall men.When we
 remove the tall men set from the universe of
 discourse, we obtain the complement. If A is the
 fuzzy set, its complement A can be found as
 follows:

A(x) = 1  A(x)
 Intersection
Crisp Sets:Which element belongs to both sets?
Fuzzy Sets: How much of the element is in both sets?
In classical set theory, an intersection between two sets contains the
elements shared by these sets. For example, the intersection of the
set of tall men and the set of fat men is the area where these sets
overlap. In fuzzy sets, an element may partly belong to both sets
with different memberships. A fuzzy intersection is the lower
membership in both sets of each element. The fuzzy intersection of
two fuzzy sets A and B on universe of discourse X:
AB(x) = min [A (x), B (x)] = A (x)  B(x),
where xX
 Union

Crisp Sets:Which element belongs to either set?


Fuzzy Sets: How much of the element is in either set?
The union of two crisp sets consists of every element
that falls into either set. For example, the union of
tall men and fat men contains all men who are tall
OR fat. In fuzzy sets, the union is the reverse of the
intersection. That is, the union is the largest
membership value of the element in either set. The
fuzzy operation for forming the union of two fuzzy
sets A and B on universe X can be given as:

AB(x) = max [A (x), B(x)] = A (x)  B(x),


where xX
 0.3 1 0.4 0.5 
 0.5 1 1 1  B    
A      1x x2 x3 x4 
 1 x2 x3 x4 
x

 0.5 1 1 1 
AUB      
 x1 x2 x3 x4 

 0.3 1 0.4 0.5 


A B      
 1x x2 x3 x4 

 0.5 0 0 0 
A    
 x1 x2 x3 x4 
Fuzzy Relations
 Fuzzy Cartesian Product

R(x y) = A x B(x y) = min(A(x), B(y))

 Example:
A = 0.2/x1 + 0.5/x2 + 1/x3
B = 0.3/y1 + 0.9/y2
y1 y2
0.2 x1 0.2 0.2
AxB= 0.5 0.3 0.9 = x2 0.3 0.5
1 x3 0.3 0.9
Fuzzy Logic AND
Fuzzy Logic OR
Composition
 Vector Outer Product
If R is a fuzzy relation on the space X x Y
S is a fuzzy relation on the spaceY x Z
Then, fuzzy composition is T = R  S
1. Fuzzy max-min composition
T(xz) =  (R(xy)  s(yz))
2. Fuzzy max-product composition
T(xz) =  (R(xy)  s(yz))
 Note: R  S  S  R
 z1 z2 
 y1 y4  y1 
1 
y2 y3
x1 
0   0
 1 0 1 y2
R  x2 S  0 0
0 0 0 1 y3  
x3    0 1
0 0 0 0 y4
 0 0 

T(xz) =  (R(xy)  s(yz))

T x1 , z1   MaxMin1,0Min0,0Min1,0Min0,0
 Max0,0,0,0  0
T x1 , z 2   MaxMin1,1Min0,0Min1,1Min0,0
 Max1,0,1,0  1
T x2 , z1   MaxMin0,0Min0,0Min0,0Min1,0
 Max0,0,0,0  0
T x2 , z2   MaxMin0,1Min0,0Min0,1Min1,0
 Max0,0,0,0  0
T x3 , z1   MaxMin 0,0Min 0,0Min 0,0Min 0,0
 Max0,0,0,0  0
T x3 , z 2   MaxMin 0,1Min 0,0Min 0,1Min 0,0

 Max0,0,0,0  0

 z1 z2 
x1  
0 1
T  x2 
0 0
x3  
0 0
NEED FOR CONTROL SYSTEM
 Suppressing the influence of external disturbances.
 Ensuring the stability of the system.
 Optimizing the performance of the system.
DESIGN ELEMENTS OF A CONTROL
SYSTEM
 DEFINE CONTROL OBJECTIVES:
 What are the operational objectives that a control
system is called upon to achieve?
 Ensuring the stability of the system (or)
 Suppressing the influence of external disturbances (or)
 Optimizing the economic performance of the system
(or)
 A combination of the above.

 SELECT MEASUREMENTS:
 What variables should we measure in order to monitor
the operational performance of the system?
 SELECT MANIPULATED VARIABLES:

 What are the manipulated variables to be used to


control the system?
 SELECT THE CONTROL CONFIGURATION:

 What is the best control configuration for a given


system control situation?
 Feedback control configuration
 Inferential control configuration
 Feedforward control configuration
 DESIGN THE CONTROLLER:

 How is the information, taken from the measurements,


used to adjust the values of the manipulated variables?
 The answer to this question constitutes the control law,
which is implemented automatically by the controller.
HARDWARE ELEMENTS OF A
CONTROL SYSTEM
 System
 The measuring instruments or sensors
 Transducers
 Transmission lines
 The controller
 The final control element
 Recording elements
BLOCK DIAGRAM OF CONVENTIONAL
CONTROLLER

+ y
r e u

D G

Controller Plant

 1  kc'  The controller gain


u(t )  K c ' e(t )   e(t ) dt  TI  Integral (or) reset time
 TI 
BASIC STRUCTURE OF A DIGITAL CONTROL SYSTEM

e(k) u (k)
e(t)

+ y(t)
r(t)
Controller Zero –
order hold
Plant
T

u(k )  u(k  1)  e(k )  e(k  1)  Kc ' e(k )


 Kc '   
T  T  TI
 Conventional control algorithm is analytically
described by equations – algebraic, difference,
differential.
 Requires a formalized analytical description of the
controlled system by a mathematical model.
 When the above assumptions are satisfied, model
based control techniques provide good stability,
robustness to model uncertainties and
disturbances, and speed of response.
Classical PI controller
 Until now, a conventional PI type controller is most widely
used in industry due to its simple control structure, ease of
design and inexpensive cost.
 The design procedure is simple, the PI controller cannot
yield a good control performance if the controlled object is
highly nonlinear and uncertain.
 These controller ensures zero steady state errors, results in
large overshoots or large settling time.
Why AI techniques in power systems?
 Generally power systems are approximated by reduced order
models, which may be valid only within the operating ranges.
 To maintain the system in a normal operating state, various
types of controllers based on classical linear theory are
developed.
 As the demand fluctuates from its normal operating value,
the state of the system changes.
 A different model may be required due to change in
operating condition or the control should adopt new system
model parameters.
Why AI techniques in power systems?
 In recent years, modern intelligent methods such as Artificial
Neural Network (ANN), Fuzzy Logic, Genetic Algorithm
and hybrid methods which can solve this kind of problem,
have gained importance, reference to application in the
control problem.
Fuzzy Logic Controller

d(t) Disturbance

Command Error Fuzzy Control Dynamic Output


r(t) - e(t) controller u(t) system y(t)
What Is a Fuzzy Controller?

 Simply put, it is fuzzy code designed


to control something, usually mechanical.

 They can be in software or hardware


and can be used in anything from
small circuits to large mainframes.
Continuous Control Fuzzy Control

Mathematical
Heuristics
Model

Controller

Control Theory
Conventional Control vs. Fuzzy

Why use Fuzzy Logic?

FL can make development and implementation much simpler.

It needs no intricate mathematical models, only a practical understanding of the overall system
behaviour.

FL mechanisms can result to higher accuracy and smoother control as well.


Fuzzy logic controller design steps by
Step Approach
 Step One
 Define the control objectives and criteria.
 Consider question like
 What is trying to be controlled?
 What has to be done to control the system?
 What kind of response is needed?
 What are the possible (probable) system failure modes?

 Step Two
 Determine input and output relationships
 Determine the least number of variables for inputs to the fuzzy
logic system
 Step Three
 Break down the control problem into a series of IF X AND Y,
THEN Z rules based on the fuzzy logic rules.
 These IF X AND Y, THEN Z rules should define the desired
system output response for the given systems input conditions.

 Step Four
 Create a fuzzy logic membership function that defines the
meaning or values of the input and output terms used in the rules
 Step Five
 After the membership functions are created, program
everything then into the fuzzy logic system

 Step Six
 Finally, test the system, evaluate results and make the necessary
adjustments until a desired result is obtain
 The above steps are summarized into three main stages
 Fuzzification
 Membership functions used to graphically describe a situation
 Evaluation of Rules
 Application of the fuzzy logic rules
 Defuzzification
 Obtaining the crisp results
Steps by Step Approach
A SIMPLE FUZZY LOGIC CONTROLLER BLOCK
DIAGARAM
Control
Commands Process
Output

D
E PROCESS
F
U
Z
Z
Y
F
I
C
A
T
I
O
N
RULE BASE

FUZZY LOGIC CONTROLLER

MEASUREMENTS

SENSORS
FUZZIFICATION

Fuzzification interface involves the following functions:

Measure the values of input variables.

Performs a single mapping that transfers the range of value of input variables in to
corresponding universe of discourse.

Performs the function of fuzzification that converts input data in to suitable linguistic
values which may be viewed as labels of fuzzy sets.
FUZZIFICATION METHODS

Intuition – human understanding and


experience

Inference

Neural networks

Genetic algorithms

Meta rules

Fuzzy statistics
Intutition
 Derived from the capacity of humans to develop
membership functions through their own innate
intelligence and understanding.
 Involves contextual and semantic knowledge
about an issue; it can also involve linguistic truth
values about this knowledge.
TRIANGULAR 0 u<α
FUNCTIONS:
(u-α) / (β-α) α ≤ u ≤β
1

(α,β,γ) = (α-u) / (β-α) β ≤ u ≤γ

0 u>γ
   u

 TRAPEZOIDAL (or) π
0 u<α
FUNCTION
(u-α) / (β-α) α≤u≤β
1 β≤u≤γ
1
(α,β,γ,δ) = (γ-u) / (δ-γ) γ<u≤δ
0 u>δ

    u

18 20 24 26
Features of the Membership Function

 Core: comprises those elements x


of the universe such that a (x) =
1.
 Support : region of the universe
that is characterized by nonzero
membership.
 Boundary : boundaries
comprise those elements x of the
universe such that 0< a
(x) <1
HOW MANY SETS

>A term set should be sufficiently wide to allow for noise in the
measurement
>A certain amount of overlap is desirable. Otherwise the controller
may run in to poorly define states, where it does not return a well
defined output.

>Start with triangular sets. The left most and right most should be
shouldered ramps.
>The overlap should be at least 50%
Fuzzy rules

 In 1973, Lotfi Zadeh published his


second most influential paper. This paper
outlined a new approach to analysis of
complex systems, in which Zadeh
suggested capturing human knowledge in
fuzzy rules.
What is a fuzzy rule?

 A fuzzy rule can be defined as a conditional


 statement in the form:

 IF x is A
 THEN y is B

 where x and y are linguistic variables; and A and B are


linguistic values determined by fuzzy sets on the universe
of discourses X and Y, respectively.
What is the difference between classical
and fuzzy rules?
 A classical IF-THEN rule uses binary logic, for example,

Rule: 1 Rule: 2
IF speed is > 100 IF speed is < 40
THEN stopping_distance is long THEN stopping_distance is short

The variable speed can have any numerical value between


0 and 220 km/h, but the linguistic variable
stopping_distance can take either value long or short. In
other words, classical rules are expressed in the black-and-
white language of Boolean logic.
We can also represent the stopping distance rules in a fuzzy
form:
Rule: 1 Rule: 2
IF speed is fast IF speed is slow
THEN stopping_distance is long THEN stopping_distance is short

In fuzzy rules, the linguistic variable speed also has the range
(the universe of discourse) between 0 and 220 km/h, but
this range includes fuzzy sets, such as slow, medium and
fast. The universe of discourse of the linguistic variable
stopping_distance can be between 0 and 300 m and may
include such fuzzy
sets as short, medium and long.
A fuzzy rule can have multiple antecedents, for
example:

IF project_duration is long
AND project_staffing is large
AND project_funding is inadequate
THEN risk is high

IF service is excellent
OR food is delicious
THEN tip is generous
The consequent of a fuzzy rule can also include multiple
parts, for instance:

IF temperature is hot
THEN hot_water is reduced;
cold_water is increased
The knowledge base comprises a knowledge of the application domain and the attendant control
goals. It consist of a “Data Base” and a “Linguistic Control Rule Base”.

 The data base provides the necessary definitions, which are used to define linguistic control
rules and fuzzy data manipulation in an fuzzy logic control.

 The rule base characterizes the control goals and control policy of the
 domain experts by means of linguistic control rules.

IF (a set of condition are satisfied) then (a set of consequence can be inferred)

R1: IF e is NB and CE is NB THEN u is PB


.
.
R10: IF e is PB and CE is PB THEN u is NB
Or
R1: IF e is NB or CE is NB THEN u is PB
SOURCE AND DERIVATION OF FUZZY CONTROL RULE
 1.Expert experience and control engineering knowledge:
a. An introspective verbalization of human expertise.
b. An interrogation of experienced experts or operators using a carefully
organized questionnaire
 2.Based on operators control actions:
Rules can be deduced from the observation of human controllers actions in term of the input
output operating data.
3.Based on the fuzzy model of the process.
Based on the fuzzy model, a set of fuzzy control rules can be generated.
This approach is somewhat more complicated.
Yields better performance and reliability
 4.Based on learning
Many FLCS have been built to emulate human decision making behavior, but few are focused on human learning,
namely the ability to create fuzzy control rules and to modify them based on experience.
Procyk and Mamdani described the first self organizing controller. The SOC has a hierarchical structure which consist
of two rule bases. The first one is the general rule base of an FLC. The second one is controlled by “Meta Rules” which
exhibit human – like learning ability to create and modify the general rule base based on the desired overall performance
of the system.
CONSTRUCTION OF THE KNOWLEDGE
BASE – MACVICAR-WHELAN RULE-BASE
 MR1: If the error e(k) and its change ∆e(k)
are zero, then maintain present control
setting.
 MR2: If the error e(k) is tending to zero at a
satisfactory rate, then maintain present
control setting.
 MR3: If the error e(k) is not self-correcting,
then control action ∆u(k) is not zero
and depends on the sign and
magnitude of e(k) and ∆e(k).
IMPORTANT PROPERTIES FOR A SET OF RULES ARE

 1. Completeness:
A set of IF – THEN rules is complete if any
combination of input value result in an appropriate output
value.

 2. Consistency:
A set of IF THEN rule is inconsistent if there are two
rules with the same rule antecedent but different rule
consequents.

IF e is Z0 and ce is NB THEN u is Z0
IF e is Z0 and ce is NB THEN u is NB

 3. Continuity:
Set of IF THEN rules must be continuous
Does not have neighboring rules with output fuzzy sets that have
empty intersection.
DECISION MAKING LOGIC

 Kernel of an FLC

 It has the capability of simulating human decision making


based
 on fuzzy concepts and of inferring fuzzy control actions
 employing fuzzy implication and the rule of inference in fuzzy
logic
x1 0.5
IMPLICATION: x2  0   y1 y2 y3 y4 y5 y6 
AY 
x3  0   1 1 1 1 1 1 
 
If A Then B x4 0.8

 A  B U A  Y   y1 y 2
x1 
y3 y 4 y5 y 6 
0.5 0.5 0.5 0.5 0.5 0.5
 0.5 1 1 1  x2 
A      0 0. 0 0 0 0
 1 x2 x3 x4 
x x3  
 0 0 0 0 0 0
x4
 0.5 0.2 0.5 0.5 0.5 0.2  0.8 0.8 0.8 0.8 0.8 0.8
B      
 y1 y 2 y 3 y 4 y 5 y 6   y1 y 2 y3 y 4 y5 y6 
x1 
x1 0.5  0.5 0.5 0.5 0.5 0.5 0.5
x
A B  2
 1 
    x
 A  B U A  Y  2 0.5
x3 
0.2 0.5 0.5 0.5 0.2
x3  1  
0.5 0.2 0.05 0.5 0.5 0.2
x4
 
0.2 x4 
0.8 0.8 0.8 0.8 0.8 0.8
 y1 y2 y3 y4 y5 y6 
x1 
0.5 0.2 0.5 0.5 0.5 0.2 IF A THEN B else C
x2 
 0.5 0.2 0.5 0.5 0.5 0.2
x3  
 0.5 0.2 0.05 0.5 0.5 0.2
x4
0.2 0.2 0.2 0.2 0.2 0.2
INFERENCE MECHANISM
 Individual rule Based Inference
 Composition Based Inference.

 z1 z2 
 y1 y4  y1 
1 
y2 y3
x1 
0   0
 1 0 1 y2
R  x2 S  0 0
0 0 0 1 y3  
x3    0 1
0 0 0 0 y4
 0 0 

T x, z   V  R x, y    S  y, z 
T x1 , z1   MaxMin1,0Min0,0Min1,0Min0,0
 Max0,0,0,0  0
T x1 , z 2   MaxMin1,1Min0,0Min1,1Min0,0
 Max1,0,1,0  1
T x2 , z1   MaxMin0,0Min0,0Min0,0Min1,0
 Max0,0,0,0  0
T x2 , z2   MaxMin0,1Min0,0Min0,1Min1,0
 Max0,0,0,0  0

T x3 , z1   MaxMin 0,0Min 0,0Min 0,0Min 0,0


 Max0,0,0,0  0
T x3 , z 2   MaxMin 0,1Min 0,0Min 0,1Min 0,0
 Max0,0,0,0  0  z1 z2 
x1 0 1
T  x2  
0 0
x3  
0 0
Fuzzy Systems Types
 1.Mamdani Fuzzy Systems (most commonly
used in many of applications)
 2.Sugeno Fuzzy Systems (TSK) (Most often
used in applications in which it is needed to develop
a systematic approach in creating and analyzing the fuzzy
system). Most popular candidate for sample data-based fuzzy
modeling.
 3. Tsukamoto Fuzzy Systems (Rarely used)
More on Fuzzy inference
The most commonly used fuzzy inference technique is the
so-called Mamdani method. In 1975, Professor Ebrahim
Mamdani of London University built one of the first
fuzzy systems to control a steam engine and boiler
combination. He applied a set of fuzzy rules supplied by
experienced human operators.
1. Mamdani Fuzzy Systems
 Mamdani Fuzzy Systems are fuzzy systems having
fuzzy if then rules in the familiar form of :
if x is A and y is B and … THEN y is C
where A , B , …. And C are fuzzy sets
 This type of fuzzy systems are used in applications
where the fuzzy rules are direct consequence of
the human expert advice expressed in the form of
fuzzy rules.
 The output of a MAMDANI fuzzy system is a fuzzy variable.
Mamdani fuzzy inference Algorithm
 The Mamdani-style fuzzy inference process is performed
in four steps:
 fuzzification of the input variables,
 rule evaluation;
 aggregation of the rule outputs, and finally
 defuzzification.
2. Sugeno Fuzzy Systems
 TSK (Takagi Sugeno)
TSK fuzzy systems are fuzzy systems having if
then rules in the following form:
IF X is A AND Y is B THEN Z =f(X,Y)
where A and B are fuzzy set in the antecedent,
while z=f (x,y) is a crisp function in the consequent.
 Example:
Sugeno Type 1
If X is small and Y is small, then z = - x + y + 1
Sugeno Type 0
If X is small and Y is small, then z = 5
Sugeno-style fuzzy inference is very similar to the Mamdani
method. Sugeno changed only a rule consequent. Instead
of a fuzzy set, he used a mathematical function of the input
variable. The format of the Sugeno-style fuzzy rule is
IF x is A
AND y is B
THEN z is f (x, y)
where x, y and z are linguistic variables; A and B are fuzzy
sets on universe of discourses X and Y, respectively; and f (x,
y) is a mathematical function.
Sugeno-style fuzzy inference is very similar to the Mamdani
method. Sugeno changed only a rule consequent. Instead
of a fuzzy set, he used a mathematical function of the input
variable. The format of the Sugeno-style fuzzy rule is
IF x is A
AND y is B
THEN z is f (x, y)
where x, y and z are linguistic variables; A and B are fuzzy
sets on universe of discourses X and Y, respectively; and f (x,
y) is a mathematical function.
How to make a decision on which method
to apply  Mamdani or Sugeno?
 Mamdani method is widely accepted for capturing expert
knowledge. It allows us to describe the expertise in more
intuitive, more human-like manner. However, Mamdani-
type fuzzy inference entails a substantial computational
burden.
 On the other hand, Sugeno method is computationally
effective and works well with optimisation and adaptive
techniques, which makes it very attractive in control
problems, particularly for dynamic nonlinear systems.
DEFUZZIFICATION
 A scale mapping, which converts the range of values of output
variables in to corresponding universe of discourse.
 Defuzzification, which yields a non fuzzy control action from an
inferred fuzzy control action
 Height method
 Centroid method
 Weighted average method
 Centre of Sum
 Centre of largest area
 First (or last) of maxima
 There are several defuzzification methods, but probably the most
popular one is the centroid technique. It finds the point where
a vertical line would slice the aggregate set into two equal masses.
Mathematically this centre of gravity (COG) can be expressed
as:

b
  A  x  x dx
COG  a
b
  A  x  dx
a
 Centroid defuzzification method finds a point
representing the centre of gravity of the fuzzy set, A, on
the interval, ab.
 A reasonable estimate can be obtained by calculating it
over a sample of points.
(x)
1.0
0.8

0.6 A

0.4
0.2
a b
0.0 X
150 160 170 180 190 200 210
LEARNING FUZZY CONTROL LEARNING CRISP CONTROL

 Working pragmatic knowledge of fuzzy  Differential equations ... 8 weeks


sets and membership functions ..... 1  Linear algebra ... 10 weeks
week
 SISO servos .... 14 weeks
 Working pragmatic knowledge of
 State space methods/stability theory ... 14 weeks
Mamdani method ..... 1 week
 Optimal control .... 8 weeks
 Multivariable robust control ... 14 weeks
 Crisp control theory offers a powerful methodology for designing SISO
and MIMO optimal and high-performance feedback control systems
 extensive knowledge of theoretical developments required
 quantitative modeling of plant, disturbances, specs. is essential
 systematic prescriptive/normative approach to control design
 leads to high-performance (high-gain, high-bandwidth) designs
 Fuzzy feedback control methods (Mamdani) are suitable for trivial control
problems requiring low accuracy (minimal performance)
 no training in control theory necessary
 no models, no specifications, no guarantees
 empirical ad-hoc approach to design
 leads to low-performance (low-gain, low-bandwidth) designs

Fuzzy control is a “parasitic” technology


CONCLUSIONS

Fuzzy logic, by exploring


uncertainty and
unpredictability, continues to
shape the world in which we
live.
REFERENCES
 CHUEN CHIEN LEE, “ Fuzzy logic in control systems :
fuzzy logic controller – part I,” IEEE Transaction on
systems, man and cybernetics, vol.20, no.2, march/ april
1990, pp.404-418.
 CHUEN CHIEN LEE, “fuzzy logic in control systems: fuzzy
logic controller, part-II,” IEEE Transaction on systems,
man and cybernetics, vol.20, no.2, march/ april 1990,
pp.419-435.
 JEFRY M. MANDEL, “Fuzzy logic systems for engineering
a tutorial,” proceeding of the IEEE, vol.83, no.13, march
1995, pp.345-377.
 DRAINKOV.D, HELLENDORN.H and REINFRANCK, “an
introduction to fuzzy control,” second edition, springer
verlag, berlin.
 LOFTI A.ZADEH, “soft computing and fuzzy logic,”
proceedings of the IEEE, 1994, pp.796-803.
REFERENCES
 Lotfi A. Zadeh “ Is there a need for fuzzy logic?” Information
Sciences 178 (2008) 2751-2779.
 Gang Feng “ A survey on analysis and design of model-based
fuzzy control systems” IEEE Transactions on Fuzzy Systems,
2006,pp. 676-697.
 R.C.Bansal “ Bibliography on the fuzzy set theory
applications in power systems”,IEEETransactions on Power
Systems, 2003,pp.1291-1299.

You might also like