solution: homework 6
DESCRIPTION
Fuzzy Logic. Fuzzy Control. Solution: Homework 6. v. small. small. perfect. big. v. big. growing. declining. constant. 1. 1. 0. 75. 0.6. 0.4. 0.25. 0 5 10 15 20 25. – 10 – 5 0 5 10. speed change [m/s 2 ]. distance to next car [m]. - PowerPoint PPT PresentationTRANSCRIPT
Dr.-Ing. Erwin SitompulPresident University
Lecture 9
Introduction to Neural Networksand Fuzzy Logic
President University Erwin Sitompul NNFL 9/1
http://zitompul.wordpress.com
President University Erwin Sitompul NNFL 9/2
v. small
distance to next car [m]
small perfect big v. big
0 5 10 15 20 25
1
–small zero+small +big–big
acceleration adj. [m/s2] –2 –1 0 1 2
1
1
speed change [m/s2]
constant growingdeclining
–10 –5 0 5 10
Solution: Homework 6
2.5 m/s2
0.75
0.25
13 m
0.6
0.4
Fuzzy ControlFuzzy Logic
President University Erwin Sitompul NNFL 9/3
Rule 1: IF distance is small AND speed is declining, THEN maintain acceleration.
Rule 2: IF distance is small AND speed is constant, THEN acceleration adjustment negative
small.
Rule 3: IF distance is perfect AND speed is declining, THEN acceleration adjustment positive small.
Rule 4: IF distance is perfect AND speed is constant, THEN maintain acceleration.
Solution: Homework 6 (Cont.)0.4
0.4
0.6
0.6
0.75
0.75
0
0
FL-Operators:AND MinOR Max
0.4
0
0
0.6
Fuzzy ControlFuzzy Logic
President University Erwin Sitompul NNFL 9/4
Solution: Homework 6 (Cont.)
0.6
acceleration change [m/s2] –2 –1 0 1 2
1
A1
A22 ( )A h a b
1 0.4 2 (2.2 3) 1.04A
2 0.2 2 (0.8 1.2) 0.2A
1 1 2 2
1 2x
c A c Ac
A A
–small zero+small +big–big
acceleration adj. [m/s2] –2 –1 0 1 2
1
0.4
1 0.5c
2 0c
20.4194 m s
Fuzzy ControlFuzzy Logic
President University Erwin Sitompul NNFL 9/5
Implementation in Matlab
Rule Viewer
Inp
ut
1 M
Fs
Inp
ut
2 M
Fs
Ou
tpu
t M
Fs
Fuzzy ControlFuzzy Logic
Solution: Homework 6 (Cont.)
President University Erwin Sitompul NNFL 9/6
Fuzzy Logic Toolbox in MatlabFuzzy ControlFuzzy Logic
The toolbox can be opened by typing “fuzzy” in Matlab Workspace
Some variables must be defined: Number of inputs and outputs Membership functions of each
input and output Fuzzy rules that will connect
the membership functions Fuzzy set operators, inference
core, accumulation, and defuzzification
President University Erwin Sitompul NNFL 9/7
Fuzzy Logic Toolbox in MatlabFuzzy ControlFuzzy Logic
Now, we utilize the fuzzy toolbox to analyze the input-output behavior of the fuzzy control.
Later, the resulting fuzzy control can be applied to control dynamic systems in Simulink environment.
In each session, remember to save the controller that has been designed: Save files using Files >> Export >> To Disk Open files using Files >> Import >> From Disk
President University Erwin Sitompul NNFL 9/8
Homework 7Fuzzy ControlFuzzy Logic
Read the manual of Fuzzy Logic Toolbox carefully. Learn how to use the toolbox and get familiar with it. Redo the quiz problem in Matlab. Submit the *.fis file of
the fuzzy control along with necessary supporting documents.
Submission must be in hardcopy and softcopy. Incomplete submission will not be graded.