27-10-2016, 11:16 AM
1461600334-fuzzylogic.docx (Size: 1.05 MB / Downloads: 5)
Introduction
Fuzzy logic is an extension of Boolean logic by Lot Zadeh in 1965 based on the mathematical theory of fuzzy sets, which is a generalization of the classical set theory. By introducing the notion of degree in the veri cation of a condition, thus enabling a condition to be in a state other than true or false, fuzzy logic provides a very valuable exibility for reasoning, which makes it possible to take into account inaccuracies and uncertainties.
One advantage of fuzzy logic in order to formalize human reasoning is that the rules are set in natural language. For example, here are some rules of conduct that a driver follows, assuming that he does not want to lose his driver's licence:
Intuitively, it thus seems that the input variables like in this example are approximately appreciated by the brain, such as the degree of veri cation of a condition in fuzzy logic.
To exemplify each de nition of fuzzy logic, we develop throughout this introductory course a fuzzy inference system whose speci c objective is to decide the amount of
1
Page 2 of 20
a tip at the end of a meal in a restaurant, depending on the quality of service and the quality of the food.
1.1 Set theory refresher
A set is a Many that allows itself to be thought of as a One. Georg
Cantor.
To begin with, a quick refresher on the classical sets can be useful if you haven't dealt with them for long time.
The classical set theory simply designates the branch of mathematics that studies sets. For example, 5, 10, 7, 6, 9 is a set of integers. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 is the set of integers between 0 and 10. 's' 'd'; 'z', 'a' is a set of characters. "Site", "of", "zero" is a set of words. We can also create sets of functions, assumptions, de nitions, sets of individuals (that is to say, a population), etc. and even sets of sets!
Note that in a set, the order does not matter: 7, 6, 9 denotes the same set as 9, 7, 6. However, to improve readability, it is convenient to classify the elements in ascending order, ie 6, 7, 9. Usually, a set is denoted by a capital letter: thus, we write A = 6, 7, 9. The empty set is denoted ;: it is a remarkable since it contains no element. This seems unnecessary at rst glance, but in fact, we will often use it.
The concept of belonging is important in set theory: it refers to the fact that an element is part of a set or not. For example, the integer 7 belongs to the set 6, 7, 9. In contrast, the integer 5 does not belong to the set 6, 7, 9. Membership is
Page 3 of 20
symbolized by the character in the non-membership and by the same symbol, but barred ossible. Thus, we have 7 2 f6; 7; 9g and 5 2= f6; 7; 9g.
A membership function (also called indicator function or characteristic function) is a function that explicit membership or not a set E. Let f be the characteristic function of the set E = f6; 7; 9g, and x is any integer:
TODO Math formula
This concept of membership is very important for this course because fuzzy logic is based on the concept of fuzzy membership. This simply means that we can belong to a set to 0.8, in contrast to classical set theory where as we have just seen membership is either 0 (not owned) or 1 (part).
In order to manipulate classical ensembles and make something interesting, we de ne a set of operations, which are very intuitive.
Fuzzy logic
As complexity rises, precise statements lose meaning and meaningful statements lose precision. Albert Einstein.
2.1 Fuzzy sets
Fuzzy logic is based on the theory of fuzzy sets, which is a generalization of the classical set theory. Saying that the theory of fuzzy sets is a generalization of the classical set theory means that the latter is a special case of fuzzy sets theory. To make a metaphor in set theory speaking, the classical set theory is a subset of the theory of fuzzy sets, as gure 2.1 illustrates.
2.2 The linguistic variables
The concept of membership function discussed above allows us to de ne fuzzy sys-tems in natural language, as the membership function couple fuzzy logic with lin-guistic variables that we will de ne now.
De nition 7.
Let V be a variable (quality of service, tip amount, etc.), X the range of values of
Page 9 of 20
the variable and TV a nite or in nite set of fuzzy sets. A linguistic variable corresponds to the triplet (V; X; TV ).
When we de ne the fuzzy sets of linguistic variables, the goal is not to exhaustively de ne the linguistic variables. Instead, we only de ne a few fuzzy subsets that will be useful later in de nition of the rules that we apply it. This is for example the reason why we have not de ned subset "average" for the quality of the food. Indeed, this subset will not be useful in our rules. Similarly, it is also the reason why (for example) 30 is a higher tip than 25, while 25 however belongs more to the fuzzy set "high" as 30: this is due to the fact that 30 is seen not as high but very high (or exorbitant if you want to change adjective). However, we have not created of fuzzy set "very high" because we do not need it in our rules.
2.3 The fuzzy operators
In order to easily manipulate fuzzy sets, we are rede ning the operators of the classical set theory to t the speci c membership functions of fuzzy logic for values strictly between 0 and 1.
Unlike the de nitions of the properties of fuzzy sets that are always the same, the de nition of operators on fuzzy sets is chosen, like membership functions. Here are the two sets of operators for the complement (NOT), the intersection (AND) and union (OR) most commonly used:
2.4 Reasoning in fuzzy logic
In classical logic, the arguments are of the form:
(
If p then q
p true then q true
In fuzzy logic, fuzzy reasoning, also known as approximate reasoning, is based on fuzzy rules that are expressed in natural language using linguistic variables which we have given the de nition above. A fuzzy rule has the form:
If x 2 A and y 2 B then z 2 C, with A, B and C fuzzy sets.
For example:
'If (the quality of the food is delicious), then (tip is high)'.
The variable 'tip' belongs to the fuzzy set 'high' to a degree that depends on the degree of validity of the premise, i.e. the membership degree of the variable 'food quality' to the fuzzy set 'delicious '. The underlying idea is that the more propositions in premise are checked, the more the suggested output actions must be applied. To determine the degree of truth of the proposition fuzzy 'tip will be high', we must de ne the fuzzy implication.
2.6 Conclusions
In the de nitions, we have seen that the designer of a fuzzy system must make a number of important choices. These choices are based mainly on the advice of the expert or statistical analysis of past data, in particular to de ne the membership functions and the decision matrix.
Here is an overview diagram of a fuzzy system:
In our example,
• the input is 'the quality of service is rated 7.83 out of 10 and quality of food 7.32 10',