Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
FIS - Fuzzy Inference System

Fuzzy Inference System (FIS) Engine. More...

Classes

class  qlibs::fis::ioBase
 
class  qlibs::fis::input
 A FIS Input object. More...
 
class  qlibs::fis::output
 A FIS Output object. More...
 
class  qlibs::fis::core
 
class  qlibs::fis::mf
 A FIS Membership Function. More...
 
class  qlibs::fis::instance
 A FIS(Fuzzy Inference System) object. More...
 
class  qlibs::fis::system< fType, numberOfInputs, numberOfOutputs, numberOfInputSets, numberOfOutputSets, numberOfRules >
 A wrapper for the FIS object. More...
 

Macros

#define FIS_RULES_BEGIN
 Start a Fuzzy rule set. The FIS_RULES_BEGIN statement is used to declare the starting point of a FIS rule set. It should be placed at the start of the rules enumeration. FIS_RULES_END declare the end of the FIS rule set.
 
#define FIS_RULES_END
 Ends a Fuzzy rule set. The FIS_RULES_END statement is used to finalize the declaration of a FIS rule set. It should be placed at the end of the rules enumeration. FIS_RULES_BEGIN declare the start point of the FIS rule set.
 
#define IF
 Rule statement to begin a rule sentence.
 
#define AND
 Rule statement to represent the AND connector.
 
#define OR
 Rule statement to represent the OR connector.
 
#define THEN
 Rule statement to represent the implication.
 
#define IS
 Rule statement to represent a premise.
 
#define IS_NOT
 Rule statement to represent a negated premise.
 
#define END
 Rule statement to end a rule sentence.
 

Typedefs

using qlibs::fis::rules
 Type definition to instantiate a set of fuzzy rules.
 
using qlibs::fis::tag
 Used to define an enum of fis tags.
 
using qlibs::fis::deFuzzFunction
 
using qlibs::fis::fuzzyOperator
 

Enumerations

enum  qlibs::fis::shapeMF {
  qlibs::fis::custommf , qlibs::fis::trimf , qlibs::fis::trapmf , qlibs::fis::gbellmf ,
  qlibs::fis::gaussmf , qlibs::fis::gauss2mf , qlibs::fis::sigmf , qlibs::fis::dsigmf ,
  qlibs::fis::psigmf , qlibs::fis::pimf , qlibs::fis::smf , qlibs::fis::zmf ,
  qlibs::fis::singletonmf , qlibs::fis::concavemf , qlibs::fis::spikemf , qlibs::fis::linsmf ,
  qlibs::fis::linzmf , qlibs::fis::rectmf , qlibs::fis::cosmf , qlibs::fis::constantmf ,
  qlibs::fis::linearmf , qlibs::fis::tlinsmf , qlibs::fis::tlinzmf , qlibs::fis::tconcavemf ,
  qlibs::fis::tsigmf , qlibs::fis::tsmf , qlibs::fis::tzmf , qlibs::fis::trampmf
}
 An enum with all the possible values to specify a membership function. More...
 
enum  qlibs::fis::deFuzzMethod {
  qlibs::fis::centroid , qlibs::fis::bisector , qlibs::fis::mom , qlibs::fis::lom ,
  qlibs::fis::som , qlibs::fis::wtaver , qlibs::fis::wtsum
}
 An enum with all the possible de-Fuzzyfication methods. More...
 
enum  qlibs::fis::paramValue {
  qlibs::fis::FIS_MIN , qlibs::fis::FIS_PROD , qlibs::fis::FIS_MAX , qlibs::fis::FIS_PROBOR ,
  qlibs::fis::FIS_SUM
}
 An enum with the supported parameter values. More...
 
enum  qlibs::fis::parameter {
  qlibs::fis::FIS_Implication , qlibs::fis::FIS_Aggregation , qlibs::fis::FIS_AND , qlibs::fis::FIS_OR ,
  qlibs::fis::FIS_EvalPoints
}
 An enum with the allowed parameters that can be set on a FIS instance. More...
 
