---
title: Coherent detection and lidar
heading: Mixing a weak signal with a strong local oscillator on a photodiode, the beat note and its shot-noise-limited signal-to-noise ratio, heterodyne and homodyne detection, and coherent and FMCW lidar's range resolution and Doppler measurement
eyebrow: S13 · Lesson 31 · Coherent detection and lidar
xp: 50
---

::: hook
A photodiode measures power, so it throws away the light's phase and frequency. Add a strong, steady laser beam, the local oscillator, to the weak signal before the detector, and the photocurrent picks up a beat at their difference frequency whose amplitude grows with the oscillator's strength. The signal now rides far above the receiver's thermal noise, and its phase and frequency are recovered. Coherent detection lets long-haul links use QPSK and QAM, and lets lidars measure distance and velocity at once.
:::

::: play
- The curve is a heterodyne receiver's signal-to-noise ratio against the received signal power, for a 1550 nm signal, a detector of quantum efficiency 0.8 and the detection bandwidth on the slider, in the shot-noise limit: SNR = $\eta P_s/(h\nu B)$.
- A nanowatt over 1 GHz gives about 8 dB; the SNR rises one decibel for each decibel of signal.
- The dashed line is a direct-detection receiver with the same detector and 1.8 µA of thermal noise current (a 50 Ω load over 10 GHz, as in lesson 36's example), whose SNR falls twice as fast because it goes as the square of the signal.
:::

```sim plot
view: graph
x: P = -70..-20
y: S = -40..60
slider: B = 0.1..10 = 1
plot: 10*log(0.8*10^(P/10)*1e-3/(1.282e-19*B*1e9)) | label: heterodyne SNR, dB
plot: 10*log((0.8*1550/1239.84*10^(P/10)*1e-3)^2/(1.82e-6)^2) | dashed | label: direct detection (thermal noise)
```

::: predict
## A 1 nW signal at 1550 nm is detected coherently with a strong local oscillator over 1 GHz, using a detector of quantum efficiency 0.8. What signal-to-noise ratio can the receiver reach?

- [x] About 8 dB, set by shot noise
- [ ] About 50 dB
- [ ] Below 0 dB: a nanowatt is lost in thermal noise
- [ ] It depends only on the local oscillator's power

::: reveal
With a strong local oscillator the only noise left is the oscillator's own shot noise, and the SNR becomes $\eta P_s/(h\nu B) = 0.8 \times 1\text{ nW}/(1.28 \times 10^{-19}\text{ J} \times 1\text{ GHz}) = 6.2$, 8 dB: about six signal photons per detection interval. Direct detection of a nanowatt would be buried hundreds of times below a typical thermal noise floor.
:::
:::

::: nameit
## Mixing on a photodiode

A signal of power $P_s$ and a local oscillator $P_\text{LO}$, matched in polarization, on a detector of responsivity $\mathcal R$ produce
$$i(t) = \mathcal R\left[P_s + P_\text{LO} + 2\sqrt{P_sP_\text{LO}}\cos(2\pi f_\text{IF}t + \phi)\right]$$
with $f_\text{IF} = |\nu_s - \nu_\text{LO}|$ the intermediate frequency and φ the phase difference. The beat's amplitude grows with $\sqrt{P_\text{LO}}$, lifting the weak signal above thermal noise.

## Heterodyne and homodyne

- **Heterodyne** ($f_\text{IF} \ne 0$): the signal moves to an intermediate frequency where electronics recover its amplitude, phase and frequency. With a strong oscillator the noise is its shot noise, and
$$\text{SNR} = \frac{\eta P_s}{h\nu B}$$
- **Homodyne** ($f_\text{IF}$ = 0, phase-locked): 3 dB better for a single quadrature. Modern coherent receivers use a 90° optical hybrid and balanced detectors to recover both quadratures at once, with digital phase tracking replacing the phase lock.

## Lidar

- **Pulsed time of flight:** range = $ct/2$, resolution $c\tau/2$ for pulse width τ.
- **FMCW:** a chirp of bandwidth B over time T, mixed with its echo from range R, beats at $f_b = 2RB/(cT)$, and the range resolution is $c/(2B)$: 1 GHz gives 15 cm.
- **Doppler:** a target moving at radial speed v shifts the echo by $f_D = 2v/\lambda$, which a coherent receiver measures directly: 38.7 MHz at 30 m/s and 1550 nm.

The laser's coherence length (lesson 29) must exceed twice the range for the echo to beat cleanly with the oscillator.
:::

::: example
## A 1550 nm heterodyne receiver with η = 0.8 and 1 GHz of bandwidth receives 1 nW. Find its shot-noise-limited SNR, and the local oscillator power needed to beat a 1.8 µA thermal noise current by 10 dB.

::: solution
1. **Shot-noise-limited SNR.**
   $$\begin{aligned} \text{SNR} &= \frac{0.8 \times 10^{-9}}{1.28 \times 10^{-19} \times 10^9} \\ &= 6.24 \end{aligned}$$
   or 8.0 dB.
2. **Noise current to reach.** The oscillator's shot noise must beat the 1.8 µA thermal noise by 10 dB:
   $$\sqrt{10} \times 1.8\ \mu\text{A} = 5.7\ \mu\text{A}$$
3. **Oscillator power.** Its shot noise is $\sqrt{2q\mathcal RP_\text{LO}B}$ with $\mathcal R$ = 1.0 A/W, so
   $$\begin{aligned} P_\text{LO} &= \frac{(5.7\ \mu\text{A})^2}{2q \times 1.0 \times 10^9} \\ &= 0.1\ \text{W} \end{aligned}$$
4. **In practice.** That's an uncomfortably large oscillator, so practical receivers balance their detectors and use low-noise amplifiers to need only a few milliwatts.

**Answer:** the shot-noise-limited SNR is 6.24 (8.0 dB), and beating the thermal noise by 10 dB takes a 0.1 W local oscillator.
:::
:::

::: example
## An FMCW lidar sweeps 1 GHz in 10 µs at 1550 nm. Find its range resolution, the beat frequency from a target 100 m away, and the Doppler shift if the target approaches at 30 m/s.

::: solution
1. **Range resolution.**
   $$\begin{aligned} \Delta R &= \frac{c}{2B} \\ &= 15\ \text{cm} \end{aligned}$$
2. **Beat frequency from 100 m.**
   $$\begin{aligned} f_b &= \frac{2RB}{cT} \\ &= \frac{2 \times 100 \times 10^9}{3 \times 10^8 \times 10^{-5}} \\ &= 66.7\ \text{MHz} \end{aligned}$$
3. **Doppler shift.**
   $$\begin{aligned} f_D &= \frac{2v}{\lambda} \\ &= 38.7\ \text{MHz} \end{aligned}$$
4. **Separating range and speed.** The shift moves the beat up on the falling half of a triangular chirp and down on the rising half; averaging the two gives range, differencing them gives speed.

**Answer:** the range resolution is 15 cm, the beat from 100 m is 66.7 MHz, and the Doppler shift is 38.7 MHz.
:::
:::

::: example
## A pulsed lidar uses 5 ns pulses. What range resolution does it have, and how long must it wait for an echo from 300 m?

::: solution
1. **Range resolution.**
   $$\begin{aligned} \Delta R &= \frac{c\tau}{2} \\ &= 0.75\ \text{m} \end{aligned}$$
2. **Echo delay.**
   $$\begin{aligned} t &= \frac{2R}{c} \\ &= 2.0\ \mu\text{s} \end{aligned}$$
   so it can fire at most 500 000 pulses a second without ambiguity.
3. **The trade-off.** Shorter pulses improve resolution but need more detection bandwidth, which brings more noise; FMCW gets fine resolution with a low-bandwidth detector by spreading the sweep in time.

**Answer:** the resolution is 0.75 m, and an echo from 300 m takes 2.0 µs to return.
:::
:::

::: check
kind: parts
given: P = 0.1 | 1 | 10; e = 0.6 | 0.9; l = 1064 | 1550; B = 0.1 | 1 | 10

## A shot-noise-limited heterodyne receiver at {l} nm (η = {e}) detects {P} nW over {B} GHz.

::: part
answer: e*P*1e-9/(6.62607015e-34*299792458/(l*1e-9)*B*1e9)
tolerance: 0.5%

### What is its signal-to-noise ratio (linear)?

::: misses
- [any] $\eta P_s/(h\nu B)$.
:::
:::

::: part
answer: 10*log(2*e*P*1e-9/(6.62607015e-34*299792458/(l*1e-9)*B*1e9))
unit: dB
tolerance: 0.5%

### What would homodyne detection of one quadrature give, in dB?

::: misses
- [any] 3 dB better.
:::
:::
:::

::: check
kind: parts
given: B = 0.3 | 1 | 4; T = 1 | 10 | 100; R = 10 | 150 | 1000

## An FMCW lidar sweeps {B} GHz in {T} µs and sees a target at {R} m.

::: part
answer: 299792458/(2*B*1e9)*100
unit: cm
tolerance: 0.5%

### What is its range resolution?

::: misses
- [299792458/(B*1e9)*100] Round trip: c/2B.
- [any] $c/2B$.
:::
:::

::: part
answer: 2*R*B*1e9/(299792458*T*1e-6)/1e6
unit: MHz
tolerance: 0.5%

### At what frequency does the echo beat?

::: misses
- [any] $2RB/(cT)$.
:::
:::
:::

::: check
kind: parts
given: v = 1 | 30 | 300; l = 905 | 1064 | 1550

## A target approaches a coherent lidar at {v} m/s; the lidar works at {l} nm.

::: part
answer: 2*v/(l*1e-9)/1e6
unit: MHz
tolerance: 0.5%

### What Doppler shift does the echo carry?

::: misses
- [v/(l*1e-9)/1e6] The light's path shortens at twice the target's speed.
- [any] $2v/\lambda$.
:::
:::
:::

::: check
kind: parts
given: t = 1 | 5 | 20; R = 50 | 300 | 2000

## A pulsed lidar uses {t} ns pulses to reach targets up to {R} m.

::: part
answer: 299792458*t*1e-9/2
unit: m
tolerance: 0.5%

### What is its range resolution?

::: misses
- [any] $c\tau/2$.
:::
:::

::: part
answer: 299792458/(2*R)/1e3
unit: kHz
tolerance: 0.5%

### What is the highest pulse rate without range ambiguity?

::: misses
- [any] $c/2R$.
:::
:::
:::

::: check
kind: parts
given: s = 1 | 10 | 100; o = 1 | 10; r = 0.8 | 1

## A {s} nW signal and a {o} mW local oscillator fall on a detector of {r} A/W.

::: part
answer: 2*r*sqrt(s*1e-9*o*1e-3)*1e6
unit: µA
tolerance: 0.5%

### What is the beat note's peak amplitude?

::: misses
- [r*s*1e-9*1e6] Mixing multiplies by $2\sqrt{P_\text{LO}/P_s}$.
- [any] $2\mathcal R\sqrt{P_sP_\text{LO}}$.
:::
:::
:::

::: check
kind: choice

## Why does a strong local oscillator make a coherent receiver shot-noise limited, however noisy its electronics?

- [ ] It cancels the thermal noise
- [x] The beat signal grows with the square root of the oscillator power, and so does the oscillator's own shot noise, while the electronics' thermal noise stays fixed; with enough oscillator power, both signal and dominant noise scale together and their ratio reaches the shot-noise limit
- [ ] It cools the photodiode
- [ ] It narrows the bandwidth

::: misses
- [1] The thermal noise is still there, just outweighed.
- [3] Temperature isn't involved.
- [4] Bandwidth is set by the electronics.
:::
:::

::: check
kind: derivation
vars: e = 0.1..1, P = 0.000000000001..0.000001, l = 0.0000008..0.000002, B = 1000000..10000000000, R = 1..10000, W = 10000000..10000000000, T = 0.000001..0.001

## A heterodyne receiver (η = e, wavelength l, bandwidth B) detects power P; separately, an FMCW lidar sweeps W hertz in T seconds to a target at R meters.

::: step
answer: e*P*l/(6.62607015e-34*299792458*B)

### What is the receiver's shot-noise-limited SNR?
:::

::: step
answer: 2*R*W/(299792458*T)

### What beat frequency does the lidar see?
:::

::: right
Right. Coherent detection counts photons per detection interval; FMCW turns range into frequency.
:::
:::

::: check
kind: python

## Write `fmcw_beat(R, B, T, v, lam, up)`: the beat frequency of an FMCW lidar (sweep B over T) for a target at range R approaching at speed v, on the rising (up = True) or falling half of a triangular chirp (the Doppler shift lowers the rising-half beat and raises the falling-half one); and `range_speed(f_up, f_down, B, T, lam)`: recover (R, v) from the two beats.

```python starter
def fmcw_beat(R, B, T, v, lam, up):
    return 0.0

def range_speed(f_up, f_down, B, T, lam):
    return 0.0, 0.0
```

```python solution
C = 299792458.0

def fmcw_beat(R, B, T, v, lam, up):
    fr = 2 * R * B / (C * T)
    fd = 2 * v / lam
    return fr - fd if up else fr + fd

def range_speed(f_up, f_down, B, T, lam):
    fr = (f_up + f_down) / 2
    fd = (f_down - f_up) / 2
    return fr * C * T / (2 * B), fd * lam / 2
```

```python tests
fu = fmcw_beat(100, 1e9, 10e-6, 30, 1550e-9, True)
fd = fmcw_beat(100, 1e9, 10e-6, 30, 1550e-9, False)
assert abs((fu + fd) / 2 - 66.71e6) < 0.01e6 and abs((fd - fu) / 2 - 38.71e6) < 0.01e6, "66.7 MHz from range, 38.7 MHz from Doppler."
R, v = range_speed(fu, fd, 1e9, 10e-6, 1550e-9)
assert abs(R - 100) < 1e-9 and abs(v - 30) < 1e-9, "Both recovered exactly."
```

::: right
Right. The triangular chirp separates range and velocity because the Doppler shift has the same sign on both halves while the range beat swaps.
:::
:::

::: explain
## How does an FMCW lidar measure distance with a slow photodetector, when a pulsed lidar with the same resolution needs a fast one?

::: model
A pulsed lidar measures the echo's delay directly, so its resolution is set by how short a pulse the detector can follow. An FMCW lidar instead sweeps its laser's frequency linearly in time and mixes the returning echo with the light it's sending at that moment. Because the echo left earlier, it's at a slightly different frequency, and the difference is proportional to the delay, so range becomes a beat frequency of megahertz that slow electronics can measure precisely. The resolution comes from the total swept bandwidth, not from the detector's speed, and the coherent mixing also measures the target's velocity from its Doppler shift.
:::
:::

::: practice
::: check
given: B = 0.25 | 0.5 | 1 | 2 | 4 | 8
answer: 299792458/(2*B*1e9)*100
unit: cm
tolerance: 0.5%

## FMCW range resolution at {B} GHz?

::: misses
- [any] $c/2B$.
:::
:::

::: check
given: v = 5 | 50; l = 1064 | 1550
answer: 2*v/(l*1e-9)/1e6
unit: MHz
tolerance: 0.5%

## Doppler shift: {v} m/s at {l} nm?

::: misses
- [any] $2v/\lambda$.
:::
:::

::: check
given: P = 0.5 | 5; B = 0.5 | 2
answer: 0.8*P*1e-9/(6.62607015e-34*299792458/1550e-9*B*1e9)
tolerance: 0.5%

## Heterodyne SNR: {P} nW, {B} GHz, η 0.8, 1550 nm?

::: misses
- [any] $\eta P/(h\nu B)$.
:::
:::
:::
