Sunteți pe pagina 1din 12

INTRODUCTION TO FUZZY LOGIC

Fuzzy logic was developed by Lotfi A. Zadeh in the 1960s in order to provide mathematical rules and functions which permitted natural language queries. Fuzzy logic provides a means of calculating intermediate values between absolute true and absolute false with resulting values ranging between 0.0 and 1.0. With fuzzy logic, it is possible to calculate the degree to which an item is a member. For example, if a person is .83 of tallness, they are " rather tall. " Fuzzy logic calculates the shades of gray between black/white and true/false. Fuzzy logic is a super set of conventional (or Boolean) logic and contains similarities and differences with Boolean logic. Fuzzy logic is similar to Boolean logic, in that Boolean logic results are returned by fuzzy logic operations when all fuzzy memberships are restricted to 0 and 1. Fuzzy logic differs from Boolean logic in that it is permissive of natural language queries and is more like human thinking; it is based on degrees of truth. The graphical representation of fuzzy and boolean sets are different as well. See the graphs below. FUZZY BOOLEAN

Fuzzy logic may appear similar to probability and statistics as well. Although, fuzzy logic is different then probability even though the results appear similar. The probability statement, " There is a 70% chance that Bill is tall" supposes that Bill is either tall or he is not. There is a 70% chance that we know which set Bill belongs. The fuzzy logic statement, " Bill's degree of membership in the set of tall people is .80 " supposes that Bill is rather tall. The fuzzy logic answer determines not only the set which Bill belongs, but also to what degree he is a member. There are no probability statements that pertain to fuzzy logic. Fuzzy logic deals with the degree of membership. Fuzzy logic has been applied in many areas; it is used in a variety of ways. Household appliances such as dishwashers and washing machines use fuzzy logic to determine the optimal amount of soap and the correct water pressure for dishes and clothes. Fuzzy logic is even used in self-focusing cameras. Expert systems, such as decision-support and meteorological systems, use fuzzy logic. Fuzzy logic has many varied applications. The application of fuzzy logic is being debated. Formal logicians argue the usefulness of fuzzy logic while others maintain its practical applications are very successful. For more information, check out #2, #3, #5, #7 on our References page.

HISTORY

Fuzzy Logic deals with those imprecise conditions about which a true/false value cannot be determined. Much of this has to do with the vagueness and ambiguity that can be found in everyday life. For example, the question: Is it HOT outside? probably would lead to a variety of responses from those asked. These are often labeled as subjective responses, where no one answer is exact. Subjective responses are relative to an individual's experience and knowledge. Human beings are able to exert this higher level of abstraction during the thought process. For this reason, Fuzzy Logic has been compared to the human decision making process. Conventional Logic (and computing systems for that matter) are by nature related to the Boolean Conditions (true/false). What Fuzzy Logic attempts to encompass is that area where a partial truth can be established, that is a gradient within the true/false realm. In fuzzy set theory, although it is still possible to have an exact yes/no answer as to set membership, elements can now be partial members in a set. Whereas other logic systems and foundations center on the quantitative aspect of an object, fuzzy logic describes the qualitative nature of things. In many ways, this concept of defining a fuzzy event or thing is related to the rules of grammar that focus on descriptive adjectives and adverbs. For example: That dog barks loudly.

or It is very cold outside. In everyday life, there is no predefined set of decibel levels to determine just how loudly the dog is barking. Likewise for the temperature and weather declaration. Fuzzy logic attempts to take these rather variable statements and develop a method to establish the set with a relative degree of belonging.

Throughout history, even back to the days of Aristotle, true/false relationships have been the primary focus in logic development. The idea of multi-value logic had been explored to some degree, though not with the formality and description of other areas of logic. The concept of Fuzzy Logic was introduced by Professor Lotfi A. Zadeh at the University of California at Berkeley in the 1960's. His goal was to develop a model that could more closely describe the natural language process His pursuit in this field defined some of the basic terminology associated with fuzzy logic such as: Fuzzy Set Theory, Fuzzification, Fuzzy Quantification and Fuzzy Events

