Você está na página 1de 9

www.fuzzytech.

com
Fuzzy logic
From Wikipedia, the free encyclopedia.

Fuzzy logic is an extension of Boolean logic dealing with the concept of partial
truth. Whereas classical logic holds that everything can be expressed in binary
terms (0 or 1, black or white, yes or no), fuzzy logic replaces boolean truth values
with degrees of truth.

Degrees of truth are often confused with probabilities, although they are
conceptually distinct, because fuzzy truth represents membership in vaguely
defined sets, not likelihood of some event or condition. To illustrate the difference,
consider this scenario: Bob is in a house with two adjacent rooms: the kitchen and
the dining room. In many cases, Bob's status within the set of things "in the
kitchen" is completely plain: he's either "in the kitchen" or "not in the kitchen".
What about when Bob stands in the doorway? He may be considered "partially in
the kitchen". Quantifying this partial state yields a fuzzy set membership. With
only his little toe in the dining room, we might say Bob is 0.99 "in the kitchen", for
instance. No event (like a coin toss) will resolve Bob to being completely "in the
kitchen" or "not in the kitchen", as long as he's standing in that doorway. Fuzzy sets
are based on vague definitions of sets, not randomness.

Fuzzy logic allows for set membership values between and including 0 and 1,
shades of gray as well as black and white, and in its linguistic form, imprecise
concepts like "slightly", "quite" and "very". Specifically, it allows partial
membership in a set. It is related to fuzzy sets and possibility theory. It was
introduced in 1965 by Dr. Lotfi Zadeh of Berkeley.

Fuzzy logic is controversial despite wide acceptance: it is rejected by some control


engineers for validation and other reasons, and by some statisticians who hold that
probability is the only rigorous mathematical description of uncertainty. Critics also
argue that it cannot be a superset of ordinary set theory since membership functions
are defined in terms of conventional sets.

Fuzzy logic can be used to control household appliances such as washing machines
(which sense load size and detergent concentration and adjust their wash cycles
accordingly) and refrigerators.

A basic application might characterize subranges of a continuous variable. For


instance, a temperature measurement for anti-lock brakes might have several
separate membership functions defining particular temperature ranges needed to
control the brakes properly. Each function maps the same temperature value to a
truth value in the 0 to 1 range. These truth values can then be used to determine
how the brakes should be controlled.

In this image, cold, warm, and hot are functions mapping a temperature scale. A
point on that scale has three "truth values" — one for each of the three functions.
For the particular temperature shown, the three truth values could be interpreted as
describing the temperature as, say, "fairly cold", "slightly warm", and "not at all
hot".

A more sophisticated practical example is the use of fuzzy logic in high-


performance error correction to improve information reception over a limited-
bandwidth communication link affected by data-corrupting noise using turbo codes.
The front-end of a decoder produces a likelihood measure for the value intended by
the sender (0 or 1) for each bit in the data stream. The likelihood measures might
use a scale of 256 values between extremes of "certainly 0" and "certainly 1". Two
decoders may analyse the data in parallel, arriving at different likelihood results for
the values intended by the sender. Each can then use as additional data the other's
likelihood results, and repeats the process to improve the results until consensus is
reached as to the most likely values.

[edit]

Misconceptions and controversies


Fuzzy logic is the same as "imprecise logic".
Fuzzy logic is not any less precise than any other form of logic: it is an
organized and mathematical method of handling inherently imprecise
concepts. The concept of "coldness" cannot be expressed in an
equation, because although temperature is a quantity, "coldness" is not.
However, people have an idea of what "cold" is, and agree that
something cannot be "cold" at N degrees but "not cold" at N+1 degrees
— a concept classical logic cannot easily handle due to the principle of
bivalence.
Fuzzy logic is a new way of expressing probability.
Fuzzy logic and probability refer to different kinds of uncertainty. Fuzzy
logic is specifically designed to deal with imprecision. However, this is a
point of controversy. Many statisticians are persuaded by the work of
Bruno de Finetti that only one kind of mathematical uncertainty is
needed and thus fuzzy logic is unnecessary. On the other hand, Bart
Kosko argues that probability is a subtheory of fuzzy logic, as probability
only handles one kind of uncertainty. He also claims to have proved a
theorem demonstrating that Bayes' theorem can be derived from the
concept of fuzzy subsethood. Lotfi Zadeh, the creator of fuzzy logic,
argues that fuzzy logic is different in character from probability, and is
not a replacement for it. He has created a fuzzy alternative to
probability, which he calls possibility theory. Other controversial
approaches to uncertainty include Dempster-Shafer theory and Rough
Sets.
Fuzzy logic will be difficult to scale to larger problems
In a widely circulated and highly controversial paper, Charles Elkan in
1993 commented that "...there are few, if any, published reports of
expert systems in real-world use that reason about uncertainty using
fuzzy logic. It appears that the limitations of fuzzy logic have not been
detrimental in control applications because current fuzzy controllers are
far simpler than other knowledge-based systems. In future, the technical
limitations of fuzzy logic can be expected to become important in
practice, and work on fuzzy controllers will also encounter several
problems of scale already known for other knowledge-based systems".
Reactions to Elkan's paper are many and varied, from claims that he is
simply mistaken, to others who accept that he has identified important
limitations of fuzzy logic that need to be addressed by system designers.
[edit]

