× back

Fuzzy Variables

Fuzzy Rule / Fuzzy Implication / Fuzzy If-Then Rule

Question:

Let \( X = \{a, b, c, d\} \), \( Y = \{1, 2, 3, 4\} \) and
\( A = \{(a, 0), (b, 0.8), (c, 0.6), (d, 1)\} \)
\( B = \{(1, 0.2), (2, 1), (3, 0.8), (4, 0)\} \)
\( C = \{(1, 0), (2, 0.4), (3, 1), (4, 0.8)\} \)
Here, \( X \) and \( Y \) are sets, and \( A \), \( B \), \( C \) are fuzzy sets.
Determine the implication relations:

  • If \( X \) is \( A \), then \( Y \) is \( B \).
  • If \( X \) is \( A \), then \( Y \) is \( B \), else \( Y \) is \( C \).

Solution:

If \( X \) is \( A \), then \( Y \) is \( B \):

The implication relation is defined as: \[ R = (A \times B) \cup (A^c \times Y) \]

Step 1: Cartesian Product \( A \times B \)

For \( A \times B \), we calculate the minimum of the membership values of \( A \) and \( B \) for each pair:

\[ A \times B = \begin{pmatrix} \min(0, 0.2) & \min(0, 1) & \min(0, 0.8) & \min(0, 0) \\ \min(0.8, 0.2) & \min(0.8, 1) & \min(0.8, 0.8) & \min(0.8, 0) \\ \min(0.6, 0.2) & \min(0.6, 1) & \min(0.6, 0.8) & \min(0.6, 0) \\ \min(1, 0.2) & \min(1, 1) & \min(1, 0.8) & \min(1, 0) \end{pmatrix} \]

Which simplifies to:

\[ A \times B = \begin{pmatrix} 0 & 0 & 0 & 0 \\ 0.2 & 0.8 & 0.8 & 0 \\ 0.2 & 0.6 & 0.6 & 0 \\ 0.2 & 1 & 0.8 & 0 \end{pmatrix} \]

Step 2: Complement of \( A \), \( A^c \)

The complement \( A^c \) is computed by subtracting each membership value in \( A \) from 1:

\[ A^c = \{(a, 1), (b, 0.2), (c, 0.4), (d, 0)\} \]

Step 3: Cartesian Product \( A^c \times Y \)

For \( A^c \times Y \), we pair each element of \( A^c \) with each element of \( Y \) and compute the minimum of their membership values. Since \( Y = \{(1, 1), (2, 1), (3, 1), (4, 1)\} \), each element in \( Y \) has the membership value of 1:

\[ A^c \times Y = \begin{pmatrix} \min(1, 1) & \min(1, 1) & \min(1, 1) & \min(1, 1) \\ \min(0.2, 1) & \min(0.2, 1) & \min(0.2, 1) & \min(0.2, 1) \\ \min(0.4, 1) & \min(0.4, 1) & \min(0.4, 1) & \min(0.4, 1) \\ \min(0, 1) & \min(0, 1) & \min(0, 1) & \min(0, 1) \end{pmatrix} \]

Which simplifies to:

\[ A^c \times Y = \begin{pmatrix} 1 & 1 & 1 & 1 \\ 0.2 & 0.2 & 0.2 & 0.2 \\ 0.4 & 0.4 & 0.4 & 0.4 \\ 0 & 0 & 0 & 0 \end{pmatrix} \]

Step 4: Union of \( A \times B \) and \( A^c \times Y \)

We now compute the union of \( A \times B \) and \( A^c \times Y \) by taking the element-wise maximum of the two matrices:

\[ R = (A \times B) \cup (A^c \times Y) = \begin{pmatrix} \max(0, 1) & \max(0, 1) & \max(0, 1) & \max(0, 1) \\ \max(0.2, 0.2) & \max(0.8, 0.2) & \max(0.8, 0.2) & \max(0, 0.2) \\ \max(0.2, 0.4) & \max(0.6, 0.4) & \max(0.6, 0.4) & \max(0, 0.4) \\ \max(0.2, 0) & \max(1, 0) & \max(0.8, 0) & \max(0, 0) \end{pmatrix} \]

Which simplifies to:

\[ R = \begin{pmatrix} 1 & 1 & 1 & 1 \\ 0.2 & 0.8 & 0.8 & 0.2 \\ 0.4 & 0.6 & 0.6 & 0.4 \\ 0.2 & 1 & 0.8 & 0 \end{pmatrix} \]

Final Answer:

\[ R = \begin{pmatrix} 1 & 1 & 1 & 1 \\ 0.2 & 0.8 & 0.8 & 0.2 \\ 0.4 & 0.6 & 0.6 & 0.4 \\ 0.2 & 1 & 0.8 & 0 \end{pmatrix} \]

2. If X is A, then Y is B, else Y is C:

For this case, we need to compute \( R = (A \times B) \cup (A^c \times C) \), similar to the previous calculation. However, this step also includes the condition for "else Y is C" when \( X \) is not in \( A \).

Step 1: Complement of A (\(A^c\)) is the same as before:

\[ A^c = \{(a, 1), (b, 0.2), (c, 0.4), (d, 0)\} \]

Step 2: Compute \( A^c \times C \) (same as before):

\[ A^c \times C = \begin{pmatrix} 0 & 0.4 & 1 & 0.8 \\ 0 & 0.2 & 0.2 & 0.2 \\ 0 & 0.4 & 0.4 & 0.4 \\ 0 & 0 & 0 & 0 \end{pmatrix} \]

