---
title: Bragg gratings and coupled modes
heading: Periodic index changes along a waveguide: the Bragg condition, coupled-mode theory's coupling coefficient, peak reflectance and bandwidth of a uniform grating, and fiber Bragg gratings as filters and strain and temperature sensors
eyebrow: S13 · Lesson 19 · Bragg gratings and coupled modes
xp: 50
---

::: hook
Lesson 21's multilayer mirror stacks quarter-wave layers to reflect one band of wavelengths. Write the same idea into the core of a fiber as a faint ripple of refractive index, a part in ten thousand, a few thousand periods long, and you get a fiber Bragg grating: a mirror for one wavelength that passes all others, built into the fiber itself. Gratings select channels in WDM systems, stabilize lasers, compensate dispersion, and, because their wavelength shifts with strain and temperature, they're among the most widely used optical sensors.
:::

::: play
- The curve is the reflectance of a uniform fiber Bragg grating against wavelength around 1550 nm, for a 10 mm grating with the index modulation on the slider, from coupled-mode theory: $R = \sinh^2(sL)/(\cosh^2(sL) - \sigma^2/\kappa^2)$ with $s^2 = \kappa^2 - \sigma^2$.
- Stronger modulation raises the peak toward 100% ($\tanh^2\kappa L$) and widens the band.
- Outside the main band the reflectance has small side lobes, which apodized gratings suppress by tapering the modulation.
:::

```sim plot
view: graph
x: d = -0.4..0.4
y: R = 0..1
slider: n = 0.2..3 = 1
plot: abs(sinh(sqrt((pi*n*1e-4/1550e-9)^2 - (2*pi*1.447*(1/(1550e-9 + d*1e-9) - 1/1550e-9))^2 + 1e-12)*0.01)^2/(cosh(sqrt((pi*n*1e-4/1550e-9)^2 - (2*pi*1.447*(1/(1550e-9 + d*1e-9) - 1/1550e-9))^2 + 1e-12)*0.01)^2 - (2*pi*1.447*(1/(1550e-9 + d*1e-9) - 1/1550e-9))^2/(pi*n*1e-4/1550e-9)^2)) | label: reflectance (index step × 10⁻⁴), against detuning in nm
```

::: predict
## A fiber Bragg grating at 1550 nm is stretched by a strain of 1000 µε (0.1%). How far does its reflection wavelength move?

- [ ] 1.55 nm, in proportion to the stretch
- [x] About 1.2 nm, a little less, because stretching also lowers the index
- [ ] Not at all: the period and index cancel
- [ ] About 15 nm

::: reveal
Stretching lengthens the period by 0.1%, which alone would move the wavelength 1.55 nm, but the photoelastic effect lowers the effective index by about 22% as much, so the shift is $(1 - p_e)\varepsilon\lambda = 0.78 \times 10^{-3} \times 1550$ nm = 1.21 nm: about 1.2 pm per microstrain, easily resolved by an interrogator.
:::
:::

::: nameit
## The Bragg condition

A periodic index change of period Λ along a guide with effective index $n_\text{eff}$ couples the forward mode into the backward one where their phase mismatch vanishes:
$$\lambda_B = 2n_\text{eff}\Lambda$$
Each period's small reflection adds in phase at $\lambda_B$, as in a quarter-wave stack.

## Coupled modes

Writing the field as a forward and a backward mode whose amplitudes change slowly along z, the grating couples them with coefficient
$$\kappa = \frac{\pi\,\delta n}{\lambda}$$
for an index modulation of amplitude δn filling the mode (a fraction η of it overlapping the mode multiplies κ by η). With detuning $\sigma = 2\pi n_\text{eff}(1/\lambda - 1/\lambda_B)$ and $s^2 = \kappa^2 - \sigma^2$, a uniform grating of length L reflects
$$R = \frac{\sinh^2(sL)}{\cosh^2(sL) - \sigma^2/\kappa^2}$$
with a peak of $\tanh^2(\kappa L)$ and a band whose first zeros are
$$\Delta\lambda_0 = \frac{\lambda_B^2}{\pi n_\text{eff}L}\sqrt{(\kappa L)^2 + \pi^2}$$
apart. Weak gratings ($\kappa L \ll \pi$) have a bandwidth set by their length; strong ones by κ.

