26 views

Uploaded by drthuhan

- Obstacle Avoidance of Mobile Robots using Ordinal Structure Model of Fuzzy Reasoning Approach
- REAL-TIME FUZZY MICROCONTROLLER.pdf
- Fuzzy Logic Introduction
- [187]Fuzzy Controls Under Various Fuzzy Reasoning Methods
- chang2012.pdf
- Basic Fuzzy Logic
- 4.2
- Paper 2
- 0dd53-fuzzy_logic_models_for_selection_of_mach.pdf
- fuzzy-logic pptx
- WRM-panigrahi.pdf
- 23-74-1-PB
- Master Thesis Fuzzy Relations
- Chapter9.ppt
- R7410201 Neural Networks & Fuzzy Logic
- Fault Diognosis of Power Transformers [a]
- f 111035812719462
- Using FQFD to Analyze Island Accommodation Management in Fuzzy
- 2003-12-PS
- Fuzzy PPT

You are on page 1of 10

Fuzzy Logic

Introduced by Lotfi Zadeh, UC Berkeley Process data allowed partial set membership instead of crisp membership Deals with noisy, imprecise,vague, ambiguous data Higher reliability People also do not require precise numerical input These slides are based on Fuzzy Logic Tutorial by Encoder Newsletter of the Seattle Robotics Society

Brunl 2003 1

Fuzzy Logic

Empirical model Simple rule-based approach: IF x THEN y

Here no numbers but fuzzy set memberships, e.g.: IF (temp is too_cool) AND (time is progressed) THEN (cool fast)

Imprecise, but descriptive Mimic human control logic Robust, requires little tuning Can model non-linear systems that are mathematically very difficult (or impossible) to model

2

Brunl 2003

Consider inputs, outputs, system control, failure modes Determine input/output relationships Use minimum number of input variables, e.g.

error (control difference) change-of-error (error derivative)

Fuzzy logic temperature control of a physical process Heater Cooler

Set up system as a number of IF-THEN rules Create membership functions, giving meaning to input/output terms Create pre-/post-processing terms Test system, evaluate, tune, and test again

Brunl 2003 3

Target temp.

Fuzzy Logic

Physical Process

Feedback temperature

Brunl 2003

Fuzzy Logic Heater Cooler Physical Process

Linguistic Variables

Introduction of linguistic variables:

Input 1: Input 2: Output: error: positive (P), zero (Z), negative (N) error-dot: positive (P), zero (Z), negative (N) heat (H), do_nothing (), cool (C)

temperature negative, zero, positive negative, zero, positive heat, cool, or do nothing

Error = target feedback (P = too cold, Z = just right, N = too hot) ErrorDot = d Error / dt (P = getting colder, Z = no change, N = getting hotter) Output H = activate heater, = do nothing, C = activate cooler

5 Brunl 2003 6

Brunl 2003

Set up linguistic rules:

IF-THEN (antecedent and consequent blocks) Example: IF too_hot AND getting_hotter THEN cool

Linguistic Rules

1. 2. 3. 4. 5. 6.

output = C

IF too_hot AND getting_colder THEN ?? IF just_right AND getting_colder THEN ?? IF too_cold AND getting_colder THEN ?? IF too_hot AND no_change THEN ?? IF just_right AND no_change THEN ?? IF too_cold AND no_change THEN ?? IF too_hot AND getting_hotter THEN ?? IF just_right AND getting_hotter THEN ?? IF too_ cold AND getting_hotter THEN ??

8

target-feedback=N

d(target-feedback)/dt=N

7. 8. 9.

7

Brunl 2003

Brunl 2003

Linguistic Rules

1. 2. 3. 4. 5. 6. 7. 8. 9. cool IF too_hot AND getting_colder THEN IF just_right AND getting_colder THEN heat IF too_cold AND getting_colder THEN heat IF too_hot AND no_change THEN IF just_right AND no_change THEN IF too_cold AND no_change THEN cool do_nothing heat

Rule Matrix

Build rule matrix from linguistic rules

too cold getting colder no change getting hotter cool cool cool just right heat do nothing cool too hot heat heat heat

cool IF too_hot AND getting_hotter THEN IF just_right AND getting_hotter THEN cool IF too_ cold AND getting_hotter THEN heat

