using multi-valued logic implications in a mamdani ... - Semantic Scholar

12 downloads 0 Views 148KB Size Report
sometimes a disadvantage since some defuzzification strategies, such as the well-known Centre of Gravity (COG) [2], might fail, because of the non zero area ...
USING MULTI-VALUED LOGIC IMPLICATIONS IN A MAMDANI-TYPE FUZZY CONTROLLER Mariagrazia Dotoli DEE - Politecnico di Bari Phone: +39 80 5460 312 Fax: +39 80 5460 410 E-Mail: [email protected] Abstract: In this paper we present a study on inference in a Fuzzy Logic Controller (FLC). Many different implication operators have been proposed in the Fuzzy Logic literature; we take into account five of them that have already been used in fuzzy control. In order to evaluate the advantages and disadvantages of each implication in practical applications, we consider the controller's defuzzified output that is applied to a deterministic plant. We focus on four of the so-called multi-valued logic implications, often viewed in literature as not suitable for control applications, as they produce a bias in the final fuzzy set to defuzzify of a Mamdani-type fuzzy controller. We show that their use is on the contrary feasible when a particular partition of the input universe of discourse is performed: the deformation does no longer affect the output and we can thus benefit by the lower sensitivity that a FLC performing these implications possesses. 1. Introduction During the past two decades fuzzy reasoning has proven to be a valid tool for automatic control. The key point of this technique is, in our opinion, the design methodology of the fuzzy controller, that has being following, up to now, two main research trends: the Sugeno and the Mamdani style fuzzy control. We focus on the latter of these approaches, particularly on one of its main features, that is the flexibility in choosing the controller components such as membership functions, conjunction and aggregation connectives, and defuzzification procedures. In particular, among the many operators in such systems, the one performing the logic implication needs to be chosen. In the past years, however, the so-called Mamdani implication or minimum operator has often been preferred, thus ending up by loosing one of the flexibility features in such controllers. In the following we show that the use of four of the so-called multi-valued logic implications, often viewed in literature as not suitable for control tasks [4, 9, 10], is on the contrary feasible when a particular partition of the input universe of discourse is performed. In order to achieve this goal, we take into account a reference controller employing the Mamdani implication and four more, each using a particular multi-valued logic implication. The use of such implications is proven to be effective by showing that their defuzzification results are consistent with those obtained in Name Truth Value the reference controller, even when three different Mamdani min (f A (x ), f B (y)) defuzzification strategies are available. Kleene-Dienes max (1 − f A (x), f B (y )) Lukasiewicz Reichenbach

min (1 − f A (x ) + f B (y),1)

1 − f A (x) + f A (x ) ⋅ f B (y )

(

2. Logic implication operators

)

Among the many operators used in fuzzy controllers, the one performing the logic implication must be chosen. In the past years the minimum operator or Mamdani implication Tab. 1: Various operators for fuzzy logic has been almost the only implication, together with the implication product or Larsen operator, used in control applications. The use of such an operator is intuitively justified by its characteristic clipping effect, that is its tendency to limiting the consequence membership function with the truth value of the antecedent. This operator, however, does not uphold classical logic, i. e. it is in no agreement with the classic binary interpretation of implication. As a matter of fact, many other definitions of fuzzy implications can be found in literature. In the following we consider, besides the minimum, four of them, all reported in table 1: the Kleene-Dienes (kd), Lukasiewicz (luk), Reichenbach (re) and Wilmott (wi) implications. All these have in common the feature of generalising classic logic, since they all derive from implications in multi-valued logic, and for this reason they seem to be more natural implication operators than the minimum. All these operators, in fact, derive by equivalencies of the classic (binary) implication. On the one hand, the Kleene-Dienes and Lukasiewicz implications are both defined on the basis of the equivalence a → b ≡ ¬a ∨ b , and differ in the fact that Kleene-Dienes takes the maximum to represent the logic or, Wilmott

max 1 − f A (x),min (f A (x ), f B (y))

whereas Lukasiewicz uses the bounded sum. On the other hand, Reichenbach and Wilmott implications both derive from the equivalence a → b ≡ ¬a ∨ (a ∧ b) , and differ in the fact that Reichenbach takes the bounded sum to represent the logic or, whereas Wilmott uses the maximum. The former couple of implications belongs to the class of the socalled S-implications, the latter to the one of the QL-implications (implications deriving from quantum logic) [5, 6]. Let us also remark that the Mamdani implication requires the use of an Also operator of the union type to aggregate the rules results, that is a t-conorm (usually the maximum), whereas S-implications and QL-implications require an intersection-like aggregation, since each non active rule defines an output membership function equal to one in the whole universe of discourse [1, 2]. Rule: if the surface is big then the price is important