Dr. Zadeh, as the prinicpal founder of the fuzzy logic theory has earned numerous Awards, Fellowships and Honors and has contributed a large amount of research and publications to the field of knowledge representation. This trend towards representing the possible variations found in many everyday events has had its applications extend through various business, research, and system development circles, for example, its use in embedded control systems. Specific benefits that have already been identified with the use of fuzzy logic include: reduced development time, quality improvement, ability to deal more efficiently and effectively with real time problems. There is still an inherent difference between fuzzy set theory and the mathematical representation of Probability.

This timeline of the development and uses of fuzzy logic is just a basic overview of this still developing topic of research. With the expansive growth of Computer Systems and Artificial Intelligence, the need to further refine and apply this knowledge is also of great importance and magnitude. Check out references #1, #8, & #9 on our References page for more information.

INTRODUCTION TO FUZZY SETS


Fuzzy logic is a superset of Boolean (conventional) logic that handles the concept of partial truth, which is truth values between "completely true" and "completely false". This section of the fuzzy logic page describes the basics of fuzzy sets.

Basic Definition of Fuzzy Set Similarities and Differences of Fuzzy Sets with Traditional Set Theory Examples Illustrating the Concepts of Fuzzy Sets Logical Operation on Fuzzy Sets Hedging

Fuzzy Sets and Traditional Sets


A fuzzy set is a set whose elements have degrees of membership. That is, a member of a set can be full member (100% membership status) or a partial member (eg. less than 100% membership and greater than 0% membership). To fully understand fuzzy sets, one must first understand traditional sets. A traditional or crisp set can formally be defined as the following:

A subset U of a set S is a mapping from the elements of S to the elements of the set {0,1}. This is represented by the notation: U: S-> {0,1} The mapping is represented by one ordered pair for each element S where the first element is from the set S and the second element is from the set {0,1}. The value zero represents non-membership, while the value one represents membership.

Essentially this says that an element of the set S is either a member or a non-member of the subset U. There are no partial members in traditional sets. Here is an example of a traditional set: Consider a set X that contains all the real numbers between 0 and 10 and a subset A of the set X that contains all the real numbers between 5 and 8. Subset A is represented in the figure below.

In the figure, the interval on the x-axis between 5 and 8 has yvalue of one. This indicates that any number in this interval is a

member of the subset A. Any number that has a y-value of zero is considered to be a non-member of the subset A. Now that you have a clearer understanding of traditional sets, let's get to the fun stuff! Below is the explanation of fuzzy sets: Again a fuzzy set is a set whose elements have degrees of membership. These can formally be defined as the following:

A fuzzy subset F of a set S can be defined as a set of ordered pairs. The first element of the ordered pair is from the set S, and the second element from the ordered pair is from the interval [0,1]. The value zero is used to represent non-membership; the value one is used to represent complete membership, and the values in between are used to represent degrees of membership.

Examples of Fuzzy Sets


EXAMPLE 1 Here is an example describing a set of young people using fuzzy sets. In general, young people range from the age of 0 to 20. But, if we use this strict interval to define young people, then a person on his 20th birthday is still young (still a member of the set). But on the day after his 20th birthday, this person is now old (not a member of the young set). How can one remedy this? By RELAXING the boundary between the strict separation of young and old. This separation can easily be relaxed by considering the boundary between young and old as "fuzzy". The figure below graphically illustrates a fuzzy set of young and old people. Notice in the figure that people whose ages are >= zero and <= 20 are complete members of the young set (that is, they have a membership value of one). Also note that people whose ages are > 20 and < 30 are partial members of the young set. For example, a person who is 25 would be young to the degree of 0.5. Finally people whose ages are >= 30 are non-members of the young set.

EXAMPLE 2 Here is an application demonstrating fuzzy membership: Consider the colorwheel. Remember that there are 3 primary colors: Red, Yellow, and Blue. These colors, separately, represent crisp sets. For example, true red is a nonmember of true blue and of true yellow; true blue is a non-member of true yellow and of true red; yellow is a non-member of true red and of true blue. There is a crisp boundary between these primary colors.