9

Brunl 2003

Brunl 2003

10

Membership function is a graphical representation of magnitude of participation of each input Associates weighting with each input Defines overlaps between inputs Determines output response Fuzzification: Defuzzification: Translating input values to fuzzy set memberships Translating fuzzy output back to crisp system output (e.g. a number)

11

Membership Functions

Shape of membership function is usually triangle (but could also be trapezoidal or other) Height usually normalized to 1 (so in total: [0..1]) Width of the base of function depends on number of functions Shouldering is used to lock height in an outer function (leftmost and rightmost functions evaluate to 1 to the outsides) Center points of functions evaluate to 1 Overlap is usually 50% at base of function

Brunl 2003

Brunl 2003

12

Membership Functions

Membership Functions

Add shoulders

too hot

just right

too cold

h&r

r&c

width

Brunl 2003 13 Brunl 2003 14

Membership Functions

Add values, here: for error (temperature difference in deg. Celsius)

1.0

Membership Functions

Add values, here for error_dot (temperature change in deg. Celsius / minute)

1.0

Degree of Membership

Degree of Membership

0.5

0.5

h&r 0.0 -4 -2 0

15

16

Brunl 2003

Brunl 2003

Membership Functions

Degree of Membership 1.0 Degree of Membership 0.5 too hot just right too cold h&r -4 -2 0 r&c +2 +4 Error in degrees Celsius

Membership Functions

1.0 0.5 too hot just right too cold h&r -4 -2 0 r&c +2 +4 Error in degrees Celsius

0.0

0.0

Brunl 2003

17

Brunl 2003

18

Membership Functions

Note

Sum of all membership values for a certain input value is always 1.0 Different value range for different input variables (e.g. error and error_dot) Membership values (antecedents) are evaluated for the produced conclusion (consequent)

5.4 Inferences

Deviation from Boolean logic (true, false or 1, 0) Now we have continuous membership values [0..1] Build logical sums using membership values in combination with rule matrix Use minimum of all antecedent values (AND-part) for output

Brunl 2003

19

Brunl 2003

20

Inferences

Example:

error error_dot = 1 = 2.5

Inferences

too_hot = 0.5, just_right = 0.5, too_cold = 0.0 getting_hotter = 0.5, no_change = 0.5, getting_colder = 0.0

1. 2. 3. 4. 5. 6. 7. 8. 9.

21

IF too_hot AND getting_colder THEN cool IF just_right AND getting_ colder THEN heat IF too_cold AND getting_ colder THEN heat IF too_hot AND no_change THEN cool IF just_right AND no_change THEN do_nothing IF too_cold AND no_change THEN heat IF too_hot AND getting_hotter THEN cool IF just_right AND getting_hotter THEN cool IF too_ cold AND getting_hotter THEN heat

22

Membership error:

too_hot = 0.5, just_right = 0.5, too_cold = 0.0

Membership error_dot

getting_hotter = 0.5, no_change = 0.5, getting_colder = 0.0

Brunl 2003

Brunl 2003

Inferences

too_hot = 0.5, just_right = 0.5, too_cold = 0.0 getting_hotter = 0.5, no_change = 0.5, getting_colder = 0.0

Inferences

use minimum 0.5 & 0.0 = 0.0 0.5 & 0.0 = 0.0 0.0 & 0.0 = 0.0

too_hot = 0.5, just_right = 0.5, too_cold = 0.0 getting_hotter = 0.0, no_change = 0.5, getting_colder = 0.5

use minimum

1. 2. 3. 4. 5. 6. 7. 8. 9.

IF too_hot AND getting_colder THEN cool IF just_right AND getting_ colder THEN heat IF too_cold AND getting_ colder THEN heat

1. 2. 3. 4. 5. 6. 7. 8. 9.

IF too_hot AND getting_colder THEN cool IF just_right AND getting_ colder THEN heat IF too_cold AND getting_ colder THEN heat IF too_hot AND no_change THEN cool 0.5 & 0.5 = 0.5 IF just_right AND no_change THEN do_nothing 0.5 & 0.5 = 0.5 IF too_cold AND no_change THEN heat IF too_hot AND getting_hotter THEN cool IF just_right AND getting_hotter THEN cool IF too_ cold AND getting_hotter THEN heat 0.5 & 0.5 = 0.5 0.5 & 0.5 = 0.5

