03 Fuzzy Inference System
03 Fuzzy Inference System
1
Contents
• Fuzzy Inference System (FIS)
• Inference Mechanism
3
Fuzzification
• Fuzzification is the process of making a crisp
quantity fuzzy by translating crisp value into a
membership function
4
Linguistic Variables
• Input/Output variables of system defined in natural
language
• Linguistic variables are decomposed into linguistic
terms that cover a range on the universe of
discourse
• e.g. Room Temperature
5
Selecting Membership Functions
• Used to map non-fuzzy input values to fuzzy
linguistic terms and vice versa
• Used during the process of Fuzzification and
Defuzzification
6
Types of Membership Functions
• Piece-wise linear functions
• Gaussian distribution function
• Sigmoid curve
• Quadratic and cubic polynomial curves
8
Trapezoidal Membership
Function
• A trapezoidal MF is specified by four parameters {a,
b, c, d} as follows:
• trapezoid (x; 10, 20, 60, 95)
9
Other Membership Functions
(MF)
10
The Basic Tipping Problem
• An engineer visits a restaurant for meal, in order to
automatically calculate the value of tip he design a
fuzzy controller.
• Although different input parameters can be
considered, he designs the controller for two inputs
service and food.
11
Fuzzy Inference System
13
Tipping Example: Database
14
Tipping Example: Database
15
Tipping Example: Fuzzification
• According to customer, rating for food is 8.
16
Rule Base
• Set of rules that capture expert’s knowledge to
control the output of system
• IF-THEN rules with a condition and a conclusion
General Form: IF antecedent THEN consequent
• Antecedents are associated with fuzzy controller
input whereas consequent are the associated
actions or output of the fuzzy controller system
• Write down rules for all possible cases or total
combinations
17
Rule Base
18
Rule Base
• If the antecedent of a rule has more than one part,
the fuzzy operator is applied to obtain one number
that represents the result of the rule antecedent.
19
Tipping Example: Apply Fuzzy
Operator
20
Inference Mechanism
• After evaluating result of each rule, result is
combined to obtain the final result through process
called inference.
21
Types of Fuzzy Inference System
• Mamdani Fuzzy Models
22
Mamdani Fuzzy Inference System
• Mamdani-type inference produces the output
membership functions to be fuzzy sets
• Mamdani systems:
• Are intuitive.
• Have widespread acceptance.
• Are well-suited to human input.
23
Sugeno Fuzzy Inference System
• Sugeno-type inference produces the output
membership functions to be either linear functions
or constants
If Input 1 is x and Input 2 is y,
then Output is z = ax + by + c
• Sugeno systems:
• suitable for mathematical analysis
• computationally efficient.
• Work well with linear techniques, as well as
optimization and adaptive techniques
24
Implication Method
• The input for the implication process is a single
number given by the antecedent, and the output is
a fuzzy set.
• Implication is implemented for each rule.
• Two built-in methods are supported, and they are
the same functions that are used by the AND
method: min (minimum), which truncates the
output fuzzy set, and prod (product), which scales
the output fuzzy set.
25
Tipping Example: Implication
Method
26
Aggregation of Output
• Aggregation is the process by which the fuzzy sets
that represent the outputs of each rule are combined
into a single fuzzy set.
• Aggregation only occurs once for each output
variable, which is before the final defuzzification step.
• The input of the aggregation process is the list of
truncated output functions returned by the
implication process for each rule. The output of the
aggregation process is one fuzzy set for each output
variable.
27
Tipping Example : Aggregation
28
Defuzzification
• Why? Final output communicated to machine must
be crisp
29
Defuzzification Methods
• Max Membership Principle
• also known as height method
30
Defuzzification Methods
• Centroid Method
31
Defuzzification Methods
• Weighted Average Method
32
Defuzzification Methods
• Mean max Method
33
Tipping Problem :
Defuzzification
34
An Application of FIS
35
Research Challenges in HEMS
• User Comfort Maximization
• Cost Minimization
• PAR Minimization
36
System Model
37
Input Parameters
38
Input Parameters
39
Input Parameters
40
Sample Rule Base
1 L L HP A L L VL
2 L M OP P L L M
3 L H MP P H H M
4 M H OP A M H H
5 M L MP P H M M
6 H M OP A L M M
7 H H OP P H H VH
41
Results: Energy Consumption
3000 4000
3500
2500
3000
2000
2500
1500 2000
1500
1000
Mamdani without Humidity 1000 Mamdani without Humidity
Sugeno without Humidity Sugeno without Humidity
500 Mamdani with Humidity Mamdani with Humidity
500
Sugeno with Humidity Sugeno with Humdity
0 0
1 2 3 4 1 2 3 4
Fig. Monthly Energy Consumption for hot city Fig. Monthly Energy Consumption of cold city
42
Results: Total Cost
300 400
350
250
300
200
250
Cost ($)
Cost ($)
150 200
150
100
Mamdani without Humidity Mamdani without Humidity
100
Sugeno without Humidity Sugeno without Humidity
50 Mamdani with Humidity
50 Mamdani with Humidity
Sugeno with Humidity Sugeno with Humidity
0 0
1 2 3 4 1 2 3 4
Fig. Monthly Cost for hot city Fig. Monthly Cost for cold city
43
Conclusion
• Simple fuzzy logic model
44
Recap
• Fuzzy Inference System (FIS)
45
EE-873: Fuzzy Control
Any Questions/Ideas?
46
EE-873: Fuzzy Control
Thank You!
47