Você está na página 1de 5

An Overview of Fuzzy Logic

Yokichi Tanaka
Togai Infralogic, Inc.
5 Vanderbilt
Irvine, CA 92718
714-588-3800

INTRODUCTION
1.o
Fuzzy logic was invented by Dr. Lotfi Zadeh at the
University of California at Berkeley in 1965. In Degree of
very simple terms, fuzzy logic allows situations or Membership 0.5
problems to be described and processed in lin-
guistic terms such as hot or heavy instead of 0.0
precise numeric values such as 1 40 degrees or
5 6 7
180 kg. Because of the many advantages of
such a linguistic system, the areas of application Figure 1. Crisp set for tall
of fuzzy logic have spread from consumer elec-
tronics to industrial control, information process-
ing, financial analysis and much more in just the
1.o
past few years.
Degree of
Membership 0.5
FUZZY SETS
0.0
The basis of fuzzy logic lies in fuzzy set theory,
5 6 7
and the key component of fuzzy set theory is the
Figure 2. Fuzzy set for tall
notion of fuzzy sets. With traditional sets (or
crisp sets), a given element is either completely
in the set or is not in the set at all. With fuzzy
sets, a given element can be partially in a set. Using the crisp definition of tall, a person who is
The degree to which an element belongs to a set 59 would not be tall at all, whereas using the
is called the degree of membership (or degree of fuzzy definition, this same person would be tall to
truth) in the set or the alpha value. The following a degree of 0.375. If the degrees of membership
figures illustrate the difference between the crisp in both cases were to be described mathemati-
set tall and the fuzzy set tall. cally, for the crisp set, it would be:

Degree of Tallness = 1.O for x z 6 feet


0.0 for x < 6 feet

446
And the degree of membership for the fuzzy set
would be: John is tall AND John is old

John is tall AND Jack is NOT old


Degree of Tallness =
1.o for x 2 7 feet
(x - 5) / 2 for 7 > x z 5 feet Although, the aforementioned definitions of the
0.0 for x < 5 feet fuzzy operators have been the most widely used
and accepted, there do exist alternative defini-
tions of the fuzzy operators such as those listed
These functions that describe the degree of below.
membership in a given set are called member-
ship functions, and the process of calculating the
degrees of membership of a variable relative to aANDb = a * b
its membership functions is called the fuzzific:a- a OR b = a+b-(a*b)
tion process. Note that there is much more infor- NOT a = 1 - a
mation contained in the membership function for
the fuzzy set tall than in the membership func-
tion for the crisp set. The two identical statement
x is tall can carry different amounts of informa- FUZZY RULES
tion or significance depending on the underlying
definition of the set tall. With fuzzy logic, more
A fuzzy rule can be created by combining various
information can be stored in the same linguistic
fuzzy statements, or clauses, to form the premise
statement. When humans speak of or ponder the
and the consequence of the rule. On the surface,
concept of tall, it goes far beyond the absolute
a fuzzy rule appears no different than ordinary
height of a person. This ability of fuzzy logic to
rules. The difference arises if and when clauses
capture and convey gray levels of truth is one of
take on partial truth values.
the main advantages over conventional Boolean
logic.
IF a is red AND b is green,
THEN mixture is dark
FUZZY OPERATORS

Just as multiple traditional logic statements can In this example, a and b are input variables,
be manipulated and combined using AND, and mixture is an output variable. The above
O R , and NOT operators, so can fuzzy logic would qualify as a valid rule in both the traditional
statements. The fuzzy logic operators are com- sense as well as in the fuzzy logic sense. The
monly defined as follows. differentiating factor between the two would be
whether the sets red, green, and dark are
fuzzy sets or not. If they are fuzzy sets, then the
a AND b = min(a, b ) AND must be treated as a fuzzy operator, and
a OR b = max ( a , b ) there needs to be a way to process the THEN
NOT a = 1 - a part to a fractional degree. To illustrate this point,
the above rule will be first treated as a conven-
tional rule and then as a fuzzy rule.
It is worth noting that the above definitions are
generalized extensions of the conventional defini- Suppose a is red and b is blue.
tions, and that the set of fuzzy sets is a super-set
of the set of crisp sets. Using these definitions of Conventional
fuzzy operators, the following statements can be
evaluated in the fuzzy logic sense, also. Clearly, the statement a is red is true, and b is
green is false. Therefore, the premise is false,
447
and the consequence becomes insignificant. that under any circumstance, no multiple contra-
dicting rules are simultaneously true. However,
Fuzzv in a fuzzy logic rule base, due to the partial
degrees of truths, it is common for multiple con-
The statement a is red would be true to a tradicting rules to take on non-zero values (or to
degree very close to 1. Since blue is similar to fire). This gives rise to a need of some mecha-
green, the statement b is green would be true to nism in resolving/mediating such conflicts. The
a degree of, say, 0.5. Then, using the min func- consolidation of conflicting information is called
tion (fuzzy AND construct), the premise evaluates the output composition, and the interpretation of
to 0.5. This value, sometimes referred to as the this resultant composition is called defuzzifica-
rule alpha, is used to indicate the significance of tion.
the rule, and hence, the significance of the con-
sequence. The sequence of steps (fuzzification, rule evalua-
tion, and output composition) leading up to
With traditional logic, the rule is insignificant, defuzzification is called the fuzzy inference. Dis-
because b was not green; although, it was tinction is usually made between fuzzy inference
close to green. With fuzzy logic, the rule has 0.5 and defuzzification since various inference meth-
significance. Its consequence, mixture is dark, ods and various defuzzification methods can be
will, thus, have non-zero significance. This rule, used with each other.
although, not completely true, will still be able to
convey some information to the recipient.

