Skip to content
Chapter 12 · Lesson 3 of 4

First, the picture

Multiply a signal by a turning arrow and its spectrum slides round a circle. Watch what slides off at π\pi come back at −π-\pi.

Slide the spectrum round the circle

x[n] = 0.8ⁿu[n] multiplied by e^{jΩ₁n}. The curve is the size of the product's spectrum.

Ω₁ = 0: nothing changes. The size peaks at 0, among the low frequencies: a low-pass shape.

shift Ω₁
0 rad/sample
peak at
0 rad/sample
0.00 / 13.00 s
Describe this picture

One panel for x[n]=0.8nu[n]x[n]=0.8^nu[n] multiplied by ejΩ1ne^{j\Omega_1n}: the size of the product’s spectrum, ∣X∣\lvert X\rvert from 0 to 5.5, against Ω\Omega from −π-\pi to π\pi rad/sample. The solid curve is the spectrum after the shift and the faint dashed curve is xx alone. A small downward triangle marks the peak, and a thin arc over the axis joins the two ends, labelled “same point (12.1)”. The readouts are the shift Ω1\Omega_1 and where the peak is, both in the form “0.50π rad/sample”.

The clip lasts 13 s. It starts at Ω1=0\Omega_1=0, a low-pass shape peaking at 0, then eases to 0.5π0.5\pi, where both readouts show 0.50π, and on to π\pi, where both show 1.00π and the peak sits at ±π\pm\pi. While it eases the caption reads “Multiplying by e^{jΩ₁n} slides the whole curve right by Ω₁.” Once the clip has finished, dragging the curve sideways, or its peak marker, sets Ω1\Omega_1 from −π-\pi to π\pi; the arrow keys move it by 0.01π0.01\pi, Page Up and Page Down by 0.25π0.25\pi, and Home and End jump to the ends.

The rules that carry over

On the page Properties of the Fourier transform (8.2) you met one rule for each operation on a continuous signal. Most of them carry over to sampled signals with Ω\Omega in place of ω\omega, and each proof is one line. Here X(ejΩ)X(e^{j\Omega}) is the DTFT of x[n]x[n], as on the page The DTFT (12.2), and Ω\Omega is the digital frequency in rad/sample.

Linearity holds because the transform is a sum: ax[n]+by[n]↔aX(ejΩ)+bY(ejΩ)ax[n]+by[n]\leftrightarrow aX(e^{j\Omega})+bY(e^{j\Omega}). For a delay, put m=n−n0m=n-n_0 in the sum. The factor e−jΩn0e^{-j\Omega n_0} comes out in front:

x[n−n0] ↔ e−jΩn0X(ejΩ).x[n-n_0]\ \leftrightarrow\ e^{-j\Omega n_0}X(e^{j\Omega}).

The size of the spectrum does not change, and the phase turns by −Ωn0-\Omega n_0. Reversal, x[−n]x[-n], replaces nn by −n-n in the sum, which gives X(e−jΩ)X(e^{-j\Omega}). Conjugation gives x∗[n]↔X∗(e−jΩ)x^*[n]\leftrightarrow X^*(e^{-j\Omega}). For a real signal, x∗=xx^*=x, so X(e−jΩ)=X∗(ejΩ)X(e^{-j\Omega})=X^*(e^{j\Omega}): the size is even in Ω\Omega and the phase is odd, as in the 8.2 section “A real signal has a mirrored spectrum”.

The delay rule gives a first check. The centred 5-sample pulse, 11 for −2≤n≤2-2\le n\le 2, has the transform sin⁡(5Ω/2)/sin⁡(Ω/2)\sin(5\Omega/2)/\sin(\Omega/2) from 12.2. The causal pulse, 11 for 0≤n≤40\le n\le 4, is the same pulse delayed by 2 samples, so its transform is

X(ejΩ)=e−j2Ω sin⁡(5Ω/2)sin⁡(Ω/2).X(e^{j\Omega})=e^{-j2\Omega}\,\frac{\sin(5\Omega/2)}{\sin(\Omega/2)}.