24

IF too_hot AND no_change THEN cool 0.5 & 0.5 = 0.5 IF just_right AND no_change THEN do_nothing 0.5 & 0.5 = 0.5 IF too_cold AND no_change THEN heat 0.0 & 0.5 = 0.0 IF too_hot AND getting_hotter THEN cool IF just_right AND getting_hotter THEN cool IF too_ cold AND getting_hotter THEN heat 0.5 & 0.5 = 0.5 0.5 & 0.5 = 0.5 0.0 & 0.5 = 0.0

23

Brunl 2003

Brunl 2003

Find out firing strength of each rule Combine logical outputs for each rule must be combined before defuzzification Combining rule outputs

MAX-MIN MAX-DOT (MAX-PRODUCT) AVERAGING ROOT-SUM-SQUARE

25

Output Combination

MAX-MIN Test magnitude of all rules select highest one Use horizontal coordinate of fuzzy centroid as output Note: This method does not combine individual results! MAX-DOT Scale each member function to fit under its peak value, take the horizontal coordinate of the fuzzy centroid of the composite area as output. This shrinks all member functions to their peaks equal the magnitude of the respective function. Note: This method prodruces a smooth, continuous output combining all active rules

Brunl 2003 26

Brunl 2003

Output Combination

AVERAGING Each function is clipped at the average value and the fuzzy centroid of the composite area is computer Note: This method does not give increased weight if multiple rules generate the same output member! ROOT-SUM-SQUARE Combination of several approaches: Scale functions to respective magnitudes with root of sum of squares, compute fuzzy centroid of composite area. Note: This method gives a good weighted influence to all firing rules.

Brunl 2003 27

Output Combination

1. 2. 3. 4. 5. 6. 7. 8. 9. IF too_hot AND getting_colder THEN cool IF just_right AND getting_ colder THEN heat IF too_cold AND getting_ colder THEN heat 0 0 0 IF too_hot AND no_change THEN cool 0.5 IF just_right AND no_change THEN do_nothing 0.5 IF too_cold AND no_change THEN heat 0 IF too_hot AND getting_hotter THEN cool IF just_right AND getting_hotter THEN cool IF too_ cold AND getting_hotter THEN heat 0,5 0.5 0

Output membership functions: cool = (rule12 + rule42 + rule72 + rule82 ) = (0 + 0.52 +0.52 + 0.52) = 0.75 = 0.866

Brunl 2003 28

Output Combination

1. 2. 3. 4. 5. 6. 7. 8. 9. IF too_hot AND getting_colder THEN cool IF just_right AND getting_ colder THEN heat IF too_cold AND getting_ colder THEN heat 0 0 0 IF too_hot AND no_change THEN cool 0.5 IF just_right AND no_change THEN do_nothing 0.5 IF too_cold AND no_change THEN heat 0 IF too_hot AND getting_hotter THEN cool IF just_right AND getting_hotter THEN cool IF too_ cold AND getting_hotter THEN heat 0,5 0.5 0

Output Combination

1. 2. 3. 4. 5. 6. 7. 8. 9. IF too_hot AND getting_colder THEN cool IF just_right AND getting_ colder THEN heat IF too_cold AND getting_ colder THEN heat 0 0 0 IF too_hot AND no_change THEN cool 0.5 IF just_right AND no_change THEN do_nothing 0.5 IF too_cold AND no_change THEN heat 0 IF too_hot AND getting_hotter THEN cool IF just_right AND getting_hotter THEN cool IF too_ cold AND getting_hotter THEN heat 0,5 0.5 0

Brunl 2003 29

Brunl 2003 30

5.6 Defuzzification

1. 2. 3. Defuzzification of combined results of inference process Result will be a crisp (numeric) output Calculation of fuzzy centroid: Multiply the weighted strength of each output member function by the respective member function center points Add these values Divide area by the sum of the weighted member function strength

Defuzzification

Output Membership Function (action to be taken)

cool Degree of Membership 1.0 do_nothing heat

0.5

32

Brunl 2003

31

Brunl 2003

Defuzzification

Output Membership Function (action to be taken)

