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.

The following chapters of this book 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 "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 book 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 book 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.

It should be noted there is controversy and criticism regarding fuzzy logic.   One must read various sides of the controversy and reach their own conclusion.   Personally, the author, who has been both praised and reviled for his writings regarding fuzzy logic, feels the critics are too rigid in their grasp of the universe and "just donít get it."   But, donít take my word for it.   You must look at all sides and make up your own mind.  

The paragraphs directly below say in a few short words, "what fuzzy logic is." But, reading these three chapters 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 48 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 48 Mph and a few drivers driving exactly the posted 45 Mph.   But, most drivers will be driving 48 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: How many cars are in front.   How fast are they driving.   Any "old clunkers" going real slow.   Any trucks holding up one of the lanes.   How about side traffic entering from side streets.   Do the police ever set up radar surveillance on this stretch of road.   How much leeway do the police allow over the 45 Mph limit.   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 the same speed.  

The same ability you have to drive down a modern city street was used by our ancestors to successfully organize and 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 the speed of a vehicle coming up from behind.   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, in combination with traditional non-fuzzy processing.

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.   In fact, the fuzzy logic people assert everything in the universe is a little fuzzy, no matter how good your measuring equipment is.   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 primary input for the fuzzy logic method.   Examples:   temperature measured by a temperature transducer, motor speed, economic data, financial markets data, etc.   It would not be usual in an electro-mechanical control system or a financial or economic analysis system, but humans with their fuzzy perceptions could also provide input.   There could be a human "in-the-loop."

In the fuzzy logic literature, you will see the term "fuzzy set."  A fuzzy set is a group of anything that cannot be precisely defined.   Consider the fuzzy set of "old houses." How old is an old house?   Where is the dividing line between new houses and old houses?   Is a fifteen year old house an old house?   How about 40 years?   What about 39.9 years?   The assessment is in the eyes of the beholder.

Other examples of fuzzy sets are: tall women, short men, warm days, high pressure gas, small crowd, medium viscosity, hot shower water, etc.  

When humans are the basis for an analysis, we must have a way to assign some rational value to intuitive assessments of individual elements of a fuzzy set.   We must translate from human fuzziness to numbers that can be used by a computer.   We do this by assigning assessment of conditions a value from zero to 1.0.   For "how hot the room is" the human might rate it at .2 if the temperature were below freezing, and the human might rate the room at .9, or even 1.0, if it is a hot day in summer with the air conditioner off.  

You can see these perceptions are fuzzy, just intuitive assessments, not precisely measured facts.  

By making fuzzy evaluations, with zero at the bottom of the scale and 1.0 at the top, we have a basis for analysis rules for the fuzzy logic method, and we can accomplish our analysis or control project.   The results seem to turn out well for complex systems or systems where human experience is the only base from which to proceed, certainly better than doing nothing at all, which is where we would be if unwilling to proceed with fuzzy rules.  

Novices Can Beat the Pro's

Novices using personal computers and the fuzzy logic method can beat Ph.D. mathematicians using formulas and conventional programmable logic controllers.   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:   I read of an attempt to automate a cement manufacturing operation.   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.   Reasonable 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; psychological conditions; physiological conditions; safety conditions; security conditions; production improvement and much more.  

This book 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 would never undertake the laborious and time consuming tasks of fuzzy logic based analyses and we could not handle the complexity, speed requirement and endurance needed for machine control.  

You can do far more with a simple fuzzy logic BASIC or C++ program in a personal computer running in conjunction with a low cost input/output controller than with a whole array of expensive, conventional, programmable logic controllers.

Programmable logic controllers have their place! They are simple, reliable and keep American industry operating where the application is relatively simple 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

If intelligent life has appeared anywhere 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.   You need to know and begin using fuzzy logic.  

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 analysis rule can vary between being very precise, in which case we would not call it "fuzzy", to being based on an opinion held by a human, which would be "fuzzy." Being fuzzy or not fuzzy, therefore, has to do with the degree of precision of a system analysis rule.

A system analysis 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 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, cold, new buildings, accelerator setting, ripe bananas, high intelligence, speed, weight, spongy, 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.   This line of reasoning can go on indefinitely rating a great number of things 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 manipulate 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, "fuzzy" rules, then "speed" is a fuzzy variable.

Linguistic Variable - Linguistic means relating to language, in our case plain language words.

Speed is a fuzzy variable.   Accelerator setting is a fuzzy variable.   Examples of linguistic variables are: somewhat fast speed, very high speed, real slow speed, excessively high accelerator setting, accelerator 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, 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 women the object of our consideration.   All the women everywhere would be the universe of women.   If we choose to discourse about (talk about) women, then all the women everywhere would be our Universe of Discourse.  

Universe of Discourse then, is a way to say all the objects in the universe of a particular kind, usually designated by one word, that we happen to be talking about or working with in a fuzzy logic solution.  

A Universe of Discourse is made up of fuzzy sets.   Example: The Universe of Discourse of women is made up of professional women, tall women, Asian women, short women, beautiful women, and on and on.  

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.  

Examples:

If "green x" is very large, then make "tall y" much smaller.  

If the rate of change of temperature of the steam engine boiler is much too high then turn the heater down a lot.  

End of Chapter 1.