Two things are new in discrete time, and each gets an instrument. The first is the frequency shift, where the spectrum slides round a circle. The second is the window, where multiplication in time turns into a new kind of convolution in frequency.

Slide the spectrum round the circle

Multiply a signal by ejΩ1ne^{j\Omega_1n} and the sum changes to ∑nx[n]e−jΩnejΩ1n\sum_n x[n]e^{-j\Omega n}e^{j\Omega_1n}. Since ejΩ1ne−jΩn=e−j(Ω−Ω1)ne^{j\Omega_1n}e^{-j\Omega n}=e^{-j(\Omega-\Omega_1)n}, the sum is XX evaluated at Ω−Ω1\Omega-\Omega_1. I call this the frequency shift, and Ω1\Omega_1 is the shift in rad/sample:

ejΩ1nx[n] ↔ X(ej(Ω−Ω1)).e^{j\Omega_1n}x[n]\ \leftrightarrow\ X\bigl(e^{j(\Omega-\Omega_1)}\bigr).

It is the mirror of the delay: a delay in time multiplies the spectrum by an arrow, and a shift in frequency multiplies the signal by one. In discrete time there is a new feature. The frequency axis is a circle, as on the page Frequency in discrete time (12.1), so π\pi and −π-\pi are the same point. What slides off the edge at π\pi comes back in at −π-\pi, like a horse on a carousel that passes the gate and comes round again.

The picture at the top of the page applies this to x[n]=0.8nu[n]x[n]=0.8^nu[n]. At Ω1=0\Omega_1=0 nothing changes: the size peaks at 0, among the low frequencies, a low-pass shape. At Ω1=0.5π\Omega_1=0.5\pi the peak sits at 0.5π0.5\pi, the same shape, only moved. At Ω1=π\Omega_1=\pi, where ejπn=(−1)ne^{j\pi n}=(-1)^n, what slid off at π\pi came back in at −π-\pi, and the peak sits at ±π\pm\pi. Flipping every other sample’s sign turned low-pass into high-pass.

After the clip, drag the curve sideways, or its peak marker, to set Ω1\Omega_1 yourself. Watch the height of the peak: it stays at 5 for every Ω1\Omega_1.

The height is the size of 1/(1−0.8e−jΩ)1/(1-0.8e^{-j\Omega}) at its peak, 1/(1−0.8)=51/(1-0.8)=5. A shift moves a curve but does not change its shape, so the peak keeps its height wherever it lands. Look at the end of the clip. The multiplier ejπne^{j\pi n} is (−1)n(-1)^n, so (−1)n0.8nu[n]=(−0.8)nu[n](-1)^n0.8^nu[n]=(-0.8)^nu[n], and its size is 5 at Ω=π\Omega=\pi and 1/1.8=0.5561/1.8=0.556 at Ω=0\Omega=0.

0.8^n(-0.8)^nsample n (0 to 11)
Fig. Flip the sign of every other sample and the slow decay becomes a fast alternation. The size 5 moves from Ω = 0 to Ω = π, and 0.56 moves from π to 0.

The maths behind it · diagonal matrices

Multiplying by ejΩ1ne^{j\Omega_1n} is a diagonal matrix acting on xx; in frequency it becomes a shift. A delay is a shift in time and a diagonal in frequency. Each operation is simple in one of the two descriptions.

Cut a tone short, and its arrows spread

A real recording has a start and an end. Cutting a signal to NN samples multiplies it by the window w[n]w[n], which is 1 for 0≤n≤N−10\le n\le N-1 and 0 elsewhere. It is an envelope, as on the page Operations on amplitude (2.2). The window is a pulse like the one in 12.2, delayed by (N−1)/2(N-1)/2 samples, so by the delay rule its transform W(ejΩ)W(e^{j\Omega}) is

W(ejΩ)=e−jΩ(N−1)/2 sin⁡(NΩ/2)sin⁡(Ω/2).W(e^{j\Omega})=e^{-j\Omega(N-1)/2}\,\frac{\sin(N\Omega/2)}{\sin(\Omega/2)}.