cool Degree of Membership 1.0 0.87 Combined rule results cool = 0.866 do_nothing = 0.5 heat = 0.0 do_nothing heat

Defuzzification

Output Membership Function (action to be taken)

cool Degree of Membership 1.0 0.87 Combined rule results cool = 0.866 do_nothing = 0.5 heat = 0.0 do_nothing heat

0.5

0.5

0.0 -100 -50 -63.4 0 +50 +100 Percent output (-100..-1 cooling, +1..+100 heating)

34

0.0 -100

Brunl 2003

-50

33

Brunl 2003

Defuzzification

Input:

error = 1 error_dot = 2.5

Defuzzification

How to calculate centroid

graphically: intuitively numerically: see formula below

Output:

activate cooling at 63.4%

Output =

(center strength )

i =1 i i

strengthi

i =1

Brunl 2003

35

Brunl 2003

36

1.0 0.87

Defuzzification

1.0 0.87

1.0 0.87

Defuzzification

0.5

-50

+50

+100

0.5

with shoulders:

1.0 0.87 -50 0 +50 +100 0.5

Output =

centercool strengthcool + centernothing strengthnothing + centerheat strengthheat strengthcool + strengthnothing + strengthheat 100 0.866 + 0 0.5 + 100 0 = 63.4 0.866 + 0.5 + 0.0

0.0 -100

Output =

Output =

Brunl 2003

(center strength )

i =1 i i

0.0 -100 -50 0 +50 +100 37 Brunl 2003 38

strength

i =1

5.7 Tuning

Tuning of a fuzzy system can be accomplished by: Changing rule antecedents Changing rule conclusions Changing centers of the input/output membership functions Adding additional membership functions

e.g. negative, low_neg, zero, low_pos, positive additional rules

5.8 Applications

Fuzzy control can be applied to a number of control problems for example: Motor control Driving Balancing Walking

Brunl 2003 40

Brunl 2003

39

- Obstacle Avoidance of Mobile Robots using Ordinal Structure Model of Fuzzy Reasoning ApproachUploaded byfaisul77
- REAL-TIME FUZZY MICROCONTROLLER.pdfUploaded bysamy
- Fuzzy Logic IntroductionUploaded byapi-3806146
- [187]Fuzzy Controls Under Various Fuzzy Reasoning MethodsUploaded byvlady120489
- chang2012.pdfUploaded byRio Ananda Putra
- Basic Fuzzy LogicUploaded byTrang Ly
- 4.2Uploaded byaarthisub
- Paper 2Uploaded byRana Islam
- 0dd53-fuzzy_logic_models_for_selection_of_mach.pdfUploaded byIonut Dumistrascu
- fuzzy-logic pptxUploaded byJanmejay Pant
- WRM-panigrahi.pdfUploaded byMaheswaran Rathinasamy
- 23-74-1-PBUploaded byRodolfo Quijada
- Master Thesis Fuzzy RelationsUploaded bySparśa Roychowdhury
- Chapter9.pptUploaded byvaraprasad93
- R7410201 Neural Networks & Fuzzy LogicUploaded bysivabharathamurthy
- Fault Diognosis of Power Transformers [a]Uploaded byLyna Choo
- f 111035812719462Uploaded byHadiBies
- Using FQFD to Analyze Island Accommodation Management in FuzzyUploaded byMuhammad Azka Ramadhan
- 2003-12-PSUploaded byMohammed Abdul Azeem
- Fuzzy PPTUploaded byvatsalshah24
- Control Dc ServoUploaded bypham hoang quan
- Prioritization of Detected Intrusion in Biometric Template Storage for Prevention using Neuro-Fuzzy ApproachUploaded byJournal of Computing
- Fuzzy Min-Max Neural NetworksUploaded byHabib
- Fuzzy Implementation 070423Uploaded byvishwaharnal115
- Fuzzy Aggregation Semantic SimilarityUploaded byJorge Martinez Gil
- An Application of Imprecise Soft Sets in Teaching EvaluationUploaded byIJBSS,ISSN:2319-2968
- Multi_dimensional Fuzzy ReasoningUploaded byEdgar Maya Perez
- 88. Jurnal Tiray Putri OpUploaded byAnonymous Neo
- 1-s2.0-0888613X9400033Y-mainUploaded bytheanhdtvt
- Single–Valued Neutrosophic Filters in EQ–algebrasUploaded byAnonymous 0U9j6BLllB

