![]() |
Documentation
Tools for embedded systems
|
A FIS(Fuzzy Inference System) object. More...
#include <fis.hpp>
Public Member Functions | |
| instance ()=default | |
| virtual | ~instance () |
| bool | setup (const type t, input *const inputs, const size_t ni, output *const outputs, const size_t no, mf *const mf_inputs, const size_t nmi, mf *const mf_outputs, const size_t nmo, const rules *const r, const size_t n, real_t *rWeights=nullptr) noexcept |
| Setup and initialize the FIS instance. | |
| template<size_t numberInputs, size_t numberOutputs, size_t numberMFinputs, size_t numberMFOutputs, size_t numberRules> | |
| bool | setup (const type t, input(&inputs)[numberInputs], output(&outputs)[numberOutputs], mf(&mf_inputs)[numberMFinputs], mf(&mf_outputs)[numberMFOutputs], const rules *const r, real_t(&rWeights)[numberRules]) noexcept |
| Setup and initialize the FIS instance. | |
| bool | setupInput (const tag t, const real_t Min, const real_t Max) noexcept |
| Setup the input with the specified tag and set limits for it. | |
| bool | setupOutput (const tag t, const real_t Min, const real_t Max) noexcept |
| Setup the output with the specified tag and set limits for it. | |
| bool | setupInputMF (const tag io, const tag mf, const shapeMF s, const real_t *cp, const real_t h=1.0_re) noexcept |
| Setup the input tag and points for the specified membership function. | |
| bool | setupInputMF (const tag io, const tag mf, mfFunction customMfs, const real_t *cp, const real_t h=1.0_re) noexcept |
| Setup the input tag and points for the specified membership function. | |
| bool | setupOutputMF (const tag io, const tag mf, const shapeMF s, const real_t *cp, const real_t h=1.0_re) noexcept |
| Setup the output tag and points for the specified membership function. | |
| bool | setupOutputMF (const tag io, const tag mf, mfFunction customMfs, const real_t *cp, const real_t h=1.0_re) noexcept |
| Set the output tag and points for the specified membership function. | |
| bool | setInput (const tag t, const real_t value) noexcept |
| Set a crisp value of the input with the specified tag. | |
| bool | getOutput (const tag t, real_t &value) const noexcept |
| Get the de-fuzzified crisp value from the output with the specified tag. | |
| bool | setParameter (const parameter p, const paramValue x) noexcept |
| Set parameters of the FIS instance. | |
| bool | setDeFuzzMethod (deFuzzMethod m) noexcept |
| Change the default de-Fuzzification method of the FIS instance. | |
| bool | fuzzify (void) noexcept |
| Perform the fuzzification operation over the crisp inputs on the requested FIS object. | |
| bool | deFuzzify (void) noexcept |
| Perform the de-Fuzzification operation to compute the crisp outputs. | |
| bool | inference (void) noexcept |
| Perform the inference process on the FIS object. | |
| bool | setRuleWeights (real_t *rWeights) noexcept |
| Set weights to the rules of the inference system. | |
| bool | isInitialized (void) const |
| Check if the FIS instance has been initialized. | |
| operator bool () const noexcept | |
| Check if the FIS instance has been initialized. | |
| size_t | getNumberOfPoints (void) const noexcept |
| Get the number of points used on Mamdani to perform the de-fuzzification proccess. | |
| real_t | operator[] (tag outTag) const |
| Get the de-fuzzified crisp value from the output with the specified tag. | |
| instance & | operator<< (const tag &t) |
| Select the input to set using with the specified tag. | |
| instance & | operator<< (const int &value) |
| The value to set the previously selected input. | |
| instance & | operator<< (const real_t &value) |
| The value to set the previously selected input. | |
A FIS(Fuzzy Inference System) object.
The instance should be initialized using the instance::setup() method.
|
default |
|
inlinevirtual |
|
noexcept |
Perform the de-Fuzzification operation to compute the crisp outputs.
true on success, otherwise return false.
|
noexcept |
Perform the fuzzification operation over the crisp inputs on the requested FIS object.
true on success, otherwise return false.
|
inlinenoexcept |
Get the number of points used on Mamdani to perform the de-fuzzification proccess.
Get the de-fuzzified crisp value from the output with the specified tag.
| [in] | t | The output tag |
| [out] | value | The variable where the output will be stored |
|
noexcept |
Perform the inference process on the FIS object.
true on success, otherwise return false.
|
inline |
Check if the FIS instance has been initialized.
true if instance has been initialized
|
inlineexplicitnoexcept |
Check if the FIS instance has been initialized.
true if instance has been initialized
|
inline |
The value to set the previously selected input.
| [in] | value | The crisp value to set |
The value to set the previously selected input.
| [in] | value | The crisp value to set |
Select the input to set using with the specified tag.
| [in] | t | The input tag |
Get the de-fuzzified crisp value from the output with the specified tag.
| [in] | outTag | The output tag |
|
noexcept |
Change the default de-Fuzzification method of the FIS instance.
| [in] | m | The de-fuzzification method: use one of the following : centroid, bisector, mom, lom, som, wtaver, wtsum |
true on success, otherwise return false Set a crisp value of the input with the specified tag.
| [in] | t | The input tag |
| [in] | value | The crisp value to set |
true on success, otherwise return false.
|
noexcept |
Set parameters of the FIS instance.
| [in] | p | The requested parameter to change/set. |
| [in] | x | The value of the parameter to set. |
true on success, otherwise return false.
|
noexcept |
Set weights to the rules of the inference system.
| [in] | rWeights | An array with the values of every rule weight; |
true on success, otherwise return false.
|
noexcept |
Setup and initialize the FIS instance.
| [in] | t | Type of inference Mamdani, Sugeno or Tsukamoto. |
| [in] | inputs | An array with all the system inputs as fis::input objects. |
| [in] | ni | The number of elements in the inputs array. |
| [in] | outputs | An array with all the system outputs as fis::output objects. |
| [in] | no | The number of elements in the outputs array. |
| [in] | mf_inputs | An array with all the membership functions related to the inputs. This should be an array of fis::mf objects. |
| [in] | nmi | The number of elements in the mf_inputs array. |
| [in] | mf_outputs | An array with all the membership functions related to the outputs. This should be an array of fis::mf objects. |
| [in] | nmo | The number of elements in the mf_outputs array. |
| [in] | r | The rules set. |
| [in] | n | Number of rules |
| [in] | rWeights | An array of size n were the rule strengths will be stored. |
true on success, otherwise return false.
|
inlinenoexcept |
Setup and initialize the FIS instance.
| [in] | t | Type of inference Mamdani, Sugeno or Tsukamoto. |
| [in] | inputs | An array with all the system inputs as fis::input objects. |
| [in] | outputs | An array with all the system outputs as fis::output objects. |
| [in] | mf_inputs | An array with all the membership functions related to the inputs. This should be an array of fis::mf objects. |
| [in] | mf_outputs | An array with all the membership functions related to the outputs. This should be an array of fis::mf objects. |
| [in] | r | The rules set. |
| [in] | rWeights | An array of size n were the rule strengths will be stored. |
true on success, otherwise return false. Setup the input with the specified tag and set limits for it.
| [in] | t | The input tag |
| [in] | Min | Minimum allowed value for this input |
| [in] | Max | Max allowed value for this input |
true on success, otherwise return false.
|
inlinenoexcept |
Setup the input tag and points for the specified membership function.
| [in] | io | The input tag related with this membership function |
| [in] | mf | The user-defined tag for this membership function |
| [in] | s | The wanted shape/form for this membership function, can be one of the following: trimf, trapmf, gbellmf, gaussmf, gauss2mf, sigmf, dsigmf, psigmf, pimf, smf, zmf, singletonmf, concavemf, spikemf, linsmf, linzmf, rectmf, cosmf. |
| [in] | cp | Points or coefficients of the membership function. |
| [in] | h | Height of the membership function. |
true on success, otherwise return false.
|
inlinenoexcept |
Setup the input tag and points for the specified membership function.
| [in] | io | The input tag related with this membership function |
| [in] | mf | The user-defined tag for this membership function |
| [in] | customMfs | Custom user-defined membership function. |
| [in] | cp | Points or coefficients of the membership function. |
| [in] | h | Height of the membership function. |
true on success, otherwise return false. Setup the output with the specified tag and set limits for it.
| [in] | t | The output tag |
| [in] | Min | Minimum allowed value for this output |
| [in] | Max | Max allowed value for this output |
true on success, otherwise return false.
|
inlinenoexcept |
Setup the output tag and points for the specified membership function.
| [in] | io | The output tag related with this membership function |
| [in] | mf | The user-defined tag for this membership function |
| [in] | s | The wanted shape/form for this membership function, can be one of the following: trimf, trapmf, gbellmf, gaussmf, gauss2mf, sigmf, dsigmf, psigmf, pimf, smf, zmf, singletonmf, concavemf, spikemf, linsmf, linzmf, rectmf, cosmf. |
| [in] | cp | Points or coefficients of the membership function. |
| [in] | h | Height of the membership function. |
true on success, otherwise return false.
|
inlinenoexcept |
Set the output tag and points for the specified membership function.
| [in] | io | The output tag related with this membership function |
| [in] | mf | The user-defined tag for this membership function |
| [in] | customMfs | Custom user-defined membership function. |
| [in] | cp | Points or coefficients of the membership function. |
| [in] | h | Height of the membership function. |
true on success, otherwise return false.