---
title: "Semiconductor photonics lab: lasers, receivers and APDs"
heading: A laser diode's output against current and temperature, a receiver's Q factor and sensitivity with thermal and shot noise, the avalanche gain that maximizes Q, and how much light escapes an LED chip
eyebrow: S13 · Lesson 37 · Semiconductor photonics lab
xp: 60
---

::: hook
A fiber link's two ends are semiconductor devices: a laser diode whose output drifts with temperature, and a photodiode whose signal must beat its receiver's noise. Lessons 32 to 36 gave the pieces. In this lab you'll put them together as a link engineer would: compute the laser's output at the hottest operating temperature, find the received power a p-i-n receiver needs for a 10⁻⁹ error rate, then find the avalanche gain that does best, which turns out to depend strongly on the APD's material.
:::

::: play
- The curves are a 10 Gb/s receiver's Q factor against avalanche gain M, at −25 dBm received, with 1.82 µA of thermal noise and a responsivity of 1 A/W, for two ionization ratios: k = 0.5 (InP-based) and k = 0.02 (silicon-like).
- Q rises with gain while thermal noise dominates, then falls as the excess noise grows.
- The quiet APD (small k) peaks at a higher gain and a much higher Q.
:::

```sim plot
view: graph
x: M = 1..100 log
y: Q = 0..25
plot: 2*M*10^(-2.5)*1e-3/(sqrt((1.82e-6)^2 + 2*1.602e-19*M^2*(0.5*M + 0.5*(2 - 1/M))*2*10^(-2.5)*1e-3*1e10) + 1.82e-6) | label: k = 0.5
plot: 2*M*10^(-2.5)*1e-3/(sqrt((1.82e-6)^2 + 2*1.602e-19*M^2*(0.02*M + 0.98*(2 - 1/M))*2*10^(-2.5)*1e-3*1e10) + 1.82e-6) | dashed | label: k = 0.02
```

::: predict
## A 10 Gb/s p-i-n receiver (1 A/W, 1.82 µA of thermal noise) must reach a bit error rate of 10⁻⁹. Roughly what average received power does it need?

- [ ] About −50 dBm, near the quantum limit
- [ ] About −35 dBm
- [x] About −20 dBm
- [ ] About 0 dBm

::: reveal
Q = 6 needs the "1" level's photocurrent, $2\mathcal RP$, to be six times the sum of the noise on the two levels, which is dominated by thermal noise: about 11 µW, −19.6 dBm. That's 29 dB worse than the quantum limit of lesson 24, the gap APDs and optical preamplifiers close.
:::
:::

::: nameit
## What the lab computes

- **Laser output**: above threshold, $P = \eta_s(I - I_\text{th})$ with $I_\text{th}(T) = I_0e^{T/T_0}$, here written as $I_\text{th}(T) = I_\text{th}(25°\text{C})\,e^{(T - 25)/T_0}$.
- **Receiver Q**: for on–off keying with average power P (ideal extinction), the "1" photocurrent is $I_1 = 2\mathcal RMP$ and the "0" is zero. With thermal noise $\sigma_\text{th}$ and the signal's shot noise multiplied by the APD's gain and excess noise,
$$\sigma_1 = \sqrt{\sigma_\text{th}^2 + 2qM^2F(M)(2\mathcal RP)B}, \qquad \sigma_0 = \sigma_\text{th}, \qquad Q = \frac{I_1}{\sigma_1 + \sigma_0}$$
with $F(M) = kM + (1 - k)(2 - 1/M)$ (M = 1 for a p-i-n), and BER = $\frac12\text{erfc}(Q/\sqrt2)$.
- **LED extraction**: the escape cone's share $(1 - \cos\theta_c)/2$ times the normal-incidence Fresnel transmission $4n/(n + 1)^2$, a first estimate for a flat chip.
:::

::: check
kind: python

## Write `laser_power(I, Ith25, T0, T, slope)`: the output power (W) at current I (A) and temperature T (°C), zero below threshold.

```python starter
def laser_power(I, Ith25, T0, T, slope):
    return slope * I
```

```python solution
import math

def laser_power(I, Ith25, T0, T, slope):
    Ith = Ith25 * math.exp((T - 25) / T0)
    return max(0.0, slope * (I - Ith))
```

```python tests
assert abs(laser_power(0.05, 0.01, 60, 25, 0.287) - 11.48e-3) < 1e-6, "Lesson 34's laser at 25 °C: 11.5 mW per facet."
assert abs(laser_power(0.05, 0.01, 60, 85, 0.287) - 6.55e-3) < 1e-5, "At 85 °C: 6.5 mW."
assert laser_power(0.02, 0.01, 60, 85, 0.287) == 0.0, "20 mA is below the hot threshold of 27 mA."
```

::: right
Right. Transmitters hold their power constant over temperature with a monitor photodiode and feedback, or with a thermoelectric cooler.
:::
:::

::: check
kind: python

## Write `q_factor(P, R, sigma_th, B, M=1, k=0)` and `sensitivity(R, sigma_th, B, Q=6, M=1, k=0)`: the average power (W) giving that Q, by bisection on a log scale.

