Module 5 · 11 min read · Free chapter
DTFT, DFT, FFT and digital filters
The DTFT of a sequence repeats every 2π, and the N-point DFT samples it at bins f_s/N apart. Multiplying DFTs gives circular convolution, so linear convolution needs N ≥ L + M − 1. The radix-2 FFT needs (N/2)log₂N multiplications. FIR filters are always stable and can have linear phase, while IIR filters are cheaper but can be unstable.
Start from zero: the spectrum on your phone
Open a music app with a bouncing equaliser display. Those bars show how much bass, mid and treble is in the sound right now. The phone is not using any analog filter; it is working on a list of numbers.
The sound was sampled into a sequence . To see its frequencies, the phone needs a Fourier transform made for sequences. The theory version is the DTFT, the computable version is the DFT, and the fast way to compute it is the FFT.
The same phone also changes the sound: it boosts bass or removes hiss using digital filters. These are difference equations whose coefficients are chosen to shape the frequency response.
This chapter connects all four ideas. It builds on the sampling theorem from the Fourier chapter and the -transform from the previous one.
Why it matters. DFT size, circular convolution, FFT operation counts and FIR versus IIR are standard GATE EC questions, and they are the daily tools of signal-processing jobs in ISRO, DRDO and the telecom industry.
The discrete-time Fourier transform
For a sequence , the DTFT is
It is the -transform evaluated on the unit circle, . Here is the digital frequency in radians per sample.
The DTFT has one feature the continuous transform lacks: it always repeats every . This is because for every integer . So we only need to look at .
In that range, is DC and is the fastest change a sequence can show, an alternating For a signal sampled at , the link is , so matches , the folding frequency from the sampling theorem.
The properties follow the continuous ones. A delay of samples multiplies by , convolution becomes multiplication, and Parseval's theorem holds over one period: .
Worked example. For , the DTFT is . At the magnitude is , and at it is , so the sequence is mostly low-frequency.
Why it matters. Converting between , hertz and is the first step in most DSP questions; the periodicity explains why digital filter specifications stop at .
The DFT: a spectrum you can compute
A computer cannot store a continuous function of . So we take samples of the sequence and compute the spectrum at frequencies only. This is the -point DFT:
Each is the DTFT at . In hertz, bin sits at , so the bins are apart. is simply the sum of all samples, and for real the upper half mirrors the lower half: .
The DFT quietly assumes the samples are one period of a repeating signal. That has a big consequence. Multiplying two DFTs gives circular convolution, where the output wraps around, not the ordinary linear convolution.
To get linear convolution of sequences of lengths and with a DFT, pad both with zeros to at least
points, so the wrap-around falls on zeros. This is how fast convolution is done in practice.
Zero padding also helps plotting: more points interpolate the same underlying DTFT. It does not add true resolution, which is about for a record of real samples. Only a longer record separates two close tones.
Worked example. A 1 kHz-sampled signal is analysed with a 500-point DFT. The bin spacing is Hz, and bin 50 corresponds to 100 Hz.
Why it matters. Bin-spacing and minimum--for-linear-convolution questions are quick marks in GATE, and the circular wrap explains real artefacts engineers meet with FFT tools.
The FFT: why it is fast
Computing each directly takes complex multiplications, so all outputs take about . For that is over a million multiplications, too slow for real-time work in the 1960s and still wasteful today.
The fast Fourier transform removes the repetition. In the radix-2 decimation-in-time version, is a power of two. The sum is split into even-indexed and odd-indexed samples, giving two DFTs of size :
The pair of equations is a butterfly: one multiplication by the twiddle factor , one addition and one subtraction. Each half is split again until only 2-point DFTs remain, which takes stages.
Each stage has butterflies, so the totals are
The inputs end up in bit-reversed order: for , sample 1 (binary 001) goes to position 4 (binary 100).
Worked example. For , . The FFT needs complex multiplications against for the direct DFT, a saving of about 200 times.
Why it matters. Counting butterflies, stages and multiplications is a classic numerical question, and the FFT is what makes OFDM in 4G and 5G practical.
FIR and IIR digital filters
A digital filter is a difference equation. In general,
If every is zero, the output depends only on present and past inputs. The impulse response then lasts only samples, which makes a finite impulse response (FIR) filter.
FIR filters have all their poles at the origin, so they are always stable. If the coefficients are symmetric, , the phase is exactly linear, so every frequency is delayed by the same samples and the waveform shape is kept. That matters for data and image signals.
If some are non-zero, the output feeds back. The impulse response then goes on forever, giving an infinite impulse response (IIR) filter. IIR filters reach a sharp cut-off with far fewer coefficients, so they need less computation and memory.
The costs are real. IIR poles can drift outside the unit circle through rounding of coefficients, making the filter unstable. A causal IIR filter also cannot have exactly linear phase.
Worked example. The moving-average filter is FIR with symmetric taps, so it has linear phase and a delay of 1 sample. The filter is IIR with a pole at 0.9.
Why it matters. "Which filter is always stable?" and "which gives linear phase?" are frequent conceptual questions, and the choice between FIR and IIR is a real design decision in every DSP product.
Designing filters: windows and the bilinear transform
The ideal low-pass filter has a sinc impulse response that runs forever in both directions. To make an FIR filter, we keep only central samples and shift them to start at zero. This window method is simple, but the cut makes ripples near the band edge, a digital form of the Gibbs effect.
The window shape controls the trade-off. A rectangular window gives the sharpest transition but side lobes only about 13 dB down, so stop-band rejection is poor. Hanning, Hamming and Blackman windows taper the ends, lowering ripple step by step while widening the transition band.
For IIR filters, engineers start from a proven analog design such as Butterworth or Chebyshev and map it to the -plane. The bilinear transform does this with
It maps the whole -axis onto the unit circle exactly once, so there is no aliasing and stable analog filters stay stable. The price is frequency warping: analog and digital frequencies are linked by . Designers pre-warp the band edges with this formula before the analog design.
Impulse invariance is the other method. It samples the analog impulse response, keeping its shape in time, but it suffers aliasing and so suits only low-pass and band-pass designs.
Why it matters. Window trade-offs and the warping formula are standard ESE and GATE questions, and pre-warping is the step candidates most often forget.
Descriptive lens
Written papers ask about this topic in four ways:
- Distinguish DTFT and DFT, and explain what the DFT samples and what it assumes about the signal.
- Derive the radix-2 FFT and count its operations, with a butterfly diagram.
- Compute a small DFT or a circular convolution by hand, and relate it to linear convolution.
- Compare FIR and IIR filters and explain window and bilinear design methods.
Practice questions (our own, not previous-year questions).
- Find the 4-point DFT of . Verify that equals the sum of the samples and that . (10 marks)
- Derive the radix-2 decimation-in-time FFT for , draw the butterfly diagram and compare its operation count with the direct DFT. (15 marks)
- Compare FIR and IIR filters on stability, phase, order and computation. Explain why pre-warping is needed with the bilinear transform. (15 marks)
Answer plan for question 1.
- Write , since .
- Compute .
- Compute .
- Compute and .
- Note that , as expected for a real sequence.
Quick revision
- The DTFT is continuous in and repeats every ; is .
- The -point DFT samples the DTFT at , with bins apart.
- is the sum of samples, and real signals give .
- DFT products give circular convolution; linear convolution needs .
- Zero padding interpolates but does not improve resolution.
- The radix-2 FFT uses multiplications in stages, with bit-reversed inputs.
- FIR filters are always stable and can have exact linear phase with symmetric taps.
- IIR filters are efficient but can be unstable and lack exact linear phase.
- Rectangular windows give sharp transitions but high side lobes; tapered windows trade the other way.
- The bilinear transform avoids aliasing but warps frequency, so band edges are pre-warped.