0% found this document useful (0 votes)
31 views18 pages

SC 05

Uploaded by

paramjeet kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views18 pages

SC 05

Uploaded by

paramjeet kaur
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

SESSION - JULY 2024

SEMESTER – 3rd

COURSE – MASTER OF COMPUTER APPLICATIONS (MCA)

SUBJECT – Soft Computing

SUBJECT CODE – OMCA-235

LIVE SESSION - 5
Fuzzy Logic

• Fuzzy Logic: Handling Imprecise or Uncertain Information: An air conditioner adjusts its temperature
smoothly based on fuzzy logic for "slightly warm" or "a bit cool.“
• Partial Truths (Values Between 0 and 1): A car braking system applies partial pressure (e.g., 0.6) based on
the distance to the object.
• Membership Function: A washing machine adjusts its cycle based on how "moderately dirty" (0.7) the
clothes are.
• Fuzzy Rules (If-Then Statements):"If the road is slightly slippery, reduce speed by 20%" is a fuzzy rule in
autonomous driving.
• Control Systems: Traffic lights extend the green signal slightly longer when the traffic is moderately heavy.
• AI and Image Processing: Fuzzy logic adjusts image brightness to be "slightly brighter" during enhancement.
• Medical Diagnosis: A medical system concludes a 70% likelihood of disease based on a patient's fuzzy
symptoms.
Architecture of Fuzzy logic

The air conditioner measures the temperature (say After deciding the fan speed based on the
29°C) and converts it into a fuzzy set like "hot" with a fuzzy inputs, the system converts the result
membership value of 0.7. into a crisp output like "Set fan speed to 4."

The system checks the rules,


such as "IF temperature is hot
THEN increase fan speed," and In an air conditioner, an expert provides rules like "IF
combines the results of room temperature is high THEN increase the fan
matching rules to decide the speed."
action.
Membership Function
Definition: A membership function is a graphical representation that defines the degree to which a
given input belongs to a fuzzy set, with values ranging between 0 and 1.

Example: For a temperature control system:

• The input space (universe of discourse) could be the range of temperatures (e.g., 0°C to 40°C).

• The membership function for "warm" might map 25°C to a membership value of 0.7, indicating that
25°C is 70% "warm".
Fuzzy Control
• Human-like Thinking: Fuzzy control can mimic how humans think and make decisions.
Example: A washing machine adjusting its cycle time based on the dirtiness of clothes, rather than
using a fixed time.

• Acceptable Reasoning: Designed to provide results that are "good enough" rather than perfect.
Example: An air conditioner adjusting the temperature to a comfortable range, not necessarily an
exact degree.

• Human Deductive Thinking: Fuzzy logic simulates how humans draw conclusions.
Example: A car's cruise control system adjusting speed based on traffic flow.

• Handling Uncertainties: Fuzzy control deals with uncertain inputs effectively.


Example: Automatic camera settings adjusting for lighting conditions that are neither too dark nor too
bright.
Advantages of Fuzzy Logic Systems

• Handles imprecise or noisy inputs effectively.


Example: Used in washing machines to adjust water level based on load size.

• Easy to construct and understand.


Example: Implemented in air conditioners to adjust temperature smoothly.

• Based on simple mathematical concepts (set theory).

• Efficient solution for complex problems, mimicking human reasoning.


Example: Anti-lock braking systems (ABS) use fuzzy logic to balance brake pressure.

• Requires little data and memory for algorithm description.


Disadvantages of Fuzzy Logic Systems
• Ambiguity in methods due to varying approaches.
Example: Different fuzzy logic solutions for the same traffic control problem.

• Difficult to prove system characteristics mathematically.

• Accuracy can be compromised when handling imprecise data.


Example: Sometimes, smart home systems misinterpret input, causing incorrect adjustments.
Applications of Fuzzy Logic Systems
• Aerospace: Altitude control of spacecraft and satellites.
Example: Satellite altitude stabilization.

• Automotive: Speed and traffic control.


Example: Adaptive cruise control in cars.

• Business: Decision-making support systems.


Example: Employee evaluation systems in large corporations.

• Chemical Industry: pH control, drying, and chemical distillation.


Example: Fuzzy logic controllers in chemical manufacturing plants.
Fuzzy Sets in Fuzzy Logic
Definition: Fuzzy sets extend classical (crisp) sets by allowing elements to have partial membership.
Unlike classical sets, where elements either belong or don’t belong to a set (membership of 0 or 1),
fuzzy sets allow for a continuum of membership values between 0 and 1. This flexibility allows fuzzy
logic to model uncertain or imprecise information.

Classical Set vs. Fuzzy Set:

• Classical Set: Elements have strict membership (either 0 or 1).

• Fuzzy Set: Elements can have degrees of membership between 0 and 1.


Fuzzy Set Example: "Temperature"
Fuzzy Relations
A fuzzy relation is an extension of classical relations, representing relationships between elements with varying
degrees of membership (0 to 1).
Fuzzy Rules and Fuzzy Reasoning
Fuzzy Logic:
Framework to deal with uncertainty and vagueness.
Uses degrees of truth between 0 and 1, not binary true/false.
Fuzzy Sets:
Generalization of classical sets where elements have varying degrees of membership between 0 and 1.
Fuzzy Rules:
If-then statements that describe the relationships between inputs and outputs using fuzzy logic.
Fuzzy Reasoning:
Mamdani Method: Uses fuzzy rules and generates fuzzy outputs that are defuzzified to obtain crisp
results.
Takagi-Sugeno (TS) Method: Uses mathematical functions in rules' consequents for more efficient
control and decision-making.
Applications:
Control systems, pattern recognition, decision support, robotics, and AI.
Example: Fuzzy Rules and Fuzzy Reasoning for Car
Speed Control
Scenario:
Step 2: Rule Evaluation:
A self-driving car adjusts its speed based on road conditions
Rule 1: Dry → Fast (0.8)
(Dry, Wet, Icy) using fuzzy logic.
Rule 2: Wet → Moderate (0.5)
Fuzzy Variables and Membership Functions:
Rule 3: Icy → Slow (0.2)
Input Variable: Road Condition
Step 3: Aggregation:
Linguistic Terms: Dry, Wet, Icy
Combined Output: [0.8 Fast, 0.5 Moderate, 0.2
Membership Functions: Triangular/Trapezoidal
Slow]
Output Variable: Speed
Step 4: Defuzzification:
Linguistic Terms: Slow, Moderate, Fast
Convert fuzzy output to a crisp speed using the
Membership Functions: Triangular/Trapezoidal
centroid or weighted average method.
Fuzzy Rules:
Example Output:
Rule 1: If Road Condition is Dry, then Speed is Fast.
If the road is 70% Dry and 30% Wet, the speed output is a
Rule 2: If Road Condition is Wet, then Speed is Moderate.
weighted combination of Fast and Moderate.
Rule 3: If Road Condition is Icy, then Speed is Slow.
Fuzzy Reasoning (Mamdani Method):
Step 1: Fuzzification:
If the road condition is 80% Dry, 50% Wet, and 20%
Icy.
Advantages and Disadvantages of Fuzzy Logic

Advantages:
• Flexibility in handling imprecise and uncertain inputs.
• Interpretable rules that are easy for humans to understand.
• Robustness to noisy or incomplete data.
Disadvantages:
• Subjectivity in defining linguistic terms and rules.
• Potential computational complexity for large systems.
• Requires expert knowledge to formulate accurate rules.

You might also like