Home Page and Additional Chapters
FUZZY LOGIC FOR "JUST PLAIN FOLKS"
Chapter 1: Fuzzy Logic - a Powerful Way to Analyze and Control Complex Systems
Introduction
Welcome to the wonderful world of fuzzy logic, the science you can use to powerfully get things done. Add the ability to utilize personal computer based fuzzy logic analysis and control to your technical and management skills and you can do things that humans and machines cannot otherwise do. Get a competitive edge!
Following is the base on which fuzzy logic is built:
As the complexity of a system increases, it becomes more difficult and eventually impossible to make a precise statement about its behavior, eventually arriving at a point of complexity where the fuzzy logic method born in humans is the only way to get at the problem.
(Originally identified and set forth by Lotfi A. Zadeh, Ph.D., University of California, Berkeley)
Fuzzy logic is used in system control and analysis design, because it shortens the time for engineering development and sometimes, in the case of highly complex systems, is the only way to solve the problem.
E.H. Mamdani is credited with building the world's first fuzzy logic controller, after reading Dr. Zadeh's paper on the subject (see Ch. 2 of this tutorial). Dr. Mamdani, London University, U.K., stated firmly and unequivocally that utilizing a fuzzy logic controller for speed control of a steam engine was much superior to controlling the engine by conventional mathematically based control systems and logic control hardware. Dr. Mamdani found that, using the conventional approach, extensive trial and error work was necessary to arrive at successful control for a specific speed set-point. Further, due to the non-linearity of the steam engine operating characteristics, as soon as the speed set-point was changed, the trial and error effort had to be done all over again to arrive at effective control. This did not occur with the fuzzy logic controller, which adapted much better to changes, variations and non-linearity in the system.
The following chapters of this tutorial attempt to explain for us "Just Plain Folks" how the "fuzzy logic method born in humans" is used to evaluate and control complex systems. Although most of the time we think of fuzzy logic "control" as having to do with controlling a physical system, there is no such limitation in the concept as initially presented by Dr. Zadeh. Fuzzy logic can apply also to economics, psychology, marketing, weather forecasting, biology, politics ...... to any large complex system.
The term "fuzzy" was first used by Dr. Lotfi Zadeh in the engineering journal, "Proceedings of the IRE," a leading engineering journal, in 1962. Dr. Zadeh became, in 1963, the Chairman of the Electrical Engineering department of the University of California at Berkeley. That is about as high as you can go in the electrical engineering field. Dr. Zadeh’s thoughts are not to be taken lightly.
Fuzzy logic is not the wave of the future. It is now! There are already hundreds of millions of dollars of successful, fuzzy logic based commercial products, everything from self-focusing cameras to washing machines that adjust themselves according to how dirty the clothes are, automobile engine controls, anti-lock braking systems, color-film developing systems, subway control systems and computer programs trading successfully in the financial markets.
Note that when you go searching for fuzzy-logic applications in the United States, it is difficult to impossible to find a control system acknowledged as based on fuzzy logic. Just imagine the impact on sales if General Motors announced their anti-lock braking was accomplished with fuzzy logic! The general public is not ready for such an announcement.
Objectives of the following chapters include:
1. To introduce to individuals in the fields of business, industry, science, invention and day-to-day living the power and benefits available to them through the fuzzy logic method and to help them understand how fuzzy logic works.
2. To provide a fuzzy logic "how-to-do-it" guide, in terms everyone can understand, so everyone can put fuzzy logic to work doing something useful for them.
This tutorial is being written so "Just Plain Folks" can understand the concept of fuzzy logic sufficiently to utilize it, or to at least determine if they need to dig deeply into the subject in the great quantity of Ph.D. level literature existing on the subject. This tutorial is a guide, so you can do something with fuzzy logic, even if you are not a Ph.D. specializing in the field or an advanced digital systems electronics engineer.
The paragraphs below say in a few short words, "what fuzzy logic is." But, reading this tutorial and other publications on the subject will be helpful for a fuller understanding.
Fuzzy Logic Analysis and Control
A major contributor to Homo sapiens success and dominance of this planet is our innate ability to exercise analysis and control based on the fuzzy logic method. Here is an example:
Suppose you are driving down a typical, two way, 6 lane street in a large city, one mile between signal lights. The speed limit is posted at 45 Mph. It is usually optimum and safest to "drive with the traffic," which will usually be going about 45 Mph. How do you define with specific, precise instructions "driving with the traffic?" It is difficult. But, it is the kind of thing humans do every day and do well.
There will be some drivers weaving in and out and going more than 45 Mph and a few drivers driving less than 45 Mph. But, most drivers will be driving 45 Mph. They do this by exercising "fuzzy logic" - receiving a large number of fuzzy inputs, somehow evaluating all the inputs in their human brains and summarizing, weighting and averaging all these inputs to yield an optimum output decision. Inputs being evaluated may include several images and considerations such as: What are the cars in front doing? How fast are they driving. Any drivers going real slow? Any trucks holding up one of the lanes. How about side traffic entering from side streets. What do you see in the rear view mirror. Even with all this, and more, to think about, those who are driving with the traffic will all be going along together at very nearly the same speed.
The same ability you have to drive down a modern city street was used by our ancestors to successfully organize and strategically carry out chases to drive wooly mammoths into pits, to obtain food, clothing and bone tools.
Human beings have the ability to take in and evaluate all sorts of information from the physical world they are in contact with and to mentally analyze, average and summarize all this input data into an optimum course of action. All living things do this, but humans do it more and do it better and have become the dominant species of the planet.
If you think about it, much of the information you take in is not very precisely defined, such as evaluation of the behavior of a vehicle entering from a side street and the likelihood of the vehicle pulling in front of you. We call this fuzzy input. However, some of your "input" is reasonably precise and non-fuzzy such as the speedometer reading. Your processing of all this information is not very precisely definable. We call this fuzzy processing. Fuzzy logic theorists would call it using fuzzy algorithms (algorithm is another word for procedure or program, as in a computer program).
Fuzzy logic is the way the human brain works, and we can mimic this in machines so they will perform somewhat like humans (not to be confused with Artificial Intelligence, where the goal is for machines to perform EXACTLY like humans). Fuzzy logic control and analysis systems may be electro-mechanical in nature, or concerned only with data, for example economic data, in all cases guided by "If-Then rules" stated in human language.
The Fuzzy Logic Method
The fuzzy logic analysis and control method is, therefore:
1. Receiving of one, or a large number, of measurement or other assessment of conditions existing in some system we wish to analyze or control.
2. Processing all these inputs according to human based, fuzzy "If-Then" rules, which can be expressed in plain language words.
3. Averaging and weighting the resulting outputs from all the individual rules into one single output decision or signal which decides what to do or tells a controlled system what to do. The output signal eventually arrived at is a precise appearing, defuzzified, "crisp" value. Please see the following Fuzzy Logic Control/Analysis Method diagram:

