This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

sugfis

Sugeno fuzzy inference system

Description

Use a sugfis object to represent a Sugeno fuzzy inference system (FIS). For more information on Sugeno systems, see What Is Sugeno-Type Fuzzy Inference?

As an alternative to Sugeno systems, you can create a Mamdani FIS using a mamfis object. For a comparison of Sugeno and Mamdani systems, see Comparison of Sugeno and Mamdani Systems.

Creation

To create a Sugeno FIS object, use one of the following methods:

  • The sugfis function.

  • If you have input/output data, you can use the genfis function.

  • If you have a .fis file for a Sugeno system, you can use the readfis function.

  • Convert an existing Mamdani FIS to a Sugeno FIS using convertToSugeno.

Syntax

fis = sugfis
fis = sugfis(Name,Value)

Description

example

fis = sugfis creates a Sugeno FIS with default property values. To modify the properties of the fuzzy system, use dot notation.

example

fis = sugfis(Name,Value) specifies FIS configuration information or sets object properties using name-value pair arguments. You can specify multiple name-value pairs. Enclose names in quotes.

Input Arguments

expand all

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

Example: 'NumInputs',2 configures the fuzzy system to have two input variables

Number of FIS inputs, specified as the comma-separated pair consisting of 'NumInputs' and a nonnegative integer.

Number of membership functions for each FIS input, specified as the comma-separated pair consisting of 'NumInputMFs' and a positive integer.

Number of FIS outputs, specified as the comma-separated pair consisting of 'NumOutputs' and a nonnegative integer.

Number of membership functions for each FIS output, specified as the comma-separated pair consisting of 'NumOutputMFs' and a positive integer.

Membership function type for input variables, specified as the comma-separated pair consisting of 'MFType' and either "trimf" (triangular MF) or "gaussmf" (Gaussian MF). For each input variable, the membership functions are uniformly distributed over the variable range with approximately 80% overlap in the MF supports.

Output membership functions are set to "constant" and uniformly distributed over the output variable ranges.

Flag for automatically adding rules, specified as the comma-separated pair consisting of "AddRules" and one of the following:

  • "allcombinations" — If both NumInputs and NumOutputs are greater than zero, create rules with antecedents that contain all input membership function combinations. Each rule consequent contains all the output variables and uses the first membership function of each output.

  • "none" — Create a FIS without any rules.

Properties

expand all

FIS name, specified as a string or character vector.

AND operator method for combining fuzzified input values in a fuzzy rule antecedent, specified as one of the following:

  • "prod" — Product of fuzzified input values

  • "min" — Minimum of fuzzified input values

  • String or character vector — Name of a custom AND function in the current working folder or on the MATLAB® path

  • Function handle — Custom AND function in the current working folder or on the MATLAB path

For more information on using custom functions, see Build Fuzzy Systems Using Custom Functions.

For more information on fuzzy operators and the fuzzy inference process, see Fuzzy Inference Process.

OR operator method for combining fuzzified input values in a fuzzy rule antecedent, specified as one of the following:

  • "probor" — Probabilistic OR of fuzzified input values. For more information, see probor.

  • "max" — Maximum of fuzzified input values.

  • String or character vector — Name of a custom OR function in the current working folder or on the MATLAB path.

  • Function handle — Custom OR function in the current working folder or on the MATLAB path.

For more information on using custom functions, see Build Fuzzy Systems Using Custom Functions.

For more information on fuzzy operators and the fuzzy inference process, see Fuzzy Inference Process.

Implication method for computing consequent fuzzy set, specified as "prod". Sugeno systems always use the "prod" implication method, which scales the consequent membership function by the antecedent result value.

For more information on implication and the fuzzy inference process, see Fuzzy Inference Process.

Aggregation method for combining rule consequents, specified as "sum". Sugeno systems always use the "sum" aggregation method, which is the sum of the consequent fuzzy sets.

For more information on aggregation and the fuzzy inference process, see Fuzzy Inference Process.

Defuzzification method for computing crisp output values from the aggregated output fuzzy set, specified as one of the following:

  • "wtaver" — Weighted average of all rule outputs

  • "wtsum" — Weighted sum of all rule outputs

For more information on using custom functions, see Build Fuzzy Systems Using Custom Functions.

For more information on defuzzification and the fuzzy inference process, see Fuzzy Inference Process.

FIS input variables, specified as a vector of fisvar objects. To add and remove input variables, use addInput and removeInput, respectively. You can modify the properties of the input variables using dot notation.

You can also create a vector of fisvar objects and assign it to Inputs using dot notation.

You can add membership functions to input variables using the addMF function.

FIS output variables, specified as a vector of fisvar objects. To add and remove output variables, use addOutput and removeOutput, respectively.

You can also create a vector of fisvar objects and assign it to Outputs using dot notation.

You can add membership functions to output variables using the addMF function.

FIS input variables, specified as a vector of fisrule objects. To add fuzzy rules, use the addRule function.

You can also create a vector of fisrule objects and assign it to Rules using dot notation.

To remove a rule, set the corresponding rule vector element to []. For example, to remove the tenth rule from the rule list, type:

fis.Rules(10) = [];

Flag for disabling consistency checks when property values change, specified as a logical value.

By default, when you change the value of a property of a sugfis object, the software verifies whether the new property value is consistent with the other object properties. These checks can affect performance, particularly when creating and updating fuzzy systems within loops.

To disable these checks, which results in faster FIS construction, set DisableSturcturalChecks to true.

Note

Disabling structural checks can result in an invalid sugfis object.

To reenable the consistency checks, first verify that the changes you made to the FIS are consistent and produce a valid sugfis object. Then, set DisableSturcturalChecks to false. If the sugfis object is invalid, reenabling the consistency checks generates an error.

Object Functions

addInputAdd input variable to fuzzy inference system
removeInputRemove input variable from fuzzy inference system
addOutputAdd output variable to fuzzy inference system
removeOutputRemove output variable from fuzzy inference system
addRuleAdd rule to fuzzy inference system
addMFAdd membership function to fuzzy variable
removeMFRemove membership function from fuzzy variable
evalfisEvaluate fuzzy inference system
writeFISSave fuzzy inference system to file

Examples

collapse all

Create a Sugeno fuzzy inference system with default property values.

fis = sugfis;

Modify the system properties using dot notation. For example, configure fis to use weighted-sum defuzzification.

fis.DefuzzificationMethod = "wtsum";

Alternatively, you can specify one of more FIS properties when you create a fuzzy system. For example, create a Sugeno fuzzy system with specified AND and OR methods.

fis = sugfis("AndMethod","min","OrMethod","max");

Create a Sugeno fuzzy inference system with three inputs and one output.

fis = sugfis("NumInputs",3,"NumOutputs",1);

Alternative Functionality

App

You can interactively create a Sugeno FIS using the Fuzzy Logic Designer or Neuro-Fuzzy Designer apps. You can then export the system to the MATLAB workspace.

Introduced in R2018b