Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Artificial Intelligence (CS607) Total marks = 20

Assignment # 02 Deadline
24 June 2024
Spring 2024
Solution File
MC210201430

1. Define Membership Functions:


a) Create membership functions for each input variable.
Inputs:
1. Temperature (°C):
 Low: 0-15°C
 Medium: 10-30°C
 High: 25-40°C

Membership functions:

 Low: Triangular, peaking at 7.5°C and ranging from 0 to 15°C.


 Medium: Triangular, peaking at 20°C and ranging from 10 to 30°C.
 High: Triangular, peaking at 32.5°C and ranging from 25 to 40°C.
2. Humidity (%):
 Low: 0-30%
 Medium: 20-70%
 High: 60-100%

Membership functions:

 Low: Triangular, peaking at 15% and ranging from 0 to 30%.


 Medium: Triangular, peaking at 45% and ranging from 20 to 70%.
 High: Triangular, peaking at 80% and ranging from 60 to 100%.
3. Number of Occupants:
 Few: 0-2 persons
 Moderate: 1-5 persons
 Many: 4-10 persons

Membership functions:

 Few: Triangular, peaking at 1 person and ranging from 0 to 2 persons.


 Moderate: Triangular, peaking at 3 persons and ranging from 1 to 5 persons.
 Many: Triangular, peaking at 7 persons and ranging from 4 to 10 persons.
b) Create membership functions for the output variable.

Output:

1. AC Power Level (%):


 Low: 0-40%
 Medium: 30-70%
 High: 60-100%

Membership functions:

 Low: Triangular, peaking at 20% and ranging from 0 to 40%.


 Medium: Triangular, peaking at 50% and ranging from 30 to 70%.
 High: Triangular, peaking at 80% and ranging from 60 to 100%.
2. Develop Fuzzy Rules:

Define a set of fuzzy rules based on the input conditions to determine the appropriate AC
power level.

Sol:
Set of Fuzzy Rules based on input conditions:

Rule 1: If Temperature is Low and Humidity is Low, then AC Power Level is Low.

IF Temperature is Low AND Humidity is Low THEN AC Power Level is Low.

Rule 2 : If Temperature is Low and Humidity is Medium, then AC Power Level is


Medium.

IF Temperature is Low AND Humidity is Medium THEN AC Power Level is Medium.

Rule 3: If Temperature is Low and Humidity is High, then AC Power Level is Medium.

IF Temperature is Low AND Humidity is High THEN AC Power Level is Medium.

Rule 4: If Temperature is Medium and Humidity is Low, then AC Power Level is Low.

IF Temperature is Medium AND Humidity is Low THEN AC Power Level is Low.

Rule 5: If Temperature is Medium and Humidity is Medium, then AC Power Level is


Medium.

IF Temperature is Medium AND Humidity is Medium THEN AC Power Level is


Medium.

Rule 6: If Temperature is Medium and Humidity is High, then AC Power Level is High.

IF Temperature is Medium AND Humidity is High THEN AC Power Level is


High.
Rule 7: If Temperature is High and Humidity is Low, then AC Power Level is Medium.

IF Temperature is High AND Humidity is Low THEN AC Power Level is Medium.

Rule 8: If Temperature is High and Humidity is Medium, then AC Power Level is High.

IF Temperature is High AND Humidity is Medium THEN AC Power Level is High.

Rule 9: If Temperature is High and Humidity is High, then AC Power Level is High.

IF Temperature is High AND Humidity is High THEN AC Power Level is High.

Rule10: If Number of Occupants is Few, then AC Power Level is Low.

IF Number of Occupants is Few THEN AC Power Level is Low.

Rule 11: If Number of Occupants is Moderate, then AC Power Level is Medium.

IF Number of Occupants is Moderate THEN AC Power Level is Medium.

Rule 12: If Number of Occupants is Many, then AC Power Level is High.

IF Number of Occupants is Many THEN AC Power Level is High.

-----------------------------------------------------THE END----------------------------------------------

You might also like