contents


fourier basis

  • for CN

  • in signal notation:
    • wk[n]=ej2πNnk, for n,k=0,1,,N1
  • in vector notation
    • {w(k)}k=0,1,,N1
    • with wn(k)=ej2πNnk
  • Fourier Basis are a set of N orthogonal vectors
    • hence are a basis for CN
  • they are not orthonormal, normalization factor is 1N
  • will keep normalization factor explicit in DFT formulas

basis expansion


analysis formula

  • Xk=w(k),x

synthesis formula

  • x=1Nk=0N1Xkw(k)

change of basis in matrix form

  • analysis formula:
    • X=Wx
  • synthesis formula:
    • x=1NWHX

signal notation

  • analysis formula:
    • X[k]=n=0N1x[n]ej2πNnk
      • k=0,1,,N1
      • N point signal in the frequency domain
  • synthesis formula:
    • x[n]=1Nk=0N1X[k]ej2πNnk
      • n=0,1,,N1
      • N point signal in time-index domain for discrete time

DFT calculations


dft is linear

  • DFT{αx[n]+βy[n]}=αDFT{x[n]}+βDFT{y[n]}


dft of δ[n]

  • here: x[n]==δ[n]
  • X[k]=n=0N1x[n]ej2πNnk
    • n=0N1δ[n]ej2πNnk=1

dsp-dft

fig: fourier transform of discrete-time delta


dft of x[n]=1

  • for x[n]CN

  • X[k]=n=0N1x[n]ej2πNnk

    • n=0N1ej2πNnk
    • Nδ[k]

dsp-dft-2

fig: fourier transform of function 1


dft of x[n]=3cos2πn16

  • for x[n]C64

  • in C64, the fundamental frequency of the fourier transform is ω=2π64

  • x[n]=3cos2πn16
    • =3cos4(2π)n64
    • use expansion: cosω=ejω+ejω2
    • =32[ej2π64(4n)+ej2π64(4n)]=32[ej2π64(4n)+ej2π64(60n)]
    • =32(w4[n]+w60[n])
  • so X[k]=wk[n],x[n]
    • =wk[n],32(w4[n]+w60[n])
    • =32wk[n],w4[n]+32wk[n]+w60[n])
    • ={96for k=4,600otherwise

dsp-dft-3

fig: [Re] and [Im] of DFT of x[n]=3cos2πn16

dsp-dft-4

fig: similarly, [Re] and [Im] of DFT of x[n]=3cos2πn16+π3


interpreting a dft plot


rotation direction

dsp-dft-8

fig: dft chart frequency rotation

dsp-dft-9

fig: dft chart frequency rotation

speed distribution

dsp-dft-5

fig: dft chart frequency distribution

dsp-dft-6

fig: stationary frequency (k=0)

dsp-dft-7

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 ω=2πNk

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
    • fmax=Fs2
  • in the DFT window, this corresponds to the mid-point of the window
    • i.e. k=N2
  • so first find k=N2, and set that equal to half the sampling frequency
  • then, use linear interpolation to find that smaller components’ frequencies
    • fs=Fs2kN2

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)

dsp-dft-10

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 10 log10(|X[m;k]|) 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

wideband

fig: dtmf dial-pad wideband spectrogram

medium band

fig: dtmf dial-pad medium band spectrogram

narrow band

fig: dtmf dial-pad super narrow band spectrogram


references