Electronics and Communication Engineering‹›⌂ 0:00 studied

Module 5 · 11 min read · Free chapter

DTFT, DFT, FFT and digital filters

In short

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.

What are you preparing for? We show the practice and previous year questions of your exam.

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 x[n]x[n]. 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 zz-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 x[n]x[n], the DTFT is

X(ejΩ)=∑n=−∞∞x[n] e−jΩnX(e^{j\Omega}) = \sum_{n=-\infty}^{\infty} x[n]\, e^{-j\Omega n}

It is the zz-transform evaluated on the unit circle, z=ejΩz = e^{j\Omega}. Here Ω\Omega is the digital frequency in radians per sample.

The DTFT has one feature the continuous transform lacks: it always repeats every 2π2\pi. This is because e−j(Ω+2π)n=e−jΩne^{-j(\Omega + 2\pi)n} = e^{-j\Omega n} for every integer nn. So we only need to look at −π<Ω≤π-\pi < \Omega \le \pi.

In that range, Ω=0\Omega = 0 is DC and Ω=π\Omega = \pi is the fastest change a sequence can show, an alternating +1,−1,+1,…+1, -1, +1, \ldots For a signal sampled at fsf_s, the link is Ω=2πffs\Omega = 2\pi\dfrac{f}{f_s}, so Ω=π\Omega = \pi matches fs2\dfrac{f_s}{2}, the folding frequency from the sampling theorem.

The properties follow the continuous ones. A delay of kk samples multiplies by e−jΩke^{-j\Omega k}, convolution becomes multiplication, and Parseval's theorem holds over one period: ∑∣x[n]∣2=12π∫−ππ∣X(ejΩ)∣2 dΩ\sum \lvert x[n] \rvert^2 = \dfrac{1}{2\pi}\int_{-\pi}^{\pi} \lvert X(e^{j\Omega}) \rvert^2\, d\Omega.

Worked example. For x[n]=(0.5)nu[n]x[n] = (0.5)^n u[n], the DTFT is 11−0.5e−jΩ\dfrac{1}{1 - 0.5e^{-j\Omega}}. At Ω=0\Omega = 0 the magnitude is 10.5=2\dfrac{1}{0.5} = 2, and at Ω=π\Omega = \pi it is 11.5≈0.67\dfrac{1}{1.5} \approx 0.67, so the sequence is mostly low-frequency.

Why it matters. Converting between Ω\Omega, hertz and fsf_s is the first step in most DSP questions; the 2π2\pi periodicity explains why digital filter specifications stop at π\pi.

The DFT: a spectrum you can compute

A computer cannot store a continuous function of Ω\Omega. So we take NN samples of the sequence and compute the spectrum at NN frequencies only. This is the NN-point DFT:

X[k]=∑n=0N−1x[n] e−j2πkn/N,k=0,1,…,N−1X[k] = \sum_{n=0}^{N-1} x[n]\, e^{-j2\pi kn/N}, \qquad k = 0, 1, \ldots, N-1

Each X[k]X[k] is the DTFT at Ω=2πkN\Omega = \dfrac{2\pi k}{N}. In hertz, bin kk sits at kfsN\dfrac{kf_s}{N}, so the bins are fsN\dfrac{f_s}{N} apart. X[0]X[0] is simply the sum of all samples, and for real xx the upper half mirrors the lower half: X[N−k]=X∗[k]X[N - k] = X^*[k].

The DFT quietly assumes the NN 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 LL and MM with a DFT, pad both with zeros to at least

N≥L+M−1N \ge L + M - 1

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 fsL\dfrac{f_s}{L} for a record of LL 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 1000500=2\dfrac{1000}{500} = 2 Hz, and bin 50 corresponds to 100 Hz.

Why it matters. Bin-spacing and minimum-NN-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 X[k]X[k] directly takes NN complex multiplications, so all NN outputs take about N2N^2. For N=1024N = 1024 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, NN is a power of two. The sum is split into even-indexed and odd-indexed samples, giving two DFTs of size N2\dfrac{N}{2}:

