Skip to content
Digital Signal Processing

The DTFT, frequency response and group delay

The discrete-time Fourier transform and its periodicity, exponentials as eigenfunctions with proof, the moving-average response proved, linear phase and group delay, computation with the FFT.

Digital signal processing treats signals as sequences of numbers and transforms them with algorithms: filters, spectral analysis, sample-rate changes. The basis of everything is the frequency-domain description of discrete-time signals and systems. In this lesson we look at the discrete-time Fourier transform (DTFT), the proof that complex exponentials are eigenfunctions of linear systems, the frequency response of the moving average with its proof, and group delay with linear phase. Sampling, convolution and basic FIR and IIR filters are in the Signal Theory lessons; the z-transform and the DFT have lessons of their own.

The discrete-time Fourier transform

For a sequence x[n], the DTFT is

    \[ X(e^{j\omega}) = \sum_{n=-\infty}^{\infty} x[n]\,e^{-j\omega n},\qquad x[n] = \frac{1}{2\pi}\int_{-\pi}^{\pi} X(e^{j\omega})\,e^{j\omega n}\,d\omega \]

The variable \omega is the normalised angular frequency, in radians per sample: a signal sampled at f_s with frequency f has \omega = 2\pi f/f_s. The DTFT is periodic with period 2\pi, because e^{-j(\omega + 2\pi)n} = e^{-j\omega n} for every integer n: all the information lies in -\pi \le \omega \le \pi, and \omega = \pi corresponds to half the sampling frequency. It is the z-transform evaluated on the unit circle, z = e^{j\omega}.

The properties are those of the continuous Fourier transform: convolution becomes product, a delay of n_0 samples multiplies by e^{-j\omega n_0}, and Parseval’s theorem holds, \sum|x[n]|^2 = \frac{1}{2\pi}\int_{-\pi}^{\pi}|X(e^{j\omega})|^2d\omega.

The frequency response

Theorem. If a linear time-invariant system with impulse response h[n] receives the input x[n] = e^{j\omega_0 n}, the output is

    \[ y[n] = H(e^{j\omega_0})\,e^{j\omega_0 n},\qquad H(e^{j\omega}) = \sum_n h[n]e^{-j\omega n} \]

Proof. By the convolution sum

    \[ y[n] = \sum_k h[k]\,x[n-k] = \sum_k h[k]\,e^{j\omega_0(n-k)} = e^{j\omega_0 n}\sum_k h[k]\,e^{-j\omega_0 k} = H(e^{j\omega_0})\,e^{j\omega_0 n} \]

∎

A complex exponential goes through the system remaining itself, multiplied by a complex number: it is an eigenfunction. The magnitude |H| says how much each frequency is amplified, the phase \angle H how much it is shifted. For a real sinusoid, the sum of two conjugate exponentials, the output is the same sinusoid with amplitude multiplied by |H(e^{j\omega_0})| and phase shifted by \angle H(e^{j\omega_0}).

The moving average

The simplest filter averages the last M samples: y[n] = \frac{1}{M}\sum_{k=0}^{M-1}x[n-k].

Theorem. The frequency response of the moving average is

    \[ H(e^{j\omega}) = e^{-j\omega(M-1)/2}\;\frac{\sin(M\omega/2)}{M\sin(\omega/2)} \]

Proof. It is a geometric series with ratio e^{-j\omega}:

    \[ H = \frac{1}{M}\sum_{k=0}^{M-1}e^{-j\omega k} = \frac{1}{M}\cdot\frac{1 - e^{-j\omega M}}{1 - e^{-j\omega}} \]

Factor e^{-j\omega M/2} out of the numerator and e^{-j\omega/2} out of the denominator: 1 - e^{-j\omega M} = e^{-j\omega M/2}\cdot 2j\sin(M\omega/2), and likewise the denominator. The ratio of the exponentials gives e^{-j\omega(M-1)/2} and the ratio of the sines the rest. ∎

Magnitude of the frequency response of the moving average for M equal to 4 and 8
The gain is 1 at DC and vanishes at angular frequencies that are multiples of 2 pi over M. The longer the average, the narrower the main lobe, but the side lobes stay high: the moving average is a modest low-pass filter.

The gain is 1 at DC and vanishes for \omega = 2\pi k/M: the moving average exactly cancels sinusoids that complete an integer number of periods in M samples. It is the same principle as mains rejection in integrating voltmeters (Electrical Measurements lesson on the digital voltmeter). As a low-pass filter, though, it is modest: the side lobes are high, the first around 22 % (−13 dB).

Linear phase and group delay

The phase of the moving average is -\omega(M-1)/2, a straight line: all frequencies are delayed by the same number of samples, (M-1)/2. In general the group delay is defined as

    \[ \tau_g(\omega) = -\frac{d\,\angle H(e^{j\omega})}{d\omega} \]

which measures the delay of the envelope of a narrowband signal around \omega. If the phase is linear, \tau_g is constant and the waveform passes without phase distortion, only delayed (Signal Theory lesson on distortionless transmission). It is a valuable property for audio, images and digital communications, where phase distortion deforms pulses and creates intersymbol interference. In the next lesson we will see that FIR filters with symmetric coefficients always have linear phase, while IIR filters in general do not.

A note on computation

The DTFT is a continuous function of \omega and cannot be computed as such. Samples of it are computed with the DFT, which for an N-point sequence gives X(e^{j\omega}) at the N frequencies 2\pi k/N, and it is computed quickly with the FFT (lesson on the DFT and FFT). To plot a frequency response it is therefore enough to compute the FFT of the impulse response, padded with zeros to get denser points.

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x