India in about 500 BC and founded a religion called Buddhism. His philosophy was based on the thought that the world is filled with contradictions, that almost everything contains some of its opposite, or in other words, that things can be A and not-A at the same time. Here we can see a clear connection between Buddha’s philosophy and modern fuzzy logic.

About 200 years later, the Greek scholar Aristotle developed binary logic. In contrary to Buddha, Aristotle thought that the world was made up of opposites, for example male versus female, hot versus cold, dry versus wet, active versus passive. Everything has to be A or not-A, it can’t be both.

Aristotle’s binary logic became the base of science; it was proved using logic, and was accepted as scientifically correct. Like many others, Russell tried to reduce math to logic. When he discovered his paradox while working, he got scared himself. It did, however, give him the honor of being one of the fathers of fuzzy logic.

In 1965 Lotfi Zadeh at UC Berkeley proposed a logic system that supported infinite value logic. Zadeh proposed that an element can have a membership function that describes its membership of a set. For example, the expression mA(x) is the membership function of x in A.

Zadeh’s logic was called “Fuzzy set theory” which has proved a little unfortunate because some have taken “fuzzy” to mean imprecise or inaccurate.

He had the idea that if you could tell an air-conditioner to work a little faster when it gets hotter, or similar problems, it would be much more efficient than having to give a rule for each temperature.

## WHAT IS FUZZY LOGIC?

The word FUZZY basically means: imprecise, not clear, vague or inexact

Few definitions of fuzzy logic:

## “A form of reasoning, derived from fuzzy set theory, whereby a truth value need not be exactly zero (false) or one (true), but rather can be zero, one, or any value in between”

en.wiktionary.org/wiki/fuzzy_logic

“Fuzzy Logic was conceived by Lotfi Zadeh, a professor at the University of California at Berkley as a better method for sorting and handling data. It mimics human control logic and is now being applied in the world of trading systems.”

www.sicom.com.sg/index.cfm

“A sub-discipline of mathematics used to quantify subjective linguistic concepts, such as bright, dark, very far, quite close, most usually, almost impossible, etc.”

www.fileformat.info/mirror/egff/glossary.htm

“A method used to model linguistic expressions that have nonbinary truth- values. It has been used with PID algorithms in process control, especially where process relationships are nonlinear.”

www.atlab.com/index.php/LIMS-Glossary-Terms-F-J.html

“A technique used by an expert system to deal with imprecise data by incorporating the probability that the input information is correct.”

www.thecomputerfolks.com/f.htm

“Fuzzy logic is designed for situations where information is inexact and traditional digital on/off decisions are not possible. It divides data into vague categories such as “hot”, “medium” and “cold”.”

dereng.com/tlas_glossary.htm

Formal Definition:

## The Basic Idea of Fuzzy Sets

Fuzzy sets are functions that map a value, which might be a member of set, to a number which lies between zero and one, thereby indicating its actual degree of membership

A degree of zero means that the value is not in the set, and a degree of one means that the value is completely representative of the set.

## Characteristic Function:

Conventionally we can specify a set C by its characteristic function, Char C(x).

If U is the universal set form which values of C are taken, then we can represent C as

C = { x | x Î U and Char C(x) = 1}

This is the representation for a crisp or non-fuzzy set. For an ordinary set C, the characteristic function is of the form

Char C(x): U à {0,1}

However for a Fuzzy set A we have

Char F(x): U à [0,1]

That is, for a fuzzy set the characteristic function takes on all values between 0 and 1

## and not just the discrete values 0 or 1.

## For a fuzzy set the characteristic function is often called the membership function and denoted by mF(x)

## An example:

If we use conventional method we can say that a person is “TALL” if his height is 7 feet and a person is NOT TALL with height 5 feet. This can be represented that the person is either “TALL” or “NOT TALL” in Boolean Logic 1 or 0, 1 for “TALL” and 0 for “NOT TALL”

## To show the relationship or degree of precision, we can use FUZZY SETS also:

If S is the set of all people in the Universe, a degree of membership is assigned to each person in set S to find the subset TALL.

The membership function is based on the person’s height.

TALL(x) = 0, if Height(x) < 5′

(Height(x) – 5′ )/ 2′ if 5′<= Height(x) <= 7

1, if height(x)> 7 feet

Boolean logic vs Fuzzy Logic

## Boolean Logic

## Fuzzy Logic

Boolean or “two-valued” logic is traditional logic with all statements either being true or false.

Fuzzy or “multi-valued” logic is a variation of traditional logic in which there are many (sometimes infinitely many) possible truth values for a statement. True is considered equal to a truth value of 1, false is a truth value of 0, and the real numbers between 1 and 0 are intermediate values.

Here’s an example: Suppose we want to illustrate the set of adults using a binary set, we would get a graph like the one on the right. In this picture it is assumed that a person becomes a grown-up on his or her 18th birthday. It is that every person is either adult or non-adult, in the graph 1 or 0.