1

fA

premise

fB

consequent

ε

Observation: the surface is 87 m2 80 90

f B'

Mamdani

surface

fB'

Kleene-Dienes

price Lukasiewicz

ε

1−ε

ε fB'

f B'

Reichenbach ε

ε

ε

Wilmott

Fig. 1: Shape of the conclusion with Mamdani and the four multi-valued logic implications

These four implications based on multi-valued logic have one further characteristic in common, that is the fact that they produce the same kind of deformation on the conclusive fuzzy set to defuzzify. This has, in fact, a bias, also referred to as plateau in literature, i. e. its membership function has a non zero minimum; this occurs even if the rules of the controller have a rule premise with no bias, as can be checked in the simple example of figure 1. The example illustrates the characteristics of such implications compared with the behaviour of the minimum when the Generalized Modus Ponens for a single rule is applied: the former implications lead to a fuzzy set affected by a bias, whereas the Mamdani conclusion is exempt from this feature. In other words, with the four multi-valued logic implications in table 1 the consequent fuzzy set has a minimum membership value equal to the complement to one of the minimum membership grade of the measured inputs: the output fuzzy set has therefore a constant value in the majority of its universe and only a small bump located within the supports of the consequents of the active rules. This feature is sometimes a disadvantage since some defuzzification strategies, such as the well-known Centre of Gravity (COG) [2], might fail, because of the non zero area subtended by the bias: the location of the bump has little influence on the defuzzification value, which tends to be driven towards the centre of the domain. In that case we are forced to use a more selective defuzzification strategy as a makeshift, such as for instance the Mean of Maxima (MOM) method [2]; unfortunately such procedures, even though computationally more efficient, are not always reliable, since they do not take into account every information available from the system and, additionally, lead to undesired discontinuities in the controller output. For these reasons these multi-valued logic implications have often been judged as unsuitable for control applications [4, 9, 10]. Even though causing the drawback explained above, these four implications are to be viewed as important in control tasks, since, as proven in [3], they allow a reduction in the sensitivity of the controller. More in detail, the KleeneDienes and Wilmott operators allow a reduction in the controller sensitivity with respect to a decrease in the specificity of the premises in the control algorithms, whereas the Lukasiewicz and Reichenbach operators reduce the sensitivity to the variation of the modal values in the premises [3]. This feature is obviously important in control applications, since it is necessary to know what kind of reactions could such a system have in front of noise or temporal derives. The four multi-valued logic implications in table 1 are therefore valuable from the point of view of the controller sensitivity, but unsuitable for control because of the bias affecting the output fuzzy set. To avoid this disadvantage, two approaches are feasible. The first approach consists in the use of a defuzzification method able to filter out the 'undesired' grades of membership, thus discriminating the output membership values that are lower than a certain threshold: the bias due to the implication is thus removed. We could for instance use the so called ICOG or Indexed Centre of Gravity [8], that computes the centre of gravity of the intersection of the fuzzy set resulting from inference and its α-cut, where α is the threshold itself. This approach, winning at first sight, proves to be problematic if examined more carefully: the definition of the threshold is not evident, since it depends on the system under study, more precisely on the premise and consequent membership functions, and, above all, on the input measured value, that is in no way predictable in a real system. The second feasible approach, the one we view as the best, consists of removing a priori, structurally, the bias in the output fuzzy set, that is in having a fuzzy set resulting from inference not affected by a plateau. This can be achieved

by means of a particular design of the fuzzy controller, thus taking advantage of the flexibility of such systems. In [7] Foulloy suggests how to remove the plateau when the Kleene-Dienes implication is employed: it is sufficient to use trapezoidal input membership functions with no bias and complete overlapping (the smaller bases of the trapezoids should at least be adjacent); as for the output membership functions, it is sufficient for them to have no plateau, no matter what their shape is. In the following we show how and why what is suggested in [7] is true when the rule table is complete, not only with regard to the Kleene-Dienes operator, but also when the Lukasiewicz, Reichenbach or Wilmott implications are used.

3. The controller In this paper we are not dealing with a prospective excellence of fuzzy control over the so-called classic control techniques, but with its feasibility when using some particular implication operators. We focus, in fact, on a drawback that some implications cause in the controller, particularly in the inference engine, not in the plant. For this reason we study the behaviour of the controller, not the plant's dynamic. We refer to a well-known Mamdani controller, the PIlike controller, with one output y (the change of control action cu) and two measured inputs x1=e e x2=ce, the two observations error and change of error. The cases we are considering are not, however, limited to two inputs: they are generalisable and not specific to applications with two inputs. The conjunction operator * we employ is a t-norm, i. e. the minimum. The controller has a rule table made of twenty-five rules Ri 'If (x1 is A1i and x2 is A2i) then y is Bi'. This rule table is complete, that is it corresponds to a matrix in which every element is defined, as can be checked in Table 2. E \CE