```python starter
def q_factor(P, R, sigma_th, B, M=1, k=0):
    return 0.0

def sensitivity(R, sigma_th, B, Q=6, M=1, k=0):
    return 0.0
```

```python solution
import math

QE = 1.602176634e-19

def q_factor(P, R, sigma_th, B, M=1, k=0):
    F = k * M + (1 - k) * (2 - 1 / M) if M > 1 else 1.0
    I1 = 2 * R * P * M
    s1 = math.sqrt(sigma_th ** 2 + 2 * QE * M * M * F * (2 * R * P) * B)
    return I1 / (s1 + sigma_th)

def sensitivity(R, sigma_th, B, Q=6, M=1, k=0):
    lo, hi = 1e-12, 1.0
    for _ in range(200):
        m = math.sqrt(lo * hi)
        if q_factor(m, R, sigma_th, B, M, k) < Q:
            lo = m
        else:
            hi = m
    return math.sqrt(lo * hi)
```

```python tests
import math
P = sensitivity(1.0, 1.82e-6, 10e9)
assert abs(10 * math.log10(P / 1e-3) + 19.59) < 0.02, "p-i-n at 10 Gb/s: −19.6 dBm."
assert abs(0.5 * math.erfc(6 / math.sqrt(2)) - 9.87e-10) < 1e-11, "Q = 6: about 10⁻⁹."
P10 = sensitivity(1.0, 1.82e-6, 10e9, M=10, k=0.5)
assert 10 * math.log10(P / P10) > 8, "An APD at M = 10 gains over 8 dB."
```

::: right
Right. A thermal-noise-limited receiver's sensitivity is set by its electronics, which is what avalanche gain attacks.
:::
:::

::: check
kind: python

## Write `best_gain(P, R, sigma_th, B, k)`: the avalanche gain (searched from 1 to 200 in steps of 0.1) that maximizes Q, returning (M, Q).

```python starter
def best_gain(P, R, sigma_th, B, k):
    return 1.0, 0.0
```

```python solution
import math

QE = 1.602176634e-19

def q_factor(P, R, sigma_th, B, M, k):
    F = k * M + (1 - k) * (2 - 1 / M) if M > 1 else 1.0
    s1 = math.sqrt(sigma_th ** 2 + 2 * QE * M * M * F * (2 * R * P) * B)
    return 2 * R * P * M / (s1 + sigma_th)

def best_gain(P, R, sigma_th, B, k):
    best = (1.0, q_factor(P, R, sigma_th, B, 1.0, k))
    for i in range(11, 2001):
        M = i / 10
        q = q_factor(P, R, sigma_th, B, M, k)
        if q > best[1]:
            best = (M, q)
    return best
```

```python tests
P = 10 ** (-2.5) * 1e-3
M1, Q1 = best_gain(P, 1.0, 1.82e-6, 10e9, 0.5)
M2, Q2 = best_gain(P, 1.0, 1.82e-6, 10e9, 0.02)
assert abs(M1 - 14.0) < 0.2 and abs(Q1 - 11.45) < 0.02, "k = 0.5: best at M ≈ 14, Q = 11.5."
assert abs(M2 - 49.9) < 0.5 and abs(Q2 - 22.33) < 0.05, "k = 0.02: best at M ≈ 50, Q = 22.3."
```

::: right
Right. Low-k materials can run at high gain without their excess noise swamping the benefit, which is why silicon APDs reach such good sensitivity at short wavelengths.
:::
:::

::: check
kind: python

## Write `led_extraction(n)`: the fraction of internally generated light leaving a flat chip's top face, as escape cone times normal-incidence Fresnel transmission.

```python starter
def led_extraction(n):
    return 1.0
```

```python solution
import math

def led_extraction(n):
    tc = math.asin(1 / n)
    return (1 - math.cos(tc)) / 2 * 4 * n / (n + 1) ** 2
```

```python tests
assert abs(led_extraction(3.6) - 0.01339) < 1e-5, "GaAs: about 1.3%."
assert led_extraction(2.5) > led_extraction(3.6), "Lower-index chips (like GaN at 2.5) lose less."
```

::: right
Right. With so little escaping a flat chip, extraction, more than internal efficiency, was long the limit on LED brightness.
:::
:::

::: explain
## Why is there an optimum avalanche gain for an APD receiver, and why is it higher for silicon than for InP-based devices?

::: model
Avalanche gain multiplies the photocurrent and its shot noise together, but not the receiver's thermal noise, so at low gain raising M improves the signal-to-noise ratio. The multiplication process is itself random, though, adding an excess noise factor that grows with gain; once the multiplied shot noise approaches the thermal noise, further gain adds noise faster than signal and Q falls. The excess noise grows with the ratio k of the two carriers' ionization rates: in silicon, electrons ionize far more readily than holes, k is about 0.02 and the excess noise stays small to high gains, while InP-based APDs with k near 0.5 reach their optimum at modest gains.
:::
:::
