Main Content

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 a fuzzy inference system.

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

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

[in,out] = getTunableSettings(fis1);

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 the output variable, set the maximum parameter range to 1.

out(1).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;

By default, the tunable settings for a type-2 FIS produce symmetric lag results in the tuned system. To allow for asymmetric lag results, specify the AsymmetricLag name-value argument.

[in2,out2] = getTunableSettings(fis,'AsymmetricLag',true);

Version History

Introduced in R2019a