But, as we also learned in elementary school, it is possible to mix these colors with varying amounts of the true colors resulting in different shades of non-true colors. For example, mixing true red with true blue in equal portions of each will result in violet with a membership degree of 0.5 in true red and 0.5 in true blue. Different amounts of true red and true blue will result in varied membership values for the violet. The different violets represent the fuzzy boundaries between true red and true blue! Click here to try it for yourself!

Membership Functions
A membership function is a mathematical function which defines the degree of an element's membership in a fuzzy set. The best way to illustrate this concept is with an example. This example describes a fuzzy set for tallness. Below in the membership function for tallness.
tall(x)= { 0, (height(x)-5ft)/2, 1, if height(x) < 5ft, if 5ft <= height(x) <= 7ft, if height(x) > 7ft

Essentially this function calculates the membership value of a certain height. For example, if a person is less 4'9", then this person has a membership value of 0.0 and thus is not a member of the set tall. If a person is 7'6", then this person has a membership value of 1.0 and thus is a member of the set tall. Finally, if a person is 5'5", then this person has a membership value of 0.21 and is a partial member of the set tall. Below is a graphical representation of the fuzzy set for tallness.

Logical Operations on Fuzzy Sets


Now that we understand what fuzzy sets and membership functions are, we can discuss three basic operation on sets: negation, intersection, and union of fuzzy sets. In L.A. Zadeh first paper, he formally defined these operations in the following mann er:

Negation o membership_value(not x)= 1- membership_value(x) where x is the fuzzy set being negated Intersection o membership_value(x and y) = minimum( membership_value(x), membership_value(y) ) where x and y are the fuzzy set being negated Union

membership_value(x or y) = maximum (membership_value(x), membership_value(y) ) where x and y are the fuzzy set being negated

These concepts are illustrated below. The definitions will also be explained below. Negation

In this figure, the red line is a fuzzy set. To negate this fuzzy set, subtract the membership value in the fuzzy set from one. For example, the membership value at 5 is one. In the negation, the membership value at 5 would be zero (1-1=0). For exa mple, if the membership value is 0.4. In the negation, the membership value would be 0.6 (1-0.4=0.6). Put the mouse over the image to see the negation of the fuzzy set (blue curve). Intersection

In this figure, the red and green lines are fuzzy sets. To find the intersection of these sets take the minimum of the two membership values at each point on the x-axis (see the formal definition above). For example, in the figure the red fuzzy set has a membership of ZERO when x = 4 and the green fuzzy set has a membership of ONE when x = 4. The intersection would have a membership value of ZERO when x = 4 because the minimum of zero and one is zero. Put the mouseover the image to see the intersection of the fuzzy sets (blue curve). Union

In this figure, the red and green lines are fuzzy sets. To find the union of these sets take the maximum of the two membership values at each point on the x-axis (see the formal definition above). For example, in the figure the red fuzzy set has a membership of ZERO when x = 4 and the green fuzzy set has a membership of ONE when x = 4. The union would have a membership value of ONE when x = 4 because the maximum of zero and one is one. Put the mouse over the image to see the union of the fuzzy sets (blue curve). Here is another activity demonstrating the operations on fuzzy set.

The above information was collected from numerous sources, but some of the definitions and images were found at Bibliography #2, #4, #6, & #11 on our References page.

The Concept of Hedging


Much has been made about the relationship of Fuzzy Logic to the human thought process and the ability to handle imprecise conditions that may arise. One of the terms frequently seen in the Fuzzy Logic literature is the concept of Hedging. Hedging can be described as the modifiers to a certain set, much like the way adjectives and adverbs modify statements in the English language. When referring to a fuzzy set, hedges are used to adjust the characteristics of that fuzzy set by either:

Approximating Complementing Diluting Intensifying

Some specific words and their effect on the fuzzy set include: Key Word

Effect on set characteristics

about near close to Approximate the set approximately not somewhat rather quite very extremely Complement the set

Dilute the set

Intensify the set

In general, when a hedge is used to dilute a set, the set is expanded. When a set is intensified with a hedge, the set is compressed. For more information on hedging, check out Reference #3 on our References page.

APPLICATIONS
There are countless applications for fuzzy logic. In fact, some claim that fuzzy logic is the encompassing theory over all types of logic. The items in this list are more common applications that one may encounter in everyday life.

Bus Time Tables How accurately do the schedules predict the actual travel time on the bus? Bus schedules are formulated on information that does not remain constant. They use fuzzy logic because it is impossible to give an exact answer to when the bus will be at a certain stop. Many unforseen incidents can occur. There can be accidents, abnormal traffic backups, or the bus could break down. An observant scheduler would take all these possibilities into account, and include them in a formula for figuring out the approximate schedule. It is that formula which imposes the fuzziness. Go Play the Bus Game!

Predicting genetic traits Does everyone remember Punnet Squares? Genetic traits are a fuzzy situation for more than one reason. There is the fact that many traits can't be linked to a single gene. So only specific combinations of genes will create a given trait. Secondly, the dominant and recessive genes that are frequently illustrated with Punnet squares, are sets in fuzzy logic. The degree of membership in those sets is measured by the occurrence of a genetic trait. In clear cases of dominant and recessive genes, the possible degrees in the sets are pretty strict. Take, for instance, eye color. Two brown-eyed parents produce three blue-eyed children. Sounds impossible, right? Brown is dominant, so each parent must have the recessive gene within them. Their membership in the blue eye set must be small, but it is still there. So their children have the potential for high membership in the blue eye set, so that trait actually comes through. According to the Punnet square, 25% of their children should have blue eyes, with the other 75% having brown. But in this situation, 100% of their children have the recessive color. Was the wife being unfaithful with that nice, blue-eyed salesman? Probably not. It's just fuzzy logic at work. Temperature control (heating/cooling) I don't think the university has figured this one out yet ;-) The trick in temperature control is to keep the room at the same temperature consistently. Well, that seems pretty easy, right? But how much does a room have to cool off before the heat kicks in again? There must be some standard, so the heat (or air conditioning) isn't in a constant state of turning on and off. Therein lies the fuzzy logic. The set is determined by what the temperature is actually set to. Membership in that set weakens as the room temperature varies from the set temperature. Once membership weakens to a certain point, temperature control kicks in to get the room back to the temperature it should be.

Auto-Focus on a camera

How does the camera even know what to focus on? Auto-focus cameras are a great revolution for those who spent years struggling with "old-fashioned" cameras. These cameras somehow figure out, based on multitudes of inputs, what is meant to be the main object of the photo. It takes fuzzy logic to make these assumptions. Perhaps the standard is to focus on the object closest to the center of the viewer. Maybe it focuses on the object closest to the camera. It is not a precise science, and cameras err periodically. This margin of error is acceptable for the average camera owner, whose main usage is for snapshots. However, the "old-fashioned" manual focus cameras are preferred by most professional photographers. For any errors in those photos cannot be attributed to a mechanical glitch. The decision making in focusing a manual camera is fuzzy as well, but it is not controlled by a machine. Medical diagnoses How many of what kinds of symptoms will yield a diagnosis? How often are doctors in error? Surely everyone has seen those lists of symptoms for a horrible disease that say "if you have at least 5 of these symptoms, you are at risk". It is a hypochondriac's haven. The question is, how do doctors go from that list of symptoms to a diagnosis? Fuzzy logic. There is no guaranteed system to reach a diagnosis. If there were, we wouldn't hear about cases of medical misdiagnosis. The diagnosis can only be some degree within the fuzzy set. Predicting travel time This is especially difficult for driving, since there are plenty of traffic situations that can occur to slow down travel. As with bus timetabling, predicting ETA's is a great exercise in fuzzy logic. That's why it is called an estimated time of arrival. A major player in predicting travel time is previous experience. It took me six hours to drive to Philadelphia last time, so it should take me about that amount of time when I make the trip again. Unfortunately, other factors are not typically considered. Weather, traffic, construction, accidents should all be added into the fuzzy equation to deliver a true estimate. Antilock Braking System It's probably something you hardly think about when you're slamming on the brakes in your car The point of an ABS is to monitor the braking system on the vehicle and release the brakes just before the wheels lock. A computer is involved in determining when the best time to do this is. Two main factors that go into determining this are the speed of the car when the brakes are applied, and how fast

the brakes are depressed. Usually, the times you want the ABS to really work are when you're driving fast and slam on the brakes. There is, of course, a margin for error. It is the job of the ABS to be "smart" enough to never allow the error go past the point when the wheels will lock. (In other words, it doesn't allow the membership in the set to become too weak.) For more ideas about applications of fuzzy logic, go visit the http://www.flll.unilinz.ac.at/navigation/main_navigation/frame_aboutus.html Then click on Applications under Fuzzy Course.

