Fuzzy Logic TutorialWhat is Fuzzy Logic?The 'Fuzzy' word means the things that are not clear or are vague. Sometimes, we cannot decide in real life that the given problem or statement is either true or false. At that time, this concept provides many values between the true and false and gives the flexibility to find the best solution to that problem. Example of Fuzzy Logic as comparing to Boolean LogicFuzzy logic contains the multiple logical values and these values are the truth values of a variable or problem between 0 and 1. This concept was introduced by Lofti Zadeh in 1965 based on the Fuzzy Set Theory. This concept provides the possibilities which are not given by computers, but similar to the range of possibilities generated by humans. In the Boolean system, only two possibilities (0 and 1) exist, where 1 denotes the absolute truth value and 0 denotes the absolute false value. But in the fuzzy system, there are multiple possibilities present between the 0 and 1, which are partially false and partially true. The Fuzzy logic can be implemented in systems such as micro-controllers, workstation-based or large network-based systems for achieving the definite output. It can also be implemented in both hardware or software. Characteristics of Fuzzy LogicFollowing are the characteristics of fuzzy logic:
Architecture of a Fuzzy Logic SystemIn the architecture of the Fuzzy Logic system, each component plays an important role. The architecture consists of the different four components which are given below.
Following diagram shows the architecture or process of a Fuzzy Logic system: 1. Rule BaseRule Base is a component used for storing the set of rules and the If-Then conditions given by the experts are used for controlling the decision-making systems. There are so many updates that come in the Fuzzy theory recently, which offers effective methods for designing and tuning of fuzzy controllers. These updates or developments decreases the number of fuzzy set of rules. 2. FuzzificationFuzzification is a module or component for transforming the system inputs, i.e., it converts the crisp number into fuzzy steps. The crisp numbers are those inputs which are measured by the sensors and then fuzzification passed them into the control systems for further processing. This component divides the input signals into following five states in any Fuzzy Logic system:
3. Inference EngineThis component is a main component in any Fuzzy Logic system (FLS), because all the information is processed in the Inference Engine. It allows users to find the matching degree between the current fuzzy input and the rules. After the matching degree, this system determines which rule is to be added according to the given input field. When all rules are fired, then they are combined for developing the control actions. 4. DefuzzificationDefuzzification is a module or component, which takes the fuzzy set inputs generated by the Inference Engine, and then transforms them into a crisp value. It is the last step in the process of a fuzzy logic system. The crisp value is a type of value which is acceptable by the user. Various techniques are present to do this, but the user has to select the best one for reducing the errors. Membership FunctionThe membership function is a function which represents the graph of fuzzy sets, and allows users to quantify the linguistic term. It is a graph which is used for mapping each element of x to the value between 0 and 1. This function is also known as indicator or characteristics function. This function of Membership was introduced in the first papers of fuzzy set by Zadeh. For the Fuzzy set B, the membership function for X is defined as: μB:X → [0,1]. In this function X, each element of set B is mapped to the value between 0 and 1. This is called a degree of membership or membership value. Classical and Fuzzy Set TheoryTo learn about classical and Fuzzy set theory, firstly you have to know about what is set. SetA set is a term, which is a collection of unordered or ordered elements. Following are the various examples of a set:
Types of Set:There are following various categories of set:
Classical SetIt is a type of set which collects the distinct objects in a group. The sets with the crisp boundaries are classical sets. In any set, each single entity is called an element or member of that set. Mathematical Representation of Sets Any set can be easily denoted in the following two different ways: 1. Roaster Form: This is also called as a tabular form. In this form, the set is represented in the following way: Set_name = { element1, element2, element3, ......, element N} The elements in the set are enclosed within the brackets and separated by the commas. Following are the two examples which describes the set in Roaster or Tabular form: Example 1: Set of Natural Numbers: N={1, 2, 3, 4, 5, 6, 7, ......,n). Example 2: Set of Prime Numbers less than 50: X={2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47}. 2. Set Builder Form: Set Builder form defines a set with the common properties of an element in a set. In this form, the set is represented in the following way: A = {x:p(x)} The following example describes the set in the builder form: The set {2, 4, 6, 8, 10, 12, 14, 16, 18} is written as: B = {x:2 ≤ x < 20 and (x%2) = 0} Operations on Classical SetFollowing are the various operations which are performed on the classical sets:
1. Union: This operation is denoted by (A U B). A U B is the set of those elements which exist in two different sets A and B. This operation combines all the elements from both the sets and make a new set. It is also called a Logical OR operation. It can be described as: A ∪ B = { x | x ∈ A OR x ∈ B }. Example: Set A = {10, 11, 12, 13}, Set B = {11, 12, 13, 14, 15}, then A ∪ B = {10, 11, 12, 13, 14, 15} 2. Intersection This operation is denoted by (A ∩ B). A ∩ B is the set of those elements which are common in both set A and B. It is also called a Logical OR operation. It can be described as: A ∩ B = { x | x ∈ A AND x ∈ B }. Example: Set A = {10, 11, 12, 13}, Set B = {11, 12, 14} then A ∩ B = {11, 12} 3. Difference Operation This operation is denoted by (A - B). A-B is the set of only those elements which exist only in set A but not in set B. It can be described as: A - B = { x | x ∈ A AND x ∉ B }. 4. Complement Operation: This operation is denoted by (A`). It is applied on a single set. A` is the set of elements which do not exist in set A. It can be described as: A′ = {x|x ∉ A}. Properties of Classical SetThere are following various properties which play an essential role for finding the solution of a fuzzy logic problem. 1. Commutative Property: This property provides the following two states which are obtained by two finite sets A and B: A ∪ B = B ∪ A A ∩ B = B ∩ A 2. Associative Property: This property also provides the following two states but these are obtained by three different finite sets A, B, and C: A ∪ (B ∪ C) = (A ∪ B) ∪ C A ∩ (B ∩ C) = (A ∩ B) ∩ C 3. Idempotency Property: This property also provides the following two states but for a single finite set A: A ∪ A = A A ∩ A = A 4. Absorption Property This property also provides the following two states for any two finite sets A and B: A ∪ (A ∩ B) = A A ∩ (A ∪ B) = A 5. Distributive Property: This property also provides the following two states for any three finite sets A, B, and C: A∪ (B ∩ C) = (A ∪ B)∩ (A ∪ C) A∩ (B ∪ C) = (A∩B) ∪ (A∩C) 6. Identity Property: This property provides the following four states for any finite set A and Universal set X: A ∪ φ =A A ∩ X = A A ∩ φ = φ A ∪ X = X 7. Transitive property This property provides the following state for the finite sets A, B, and C: If A ⊆ B ⊆ C, then A ⊆ C 8. Ivolution property This property provides following state for any finite set A: 9. De Morgan's Law This law gives the following rules for providing the contradiction and tautologies: Fuzzy SetThe set theory of classical is the subset of Fuzzy set theory. Fuzzy logic is based on this theory, which is a generalisation of the classical theory of set (i.e., crisp set) introduced by Zadeh in 1965. A fuzzy set is a collection of values which exist between 0 and 1. Fuzzy sets are denoted or represented by the tilde (~) character. The sets of Fuzzy theory were introduced in 1965 by Lofti A. Zadeh and Dieter Klaua. In the fuzzy set, the partial membership also exists. This theory released as an extension of classical set theory. This theory is denoted mathematically asA fuzzy set (Ã) is a pair of U and M, where U is the Universe of discourse and M is the membership function which takes on values in the interval [ 0, 1 ]. The universe of discourse (U) is also denoted by Ω or X. Operations on Fuzzy SetGiven à and B are the two fuzzy sets, and X be the universe of discourse with the following respective member functions: The operations of Fuzzy set are as follows: 1. Union Operation: The union operation of a fuzzy set is defined by: μA∪B(x) = max (μA(x), μB(x)) Example: Let's suppose A is a set which contains following elements: A = {( X1, 0.6 ), (X2, 0.2), (X3, 1), (X4, 0.4)} And, B is a set which contains following elements: B = {( X1, 0.1), (X2, 0.8), (X3, 0), (X4, 0.9)} then, AUB = {( X1, 0.6), (X2, 0.8), (X3, 1), (X4, 0.9)} Because, according to this operation For X1 μA∪B(X1) = max (μA(X1), μB(X1)) μA∪B(X1) = max (0.6, 0.1) μA∪B(X1) = 0.6 For X2 μA∪B(X2) = max (μA(X2), μB(X2)) μA∪B(X2) = max (0.2, 0.8) μA∪B(X2) = 0.8 For X3 μA∪B(X3) = max (μA(X3), μB(X3)) μA∪B(X3) = max (1, 0) μA∪B(X3) = 1 For X4 μA∪B(X4) = max (μA(X4), μB(X4)) μA∪B(X4) = max (0.4, 0.9) μA∪B(X4) = 0.9 2. Intersection Operation:The intersection operation of fuzzy set is defined by: μA∩B(x) = min (μA(x), μB(x)) Example: Let's suppose A is a set which contains following elements: A = {( X1, 0.3 ), (X2, 0.7), (X3, 0.5), (X4, 0.1)} And, B is a set which contains following elements: B = {( X1, 0.8), (X2, 0.2), (X3, 0.4), (X4, 0.9)} then, A∩B = {( X1, 0.3), (X2, 0.2), (X3, 0.4), (X4, 0.1)} Because, according to this operation For X1 μA∩B(X1) = min (μA(X1), μB(X1)) μA∩B(X1) = min (0.3, 0.8) μA∩B(X1) = 0.3 For X2 μA∩B(X2) = min (μA(X2), μB(X2)) μA∩B(X2) = min (0.7, 0.2) μA∩B(X2) = 0.2 For X3 μA∩B(X3) = min (μA(X3), μB(X3)) μA∩B(X3) = min (0.5, 0.4) μA∩B(X3) = 0.4 For X4 μA∩B(X4) = min (μA(X4), μB(X4)) μA∩B(X4) = min (0.1, 0.9) μA∩B(X4) = 0.1 3. Complement Operation: The complement operation of fuzzy set is defined by: μĀ(x) = 1-μA(x), Example: Let's suppose A is a set which contains following elements: A = {( X1, 0.3 ), (X2, 0.8), (X3, 0.5), (X4, 0.1)} then, Ā= {( X1, 0.7 ), (X2, 0.2), (X3, 0.5), (X4, 0.9)} Because, according to this operation For X1 μĀ(X1) = 1-μA(X1) μĀ(X1) = 1 - 0.3 μĀ(X1) = 0.7 For X2 μĀ(X2) = 1-μA(X2) μĀ(X2) = 1 - 0.8 μĀ(X2) = 0.2 For X3 μĀ(X3) = 1-μA(X3) μĀ(X3) = 1 - 0.5 μĀ(X3) = 0.5 For X4 μĀ(X4) = 1-μA(X4) μĀ(X4) = 1 - 0.1 μĀ(X4) = 0.9
Applications of Fuzzy LogicFollowing are the different application areas where the Fuzzy Logic concept is widely used:
Advantages of Fuzzy LogicFuzzy Logic has various advantages or benefits. Some of them are as follows:
Disadvantages of Fuzzy LogicFuzzy Logic has various disadvantages or limitations. Some of them are as follows:
|