Inference means to reach a particular conclusion based on some evidence associated with a logic

In 1975, Professor Ebrahim Mamdani of London University built one of the first fuzzy systems to control a steam engine and boiler combination.

He applied a set of fuzzy rules supplied by experienced human operators.

Mamdani fuzzy inference system operates as follow:

1. Determining a set of fuzzy rules
2. Fuzzifying the inputs using the input membership functions
3. Combining the fuzzified inputs according to the fuzzy rules to establish a rule strength (Fuzzy Operations)
4. Finding the consequence of the rule by combining the rule strength and the output membership function (implication)
5. Combining the consequences to get an output distribution (aggregation)
6. Defuzzifying the output distribution (this step is only if a crisp output (class) is needed).

There are two types of mamdani fuzzy inference system:

1. Max-Min inference method
2. Max-Product inference method

## Max-Min Inference Method:

Consider following rules:

Rule 1: IF x1 is A11 and x2 is A21 THEN y1 is B1

Rule 2: IF x1 is A12 and x2 is A22 THEN y2 is B2

let us compute the output for x1 = 2.5 and x2 = 3

Membership functions for given rules are shown below:

Fuzzy value corresponding to x1 and x2 in both input fuzzy sets is shown in the following figure. Its corresponding membership in output function is also depicted. As it is Max-Min inference method, highest membership value from two input sets is assigned to corresponding output set.

Calculation of fuzzified value for input crisp value is discussed in later half of this article.

For first rule, the fuzzy membership value for x1 would be 0.8 and for x2 it would be 0.4. The connectives in first IF-THEN rule are connected using and connective. So we have to take intersection of fuzzy values, which returns minimum of them. So the output y1 will have membership 0.4 in fuzzy output set B1.

For second rule, the fuzzy membership value for x1 would be 0.3 and for x2 it would be 0.7. The connectives in first IF-THEN rule are connected using or connective. So we have to take union of fuzzy values, which returns maximum of them. So the output y2 will have membership 0.7 in fuzzy output set B2.

To compute the final crisp output, we shall aggregate the fuzzy output functions as shown in figure.

We can apply any defuzzification technique as discussed earlier to find the final crisp output for give case.

## Max-Product Inference Method

We will consider the same inputs we used in max-min inference system. In max-product inference method, the output function is scaled down to assigned fuzzy output value, rather than simply clipping the output function as discussed. Rest of the procedures is identical to max-min inference method

The mapping of assigned fuzzy value to output function and the scaling of output fuzzy function is described in following figure.