Download presentation
Presentation is loading. Please wait.
Published byHelena Gilmore Modified over 8 years ago
1
Numerical Methods Fast Fourier Transform Part: Theoretical Development of Fast Fourier Transform http://numericalmethods.eng.usf.edu
2
For more details on this topic Go to http://numericalmethods.eng.usf.eduhttp://numericalmethods.eng.usf.edu Click on Keyword Click on Fast Fourier Transform
3
You are free to Share – to copy, distribute, display and perform the work to Remix – to make derivative works
4
Under the following conditions Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial — You may not use this work for commercial purposes. Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
5
Major: All Engineering Majors Authors: Duc Nguyen http://numericalmethods.eng.usf.edu Numerical Methods for STEM undergraduates http://numericalmethods.eng.usf.edu 6/3/20165 Chapter 11.06: Theoretical Development of Fast Fourier Transform Lecture # 16
6
Theoretical Development of FFT For the case of Recall Equation (5) from Chapter 11.05 Informal Development of FFT, where 6/3/20166 (11.65) Consider the case. In this case, we can express and as 2-bit binary numbers: (1) (2)
7
Theoretical Development cont. Eqs. (1) and (2) can also be expressed in compact forms, as following where (3) (4) In the new notations, Eq.(11.65) becomes (5) 6/3/20167
8
http://numericalmethods.eng.usf.edu8 Consider Theoretical Development cont.
9
Notice that Hence Eq. (5) can be simplified to (7) 6/3/20169
10
http://numericalmethods.eng.usf.edu10 Define (8) Eq. (8) can be modified to (9) Theoretical Development cont.
11
Hence (10) In matrix notation, Eq.(10) can be written as (11) 6/3/201611
12
Theoretical Development cont. It can be seen that Eq. (11) plays the same role as Eq. (10) from the Informal Development ppt. Now we can define (12) (13) 6/3/201612
13
http://numericalmethods.eng.usf.edu13 Hence (14) Now we have (15) Theoretical Development cont.
14
It can be seen that Eq. (15) plays the same role as Eq. (12) from the Informal Development ppt. Also, comparing Eq. (5) and Eq. (13), one gets (16) Thus, Eq. (16) implies that unscrambling (or bit-reversed operations) the results of will give us the desired results for. 6/3/201614
15
THE END http://numericalmethods.eng.usf.edu
16
This instructional power point brought to you by Numerical Methods for STEM undergraduate http://numericalmethods.eng.usf.edu Committed to bringing numerical methods to the undergraduate Acknowledgement
17
For instructional videos on other topics, go to http://numericalmethods.eng.usf.edu/videos/ This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
18
The End - Really
19
Numerical Methods Fast Fourier Transform Part: Theoretical Development of FFT http://numericalmethods.eng.usf.edu
20
For more details on this topic Go to http://numericalmethods.eng.usf.eduhttp://numericalmethods.eng.usf.edu Click on Keyword Click on Fast Fourier Transform
21
You are free to Share – to copy, distribute, display and perform the work to Remix – to make derivative works
22
Under the following conditions Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial — You may not use this work for commercial purposes. Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
23
Chapter 11.06: Theoretical Development (Contd.) The set of Eqs. (8), (12), and (16) represents the original Cooley-Turkey [1–4] formulation of the FFT. Consider the case In this case, and can be expressed in compact forms (using 3-bit binary numbers) as (18) (17) where 6/3/201623 Lecture # 17
24
Theoretical Development cont. In the new notations, Eq. (5) from the Informal Development ppt becomes (19) Consider (20) 6/3/201624
25
Theoretical Development cont. Due to the definitions of (shown in Eq. (4) of Informal Development), each of the 3 terms inside the square bracket is equal to 1. Thus, Eq. (19) can be simplified to: (21) Define (22) (23) (24) 6/3/201625
26
Theoretical Development cont. Hence (25) Remarks about Eq. (22) (22a) companion nodes (22b) 6/3/201626
27
http://numericalmethods.eng.usf.edu27 skip computation Theoretical Development cont.
28
Figure 1. Graphical Form of FFT (for the case ). 6/3/201628
29
THE END http://numericalmethods.eng.usf.edu
30
This instructional power point brought to you by Numerical Methods for STEM undergraduate http://numericalmethods.eng.usf.edu Committed to bringing numerical methods to the undergraduate Acknowledgement
31
For instructional videos on other topics, go to http://numericalmethods.eng.usf.edu/videos/ This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
32
The End - Really
33
Numerical Methods Fast Fourier Transform Part: Theoretical Development of FFT http://numericalmethods.eng.usf.edu
34
For more details on this topic Go to http://numericalmethods.eng.usf.eduhttp://numericalmethods.eng.usf.edu Click on Keyword Click on Fast Fourier Transform
35
You are free to Share – to copy, distribute, display and perform the work to Remix – to make derivative works
36
Under the following conditions Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial — You may not use this work for commercial purposes. Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
37
Chapter 11.06: General Case of FFT (Contd.) Consider the case where Eqs. (17) and (18) can be generalized to, where can be any integer number, as following (26) (27) Eq. (5) from Informal Development ppt becomes where (28) (29) 6/3/201637 Lecture # 18
38
General Case of FFT cont. The first term of the Eq. (29) can be computed as Since Hence all terms inside the brackets are equal to 1. Thus, (30) 6/3/201638
39
General Case of FFT cont. Similarly, the second term of Eq. (29) can be computed as (31) (32) Eq. (28) will eventually become (33) 6/3/201639
40
General Case of FFT cont. …. Let (34) (35) (36) (37) 6/3/201640
41
THE END http://numericalmethods.eng.usf.edu
42
This instructional power point brought to you by Numerical Methods for STEM undergraduate http://numericalmethods.eng.usf.edu Committed to bringing numerical methods to the undergraduate Acknowledgement
43
For instructional videos on other topics, go to http://numericalmethods.eng.usf.edu/videos/ This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
44
The End - Really
45
Numerical Methods Fast Fourier Transform Part: Theoretical Development of FFT http://numericalmethods.eng.usf.edu
46
For more details on this topic Go to http://numericalmethods.eng.usf.eduhttp://numericalmethods.eng.usf.edu Click on Keyword Click on Fast Fourier Transform
47
You are free to Share – to copy, distribute, display and perform the work to Remix – to make derivative works
48
Under the following conditions Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial — You may not use this work for commercial purposes. Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
49
Chapter 11.06: FFT Algorithms (Contd.) Consider when (where are integers) Let’s first define (38) (39) where (40) (41) (42) (43) 6/3/201649 Lecture # 19
50
FFT Algorithms cont. Remarks: a) The smallest value for (when ). b) The largest value for “ “ will occur when and. Hence, Eq. (38) gives Thus, if then 6/3/201650 Using the above notations, Equation (5) from Informal Development ppt can be expressed as (44)
51
FFT Algorithms cont. Consider (45) (46) Due to the fact that (47) Substituting Eq. (46) into (44), one gets (48) 6/3/201651
52
http://numericalmethods.eng.usf.edu52 Define (49) (50) Hence (51) General Case of FFT cont.
53
FFT Algorithms cont. For,then Eqs. (49) and (50) give (52) (53) Expanding Eq. (52), one obtains (52a) 6/3/2016
54
http://numericalmethods.eng.usf.edu54 Similarly, expanding Eq. (53), one gets 54 (53a) General Case of FFT cont.
55
FFT Algorithms cont. For a typical term corresponding to, Eq. (52a) gives (52b) (52c) For a typical term, such as, Eq. (53a) gives 6/3/201655 (53b)
56
http://numericalmethods.eng.usf.edu56 A partial/incomplete graph of FFT (based on Eqs. (52b), (52c) and (53b)), for the case is presented in Figure 2. General Case of FFT cont.
57
Partial/”Incomplete” Graph of FFT Figure 2. An “Incomplete” FFT for. 6/3/201657
58
THE END http://numericalmethods.eng.usf.edu
59
This instructional power point brought to you by Numerical Methods for STEM undergraduate http://numericalmethods.eng.usf.edu Committed to bringing numerical methods to the undergraduate Acknowledgement
60
For instructional videos on other topics, go to http://numericalmethods.eng.usf.edu/videos/ This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
61
The End - Really
62
Numerical Methods Fast Fourier Transform Part: Theoretical Development of FFT http://numericalmethods.eng.usf.edu
63
For more details on this topic Go to http://numericalmethods.eng.usf.eduhttp://numericalmethods.eng.usf.edu Click on Keyword Click on Fast Fourier Transform
64
You are free to Share – to copy, distribute, display and perform the work to Remix – to make derivative works
65
Under the following conditions Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial — You may not use this work for commercial purposes. Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
66
Chapter 11.06: FFT Algorithms (Contd.) Consider the case In this case, utilizing Eqs. (40-43) into Eqs. (38) and (39), one obtains (54) (55) where (56) (57) (58) (59) 6/3/201666 Lecture # 20
67
FFT Algorithms cont. Then, Eq. (5) from Informal Development ppt becomes (60) Consider (61) Substituting Eq. (61) into Eq. (60), one obtains (62) 6/3/2016 67
68
FFT Algorithms cont. Define Hence (63) (64) (65) Expanding (the summation) of Eqs. (63) and (64), one gets (66) 6/3/201668
69
FFT Algorithms cont. Assuming, and then the previous equation becomes (67) Similarly, one has (68) Assuming, and, then (69) 6/3/201669
70
FFT Algorithms cont. Thus, computation of each term for arrays and (see Eqs. (67) and (69)) will require the “previous” 4 terms and 2 terms, respectively. The partial (or incomplete) graphical display for FFT (with ;, ) based on Eqs. (67) and (69), is shown in Figure 3. 6/3/201670
71
FFT Algorithms cont. Figure 3. An “Incomplete” FFT for 6/3/201671
72
THE END http://numericalmethods.eng.usf.edu
73
This instructional power point brought to you by Numerical Methods for STEM undergraduate http://numericalmethods.eng.usf.edu Committed to bringing numerical methods to the undergraduate Acknowledgement
74
For instructional videos on other topics, go to http://numericalmethods.eng.usf.edu/videos/ This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
75
The End - Really
76
Numerical Methods Fast Fourier Transform Part: Theoretical Development of FFT http://numericalmethods.eng.usf.edu
77
For more details on this topic Go to http://numericalmethods.eng.usf.eduhttp://numericalmethods.eng.usf.edu Click on Keyword Click on Fast Fourier Transform
78
You are free to Share – to copy, distribute, display and perform the work to Remix – to make derivative works
79
Under the following conditions Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial — You may not use this work for commercial purposes. Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
80
Chapter 11.06: General FFT Algorithms (Contd.) The relationship between FFT algorithms for versus is important to notice. For the more general case, such as where are any ‘integer” numbers. (70) 6/3/201680 Lecture # 21
81
http://numericalmethods.eng.usf.edu81 With (should refer to Eqs. 40-43) (73) (74) Define (should refer/compare to Eqs. 38-39) (71) (72) General FFT Algorithms
82
General FFT Algorithms cont. In order to simplify the “arithmetic efforts”, and to easily identify the “patterns” of the general FFT algorithms/formulas, we assume, and therefore the following case will be considered (75) Hence, Eqs. (71) to (74) will be simplified to 6/3/201682 (76) (77)
83
http://numericalmethods.eng.usf.edu83 (78) (79) General FFT Algorithms cont.
84
84 General FFT Algorithms cont. Eq. (5) from Informal Development ppt can be expressed as (80) where (81) (82) (83) 6/3/2016
85
General FFT Algorithms cont. where (84) (85) since 6/3/201685
86
General FFT Algorithms cont. and with (88) (87) (86) 6/3/201686
87
http://numericalmethods.eng.usf.edu87 Substituting Eqs. (85), (87), and (88) into Eq. (83), and using Eq. (81), then Eq. (80) will become (89) General FFT Algorithms cont.
88
Define (90) (91) (92) Then (93) 6/3/201688
89
General FFT Algorithms cont. 6/3/201689 (Connections betweenandFFT Algorithms) In order to see the “connections” between the general FFT algorithms (such as ) and the base 2 FFT algorithms (such as ), we now consider the special case where
90
http://numericalmethods.eng.usf.edu90 Hence we have that In this case, Eqs. (90) to (92) can be simplified to (94) (95) (96) In fact, Eqs. (94) to (96) are “identical” to the earlier derived Eqs.(22) to (24). General FFT Algorithms cont.
91
THE END http://numericalmethods.eng.usf.edu
92
This instructional power point brought to you by Numerical Methods for STEM undergraduate http://numericalmethods.eng.usf.edu Committed to bringing numerical methods to the undergraduate Acknowledgement
93
For instructional videos on other topics, go to http://numericalmethods.eng.usf.edu/videos/ This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
94
The End - Really
95
Numerical Methods Fast Fourier Transform Part: Twiddle Factor FFT Algorithms http://numericalmethods.eng.usf.edu
96
For more details on this topic Go to http://numericalmethods.eng.usf.eduhttp://numericalmethods.eng.usf.edu Click on Keyword Click on Fast Fourier Transform
97
You are free to Share – to copy, distribute, display and perform the work to Remix – to make derivative works
98
Under the following conditions Attribution — You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). Noncommercial — You may not use this work for commercial purposes. Share Alike — If you alter, transform, or build upon this work, you may distribute the resulting work only under the same or similar license to this one.
99
Chapter 11.06: Twiddle Factor FFT Algorithms (Contd.) Consider the case To facilitate the discussions for better understanding about the “improved FFT” algorithms by using the “twiddle factor” [1-4], a specific case for will be explained in the following paragraphs. 6/3/201699 Lecture # 22
100
http://numericalmethods.eng.usf.edu100 Eq. (48) (97) can be re-written as Twiddle Factor FFT Algorithms
101
101 Twiddle Factor FFT Algorithms cont. The factor can be included either in the “inner summation” or in the “outer summation” (as shown in Eq. (50). In this section, however, the factor is included in the “inner summation”. Thus, one defines (98) (99) (100) 6/3/2016
102
Twiddle Factor FFT Algorithms cont. Remarks: a) Consider the following term in Eq. (98) (101) Consider the following few possibilities for, in Table 1. 6/3/2016102
103
Twiddle Factor FFT Algorithms cont. +1... 4... +i3 1 -i 012012 Table 1. Values of twiddle factor in FFT. Thus depending on the numerical (integer) value of, the value of can only be. Hence there is “no multiplication” involved in computing. 6/3/2016103
104
Twiddle Factor FFT Algorithms cont. (b) Since the twiddle factor is included in the first vector, as shown in Eq (98), the remaining factor can also be either Thus there is also “no multiplication” involved in calculating the second vector as shown in Eq. (99). c) The twiddle factor can also be applied for the case, or for the more general case 6/3/2016104
105
Table 11.1a Fourier Coefficient Program (in FORTRAN) (a) Input Descriptions.Period = say, ; nterms= say, 8 (number of terms used, for computing. nsegments = 3 (number of segments, to define the given periodic function). integration limits for all 3 segments function =for the 1 st segment function =for the 2 nd segment function =for the 3 rd segment 100 1056/3/2016
106
http://numericalmethods.eng.usf.edu106 (b) Output Descriptions The numerical values of the unknown Fourier coefficients are printed.
107
Fourier Coefficient Program (in MATLAB) function f_coeff_final() clc clear close all clear all inputdata; coeff; end function [] = inputdata(); global n t1 ft1 ft11 t2 ft2 ft22 t3 ft3 ft33 t4 f4 nterms_ak n = 100; nterms_ak = 8; 101 1076/3/2016
108
http://numericalmethods.eng.usf.edu108 % seg 1 t1 = [-pi:(pi/n):(-pi/2)]; ft1 = -pi/2; ft11 = (-pi/2. + zeros(size(t1))); % Seg 2 t2 = [(-pi/2):(pi/n):(pi/2)]; ft2 = -t2; ft22 = (-t2 + zeros(size(t2))); % Seg 3 t3 = [(pi/2):(pi/n):pi]; ft3 = -pi/2; ft33 = (-pi/2. + zeros(size(t3))); t4 = [t1 t2 t3]; f4 = [ft11 ft22 ft33]; end Fourier Coefficient Program (in MATLAB)
109
function [] = coeff() global t4 f4 nterms_ak t4_first = t4(1); t4_last = t4(length(t4)); p_value = ((t4_last - t4_first)/2); period = 2 * pi; angfreq = 2 * pi / period; % calculation of a0 a0 = trapz(t4,f4) / (2*pi) angfreq = zeros(nterms_ak,1); for i = 1:nterms_ak angfreq(i) = i*pi/p_value; end 102 1096/3/2016 Fourier Coefficient Program (in MATLAB)
110
% calculation of ak and bk a = zeros(nterms_ak,1); b = zeros(nterms_ak,1); for i = 1:nterms_ak theta = i*pi.*t4./p_value; c_value = cos(theta); s_value = sin(theta); a_value = c_value.*f4; b_value = s_value.*f4; a(i) = (trapz(t4,a_value))/p_value; b(i) = (trapz(t4,b_value))/p_value; end a b 103 1106/3/2016 Fourier Coefficient Program (in MATLAB)
111
f_ft = (a0)*ones(size(t4)); for i = 1:nterms_ak f_ft = f_ft + (a(i).*cos(i*pi.*t4./p_value)) + (b(i).*sin(i*pi.*t4./p_value)); end figure; plot(t4,f4); hold on; plot(t4,f_ft,'-.'); grid on xlabel('t'); ylabel('f(t)'); legend('f(t)', 'Fourier series'); end 104 1116/3/2016 Fourier Coefficient Program (in MATLAB)
112
http://numericalmethods.eng.usf.edu112 f_ft = (a0)*ones(size(t4)); for i = 1:nterms_ak f_ft = f_ft + (a(i).*cos(i*pi.*t4./p_value)) + (b(i).*sin(i*pi.*t4./p_value)); end Fourier Coefficient Program (in MATLAB)
113
figure; plot(t4,f4); hold on; plot(t4,f_ft,'-.'); grid on xlabel('t'); ylabel('f(t)'); legend('f(t)', 'Fourier series'); end 105 1136/3/2016 Fourier Coefficient Program (in MATLAB)
114
THE END http://numericalmethods.eng.usf.edu
115
This instructional power point brought to you by Numerical Methods for STEM undergraduate http://numericalmethods.eng.usf.edu Committed to bringing numerical methods to the undergraduate Acknowledgement
116
For instructional videos on other topics, go to http://numericalmethods.eng.usf.edu/videos/ This material is based upon work supported by the National Science Foundation under Grant # 0717624. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
117
The End - Really
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.