NumericParameters

Tunable numeric parameter settings of membership functions

Description

A NumericParameters object contains tunable settings for the numeric properties of a fuzzy membership function.

Creation

Create a NumericParameters object using the getTunableSettings function. The first and second outputs of getTunableSettings contain VariableSettings objects for input and output variables, respectively. The MembershipFunctions property of each VariableSettings object contains NumericParameters objects for specifying the tunable settings of the membership function properties.

Properties

expand all

Parameter values available for tuning, specified as one of the following:

  • Vector of logical values when the NumericParameters contains tunable settings for the Parameters property of a type-1 membership function or the UpperParameters property of a type-2 membership function

  • Logical 1 or 0 when the NumericParameters object contains tunable settings for either the LowerScale or LowerLag properties of a type-2 membership function

Minimum parameter values, specified as one of the following:

  • Vector when the NumericParameters contains tunable settings for the Parameters property of a type-1 membership function or the UpperParameters property of a type-2 membership function

  • Scalar value when the NumericParameters object contains tunable settings for either the LowerScale or LowerLag properties of a type-2 membership function

Maximum parameter values, specified as one of the following:

  • Vector when the NumericParameters contains tunable settings for the Parameters property of a type-1 membership function or the UpperParameters property of a type-2 membership function

  • Scalar value when the NumericParameters object contains tunable settings for either the LowerScale or LowerLag properties of a type-2 membership function.

Examples

collapse all

Create two fuzzy inference systems, and define the connection between the two.

fis1 = mamfis('Name','fis1','NumInputs',2,'NumOutputs',1);
fis2 = sugfis('Name','fis2','NumInputs',2,'NumOutputs',1);
con = ["fis1/output1" "fis2/input1"];

Create a tree of fuzzy inference systems.

tree = fistree([fis1 fis2],con);

Obtain the tunable settings of input and output variables of the fuzzy inference system.

[in,out] = getTunableSettings(tree)
in=4×1 object
  4x1 VariableSettings array with properties:

    Type
    VariableName
    MembershipFunctions
    FISName

out=2×1 object
  2x1 VariableSettings array with properties:

    Type
    VariableName
    MembershipFunctions
    FISName

You can use dot notation to specify the tunable settings of input and output variables.

For the first membership function of input 1, set the first and third parameters to tunable.

in(1).MembershipFunctions(1).Parameters.Free = [1 0 1];

For the first membership function of input 2, set the minimum parameter range to 0.

in(2).MembershipFunctions(1).Parameters.Minimum = 0;

For the first membership function of output 2, set the maximum parameter range to 1.

out(2).MembershipFunctions(1).Parameters.Maximum = 1;

Create a type-2 fuzzy inference system.

fis = mamfistype2('Name','fis1','NumInputs',2,'NumOutputs',1);

Obtain the tunable settings of the input and output variables of the fuzzy inference system.

[in,out] = getTunableSettings(fis);

You can use dot notation to specify the tunable settings of the membership functions of the input and output variables.

For the first membership function of input 1, set the first and third upper membership function parameters as tunable.

in(1).MembershipFunctions(1).UpperParameters.Free = [1 0 1];

For the first membership function of input 2, set the tunable range of the lower membership function scale to be between 0.7 and 0.9.

in(2).MembershipFunctions(1).LowerScale.Minimum = 0.7;
in(2).MembershipFunctions(1).LowerScale.Maximum = 0.9;

For the first membership function of output 1, set the tunable range of the lower membership function lag to be between 0.1 and 0.4.

in(2).MembershipFunctions(1).LowerLag.Minimum = 0.1;
in(2).MembershipFunctions(1).LowerLag.Maximum = 0.4;

Introduced in R2019a