LIMITATIONS
It is difficult to make arguments for certain theories if it can't be shown to perform alongside existing and accepted theories. Things like propositional logic are exact. If a statement in propositional logic could be illustrated with fuzzy logic...and fuzzy logic did it better, then maybe fuzzy would be more widely accepted. Fuzzy logic cannot be used for unsolvable problems. This seems fairly reasonable, but its perception of being a guessing game may lead people to believe that it can be used for anything. An obvious drawback to fuzzy logic is that it's not always accurate. The results are perceived as a guess, so it may not be as widely trusted as an answer from classical logic. Certainly, though, some chances need to be taken. How else can dressmakers succeed in business by assuming the average height for women is 5'6"? Fuzzy logic can be easily confused with probability theory, and the terms used interchangeably. While they are similar concepts, they do not say the same things. Probability is the likelihood that something is true. Fuzzy logic is the degree to which something is true (or within a membership set). Classical logicians argue that fuzzy logic is unnecessary. Anything that fuzzy logic is used for can be easily explained using classic logic. For example, True and False are discrete. Fuzzy logic claims that there can be a gray area between true and false. But classic logic says that the definition of terms is inaccurate, as opposed to the actual truth of the statement. Fuzzy logic has traditionally low respectability. That is probably its biggest problem. While fuzzy logic may be the superset of all logic, people don't believe it. Classical logic is much easier to agree with because it delivers precision. Openmindedness on the part of those who use logic is needed in order to change the acceptance of fuzzy logic. Contrary to popular belief, fuzzy logic can be used to solve the same types of problems that classical logic does. See the subject of crisp sets on our Sets page. So it is less that fuzzy logic has actual limitations and more that it has perceived limitations.

