Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 43

FUZZY LOGIC

Example of fuzzy set


 Suppose some one wants to describe the
class of cars having the property of being
expensive by considering BMW, Rolls Royce,
Mercedes, Ferrari, Fiat ,Honda and Renault.
 Some cars like Ferrari and Rolls Royce are
definitely expensive and some like Fiat and
Renault are not expensive in comparison and
do not belong to the set.

18
Contd..
 Using a fuzzy set, the fuzzy set of expensive
cars can be described as:
 {(Ferrari,1),(Rolls Royce,1),(Mercedes, 0.8),
( BMW, 0.7), (Honda,0.4)}. Obviously, Ferrari
and Rolls Royce have membership value of 1
whereas BMW, which is less expensive, has
a membership value of 0.7 and Honda 0.4.

19
Example: Height
 Tall people: say taller than or equal to 1.8m
 1.8m , 2m, 3m etc member of this set
 1.0 m, 1.5m or even 1.79999m not a member

 Real systems have measurement uncertainty


 so near the border lines, many misclassifications

20
Membership functions
 Graph based representation of a variable
boundary between fuzzy sets
 Height at any point along the curve(grade)
corresponds to how strongly one feels that a
representative age is middle age with its peak
having a value of 1
 Membership function is between 0 and 1
Member Functions
 Membership function
 better than listing membership values
 e.g. Tall(x) = {1 if x >= 1.9m ,
 0 if x <= 1.7m
 else ( x - 1.7 ) / 0.2 }

22
Example: Fuzzy Short
 Short(x) = {0 if x >= 1.9m ,
 1 if x <= 1.7m
 else ( 1.9 - x ) / 0.2 }

23
Fuzzy Set Operators
 Fuzzy Set:
 Union
 Intersection
 Complement

 Many possible definitions


 we introduce one possibility

24
Fuzzy Set Union
 Union ( fA(x) and fB(x) ) =
 max (fA(x) , fB(x) )
 Union ( Tall(x) and Short(x) )

25
Fuzzy Set Intersection
 Intersection ( fA(x) and fB(x) ) =
 min (fA(x) , fB(x) )
 Intersection ( Tall(x) and Short(x) )

26
Fuzzy Set Complement
 Complement( fA(x) ) = 1 - fA(x)
 Not ( Tall(x) )

27
Fuzzy Logic Operators
 Fuzzy Logic:
 NOT (A) = 1 - A
 A AND B = min( A, B)
 A OR B = max( A, B)

28
Structure of a
Fuzzy Controller

29
Fuzzification
 Conversion of real input to fuzzy set values
 e.g. Medium ( x ) = {
 0 if x >= 1.90 or x < 1.70,
 (1.90 - x)/0.1 if x >= 1.80 and x < 1.90,
 (x- 1.70)/0.1 if x >= 1.70 and x < 1.80 }

30
Variables - low, normal and high as
trapeizodal,
triangle and trapezoidal MFs

Example of the three MF for a given input


Inference Engine
 Fuzzy rules
 based on fuzzy premises and fuzzy
consequences

 e.g.
 If height is Short and weight is Light then feet are
Small
 Short( height) AND Light(weight) => Small(feet)

32
Fuzzification & Inference Example
 If height is 1.7m and weight is 55kg
 what is the value of Size(feet)

33
Defuzzification
 Rule base has many rules
 so some of the output fuzzy sets will have
membership value > 0

 Defuzzify to get a real value from the fuzzy


outputs
 One approach is to use a centre of gravity method

34
 The "centroid" method is very popular, in
which the "center of mass" of the result
provides the crisp value

35
36
Defuzzification Example
The design of a fuzzy controller for a steam
turbine

The input and output variables map into the following fuzzy set

N3: Large negative.


N2: Medium negative.
N1: Small negative.
Z: Zero.
P1: Small positive.
P2: Medium positive.
P3: Large positive.

37
38
Rule
 Rule 2: IF temperature IS cool AND
pressure IS low, THEN throttle is P2.

39
Rule 3: IF temperature IS cool AND pressure
IS ok, THEN throttle is Z.

40
output
The two outputs are then defuzzified
through centroid defuzzification

41
Uses of fuzzy expert system
Used in Widely diverse field
 Set point control
 Pattern recognition and image processing
 Financial systems
 Operational research
 Data analysis
 Ford motor  parking space utilization
 In removing image jitters
 Automatic braking

42
Product Company Role of fuzzy logic
Elevator control Toshiba Evaluate passenger
traffic to reduce
waiting time

Video camcorder Canon Determine best focus


and lighting

Washing machine Matsushita Senses quality and


quantity of dirt , load
size , fabric type ,
and adjust wash
cycle

Television Sony Adjust screen


brightness color and
cotrast

43

You might also like