Fuzzy Input VOP node

Performs a “fuzzify” operation that calculates a fuzzy value given a membership function and an input crisp value.

This operator performs a “fuzzify” operation that calculates a fuzzy value given a membership function and an input crisp value.

Typically, “fuzzify” is used to determine input fuzzy values for a fuzzy logic network. The output of the node represents the degree of membership the input crisp value has in the membership set, which is determined using the membership function defined on the node. For example, if the input crisp value is a “distance” from an object, the “fuzzify” operation can map “distance” to the membership set “near” using the provided membership function. The fuzzy value is then the “degree of membership” in the membership set, or how “near” the input is (also referred to as the “truth” of the input).

A Fuzzy Input VOP is typically attached to a sensor (such as Fuzzy Obstacle Sense) that outputs the crisp values that the Fuzzy Input VOP processes. The input may come in the form of a single value, or as an array of values, and should be connected to the appropriate input. Only one of the inputs should be connected for any given Fuzzy Input node. The node has two outputs, a fuzzy value (a float for the degree of membership) and a FuzzySet struct (a struct containing the discretized membership function, the degree of membership, and the crisp range the set is defined for).

Parameters

Minimum

Minimum possible value of the crisp input. Any crisp value less than the minimum will have a degree of membership of 0.

Maximum

Maximum possible value of the crisp input. Any crisp value greater than the maximum will have a degree of membership of 0.

Fuzzy Set Name

The name of the fuzzy set. Each name for a fuzzy set should be unique for a given fuzzy variable.

Mirrored Fuzzy Set Name

The name of the mirrored fuzzy set.

Combined Fuzzy Set Name

The name of the combined fuzzy set (the original membership function and the mirrored membership function combined).

Presets

Common membership function presets for the fuzzy set defined on the node. The control points for each preset can be adjusted by the user.

Reverse Preset

Reverses the positions of the control points for the current preset.

Membership Function

A visualization of the membership function used to determine the degree of membership in the membership set. If the preset is set to “Custom” the ramp parameter becomes editable.

Mirrored

Toggles a mirrored fuzzy set for the fuzzy set defined by the node. If this is toggled, outputs will be added to the node for the mirrored fuzzy set.

Combine Mirror

Toggles a combined fuzzy set that has a membership function that is a combination of the mirrored fuzzy set and the original fuzzy set. If this is toggled (and a “Mirrored” is also toggled, outputs will be added to the node for the combined fuzzy set.

Number of Samples

The number of samples to sample the membership function at when determining the degree of membership. The larger the value, the more accurate the representation of the fuzzy set will be.

Interpolation

Specifies the interpolation to use between the control points in the membership function.

Range

The range parameter is the range of the membership values defined by the membership function (must be between 0 and 1), and is interpreted differently for each preset. For example, for the “Triangle” preset, the minimum will define the value “Position 1” and “Position 3,” and the maximum will define the value for “Position 2.”

Positions #

The positions of each control point used to adjust each preset membership function. The position is a value between 0 and 1, and “Position 4” > “Position 3” > “Position 2” > “Position 1” (the positions will automatically be adjusted such that this remains true).

Sample Importance

If the input is an array of crisp values, specifies the weight given to the samples throughout the array. For example, if the input contains samples throughout the agent’s field of view of the distance to an obstacle, a triangle-shaped function would provide more weight towards samples from the center of the field of view.

Mirrored

Toggles a fuzzy set that uses a mirror of the Sample Importance function. If this is toggled, outputs will be added to the node for the mirrored fuzzy set.

Combine Mirror

Toggles a combined fuzzy set which uses a sample importance function that is a combination of the mirrored sample importance function and the original Sample Importance function.

Inputs

Crisp Value

The crisp input is a float.

Crisp Range

The crisp input is a float array.

Outputs

Fuzzy Value

The fuzzy value given the input crisp value and the membership function.

Fuzzy Set

A struct that contains the discretized membership function, the fuzzy value, and the range that the fuzzy set is defined over.