The binary logic of modern computers often falls short when describing the vagueness of the real world. Fuzzy logic offers more graceful alternatives.
by Bart Kosko and Satoru Isaka
BART KOSKO and SATORU ISAKA are pioneers in the development of fuzzy logic systems. Kosko holds degrees in philosophy and economics from the University of Southern California, a masters in applied mathematics from the University of California, San Diego, and a Ph.D. in electrical engineering from the University of California, Irvine. He is an assistant professor of electrical engineering at U.S.C., a governor of the International Neural Network Society and the program co-chair of the 1993 World Congress on Neural Networks. Isaka specializes in fuzzy information processing in the research and development division at Omron Advanced Systems in Santa Clara, Calif. He is interested in applying machine learning and adaptive control systems to biomedical systems and factory automation. He received his M.S. and Ph.D. degrees in systems science from U.C.S.D., in 1986 and 1989, respectively. |
Computers do not reason as brains do.
Computers "reason" when they manipulate precise facts that have been reduced
to strings of zeros and ones and statements that are either true or false.
The human brain can reason with vague assertions or claims that involve
uncertainties or value judgments: The air is cool," or "That speed is fast"
or "She is young." Unlike computers, humans have common sense that enables
them to reason in a world where things are only partially true.
Fuzzy logic is a branch of machine intelligence
that helps computers paint gray, commonsense pictures of
an uncertain world. Logicians in the 1920s first
broached its key concept: everything is a matter of degree.
Fuzzy logic manipulates such vague concepts as "warm" or "still dirty"
and so helps engineers to build air conditioners, washing machines and other
devices that judge how fast they should operate or shift from one setting
to another even when the criteria for making those changes are hard to define.
When mathematicians lack specific algorithms that dictate how a system should
respond to inputs, fuzzy logic can control or describe the system by using
"commonsense" rules that refer to indefinite quantities. No known mathematical
model can back up a truck-and-trailer rig from a parking lot to a loading
dock when the vehicle starts from a random spot.
Both humans and fuzzy
systems can perform this nonlinear guidance
task by using practical but imprecise rules such as "If the trailer turns
a little to the left, then turn it a little to the right." Fuzzy systems
often glean their rules from experts. When no expert gives the rules, adaptive
fuzzy systems learn the rules by observing how people regulate real
systems.
A recent wave of commercial fuzzy products, most of them from Japan,
has popularized fuzzy logic. In 1980 the contract firm of F. L. Smith and
Company in Copenhagen first used a fuzzy system to oversee the operation
of a cement kiln. In 1988 Hitachi turned over control of a subway in Sendai,
Japan, to a fuzzy system. Since then, Japanese companies have used fuzzy
logic to direct hundreds of household appliances and electronics products.
The Ministry of International Trade and Industry estimates that in 1992 Japan
produced about $2 billion worth of fuzzy products. U.S. and European companies
still lag far behind.
Applications for fuzzy logic extend beyond control systems. Recent
theorems show that in principle fuzzy logic can be used to model any continuous
system, be it based in engineering or physics or biology or economics.
Investigators in many fields may find that fuzzy, commonsense models are
more useful or accurate than are standard mathematical ones.
At the heart of the difference between classical
and fuzzy logic is something Aristotle called
the law
of the excluded middle. In standard set theory, an object either does
or does not belong to a set. There is no middle ground : the number five
belongs fully to the set of odd numbers and not at all to the set of even
numbers. In such bivalent sets, an object cannot belong to both a set and
its complement set or to neither of the sets. This principle preserves the
structure of logic and avoids the contradiction of an object that both is
and is not a thing at the same time.
Sets that are fuzzy, or multivalent, break the law of the excluded
middle- to some degree. Items belong only partially to a fuzzy set. They
may also belong to more than one set. Even to just one individual, the air
may feel cool , just right and warm to varying degrees. Whereas the boundaries
of standard sets are exact, those of fuzzy sets are curved or taper off,
and this curvature creates partial contradictions. The air can be 20 percent
cool-and at the same time, 80 percent not cool.
Fuzzy degrees are not the same as probability percentages, a point
that has eluded some critics of the field. Probabilities measure whether
something will occur or not. Fuzziness measures the degree to which something
occurs or some condition exists. The statement "There is a 30 percent chance
the weather will be cool" conveys the probability of cool weather. But The
morning feels 30 per- cent cool" means that the air feels cool to some extent-and
at the same time, just right and warm to varying extents.
The only constraint on fuzzy logic is that an object's degrees of
membership in complementary groups must sum to unity. If the air seems 20
percent cool, it must also be 80 percent not cool. In this way, fuzzy logic
just skirts the bivalent contradiction-that something is 100 percent cool
and 100 percent not cool-that would destroy
formal logic. The law of the excluded middle
holds merely as a special case in fuzzy logic, namely when an object belongs
100 percent to one group.
The modern study of fuzzy logic and partial
contradictions had its origins early in this century, when
Bertrand Russell found the ancient Greek paradox
at the core of modern set theory and logic. According to the old riddle,
a Cretan asserts that all Cretans lie. So, is he
lying? If he lies, then he tells the truth and does not lie. If he does
not lie, then he tells the truth and so lies. Both cases lead to a contradiction
because the statement is both true and false.
Russell found
the same paradox in set theory. The set of all sets is a set, and so
it is a member of itself. Yet the set of all apples is not a member of itself
because its members are apples and not sets. Perceiving the underlying
contradiction, Russell then asked, "Is the set of all sets that are not members
of themselves a member of itself ?" If it is, it isn't; if it isn't, it is.
Faced with such a conundrum, classical logic surrenders. But fuzzy
logic says that the answer is half true and half false, a 50-50 divide. Fifty
percent of the Cretan's statements are true, and 50 percent are false. The
Cretan lies 50 percent of the time and does not lie the other half. When
membership is less than total, a bivalent system might simplify the problem
by rounding it down to zero or up to 100 percent. Yet 50 percent does not
round up or down.
In the 1920s, independent of Russell, the Polish logician Jan Lukasiewicz
worked out the principles of multivalued logic, in which statements can take
on fractional truth values between the ones and zeros
of binary logic. In a 1937 article in Philosophy of Science,
quantum philosopher Max Black applied multivalued
logic to lists, or sets of objects, and in so doing drew the first fuzzy
set curves. Following Russell's lead, Black called the sets "vague."
Almost 30 years later Lotfi A. Zadeh, then chair of the electrical engineering
department at the University of California at Berkeley, published "Fuzzy
Sets," a landmark paper that gave the field its name. Zadeh applied Lukasiewicz's
logic to every object in a set and worked out a complete algebra for fuzzy
sets. Even so, fuzzy sets were not put to use until the mid 1970s, when Ebrahim
H. Mamdani of Queen Mary College in London designed a fuzzy controller for
a steam engine. Since then, the term "fuzzy logic" has come to mean any
mathematical or computer system that reasons with fuzzy sets.
Fuzzy logic is based on rules of the form "if...then" that convert inputs
to outputs-one fuzzy set into another. The controller of a car's air conditioner
might include rules such as "If the temperature is cool, then set the motor
speed on slow" and "If the temperature is just right, then set the motor
speed on medium." The temperatures (cool, just right) and the motor speeds
(slow, medium) name fuzzy sets rather than specific values.
To build a fuzzy system, an engineer might begin with a set of fuzzy rules
from an expert. An engineer might define the degrees of membership in various
fuzzy input and output sets with sets of curves. The relation between the
Input and Output sets could then be plotted. Given the rule "If the air feels
cool, then set the motor to slow," the inputs (temperature) would be listed
along
|
BUILDING MACHINES THAT UNDERSTAND the vagueness of the real world is the goal of those working on fuzzy logic.Fuzzy logic can model and control nuances overlooked by the binary logic of conventional computers. |
one axis of a graph and the outputs (motor speed) along a second
axis. The product of these fuzzy sets forms a fuzzy patch, an area that
represents the set of all associations that the rule forms between those
inputs and outputs.
The size of the patch reflects the rule's vagueness or uncertainty. The more
precise the fuzzy set, the smaller it becomes. If "cool" is precisely
68 degrees Fahrenheit, the fuzzy set collapses to a spike. If both the cool
and slow fuzzy sets are spikes, the rule patch is a point.
The rules of a fuzzy system define a set of overlapping patches that
relate a full range of inputs to a full range of outputs. In that sense,
the fuzzy system approximates some mathematical function or equation of cause
and effect.These functions might be laws that tell a microprocessor how to
adjust the power of an air conditioner or the speed of a washing machine
in response to some fresh measurement.
Fuzzy systems can approximate any continuous math function. One of
us (Kosko) proved this uniform convergence theorem by showing that enough
small fuzzy patches can sufficiently cover the graph of any function or input/
output relation. The theorem also shows that we can pick in advance the maximum
error of the approximation and be sure there is a finite number of fuzzy
rules that achieve it. A fuzzy system reasons, or infers, based on its rule
patches. Two or more rules convert any incoming number into some result because
the patches overlap. When data trigger the rules, overlapping patches fire
in parallel-but only to some degree.
Imagine a fuzzy air conditioner that relies on five rules and thus
five patches to match temperatures to motor speeds. The temperature sets
(cold, cool, just right, warm and hot) cover all the possible fuzzy inputs.The
motor speed sets (very slow , slow , medium, fast and very fast) describe
all the fuzzy outputs. A temperature of, say, 68 degrees F might be 20 percent
cool (80 percent not cool) and 70 percent just right (30 percent not just
right). At the same time, the air is also 0 percent cold, warm and hot. The
"if cool" and "if just right" rules would fire and invoke both the slow and
medium motor speeds.
The two rules contribute proportionally to the final motor speed. Because
the temperature was 20 percent cool, the curve describing the slow engine
speed must shrink to 20 percent of its height. The "medium" curve must shrink
to 70 percent. Summing those two reduced curves produces the final curve
for the fuzzy output set.
|
SET THEORY underlies the difference between standard and fuzzy logic.In standard logic,objects belong to a set fully or not at all (top left).Objects belong to a fuzzy set only to some extent (top right) and to the set's complement to some extent.Those partial memberships must sum to unity (bottom).If 55 degrees is 50 percent "cool," it is also 50 percent "not cool." |
In its fuzzy form, such an output curve does not assist
controllers that act on binary instructions. So the final step is a process
of defuzzification, in which the fuzzy output curve is turned into a single
numerical value. The most common technique is to compute the center of mass,
or centroid, of the area under the curve. In this instance, the centroid
of the fuzzy output curve might correspond to a motor speed of 47 revolutions
per minute. Thus, beginning with a quantitative temperature input, the electronic
controller can reason from fuzzy temperature and motor speed sets and arrive
at an appropriate and precise speed output.
All fuzzy systems reason with this fire-and-sum technique-or something
close to it. As systems become more complex, the antecedents of the rules
may include any number of terms conjoined by "and" or disjoined by "or."
An advanced fuzzy air conditioner might use a rule that says, "If the air
is cool and the humidity is high, then set the motor to medium."
Fuzzy products use both microprocessors that run fuzzy inference algorithms
and sensors that measure changing input conditions. Fuzzy chips are
microprocessors designed to store and process fuzzy rules. In 1985 Masaki
Togai and Hiroyuki Watanabe, then working at AT & T Bell Laboratories,
built the first digital fuzzy chip. It processed 16 simple rules in 12.5
microseconds, a rate of 0.08 million fuzzy logical inferences per second.
Togai InfraLogic, Inc., now offers chips based on Fuzzy Computational
Acceleration hardware that processes up to two mil1ion rules per second.
Most microprocessor firms currently have fuzzy chip research projects. Fuzzy
products largely rely on standard microprocessors that engineers have programmed
with a few lines of fuzzy inference code. Although the market for dedicated
fuzzy chips is still tiny, the value of microprocessors that include fuzzy
logic already exceeds $ 1 billion.
The most famous fuzzy application is the subway car controller used
in Sendai, which has outperformed both human operators and conventional automated
controllers. Conventional controllers start or stop a train by reacting to
position markers that show how far the vehicle is from a station. Because
the controllers are rigidly programmed, the ride may be jerky; the automated
controller will apply the same brake pressure when a train is, say, 100 meters
from a station, even if the train is going uphill or downhill. In the mid-l980s
engineers from Hitachi used fuzzy rules to accelerate,slow and brake the
subway trains more smoothly than could a deft human operator. The rules
encompassed a broad
|
|
APPLICATION OF FUZZY LOGIC to the control of an air conditioner shows how manipulating vague sets can yield precise instructions. The air conditioner measures air temperature and then calculates the appropriate motor speed. The system uses rules that associate fuzzy sets of temperatures,such as "cool," to fuzzy sets of motor outputs,such as "slow." Each rule forms a fuzzy patch. A chain of patches can approximate a performance curve or other function (left). If a temperature of 68 degrees Farenheit is 20 percent "cool" and 70 percent "just right" (top right),two rules fire,and the system tries to run its motor speed that is 20 percent "slow" and 70 percent "medium" (bottom right). The system arrives at an exact motor speed by finding the center of mass,or centroid,for the sum of the motor output curves. |
range of variables about the ongoing performance of the train,
such as how frequently and by how much its speed changed and how close the
actual speed was to the maximum speed. In simulated tests the fuzzy controller
beat an automated version on measures of riders' comfort, shortened riding
times and even achieved a 10 percent reduction in the train's energy consumption.
Today the fuzzy system runs the Sendai subway during peak hours and runs
some Tokyo trains as well. Humans operate the subway during nonpeak hours
to keep up their skills.
Companies in Japan and Korea are building an array of fuzzy consumer
goods that offer more precise control than do conventional ones. Fuzzy washing
machines adjust the wash cycle to every set of clothes, changing strategies
as the clothes become clean. A fuzzy washing machine gives a finer wash than
a "dumb" machine with fixed commands. In the simplest of these machines,
an optical sensor measures the murk or clarity of the wash water, and the
controller estimates how long it would take a stain to dissolve or saturate
in the wash water. Some machines use a load sensor to trigger changes in
the agitation rate or water temperature. Others shoot bubbles into the wash
to help dissolve dirt and detergent. A washing machine may use as few as
10 fuzzy rules to determine a wide variety of washing strategies.
In
cameras
and camcorders, fuzzy logic links image data to various lens settings.
One of the first fuzzy camcorders, the Canon hand-held H800, which was introduced
in 1990, adjusts the autofocus based on 13 fuzzy rules. Sensors measure the
clarity of images in six areas. The rules take up about a kilobyte of memory
and convert the sensor data to new lens settings. Matsushita relies on more
rules to cancel the image jitter that a shaking hand causes in its small
Panasonic camcorders.The fuzzy rules infer where the image will shift. The
rules heed local and global changes in the image and then compensate for
them. In contrast, camcorder controllers based on mathematical models can
compensate for no more than a few types of image jitter.
Systems with fuzzy controllers are often more energy efficient because they
calculate more precisely how much power is needed to get a job done. Mitsubishi
and Korea' s Samsung report that their fuzzy vacuum cleaners achieve more
than 40 percent energy savings over nonfuzzy designs. The fuzzy systems use
infrared light-emitting diodes to measure changes in dust flow and so to
judge if a floor is bare. A four-bit microprocessor measures the dust flow
to calculate the appropriate suction power and other vacuum settings.
Automobiles also benefit from fuzzy logic. General Motors uses a fuzzy
transmission in its Saturn. Nissan has patented a fuzzy antiskid braking
system, fuzzy transmission system and fuzzy fuel injector. One set of fuzzy
rules in an on-board microprocessor adjusts the fuel flow. Sensors measure
the throttle setting, manifold pressure, radiator water temperature and the
engine's revolutions per minute. A second set of fuzzy rules times the engine
ignition based on the revolutions per minute, water temperature and oxygen
concentration.
One of the most complex fuzzy systems is a
model
helicopter , designed by Michio Sugeno of the Tokyo Institute
of Technology. Four elements of the craft-the elevator, aileron, throttle
and rudder-respond to 13 fuzzy voice commands, such as "up," "land" and "hover."
The fuzzy controller can make the craft hover in place, a difficult task
even for human pilots.
A few fuzzy systems manage information rather than devices. With fuzzy
logic rules, the Japanese conglomerate Omron oversees five medical data bases
in a health management system for large firms. The fuzzy systems use 500
rules to diagnose the health of some 10,000 patients and to draw up personalized
plans to help them prevent disease, stay fit and reduce stress. Other companies,
including Hitachi and Yamaichi Securities, have built trading programs for
bonds or stock funds that use fuzzy rules to react to changes in economic
data.
The Achilles' heel of a fuzzy system is its rules. Almost all the fuzzy consumer
products now on the market rely on rules supplied by an expert. Engineers
then engage in a lengthy process of tuning those rules and the fuzzy sets.
To automate this process, some engineers are building adaptive fuzzy systems
that use neural networks or other statistical tools to refine or even form
those initial rules.
Neural networks are collections of "neurons" and "synapses" that change
their values in response to inputs from surrounding neurons and synapses.
The neural net acts like a computer be- cause it maps inputs to outputs.
The neurons and synapses may be silicon components or equations in software
that simulate their behavior. A neuron adds up all the incoming signals from
other neurons and then emits its own response in the form of a number. Signals
travel across the synapses, which have numerical values that weight the flow
of neuronal signals. When new input data fire a network's neurons, the synaptic
values can change slightly. A neural net "learns" when it changes the value
of its synapses.
Depending on the available data, networks can learn patterns with or
without supervision. A supervised net learns by trial and error, guided by
a teacher. A human may point out when the network has erred-when it has emitted
a response that differs from the desired output. The teacher will correct
the responses to sample data until the network responds correctly to every
input.
Supervised networks tune the rules of a fuzzy system as if they were
synapses. The user provides the first set of rules, which the neural net
refines by running through hundreds of thousands of inputs, slightly varying
the fuzzy sets each time to see how well the system performs. The net tends
to keep the changes that improve performance and to ignore the others.
A handful of products in Japan now use supervised neural learning to
tune the fuzzy rules that control their operation. Among them are Sanyo'
s microwave oven and several companies' washing machines. Sharp employs this
technique to modify the rules of its fuzzy refrigerator so that the device
learns how often its hungry patron is likely to open the door and adjusts
the cooling cycle accordingly. So far the neural net must learn "off-line"
in the laboratory, from small samples of behavior by average customers. In
time, researchers at such groups as Japan's laboratory for International
Fuzzy Engineering and the Fuzzy Logic Systems Institute hope to build fuzzy
systems that will adapt to the needs of each consumer.
|
|
Fuzzy Sets and Paradoxes
Relations between sets show the paradox at the heart of
fuzzy logic. In standard sets,an object either does or does not belong
to a set: the glass of water is either empty or full. Fuzzy sets cover
a continuum of partial sets,such as glasses only half full (left). |
Fuzzy sets of two objects are points of the square,such as the point A. The union and the intersection of a fuzzy set A and its complement A* lie at the corners of an interior square. In contrast,the union or intersection of a standard set and its complement results in the total set or the empty set at the squares corners, respectively. |
Supervised networks do have drawbacks. Tuning such systems can take
hours or days of computer time because networks may converge on an inappropriate
solution or rule or may fail to converge at all. Neural researchers have
proposed hundreds of schemes to alleviate this problem, but none has removed
it. Even after a lengthy tuning session, the final rules may not be much
better than the first set.
Rather than relying on an expert to supply a training set of data and
correct a network in the process of learning, unsupervised neural networks
learn simply by observing an expert's decisions. In this way, an adaptive
fuzzy system can learn to spot rule patterns in the incoming data. Broad
rule patches form quickly, based on a few inputs. Those patches are refined
over time.
How Fuzzy Systems Learn Rules Adaptive systems called neural networks can help fuzzy systems learn rules. A neural network accepts pairs of input and output data,such as temperatures and motor speeds for air conditioners,and groups them into a small number of prototypes,or classes. Within the network,each prototype acts as a quantization vector - a list of numbers - that stands for the synapses feeding into a neuron.When a new data point enters the network,it stimulates the neuron associated with the prototype that matches the data most closely. The values of the "winning" synapses adjust to reflect the data they are receiving. As the data cluster,so do the quantization vectors,which define rule patches. More data lead to more numerous and precise patches. |
|
Unsupervised neural networks blindly cluster data into groups, the
members of which resemble one another. There may be no given right or wrong
response or way to organize the data. The algorithms are simpler, and, at
least in theory, the network need run through the data just once. (In some
cases, when data are sparse, the neural net must cycle through them repeatedly.)
Unsupervised learning is thus much faster than supervised learning. With
numerical inputs and outputs supplied by an expert or a physical process
or even an algorithm, an unsupervised neural network can find the first set
of rules for a fuzzy system. The quality of the rules depends on the quality
of the data and therefore on the skills of the expert who generates the data.
At this point, there are fewer unsupervised than supervised adaptive fuzzy
systems. Because unsupervised networks are best used to create rules and
supervised networks are better at refining them, hybrid adaptive fuzzy systems
include both.
Most fuzzy systems have been control systems with few variables. That
trend happened because most of the first fuzzy logic engineers were control
theorists and because a control loop regulates most consumer products. The
challenge for the next generation of fuzzy research will be tackling large-scale,
nonlinear systems with many variables. These problems can arise when people
try to supervise manufacturing plants or schedule airline flights or
model the economy. No experts may be able to
describe such systems. Common
sense may falter or not apply. The neural nets that must learn the rules
for modeling these hard problems may have little or no data to go on.
A further problem is that, like any other mathematical or computer
model, fuzzy logic falls prey to the "curse of
dimensionality": the number of fuzzy rules tends
to grow exponentially as the number of system variables increases. Fuzzy
systems must contend with a trade-off. Large rule patches mean the system
is more manageable but also less precise. Even with that trade-off, fuzzy
logic can often better model the vagueness of the world than can the
black-and-white concepts of set theory. For that reason, fuzzy logic systems
may well find their way into an ever growing number of computers, home appliances
and theoretical models. The next century may be fuzzier than we think.
Techniques borrowed from artificial intelligence could help
doctors assess just how serious a particular case of
breast cancer is and, therefore,
how to treat it. Breast cancer affects one in 10 women in the West, and kills
more women than any other form of cancer. The disease itself can be relatively
easy to treat if caught in time. As with most cancers, the danger is that
it will spread to other parts of the body, especially if treated incorrectly.
When tested on 100 women, the new technique proved to be nearly 90 per cent
accurate at predicting the extent of this spread and whether they would survive
for five years. The approach, developed by a team led by Raouf Naguib at
the University of Coventry and Gajanan Sherbet at the University of Newcastle
upon Tyne, builds on an existing analytical method called image cytometry.
This analyses microscope images of tumour tissue, and uses a computer program
to apply a standard statistical technique called logistic regression to predict
whether the patient will survive for a given period. It bases its prognosis
on factors such as the age of the woman and patterns of abnormalities in
the tumour such as the rate of cell division and the shape of its cells'
nuclei. Fuzzy logic Naguib and Sherbet compared this technique to their own, which uses a neural network program and fuzzy logic, a decision-making tool commonly used by artificial intelligence researchers when dealing with imprecise data. When they compared the predictions of their combined method with actual outcomes they found it significantly outperformed simple logistic regression, they told the Multi-Conference on Systematics, Cybermetrics and Informatics in Orlando, Florida last week. Another benefit was that each of the three approaches revealed a different set of factors as being most important for making a prognosis (see table). This suggests that relying on a single statistical technique could miss vital correlations, says Naguib. But Peter Saseini, a senior research scientist at the charity Cancer Research UK, is not convinced of the new technique's benefits. He says it should be tested on much larger groups of patients before its real value can be established. Survival time Saseini also questions how useful the new method would be. He argues that predicting a precise life expectancy would be much more valuable rather than simply estimating a patient's chances of surviving five years. But he admits that conventional techniques cannot do this either. "With today's methods I do not think it would be possible to predict the survival time to the nearest two months," he says. Naguib acknowledges that the trials were relatively small, and says that the next step will be to look at a larger number of patients. He also wants to include the treatments the patients are receiving alongside the other factors that the computer programs look at. This would further improve the reliability of the technique, he says. Duncan Graham-Rowe [New Scientist 2 July,2002] |
FURTHER READING
VAGUENESS: AN EXERCISE IN LOGICAL ANALYSIS. Max Black
in Philosophy of Science, Vol. 4, No 4, pages 427-455; October 1937. |
Chaos | Quantum | Logic | Cosmos | Conscious | Belief | Elect. | Art | Chem. | Maths |