chapter 13 fuzzy logic - montana state · pdf filechapter 13 fuzzy logic ... 13.10 the...

2
Chapter 13: Fuzzy Logic 421 )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))) CHAPTER 13 FUZZY LOGIC )))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))Q OBJECTIVES In this chapter we will investigate the fundamental principles of fuzzy logic and then see how to implement these ideas as microcontroller control programs. 13.1 Introduction 13.2 Our Digital Heritage 13.3 How is Fuzzy Logic Different? 13.4 What is Fuzzy About Fuzzy Logic? 13.5 Structure of a Fuzzy Logic Inference Program 13.6 Fuzzification 13.7 Rule Evaluation 13.8 Defuzzification 13.9 Putting it all Together 13.10 The Complete Fuzzy Inference System 13.11 Fuzzy Logic Fuzzy Logic Instructions Minimum and Maximum Instructions Table Lookup Instructions 13.12 Conclusion and Chapter Summary Points Like other control system methodologies, fuzzy logic produces a precise repeatable output for every combination of input conditions. Although the term 'fuzzy' seems to suggest the control output is approximate, this is simply not true. Instead, fuzzy refers to a new way of representing sets that describe linguistic concepts such as warm. The boundaries of fuzzy sets are more like dimmer controls than digital on-off switches. As temperature decreases from a value we might agree is 'warm', it eventually stops being warm and becomes cool or even cold. This transition is not sudden at some specific temperature - rather the degree to which we agree that the temperature is warm gradually decreases until we would no longer consider it to be warm. Since fuzzy logic offers a way to attach an unambiguous numerical meaning to these abstract concepts such as warm, we can now perform computations on these linguistic variables to design automatic control systems. There are three processing steps in a fuzzy logic program: ! Fuzzification - compares the current value of a system input against the membership functions of each label of that input to determine fuzzy input values. ! Rule Evaluation - plugs fuzzy input values into control rules to determine fuzzy output values. ! Defuzzification - combines all fuzzy outputs into a single composite control output value. The executable fuzzy logic program is generally not specific to any application. For each of the three fuzzy program steps there is a data structure in the knowledge base that provides application specific information. Input membership functions provide the meaning of each input label for the fuzzification step. A list of rules is encoded as a list of pointers to fuzzy inputs and fuzzy outputs. Output membership functions provide the meaning of each output label for the defuzzification step. Although it seems as if there could be a large number of linguistic rules in a control system, the number of rules is actually limited to the product of the number of labels in each of the system inputs. For example a system with two inputs with 5 labels each would have a maximum of 5 times 5 or 25 rules.

Upload: duongtram

Post on 15-Feb-2018

218 views

Category:

Documents


4 download

TRANSCRIPT

Chapter 13: Fuzzy Logic 421

))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

CHAPTER 13

FUZZY LOGIC

)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))Q

OBJECTIVES

In this chapter we will investigate the fundamental principles of fuzzy logic and then seehow to implement these ideas as microcontroller control programs.

13.1 Introduction13.2 Our Digital Heritage13.3 How is Fuzzy Logic Different?13.4 What is Fuzzy About Fuzzy Logic?13.5 Structure of a Fuzzy Logic Inference Program13.6 Fuzzification13.7 Rule Evaluation13.8 Defuzzification13.9 Putting it all Together13.10 The Complete Fuzzy Inference System13.11 Fuzzy Logic

Fuzzy Logic InstructionsMinimum and Maximum InstructionsTable Lookup Instructions

13.12 Conclusion and Chapter Summary Points

Like other control system methodologies, fuzzy logic produces a precise repeatable outputfor every combination of input conditions. Although the term 'fuzzy' seems to suggest the controloutput is approximate, this is simply not true. Instead, fuzzy refers to a new way of representingsets that describe linguistic concepts such as warm. The boundaries of fuzzy sets are more likedimmer controls than digital on-off switches. As temperature decreases from a value we mightagree is 'warm', it eventually stops being warm and becomes cool or even cold. This transition isnot sudden at some specific temperature - rather the degree to which we agree that the temperatureis warm gradually decreases until we would no longer consider it to be warm. Since fuzzy logicoffers a way to attach an unambiguous numerical meaning to these abstract concepts such as warm,we can now perform computations on these linguistic variables to design automatic controlsystems.

There are three processing steps in a fuzzy logic program:

! Fuzzification - compares the current value of a system input against the membershipfunctions of each label of that input to determine fuzzy input values.! Rule Evaluation - plugs fuzzy input values into control rules to determine fuzzy outputvalues.! Defuzzification - combines all fuzzy outputs into a single composite control output value.

The executable fuzzy logic program is generally not specific to any application.For each of the three fuzzy program steps there is a data structure in the knowledge base

that provides application specific information. Input membership functions provide the meaning ofeach input label for the fuzzification step. A list of rules is encoded as a list of pointers to fuzzyinputs and fuzzy outputs. Output membership functions provide the meaning of each output labelfor the defuzzification step.

Although it seems as if there could be a large number of linguistic rules in a control system,the number of rules is actually limited to the product of the number of labels in each of the systeminputs. For example a system with two inputs with 5 labels each would have a maximum of 5times 5 or 25 rules.

Chapter 13: Fuzzy Logic422