## Sensing

Strain ε and temperature change ΔT move the Bragg wavelength:
$$\frac{\Delta\lambda_B}{\lambda_B} = (1 - p_e)\varepsilon + (\alpha + \xi)\Delta T$$
with photoelastic constant $p_e \approx 0.22$ in silica and $\alpha + \xi \approx 6.7 \times 10^{-6}$/K (expansion plus thermo-optic): about 1.2 pm/µε and 10 pm/K at 1550 nm.
:::

::: example
## Design a 10 mm fiber Bragg grating at 1550 nm ($n_\text{eff}$ = 1.447) with an index modulation of 1 × 10⁻⁴. Find its period, coupling coefficient, peak reflectance and bandwidth.

::: solution
1. **Grating period.**
   $$\begin{aligned} \Lambda &= \frac{1550\ \text{nm}}{2 \times 1.447} \\ &= 535.6\ \text{nm} \end{aligned}$$
2. **Coupling coefficient.**
   $$\begin{aligned} \kappa &= \frac{\pi \times 10^{-4}}{1550\ \text{nm}} \\ &= 202.7\ \text{per m} \end{aligned}$$
   so κL = 2.03.
3. **Peak reflectance.**
   $$\tanh^2 2.03 = 93.3\%$$
4. **Bandwidth.** The first zeros are
   $$\begin{aligned} \Delta\lambda &= \frac{(1550\ \text{nm})^2}{\pi \times 1.447 \times 10\ \text{mm}} \\ &\quad \times \sqrt{2.03^2 + \pi^2} \\ &= 0.198\ \text{nm} \end{aligned}$$
   apart, narrower than a 50 GHz (0.4 nm) WDM channel spacing.

**Answer:** the period is 535.6 nm, κ = 202.7 per meter, the peak reflectance 93.3% and the bandwidth 0.198 nm between the first zeros.
:::
:::

::: example
## A 1550 nm grating sensor is bonded to a steel beam. Its wavelength rises 0.6 nm while the temperature rises 5 K. What strain does the beam see?

::: solution
1. **Temperature's share.**
   $$5 \times 10.4\ \text{pm} = 52\ \text{pm}$$
2. **Strain's share.**
   $$600 - 52 = 548\ \text{pm}$$
3. **Strain.** At 1.21 pm/µε,
   $$\frac{548}{1.21} = 453\ \mu\varepsilon$$
4. **In practice.** A second, unstrained grating beside the first measures the temperature shift directly, because errors in the temperature coefficient would otherwise appear as strain.

**Answer:** the beam sees about 453 µε.
:::
:::

::: example
## How long must a grating with δn = 5 × 10⁻⁴ be to reflect 99.9% at 1550 nm, and how wide is its band?

::: solution
1. **Required κL.**
   $$\tanh^2(\kappa L) = 0.999$$
   needs κL = 4.15.
2. **Coupling coefficient.**
   $$\begin{aligned} \kappa &= \frac{\pi \times 5 \times 10^{-4}}{1550\ \text{nm}} \\ &= 1013\ \text{per m} \end{aligned}$$
3. **Length.**
   $$\begin{aligned} L &= \frac{4.15}{1013\ \text{per m}} \\ &= 4.1\ \text{mm} \end{aligned}$$
4. **Bandwidth.**
   $$\begin{aligned} \Delta\lambda &= \frac{(1550\ \text{nm})^2}{\pi \times 1.447 \times 4.1\ \text{mm}} \\ &\quad \times \sqrt{4.15^2 + \pi^2} \\ &= 0.67\ \text{nm} \end{aligned}$$
5. **What sets it.** A strong grating's band is set by κ, about
   $$\frac{\lambda^2\kappa}{\pi n} = 0.54\ \text{nm}$$
   plus a little from the length.

**Answer:** the grating must be about 4.1 mm long, and its band is 0.67 nm wide.
:::
:::

::: check
kind: parts
given: l = 1310 | 1550; n = 1.445 | 1.468; d = 0.3 | 1 | 3; L = 2 | 10 | 30