Examples where fuzzy logic is used


• Automobile subsystems, such as ABS and cruise control
• Air conditioners
• The MASSIVE engine used in the Lord of the Rings films, which helped
show huge scale armies create random, yet orderly movements
• Cameras
• Digital image processing, such as edge detection
• Rice cookers
• Dishwashers
• Elevators
• Washing machines and other home appliances.
• Video game artificial intelligence

Fuzzy logic has also been incorporated into some microcontrollers and
microprocessors, for instance, the Motorola 68HC12.

[edit]

How fuzzy logic is applied

Fuzzy logic usually uses IF/THEN rules, or constructs that are equivalent, such as
fuzzy associative matrices.
Rules are usually expressed in the form:

IF variable IS set THEN action

For example, an extremely simple temperature regulator that uses a fan might look
like this:

IF temperature IS very cold THEN stop fan


IF temperature IS cold THEN turn down fan
IF temperature IS normal THEN maintain level
IF temperature IS hot THEN speed up fan

Notice there is no "ELSE". All of the rules are evaluated, because the temperature
might be "cold" and "normal" at the same time to differing degrees.

The AND, OR, and NOT operators of boolean logic exist in fuzzy logic, usually
defined as the minimum, maximum, and complement; when they are defined this
way, they are called the Zadeh operators, because they were first defined as such in
Zadeh's original papers. So for the fuzzy variables x and y:

NOT x = (1 - truth(x))
x AND y = minimum(truth(x), truth(y))
x OR y = maximum(truth(x), truth(y))

There are also other operators, more linguistic in nature, called hedges that can be
applied. These are generally adverbs such as "very", or "somewhat", which modify
the meaning of a set using a mathematical formula.

Fuzzy Application Library/What is Fuzzy Logic?


This introduction is kept brief. You find introductory literature in the Fuzzy Logic Literature
section. Complete introductory literature is also contained with all fuzzyTECH products.

What is Fuzzy Logic?

How can a logic which is "fuzzy" be useful? Professor Lotfi Zadeh, the inventor of fuzzy
logic, contends that a computer cannot solve problems as well as human experts unless it
is able to think in the characteristic manner of a human being.

As humans, we often rely on imprecise expressions like "usually", "expensive", or "far". But
the comprehension of a computer is limited to a black-white, everything-or-nothing, or true-
false mode of thinking. In this context, Lotfi Zadeh emphasizes the fact that we easily let
ourselves be dragged along by a desire to attain the highest possible precision without
paying attention to the imprecise character of reality.

There are many subjects which do not fit into the precise categories of the conventional set
theory: The set of "all triangles" or "all the guys named John" is easy to handle with
conventional theory. Either somebody's name is John or it is not. There is no other status
in between. The set of "all intelligent researchers" or "all the people with an expensive car",
however, is much more complicated and cannot be handled easily by a "digital" mode of
thinking. This is because of the fact that there is no way to define a precise threshold to
represent a vague and blurry boundary: there are some obviously expensive cars, like the
Rolls-Royce, but many others could be fit into this category as well, depending on how
much money you have, where you live, and how you feel!

Why use fuzzyTECH ?

As mentioned before, within conventional logic, terms can be only "true" or "false". Fuzzy
logic allows a generalization of conventional logic. It provides for terms between "true" and
"false" like "almost true" or "partially false". Therefore, fuzzy logic cannot be directly
processed on computers but must be emulated by special code.

