Professional Documents
Culture Documents
0.5
0.5
20
40
60
80
100
120
140
160
180
200
0.5
0.5
20
40
60
80
100
120
140
160
180
200
0.8
0.6
0.4
0.2
0.2
0.4
0.6
0.8
20
40
60
80
100
120
140
160
180
200
Linear Combination
i i (u)
i=0
x(t) =
X (w )e (2jwt) dw
X (n) =
N1
X
x(k)e 2jnk/N
k=0
x(k) =
N1
1 X
X (n)e 2jnk/N
N
n=0
f (x) = f (x0 )+
f 0 (x0 )
f 00 (x0 )
f 000 (x0 )
(xx0 )+
(xx0 )2 +
(xx0 )3 +...
1
12
123
or more compactly as
f (x) =
X
f (n) (x0 )
n=0
n!
(x x0 )n
X
xn
n=0
n!
=1+x +
x2 x3
+
+ ...
2
3!
We can define:
e j ==
X
(j)n
n=0
n!
= 1 + j
2
3
j
+ ...
2
3!
All even order terms are real; all odd-order terms are imaginary:
ree j = 1 2 /2 + 4 /4! ...
ime j = 3 /3! + 5 /5! ...
cos() =
n>=0;n is even
sin() =
X
n>=0;n is odd
(1)n/2 n
n!
(1)(n1)/2 n
n!
Example
Sum of cosines with frequencies 12 and 9, sampling rate = 120
0.02
0.01
0
0.01
0.02
20
40
60
signal
80
100
120
20
40
60
real part
two cosines (freqs=9, 12)
80
100
120
20
40
60
imag part
80
100
120
1
0.5
0
0.5
0.2
0.1
0
0.1
0.2
Example
FFT coefficients mapped onto unit circle
FFT projected onto unit circle
1
0.8
0.6
0.4
0.2
0.2
0.4
0.6
0.8
1
1
0.8
0.6
0.4
0.2
0.2
0.4
0.6
0.8
Impulse response
impulse response
1
0.5
10
20
30
40
50
signal
60
70
80
90
100
10
20
30
40
50
magnitude
60
70
80
90
100
10
20
30
40
50
phase
60
70
80
90
100
0.01
0.01
0.01
1
0.5
0
0.5
1
Impulse response
delayed impulse response
1
0.5
10
20
30
40
50
signal
60
70
80
90
100
10
20
30
40
50
magnitude
60
70
80
90
100
10
20
30
40
50
phase
60
70
80
90
100
0.01
0.01
0.01
4
2
0
2
4
49.5361
49.5361
49.5361
10
20
30
40
50
60
number of points shifted
70
80
90
100
10
20
30
40
50
60
number of points shifted
70
80
90
100
3
2
angle freq=6
magnitude
49.5361
1
0
1
2
3
0.4
0.3
0.2
0.1
0
freq (mag)
0.1
0.2
0.3
0.4
0.5
0.4
0.3
0.2
0.1
0
phase
0.1
0.2
0.3
0.4
0.5
5
0
5
0.5
1
0
1
100
100
100
200
300
component sinusoids
400
500
600
200
300
400
500
reconstructed signal using component sinusoids vs original
600
5
0
5
2
0
2
200
300
400
reconstructed signal using ifft vs original
500
600
Aliasing
The useful range is the Nyquist frequency (fs/2)
cos(21)
1
0
1
0.1
0.2
0.3
0.1
0.2
0.3
0.1
0.2
0.3
0.1
0.2
0.3
0.1
0.2
0.3
0.1
0.2
0.3
0.4
0.5
0.6
cos(21) sampled at 24 Hz
0.7
0.8
0.9
0.7
0.8
0.9
0.7
0.8
0.9
0.7
0.8
0.9
0.7
0.8
0.9
0.7
0.8
0.9
1
0
1
0.4
0.5
cos(45)
0.6
1
0
1
0.4
0.5
0.6
cos(45) sampled at 24 Hz
1
0
1
0.4
0.5
cos(3)
0.6
1
0
1
0.4
0.5
0.6
cos(3) sampled at 24 Hz
1
0
1
0.4
0.5
0.6
Leakage
Even below Nyquist, when frequencies in the signal do not align
well with sampling rate of signal, there can be leakage. First
consider a well-aligned exampl (freq = .25 sampling rate)
Sinusoid at 1/4 the Sampling Rate
a)
Amplitude
1
0.5
0
0.5
1
Magnitude (Linear)
b)
10
20
30
40
Time (samples)
50
60
70
40
30
20
10
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
Magnitude (dB)
c)
0
100
200
300
Leakage
Now consider a poorly-aligned example (freq = (.25 + .5/N) *
sampling rate)
Sinusoid NEAR 1/4 the Sampling Rate
a)
Amplitude
1
0.5
0
0.5
1
10
20
30
40
Time (samples)
50
60
70
30
20
10
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
30
Magnitude (dB)
c)
Magnitude (Linear)
b)
20
10
0
10
Leakage
Comparison:
Sinusoid at 1/4 the Sampling Rate
0
0.5
1
Magnitude (Linear)
b)
10
20
30
40
Time (samples)
50
60
70
30
20
10
c)
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
0.5
0
0.5
1
b)
40
1
Amplitude
Amplitude
1
0.5
Magnitude (Linear)
a)
c)
10
20
30
40
Time (samples)
50
60
70
20
10
0
30
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
Magnitude (dB)
Magnitude (dB)
30
0
100
200
300
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
20
10
0
10
0.5
10
20
30
40
Time (samples)
50
60
70
Magnitude (dB)
b)
0
50
100
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
0.4
0.3
0.2
0.1
0
0.1
0.2
Normalized Frequency (cycles per sample))
0.3
0.4
0.5
Magnitude (dB)
c)
0
50
100
0.5
Leakage Reduced
Comparison:
b)
Sinusoid NEAR 1/4 the Sampling Rate
a)
Amplitude
0.5
1
Magnitude (Linear)
10
20
30
40
Time (samples)
50
60
10
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
Magnitude (dB)
10
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
10
20
0.8
0.9
30
40
Time (samples)
50
60
70
10
5
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
0.1
0.2
0.3
0.4
0.5
0.6
0.7
Normalized Frequency (cycles per sample))
0.8
0.9
c)
20
15
30
Magnitude (dB)
0.5
1
20
10
70
30
1
0.5
Magnitude (Linear)
Amplitude
b)
c)
1
0.5
20
0
20
40
60
80
Convolution theorem
Examples
Gibbs Phenomenon
1
0.5
0
500
400
300
200
100
0
100
200
ideal lopass filter in frequency domain
300
400
500
400
300
200
100
0
100
ideal filter coeffs in time domain
200
300
400
500
100
200
300
400
500
600
truncated causal filter
700
800
900
1000
0
500
400
300
200
100
0
100
Gibbs phenomenon
200
300
400
500
0.1
0
0.1
500
0.1
0
0.1
1.5
1
0.5
Spectral Analysis
Spectral Analysis
Spectral Analysis
X (m, n) =
N1
X
k=0
Trumpet (G4)
5000
Frequency
4000
3000
2000
1000
3
Time
[Listen]
Violin (G4)
5000
Frequency
4000
3000
2000
1000
0.5
1.5
2
Time
2.5
[Listen]
Flute (G4)
5000
Frequency
4000
3000
2000
1000
0.5
1.5
Time
2.5
[Listen]
Piano (G4)
5000
Frequency
4000
3000
2000
1000
0.1
0.2
0.3
0.4
Time
0.5
0.6
0.7
[Listen]
Voice
8000
7000
6000
Frequency
5000
4000
3000
2000
1000
0.2
0.4
0.6
0.8
1
Time
1.2
1.4
1.6
1.8
[Listen]
14000
12000
Frequency
10000
8000
6000
4000
2000
4
Time
[Listen]
7671
4305
Frequency
2416
1356
761
427
240
135
4
Time
Time-Space Tradeoff
spoken "Steven Usma"
0.6
0.4
Amp.
0.2
0.2
0.4
0.2
0.4
0.6
0.8
1.2
1.4
1.6
Time-Space Tradeoff
Narrowband Spectrogram overlap=152 timepts=1633
4000
Frequency
3000
2000
1000
0.2
0.4
0.6
0.8
Time
1.2
1.4
1.6
Frequency
3000
2000
1000
0.2
0.4
0.6
0.8
Time
1.2
1.4
1.6
10
15
time (seconds)
20
25
30
10
15
time (seconds)
20
25
30
500
1000
1500
2000
2500 3000
lags (ms)
3500
4000
4500
5000