• No se han encontrado resultados

LIDILE: EFICIENCIA TERMINAL

4.3 Perfil de egreso

Fuzzy inference is the process where fuzzy logic is used to map a given input to an output. The mapping is done based on expert knowledge of the system from which decisions can be made. The three main types of fuzzy inference methods are the Sugeno fuzzy inference, Mamdani fuzzy inference, and Tsukamoto fuzzy inference. Mamdani fuzzy inference is the most common fuzzy model used today. Its process can be performed in six main steps: Step 1: Formation of fuzzy rules

Step 2: Fuzzification of input variables Step 3: Application of fuzzy operator Step 4: Implication

Step 5: Aggregation Step 6: Defuzzification

3.3.4.1 Formation of fuzzy rules

Fuzzy logic tries to mimic human control logic by using descriptive language in its operations just like human operators. Rule-based expert systems translate expert knowledge written in natural language into fuzzy rules. Instead of mathematically modelling complex data, they use rules with simple statements made up of words such as ‘IF’, ‘AND’ and ‘THEN’. These rules are expressed in syntax such as:

IF ‘x is A’ AND ‘y is B’ THEN ‘z is C’

The expressions ‘x is A’ and ‘y is B’ are known as the antecedents, whereas the expression ‘z is C’ is known as the consequent. The input variables are x and y, and the output variable is z. A, B and C are the linguistic values. Each linguistic value is defined by a membership function in the universe of discourse. Some examples of fuzzy rules are:

78

If temperature is COLD then turn heating on HIGH. If temperature is LOW then turn heating on OFF. 3.3.4.2 Fuzzification of input variables

Fuzziffication is the process of transforming crisp numeric input values into fuzzy values of appropriate fuzzy sets through membership functions. An output fuzzified value between 0 and 1 is returned irrespective of the value of the crisp input variable. Figure 3.18 shows a membership function curve, µ(x), which describes the fuzzy set ‘temperature

is cosy’. After fuzzyfying the crisp value of temperature at 27 ºC, a value of 0.66 was obtained.

Figure 3.18 Fuzzification of input variable temperature

3.3.4.3 Application of fuzzy operator

If the antecedent of the fuzzy rule has more than one linguistic set, the fuzzy operator AND or OR is used to combine the fuzzy membership values. The fuzzy linguistic sets, “temperature is cosy” and “humidity is high” will be used to demonstrate the application of the fuzzy operator AND. Figure 3.19 shows membership function curves, µ(x) and µ(y), which describes the input variables temperature and humidity, respectively. The linguistic sets “temperature is cosy” and “humidity is high” gave results of 0.66 and 0.34, respectively after fuzzification. Applying the AND operator defined in Eqn.3.30, the value 0.34 is selected as the antecedents of the fuzzy rule.

79 Figure 3.19 Illustration of the fuzzy operator AND

3.3.4.4 Application of the Mamdaniminimum implication method

The Mamdani minimum implication method specifies how the membership function of the output linguistic variable is truncated. The AND or OR operator can be used in the implication process depending on the logic required to solve the problem. Figure 3.20 illustrates how the AND operator was used to truncate the output linguistic variable ‘climate’. Using the AND operator defined in Eqn.3.30, the output linguistic variable is truncated where the fuzzified value is minimum (µ(z)=0.34).

Figure 3.20 Illustration of the implication method

3.3.4.5 Aggregation

Figure 3.21 shows a diagram to illustrate the Mamdani inference system process. From the figure, membership function curves µ(x), µ(y), and µ(z) are used to describe the input variables temperature, humidity, and climate, respectively. The fuzzy rules, “If temperature is not cosy then climate is harsh”, “If temperature is cosy AND humidity is high then climate is liveable”, and “If temperature is cosy AND humidity is LOW then climate is comfortable” will be used to demonstrate the aggregation method. The process

80

of combining the output sets of each of the rules into the single fuzzy set is known as aggregation. Depending on the logic required to solve a given problem, the ‘max’, ‘sum’, or ‘probabilistic or’ function can be applied in the aggregation process. In this example, the ‘max’ function was used for illustration. The aggregated output set is the union (sum) of the output sets of each of the rules. The aggregated output set was obtained using Eqn. 3.31.

81 3.3.4.6 Defuzzification

Defuzzification is the final step of the FIS process. It is the process of converting the aggregated fuzzy output sets into a crisp value. There are several ways a fuzzy output can be defuzzified to a crisp value. The appropriate method of difuzzification to choose depends on a number of factors, including computational efficiency, shape of membership functions and the type of model being developed. For example, the centroid method will be more appropriate to use in quantitative models (van Leekwijck & Kerre, 1999), whereas the middle of maximum (MOM) will be more appropriate in qualitative models (Saletic, Velasevic, & Mastorakis, 2002). Other methods of defuzzification include the weighted average, bisector, smallest of maximum (SOMax), and largest of maximum (LOM) method.

In the weighted average method of defuzzification, each membership function in the output is weighted by its respective membership values. This method is frequently used in fuzzy applications because it is computationally fast. However, it has the disadvantage of not being able to process asymmetrical membership functions. This method can be mathematically expressed as:

𝑧∗ = ∑ 𝜇𝐶(𝑧̅). 𝑧̅

∑ 𝜇𝐶(𝑧̅)

(3.44)

where 𝑧̅ = the centroid of each of the symmetrical membership functions; Σ = the algebraic summation; and z* = defuzzified crisp value.

The bisector method of defuzzification divides the output aggregated membership function into two equal areas. The vertical line that divides the membership function into two equal areas corresponds to the deffuzzified crisp value. The bisector method sometimes gives the same results as the centroid method. This method of defuzzification is computationally fast and gives good results in fuzzy sets with symmetrical membership functions. However, it gives inaccurate results in fuzzy sets with asymmetrical membership functions (Ginart, Sanchez, Links, & Back, 2002).

MOM method of defuzzification, also known as the mean of maximum, takes the means of the points where the membership functions are at their maximum. This method is

82

computationally efficient. The SOMax method of defuzzification takes the smallest of the points (i.e. the leftmost point) where the membership functions are at maximum. The LOM method of defuzzification takes the largest of the points (i.e. the rightmost point) where the membership functions are at maximum.

The centroid method, which is also known as the centre of gravity (CoG) method, which is the most common technique of defuzzification, was developed by (Sugeno, 1985). The CoG method was used to defuzzify the aggregated fuzzy output sets as shown in Fig. 3.21. It computes a crisp value representing the centre of gravity of the aggregated fuzzy output sets. It can be mathematically expressed as Eqn. 3.45. A crisp defuzzified crisp value of 5.52 was obtained after using the CoG method. This indicates that when temperature is 27 ºC and humidity is 70 %, then climate is liveable.

𝑧∗= ∫ 𝜇𝐶(𝑧). 𝑧d𝑧 ∫ 𝜇𝐶(𝑧)d𝑧

(3.45)

where z* = the defuzzified crisp value which is the vertical line through the centre of gravity.