- Lecture 4Uploaded bydrthuhan
- Fuzzy Week - 2 CSCI 3006 Lecture 2Uploaded bydrthuhan
- CDI PL Fuzzy ToolboxUploaded bydrthuhan
- 3154-FuzzyLogic.pdfUploaded byToru Watanabe
- 06-Fuzzy Set TheoryUploaded byCHANDRA BHUSHAN
- 01 Khor IJFS_CameraReady_SkUploaded bySiti Kadarini
- under water vehicle competition.pdfUploaded bydrthuhan
- Fuzzy Logic Examples Using MatlabUploaded byUdit Upreti
- Fuzzy Logic Examples Using MatlabUploaded byUdit Upreti
- L20Uploaded bydrthuhan
- Competition on Underwater Vehicles_Eng_ver2Uploaded bydrthuhan
- Week - 3 CSCI 3006 Lecture 3and4Uploaded bydrthuhan
- Fuzzy control systemUploaded byznmw
- 1. Inv - Part Modeling IntroUploaded bydrthuhan
- A1Uploaded bydrthuhan
- fuzznov09Uploaded bydrthuhan
- CDI PL Fuzzy ToolboxUploaded bydrthuhan
- Inventor 11 Tutorial 11Uploaded bydrthuhan
- 3154-FuzzyLogic.pdfUploaded byToru Watanabe
- 06-Fuzzy Set TheoryUploaded byCHANDRA BHUSHAN
- toleranceUploaded bySudhakar Palleti
- ch03noteUploaded bydrthuhan
- ch03noteUploaded bydrthuhan
- Fuzzy_logicUploaded byVaibhav Pawar
- Fuzzy_logicUploaded byVaibhav Pawar
- Fuzzy_logicUploaded byVaibhav Pawar
- Inventor Exam Preparation GuideUploaded bydrthuhan
- GEOMETRIC TOLERANCEUploaded byChristopher Lloyd
- 08 Hopfield NetworksUploaded bydrthuhan

- Ch3 Qft-DONEUploaded bysuhughes
- energy sector in palestineUploaded byHamada Almasalma
- Spanish_2000.pdfUploaded bystraunght
- Soal Latihan 1 Uas-pas b. Inggris 9 Smtr 1Uploaded byMuhammadSaikoAntonio
- Report on CSMAUploaded byUtkarsh Hathi
- Event Study SummaryUploaded byArvind
- 03 Aguilar PPTUploaded byNanang Dwi Ardi
- Ifla Poster SdgsUploaded byLouise Ian T. de los Reyes-Aquino
- Interpreting Infrared, Raman, And Nuclear Magnetic Resonance SpectraUploaded byLorienAule
- RX 4.pdfUploaded bySerkanAl
- Networks CopyUploaded byNagendra Prasad
- Sensor Lect4Uploaded bymorton1472
- Small Dams and Weirs in Earth and Gabion MaterialsUploaded byHuy Le Quang
- Active Desktop Calendar 7.93 Build 100615 -TrTUploaded byElena Vîrdea
- 440C-05Uploaded bylogesh17
- ElectronicsLab2.pdfUploaded byVijayan Thiruvengadam
- Electrophilic AdditionUploaded byShiyi Yau
- Nineteen new orchid species.pdfUploaded bywebdmdrleo
- FINAL CBSUploaded byAnsh Anand
- Branch and Bound AlgorithmsUploaded byMEdrifter
- waterhammer.pdfUploaded bysbalu12674
- Formula Sheet Thermodynamics Cengel PaUploaded byonatbross
- aiab089228.pdfUploaded byIan Ted Molabola B
- mf11 revision 2Uploaded byapi-250366166
- ThesisUploaded byPrem Latha
- Marine Engineering KnowledgeUploaded bysamanthalal
- Remote Viewing the Montauk Project by Thomas SkeggsUploaded bybakup725
- controlmanual_honeywellUploaded byTedy Ban
- 09062616292055Uploaded byDimitris Stathis
- SD200 SpecificationsUploaded bynhanleduy