NB

NS

ZE

PS

PB

NB

NB

NB

NB

NS

ZE

NS

NB

NB

NS

ZE

PS

ZE

NB

NS

ZE

PS

PB

PS

NS

ZE

PS

PB

PB

PB

ZE

PS

PB

PB

PB

Tab. 2: Rule table

The implication is in turn one among those listed in table 1. The aggregation operator is, accordingly, the maximum when the Mamdani implication is employed and the minimum with the other four implications. As a reference controller we use the one with the Mamdani implication and the maximum performing the Also operator; in addition to that, we consider four more controllers, each employing one of the multi-valued logic implications listed before, with the minimum performing the Also. For each of these controllers we took into account two different partitions of the universes of discourse, one with triangular membership functions and the other with trapezoidal ones. We focus on piece wise linear membership functions since they are the simplest and the least sensitive to a change in measurement [11]. In both cases the fuzzy sets employed are symmetric and keep the same support. The modal value is the centre of the support in the case of triangular membership functions, whereas the kernel of the trapezoidal membership functions is obtained enlarging such modal value up to an interval, in order to end up with a complete overlap of the trapezoids (fig. 3). The input and output membership functions have, moreover, no plateau, i. e. they have a null minimum. In this case, in fact, figure 1 shows that the four multi-valued logic implications yield a bias. Finally, the available defuzzification strategies are the COG, MOM and Bisector methods [2]. NS

ZE

PS

NB

PB

1

0.8

0.8

Degree of membership

Degree of membership

NB

1

0.6

0.4

ZE

PS

PB

0.6

0.4

0.2

0.2

0

0 -3

NS

-2

-1 0 1 error / change of error / change of output

2

3

-3

-2

-1 0 1 error / change of error / change of output

Fig. 3: Input and output membership functions with triangular and trapezoidal partitions

2

3

4. Experimental results In order to simulate the fuzzy controller outlined previously we use the Matlab 4.2c.1 software package with Fuzzy Logic Toolbox. Table 3 reports the deterministic value of the output (the change of control action) in dependence of the defuzzification method. We focus on the well-known Centre of Gravity (COG), Mean of Maxima (MOM) and Bisector defuzzification procedures [2]. They perform the calculation of the controller output respectively as the centroid of the output fuzzy set, the mean of the maximum values of its membership function and the bisector of the area subtended by this set. With triangular membership functions the Mamdani implication provides an output that remains approximately the same with these three defuzzification strategies, whereas with our four multi-valued logic implications only the MOM procedure leads to a deterministic value of the output that is consistent with the values obtained with the minimum implication. As remarked in [4, 9, 10], using the COG or Bisector methods with triangular membership functions the output value tends to the centre of the output universe of discourse (i. e. zero), thus leading to very little control action. This is due to the presence of the plateau in the output membership functions, that does not possess any legitimate rule information: the MOM, on the contrary, does not take into account this feature, and unlike the other two defuzzification methods is not affected by the bias. Therefore, on the one hand only the MOM is suitable with these implications, but, on the other hand, it usually leads to undesired discontinuities in the controller output. These discontinuities cause the controller output to change step-wise, which results in a 'nervous' dynamical behaviour of the controller, and, more important, in oscillations in the control signal. If overlapping trapezoidal membership functions are used, then all these problems are overcome. The plateau is a priori removed: the bias does not occur in the output fuzzy set when using one of the four multi-valued logic implications, in such a way that the deterministic value of the output is consistent in every controller (fig. 4); moreover, these values are also consistent with the ones obtained with the Mamdani implication and the triangular membership functions, as can be easily checked by looking at table 3, in which some comparisons are performed with four different measured inputs. 1

1

0.9

0.9

0.8

0.8

0.7

0.7

0.6

0.6

0.5

0.5

0.4

0.4

0.3 0.2

0

mom

0.1

centroid -2

bisector

0.2

mom

0.1 0

0.3

bisector

2

0

centroid -2

0

2

Fig. 4: Defuzzification with Kleene-Dienes implication when (e,ce)=(0.00, 0.05) with triangular membership functions (bias) and trapezoidal ones (no bias)

5. Conclusions We have proven that the use of four multi-valued logic implications is feasible in a Mamdani-type fuzzy controller: it is sufficient to remove a priori the bias they usually cause in the output fuzzy set to defuzzify. This is achieved by using a fuzzy controller with overlapping trapezoidal input membership functions with a zero minimum and a complete rule table. When this framework is accomplished, no plateau affects the output fuzzy set and COG, MOM and Bisector defuzzifications can equally be applied. To display such a behaviour, we compare several controllers, each employing a different multi-valued logic implication, with a reference controller performing the classic minimum implication. The comparison was made with two different partitions of the input domain, one triangular and one trapezoidal with complete overlapping. With the latter, no bias affects the output membership function, in such a way that the deterministic value of the output is also independent from the defuzzification procedure and from the implication used: all results are consistent with those obtained from the reference controller.

