Fuzzy Logic Systems
Let us consider our usual example of an Air Conditioner to understand the concept.
Why Fuzzy Logic System?
The Air Conditioner first gets the target temperature from our input and senses the room temperature then it has to decide whether to heat or cool. If our input is crisp then the set of pre-defined instructions given to the Air Conditioner could be as follows:
If temperature = -10 and target = 5 then heat
If temperature = -9 and target = 5 then heat
If temperature = -8 and target = 5 then heat
…
If temperature = 4 and target = 5 then heat
If temperature = 5 and target = 5 then no change
If temperature = 6 and target = 5 then cool
If temperature = 7 and target = 5 then cool … and
If temperature = -10 and target = 6 then heat …
If temperature = -10 and target = 7 then heat …
The usage of linguistic terms like Very Cold, Medium Cold, Warm, Medium Hot, Very Hot will reduce the number of inputs and outputs. Therefore, to minimize the number of rules that have to be given to the Air Conditioner we use linguistic terms and Fuzzy Logic System.
Step 1: Define Linguistic variables and their linguistic terms
Linguistic variables are simple linguistic terms (simple words), associated with the input or output of the problem we consider.
In our case, the words related to room temperature are Very Cold, Cold, Warm, Hot, Very Hot.
Step 2: Constructing Membership function:
Let us define them with triangular membership functions as it is the most common and simple one among other membership functions like trapezoidal, bell-shaped, gaussian and singleton.
Universe of discourse = set of all possible room temperatures (values of x)
Membership function for Very Cold temperature:
Membership function for Cold temperature:
Membership function for Warm temperature:
Membership function for Hot temperature:
Membership function for Very Hot temperature:
All in one image of Membership functions:
Step 3: Constructing Fuzzy Rule Base: