8. Combining the Antecedents and Consequents for a Rule

Complete the following steps to combine the antecedents and consequents you created in the previous steps to form a specific rule.

  1. Add an FL Set Rule VI to the block diagram. This VI modifies the antecedents, consequents, or relationships of a rule in a fuzzy system.
  2. Wire the fuzzy system out output of the last FL Set Membership Function VI to the fuzzy system in input of the FL Set Rule VI.
  3. Create a constant for the rule index input of the FL Set Rule VI and set it to 0 to specify that you want to modify the first rule in the fuzzy system.
  4. Wire the appended array output of the first Build Array function to the antecedents input of the FL Set Rule VI.
  5. Wire the appended array output of the second Build Array function to the consequents input of the FL Set Rule VI.
  6. Create a constant for the antecedent connective input of the FL Set Rule VI to specify how the VI calculates the truth value of the aggregated rule antecedent.
  7. Select AND (Minimum) from the antecedent connective constant. The aggregated rule antecedent now is IF 'Temperature' IS 'Cold' AND 'Humidity' IS 'Dry', where this VI uses the smallest degree of membership of the individual antecedents to calculate the truth value of the aggregated rule antecedent.
    Note��You cannot specify how this VI calculates the truth value of an aggregated rule consequent. This VI always uses the greatest degree of membership of the individual consequents to calculate the truth value of the aggregated rule consequent.
  8. Create a constant for the consequent implication input of the FL Set Rule VI. This input specifies the implication method this VI uses to scale the membership functions of the output linguistic variables based on the rule weight.
  9. Select Product from the consequent implication constant to specify that this VI uses the Product implication method.
  10. Create a constant for the degree of support input and set it to 1. This input specifies the weight that you want to apply to the rule. The final rule weight is equal to the degree of support multiplied by the truth value of the aggregated rule antecedent.

    The section of block diagram you just created resembles the following image:

  11. Save the VI.
Previous
7. Creating Consequents
Home
Tutorial: Modifying a Fuzzy System with the Fuzzy Logic VIs
Next
9. Saving the Fuzzy System