1. Introduction to Audio Content Analysis
module 3.3.1: time-frequency representations — Fourier transform
alexander lerch
2. overview introduction definition properties sampled STFT DFT summary
introduction
overview
corresponding textbook section
section 3.3.1
appendix B
lecture content
• FT of continuous signals
• FT properties
• FT of sampled signals
• Short Time FT (STFT)
• DFT
learning objectives
• name and explain definition and properties of the FT
module 3.3.1: time-frequency representations — Fourier transform 1 / 19
3. overview introduction definition properties sampled STFT DFT summary
introduction
overview
corresponding textbook section
section 3.3.1
appendix B
lecture content
• FT of continuous signals
• FT properties
• FT of sampled signals
• Short Time FT (STFT)
• DFT
learning objectives
• name and explain definition and properties of the FT
module 3.3.1: time-frequency representations — Fourier transform 1 / 19
4. overview introduction definition properties sampled STFT DFT summary
fourier transform
introduction
top time domain signal magnitude spectrum in dB
bottom real spectrum imaginary spectrum
module 3.3.1: time-frequency representations — Fourier transform 2 / 19
matlab
source:
plotFourierTransform.m
5. overview introduction definition properties sampled STFT DFT summary
fourier transform
definition (continuous)
X(jω) = F[x(t)] =
∞
Z
−∞
x(t)e−jωt
dt
sidenote: Fourier series coefficients
ak =
1
T0
T0/2
Z
−T0/2
x(t)e−jω0kt
dt
T0 → ∞ to allow the analysis of aperiodic functions
⇒ kω0 → ω
module 3.3.1: time-frequency representations — Fourier transform 3 / 19
6. overview introduction definition properties sampled STFT DFT summary
fourier transform
definition (continuous)
X(jω) = F[x(t)] =
∞
Z
−∞
x(t)e−jωt
dt
sidenote: Fourier series coefficients
ak =
1
T0
T0/2
Z
−T0/2
x(t)e−jω0kt
dt
T0 → ∞ to allow the analysis of aperiodic functions
⇒ kω0 → ω
module 3.3.1: time-frequency representations — Fourier transform 3 / 19
7. overview introduction definition properties sampled STFT DFT summary
fourier transform
representations
X(jω) = ℜ[X(jω)] + ℑ[X(jω)]
= |X(jω)|
| {z }
magnitude
· ΦX(ω)
| {z }
phase
|X(jω)| =
q
ℜ[X(jω)]2 + ℑ[X(jω)]2
ΦX(ω) = atan 2
ℑ[X(jω)]
ℜ[X(jω)]
complex spectrum either represented as magnitude phase or as real imaginary
magnitude spectrum has no negative values
module 3.3.1: time-frequency representations — Fourier transform 4 / 19
8. overview introduction definition properties sampled STFT DFT summary
fourier transform
representations
X(jω) = ℜ[X(jω)] + ℑ[X(jω)]
= |X(jω)|
| {z }
magnitude
· ΦX(ω)
| {z }
phase
|X(jω)| =
q
ℜ[X(jω)]2 + ℑ[X(jω)]2
ΦX(ω) = atan 2
ℑ[X(jω)]
ℜ[X(jω)]
note:
complex spectrum either represented as magnitude phase or as real imaginary
magnitude spectrum has no negative values
module 3.3.1: time-frequency representations — Fourier transform 4 / 19
9. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 1: invertibility
x(t) = F−1
[X(jω)]
=
1
2π
∞
Z
−∞
X(jω)ejωt
dω
time domain signal can be perfectly reconstructed — no information loss
FT and IFT are very similar, largely equivalent
module 3.3.1: time-frequency representations — Fourier transform 5 / 19
10. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 1: invertibility
x(t) = F−1
[X(jω)]
=
1
2π
∞
Z
−∞
X(jω)ejωt
dω
note:
time domain signal can be perfectly reconstructed — no information loss
FT and IFT are very similar, largely equivalent
module 3.3.1: time-frequency representations — Fourier transform 5 / 19
11. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 2: superposition
y(t) = c1 · x1(t) + c2 · x2(t)
7→
Y (jω) = c1 · X1(jω) + c2 · X2(jω)
FT is a linear transform
module 3.3.1: time-frequency representations — Fourier transform 6 / 19
12. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 2: superposition
y(t) = c1 · x1(t) + c2 · x2(t)
7→
Y (jω) = c1 · X1(jω) + c2 · X2(jω)
note:
FT is a linear transform
module 3.3.1: time-frequency representations — Fourier transform 6 / 19
13. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 3: convolution and multiplication
y(t) =
Z ∞
−∞
h(τ) · x(t − τ) dτ
7→
Y (jω) = H(jω) · X(jω)
convolution in time domain means multiplication in frequency domain
convolution in frequency domain means multiplication in time domain
module 3.3.1: time-frequency representations — Fourier transform 7 / 19
14. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 3: convolution and multiplication
y(t) =
Z ∞
−∞
h(τ) · x(t − τ) dτ
7→
Y (jω) = H(jω) · X(jω)
note:
convolution in time domain means multiplication in frequency domain
convolution in frequency domain means multiplication in time domain
module 3.3.1: time-frequency representations — Fourier transform 7 / 19
15. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 4: Parseval’s theorem
∞
Z
−∞
x2
(t) dt =
1
2π
∞
Z
−∞
|X(jω)|2
dω
energy of the signal is preserved when switching between time and frequency
domains
module 3.3.1: time-frequency representations — Fourier transform 8 / 19
16. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 4: Parseval’s theorem
∞
Z
−∞
x2
(t) dt =
1
2π
∞
Z
−∞
|X(jω)|2
dω
note:
energy of the signal is preserved when switching between time and frequency
domains
module 3.3.1: time-frequency representations — Fourier transform 8 / 19
17. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 5: time frequency shift
time shift
x(t − t0) 7→ X(jω)e−jωt0
frequency shift
1
2π
∞
Z
−∞
X(jω − ω0)ejωt
dω = ejω0t
· x(t)
time shift results in phase shift
frequency shift results in modulation of time signal
module 3.3.1: time-frequency representations — Fourier transform 9 / 19
18. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 5: time frequency shift
time shift
x(t − t0) 7→ X(jω)e−jωt0
frequency shift
1
2π
∞
Z
−∞
X(jω − ω0)ejωt
dω = ejω0t
· x(t)
note:
time shift results in phase shift
frequency shift results in modulation of time signal
module 3.3.1: time-frequency representations — Fourier transform 9 / 19
19. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 6: symmetry
|X(jω)| = |X(−jω)|
ΦX(ω) = −ΦX(−ω)
spectrum of (real) signal is conjugate complex
• magnitude spectrum is symmetric to ordinate
• phase spectrum is symmetric to origin
even signals have no imaginary spectrum
odd signals have no real spectrum
module 3.3.1: time-frequency representations — Fourier transform 10 / 19
20. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 6: symmetry
|X(jω)| = |X(−jω)|
ΦX(ω) = −ΦX(−ω)
note:
spectrum of (real) signal is conjugate complex
• magnitude spectrum is symmetric to ordinate
• phase spectrum is symmetric to origin
even signals have no imaginary spectrum
odd signals have no real spectrum
module 3.3.1: time-frequency representations — Fourier transform 10 / 19
21. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 7: time frequency scaling
y(t) = x(c · t)
7→
Y (jω) =
1
|c|
X
j
ω
c
scaling of abscissa in one domain leads to inverse scaling in the other domain
module 3.3.1: time-frequency representations — Fourier transform 11 / 19
22. overview introduction definition properties sampled STFT DFT summary
fourier transform
property 7: time frequency scaling
y(t) = x(c · t)
7→
Y (jω) =
1
|c|
X
j
ω
c
note:
scaling of abscissa in one domain leads to inverse scaling in the other domain
module 3.3.1: time-frequency representations — Fourier transform 11 / 19
23. overview introduction definition properties sampled STFT DFT summary
fourier transform
sampled time signals 1/2
sampled time signal can be modeled as multiplication of original signal with delta
pulse δT(t)
multiplication in time domain 7→ convolution in frequency domain
F[x(i)] = F[x(t) · δT(t)]
= F[x(t)] ∗ F[δT(t)]
= X(jω) ∗ ∆T(jω)
note
even if time domain signal is discrete, its Fourier transform is still continuous
spectrum is repeated periodically
module 3.3.1: time-frequency representations — Fourier transform 12 / 19
24. overview introduction definition properties sampled STFT DFT summary
fourier transform
sampled time signals 1/2
sampled time signal can be modeled as multiplication of original signal with delta
pulse δT(t)
multiplication in time domain 7→ convolution in frequency domain
F[x(i)] = F[x(t) · δT(t)]
= F[x(t)] ∗ F[δT(t)]
= X(jω) ∗ ∆T(jω)
note
even if time domain signal is discrete, its Fourier transform is still continuous
spectrum is repeated periodically
module 3.3.1: time-frequency representations — Fourier transform 12 / 19
25. overview introduction definition properties sampled STFT DFT summary
fourier transform
sampled time signals 1/2
sampled time signal can be modeled as multiplication of original signal with delta
pulse δT(t)
multiplication in time domain 7→ convolution in frequency domain
F[x(i)] = F[x(t) · δT(t)]
= F[x(t)] ∗ F[δT(t)]
= X(jω) ∗ ∆T(jω)
note
even if time domain signal is discrete, its Fourier transform is still continuous
spectrum is repeated periodically
module 3.3.1: time-frequency representations — Fourier transform 12 / 19
27. overview introduction definition properties sampled STFT DFT summary
fourier transform
STFT 1/2
short time Fourier transform (STFT):
Fourier transform of a short time segment
reasons:
• remember block based processing
• segment can be seen as quasi-periodic or stationary
implementation:
• pretend signal is 0 outside of the segment
⇒ multiplication of signal and window function
module 3.3.1: time-frequency representations — Fourier transform 14 / 19
28. overview introduction definition properties sampled STFT DFT summary
fourier transform
STFT 1/2
short time Fourier transform (STFT):
Fourier transform of a short time segment
reasons:
• remember block based processing
• segment can be seen as quasi-periodic or stationary
implementation:
• pretend signal is 0 outside of the segment
⇒ multiplication of signal and window function
module 3.3.1: time-frequency representations — Fourier transform 14 / 19
29. overview introduction definition properties sampled STFT DFT summary
fourier transform
STFT 1/2
short time Fourier transform (STFT):
Fourier transform of a short time segment
reasons:
• remember block based processing
• segment can be seen as quasi-periodic or stationary
implementation:
• pretend signal is 0 outside of the segment
⇒ multiplication of signal and window function
module 3.3.1: time-frequency representations — Fourier transform 14 / 19
31. overview introduction definition properties sampled STFT DFT summary
fourier transform
STFT: window functions
time domain multiplication 7→ frequency domain convolution
time domain shape determines frequency domain shape of the window
module 3.3.1: time-frequency representations — Fourier transform 16 / 19
32. overview introduction definition properties sampled STFT DFT summary
fourier transform
STFT: window functions
time domain multiplication 7→ frequency domain convolution
time domain shape determines frequency domain shape of the window
module 3.3.1: time-frequency representations — Fourier transform 16 / 19
matlab
source:
plotSpectralWindows.m
33. overview introduction definition properties sampled STFT DFT summary
fourier transform
STFT: window functions
time domain multiplication 7→ frequency domain convolution
time domain shape determines frequency domain shape of the window
spectral leakage characterization
main lobe width
side lobe height
side lobe attenuation
module 3.3.1: time-frequency representations — Fourier transform 16 / 19
34. overview introduction definition properties sampled STFT DFT summary
fourier transform
DFT
digital domain: requires discrete frequency values:
⇒ discrete Fourier transform
X(k) =
K−1
X
i=0
x(i)e−jki 2π
K
with
∆Ω =
2π
KTS
=
2πfS
K
2 interpretations:
sampled continuous Fourier transform
continuous Fourier transform of periodically extended time domain segment
module 3.3.1: time-frequency representations — Fourier transform 17 / 19
35. overview introduction definition properties sampled STFT DFT summary
fourier transform
DFT
digital domain: requires discrete frequency values:
⇒ discrete Fourier transform
X(k) =
K−1
X
i=0
x(i)e−jki 2π
K
with
∆Ω =
2π
KTS
=
2πfS
K
2 interpretations:
sampled continuous Fourier transform
continuous Fourier transform of periodically extended time domain segment
module 3.3.1: time-frequency representations — Fourier transform 17 / 19
36. overview introduction definition properties sampled STFT DFT summary
fourier transform
spectrogram
spectrogram allows to visualize temporal changes in the spectrum
displays the magnitude spectrum only
module 3.3.1: time-frequency representations — Fourier transform 18 / 19
matlab
source:
plotSpecgram.m
37. overview introduction definition properties sampled STFT DFT summary
summary
lecture content
Fourier Transform (of a real signal)
• is conjugate complex
• often represented as magnitude + phase
• invertible
• linear
• convolution in time domain is multiplication in frequency domain
• energy preserving
• time shift result in phase shift, frequency shift results in amplitude modulation
• symmetric
• time scaling result in inverse frequency scaling
FT of sampled signals:
• is periodic with sample rate
STFT
• window results in spectral leakage (convolution in freq domain)
DFT
• discrete in both time and freq domain
module 3.3.1: time-frequency representations — Fourier transform 19 / 19