Lesson5 Fuzzy - Logic.
Lesson5 Fuzzy - Logic.
Systems
COSC105 – Intelligent Systems
What is Fuzzy Logic?
⬡ Fuzzy Logic (FL) is a method of reasoning that
resembles human reasoning. The approach of FL
imitates the way of decision making in humans
that involves all intermediate possibilities
between digital values YES and NO.
⬡ The conventional logic block that a computer can
understand takes precise input and produces a
definite output as TRUE or FALSE, which is
equivalent to human’s YES or NO.
What is Fuzzy Logic?
⬡ The inventor of fuzzy logic, Lotfi Zadeh, observed that unlike
computers, the human decision making includes a range of
possibilities between YES and NO, such as −
CERTAINLY YES
POSSSIBLY YES
CANNOT SAY
POSSIBLY NO
CERTAINLY NO
LP Large Positive
MP Medium Positive
S Small
MN Medium Negative
LN Large Positive
Fuzzy Logic Systems Architecture
⬡ Knowledge Base – stores IF-THEN rules
provided by the experts
Rules
Crisp Crisp
Fuzzifier Defuzzifier
Input Output
Intelligence
Fuzzy Logic Systems Architecture
⬡ A fuzzy logic system must also define its membership
functions to work on fuzzy sets of variables.
⬡ Membership functions allow you to quantify linguistic
term and represent a fuzzy set graphically.
⬡ In the fuzzy theory, fuzzy set 𝐴 of universe 𝑋 is
defined by function 𝜇𝐴 𝑥 , which is called the
membership function of set 𝐴
𝜇𝐴 𝑥 : 𝑋 → [0, 1]
⬡ Where: 𝜇𝐴 𝑥 = 1 if 𝑥 is totally in 𝐴
𝜇𝐴 𝑥 = 0 if 𝑥 is not in 𝐴
𝜇𝐴 𝑥 : 𝑋 → [0, 1]
⬡ This formula reads:
Room
Air Conditioner
Fuzzy
Target Temp Logic
System
Command:
• Heat
• Cool Room Temp
• No Change
Fuzzy Logic
Systems
Development
Steps
Fuzzy Logic Systems Development
⬡ In order for us to create our own system
that uses fuzzy logic, we must follow the
following steps.
⬡ For this example, let’s say we’ll create
an air conditioning system which can
cool the room down to 0°C and can heat
the room up to 40°C.
⬡ We’ll also assume that the air
conditioner will adjust the temperature
automatically.
⬡ When the temperature is cooler than the
target, the air conditioner will heat up.
When the temperature is hotter than the
target, the air conditioner will cool down.
Fuzzy Logic Systems Development
⬡ STEP 1 – Define linguistic variables and terms
⬡ Linguistic variables are input and output
variables in the form of simple words or
sentences.
⬡ For room temperature, cold, warm, hot, etc.,
are linguistic terms.
Temp (t) = {very-cold, cold, warm, hot, very-hot}
Input
0 10 20 30 40 Temperature
Fuzzy Logic Systems Development
⬡ STEP 3 – Construct knowledge base rules
⬡ Create a matrix of room temperature values
versus target temperature values that an air
conditioning system is expected to provide.
Room Temp
Very-Cold Cold Warm Hot Very-Hot
Target Temp
IF RoomTemp = Warm
3 No-change
AND TargetTemp = Warm THEN
Fuzzy Logic Systems Development
⬡ STEP 4 – Obtain fuzzy value
⬡ Fuzzy set operations perform
evaluation of rules.
⬡ The operations used for OR and AND
are Max and Min respectively.
⬡ Combine all results of evaluation to
form a final result. This result is a fuzzy
value.
Fuzzy Logic Systems Development
⬡ STEP 5 – Perform Defuzzification
⬡ Defuzzification is then performed according to
membership function for output variable.
⬡ Example:
RoomTemp: 37°C (Hot)
TargetTemp: 28°C (Hot)
LEGEND
Output (to
reach target)
Exact value
Input
0 10 20 30 40 Temperature
Fuzzy Logic Systems Development
⬡ Fuzzy Logic are also applied on different areas,
such as:
⬡ Automotive Systems such as automatic
gearboxes, Four-Wheel Steering and
Vehicle Environment Control
⬡ Consumer Electronics such as Hi-Fi Systems,
Photocopiers, Video Cameras and TVs
⬡ Domestic Goods such as Microwave Ovens,
Refrigerators, Toasters, Vacuum Cleaners
and Automatic Washing Machines
⬡ Environment Control such as humidifiers
and air conditioners/heaters/dryers
Advantages
and
Disadvantages
Advantages of Fuzzy Logic Systems
⬡ Mathematical concepts within fuzzy reasoning
are very simple.
⬡ You can modify a FLS by just adding or deleting
rules due to flexibility of fuzzy logic.
⬡ Fuzzy logic Systems can take imprecise,
distorted, noisy input information.
⬡ FLSs are easy to construct and understand.
⬡ Fuzzy logic is a solution to complex problems in
all fields of life, including medicine, as it
resembles human reasoning and decision
making.
Disadvantages of Fuzzy Logic Systems
⬡ There is no systematic approach to fuzzy system
designing.
⬡ They are understandable only when simple.
⬡ They are suitable for the problems which do not
need high accuracy.