Contenuto principale

VariableSettings

R2026b

Tunable parameter settings of fuzzy variables

Description

When tuning a fuzzy inference system using the tunefis function, use VariableSettings objects to specify tunable parameter settings for input and output variables.

Creation

Create a VariableSettings object using the getTunableSettings function. The first and second outputs of getTunableSettings contain VariableSettings objects for input and output variables, respectively.

Properties

expand all

This property is read-only.

Name of fuzzy inference system, represented as a string.

This property is read-only.

Type of variable, represented as either "input" or "output" for input and output variables, respectively.

This property is read-only.

Name of variable, represented as a string.

Membership function settings, specified as one of these values:

Object Functions

setTunableSet specified parameter settings as tunable or nontunable

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