A cosine is two arrows of half size, cos⁡(Ω1n)=12ejΩ1n+12e−jΩ1n\cos(\Omega_1n)=\tfrac12e^{j\Omega_1n}+\tfrac12e^{-j\Omega_1n}. By the shift rule, applied to each arrow,

w[n]cos⁡(Ω1n) ↔ 12W(ej(Ω−Ω1))+12W(ej(Ω+Ω1)).w[n]\cos(\Omega_1n)\ \leftrightarrow\ \tfrac12W\bigl(e^{j(\Omega-\Omega_1)}\bigr)+\tfrac12W\bigl(e^{j(\Omega+\Omega_1)}\bigr).

Each arrow of the tone is replaced by a copy of WW centred on it. The central lump of WW is its main lobe. It runs from the first zero on one side of the centre to the first on the other, and WW has its zeros at multiples of 2π/N2\pi/N, so the main lobe is 4π/N4\pi/N wide.

The next picture cuts the tone cos⁡(0.5πn)\cos(0.5\pi n) to NN samples and doubles NN three times. Watch the lumps where the tone’s two arrows were.

Cut a tone short, and its arrows spread

cos(0.5πn) kept for N samples. Sizes are relative to N/2, the height at ±0.5π.

N = 4: one cycle kept. Each arrow has become a lump π wide, reaching from 0 to π.

window length N
4
main lobe
1.00π rad/sample
0.00 / 14.00 s
Describe this picture

Two stacked panels for cos⁡(0.5πn)\cos(0.5\pi n) kept for NN samples. The time panel shows x[n]x[n] from −1.2 to 1.2 against the sample nn from 0 to 63: stems with dot heads for the samples that are kept, and small open circles on the axis, labelled “cut off”, for the rest. The spectrum panel shows the size divided by N/2N/2, from 0 to 1.2, against Ω\Omega from −π-\pi to π\pi rad/sample. The solid curve is the spectrum of the cut tone. The endless tone’s two arrows are dashed vertical arrows of height 1 at ±0.5π\pm0.5\pi, and a bracket under one lump between its first zeros is labelled “main lobe”. The readouts are the window length NN and the main lobe.

The clip lasts 14 s and steps through four window lengths, with a blank caption in the morphs between them. The readouts show N=4N=4 and 1.00π rad/sample, then 8 and 0.50π, 16 and 0.25π, and 32 and 0.13π. Once the clip has finished, dragging the cut in the time panel sets NN from 4 to 64 in steps of 4; the arrow keys move it by 4 and Page Up and Page Down by 16. Between the held lengths the caption takes the form “N = 48: main lobe 0.08π rad/sample.”

At N=4N=4 one cycle is kept, and each arrow has become a lump π\pi wide, reaching from 0 to π\pi. At N=8N=8, two cycles, the lumps are half as wide, 0.5π0.5\pi, with small side lobes between them. At N=16N=16 they are 0.25π0.25\pi wide: the longer the window, the closer each lump comes to the tone’s arrow. At N=32N=32 they are 0.125π0.125\pi wide. Multiplying by the window in time replaced each arrow with a copy of the window’s spectrum: a periodic convolution.

After the clip, drag the cut in the time panel to set NN yourself, from 4 to 64.

Notice two things. The lumps narrow as NN grows, in step with 4π/N4\pi/N. And their height, relative to N/2N/2, stays at 1. The relative axis is the reason: the unscaled lump grows with NN, since the window adds up NN samples, and dividing by N/2N/2 shows the shape alone. At Ω=0.5π\Omega=0.5\pi the size is exactly N/2N/2 for each of these lengths, and at 00 and π\pi it is 0.