This what what fuzzyTECH brings to the party. fuzzyTECH on one hand provides you with
all the tools to design and test a fuzzy logic system. Once designed, fuzzyTECH stores
your work as an FTL format file. FTL stands for "Fuzzy Technology Language", and can be
considered "the programming language of fuzzy logic". Because fuzzyTECH provides an
all-graphical user interface, however, you never need to program a single line of code in
FTL. Rather, fuzzyTECH on the other hand converts this FTL description to code that can
be used on your target hardware that is, the hardware where your fuzzy logic solution
finally shall run on.

Designing a fuzzy logic system is different from conventional coding. To give you the most
efficient start, fuzzyTECH features three "Fuzzy Design Wizards" that guides you step-by-
step. As a beginner, this insures that you have covered all design steps thouroughly, as an
experienced developer you will be able to design the prototype of a complex system in just
a few minutes.

Integrating Neural Net Technology

There are many applications where it is easier to define the desired system behavior (or
part of it) through examples rather than through manual creation of the rules or the
linguistic variables. In such cases, you may use the NeuroFuzzy Module which is entirely
integrated in fuzzyTECH.

The NeuroFuzzy module automatically generates and optimizes not only the fuzzy logic
rules and their weights but also the membership functions from available data which
represent sample cases. The NeuroFuzzy Module integrates neural network technologies
in order to train fuzzy logic systems. In contrast to conventional neural network solutions,
the entire training process and the resulting fuzzy logic system remains completely self-
explanatory.

The employed training technology is based on a fuzzy logic inference component of


fuzzyTECH: the use of Fuzzy Associative Maps (FAM). FAMs allow fuzzy logic rules with
an inherent 'fuzzy' character. Such FAM rules can be viewed as generalized neurons
("Approximate Reasoning") whose plausibility is calculated through Competitive Learning.
A fuzzy logic system generator optionally sets up appropriate membership functions and
rule blocks prior to the actual training phase based on the data sets.
The NeuroFuzzy Module can also be used to optimize existing fuzzy logic systems.
Starting with an existing system, the NeuroFuzzy Module interactively tunes rule weights
and membership function definitions such that the system converges to the behavior
represented by the data sets. The optimization process allows specified rules and
membership functions to be locked or opened for learning. The entire learning process is
visualized, and any fuzzy logic system generated by the NeuroFuzzy module can be
further optimized and verified manually. You find more information in the NeuroFuzzy
Module section.

Advanced Fuzzy Technologies

In addition to the common methods of fuzzy logic, there are various expanded fuzzy
technologies which have proven to be very useful. Most fuzzyTECH products support such
Advanced Fuzzy Technologies:

Support of normalized rule sets


If you have complex applications, you can easily cause confusing rules using different
operators, a chaos of parentheses and complicated "if-then-else" statements. Such
constructs destroy the actual advantages of fuzzy logic systems, like clarity and easy
expansion. fuzzyTECH uses a different approach by providing normalized rule sets and
graphical structure editors. Even the most complex compositions, which must be handled
within the rule syntax by other fuzzy logic tools, can be easily developed graphically with
fuzzyTECH. Applying normalized rule sets has the additional advantage that the rules can
be transformed automatically and developed easily in matrix form, which is often more
readable than text or table form in the case of huge and complex systems.fuzzyTECH
provides all three presentation forms (text, table, and matrix), while also allowing for
switching between them or using them in mixed formats.

Inference methods
Aside from the standard fuzzy inference methods (MAX-MIN, MAX-PROD), most
fuzzyTECH products support the advanced Fuzzy Associative Map inference. FAM is an
extension of fuzzy inference which was developed out of the combination of neural
technology and fuzzy logic. It allows more accurate tuning of the rule bases according to
the prerequisites, and as a result, it reduces the often necessary selection procedures of
the rules. fuzzyTECH supports not only the maximum operator for result aggregation, but
also the BSUM operator (Bounded-Sum). This operator also considers the so-called
"support rules" which support the current firing rule.
The fuzzy inference of fuzzyTECH represents a combination of forward/backward chaining
which is totally transparent for the user. fuzzyTECH automatically decides the best
processing method appropriate to the current fuzzy logic system.

