7. Creating Consequents

You create rule consequents similarly to how you create rule antecedents. Complete the following steps to create the 'Electric Roof' IS 'Closed' and 'Water Spills' IS 'Moderate' consequents.

  1. Add the FL Create Consequent VI to the block diagram. This VI creates a consequent, or THEN portion, of a rule for a fuzzy system.
  2. Create constants for the variable index and membership function index inputs of the FL Create Consequent VI and set them both to 0. These inputs specify that you want to associate the Electric Roof output linguistic variable with the Closed membership function.
    Note��Unlike the FL Create Antecedent VI, the FL Create Consequent VI does not have a condition input. The FL Create Consequent VI always returns the consequent corresponding to the degree of membership of the output variable within the membership function.
  3. Repeat steps 1 and 2 to create the 'Water Spills' IS 'Moderate' consequent. In the greenhouse fuzzy system, Moderate is the second membership function of the second output linguistic variable (Water Spills), so set both the variable index and membership function index to 1.
  4. Add a Build Array function to the block diagram.
  5. Resize the Build Array function to display two input elements.
  6. Wire the consequent output of the first FL Create Consequent VI to the first element input of the Build Array function.
  7. Wire the consequent output of the second FL Create Consequent VI to the second element input of the Build Array function. The section of block diagram you just created resembles the following image:

  8. Save the VI.
Previous
6. Creating Antecedents
Home
Tutorial: Modifying a Fuzzy System with the Fuzzy Logic VIs
Next
8. Combining the Antecedents and Consequents for a Rule