Fuzzy Perception
A fuzzy perception is an assessment of a physical condition that is not measured with precision, but is assigned an intuitive value. It will be seen below that fuzzy perceptions can serve as a basis for processing and analysis in a fuzzy logic control system.
Measured, non-fuzzy data is the input for the fuzzy logic method. Examples: temperature measured by a temperature transducer, motor speed, economic data, financial markets data, etc. Then humans with their fuzzy perceptions and fuzzy rules take over. Human perceptions and rules are placed in-the-loop in the fuzzy logic based control system.
Fuzzy Sets
"Fuzzy sets" can be a complex mathematical term in multivalued logic. For our purposes in considering electro-mechanical systems control, a fuzzy set is an object with elements, or members, which can belong to it in degrees.
Examples of fuzzy sets are: motor speed, boiler pressure, shower-water temperature, etc. Too high motor speed, very low boiler pressure and hot shower water are sub-sets of the fuzzy sets.
Assigning Zero to One Values to Fuzzy Sub-SetsWhen implementing fuzzy logic control with human originated rules in the loop, we must have a way to assign some numeric value to humans' intuitive assessments of fuzzy sets. We must translate from human fuzziness to numbers that can be used by a computer. We do this by assigning fuzzy sub-set conditions a value from zero to 1.0. In setting up a control system for room temperature, for example, we could assign a membership of "1.0" in the sub-set of "just right" when the temperature is 75 degrees F. Then, if the temperature drops to 70 degrees F, we might design the system for a membership in the "just right" sub-set of ".8". This becomes clearer in Chapter 3 when plans for an actual fuzzy control system are presented.
Fuzzy logic makes use of human common sense. This common sense is either applied from what seems reasonable, for a new system, or from experience, for a system that has previously had a human operator.
Here is an example of converting human experience for use in a control system: In Italy, a project was undertaken to automate a cement plant. Cement manufacturing is a lot more difficult than you would think. Through the centuries it has evolved with human "feel" being absolutely necessary. Engineers were not able to automate with conventional control. Eventually, they translated the human "feel" into lots and lots of fuzzy logic "If-Then" rules based on human experience. Success was thereby obtained in automating the plant.
Objects of fuzzy logic analysis and control may include: physical control, such as machine speed, or operating a cement plant; financial and economic decisions; physiological conditions; safety conditions; security conditions; production improvement and much more.
This tutorial will talk about fuzzy logic in control applications - controlling machines, physical conditions, processing plants, etc. It should be noted that when Dr. Zadeh invented fuzzy logic, it appears he had in mind applying fuzzy logic in many applications in addition to controlling machines, such as economics, politics, biology, etc.
Thank You Wozniak (Apple Computer), Jobs (Apple Computer), Gates (Microsoft) and Ed Roberts (the MITS, Altair entrepreneur) for the Personal Computer!
The availability of the fuzzy logic method to us "Just Plain Folks" has been made possible by the availability of the personal computer. Without personal computers, it would be difficult to use fuzzy logic to control machines and production plants, or do other analyses. Without the speed and versatility of the personal computer, we could not handle the complexity, millions of calculations, speed and endurance needed for machine control.
Standard programmable logic controllers have their place! They are simple, reliable and keep American industry operating where the application is relatively simple, linear and on-off in nature.
For a more complicated system control application, an optimum solution may be patching things together with a personal computer and fuzzy logic rules, especially if the project is being done by someone who is not a professional control systems engineer.
A Milestone Passed for Intelligent Life On Earth
Where intelligent life has appeared in the universe, "they" are probably using fuzzy logic. It is a universal principle and concept. Becoming aware of, defining and starting to use fuzzy logic is an important moment in the development of an intelligent civilization. On earth, we have just arrived at that important moment.
Fuzzy Logic Terms Found in Books and Articles
The discussion so far does not adequately prepare us for reading and understanding most books and articles about fuzzy logic, because of the terminology used by sophisticated authors. Following are explanations of some terms which should help in this regard. This terminology was initially established by Dr. Zadeh when he originated the fuzzy logic concept.
Fuzzy - The degree of fuzziness of a system control rule can vary between being very precise, in which case we would not call it "fuzzy", to being based on an intuitive opinion held by a human, which would be "fuzzy.
A system control rule need not be based on human fuzzy perception. For example, you could have a rule, "If the boiler pressure rises to a danger point of 600 Psi as measured by a 1% accuracy pressure transducer, then turn everything off. That rule is not fuzzy.
Principle of Incompatibility (previously stated; repeated here) -
As the complexity of a system increases, it becomes more difficult and eventually impossible to make a precise statement about its behavior, eventually arriving at a point of complexity where the fuzzy logic method born in humans is the only way to get at the problem.
Fuzzy Sets - A fuzzy set is almost any condition for which we have words: short men, tall women, hot day, cold climate, new building, ripe bananas, high intelligence, low speed, overweight, etc., where the condition can be given a value between 0 and 1. Example: A woman is 6 feet, 3 inches tall. In my experience, I think she is one of the tallest women I have ever met, so I rate her height at .98. A great number of things can be given a value between 0 and 1.
Degree of Membership - The degree of membership is the placement in the transition from 0 to 1 of conditions within a fuzzy set. If a particular building's placement on the scale is a rating of .7 in its position in newness among new buildings, then we say its degree of membership in new buildings is .7.
In fuzzy logic method control systems, degree of membership is used in the following way. A measurement of speed, for example, might be found to have a degree of membership in "too fast of" .6 and a degree of membership in "no change needed" of .2. The system program would then calculate the center of mass between "too fast" and "no change needed" to determine feedback action to send to the input of the control system. This is discussed in more detail in subsequent chapters.
Summarizing Information - Human processing of information is not based on two-valued, off-on, either-or logic. It is based on fuzzy perceptions, fuzzy truths, fuzzy inferences, etc., all resulting in an averaged, summarized, normalized output, which is given by the human a precise number or decision value which he or she verbalizes, writes down or acts on. It is the goal of fuzzy logic control systems to also do this.
The input may be large masses of data, but humans can handle it. The ability to analyze fuzzy sets and the subsequent summarizing capability to arrive at an output we can act on is one of the greatest assets of the human brain. This characteristic is the big difference between humans and digital computers. Emulating this human ability is the challenge facing those who would create computer based artificial intelligence. It is proving very, very difficult to program a computer to have human-like intelligence.
Fuzzy Variable - Words like red, blue, etc., are fuzzy and can have many shades and tints. They are just human opinions, not based on precise measurement in angstroms. These words are fuzzy variables.
If, for example, speed of a system is the attrribute being evaluated by "fuzzy" rules, then "speed" is a fuzzy variable.
Linguistic Variable - Linguistic means relating to language, in our case plain language words and statements.
Speed is a fuzzy variable. Throttle setting is a fuzzy variable. Examples of linguistic variables are: somewhat fast speed, very high speed, real slow speed, high rate of positive pressure change, throttle setting about right, etc.
A fuzzy variable becomes a linguistic variable when we modify it with descriptive words, such as somewhat fast, very high, real slow, positive big, negative small etc.
The main function of linguistic variables is to provide a means of working with the complex systems mentioned above as being too complex to handle by conventional mathematics and engineering formulas.
Linguistic variables appear in control systems with feedback loop control and can be related to each other with conditional, "if-then" statements. Example: If the speed is too fast, then back off on the high accelerator setting.
Universe of Discourse - Let us make controlling steam engine speed a project. Operating characteristics and parameters related to the steam engine would be our universe of discourse.
Fuzzy Algorithm - An algorithm is a procedure, such as the steps in a computer program. A fuzzy algorithm, then, is a procedure, usually a computer program, made up of statements relating linguistic variables and control actions.
Example:
If the pressure and positive rate of pressure change of the steam engine boiler is much too high then turn the heater down a lot.
Defuzzify - Evaluate several sub-sets established by the designer for a fuzzy logic based control system, such as "speed too fast," "speed too slow" and "speed about right" at a specific input value (Example: 2,390 RPM) to determine a crisp output which will be the input for the system being controlled.
End of Chapter 1.