Fuzzy operators
Most fuzzyTECH products provide families of generalized operators for
fuzzy inference, from which you can create a desired operator through free
parameterization of the available operators. There are three operator
families available: Min-Max, Avg-Max, and Gamma. The Min-Max family
represents a generalization of the "traditional" fuzzy operators that can also
be created as a special case of Min-Max. Through broad empirical
research, we now know that the Gamma families are able to represent the
human characteristics of decision behavior the best. Through free
parameterization you can individually modify your Gamma operators to
achieve the optimum of your desired system. The Avg-Max family is an
approximation of the Gamma operator family, optimized with regards to
computing efficiency. Especially in cases requiring the processing of huge
amounts of data in a short time, you may choose the Avg-Max operators,
thereby giving up some of the higher accuracy provided by the Gamma
operFuzzy Logic is a superset of Boolean logic dealing with the concept of partial
truth. Whereas classical logic holds that everything can be expressed in binary
terms (0 or 1, black or white, yes or no), fuzzy logic replaces Boolean truth values
with degrees of truth which are very similar to probabilities (except that they need
not sum to one). This allows for values between 0 and 1, shades of gray, and
maybe; it allows partial membership in a set. It is highly related to fuzzy sets and
possibility theory. It was introduced in the 1960s by Dr. Lotfi Zadeh of UC
Berkeley. Fuzzy logic is controversial. It is widely accepted within the engineering
and computer science communities but generally rejected by mathematicians and
(in particular) statisticians. Critics argue that it cannot be a superset of ordinary set
theory since membership functions are defined in terms of conventional sets.
Others argue that it is unscientific by the standards of Karl Popper, since set
membership values are not empirically verifiable.

Table of contents [hide]

1 Applications: Home appliances and more


2 Common misconceptions
3 Examples where Fuzzy Logic is used
4 External Links

Applications: Home appliances and more


Fuzzy logic is used to control household appliances (such as washing machines
which sense load size and detergent concentration and auto-adjust their wash
cycles accordingly; and refrigerators)

Other applications are passenger elevators, automobile subsystems (like ABS),


cameras, video game AI, and thousands of other possibilities; it is possible that
many have not even been conceived yet.

A basic application might quantify where a limited range applies to a smooth


spectrum -- as in temperature measurement for anti-lock brakes to function
properly. Truth values derived from the specific temperature are mapped to a series
of candidate quantities. These quantities can then be used to determine a separate
function in accordance with the graduated value scheme.

Image:Fuzzyimage.png
In this image, cold, warm, and hot are identities mapped to a temperature scale. A
point on that scale is represented by two "truth values" -- one in each of the two
nearest identities. As the temperature rises, its "truth value" in the cold category
declines, while its "truth value" in the warmer category rises.

The AND, OR, NOT operators of boolean logic exist in fuzzy logic, usually
defined as the minimum, maximum, and complement; when they are defined this
way, the are called the Zadeh operators, because they were first defined as such in
Zadeh's original papers. There are also other operators, more linguistic in nature,
called hedges that can be applied. These are generally adverbs such as "very", or
"somewhat", which modify the meaning of a set using a mathematical formula.

Common misconceptions
Fuzzy logic has suffered many misconceptions, partly due to its name. "Fuzzy"
is said to have negative connotations, usually either suggesting something cute
or something imprecise; the latter sometimes causes people to equate "fuzzy
logic" with "imprecise logic". However, fuzzy logic is not any less precise than
any other form of logic, rather it is an organized and mathematical method of
handling inherently uncertain concepts; the concept of "coldness" cannot be
expressed in an equation (temperature is a quantity, but "coldness" is not).
However, everybody has an idea of what "cold" is, and agrees that something
cannot be "cold" at N degrees but "not cold" at N+1 degrees (which is a
concept classical logic and equations cannot easily handle).

Another common misconception is that fuzzy logic is a new way of expressing


probability. However, Bart Kosko has shown that probability is a subset of fuzzy
logic, as probability only handles one kind of uncertainty. He has also proved a
theorem that shows that Bayes' theorem can be derived from the concept of fuzzy
subsethood. This should not by any means suggest that all those who study
probability accept or even understand fuzzy logic, however; to many, fuzzy logic is
still a curiosity.

Fuzzy logic is also sometimes said to be used only in AI, control systems, and/or
expert systems (note that these fields can have significant overlap). These are by far
the most common applications, but by no means the only possible; fuzzy logic can
be applied in any situation requiring the handling of uncertainty.

See also: dynamic logic, control system, expert system, artificial intelligence,
Combs method.

Examples where Fuzzy Logic is used


Elevators; Cruise Control; Lord of the Rings Massive Engine which helped show
huge scale armies create random, yet orderly movements; Washing Machines;
Dishwasher; Air conditioner ators.

Você também pode gostar