C918 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

C9 · Lesson 18 · The discrete-time Fourier transform

The spectrum of a sequence

A sequence of samples has a spectrum just as a continuous signal does, and it's what every digital filter, audio codec and radio is designed around. The discrete-time Fourier transform, or DTFT, computes it. It looks like the Fourier transform with the integral replaced by a sum, but with one important difference that follows straight from lesson 1: discrete-time frequencies 2π apart are the same, so the spectrum of every sequence repeats every 2π. All of a sequence's frequency content lives between −π and π.

  • The curve is |X(ejω)| for a block of N ones, from ω = −π to π. It's tallest at ω = 0, where it equals N, the sum of the samples.
  • The nulls fall at multiples of 2π/N. Make the block longer: the main lobe narrows. A longer signal has a narrower spectrum, the time-bandwidth tradeoff again.
  • The side lobes never go away: a sudden start and stop always spreads energy across frequency.

Predict

What is the DTFT of δ[n−3], a single 1 at n = 3?

Name it

The transform pair

X(ejω)=∑n=−∞∞x[n]e−jωn,x[n]=12π∫−ππX(ejω)ejωndω

X is periodic in ω with period 2π, so one period, −π to π, says everything. Low frequencies are near ω = 0 (and 2π, 4π, …); the highest is ω = π. Two values are easy: X(ej0)=∑x[n] and X(ejπ)=∑(−1)nx[n].

Pairs

x[n]X(ejω)
δ[n−n0]e−jωn0
anu[n], |a|<111−ae−jω
1 for n = 0 to N − 1e−jω(N−1)/2sin⁡(Nω/2)sin⁡(ω/2)
sin⁡ωcnπn1 for |ω|<ωc, 0 out to π

The block's magnitude is N at ω = 0 with nulls at multiples of 2π/N, so its main lobe is 4π/N wide.

Properties

  • Shift: x[n−n0]→e−jωn0X.
  • Modulation: ejω0nx[n]→X(ej(ω−ω0)); multiplying by cos⁡ω0n moves half the spectrum to +ω0 and half to −ω0.
  • Convolution: x*h→XH; the output spectrum of a filter is the input's times H(ejω).
  • Parseval: ∑|x[n]|2=12π∫−ππ|X|2dω.

Worked example

Find the DTFT of x = [1, 2, 1] (n = 0 to 2) and its size at ω = 0, π/2 and π.

Show the solution
  1. Sum the samples. X=1+2e−jω+e−2jω=e−jω(ejω+2+e−jω)=e−jω(2+2cos⁡ω)
  2. Size. |X|=2+2cos⁡ω That's 4 at 0, 2 at π/2, and 0 at π.
  3. What it does. It's a smoothing filter that removes the alternating component completely.

Answer X=e−jω(2+2cos⁡ω), with size 4 at ω = 0, 2 at π/2, and 0 at π.

Worked example

How big is the DTFT of (0.6)nu[n] at ω = π/2?

Show the solution
  1. Evaluate at π/2. |X|=1/|1−0.6e−jπ/2|=1/|1+0.6j|=1/1.36=0.857
  2. Compare the ends. At ω = 0 it's 1/0.4 = 2.5 and at π it's 1/1.6 = 0.625: a low-pass shape.

Answer its size at π/2 is 0.857, between 2.5 at DC and 0.625 at π.

Worked example

Find the DTFT of a pulse of 8 ones at ω = 0, π/8 and π/4.

Show the solution
  1. Size of the DTFT. |X|=|sin⁡(8ω/2)/sin⁡(ω/2)|
  2. At 0. It's 8, the number of samples.
  3. At π/8. |X|=sin⁡(π/2)/sin⁡(π/16)=1/0.1951=5.13
  4. At π/4. Here sin(π) = 0: the first null, at 2π/N.
  5. The trade-off. A longer pulse has a narrower main lobe, which is the time-frequency trade-off.

Answer its size is 8 at ω = 0, 5.13 at π/8, and 0 at π/4, the first null.

Check

x = [1, 2, 1, 2], starting at n = 0.

(a)

What is X(ej0)?

(b)

What is X(ejπ)?

Check

x[n] = 1 for n = 0 to 8 − 1, and 0 elsewhere.

(a)

What is |X(ej0)|?

(b)

At what ω is the first null?

Write units the way you normally would: 1.5 rad and 1500 mrad are the same answer.

Check

What is |X(ejπ/2)| for x[n]=(0.6)nu[n]?

Check

A sequence is delayed by 5 samples. How much does its DTFT's phase change at ω = 0.3 rad, in degrees?

Check

What is 12π∫−ππ|X(ejω)|2dω for x[n]=(0.8)nu[n]?

Check

x[n] has a spectrum concentrated near ω = 0. Where are the two copies of that spectrum in x[n]cos⁡(1n)? (Give the positive one.)

Write units the way you normally would: 1.5 rad and 1500 mrad are the same answer.

Check

Why is every DTFT periodic in ω with period 2π?

Check

x[n]=anu[n] with a = 0.8.

(a)

What is |X| at ω = 0?

(b)

And at ω = π?

Check

x = [1, 3, 1] for n = 0 to 2.

(a)

What is |X| at ω = 0.5?

(b)

What is X at ω = 0?

Explain why

A longer block of ones has a narrower DTFT main lobe. Why must a short signal have a wide spectrum?

Practice

Keep practicing

11 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.