1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh...
-
Upload
lucas-craig -
Category
Documents
-
view
222 -
download
6
Transcript of 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh...
![Page 1: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/1.jpg)
1
Design GA-Fuzzy Controller for Magnetic Levitation
Using FPGA
Prepared by
Hosam .M Abu Elreesh
Advisor Dr. Basil Hamed
![Page 2: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/2.jpg)
2
Contents
• Introduction• Fuzzy Logic• Genetic Algorithm (GA)• FPGA and Xfuzzy CAD Tool• Application and Results• Conclusion• Future Works
![Page 3: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/3.jpg)
3
Introduction
• Control systems have been in use for decades.• Power systems, computer control, space
technology, robotics, weapon systems and many others.
• Types of Control Systems:1- Conventional Control Techniques.
2- Intelligent Control Techniques.
![Page 4: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/4.jpg)
4
Introduction
• Conventional Control Techniques:1- Classical Control (PID).
2- Modern Control (deadbeat, sliding mode). 3- Optimal Control (LQR, H2 and H∞).
• Intelligent Control Techniques: 1- Knowledge-base-expert systems (fuzzy
logic).2- Neural networks.
![Page 5: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/5.jpg)
5
Introduction
• Fuzzy Logic hardware Implementation:
1- General-purpose fuzzy processor (µP, µC, digital signal processor (DSP)).
2-Dedicated fuzzy hardware
3- FPGA
![Page 6: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/6.jpg)
6
Introduction
• Thesis Contribution1- This thesis present the design of fuzzy
controller of the Magnetic Levitation Model CE152.
2- Matlab program for applying the GA to optimize the memberships of the fuzzy controller.
3- Design the hardware of fuzzy controller using Xilinx Spartan 3e FPGA.
![Page 7: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/7.jpg)
7
Fuzzy Control
Fuzzy Sets
Classical Sets
![Page 8: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/8.jpg)
8
Fuzzy Control
Fuzzy History:• Fuzzy logic idea was born in July 1964.Lotfi A. Zadeh father of
fuzzy.
• 1965 was the birth of fuzzy logic techniques.
• 1979 was the first application of the fuzzy logic in industrial world cement kiln controller.
• In 1985 Japanese starts to make the first general-purpose fuzzy logic controller.
• Japanese start to use it in control systems, and they designed the first automatic subway train controller in 1987.
![Page 9: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/9.jpg)
9
Fuzzy Control Why Use Fuzzy Logic?
• Fuzzy logic is used to control the complex, and nonlinear systems without make analyzing for these systems.
• Fuzzy control enables the engineers to implement the control technique by human operators
• Fuzzy logic is flexible with any given systems. • Fuzzy logic can be blended with conventional technique, to
simplify their implementation.
![Page 10: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/10.jpg)
10
Fuzzy Control
Operations of Fuzzy Sets :
x
AND OR NOT
![Page 11: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/11.jpg)
11
Fuzzy Control
Operations of Fuzzy Sets :
5.0)5.0,7.0min()(),(min)( xxx BABA
7.0)5.0,7.0max()(),(max)( xxx BABA
5.05.01)(1)( xx AAc
If there are two fuzzy sets A and B, and there is element (x).element (x) can be set A and has degree (0.5), element (x) can be in set B and has degree (0.7),
![Page 12: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/12.jpg)
12
Fuzzy Control
Fuzzy Concepts:
• Membership Function.• Linguistic Variables.
• IF – THEN Rules
![Page 13: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/13.jpg)
13
Fuzzy Control
Membership Function:
![Page 14: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/14.jpg)
14
Fuzzy Control
Linguistic Variables:
• Age (old, young, very young, very old).• Tall (tall, short, very short, very tall).• Error( P big, P small, zero,N big, N small)
![Page 15: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/15.jpg)
15
Fuzzy Control
IF – THEN Rules
• IF (input1 is MFa) AND (input2 is MFb) )
THEN (output is MFc)
• IF (Food is bad) and (Serves is bad ) THEN (Tip is cheap)
Antecedent consequent
![Page 16: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/16.jpg)
16
Fuzzy Control
Fuzzy Logic Control (FLC)
• Mamdani model.• Takagi- Sugeno-Kang (TSK) model.• Kosko's additive model (SAM).
![Page 17: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/17.jpg)
17
Fuzzy Control
Mamdani Model:
![Page 18: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/18.jpg)
18
Fuzzy Control
Mamdani Model:• Fuzzification.
• Fuzzy Associative Memory (FAM) 1- Knowledge base.(Membership Functions, IF-THEN rules)
2- Decision-Making.
• Defuzzification Mean of Maximum method (MOM).
Center of Area (COA). Center of Maximum (CoM):
![Page 19: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/19.jpg)
19
Fuzzy Control
Mamdani Model:
![Page 20: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/20.jpg)
20
Genetic Algorithm
GA• Genetic Algorithms are reliable and robust methods for searching
solution spaces.
GA must address five issues. 1- A genetic representation 2- Initial population3- Fitness Function 4- Genetic operators 5- Values for the parameters of the GA, such as population size,
![Page 21: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/21.jpg)
21
Genetic Algorithm
![Page 22: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/22.jpg)
22
Genetic Algorithm
GA differs from conventional optimization techniques in following ways:
• GA does not deals with data directly but works with encoded data.
• GA uses least information such as fitness function to solve problems an does not need
derivation.
• GA uses probability laws rather than certain laws.
• GA generate populations of answer not just one answer.
• Almost all conventional optimization techniques search from a single point but
GA always operate on a whole population of points (parallelism).
![Page 23: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/23.jpg)
23
Genetic Algorithm
GA Elements:
1- Individuals
2- Population
![Page 24: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/24.jpg)
24
Genetic Algorithm
Chromosome coding
![Page 25: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/25.jpg)
25
Genetic Algorithm
Fitness Function
0
2 )(. dttevaluefitness
dttevaluefitness
0
)(.
dtttevaluefitness
0
2 )(.
![Page 26: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/26.jpg)
26
Genetic Algorithm
GA Operations:
1- Selection (Roulette Wheel Selection).
Roulette Wheel Selection
![Page 27: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/27.jpg)
27
Genetic Algorithm
GA Operations:
1- Selection (Stochastic Universal Selection).
Stochastic Universal Sampling
![Page 28: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/28.jpg)
28
Genetic Algorithm
GA Operations:
2- Crossover (Single-Point Crossover)
Single-Point Crossover
![Page 29: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/29.jpg)
29
Genetic Algorithm
GA Operations:
2- Crossover ( Two-Point Crossover)
Two-Point Crossover
![Page 30: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/30.jpg)
30
Genetic Algorithm
GA Operations:
3- Mutation
Mutation means swap one bit in binary coding or changes one number if the chromosome consist of numbers
4- Elitism
![Page 31: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/31.jpg)
31
A simple example will help us to understand how a GA works. A simple example will help us to understand how a GA works. Let us find the maximum value of the function (15 Let us find the maximum value of the function (15xx xx22) ) where parameter where parameter xx varies between 0 and 15. For simplicity, varies between 0 and 15. For simplicity, we may assume that we may assume that xx takes only integer values. Thus, takes only integer values. Thus, chromosomes can be built with only four genes:chromosomes can be built with only four genes:
![Page 32: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/32.jpg)
32
Suppose that the size of the chromosome population Suppose that the size of the chromosome population NN is 6, the is 6, the crossover probability crossover probability ppcc equals 0.7, and the mutation probability equals 0.7, and the mutation probability
ppmm equals 0.001. The fitness function in our example is defined equals 0.001. The fitness function in our example is defined
byby
ff((xx) = ) = 15 15 xx xx22
![Page 33: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/33.jpg)
33x
50
40
30
20
60
10
00 5 10 15
f(x)
(a) Chromosome initial locations.
x
50
40
30
20
60
10
00 5 10 15
(b) Chromosome final locations.
![Page 34: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/34.jpg)
34
Genetic Algorithm
Genetic Fuzzy Systems:
![Page 35: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/35.jpg)
35
Genetic Algorithm
Genetic Fuzzy Systems:
1- Genetic Tuning of The Data Base
Tuning scaling gainsTuning fuzzy membership functions.
2- Genetic Learning of The Rule Base
![Page 36: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/36.jpg)
36
FPGA and Xfuzzy CAD Tool
FPGA:
FPGA is digital integrated circuits (ICs) that have electronics blocks which can be programmed, and these blocks has configurable interconnection between them.
![Page 37: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/37.jpg)
37
FPGA and Xfuzzy CAD Tool
![Page 38: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/38.jpg)
38
FPGA and Xfuzzy CAD Tool
![Page 39: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/39.jpg)
39
FPGA and Xfuzzy CAD Tool
![Page 40: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/40.jpg)
40
FPGA and Xfuzzy CAD Tool
The Spartan-3E Development System
![Page 41: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/41.jpg)
41
FPGA and Xfuzzy CAD Tool
Xfuzzy CAD Tool:
![Page 42: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/42.jpg)
42
FPGA and Xfuzzy CAD Tool
Xfuzzy CAD Tool:
1- Description Stage
![Page 43: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/43.jpg)
43
FPGA and Xfuzzy CAD Tool
Xfuzzy CAD Tool:
2- Tuning Stage
![Page 44: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/44.jpg)
44
FPGA and Xfuzzy CAD Tool
Xfuzzy CAD Tool:
3- Vervication Stage
![Page 45: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/45.jpg)
45
FPGA and Xfuzzy CAD Tool
Xfuzzy CAD Tool:
4- Synthesis Stage
1- Generat VHDLcode.2- C code.
3- sysgen code.
![Page 46: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/46.jpg)
46
Application and Results
Magnetic Levitation CE152 Model
![Page 47: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/47.jpg)
47
Application and Results
1 12c 00 c 00
2 23 2kk 00 0 k 00 0
3 3 i DA
1
x AD 2
3
0 1 0x 0
-2*k *i -k 2*k *ix 0 u(t)
mm x -x m x -xx K K
1 T0 0T
y= K K 0 0
fv
a
a
x
x
x
x
x
x
Magnetic Levitation CE152 Model
3 2
8.883e8 G(s)=
s + 5.349e4 s + 1.312e5 s - 2.054e8
The plant
![Page 48: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/48.jpg)
48
Application and Results
Magnetic Levitation CE152 Model
open loop poles of the system:
-53492: (Stable pole), -63: (Stable pole), 61: (Unstable pole)
2Controlability Matrix B AB A B
0 0 5.5697e6
= 0 5.5697e6 -2.9795e11
1.5873e5 -8.49
08e9 4.519e14
Rank 3
Sytem is controllable
n
![Page 49: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/49.jpg)
49
Application and Results
1- Fuzzy controller
•All universes of discourses are normalized to lie between –1 and 1 with scaling •assumed that the first and last membership functions have their apexes at –1 and 1 respectively.
•Triangular, Z and S membership functions are to be used.
•The number of fuzzy sets is constrained to be an odd integer greater than unity.
•The base vertices of membership functions are coincident with the apex of the adjacent membership functions
![Page 50: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/50.jpg)
50
Application and Results
1- Fuzzy controller
![Page 51: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/51.jpg)
51
Application and Results
1- Fuzzy controller
e ln mn sn z sp mp lp
ce
ln ln ln ln ln mn sn z
mn ln ln ln mn sn z sp
sn ln ln mn sn z sp mp
z ln mn sn z sp mp lp
sp mn sn z sp mp lp lp
mp sn z sp mp lp lp lp
lp z sp mp lp lp lp lp
![Page 52: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/52.jpg)
52
Application and Results
1- Fuzzy controller
![Page 53: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/53.jpg)
53
Application and Results
1- Fuzzy controller
Fuzzy Subsystem
PI Subsystem
![Page 54: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/54.jpg)
54
Application and Results
1- Fuzzy controller
![Page 55: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/55.jpg)
55
Application and Results
1- Fuzzy controller
Set Point
Time
Set Point
Time
Ts is nearly 0.15 sec Tr is nearly 0.106 sec
![Page 56: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/56.jpg)
56
Application and Results
2- Fuzzy Controller Design with GA
some simplification is used in writing GA code: 1- The interval of the inputs and output will still at [-1 1] range.2- The symmetric point will still at zero.3- The inputs and output will have the same shape.
The number of individuals per one population will be 50.
the number of generation will be 100.
the crossover probability will be 0.7
![Page 57: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/57.jpg)
57
Application and Results
2- Fuzzy Controller Design with GA
dttevaluefitness
0
)(.
![Page 58: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/58.jpg)
58
Application and Results
2- Fuzzy Controller Design with GA
Set Point
Time
overshot is nearly 6%,Ts is 0.046 sec Tr is 0.023 sec.
Set Point
Time
![Page 59: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/59.jpg)
59
Application and Results
3- VHDL Fuzzy Controller Implementation
PIC 16f877 as ADC DAC 0800.
![Page 60: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/60.jpg)
60
Application and Results
3- VHDL Fuzzy Controller Implementation
![Page 61: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/61.jpg)
61
Application and Results
3- VHDL Fuzzy Controller Implementation
![Page 62: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/62.jpg)
62
Application and Results
3- VHDL Fuzzy Controller Implementation
Change of error
Time
Error
![Page 63: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/63.jpg)
63
Application and Results
3- VHDL Fuzzy Controller Implementation
Set Point
Time
Set Point
Time
![Page 64: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/64.jpg)
64
Application and Results
3- VHDL Fuzzy Controller Implementation
![Page 65: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/65.jpg)
65
Application and Results
3- VHDL Fuzzy Controller Implementation
![Page 66: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/66.jpg)
66
Application and Results
3- VHDL Fuzzy Controller Implementation
![Page 67: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/67.jpg)
67
CONCLUSION
•Fuzzy logic and fuzzy controller.•GA •FPGA •Xfuzzy CAD tool.• The Magnetic Levitation CE152.• Fuzzy controller with and without GA are tested.•Implementation of fuzzy controller using FPGA.
![Page 68: 1 Design GA-Fuzzy Controller for Magnetic Levitation Using FPGA Prepared by Hosam.M Abu Elreesh Advisor Dr. Basil Hamed.](https://reader037.fdocuments.in/reader037/viewer/2022110101/56649ee05503460f94bf01eb/html5/thumbnails/68.jpg)
68
Thank You