Five samples, each an arrow turned back by and added nose to tail. Watch the chain curl and close as grows.
Five arrows, turned and added
x[n] = 1 for n = −2 to 2. Each sample is an arrow x[n]e^{−jΩn}; their sum is X(e^{jΩ}).
Ω = 0: no turning. The five arrows line up, and X adds to 5, the sum of the samples.
Describe this picture
One plane, real against imaginary, with five unit arrows nose to tail in the order , for the pulse for to 2. Each arrow is labelled with its ; arrows that lie on the same stretch share one label, such as “−2, 0, 2” at . The arrow for is in the accent colour and the others in the text colour, and a filled square marks the chain’s tip, the sum . Below, a strip traces the sum against from 0 to rad/sample. The readouts are and .
The clip holds at four values of , and the caption says what the chain does. At 0 the five arrows line up and the readout is 5.00. At they close a pentagon and the readout is 0.00. At they alternate and the readout is 1.00. At the readout is 5.00 again. Once the clip has finished, dragging along the strip, or the arrow keys, chooses from 0 to ; at the arrows add to −1.25.
Samples, turned and added
From series to transform (8.1) wound a pulse at any rate and added it up. This page does the same with samples. Each sample is an arrow, each arrow is turned back by per sample (the unit of Frequency in discrete time, 12.1), and I add the arrows nose to tail.
The result is a function of , the discrete-time Fourier transform (DTFT):
The sample is the arrow’s length (and its sign), turns it back by radians, and the sum runs over every integer . It is a sum, not 8.1’s integral, so carries the signal’s own units and no ”× s”. You have met this sum once: Properties of LTI systems (5.4) wrote for a system’s impulse response.
Five arrows, turned and added
The first signal is a pulse of five samples, for to and 0 elsewhere. It is centred on , as 8.1’s pulse was, so that stays real. The picture at the top of the page turns these five arrows.
Start with the chain. At nothing turns: the five arrows line up, and adds to 5, the sum of the samples. At each arrow turns a fifth of a circle past the last, and five of them close a pentagon. The chain ends where it began, so the sum is 0. Think of five people pulling on a ring with equal force in evenly spread directions: the ring does not move.
At the arrows alternate. Three point right and two point left, so . At a whole turn per sample is no turn, so is 5 again: the curve repeats every .
When the clip has finished, drag along the strip, or use the arrow keys, to choose from 0 to . Try 0.58π, where the arrows add to −1.25. The sum is real throughout, because the pulse is symmetric about : the arrow for is the mirror image of the arrow for .
Why the curve repeats
At every arrow is turned by one whole extra turn per sample, for a whole number . That changes nothing, so
The spectrum repeats every , and one period, or to , holds all of it. This is the circle of 12.1 again: a frequency is a point on a circle, and going once round returns to the start.
The closed form: the Dirichlet kernel
For five samples the sum is a finite geometric series. Pull out the first term, , and use the finite sum of Difference equations (6.1), , with . Then the half-angle step of 8.1 turns each difference into a sine:
For samples, with odd and centred on 0, the same steps give . This is the Dirichlet kernel. It is 8.1’s made periodic. Its height at is , and it has zeros at the multiples of except the multiples of , which are the tops of the repeats. For the first zeros are at and , and between them it dips to near .
A pulse of the same five samples, but starting at ( to ), is this one delayed by two samples. It has the same size, and its angle is more. Properties of the DTFT (12.3) proves the delay rule. At , for example, the size is 3.236 and the angle is ( rad).
The inverse
The spectrum holds the whole signal, and it comes back with an integral over one period:
Why does this work? Put the sum for inside the integral. The term for sample is . That integral adds an arrow that turns whole times round the circle, so it is 0 unless , where it is . Only survives. It is 8.1’s inverse over one period only, because the spectrum repeats.
A check on the pulse: the integral gives , and , and .
One arrow, two curves
For most signals is not real. It is one complex number for each , so I draw it as two curves: its length and its angle . A weather vane on a windy day works the same way: how hard and which way are two readings for one wind.
Take for and 0 before, a decaying exponential. Its sum is a geometric series that settles, because is less than 1:
For a decaying exponential with less than 1 the result is .
The next picture follows the arrow for this signal as runs from 0 to . Watch its length fall as its tip runs round a circle.
One arrow, two curves
x[n] = 0.8ⁿu[n]. Its X(e^{jΩ}) is one complex number for each Ω: a length and an angle.
Ω = 0: the arrow lies along the real axis with length 5, the sum 1 + 0.8 + 0.64 + …
Describe this picture
A plane, real against imaginary, with the arrow from the origin, a filled dot at its tip and a dashed line for the path of the tip, for . Beside it, two strips share the axis from 0 to rad/sample: the size , a solid curve with a filled dot at the current point, and the angle in degrees, a dashed curve with a filled diamond. The readouts are , and .
The clip starts at with the arrow along the real axis, length 5, the sum 1 + 0.8 + 0.64 + …, and the readouts 5.00 and 0.0°. As grows the tip runs round a circle, and its length and angle draw the two curves. At the length is 0.78 and the angle −38.7°. At the readouts are 0.56 and 0.0°: the size fell nine times. Once the clip has finished, dragging across the curves, or the arrow keys, chooses from 0 to ; at the length is 1.40 and the angle −52.5°.
That is the thing to notice: falls from 5 to 0.556, a factor of 9, so the signal is mostly slow wiggles. The angle starts at 0, dips, and is 0 again at .
Afterwards, drag across the curves, or use the arrow keys, to choose from 0 to . At 0.25π the length is 1.40 and the angle −52.5°. The tip lies on a circle with centre 2.778 and radius 2.222 on the real axis. The two ends of its diameter are the values at (5) and (0.556). The angle is steepest, , at , where .
A phase that jumps, and the line under it
An angle read in jumps by 360° whenever the arrow passes the negative real axis, though the arrow itself turns smoothly. A car’s odometer that rolls over at 1000 km does the same: add 1000 at each roll-over and you have the true distance. Undoing the jumps is called unwrapping, and the unwrapped angle is the unwrapped phase. The principal value in is the principal phase.
The cleanest signal for this is a pure delay, . Its only sample is the 1 at , so : size 1 for every and angle , a straight line.
Watch the angle strip: the angle written in jumps twice, and then its pieces slide down onto one straight line.
A phase that jumps, and the line under it
x[n] = δ[n − 4]: size 1 at every Ω, angle −4Ω.
Ω = 0: the arrow points right. Angle 0.
Describe this picture
A plane with the unit circle and the arrow , for . Two strips share the axis from 0 to rad/sample. The size strip is a flat solid line at 1. The angle strip, in degrees, has two traces told apart by width and dash: the principal angle, a thin solid line with open circles at the ends of each jump, and the unwrapped angle, a thick dashed line. The readouts are , the principal angle and the unwrapped angle.
The clip starts with the arrow pointing right, angle 0. The arrow turns back , and the principal angle reappears at +180° each time it passes −180°. It holds at on two jumps of 360°, at and , with the readouts 0.0° and −720.0°. Then the later pieces slide down, by 360° for the second piece and 720° for the third, and the last caption reads “Unwrapped: add or subtract 360° wherever the angle jumps by 360°. The phase is the straight line −4Ω, which reaches −720° at π.” Once the clip has finished, dragging across the curves chooses .
The arrow reaches at () and at (), and the principal angle reads and then jumps back to each time. The arrow never jumped; only the way its angle is written did. At the unwrapped phase is , and the principal angle is . After the clip, drag across the curves to choose .
NumPy’s np.unwrap does this, in radians. It adds or subtracts wherever two neighbouring angles differ by more than , so the angle must be computed at values close enough that the true phase moves by less than between them.
The causal pulse ( to ) has the angle plus a jump of 180° at each zero of the Dirichlet kernel. Those jumps are different. The kernel changes sign at each zero, so the arrow really does flip to the other side, and unwrapping by 360° leaves them.
A tone is two arrows, repeated
A tone never dies out, so its sum does not settle at any in particular. As in Transforms of common signals (8.3), I write its spectrum as arrows labelled by their area. The tone is . The inverse says the arrow rebuilds , since , and the spectrum repeats every . Half of each gives
Here counts the repeats, and each arrow has area .
The shaded band is , one period. For , which is a 1 kHz tone at an 8 kHz sampling rate, the arrows in the band sit at . The inverse over that band gives .
When the sum exists
The sum has to settle. If is finite, the signal is absolutely summable: the chain of arrows has a finite total length, so its tip settles at every . The pulse and the decaying exponential are of this kind.
A weaker condition is still useful. The ideal low-pass impulse response , with , is not absolutely summable. Take . Then to are , , , , , , , , . Add over for and you get , , , , . Each factor of 10 adds about 0.88, and there is no limit.
The energy is different. The sum of over the same ranges is , , , , , and it approaches . A signal whose energy (How big is a signal, 1.3) is finite is square summable. Its DTFT exists in the mean-square sense: the energy of the error of the partial sums goes to 0, while near the band edge they overshoot as in Convergence and the Gibbs phenomenon (7.3).
From a sampled signal
For samples of a continuous signal, , the DTFT is made of the copies of The sampling theorem (10.2):
These are 10.2’s copies, with the sampling frequency becoming on the axis. The repeat every of this page is the same repeat every .
The maths behind it · inner products
Each value is the inner product of with the arrow sequence (the conjugate does the turning back). The DTFT measures how much of each arrow contains. The DFT as a matrix (13.5) makes that a change of basis.
The maths behind it · characteristic functions
For a whole-number random variable with probabilities , the characteristic function is a DTFT of the probabilities, with the opposite sign. It repeats every for the same reason: is a whole number.
Worked example
- Pulse, centred. . At , , , , , it is , , , , , . Its lowest value between the zeros is at . Direct sums at and give the same values, and .
- Inverse. for this pulse gives at and at .
- Exponential, . and at , , , , are and ; and ; and ; and ; and . The tip’s circle has centre 2.778 and radius 2.222. The signal’s energy is , which equals .
- Delay. For the principal angle jumps at and . The unwrapped angle is at , at and at .
- Low-pass. For the sum of keeps growing and the sum of approaches .
- Tone. arrows of area at .
Where you’ll meet this
A spectrum analyser that shows the spectrum of recorded samples is drawing across one period. The Dirichlet kernel is the shape of a short window’s response: the narrower the pulse in time, the wider the main lobe, as in 8.1, and Windowing and spectral leakage (15.1) returns to it.
Each operation on a signal has a matching change in . A delay turns the angle, which is the rule 12.3 proves in Properties of the DTFT. The same sum for a system’s impulse response is its frequency response, the subject of Frequency response of discrete-time systems (12.4). Sampling the curve at equally spaced gives the DFT, in Sampling the spectrum (13.1).
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| DTFT | signal’s units; repeats every | |
| Inverse | one period is enough | |
| Exists | finite: settles everywhere; finite: in mean square | ideal low-pass is the second kind |
| Centred pulse, odd | for | Dirichlet kernel; height , zeros at |
| Exponential | , less than 1 | low-pass shape for between 0 and 1 |
| Delay | size 1, phase | |
| Tone | arrows of area | |
| Magnitude, phase | ; | unwrap: remove jumps |
| From | 10.2’s copies | |
| Ideal low-pass | , | square summable only |