enum  qlibs::fis::type { qlibs::fis::Mamdani , qlibs::fis::Sugeno , qlibs::fis::Tsukamoto }
 An enum with the inference system types supported by qlibs::fis. More...
 

Detailed Description

Fuzzy Inference System (FIS) Engine.

For a brief description of this module, please read Fuzzy Inference System Engine

For a brief description of this module, please read Fuzzy Inference System Engine

Macro Definition Documentation

◆ AND

#define AND

Rule statement to represent the AND connector.

◆ END

#define END

Rule statement to end a rule sentence.

◆ FIS_RULES_BEGIN

#define FIS_RULES_BEGIN

Start a Fuzzy rule set. The FIS_RULES_BEGIN statement is used to declare the starting point of a FIS rule set. It should be placed at the start of the rules enumeration. FIS_RULES_END declare the end of the FIS rule set.

See also
FIS_RULES_END
Warning
Only one segment is allowed inside a fuzzy rule set.
Note
It must always be used together with a matching FIS_RULES_END statement. Example:
static const fis::rules Rules[] = {
};
#define FIS_RULES_END
Ends a Fuzzy rule set. The FIS_RULES_END statement is used to finalize the declaration of a FIS rule ...
Definition fis.hpp:476
#define FIS_RULES_BEGIN
Start a Fuzzy rule set. The FIS_RULES_BEGIN statement is used to declare the starting point of a FIS ...
Definition fis.hpp:457

◆ FIS_RULES_END

#define FIS_RULES_END

Ends a Fuzzy rule set. The FIS_RULES_END statement is used to finalize the declaration of a FIS rule set. It should be placed at the end of the rules enumeration. FIS_RULES_BEGIN declare the start point of the FIS rule set.

See also
FIS_RULES_BEGIN
Warning
Only one segment is allowed inside a fuzzy rule set.
Note
It must always be used together with a matching FIS_RULES_BEGIN statement. Example:
static const fis::rules Rules[] = {
};

◆ IF

#define IF

Rule statement to begin a rule sentence.

◆ IS

#define IS

Rule statement to represent a premise.

◆ IS_NOT

#define IS_NOT

Rule statement to represent a negated premise.

◆ OR

#define OR

Rule statement to represent the OR connector.

◆ THEN

#define THEN

Rule statement to represent the implication.

Typedef Documentation

◆ deFuzzFunction

◆ fuzzyOperator

◆ rules

Type definition to instantiate a set of fuzzy rules.

Rules are defined by combining I/O and membership function tags with the following statements:

FIS_RULES_BEGIN, IF, IS, IS_NOT, AND, OR, THEN, END and FIS_RULES_END

Example:

static const fis::rules Rules[] = {
IF service IS service_poor OR food IS food_rancid THEN tip IS tip_cheap END
IF service IS service_good THEN tip IS tip_average END
IF service IS service_excellent OR food IS food_delicious THEN tip IS tip_generous END
};
#define END
Rule statement to end a rule sentence.
Definition fis.hpp:490
int16_t rules
Type definition to instantiate a set of fuzzy rules.
Definition fis.hpp:406
#define OR
Rule statement to represent the OR connector.
Definition fis.hpp:482
#define IF
Rule statement to begin a rule sentence.
Definition fis.hpp:478
#define IS
Rule statement to represent a premise.
Definition fis.hpp:486
#define THEN
Rule statement to represent the implication.
Definition fis.hpp:484

◆ tag

Used to define an enum of fis tags.

Tags for I/O and set/membership functions should be defined within enums of this type Example:

enum : fis::tag { tag1, tag2, tag3 };
rules tag
Used to define an enum of fis tags.
Definition fis.hpp:421

Enumeration Type Documentation

◆ deFuzzMethod

An enum with all the possible de-Fuzzyfication methods.

Enumerator
centroid 

Center of gravity of the fuzzy set along the x-axis [ Only for Mamdani FIS ]

