FIS structure

The FIS handled by the function library are MIMO type FIS, Multiple Input Multiple Output. The FIS is built by using the information of the configuration file. The basic module contains two main functions, defined within the FIS class: Infer and Performance.

The Infer function infers a value for each active output from the input values. Fuzzy inference obeys the following steps:

- Fuzzification: done within the INPUT class. For a given input value, the GetDegs function fills the Mfdeg array with the membership values to each input fuzzy set. This array is public.
- Inference: Each rule conclusion is weighted with the item matching degree for the rule. The rules have the following structure (for a two input one output FIS):
IF Input 1 is MF 2 AND Input 2 is MF 1 THEN Output 1 is Value 1

(crisp output)

IF Input 1 is MF 1 AND Input 2 is MF 1 THEN Output 1 is MF 2

(fuzzy output)

The ExecRule function of the RULE class calculates the matching degree of the item to the rule, also called rule weight. The calculation is done within the PREMISE class. It uses a conjunction operator between the fuzzy sets in the rule premises for the input variables (Input 1 and Input 2). These fuzzy sets are described by the number 2 and number 1 membership functions for the first rule, 1 and 1 membership functions for the second one). The PREMISE class includes a pointer on the input variable array, which gives it access to the Mfdeg field for each input. The rule matching degree is stored in the public variable Weight within the RULE class. When expert weigts are set (see section FIS menu- Rule window), the rule matching degree is multiplied by the expert weight. - Inferred value computation:
This computation is handled by FISOUT class. It consists of two main steps.
- Rule aggregation: Once all the rules have been fired, two options are available to aggregate the rule conclusions: max or sum.
The rule conclusions are numerical values for a crisp output, or MF labels for a fuzzy output. They constitute a set of possible values.

The resulting levels are stored into the MuInfer array, the RuleInfer one contains the number of the rule corresponding to the maximum, in case of max aggregation, or the last rule number whose degree has been added, in the sum aggregation case. Both operators can be used with crisp or fuzzy output.

Note :

the number of fuzzy rules, the rule matching degree for the multidimensional vector .

the number of output MFs (fuzzy output) or the number of distinct rule conclusion values (crisp output).

the conclusion of the rule.

The activation levels after aggregation are the following:

- max:

- sum:
- crisp output

- fuzzy output

- crisp output

- max:
- Defuzzification: This operation uses aggregation results.
The inferred value,
for the example, depends on the output nature and its defuzzification operators.
- crisp output
- sugeno operator

- max crisp operator

- sugeno operator
- fuzzy output
Figure 5 illustrates the defuzzification possibilities for a fuzzy output.

- weighted area
This operator favors the interpolation between linguistic labels. The inferred output is:

where is the number of MFs in the partition, is the activation level for the MF, is the centroid abscissa of , and a new MF, defined from as follows: - average of maxima
The output is
(figure 5). Only the segment corresponding to the maximum activation level is considered, which means the operator mainly operates within one linguistic label.
- sugeno
It is the same formula as for a crisp output (equation 2), but now represents the middle of the MF kernel.

- weighted area
This operator favors the interpolation between linguistic labels. The inferred output is:

- crisp output

- Rule aggregation: Once all the rules have been fired, two options are available to aggregate the rule conclusions: max or sum.

Implication operators

For implicative outputs, three implication operators are available :

- Resher-Gaines :
- Goguen :
- Gödel :

The inference result is a possibility distribution, which may be defuzzified. In the current implementation, no choice is available for the defuzzification operator. The default one is the Mean of maxima, which corresponds to the middle of the distribution kernel.