Upload
others
View
30
Download
0
Embed Size (px)
Citation preview
Discrete Fourier Transform
Discrete Fourier Transform (DFT)
The DFT of a finite signal (FS) defined on {0, β¦ , π β 1} is another FS defined on the same support {0, β¦ , π β 1}:
βπ β 0,1, β¦ , π β 1 , π’ π= π’ππβ2ππ
πππ
πβ1
π=0
The index of π’ is π, but the corresponding wave frequency is π/π
Inversion theorem
The inversion formula is:
π’π =1
π π’ ππ
2πππππ
πβ1
π=0
proof :
1
π π’ ππ
2πππππ
πβ1
π=0
=1
π π’ππ
β2πππππ
πβ1
π=0
π2πππππ
πβ1
π=0
=1
π π’π π§π
πβ1
π=0
πβ1
π=0
with π§ = π2πππβπ
π
Inversion theorem
Given that π§ = π2πππβπ
π , we find easily :
π§ππβ1
π=0
= ππΏπβπ βπ,π, β {0,1, β¦ , π β 1}
By replacing in the previous equation we find :
1
π π’ ππ
2πππππ
πβ1
π=0
=1
π (π’πππΏπβπ )
πβ1
π=0
= π’π
In other terms, π’ (π)
π are the coefficients of a decomposition on a Fourier
basis
Classical properties
π’ = πΏπ β π’ π = πβ2π π
πππ
β± π’βπ π£ = π’ π£
β± π’π£ =1
ππ’ βπ π£
β± ππ’ = π’ π β π0 ππ = π2π ππ0ππ
β± π’π = π’ ππβ2π π
πππ
Symmetry properties
Circular convolution
Circular permutation
Parseval βequalityβ
β’ Fourier waves are orthogonal with norm π
β’ We deduce:
π’ 2 = π’ π2
πβ1
π=0
= π’ππβ2ππ
πππ
πβ1
π=0
πβ1
π=0
π’ ππ2πππππ
πβ1
π=0
= π’ππ’ π
πβ1
π=0
πβ1
π=0
πβ2ππππ(πβπ)
πβ1
π=0
= π π’ 2
Links between DT and DTFT
β’ DFT is the only transform that can be computed on a computer β¦
β’ DFT can approximate DTFT under certain hypotheses
Case of a finite support sequences
β’ Consider π’ defined on β€, with finite support:
π’π = 0 βπ β {0,β¦ ,π β 1}.
β’ Let π£ be the restriction of π’ to {0,β¦ ,π β 1}, with π β₯ π,
π£ π = π£ππβ2ππ
πππ
πβ1
π=0
= π’ π
π
β’ Sometimes π£ is called M-DFT of π’ (zero-padding)
β’ We talk about π-DFT of a finite support sequence
Case of a finite support series
β’ By changing π, one can sample π’ π as finely as necessary
β’ This is equivalent to a zero-padding
β’ However, one needs only π samples of π’ π to perfectly know (reconstruct) π’
π’ π
ππβ{0,β¦,πβ1}
DFTβI π’DTFT
π’ (π)
β’ How to generalize ? When is it possible with
samples at 1
π to reconstruct a function of real
variable?
Signal on Z (left) and its DTFT (right) Support {0, β¦, 59}
Example
Right: 60-DFT (indexed by k) of the non null part of the signal on left.
Example
Indexed by π/π and periodized by period 1
to remain in the interval β1
2,1
2
Example
Superposition of DFT and DTFT. As π β₯ π the DFT is a perfect sampling of the DFTF
Wave frequency determination
β’ We observe π samples of a wave signal.
β’ From these samples, we want to find the wave frequency
Wave frequency calculation
βπ β β€, π’π = π2πππ0π i.e., π’ = π, FW at frequency π0
We can only observe a finite number of samples; we have π’π = ππ€
where π€ is a finite support sequence:
π€π = 1 if π β {0,β¦π β 1}0 otherwise
Rectangular window
Wave frequency calculation
β’ The DTFT of π’π: β±(π’π) = β± ππ€
= π€ π β π0
We find:
π€ π =sin πππ
sin ππ
Then, π0 is the position
of the maximum of β±(π’π) -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.50
2
4
6
8
10
12
14
16
18
20
π€ π for N=20
DTFT of a wave of frequency 0,123 trunkated at 20 samples
Wave frequency calculation
β’ Problem : we cannot compute π’π π , but only its samples at 1/π
β’ The position of the maximum will therefore be known with a precision related to the order π of the DFT and rather than to the duration of the observation, π
β’ 30-DFT (left) and 60-DFT (right) β’ The precision for the frequency computation is 1/π β’ We select the index k for which the DFT is maximum
Separation of two frequencies (waves)
β’ The duration of observation affects the frequency resolution
β’ We consider a mixture of two Fourier waves, observed over π samples:
π’π = π΄0π2πππ0π + π΄1π
2πππ1π
π = 20. Left : the 2 DTFT; right: their sum. We cannot distinguish two close
frequency waves (at less than 1/π)
Frequency resolution
π = 60 We can now distinguish the two frequencies
Frequency resolution
β’ The DFT of the 2 waves mixture is :
π΄0π€π
πβ π0 + π΄1π€
π
πβ π1
β’ If π΄0 = π΄1, the two peaks can be separated if their lobes are separated by a half-amplitude
β’ The amplitude of the lobe depends on the window:
for the stair window it is 1
π
β’ The condition is, in this case: π β₯1
|π0βπ1|
Frequency resolution
Very different amplitudes, masking and windowing problems
β’ In order to improve frequency resolution, one has to increase the number of observed samples π, if possible.
β’ This does not depend on the order π of the DFT
β We still need to insure π β₯ π
β’ What happens if the two waves have very different amplitudes?
Left: DTFT of two waves. Right: DTFT of their sum.
Secondary peaks mask the second wave.
Choice of the window shape
Top: Hamming window. Bottom: stair (or rectangular) window
Size 30 in both cases
Left : DTFT of a stair window of size 30. Right : DTFT of a Hamming window.
Choice of the window shape
Multiplication by the Rectangular window
Multiplication by the Hamming window
Frequency analysis: conclusion
β’ Calculation of the frequency for a Fourier wave: precision = 1/π
β’ Separation of 2 waves with the same amplitude : Ξπ β₯ 1/π
β’ Separation of 2 waves with very different amplitudes : depends on the ratio between the amplitude of the principal and secondary lobes
β This does not depend on π , but on the shape of the window
The spectrogram
β’ The idea of the spectrogram is to locally analyze the frequency content of a signal.
β’ Around each signal sample, we keep a window on which we compute a DTFT (through a DFT)
β’ For a signal u and a window w centered in zero:
βπ β β€, βπ β β1
2,1
2, π π, π = π’ππ€πβππ
β2ππππ
πββ€
We can compute directly the samples of π π, π through βπ β β€, βπ β {0,β¦π β 1},
π π,π
π= π’ππ€πβππ
β2πππππ
πββ€
The spectrogram
β’ For π (time index) fixed, we have the formula
βπ β β1
2,1
2, π π, π = π’ππ€πβππ
β2ππππ
πββ€
β’ This means that π(π, π) is the DTFT of π’ multiplied by the windowπ€ translated by π : frequency analysis around the time instant π
The spectrogram
β’ For a fixed frequency, we have the formula:
π π, π0 = π’ππ€πβππβ2πππ0(πβπ)πβ2πππ0π
π
π π, π0 = π’ππ€πβππβ2πππ0 πβπ
π
= < π’,ππ >
π = π€ππ0
Scalar product between π’ and ππ: similitude between π’ and a Β« wave Β» truncated around π and with frequency π0
Spectrogram display
β’ Since we have real signals, the module of the DTFT is symmetrical.
β’ Time axis is π₯ and frequency axis is π¦ (in Hz)
β’ We use a logarithmic scale for the module, otherwise certain frequencies will Β« smash Β» the others (ear sensitivity is btw logarithmic)
Example
Left: DTFT; right: spectrogram of the same signal. The DTFT does not allow to know at which time instant arrives the wave at 15000Hz.
Observation of a sound on the spectrogram
Piano: Original
Spectrogram of the mp3-encoded version
MP3: 128kbits/s