Main Content

fismftype2

Interval type-2 fuzzy membership function

Since R2019b

Description

Use a fismftype2 object to represent an interval type-2 fuzzy membership function (MF), which introduces additional uncertainty into a fuzzy inference system.

An interval type-2 membership function is represented by an upper and a lower membership function. The values of the upper membership function are always greater than or equal to the corresponding lower membership function values. The area enclosed by these membership functions is the footprint of uncertainty (FOU). For example, the following plot shows three type-2 membership functions for a given input variable.

Sample type-2 membership functions with the footprint of uncertainty in grey bounded by the upper and lower membership functions in red and blue, respectively.

For more information on type-2 membership functions, see Type-2 Fuzzy Inference Systems.

Creation

Description

example

mf = fismftype2 creates a type-2 fuzzy membership function with default name, type, upper MF parameters, and lower MF configuration. To change the membership function properties, use dot notation.

example

mf = fismftype2(type,upperParameters) sets the Type and UpperParameters properties of the membership function.

example

mf = fismftype2(___,Name,Value) sets the Name, LowerScale, or LowerLag properties of the membership function using one or more name-value pair arguments for any of the other syntaxes.

Properties

expand all

Membership function name, specified as a string or character vector.

Membership function type for both the upper and lower membership function, specified as a string or character vector that contains the name of a function in the current working folder or on the MATLAB® path. You can also specify a handle to such a function. When you specify Type, you must also specify UpperParameters.

This table describes the values that you can specify for Type.

Membership Function TypeDescriptionFor More Information
"gbellmf"Generalized bell-shaped membership functiongbellmf
"gaussmf"Gaussian membership functiongaussmf
"gauss2mf"Gaussian combination membership functiongauss2mf
"trimf"Triangular membership functiontrimf
"trapmf"Trapezoidal membership functiontrapmf
"linsmf"Linear s-shaped saturation membership functionlinsmf
"linzmf"Linear z-shaped saturation membership functionlinzmf
"sigmf"Sigmoidal membership functionsigmf
"dsigmf"Difference between two sigmoidal membership functionsdsigmf
"psigmf"Product of two sigmoidal membership functionspsigmf
"zmf"Z-shaped membership functionzmf
"pimf"Pi-shaped membership functionpimf
"smf"S-shaped membership functionsmf
String or character vectorName of a custom membership function in the current working folder or on the MATLAB path. Custom output membership functions are not supported for Sugeno systems.Build Fuzzy Systems Using Custom Functions
Function handleHandle to a custom membership function in the current working folder or on the MATLAB path. Custom output membership functions are not supported for Sugeno systems.

Note

When you change Type using dot notation, the values in Parameters are automatically converted for the new membership function type.

Upper membership function parameters, specified as a vector. The length of the parameter vector depends on the membership function type. When you specify Parameters, you must also specify Type.

Lower membership function scaling factor, specified as a positive scalar less than or equal to 1. Use LowerScale to define the maximum value of the lower membership function.

Depending on the value of LowerLag, the actual maximum lower membership function value can be less than LowerScale.

Lower membership function delay factor, specified as a scalar value or a vector of length two. You can specify lag values between 0 and 1, inclusive.

The following membership function types support only a scalar LowerLag value:

  • Symmetric MFs — gaussmf and gbellmf

  • One-sided MFs — sigmf, smf, and zmf

All other built-in membership functions support either a scalar or vector LowerLag value. For these membership functions, when you specify a:

  • Scalar value, the same lag value is used for both the left and right side of the membership function.

  • Vector value, you can define different lag values for the left and right sides of the membership function.

The lag value defines the point at which the lower membership function value starts increasing from zero based on the value of the upper membership function. For example, a lag value of 0.1 indicates that the lower membership function becomes positive when the upper membership function has a membership value of 0.1.

By default, the lag value is 0.2. However, for some membership function types and upper membership function parameters, the software is unable to set a lower lag value to 0.2. In such a case, the default lag value is set to a different valid value..

When the lag value is zero, the lower membership function starts increasing at the same point as the upper membership function.

Some membership function types restrict the maximum lag value. For example, LowerLag must be less than 1 for the gaussmf, gauss2mf, gbellmf, sigmf, dsigmf, and psigmf membership functions.

Object Functions

evalmfEvaluate fuzzy membership function

Examples

collapse all

Create type-2 membership function with default settings.

mf = fismftype2;

To modify the membership function settings, use dot notation. For example, specify a Gaussian upper membership function with a standard deviation of 2 and a mean of 10.

mf.Type = "gaussmf";
mf.UpperParameters = [2 10];

Specify the maximum lower membership function value as 0.8.

mf.LowerScale = 0.8;

Configure the lower membership function to start increasing when the upper membership function reaches 0.3.

mf.LowerLag = 0.3;

Create a trapezoidal type-2 membership function with specified upper MF parameters.

mf = fismftype2("trapmf",[3 4 6 7])
mf = 
  fismftype2 with properties:

               Type: "trapmf"
    UpperParameters: [3 4 6 7]
         LowerScale: 1
           LowerLag: [0.2000 0.2000]
               Name: "mf"

By default, the lower membership function has a maximum value of 1 and starts increasing when the upper MF is 0.2.

Create a triangular type-2 membership function, specifying a maximum lower MF value of 0.9 and a membership function lag of 0.1.

mf = fismftype2("trimf",[1 2 3],'LowerScale',0.9,'LowerLag',0.1);

Version History

Introduced in R2019b