This is the price of a short look at a signal. A handclap lasts a few samples, and its spectrum is one wide lump with no single pitch. A tone kept for a long time has a spectrum that is nearly a pair of arrows. At N=8N=8 the side lobes peak at 0.272 of N/2N/2, at 0.134π0.134\pi and 0.866π0.866\pi. They are the first sign of leakage, which the pages Windowing and spectral leakage (15.1) and Window functions compared (15.2) take on.

Multiplication in time is periodic convolution in frequency

The window example is a case of a general rule. Multiply two signals and the spectrum of the product is

x[n]w[n] ↔ 12π∫−ππX(ejθ) W(ej(Ω−θ)) dθ.x[n]w[n]\ \leftrightarrow\ \frac1{2\pi}\int_{-\pi}^{\pi}X\bigl(e^{j\theta}\bigr)\,W\bigl(e^{j(\Omega-\theta)}\bigr)\,d\theta.

Slide one spectrum past the other and add up the overlap, over one period only. I call this periodic convolution. It is the convolution rule with time and frequency swapped, and the integral runs over 2π2\pi because both spectra repeat every 2π2\pi. For the tone, XX is two arrows, and the integral picks out one copy of WW at each of them.

The maths behind it · kernel smoothing

Smoothing a histogram with a kernel is a convolution that blurs it. A window does the same to a spectrum, and a wider window in time is a narrower kernel in frequency.

Convolution becomes multiplication

The rule from 8.2 returns unchanged. For the convolution x∗hx*h of the page Discrete convolution (5.2),

x∗h ↔ X(ejΩ) H(ejΩ).x*h\ \leftrightarrow\ X\bigl(e^{j\Omega}\bigr)\,H\bigl(e^{j\Omega}\bigr).

The proof is the one from 8.2. The signal xx is a sum of arrows. Each arrow goes through a system with impulse response hh and comes out multiplied by one number, H(ejΩ)H(e^{j\Omega}), as on the page Properties of LTI systems (5.4). So the output is the same sum of arrows, each scaled by HH.

Here is a check with two 3-point moving averages in a row, from Difference equations (6.1). One average has h=(1,1,1)/3h=(1,1,1)/3, and its transform is e−jΩ(1+2cos⁡Ω)/3e^{-j\Omega}(1+2\cos\Omega)/3, and the factor e−jΩe^{-j\Omega} does not change the size. The convolution of the average with itself is the triangle (1,2,3,2,1)/9(1,2,3,2,1)/9. Its size at Ω=0\Omega=0, π/3\pi/3, 2π/32\pi/3 and π\pi is 1, 0.444, 0 and 0.111. These are the squares of one average’s sizes, 1, 0.667, 0 and 0.333.

0.44400.111dashed: one 3-point average, |1 + 2cos Ω|/3solid: two in a row, its square0π/32π/3πΩ (rad/sample)size
Fig. Two 3-point moving averages in a row make the triangle (1, 2, 3, 2, 1)/9. Its size is the square of one average’s: 0.667² = 0.444 at π/3, 0 at 2π/3, 0.333² = 0.111 at π.

The rest of the table

Three more rules finish the set, and I check each on x[n]=0.8nu[n]x[n]=0.8^nu[n], whose transform is 1/(1−0.8e−jΩ)1/(1-0.8e^{-j\Omega}) from 12.2.

Parseval. The energy of a signal, defined on the page How big is a signal (1.3), is the same in both descriptions:

∑n∣x[n]∣2=12π∫−ππ∣X(ejΩ)∣2 dΩ.\sum_{n}\lvert x[n]\rvert^2=\frac1{2\pi}\int_{-\pi}^{\pi}\lvert X(e^{j\Omega})\rvert^2\,d\Omega.

In time, ∑n0.64n=1/(1−0.64)=2.7778\sum_n0.64^n=1/(1-0.64)=2.7778. Integrating ∣X∣2\lvert X\rvert^2 numerically over (−π,π](-\pi,\pi] gives the same value.

Differentiation in frequency. Differentiate X(ejΩ)=∑nx[n]e−jΩnX(e^{j\Omega})=\sum_nx[n]e^{-j\Omega n} with respect to Ω\Omega. Each term brings down a factor −jn-jn, so nx[n]↔j dX/dΩnx[n]\leftrightarrow j\,dX/d\Omega. For 0.8nu[n]0.8^nu[n] this gives

