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

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 T = 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 A and width T is correlated with a copy of itself. What is the result's largest value, and where?

Name it

Cross-correlation and autocorrelation

For energy signals (pulses, which have finite energy),

Rxy(τ)=∫−∞∞x(t)y(t+τ)dt

measures how much y, shifted back by τ, looks like x. If y is a delayed copy of x, y(t)=ax(t−t0), then Rxy(τ)=aRxx(τ−t0): the correlation peaks at the delay. The autocorrelation Rxx(τ) has three properties:

  • Rxx(0)=∫x2dt is the signal's energy;
  • |Rxx(τ)|≤Rxx(0) for every lag (the Cauchy-Schwarz inequality);
  • Rxx(−τ)=Rxx(τ): it's even.

Correlation is convolution with one signal flipped: Rxy(τ)=x(−t)*y(t) evaluated at τ.

The spectrum of a correlation

Because flipping time conjugates a real signal's transform (lesson 10),

Rxy(τ)↔X*(f)Y(f)Rxx(τ)↔|X(f)|2

|X(f)|2 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 1/B for a signal of bandwidth B. A plain pulse of width T has B≈1/T, so a sharp peak needs a short pulse, which carries little energy. A chirp, a long pulse whose frequency sweeps over B, has a wide spectrum and a long duration, so its correlation peak is about 1/B wide while its energy grows with T. The compression ratio is the time-bandwidth product TB.

Worked example

Find the autocorrelation of a rectangular pulse of height A and width T.

Show the solution
  1. Slide and overlap. Sliding the pulse by τ with 0≤τ≤T, the copies overlap for T−τ, where the product is A2.
  2. The autocorrelation. It's Rxx(τ)=A2(T−|τ|)for |τ|≤T and 0 otherwise: a triangle with peak A2T, the energy.
  3. The peak. For A = 2 V and T = 1 ms: Rxx(0)=A2T=(2V)2×1ms=0.004V2⋅s
  4. A quarter-pulse offset. It's down to Rxx(T/4)=0.004×0.75=0.003V2⋅s
  5. Check against the spectrum. Its transform, A2T2sinc2⁡(fT), is |X(f)|2 for the pulse's X(f)=ATsinc⁡(fT), as the theory says.

Answer a triangle A2(T−|τ|) for |τ|≤T, peaking at the energy A2T: 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
  1. The range. The pulse travels out and back at 3×108 m/s, so R=cτ2=3×108×20×10−62m=3km
  2. 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.
  3. The range resolution. ΔR=c×10−62=150m
  4. 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
  1. The peak width needed. 15 m of resolution needs a correlation peak this wide: 2×15mc=0.1µs
  2. The bandwidth needed. That means a bandwidth of about 10.1µs=10MHz
  3. What a plain pulse has. A 100 µs pulse at a single frequency has only about 10 kHz of bandwidth.
  4. 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.
  5. The compression ratio. TB=100µs×10MHz=1000 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 A2T2sinc2⁡(fT). 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 −(Nx−1) 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 A and width T for a lag τ between 0 and T.

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°.

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.

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.