Tab. 3: Deterministic value of the output (change of control action) INPUTS

triangular membership functions

E

CE

COG

MOM

Bisector

0.50 0.50 0.50 0.50 0.50 0.00 0.00 0.00 0.00 0.00 1.50 1.50 1.50 1.50 1.50 2.00 2.00 2.00 2.00 2.00

-3.00 -3.00 -3.00 -3.00 -3.00 0.50 0.50 0.50 0.50 0.50 0.00 0.00 0.00 0.00 0.00 1.50 1.50 1.50 1.50 1.50

-1.00 -0.08 -0.20 -0.14 0.00 0.50 0.00 0.04 0.02 0.00 1.00 0.08 0.20 0.14 0.00 2.13 0.41 0.48 0.45 0.00

-1.02 -1.02 -1.02 -1.02 0.00 0.51 0.00 0.48 0.48 0.00 1.02 1.02 1.02 1.02 0.00 2.28 2.52 2.28 2.52 0.00

-1.02 -0.24 -0.48 -0.42 0.00 0.48 0.00 0.18 0.12 0.00 1.02 0.24 0.48 0.42 0.00 2.16 0.66 0.90 0.78 0.00

min kd luk re wi min kd luk re wi min kd luk re wi min kd luk re wi

trapezoidal membership functions COG

MOM

Bisector

-1.00 -1.00 -1.00 -1.00 -1.00 0.50 0.50 0.50 0.50 0.50 1.00 1.00 1.00 1.00 1.00 2.13 2.13 2.13 2.13 2.13

-1.02 -1.02 -1.02 -1.02 -1.02 0.51 0.48 0.48 0.48 0.48 1.02 1.02 1.02 1.02 1.02 2.28 2.28 2.28 2.28 2.28

-1.00 -1.00 -1.00 -1.00 -1.00 0.48 0.48 0.48 0.48 0.48 1.02 1.02 1.02 1.02 1.02 2.16 2.16 2.16 2.16 2.16

min kd luk re wi min kd luk re wi min kd luk re wi min kd luk re wi

Acknowledgments The author would like to express her gratitude for the invaluable guidance of Prof. Bernadette Bouchon-Meunier from the Laforia Laboratory, Paris VI University, France, and of Prof. Bruno Maione from the DEE Department, Polytechnic of Bari, Italy.

References [1] B. Bouchon-Meunier, "Various logical approaches in fuzzy control", in Actes de la Journée Nationale de la Commande Floue, Paris, 1991. [2] B. Bouchon-Meunier, La logique floue, Que sais-je?, Presses Universitaires de France, 1993. [3] B. Bouchon-Meunier, F. Gouyou, "Some elements on sensitivity of fuzzy controllers", in Proceedings of the 4th FUZZ-IEEE International Conference on Fuzzy Systems, Yokohama, 1995. [4] E. Van Den Brink, J. G. M. M. Smiths, "On implications and defuzzification methods in a fuzzy logic controller", in Proceedings of the 3rd European Congress on Intelligent Techniques and Soft Computing EUFIT, Aachen, 1995. [5] D. Dubois, H. Prade, "Fuzzy sets in approximate reasoning, Part 1: Inference with possibility distributions", Fuzzy Sets and Systems, vol. 40, 1991. [6] J. C. Fodor, "A new look at fuzzy connectives", Fuzzy Sets and Systems, vol. 57, 1993. [7] L. Foulloy, "Fuzzy sensors for fuzzy control", in Proceedings of the 4th IPMU International Conference, Mallorca, 1992. [8] R. Jager, Fuzzy Logic in Control, PhD Thesis, Delft Technical University, Delft, 1995. [9] E. Lembessis, R. Tanscheit, "The influence of implication operators and defuzzification methods on the deterministic output of a fuzzy rule-based controller", in Proceedings of the fifth IFSA congress on Fuzzy Systems, Bruxelles, 1991. [10] M. Mizumoto, "Fuzzy Controls Under Various Fuzzy Reasoning Methods", Information Sciences, vol. 45, 1995. [11] H. T. Nguyen, V. Kreinovich, D. Tolbert, "A Measure of Average Sensitivity for Fuzzy Logics", International Journal of Uncertainty, Fuzziness and Knowledge-Based Systems, vol. 2, n. 4, 1994.

Suggest Documents