X[k]=E[k]+WNk O[k],X[k+N2]=E[k]−WNk O[k],WN=e−j2π/NX[k] = E[k] + W_N^{k}\, O[k], \qquad X\left[k + \frac{N}{2}\right] = E[k] - W_N^{k}\, O[k], \qquad W_N = e^{-j2\pi/N}

The pair of equations is a butterfly: one multiplication by the twiddle factor WNkW_N^k, one addition and one subtraction. Each half is split again until only 2-point DFTs remain, which takes log⁡2N\log_2 N stages.

Each stage has N2\dfrac{N}{2} butterflies, so the totals are

N2log⁡2N complex multiplications,Nlog⁡2N complex additions\frac{N}{2}\log_2 N \text{ complex multiplications}, \qquad N\log_2 N \text{ complex additions}

The inputs end up in bit-reversed order: for N=8N = 8, sample 1 (binary 001) goes to position 4 (binary 100).

Worked example. For N=1024N = 1024, log⁡2N=10\log_2 N = 10. The FFT needs 512×10=5,120512 \times 10 = 5{,}120 complex multiplications against 1,048,5761{,}048{,}576 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,

y[n]=∑k=0Mbk x[n−k]−∑k=1Nak y[n−k],H(z)=∑bkz−k1+∑akz−ky[n] = \sum_{k=0}^{M} b_k\, x[n-k] - \sum_{k=1}^{N} a_k\, y[n-k], \qquad H(z) = \frac{\sum b_k z^{-k}}{1 + \sum a_k z^{-k}}

If every aka_k is zero, the output depends only on present and past inputs. The impulse response then lasts only M+1M + 1 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, h[n]=h[M−n]h[n] = h[M - n], the phase is exactly linear, so every frequency is delayed by the same M2\dfrac{M}{2} samples and the waveform shape is kept. That matters for data and image signals.

If some aka_k 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 y[n]=13(x[n]+x[n−1]+x[n−2])y[n] = \dfrac{1}{3}(x[n] + x[n-1] + x[n-2]) is FIR with symmetric taps, so it has linear phase and a delay of 1 sample. The filter y[n]=x[n]+0.9 y[n−1]y[n] = x[n] + 0.9\,y[n-1] 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 M+1M + 1 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 zz-plane. The bilinear transform does this with

s=2T⋅1−z−11+z−1s = \frac{2}{T}\cdot\frac{1 - z^{-1}}{1 + z^{-1}}

It maps the whole jωj\omega-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 ω=2Ttan⁡Ω2\omega = \dfrac{2}{T}\tan\dfrac{\Omega}{2}. 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:

  1. Distinguish DTFT and DFT, and explain what the DFT samples and what it assumes about the signal.
  2. Derive the radix-2 FFT and count its operations, with a butterfly diagram.
  3. Compute a small DFT or a circular convolution by hand, and relate it to linear convolution.
  4. Compare FIR and IIR filters and explain window and bilinear design methods.

Practice questions (our own, not previous-year questions).

  1. Find the 4-point DFT of x[n]={1,2,0,1}x[n] = \{1, 2, 0, 1\}. Verify that X[0]X[0] equals the sum of the samples and that X[3]=X∗[1]X[3] = X^*[1]. (10 marks)
  2. Derive the radix-2 decimation-in-time FFT for N=8N = 8, draw the butterfly diagram and compare its operation count with the direct DFT. (15 marks)
  3. 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 X[k]=∑n=03x[n](−j)knX[k] = \sum_{n=0}^{3} x[n](-j)^{kn}, since W4=e−jπ/2=−jW_4 = e^{-j\pi/2} = -j.
  • Compute X[0]=1+2+0+1=4X[0] = 1 + 2 + 0 + 1 = 4.
  • Compute X[1]=1+2(−j)+0+1(j)=1−jX[1] = 1 + 2(-j) + 0 + 1(j) = 1 - j.
  • Compute X[2]=1−2+0−1=−2X[2] = 1 - 2 + 0 - 1 = -2 and X[3]=1+2j+0−j=1+jX[3] = 1 + 2j + 0 - j = 1 + j.
  • Note that X[3]=X∗[1]X[3] = X^*[1], as expected for a real sequence.

