EDN logo


EDN Columnist: August 18, 1994

Everyday life can get fuzzy

David Brubaker,
Fuzzy-Logic Contributing Editor

When used appropriately, fuzzy logic allows us to eschew the obfuscation that often crops up in engineering design.

"Question Authority." Seeing the bumper sticker last week was like a flashback to the late 60s. Then, as now, the implied defiance made me enjoy even more the story of the conservative professor who, upon entering his classroom and seeing the phrase written in large letters across the chalkboard, calmly wrote beneath it, "And listen to the answer."

Another bumper sticker I regularly see on a car whose owner frequents the coffee shop around the corner is "Subvert the Dominant Paradigm." While I often 'question' the dominant paradigm, 'subvert' is too strong for me. I prefer evolution of knowledge, augmented with occasional leaps of brilliance. I especially enjoy the leaps--for example the genius of "I understand that the square root of -1 is impossible, but let's see what we have if we define a number system where it is not."

Fuzzy logic is such a leap. In some ways it seems counterintuitive. As we engineers strive to measure and model with ever greater accuracy, that we would intentionally elect to move toward less precision makes no apparent sense. It definitely doesn't fit the dominant paradigm. But it does fit how we live our everyday lives.

Describe the next person you see. Looking out my office window, I see a man, fairly tall and very skinny. He is young, between 18 and 20, no more than 24, and has long, stringy, brownish-blonde hair. His eyes are deep-set and widely spaced. He walks slightly stooped.

This description is a model of a person, a word-based model. The model is riddled with imprecision, in words such as 'tall,' 'skinny,' 'young,' 'long,' 'deep-set,' 'widely,' and 'stooped.' Even the attempt to get specific, 'between 18 and 20' is qualified with 'no more than 24.' Would I be surprised if he were 25 or even 26? Not really. In the entire description, there is only one fact: that he is male. The rest are fuzzy terms.

And yet we all have a general sense of what this man looks like. We accept this imprecision and work with it, realizing it is the product of our visual system's inability to give more precise measurements. We also recognize our inability to infer correctly--in this case, age from general appearance--as well as, perhaps, our memory's inability to recall detail. Unable to quantify with numbers, we work quite comfortably with words. The fuzzy model is more accurate than having no model at all.

When Lotfi Zadeh first formulated fuzzy set theory and fuzzy logic, he did so because systems he worked with were becoming sufficiently complex as to be intractable with numeric representations. Rather than throwing up his hands in dismay, he looked for an alternative. The alternative--his leap of brilliance--came with his willingness to sacrifice precision to obtain a workable model. It was a worthwhile tradeoff.

What he needed was a mathematical basis. Professor Zadeh looked to set theory, but quickly realized that traditional set theory, which requires an element to be either fully a member or not a member of a set, was inadequate. If, for instance, we define a set 'tall' for a North American male to include anyone over 6 ft 3 in., how about the man who stands 6 ft 2 7/8 in.? He is, by definition, 'not tall.' Professor Zadeh felt this was counterintuitive and would be inadequate when linguistically modeling his complex systems.

So he formulated fuzzy set theory, allowing an element simultaneously to be partially a member and partially not a member of a given set. You can now represent the term 'tall' as a finite sloped function, with its x-axis representing all possible heights, and its y-axis the degree to which a given height is a member of the set. The 6-ft 2 7/8-in. man can be 98% 'tall'; he is also 2% 'not tall.' This makes much more sense.

At the foundation of this word-based modeling process is what Professor Zadeh calls linguistic variables. As engineers, we often work with numeric variables, which are symbols or storage elements that can be assigned numbers as their values. Linguistic variables are symbols or storage elements that are assigned words as their values. A traditional variable 'height' would include numeric values such as 5 ft 2 in. and 6 ft 6 in.; a linguistic variable 'height' includes values such as 'short' and 'tall.' Linguistic variables are fuzzy variables, and the values of a fuzzy variable are called fuzzy values. As an example, let's discuss tall, a fuzzy value of the variable height, again taken in the context of a North American male.

First, we define tall as a collection of points placed at 1-in. intervals between 67 in. (5 ft 7 in.) and 77 in. (6 ft 5 in.). For each height in this range, we assign a degree of membership, typically designatedµ, that indicates how well each numeric (or crisp) height fits into our fuzzy set 'tall.' The convention is to say that if it doesn't fit at all, µ = 0, and if it fits completely,µ = 1. Assigning degree of membership is subjective. You can consult an expert or base it on the results of a survey. You can also base it on system constraints. Arbitrarily, for this example, we shall say a 69-in. man is not tall, and that 69 in. has zero degree of membership in the fuzzy set 'tall.'

Use the expressionµ(69 in.) = 0.00, which reads "the degree of membership of 69 in. in the set 'tall' is 0." The height 75 in. has full membership in the set 'tall':µ (75 in.) = 1.00 or "the degree of membership of 75 in. in the set 'tall' is 1." The height 6 ft even (72 in.) is at a point of maximum ambiguity; it is equally 'tall' and 'not tall': µ(72 in.) = 0.50. Defined in this manner, Fig 1 shows the fuzzy discrete set 'tall.'

If you use a function to represent the set, it's called a membership function. Fig 2 shows two possible functional representations of the fuzzy set 'tall.' One is piecewise linear; the other is based on the hyperbolic tangent function, tanh. Piecewise linear functions, being simpler and computationally less intensive, are often used in real-time control applications. Functions based on tanh, or on one of several other similar smooth functions, are most often used in nonreal-time analysis applications.

Fuzzy logic is closely linked to fuzzy set theory. The 72-in. height that belongs to the fuzzy set 'tall' with degree of membership 0.5, corresponds directly to the statement "72 inches is tall," having a 0.5 truth value--that is, being 50% true. Degrees of membership in fuzzy set theory are equivalent to truth values in fuzzy logic, and often you'll hear the terms used interchangeably.

How would we use all this in a practical application? Based on verbal descriptions, you can use fuzzy logic to greatly reduce the number of mug shots that crime victims and witnesses must review. Let's say the man I described earlier turned out to be a mugger. It's not reasonable to expect my memory and descriptive ability to be precise enough to identify an individual based on a verbal description alone. However, if the search capability of a database of known muggers were fuzzy, the list of possible suspects could be greatly reduced. Each database entry would be compared with each of my fuzzy descriptive phrases, resulting in a collection of truth values. If a known mugger were 5 ft. 2 in., he would be 'fairly tall' with truth value zero. So would someone who is 6 ft 10 in. But an individual who is 6 ft 1 in. would match with unity truth value.

The resulting truth values are combined using a fuzzy-logic AND operator, most often implemented as a minimum, because a poor match on one point is sufficient to make the overall match also poor. A 22-year-old man who is 6 ft 1 in. with shoulder-length, light-brown hair, and widely spaced, deep-set eyes--but who weighs 250 pounds--is eliminated as not being 'very skinny,' despite the fact that the rest of his features accurately matched the description.

Next month we'll introduce the fuzzy rulebase and its use in setpoint control.

One final bumper sticker of note--and one of my favorites: Eschew obfuscation. Avoid that which bewilders. When used appropriately, fuzzy logic allows us to eschew the obfuscation that often crops up in engineering design.



David Brubaker is president of Huntington Advanced Technologies, 883 Santa Cruz Ave, Suite 31, Menlo Park, CA 94025-4608; or on the internet at: brubaker@up.portal.com


| EDN Access | feedback | subscribe to EDN! |
| design features | design ideas | columnists |


Copyright © 1995 EDN Magazine. EDN is a registered trademark of Reed Properties Inc, used under license.