4. Modifying Membership Functions

You can use the Membership VIs to modify the membership functions for linguistic variables in a fuzzy system. Complete the following steps to modify the membership functions of the Temperature input linguistic variable to use degrees Fahrenheit instead of degrees Celsius.

  1. Add the FL Set Membership Function VI to the block diagram.
  2. Wire the fuzzy system out output of the FL Set Variable VI to the fuzzy system in input of the FL Set Membership Function VI.
  3. Create constants for the membership function index, variable index, and input/output inputs of the FL Set Membership Function VI and set them to 0, 0, and Input, respectively. These inputs specify that you want to modify the first membership function, Cold, of the Temperature input linguistic variable.
  4. Create a constant for the shape input of the FL Set Membership Function VI.
  5. Select Trapezoid from the shape constant to specify the shape of the function that determines the degrees of membership for the linguistic variable.
  6. Create a constant for the points input of the FL Set Membership Function VI. This input specifies the values of the linguistic variable corresponding to the base and top points, in order from left to right and base to top, of the membership function.
  7. In the first four elements of the points array constant, enter the values 32, 32, 55, and 70, respectively.
  8. Repeat steps 1 through 5 for the Normal and Warm membership functions. For each membership function, add a new FL Set Membership Function VI to the block diagram and wire the fuzzy system out output of the previous VI to the fuzzy system in input of the next VI. Use the shapes and points shown in the following table:

    Membership Function Shape Points
    Normal Gaussian 59, 68, 77, 86
    Warm Trapezoid 75, 90, 122, 122


    The block diagram now resembles the following image:

  9. Save the VI.
Previous
3. Modifying a Linguistic Variable
Home
Tutorial: Modifying a Fuzzy System with the Fuzzy Logic VIs
Next
5. Modifying a Rule