n 0.8nu[n] ↔ 0.8e−jΩ(1−0.8e−jΩ)2.n\,0.8^nu[n]\ \leftrightarrow\ \frac{0.8e^{-j\Omega}}{\bigl(1-0.8e^{-j\Omega}\bigr)^2}.

At Ω=0\Omega=0 both sides agree: the sum ∑nn 0.8n\sum_nn\,0.8^n is 0.8/0.22=200.8/0.2^2=20.

Symmetry. A real x[n]x[n] has an even size and an odd phase, as above. If x[n]x[n] is also even, x[n]=x[−n]x[n]=x[-n], then XX is real. This is the even part of Decomposing signals (2.3), and it is why the centred pulse of 12.2, sin⁡(5Ω/2)/sin⁡(Ω/2)\sin(5\Omega/2)/\sin(\Omega/2), is one real curve with no phase.

Where you’ll meet this

The frequency shift is how a sampled radio signal is moved down to a lower frequency before it is processed, and why (−1)n(-1)^n turns a low-pass design into a high-pass one. Windowing is behind every spectrum you compute from a finite recording: the peak of a tone is never narrower than the main lobe 4π/N4\pi/N of the window you used.

The next page, Frequency response of discrete-time systems (12.4), uses the convolution rule to give each system a response H(ejΩ)H(e^{j\Omega}). Windows and leakage follow in 15.1 and 15.2, and linear phase, a pure delay in disguise, in Linear-phase systems (17.3).

Reference card

PropertyTimeFrequency
Linearityax[n]+by[n]ax[n]+by[n]aX+bYaX+bY
Delayx[n−n0]x[n-n_0]e−jΩn0X(ejΩ)e^{-j\Omega n_0}X(e^{j\Omega})
Frequency shiftejΩ1nx[n]e^{j\Omega_1n}x[n]X(ej(Ω−Ω1))X(e^{j(\Omega-\Omega_1)}), round the circle
Sign flip(−1)nx[n](-1)^nx[n]X(ej(Ω−π))X(e^{j(\Omega-\pi)}): low and high swap
Reversalx[−n]x[-n]X(e−jΩ)X(e^{-j\Omega})
Conjugationx∗[n]x^*[n]X∗(e−jΩ)X^*(e^{-j\Omega}); real xx: X(e−jΩ)=X∗(ejΩ)X(e^{-j\Omega})=X^*(e^{j\Omega})
Convolutionx∗hx*hX(ejΩ)H(ejΩ)X(e^{j\Omega})H(e^{j\Omega})
Multiplicationx[n]w[n]x[n]w[n]12π∫−ππX(ejθ)W(ej(Ω−θ)) dθ\dfrac1{2\pi}\displaystyle\int_{-\pi}^{\pi}X(e^{j\theta})W(e^{j(\Omega-\theta)})\,d\theta (periodic convolution)
Window, length NNw[n]=1w[n]=1, 0≤n≤N−10\le n\le N-1e−jΩ(N−1)/2sin⁡(NΩ/2)sin⁡(Ω/2)e^{-j\Omega(N-1)/2}\dfrac{\sin(N\Omega/2)}{\sin(\Omega/2)}; main lobe 4π/N4\pi/N
Differentiation in frequencynx[n]nx[n]j dX(ejΩ)dΩj\,\dfrac{dX(e^{j\Omega})}{d\Omega}
Parseval∑n∣x[n]∣2\displaystyle\sum_n\lvert x[n]\rvert^212π∫−ππ∣X(ejΩ)∣2 dΩ\dfrac1{2\pi}\displaystyle\int_{-\pi}^{\pi}\lvert X(e^{j\Omega})\rvert^2\,d\Omega

End of lesson 12.3

Where to go next.

Phasorium
LibraryEvery lesson, in order

Parts

About Phasorium
Look