When we graph the fuzzy set of adults, we get something like the picture on the left. In this there lies a gradual process between being adult and non-adult. Again we can argue or disagree over this saying how exactly the curve should be drawn. Someone might say that a 13 year old is completely non-adult or that a 19 year old has to be counted in the category of adult. But we can be sure that the fuzzy curve of the set of adults is closer to the truth then the binary curve; as we all can agree that there can’t be given a specific date when people turn into adults. It’s not like we go to bed one day as a child and wake up the next as an adult. Growing up is a gradual process and gradual processes can be better described using fuzzy sets where there are no discrete values.

## FEW MORE EXAMPLES OF FUZZINESS AND ITS USAGE

For example, if you ask a question in a school class, “Who is female?”, all the girls will put up their hands up and all the boys will keep them down. We can get a clear answer, since everyone is either female or is a non-female.

What if the same kids are asked a question like, “Who likes school?” Some kids may put up their hands all the way (they definitely like school) and others might keep their hand down (they hate school). Most of the kids however will put their hand up and take it down again a few times and then leave it somewhere in the middle. Maybe they like school in general, but there are some bad things about it that they don’t like for instance examinations, or they actually don’t like school in general, but sometimes it’s fun so in an all they are confused and should be showed in middle way.

If these results are represented with binary logic, they need to be reduced to each result to the extremes of either loving school or hating school; A or not-A. Here we need a different kind of logic to note the answers accurately and precisely; we need a logic where the kids can both like school and not like school at the same time. For that we use fuzzy logic.

A human characteristic such as healthy.

The classification of patients as depressed.

The bifurcation of certain objects as large or small.

The distinguition of people by age such as old.

A rule for driving such as “if an obstacle is close, then brake immediately”.

## FUZZY OPERATIONS

## STEPS OF IMPLEMENTATION OF FUZZY LOGIC

Fuzzification – to convert numeric data (for e.g., $24.50 ) in real-world domain to fuzzy-numbers in fuzzy domain

Aggregation (rule firing) – computation of fuzzy numbers (all of which lie between 0.0 and 1.0 ) i.e. in fuzzy domain

Defuzzification – convert the obtained fuzzy number back to the numeric data in the real-world domain (e.g. 150.34% in total profitability).

## WHY TO USE FUZZY LOGIC?

## Fuzzy logic advantages:

Mimics and translates human decision making to handle vague, uncertain and imprecise concepts

Rapid and faster computation due to intrinsic parallel processing nature

Ability to deal with imprecise or imperfect and uncertain information

Resolving conflicts by collaboration and propogation

Improved knowledge and information representation and uncertainty reasoning

Modeling of complex and non-linear problems

Natural language processing as well as programming capability

Computers do not reason as brains do. 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.

## Fuzzy logic limitations:

Highly abstract and heuristic concept

Need of experts for rule discovery (data relationships) i.e using fuzzy computation

Lack of self-organizing & self-tuning mechanisms of Neural Nets

Though fuzzy Systems are used world-wide in various applications, it still remains controversial amongst statisticians who prefer Bayesian logic or two-valued theory.

APPLICATIONS OF FUZZY

## There are countless applications for fuzzy logic. In fact, some claim that fuzzy logic is the encompassing theory over all types of logic. These few items described below are more common applications which one may encounter in everyday life.

## Bus Time Tables

How accurately do the schedules of bus timings predict the actual travel time or the actual arrival time of the bus?

Bus schedules are formulated on information that does not remain constant. For this fuzzy logic should be used because it is impossible to give an exact answer as to when the bus will be at a certain stop. Many unforeseen 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 using fuzzy logic.

## Predicting genetic traits

Genetic traits or characteristics 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 quite 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 as it’s a recesive one , so that trait actually comes through. According to the Punnet square, 25% of their children should have blue eyes, with the other 75% should have 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)

The main objective 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 i.e. in conventional form of 1’s and 0’s. 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 automatically, based on multitudes of inputs, what is meant to be the main object of the photo. It uses 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” and earlier used 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?

There lies a list 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 through 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 due to slow down travel.

As with bus timetabling, predicting ETA’s (estimated time of arrival) is a great exercise in fuzzy logic. A major player in predicting travel time. Weather, traffic, construction, accidents should all be added into the fuzzy equation to deliver a true estimate.

## Antilock Braking System

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.)

## Fuzzy Machines

Fuzzy Washing Macine

Fuzzy Rice-Cooker

Fuzzy Vaccum-cleaners

Fuzzy Refrigerators

## REFRENCES

Fuzzy Sets and Fuzzy Logic theory and applications, George J.Klir, Bo Yuan

A First Course in Fuzzy Logic by Hung T.Nguyen and Elbert A. Walker

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

http://mathematica.ludibunda.ch/fuzzy-logic6.html