In this example, the term, dark, in the conse-


quence refers to a membership function of the
output, mixture, just as red and green are
membership functions of their respective inputs.

FUZZY RULE BASE +


Defuzzification
A fuzzy rule base, sometimes referred to as the
knowledge base, is a collectiorr of fuzzy rules. A
Figure 3. Fuzzy inference and defuzzification
simple example follows.
Today, many methods exist for fuzzy inference.
IF (a is red) AND (b is green) Two of the most common are the max-min
THEN (color is brown) (tone is dark) method and the max-dot/product-summethod.
I

For these two methods, both the input fuzzifica-


IF (a is red) AND (b is orange) tion and the rule evaluation steps are identical;
THEN (color is orange) (tone is medium) the difference exists only in the output composi-
tion stage. These methods will be compared and
IF (a is green) AND (b is green)
contrasted using the following sample rule base.
THEN (color is green) (tone is medium)
IF (x is hot) AND (y is large)
THEN (z is fast)
FUZZY INFERENCE
IF (x is warm) AND (y is large)
THEN (z is slow)
A rule base usually contains some rules whose
consequences contradict each other. With tradi- IF (y is medium)
tional logic, the rule base can be designed such THEN (z is slow)
448
product-sum methods differ in that, the max-dot
Suppose that the membership functions were combines the resultant shapes via absorption
defined in such a way that the clauses evaluated while the product-sum combines via summation.
to the following.
SLOW FAST

x is hot 0.7
x is warm 0.5
y is large 0.6
y is medium 0.4
160 260
Let the output membership functions be defined Figure 6. Max-dot inference method
as follows.

SLOW FAST

100 200 100 200


Figure 4. Membership functions for output z Figure 7. Product-sum inference method

Information is always lost when there is absorp-


Max-Min Inference Method tion, and hence, the product-sum method has
been gaining increasing popularity recently.
The max-min method was one of the very first
inference methods to be developed. For each
rule, the rule alpha value is used to truncate each DEFUZ Z I FICAT ION
output membership function appearing in l.he
consequence of that rule. All the rules in the ride There are numerous methods of performing a
base are processed in this manner, and ithe defuzzification. Two of the most common, maxi-
resultant shapes are combined via absorption (or mal and centroid defuzzification methods, will be
union). discussed also because of their compatibility with
SLOW FAST most inference methods.

The maximal defuzzification was one of the very


first methods employed. This method amounted
to taking the maximal point of the output compo-
sition. It was often used in conjunction with the
160 260 max-min inference method. The dilemma was
Figure 5. Max-min inference method the fact that the max-min inference method often
yielded multiple maximal points. In dealing with
this problem, at least 4 variations on the maximal
Max-Dot/Product-Sum Inference Methods defuzzification now exists: mean-of-maxima, cen-
ter-of-maxima, left-of-maxima, and right-of-max-
Instead of truncating the output membership
functions, the max-dot and product-sum infer-
ence methods scales the output membership
functions by the rule alpha value in the ver1:ical
direction. From that point the max-dot and the
449
ima. Each of these methods appear below. Fuzzy logic, in essence, allows one to view prob-
lems from a higher linguistic level, thereby
Left Center Mean Right enabling less complex problems to be solved
more efficiently, and extremely large and complex
problems to be solved at all.

Figure 8. Maximal defuuification methods

A major drawback to the maximal defuzzification


method is that your outputs always tend to cluster
around the centers of the membership functions.
Any points or regions that are not maximal make
no contribution to the final result. Therefore,
slight changes to the output composition would
often times not impact the output value at all.

Today, centroid defuzzification has become the


most popular method of defuzzification. The cen-
troid defuzzification method is analogous to find-
ing the center of mass of the output composition.
With this method, every piece contributing to the
output composition is accounted for in the final
defuzzified value.

Centroid
Figure 9. Centroid defuzzification method

SUMMARY

Fuzzy logic, with its intuitive nature and its close-


ness to the natural languages, offer significant
advantages over conventional approaches in the
design, development, and implementation of vari-
ous systems and applications. Non-linear sys-
tems, time-variant systems, expert systems,
systems that are difficult to model, human inter-
face systems are examples of systems in which
fuzzy logic can not only reduce development
time, but also optimize efficiency and perfor-
mance.

450

Você também pode gostar