Modifying Membership Functions
- 更新时间2025-08-27
- 阅读时长5分钟
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.
- Add the FL Set Membership Function VI to the block diagram.
- 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.
- 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.
- Create a constant for the shape input of the FL Set Membership Function VI.
- Select Trapezoid from the shape constant to specify the shape of the function that determines the degrees of membership for the linguistic variable.
- 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.
- In the first four elements of the points array constant, enter the values 32, 32, 55, and 70, respectively.
- 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:
The block diagram now resembles the following image:
Membership Function Shape Points Normal Gaussian 59, 68, 77, 86 Warm Trapezoid 75, 90, 122, 122 
- Save the VI.