Professional Documents
Culture Documents
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
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
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
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
• When it is easier to design and implement a fuzzy rule base that will
control a complex plant.
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
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.
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
AA=A
AA=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’
Commutativity
AB=BA
AB=BA
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
AA=A AA=A
Identity
AX=X AX=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”.
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:
AB(x) = min [A (x), B (x)] = A (x) B(x),
where xX
Union
0.5 1 1 1
AUB
x1 x2 x3 x4
0.5 0 0 0
A
x1 x2 x3 x4
Fuzzy Relations
Fuzzy Cartesian Product
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 x1 , z1 MaxMin1,0Min0,0Min1,0Min0,0
Max0,0,0,0 0
T x1 , z 2 MaxMin1,1Min0,0Min1,1Min0,0
Max1,0,1,0 1
T x2 , z1 MaxMin0,0Min0,0Min0,0Min1,0
Max0,0,0,0 0
T x2 , z2 MaxMin0,1Min0,0Min0,1Min1,0
Max0,0,0,0 0
T x3 , z1 MaxMin 0,0Min 0,0Min 0,0Min 0,0
Max0,0,0,0 0
T x3 , z 2 MaxMin 0,1Min 0,0Min 0,1Min 0,0
Max0,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:
+ y
r e u
D G
Controller Plant
e(k) u (k)
e(t)
+ y(t)
r(t)
Controller Zero –
order hold
Plant
T
–
d(t) Disturbance
Mathematical
Heuristics
Model
Controller
Control Theory
Conventional Control vs. Fuzzy
It needs no intricate mathematical models, only a practical understanding of the overall system
behaviour.
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
MEASUREMENTS
SENSORS
FUZZIFICATION
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
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
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
>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
IF x is A
THEN y is B
Rule: 1 Rule: 2
IF speed is > 100 IF speed is < 40
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.
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
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 MaxMin1,0Min0,0Min1,0Min0,0
Max0,0,0,0 0
T x1 , z 2 MaxMin1,1Min0,0Min1,1Min0,0
Max1,0,1,0 1
T x2 , z1 MaxMin0,0Min0,0Min0,0Min1,0
Max0,0,0,0 0
T x2 , z2 MaxMin0,1Min0,0Min0,1Min1,0
Max0,0,0,0 0
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