Challenge: Fuzzy Inference System
Swipe to start coding
You are building a mini fuzzy inference system that determines fan speed based on temperature and humidity.
Your goal is to:
- fuzzify crisp inputs;
- evaluate fuzzy rules using logical operators;
- aggregate rule outputs;
- compute a final crisp value using centroid defuzzification.
Instructions
-
Use the provided membership functions for:
- temperature;
- humidity;
- fan speed.
-
Fuzzify the given inputs:
temperature = 28;humidity = 65.
-
Evaluate the following fuzzy rules:
- Rule 1: IF temperature is Hot OR humidity is Humid THEN fan speed is High;
- Rule 2: IF temperature is Cool AND humidity is Dry THEN fan speed is Low.
-
Aggregate the rule outputs over the range
0to80. -
Compute the final fan speed using centroid defuzzification.
-
Store the result in the variable
fan_speed.
Løsning
Tak for dine kommentarer!
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Fantastisk!
Completion rate forbedret til 6.67
Challenge: Fuzzy Inference System
Stryg for at vise menuen
Swipe to start coding
You are building a mini fuzzy inference system that determines fan speed based on temperature and humidity.
Your goal is to:
- fuzzify crisp inputs;
- evaluate fuzzy rules using logical operators;
- aggregate rule outputs;
- compute a final crisp value using centroid defuzzification.
Instructions
-
Use the provided membership functions for:
- temperature;
- humidity;
- fan speed.
-
Fuzzify the given inputs:
temperature = 28;humidity = 65.
-
Evaluate the following fuzzy rules:
- Rule 1: IF temperature is Hot OR humidity is Humid THEN fan speed is High;
- Rule 2: IF temperature is Cool AND humidity is Dry THEN fan speed is Low.
-
Aggregate the rule outputs over the range
0to80. -
Compute the final fan speed using centroid defuzzification.
-
Store the result in the variable
fan_speed.
Løsning
Tak for dine kommentarer!
single