## A uniform fiber Bragg grating at {l} nm in a fiber with $n_\text{eff}$ = {n} has an index modulation of {d} × 10⁻⁴ over {L} mm.

::: part
answer: l/(2*n)
unit: nm
tolerance: 0.5%

### What is its period?

::: misses
- [l/n] Bragg reflection needs half a guided wavelength per period.
- [any] $\lambda_B/(2n_\text{eff})$.
:::
:::

::: part
answer: tanh(pi*d*1e-4/(l*1e-9)*L*1e-3)^2*100
unit: %
tolerance: 0.5%

### What is its peak reflectance?

::: misses
- [any] $\tanh^2(\kappa L)$ with $\kappa = \pi\delta n/\lambda$.
:::
:::

::: part
answer: (l*1e-9)^2/(pi*n*L*1e-3)*sqrt((pi*d*1e-4/(l*1e-9)*L*1e-3)^2 + pi^2)*1e9
unit: nm
tolerance: 0.5%

### How far apart are the band's first zeros?

::: misses
- [any] $\frac{\lambda_B^2}{\pi n_\text{eff}L}\sqrt{(\kappa L)^2 + \pi^2}$.
:::
:::
:::

::: check
kind: parts
given: l = 1310 | 1550; e = 100 | 500 | 2000; t = 0 | 10 | 40

## A Bragg grating sensor at {l} nm sees a strain of {e} µε and a temperature rise of {t} K.

::: part
answer: 0.78*e*1e-6*l*1e3 + 6.7e-6*t*l*1e3
unit: pm
tolerance: 0.5%

### How far does its wavelength shift?

::: misses
- [e*1e-6*l*1e3 + 6.7e-6*t*l*1e3] The photoelastic effect reduces the strain response to 0.78.
- [any] $\lambda[(1 - p_e)\varepsilon + (\alpha + \xi)\Delta T]$.
:::
:::
:::

::: check
kind: parts
given: R = 0.9 | 0.99 | 0.999; l = 1064 | 1550; d = 0.5 | 2 | 5

## A grating at {l} nm must reflect {R} with an index modulation of {d} × 10⁻⁴.

::: part
answer: 0.5*ln((1 + sqrt(R))/(1 - sqrt(R)))
tolerance: 0.5%

### What κL does it need?

::: misses
- [any] $\tanh^{-1}\sqrt R$.
:::
:::

::: part
answer: 0.5*ln((1 + sqrt(R))/(1 - sqrt(R)))/(pi*d*1e-4/(l*1e-9))*1e3
unit: mm
tolerance: 0.5%

### How long must it be?

::: misses
- [any] κL over κ.
:::
:::
:::

::: check
kind: parts
given: L = 300 | 500 | 1060; n = 1.45 | 3.2

## A waveguide of effective index {n} carries a grating of period {L} nm.

::: part
answer: 2*n*L
unit: nm
tolerance: 0.5%

### At what wavelength does it reflect (first order)?

::: misses
- [n*L] Twice the effective index times the period.
- [any] $2n_\text{eff}\Lambda$.
:::
:::
:::

::: check
kind: choice

## Why is a weak (κL ≪ 1) grating's bandwidth set by its length, while a strong one's is set by its coupling coefficient?

- [ ] Strong gratings are shorter
- [x] A weak grating's reflection is the sum of small reflections from every period, and its spectrum is the Fourier transform of its length, narrowing as it grows; in a strong grating the light is reflected within a distance of about 1/κ, so the effective length, and with it the bandwidth, is set by κ
- [ ] Bandwidth is always set by length
- [ ] Strong gratings have a different period

::: misses
- [1] Length is a free design choice either way.
- [3] Very strong gratings' bands stop narrowing with length.
- [4] The period sets the center, not the width.
:::
:::

::: check
kind: derivation
vars: d = 0.00001..0.001, l = 0.0000008..0.0000017, L = 0.001..0.05, n = 1.4..1.5

## A uniform grating with index modulation d, at wavelength l, has length L and effective index n.

::: step
answer: pi*d/l

### What is κ?
:::

::: step
answer: tanh(pi*d/l*L)^2

