-
Notifications
You must be signed in to change notification settings - Fork 86
/
Copy pathdft_introduction.html
173 lines (152 loc) · 7.38 KB
/
dft_introduction.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<html>
<head>
<title>Circles Sines and Signals - The Fourier Transform</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="third_party/d3/d3.min.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
jax: ["input/TeX","input/MathML","output/SVG"],
extensions: ["tex2jax.js","mml2jax.js","MathMenu.js","MathZoom.js"],
TeX: {
extensions: ["AMSmath.js","AMSsymbols.js","noErrors.js","noUndefined.js"]
}
});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({ TeX: { extensions: ["color.js"] }});
</script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config(
{
SVG: {linebreaks: { automatic:true }},
displayAlign: "center"
}
);
</script>
<script type="text/javascript"
src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_SVG">
</script>
<link href='//fonts.googleapis.com/css?family=Lato:400,700' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Vollkorn:400italic,400' rel='stylesheet' type='text/css'>
<style>
@import url("fontello-b1d57784/css/fontello.css");
@import url("style.css");
</style>
<link rel="icon" type="" href="favicon.ico"></head>
<body>
<div class="title">
<table width="900">
<tr>
<td width="90%">
<div class="bigheader" id="titleinfo">
</div>
</td>
</tr>
<tr>
<td width="70%">
<br/>
<div id="menu" class="menu" style="margin-left: 45; ">
<table> <tr id="menurow"> </tr> </table>
</div>
<!-- -->
</td>
</tr>
</table>
</div>
<div class="littleheader"> THE FOURIER TRANSFORM
<div class="subheader" style="font-size: 14px"> REPRESENTING SIGNALS AS SUMS OF SINES </div>
</div>
<table class="figureTable">
<tr>
<td style="vertical-align: top;">
<div class="text" style="margin-left: 0px">
<p>
We saw in the previous section that any point on a two-dimensional surface can be expressed using a pair of Cartesian or polar coordinates. We also showed that there are <i>transforms</i> which allow us to switch between these two representations at will. A similar situation exists for signals. We may choose to represent signals using time-based coordinates or frequency-based coordinates. The <i>Fourier Transform</i> is our tool for switching between these two representations.
</p>
<p>
I find it helpful to think of the frequency-domain representation as a <i>list of phasors</i>. The Discrete Fourier Transform takes your time-domain signal and produces a list of phasors which, when summed together, will reproduce your signal. In very broad strokes, the two representations can be thought of as looking something like this,
</p><br/>
<table>
<tr class="figureCaption">
<td width="100%">
</td>
</tr>
<tr>
<td>
<svg id="fourierbasic" class="svgWithText" width="700" height="200" style="margin-left: 0px;"></svg>
<script type="text/javascript" src="js/fourier_transform_basic.js"></script>
</td>
</tr>
</table>
<p>
We combine or sum phasors by stringing them together into a chain. The center of the first phasor is placed at the origin, and the center of each subsequent phasor is “attached” to the tip of the previous phasor. Once the chain of phasors is constructed, we allow each phasor to begin rotating. We can reconstruct the time domain signal by tracing the <i>vertical</i> distance from the origin to the tip of the <i>last</i> phasor. The following visualization allows you to play with the relative magnitudes of five phasors which are linked together in a “chain”.<sup>1</sup>
</p>
<br/>
<table>
<tr class="figureCaption">
<td width="100%">
</td>
</tr>
<tr>
<td>
<svg id="phasorSum2" class="svgWithText" width="650" height="420" style="margin-left: 50px;"></svg>
<script>
var SUPER_AMP_1 = 0.5;
var SUPER_AMP_2 = 0.5;
var SUPER_AMP_3 = 0.5;
var SUPER_AMP_4 = 0.5;
var SUPER_AMP_5 = 0.5;
</script>
<script type="text/javascript" src="js/inverse_fourier_transform.js"></script>
<table style="table-layout: fixed; width: 350px; margin-left: 305px">
<tr>
<td style="width: 80px; text-align: center;">
<div>
<!-- <label >Harmonic 1</label><br/> -->
<input type=range min=0 max=100 value=100 id=ampFader1 step=1 oninput="SUPER_AMP_1 = value / 200" style="width: 70px">
</div>
</td>
<td style="width: 80px; text-align: center;">
<div>
<!-- <label >Harmonic 2</label><br/> -->
<input type=range min=0 max=100 value=100 id=ampFader1 step=1 oninput="SUPER_AMP_2 = value / 200" style="width: 70px">
</div>
</td>
<td style="width: 80px; text-align: center;">
<div>
<!-- <label >Harmonic 3</label><br/> -->
<input type=range min=0 max=100 value=100 id=ampFader1 step=1 oninput="SUPER_AMP_3 = value / 200" style="width: 70px">
</div>
</td>
<td style="width: 80px; text-align: center;">
<div>
<!-- <label >Harmonic 4</label><br/> -->
<input type=range min=0 max=100 value=100 id=ampFader1 step=1 oninput="SUPER_AMP_4 = value / 200" style="width: 70px">
</div>
</td>
<td style="width: 80px; text-align: center;">
<div>
<!-- <label >Harmonic 5</label><br/> -->
<input type=range min=0 max=100 value=100 id=ampFader1 step=1 oninput="SUPER_AMP_5 = value / 200" style="width: 70px">
</div>
</td>
</tr>
</table>
</td>
</tr>
</table><br/>
<p>
You should find it relatively easy to create different wave shapes like the saw and square. This is because the phasors are <i>harmonically related</i>. In other words, the second phasor spins twice as quickly as the first, the third spins three times as quickly, the fourth four times, and so on. The Discrete Fourier Transform always produces a set of phasors which are harmonically related.
In the next few sections we’ll dig deeply into the inner workings of the Discrete Fourier Transform. We’ll see exactly <i>how</i> this list of phasors is generated from the time domain signal.
<br/><br/>
</td>
<td class="figureExplanation" style="">
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<b>1.</b> Which is all a rather wordy and roundabout way to say that you just <i>sum them up</i>. The symbolic expression is straightforward, and it looks something like,<br/><br/> A<sub>1</sub>sin(f<sub>1</sub> * phase) + <br/>A<sub>2</sub>sin(f<sub>2</sub> * phase) ...<br/><br/> Where A<sub>i</sub> is the Amplitude of the i<sup>th</sup> sine and f<sub>i</sub> is the frequency of the i<sup>th</sup> sine.
</td>
</tr>
</table><br/>
<div class="title" id="footer"></div><script type="text/javascript" src="menu.js"></script></body>
</html>