[DSP] W03 - Discrete Fourier Transform
contents
fourier basis
-
for
- in signal notation:
- , for
- in vector notation
- with
- Fourier Basis are a set of N orthogonal vectors
- hence are a basis for
- they are not orthonormal, normalization factor is
- will keep normalization factor explicit in DFT formulas
basis expansion
analysis formula
synthesis formula
change of basis in matrix form
- analysis formula:
- synthesis formula:
signal notation
- analysis formula:
-
- N point signal in the frequency domain
-
- synthesis formula:
-
- N point signal in time-index domain for discrete time
-
DFT calculations
dft is linear
dft of
- here:
-
fig: fourier transform of discrete-time delta
dft of
-
for
-
fig: fourier transform of function 1
dft of
-
for
-
in , the fundamental frequency of the fourier transform is
-
- use expansion:
- so
fig: [Re] and [Im] of DFT of
fig: similarly, [Re] and [Im] of DFT of
interpreting a dft plot
rotation direction
fig: dft chart frequency rotation
fig: dft chart frequency rotation
speed distribution
fig: dft chart frequency distribution
fig: stationary frequency (k=0)
fig: fastest frequency (k=32)
energy distribution
- Conservation of Energy across domains:
- underlying energy of a signal doesn’t change with change of basis
- Square magnitude of k-th DFT coefficient proportional to signal’s energy at frequency
dft of real signals
- dft of real signals are symmetric in magnitude
dft in practice
- the highest frequency of a digital system is half of the inherent sampling rate
- in the DFT window, this corresponds to the mid-point of the window
- i.e.
- so first find , and set that equal to half the sampling frequency
- then, use linear interpolation to find that smaller components’ frequencies
fourier analysis of musical instruments
- the played note is the first peak: 220Hz for example
- this is the pitch of the instrument
- the other peaks are called harmonics, they define the typical sound of the instrument
short-time fourier transform (STFT)
- dual-tone multi frequency (dtmf dial phone)
fig: dtmf dial-pad
- when say key 4 is pressed,
- two sinusoids are generated, one specified at the row and another by the column
- 770 Hz and 1209 Hz
- the frequencies are chosen such that they are co-prime
- no sum or differences in frequencies are the same as the any of the chosen frequencies
-
goal is to minimized errors while decoding pressed numbers at the exchange
- fundamental trade-off in signals
- time representation obfuscates frequency information
- frequency representation obfuscates time
- so, the signal at the exchange is subjected to DFT in small chucks of window
- each window is applied to the burst of sound corresponding to a key press
- so, in that way STFT is just standard DFT applied to a restricted portion of a signal
- it is useful to obtain simultaneously obtain time and frequency information
the spectrogram
- color-code the magnitude
- dark is small
- white is large
- use to see better (power in dBs)
- plot spectral slices one after another
- spectrogram can be applied to visualize the numbers dialled using a DTMF dialpad
-
spectrogram can be wide-band or narrow-band, based on the number of points samples
- in a long window, more frequency resolution can be had
- but since it is sensitive to a lot of things happening over time, it is not precise in time
- in a short window, many time slices - precise location of transitions
- short window, fewer DFT points - poor frequency resolution
- to better localize the position of a start and end of a key press, the length of the DFT has to be reduced
fig: dtmf dial-pad wideband spectrogram
fig: dtmf dial-pad medium band spectrogram
fig: dtmf dial-pad super narrow band spectrogram