### What is the peak reflectance?
:::

::: step
answer: l^2/(pi*n*L)*sqrt((pi*d/l*L)^2 + pi^2)

### What is the width between first zeros?
:::

::: right
Right. κL sets the peak; length and κ together set the width.
:::
:::

::: check
kind: python

## Write `fbg_reflectance(lam, lamB, n, dn, L)`: a uniform grating's reflectance at wavelength lam from the coupled-mode formula (use complex arithmetic so it works on both sides of the band edge), and `first_zero(lamB, n, dn, L)`: the first wavelength above lamB where the reflectance falls to zero, found by scanning in 0.1 pm steps.

```python starter
def fbg_reflectance(lam, lamB, n, dn, L):
    return 0.0

def first_zero(lamB, n, dn, L):
    return lamB
```

```python solution
import cmath, math

def fbg_reflectance(lam, lamB, n, dn, L):
    k = math.pi * dn / lamB
    sig = 2 * math.pi * n * (1 / lam - 1 / lamB)
    s = cmath.sqrt(k * k - sig * sig)
    return abs(cmath.sinh(s * L) ** 2 / (cmath.cosh(s * L) ** 2 - sig * sig / (k * k)))

def first_zero(lamB, n, dn, L):
    lam = lamB
    prev = fbg_reflectance(lam, lamB, n, dn, L)
    while True:
        lam += 1e-13
        r = fbg_reflectance(lam, lamB, n, dn, L)
        if r > prev and prev < 1e-3:
            return lam - 1e-13
        prev = r
```

```python tests
import math
R0 = fbg_reflectance(1550e-9, 1550e-9, 1.447, 1e-4, 0.01)
assert abs(R0 - math.tanh(math.pi * 1e-4 / 1550e-9 * 0.01) ** 2) < 1e-9 and abs(R0 - 0.933) < 5e-4, "The peak is tanh²(κL): 93.3%."
z = first_zero(1550e-9, 1.447, 1e-4, 0.01)
assert abs(2 * (z - 1550e-9) - 0.1976e-9) < 0.0005e-9, "The band's first zeros are 0.198 nm apart."
assert fbg_reflectance(1551e-9, 1550e-9, 1.447, 1e-4, 0.01) < 1e-3, "A nanometer away it reflects almost nothing."
```

::: right
Right. The same formula with an imaginary s describes the side lobes outside the band.
:::
:::

::: explain
## How does a fiber Bragg grating measure strain?

::: model
The grating reflects the wavelength at which light reflected from successive periods adds in phase, twice the effective index times the period. Stretching the fiber lengthens the period, raising that wavelength, while the photoelastic effect lowers the index slightly, partly offsetting the increase. The net shift, about 1.2 picometers per microstrain at 1550 nm, is read by sending broadband or swept light down the fiber and finding the reflected peak. Because many gratings with different wavelengths can share one fiber, a single fiber can measure strain at dozens of points along a bridge or wing; temperature, which also shifts the wavelength, is separated with an unstrained reference grating.
:::
:::

::: practice
::: check
given: L = 400 | 535; n = 1.45 | 1.47
answer: 2*n*L
unit: nm
tolerance: 0.5%

## Bragg wavelength: period {L} nm, $n_\text{eff}$ {n}?

::: misses
- [any] $2n_\text{eff}\Lambda$.
:::
:::

::: check
given: d = 0.5 | 2; L = 5 | 20
answer: tanh(pi*d*1e-4/(1550e-9)*L*1e-3)^2*100
unit: %
tolerance: 0.5%

## Peak reflectance: δn {d} × 10⁻⁴, {L} mm, 1550 nm?

::: misses
- [any] $\tanh^2(\kappa L)$.
:::
:::

::: check
given: e = 200 | 1500; t = 5 | 30
answer: 0.78*e*1e-6*1550e3 + 6.7e-6*t*1550e3
unit: pm
tolerance: 0.5%

## Shift at 1550 nm: {e} µε, {t} K?

::: misses
- [any] $\lambda[(1 - p_e)\varepsilon + (\alpha + \xi)\Delta T]$.
:::
:::
:::