Arguments about Limitations of Fuzzy Logic


Haack, a formal logician, has some criticisms about fuzzy logic. She states that there are only two areas where fuzzy logic is "needed". (But, in each case, Haack can show that ultimately classical logic can substitute for fuzzy logic.) The following are Haack's two cases that may require fuzzy logic:

Nature of Truth and Falsity- Haack argues that True and False are discrete terms. In classical logic, any fuzziness that arises from a statement is due to an imprecise definition of terms. But, Haack says that if it can be shown that fuzzy values are indeed fuzzy (meaning not discrete), then a need for fuzzy logic would be demonstrated.

For example, is this rectangle blue? It's difficult to say whether it blue or not. Because it's partially blue, but it is also partially green. Well, classical logicians would say that the term blue was not defined precisely enough. A more precise question would be: is this rectangle composed of 0/255 parts red, 0/255 parts green, and 0/255 parts blue? With the the terms more precisely defined, the answer is FALSE because this rectangle has the following color components: 0/255 parts red, 128/255 parts green, and 128/255 parts blue.

Utility of Fuzzy Logic- Haack says if it can be shown that generalizing classic logic to include fuzzy logic would aid calculations, then fuzzy logic would be needed. But, Haack argues that data manipulation in a fuzzy system actually becomes more complex. So, fuzzy logic is not necessary.