Step 3: Union of \( (A \times B) \) and \( (A^c \times C) \) (same as before):

R = (A × B) ∪ (Ac × C) = \begin{pmatrix} 0 & 0.4 & 1 & 0.8 \\ 0.2 & 0.8 & 0.8 & 0.2 \\ 0.2 & 0.6 & 0.6 & 0.4 \\ 0.2 & 1 & 0.8 & 0 \end{pmatrix}

This is the final result for the implication relation where "If X is A, then Y is B, else Y is C.

Fuzzy Inference System

A Fuzzy Inference System (FIS) is a framework for reasoning and decision-making under uncertainty using fuzzy logic. It processes input variables and generates outputs based on a set of fuzzy rules. FIS is widely used in control systems, pattern recognition, and decision-making applications. It bridges the gap between human-like reasoning and computational systems by working with approximate information rather than precise data.

Fuzzy Inference Systems are applied in a wide range of fields to handle uncertain or imprecise data. Some real-life applications include:

Functional Blocks of FIS

The following five functional blocks are essential for constructing a FIS:

  1. Rule Base: It contains a collection of fuzzy if-then rules that define the relationship between input and output variables.
  2. Database: It defines the membership functions of fuzzy sets used in the fuzzy rules, providing the necessary information for fuzzification and inference.
  3. Decision-Making Unit: This unit applies the fuzzy rules to the input data to derive fuzzy outputs. It combines the results of all applicable rules.
  4. Fuzzification Interface Unit: It converts crisp (precise) input values into fuzzy sets using membership functions. This step is crucial for handling imprecise or uncertain data.
  5. Defuzzification Interface Unit: It converts the fuzzy output of the inference process into crisp values for actionable results, making the system usable in real-world scenarios.

Understanding Fuzzification and Defuzzification

  1. Fuzzification is the process of converting crisp (precise and numerical) input values into fuzzy sets using predefined membership functions. This step allows a system to handle imprecise, uncertain, or vague data by mapping input values to linguistic terms (e.g., "low," "medium," "high") represented as fuzzy sets.
  2. Defuzzification is the process of converting fuzzy outputs generated by the inference engine into crisp (precise and numerical) values. It translates the fuzzy results into actionable outputs by applying methods like the centroid of area, bisector, or mean of maxima, making the output usable in real-world scenarios.

Block Diagram of FIS

Block Diagram of Fuzzy Inference System

The block diagram of a Fuzzy Inference System (FIS) illustrates the flow of data through its functional components. The diagram typically consists of the following parts:

  1. Input: Crisp input values are provided to the system.
  2. Fuzzification: Converts crisp inputs into fuzzy sets using membership functions.
  3. Inference Engine: Processes fuzzy inputs using the rule base and database to generate fuzzy outputs.
  4. Defuzzification: Converts fuzzy outputs into crisp values suitable for real-world use.
  5. Output: The final crisp output is delivered, which can be used in decision-making or control applications.

Working of FIS

The working of the Fuzzy Inference System (FIS) consists of the following steps:

  1. Fuzzification: The fuzzification unit applies various fuzzification methods to convert crisp input values into fuzzy inputs using membership functions.
  2. Knowledge Base: A knowledge base, which includes both the rule base (fuzzy if-then rules) and the database (membership functions), is used to process the fuzzy inputs.
  3. Inference Mechanism: The inference engine applies the fuzzy rules to the fuzzy inputs to generate fuzzy outputs. This step combines all applicable rules and determines the degree to which each output is activated.
  4. Defuzzification: The defuzzification unit converts the fuzzy output into a crisp output, making it usable for decision-making or control applications in real-world scenarios.

Methods of FIS

The following are the two important methods of Fuzzy Inference Systems, differing in the way they define the consequent of fuzzy rules:

  1. Mamdani Fuzzy Inference System: A widely used approach that represents the consequent of fuzzy rules as fuzzy sets. It uses a max-min (or max-product) composition method and requires defuzzification to produce a crisp output.
  2. Takagi-Sugeno Fuzzy Model (TS Model): This approach represents the consequent of fuzzy rules as a mathematical function (e.g., linear or constant). It simplifies the defuzzification process and is suitable for control applications requiring precise outputs.

Mamdani Fuzzy Inference System

The Mamdani Fuzzy Inference System is one of the earliest and most popular FIS methods. It is characterized by its use of fuzzy sets for both the antecedent and consequent of rules. The steps involved include:

  1. Fuzzification: Converting crisp inputs into fuzzy sets using membership functions.
  2. Rule Evaluation: Applying fuzzy rules and combining the results using fuzzy operators (e.g., AND, OR).
  3. Aggregation: Combining the outputs of all fuzzy rules into a single fuzzy set.
  4. Defuzzification: Converting the aggregated fuzzy set into a crisp output using methods like the centroid or bisector method.

Takagi-Sugeno Fuzzy Model

The Takagi-Sugeno Fuzzy Model is designed for precise and computationally efficient outputs. It differs from the Mamdani method in the following ways:

  1. Consequent Representation: The consequent of rules is represented as a linear or constant mathematical function instead of a fuzzy set.
  2. Rule Evaluation: The rules are evaluated similarly to Mamdani, but the output is directly calculated using the functions defined in the consequents.
  3. Defuzzification: The weighted average method is typically used, making the defuzzification process straightforward and fast.

This model is commonly used in engineering and control systems due to its efficiency and ability to handle large-scale problems.

Reference