The Fuzzy Logic
In digital logic any condition is defined as either true or false that is either 0 or 1. Fuzzy logic brings forward the concept of being partially true and partially false. Fuzzy logic resonates with the possibility of any situation being both true and false to some extent. It is a way to model logic where the truth of a statement is not binary and represents the degree of truth ranging from 0 which is absolutely false to 1 which is absolutely true. Fuzzy Logic allows us to develop a Fuzzy Inference System (FIS) which is a function that maps a set of inputs to outputs using human interpretable rules. FIS can be used for control problems. The references and errors can be fed as input to the FIS and necessary actuating signals can be derived from the FIS. Fuzzy logic’s application is not limited to control. It can be used from image classification to edge detection. Fuzzy logic can be used in the general decision making process in finance , management and so forth.
Fuzzy Logic resembles a humane way of thinking. For example, If I say it's pretty cold today, I am referring to a degree of coldness that I am feeling. A binary logic for this would be cold or not cold. In more simple words, Fuzzy logic closely resembles the vagueness of the logic we as humans understand. Fuzzy logic or FIS enables us to encode the experience based knowledge in the form of logical rules. Any FIS consists of three parts. The Fuzzification , Inference and Defuzzification. Fuzzification is the process of encoding the human understandable input into numbers and computer understandable form. The Inference is the process of using experience or the rule base to get the output. This output is then Defuzzification to a more human understandable form. To understand this let’s look at an example of a very simplified FIS.
Let’s say there is a simple FIS for banks to calculate the risk of loaning to any particular individual. The simple way of decision making in calculating risk of loaning is credit rating. If the credit rating is good, there is low risk and if the credit rating is very low, then there is high risk. Now how do we present this logic to the computer? We could define a limit. For example, we could define that a credit rating of over 500 is good and a credit rating of under 500 is bad but by doing so we are ignoring the vagueness of the information we are trying to present. By using this logic, a credit score of 501 is good and 499 is bad. In reality though the credit rating of 501 and 499 are very similar to each other and this information is vague. How do we include vagueness? This is where Fuzzification comes in. The crisps values of the credit rating which in this case is over 500 and under 500 are now presented in a membership function which might overlap. This results in conversion of the crisp values into fuzzy variables. Upon this conversion the score of 501 now might become eighty percent high and twenty percent low. After this vague information has been included. This information is used for inference. The inference is the process which includes use of experience and intuition in decision making based on the information. The inference is done by using the rule base. Rule base is the set of conditions which map inputs to specific outputs. For example , a rule in our case would be ‘ If credit rating is low then risk is high’. By using this inference the information of eighty percent high and twenty percent low can now be inferred to get some percent low risk and some percent high risk. This result or output is in the form of fuzzy outputs.
These fuzzy outputs are converted to crisps values in the process which can be called reverse Fuzzification or Defuzzification. This is how Fuzzy Logic and FIS work in decision making process. For better understanding of Fuzzy Logic, I encourage watching MATLAB Tech Talk video series on Fuzzy Logic presented by Brian Doughlas