So, ultimately, Haack believes fuzzy logic is not necessary because the calculations are more involved and partial membership values can be eliminated by defining terms more precisely. Fox has responded to Haack's objections. He believes that the following three areas can benefit from fuzzy logic:

"Requisite" Apparatus- Use fuzzy logic to describe real-world relationships that are inherently fuzzy. "Prescriptive" Apparatus- Use fuzzy logic because some data is inherently fuzzy and needs fuzzy calculus. "Descriptive" Apparatus- Use fuzzy logic because some inferencing systems are inherently fuzzy.

Fox argues that fuzzy and classical logic should not be seen as competitive but as complementary. Fox also states that fuzzy logic has found its way into the world of practical applications and has proved successful there. He says this is reason enough to continue development in the field of fuzzy logic. Again we had some help from numerous Fuzzy Logic sites, namely #11 & #12 on our References page.

REFERENCES
1. Aptronix, Inc. Fuzzy Inference Development Environment (FIDE)[online] 14 November 1999. [cited 28 November 1999]. Available from the World Wide Web: < http://www.aptronix.com/fide/whatfuzzy.htm >. 2. Bauer, Peter; Nouak, Stephan; Winkler, Roman. A brief course in Fuzzy Logic and Fuzzy Control [online] Fuzzy Logic Laboratorium Linz-Hagenberg [published 1996-12-04]. Available from internet: < http://www.flll.uni-linz.ac.at/pdw/fuzzy/fuzzy.html >. 3. Brule, James. Fuzzy Systems - A Tutorial[ online ] 1985.[ cited 24 October1999 ]. Available from the World Wide Web: < http://life.csu.edu.au/complex/tutorials/fuzzy.html >. 4. Fuzzy/Neurofuzzy Logic [online] Neurosciences. Available from internet: < http://www.neurosciences.com/nn_fzy.htm >.

5. Goebel, Greg. An Introduction to Fuzzy Control Systems[ online ] 23 December 1995.[ cited 24 October 1999 ]. Available from the World Wide Web: < http://www.isis.ecs.soton.ac.uk/research/nfinfo/fuzzycontrol.html >. 6. H., Terry. Fuzzy Logic [online] Knowledge Technology, Inc. [published 1998]. Available from internet: < http://www.pcai.com/pcai/New_Home_Page/glossary/ pcai_d_f_glossary.html#Fuzzy_Logic >. 7. Kantrowitz, M.; Horstkotte, E.; Joslyn, C. Answers to Questions about Fuzzy Logic and Fuzzy Expert Systems[ online ] 14 March1997.[ cited 24 October1999 ]. Available from the World Wide Web: < http://www.cs.cmu.edu/Groups/AI/html/faqs/ai/fuzzy/part1/faq.html >. 8. Miller, Byron. Embedded Systems Programming: A Case for Fuzzy Logic [online] 1998. [cited 26 November 1999]. Available from World Wide Web: < http://www.embedded.com/97/feat9512.htm > 9. Scanlon, Sean P.What is Fuzzy Logic? [online] 10 August 1998 [cited 29 October 1999]. Available from the World Wide Web: < http://www.cae.wisc.edu/~scanlon/fuzzy_logic/fuzzy_info.html > 10. Siler, William. Constructing Fuzzy [online] [cited 29 October 1999]. Available from World Wide Web: < http://members.aol.com/wsiler/intro.htm > 11. What is fuzzy logic? [online] [published 1993-04-15]. Available from internet: < http://www.cs.cmu.edu/groups/AI/html/faqs/ai/fuzzy/part1/faq-doc-2.html >. 12. Zadeh, Lotfi. Fuzzy Sets. Information and Control 8:338-353, 1965.

FUZZY LOGIC WEB SITE:


http://www.dementia.org/~julied/logic/index.html

S-ar putea să vă placă și