bisector 

Vertical line that divides the fuzzy set into two sub-regions of equal area [ Only for Mamdani FIS ]

mom 

Middle of Maximum [ Only for Mamdani FIS ]

lom 

Largest of Maximum [ Only for Mamdani FIS ]

som 

Smallest of Maximum [ Only for Mamdani FIS ]

wtaver 

Weighted average of all rule outputs [ Only for Sugeno and Tsukamoto FIS ]

wtsum 

Weighted sum of all rule outputs [ Only for Sugeno FIS ]

◆ parameter

An enum with the allowed parameters that can be set on a FIS instance.

Enumerator
FIS_Implication 

Only FIS_MIN and FIS_PROD supported

FIS_Aggregation 

Only FIS_MAX, FIS_PROBOR and FIS_SUM supported

FIS_AND 

Only FIS_MIN and FIS_PROD supported

FIS_OR 

Only FIS_MAX and FIS_PROBOR supported

FIS_EvalPoints 

The number of points for de-fuzzification

◆ paramValue

An enum with the supported parameter values.

Enumerator
FIS_MIN 

Minimal value

FIS_PROD 

Product

FIS_MAX 

Maximum value

FIS_PROBOR 

Probabilistic OR

FIS_SUM 

Sum

◆ shapeMF

An enum with all the possible values to specify a membership function.

Enumerator
custommf 

Custom user-defined Membership function

trimf 

Triangular Membership function f(a,b,c)

trapmf 

Trapezoidal Membership function f(a,b,c,d)

gbellmf 

Generalized bell-shaped Membership function f(a,b,c)

gaussmf 

Gaussian Membership function f(s,c)

gauss2mf 

Gaussian combination Membership function f(s1,c1,s2,c2)

sigmf 

Sigmoidal Membership function f(a,c)

dsigmf 

Difference between two sigmoidal Membership functions f(a1,c1,a2,c2)

psigmf 

Product of two sigmoidal membership functions f(a1,c1,a2,c2)

pimf 

Pi-shaped membership function f(a,b,c,d)

smf 

S-shaped membership function f(a,b)

zmf 

Z-shaped membership function f(a,b)

singletonmf 

Singleton Membership Function f(a)

concavemf 

Concave Membership Function f(i,e)

spikemf 

Spike Membership Function f(w,c)

linsmf 

Linear s-shaped saturation membership function f(a,b)

linzmf 

Linear z-shaped saturation membership function f(a,b)

rectmf 

Rectangle Membership Function f(s,e)

cosmf 

Cosine Membership Function f(c,w)

constantmf 

Constant membership function f(a) [Only for Sugeno FIS ]

linearmf 

Linear membership function f(...) [Only for Sugeno FIS ]

tlinsmf 

Tsukamoto s-shaped saturation membership function f(a,b) [Only for Tsukamoto FIS ]

tlinzmf 

Tsukamoto linzmf membership function f(a,b) [ Only for fis::Tsukamoto FIS ]

tconcavemf 

Tsukamoto z-shaped saturation membership function f(i,e) [Only for Tsukamoto FIS ]

tsigmf 

Tsukamoto Sigmoid membership function f(a,c) [ Only for Tsukamoto FIS ]

tsmf 

Tsukamoto S-Shape membership function f(a,b) [ Only for Tsukamoto FIS ]

tzmf 

Tsukamoto Z-Shape membership function f(a,b) [ Only for Tsukamoto FIS ]

trampmf 

Tsukamoto ramp membership function f(a,b) [ Only for Tsukamoto FIS ]

◆ type

An enum with the inference system types supported by qlibs::fis.

Enumerator
Mamdani 

Mamdani inference system. The output of each rule its a fuzzy logic set.

Sugeno 

Takagi-Sugeno inference system. The output of each rule its a function either linear or constant.

Tsukamoto 

Mamdani inference system. The output of each rule its a fuzzy logic set represented with a monotonic membership function.