A10 · Lesson 11 · Correlation and energy spectra
Finding a known signal in a received one, and what its spectrum says about it
A radar sends a short pulse and listens. The echo comes back weak, buried in noise, and delayed by the round trip to the target. A GPS receiver hunts for a satellite's code in a signal far below the noise floor. Both find what they're looking for the same way: slide a copy of the expected signal along the received one, multiply and add at every offset, and look for the offset where the match is best. That sliding product is correlation, a close cousin of lesson 10's convolution, and its Fourier transform turns out to be a product of spectra too.
- The top curve is a rectangular pulse of width = 1 ms; the second is its autocorrelation, the pulse slid past itself, against the lag in milliseconds.
- The autocorrelation is a triangle twice as wide as the pulse, peaking at zero lag with the pulse's energy. Widen the pulse and the triangle widens with it: a long pulse can't mark time sharply.
Predict
A pulse of height and width is correlated with a copy of itself. What is the result's largest value, and where?
at zero lag. With no offset the pulse lines up with itself, so the product is wherever the pulse is, and integrating gives : its energy. Any offset reduces the overlap. A signal always matches itself best when it isn't shifted, and the match at zero lag is its energy.
Name it
Cross-correlation and autocorrelation
For energy signals (pulses, which have finite energy),
measures how much , shifted back by , looks like . If is a delayed copy of , , then : the correlation peaks at the delay. The autocorrelation has three properties:
- is the signal's energy;
- for every lag (the Cauchy-Schwarz inequality);
- : it's even.
Correlation is convolution with one signal flipped: evaluated at .
The spectrum of a correlation
Because flipping time conjugates a real signal's transform (lesson 10),
is the energy spectral density: how a pulse's energy is spread over frequency. Its integral is the energy, which is lesson 4's Parseval theorem in another form. A pulse with a wide spectrum has a narrow autocorrelation peak, and the reverse.
Delay, resolution and pulse compression
The correlation peak's width sets how precisely a delay can be measured and how close two echoes can be and still be told apart: roughly for a signal of bandwidth . A plain pulse of width has , so a sharp peak needs a short pulse, which carries little energy. A chirp, a long pulse whose frequency sweeps over , has a wide spectrum and a long duration, so its correlation peak is about wide while its energy grows with . The compression ratio is the time-bandwidth product .
Worked example
Find the autocorrelation of a rectangular pulse of height and width .
Show the solution
- Slide and overlap. Sliding the pulse by with , the copies overlap for , where the product is .
- The autocorrelation. It's and 0 otherwise: a triangle with peak , the energy.
- The peak. For = 2 V and = 1 ms:
- A quarter-pulse offset. It's down to
- Check against the spectrum. Its transform, , is for the pulse's , as the theory says.
Answer a triangle for , peaking at the energy : 0.004 V²·s for a 2 V, 1 ms pulse.
Worked example
A radar's echo, correlated with the transmitted pulse, peaks at a lag of 20 µs. How far away is the target? With a 1 µs pulse, how close can two targets be and still show as two peaks?
Show the solution
- The range. The pulse travels out and back at m/s, so
- Two targets. Two targets give two triangles, each 2 µs wide at the base. They stay separate if their delays differ by more than about one pulse width, 1 µs.
- The range resolution.
- Sonar. Sonar uses the same arithmetic at 1500 m/s, where a 2 ms delay means 1.5 m.
Answer the target is 3 km away, and two targets show as two peaks if their ranges differ by more than about 150 m.
Worked example
A radar wants 15 m range resolution but needs a pulse 100 µs long to carry enough energy. How can it have both?
Show the solution
- The peak width needed. 15 m of resolution needs a correlation peak this wide:
- The bandwidth needed. That means a bandwidth of about
- What a plain pulse has. A 100 µs pulse at a single frequency has only about 10 kHz of bandwidth.
- Sweep the frequency. Sweeping the frequency over 10 MHz during the 100 µs gives the long pulse a 10 MHz spectrum, so correlating the echo with the transmitted chirp compresses it to about 0.1 µs.
- The compression ratio. The radar gets the energy of a long pulse with the resolution of a short one.
Answer sweep the pulse's frequency over 10 MHz (a chirp) and correlate the echo with it, which compresses the 100 µs pulse to about 0.1 µs, a ratio of 1000.
Check
A rectangular pulse is 3 V high and 1 ms long. What is its autocorrelation, in V²·s, at a lag of 0.5 of its width?
Check
A radar's correlation peaks at a lag of 20 µs. How far away is the target?
Write units the way you normally would: 1.5 m, 1500 mm and 0.0015 km are the same answer.
Check
A rectangular pulse 2 V high and 0.5 µs long has energy spectral density . What is the integral of that density over all frequencies, in V²·s?
Check
A radar transmits a 2 µs pulse.
(a)
If it's a plain pulse, about how close can two targets be in range and still be told apart?
Write units the way you normally would: 1.5 m, 1500 mm and 0.0015 km are the same answer.
(b)
If instead it's a chirp sweeping 1 MHz, what is its compression ratio?
Check
The starter builds a random ±1 code x of 255 samples and a received signal y: the code delayed by d = 412 samples, scaled by 0.5 and buried in noise of standard deviation 1. Using np.correlate(y, x, mode="full"), set r to the correlation, lags to the lag of each entry (from upward), and delay to the lag of the largest value. Then set snr to the peak divided by the standard deviation of r away from it (lags more than 300 samples from the peak).
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Derive the autocorrelation of a rectangular pulse of height and width for a lag between 0 and .
Step 1
Over what length of time do the pulse and its copy, shifted by , overlap?
Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.
Step 2
What is , the integral of their product?
Check
Why is a signal's autocorrelation always largest at zero lag?
Explain why
A radar designer wants both long range, which needs a lot of pulse energy, and fine range resolution. Explain why a plain pulse can't give both, and how a chirp does.
Range resolution comes from how narrow the echo's correlation peak is, which is about one over the signal's bandwidth. A plain pulse's bandwidth is about one over its length, so a sharp peak needs a short pulse, and a short pulse at a limited transmitter power carries little energy, which limits range. A chirp breaks the link: its length sets its energy, while its frequency sweep sets its bandwidth independently. Correlating the echo with the transmitted chirp compresses it into a peak about wide, so the radar gets the energy of a long pulse and the resolution of a short one. The improvement is the time-bandwidth product.
Practice
Keep practicing
7 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.