Quick revision

  • The DTFT is continuous in Ω\Omega and repeats every 2π2\pi; Ω=π\Omega = \pi is fs2\dfrac{f_s}{2}.
  • The NN-point DFT samples the DTFT at 2πkN\dfrac{2\pi k}{N}, with bins fsN\dfrac{f_s}{N} apart.
  • X[0]X[0] is the sum of samples, and real signals give X[N−k]=X∗[k]X[N - k] = X^*[k].
  • DFT products give circular convolution; linear convolution needs N≥L+M−1N \ge L + M - 1.
  • Zero padding interpolates but does not improve resolution.
  • The radix-2 FFT uses N2log⁡2N\dfrac{N}{2}\log_2 N multiplications in log⁡2N\log_2 N 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.

Check yourself

Exam-style questions on this chapter. Pick an answer to see the explanation. 0 of 12 answered

  1. The DTFT X(ejΩ)X(e^{j\Omega}) of any sequence is always periodic in Ω\Omega with period:

  2. A signal is sampled at 8 kHz. The digital frequency Ω=π2\Omega = \dfrac{\pi}{2} corresponds to:

  3. For a 4-point sequence x[n]={1,2,0,1}x[n] = \{1, 2, 0, 1\}, the DFT value X[0]X[0] is:

  4. A signal sampled at 1 kHz is analysed with a 500-point DFT. The frequency spacing between bins is:

  5. For a real 8-point sequence, X[3]=2+5jX[3] = 2 + 5j. Then X[5]X[5] is:

  6. Sequences of lengths 6 and 4 are convolved using DFTs. The minimum DFT length that gives the linear convolution is:

  7. Zero padding a 64-sample record to a 512-point DFT:

  8. The number of complex multiplications in a radix-2 FFT of N=1024N = 1024 points is:

  9. In an 8-point decimation-in-time FFT, input sample x[1]x[1] appears at position:

  10. Which statement about FIR filters is correct?

  11. An FIR filter has symmetric coefficients h[n]=h[10−n]h[n] = h[10 - n] for n=0,…,10n = 0, \ldots, 10. Its group delay is:

  12. The main drawback of designing an IIR filter by the bilinear transform is:

Previous year questions

Previous year questions for UPSC CSE will appear here once each one is checked word for word against the official question paper.

Learn with AI

A tutor that asks instead of telling, a partner that argues the other side, and this chapter told through your own district.

Tell the tutor what you are stuck on. It will guide you with questions and give the answer after a few tries.

🙋 Raise a doubt or feedback

Stuck somewhere, or spotted a mistake? Write to the ExamHike team. We usually reply within a day, and you will see the reply on My progress.

Log in to ask a doubt or send feedback →

Frequently asked questions

Does zero padding improve frequency resolution?

No. It samples the same spectrum more finely; real resolution depends on the length of the recorded data.

How much faster is the FFT?

For N = 1024 it needs about 5,120 complex multiplications instead of about a million, roughly 200 times fewer.

Why are FIR filters always stable?

They have no feedback, so all their poles sit at the origin, inside the unit circle.

Why is pre-warping used with the bilinear transform?

The transform squeezes the analog frequency axis non-linearly, so band edges are first adjusted with ω = (2/T)tan(Ω/2) to land at the right digital frequencies.

More in this module: Signals and systems

Official sources

Facts in this chapter were checked against these official sources.

  1. GATE 2026 Electronics and Communication Engineering (EC) syllabus, IIT Guwahati
  2. NPTEL Signals and Systems (IIT Kanpur, 108104100): discrete-time Fourier transform, DFT and discrete-time systems