Google


Language Translator

Monday, July 30, 2007

Application of Fuzzy Logic in Fully Automatic Washing Machine

Fuzzy control, which directly uses fuzzy rules is the most important application in fuzzy theory. Using a procedure originated by Ebrahim Mamdani in the late 70s, three steps are taken to create a fuzzy controlled machine:

1.Fuzzification(Using membership functions to graphically describe a situation)
2.Rule evaluation(Application of fuzzy rules)
3.Defuzzification(Obtaining the crisp results)

To build a more fully automatic washing machine with self determining wash times, we are going to focus on two subsystems of the machine: (1) the sensor mechanism and (2) the controller unit. The sensor system provides external input signals into the machine from which decisions can be made. It is the controller's responsibility to make the decisions and to signal the outside world by some form of output. Because the input/output relationship is not clear, the design of a washing machine controller has not in the past lent itself to traditional methods of control design. We address this design problem using fuzzy logic.

Input/Output of Controller

Fuzzy logic controller have two inputs: (1) one for the degree of dirt on the clothes and (2) one for the type of dirt on the clothes. These two inputs can be obtained from a single optical sensor. The degree of dirt is determined by the transparency of the wash water. The dirtier the clothes, the lower the transparency for a fixed amount of water. On the other hand, the type of dirt is determined from the saturation time, the time it takes to reach saturation. Saturation is the point at which the change in water transparency is close to zero (below a given number). Greasy clothes, for example, take longer for water transparency to reach saturation because grease is less water soluble than other forms of dirt. Thus a fairly straightforward sensor system can provide the necessary inputs for our fuzzy controller.

Definition of Input/Output Variables

Before designing the controller, we must determine the range of possible values for the input and output variables. These are the membership functions used to translate real world values to fuzzy values and back. Figure below shows the labels of input and output variables and their associated membership functions. Note that wash time membership functions are singletons (crisp numbers) in this example. We can use fuzzy sets or singletons for output variables. Singletons are simpler than fuzzy sets. They need less memory space and work faster. If we could not be satisfied by the result when output values are given by singletons we could change them into fuzzy sets. We should use Mandani's method for inference if we want to define output values as fuzzy sets.

Linguistic variables & their ranges

Fuzzy logic for Dirtiness &Type of dirt input

Linguistic variable: Dirtiness, D
Linguistic value Notation Numerical range
Small S [0.00, 50.00]
Medium M [0.00, 100.00]
Large L [50.00, 150.00]

Linguistic variable: Type of dirt, TD
Linguistic value Notation Numerical range
Not greasy NG [0.00, 50.00]
Medium M [0.00, 100.00]
Greasy G [50.00, 150.00]

Rules

The decision making capabilities of a fuzzy controller are codified in a set of rules. In general, the rules are intuitive and easy to understand, since they are qualitative statements written in English like if-then sentences. Rules for our washing machine controller are derived from common sense, data taken from typical home use, and experimentation in a controlled environment. A typical intuitive rule is as follows:

The rule table


Rule

D

TD

Wash time


1

S

NG

VS


2

M

NG

S


3

L

NG

L


4

S

M

S


5

M

M

M


6

L

M

L


7

S

G

M


8

M

G

L


9

L

G

VL


10

S

NG

VS


11

S

M

S


12

S

G

M


13

M

NG

S


14

M

M

M


15

M

G

L


16

L

NG

L


17

L

M

L


18

L

G

VL


19

S

NG

VS


20

M

M

M


21

L

G

VL


Saturday, July 21, 2007

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.

Human beings make decisions based on rules. Even though, we may not be aware of it, all the decisions we make are based on computer like if-then statements. If the weather is fine, then we may decide to go out. If the forecast says the weather will be bad today, but fine tomorrow, then we make a decision not to go today, and postpone it till tomorrow. Rules associate ideas and relate one event to another.

Fuzzy machines which always tend to mimics the behavior of man work the same way. Only this time the decision and the means of choosing that decision are replaced by fuzzy sets and the rules are replaced by fuzzy rules. Fuzzy rules also operate using a series of if-then statements. For instance, X then A, if y then b, where A and B are all sets of X and Y. Fuzzy rules define fuzzy patches, which is the key idea in fuzzy logic.

A machine is made smarter using a concept designed by Bart Kosko called the Fuzzy Approximation Theorem (FAT). The FAT theorem generally states a finite number of patches can cover a curve as seen in the figure below. If the patches are large, then the rules are sloppy. If the patches are small then the rules are fine.

Thursday, July 19, 2007

The Fuzzy Logic

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. 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 Prof. Lotfi Zadeh at the University of California, 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.

Many people would note that fuzzy logic sounds good, but how is it being used. A good example is a fuzzy washing machine. Using yes and no logic to make a washing machine that would automatically handle all the controls on a load of wash, would add hundreds of dollars to the cost of the machine. Dozens of special sensors and the equivalent of a small computer would have to be added to the machine. The fuzzy washing machines being sold in Japan for the last few years cost about twenty dollars more, use a handful of inexpensive sensors and a small logic chip. All you have to do to use the machine, in many cases, is put the clothes in and turn it on.
Most scientists refused to look closely at the logic, when it was first talked about. The ideas seemed too radical to them. It took engineers first in Europe, but mainly in Japan to start using fuzzy logic before scientists started to take it seriously.

Other applications of Fuzzy logic such as:

  • Automobile subsystems, such as ABS and cruise control
  • Air conditioners
  • Cameras
  • Digital image processing, such as edge detection
  • Rice cookers
  • Dishwashers
  • Washing machines and other home appliances.