Fuzzy Logic
Home Up History Ethics Resources Architecture

 

 
Logic and Aristotle

Fuzzy Operations

Introduction to control

 

Digital computers are constructed from digital logic elements (gates and flip-flops) that obey the laws of Boolean algebra. Digital systems can be described as hard because a signal is always 0 or 1 and there is no intermediate state between a 0 and a 1 state. 

In the 1960s a new type of logic called fuzzy logic was developed by Lotfi Zadeh at UC Berkeley. Fuzzy logic is not a replacement for conventional Boolean algebra and computer circuits; it models certain aspects of the real world and can help solve problems that are difficult for conventional digital computers. 

Fuzzy logic is not suited to data processing or graphics; it is particularly suited to control systems such as speed control in a subway train. Fuzzy logic can also be used in pattern recognition (for example, handwriting recognition). 

You could say that humans employ a form of fuzzy logic when performing everyday activities such as walking or driving. Suppose you are driving down a road; you have to select an appropriate speed. The speed at which you drive is determined by the speed limit in force, the speed, spacing, and behavior of other traffic, road conditions (surface wetness, straightness of road etc.), and your personal preferences and limitation. The number of factors that determine your speed are large and the potential amount of computation immense. Fortunately, we adjust our speed without thinking about it by. You can think of fuzzy logic acting in a similar way.

We have variables in fuzzy logic just as we have variables in Boolean algebra. The difference between a Boolean value and a fuzzy logic value is that the Boolean variable must be 0 or 1 whereas the fuzzy logic value is continuous within a range. How does a fuzzy variable get a value? The value of a fuzzy variable is an indication of the degree to which the variable is a member of a set. We can regard everyday values like “hot” or “cold” as fuzzy values. There is no such temperature as hot or cold. A person my regard a temperature of 30 C as hot. Is 29 C hot? Yes, because we can’t easily tell the difference between 29 and 30 C. Is 28 C hot? What about 25 C? Fuzzy logic defines the degree to which a variable belongs to a set; for example, this diagram shows membership of the set “hot”.  

 The next figure demonstrates how we could split the temperature of a room into, say, four regions: cold, cool, warm, and hot. As you can see, some temperatures have a membership of two sets; for example, 20 C has membership of both the warm and hot regions. 

 It’s rather unfortunate that the term “fuzzy” has been coined to describe fuzzy logic because the word implies a lack of precision. Nothing could be further from the truth. The temperature of the room can be measured very accurately. The value of the fuzzy variable “hot” indicates the degree to which the temperate falls in the class “hot”.

Why does this matter? It matters because you can take several fuzzy values and perform fuzzy logic operations on them to yield a result. The result is then turned into a so-called crisp (non-fuzzy value) and used to control something. 

The Fuzzy Controller

We live in an age of automatic control; for example, if you fly from Los Angeles to London the pilot might fly the aircraft for as little as three minutes in an eleven hour flight. Modern electronic control systems are largely descended from the radar tracking systems developed in World War 2.

A control system measures the difference between a desired (or demanded) parameter and a measured parameter and then moves the parameter in such a way as to reduce the difference. For example, if you hold a finger in front of your face and you wish to touch your nose, your brain measures the distance between your finger finger and nose and then moves your muscles to reduce the distance.

Designing a control system is difficult and requires the solution of the complex equations that govern the system being controlled. Fuzzy logic sometimes allows us to design controllers without a precise knowledge of the system being controlled.

A fuzzy controller takes the parameters of a system being controlled and then fuzzifies them. For example, if a parameter is temperature, its is fuzzified to, say, very cold, cold, cool, warm, hot, very hot. Other parameters such are rate-of-change-of-temperature are also measured; for example, rapid cooling, slow cooling, little change, slow warming and rapid warming.

Having extracted the fuzzy parameters, they are applied to a fuzzy decision system to generate a fuzzy output. For example, we might say "IF cold AND rapidly warming THEN set heater output low". The fuzzy output is then defuzzified (i.e., turned into a crisp or real value) and used to control the heater.

The art of designing a fuzzy logic controller is in choosing the variables to measure, creating an appropriate number of fuzzy levels, and then constructing the fuzzy rules.

The advantage of a fuzzy controller is its simplicity and the ability to implement it with very low-cost logic or a simple microcontroller.

 

 

 

 

 

 

 

Fuzzy Successes

Mamdani's steam engine