CodingBox Documentation

Formulas and worked calculations

The arithmetic of a fibre link fits on one page: decibels, attenuation, the guidance parameters that decide single-mode or multimode, dispersion, the link budget, reflections, the OTDR's conversion of time into distance, latency, and the mechanics of bending and tension. Each formula comes with a worked example using the numbers from the cheat sheet.

Decibels and power

FormulaMeaning
P [dBm] = 10 · log₁₀ (P [mW] / 1 mW)absolute power; 0 dBm = 1 mW
P [mW] = 10^(P [dBm] / 10)back to milliwatts
Loss [dB] = P_in [dBm] − P_out [dBm]a ratio expressed in decibels; ratio = 10^(loss / 10)
P_total [dBm] = 10 · log₁₀ Σ 10^(P_i / 10)powers add in milliwatts, never in dBm
3 dB ≈ × 2; 10 dB = × 10; 1 dB ≈ 26 %; 0.1 dB ≈ 2.3 %mental arithmetic

Example: a transmitter at −8.2 dBm through 6.2 dB of loss arrives at −14.4 dBm = 0.036 mW. Two DWDM channels at −3 dBm each total 0 dBm, not −6 dBm.

Attenuation

FormulaMeaning
α [dB/km] = (10 / L) · log₁₀ (P_in / P_out)attenuation coefficient from a cutback or OTDR measurement
α(λ₂) / α(λ₁) ≈ (λ₁ / λ₂)⁴Rayleigh scattering falls with the fourth power of wavelength
A_total = α · L + N_c · L_c + N_s · L_s + L_componentsloss of the whole plant: fibre, connector pairs, splices, splitters and filters

Example: (1310 / 1550)⁴ = 0.51, so 0.33 dB/km at 1310 nm scales to 0.17 dB/km of scattering at 1550 nm; absorption adds the rest to the real 0.19 dB/km (Attenuation & windows).

Guidance: numerical aperture, V-number, modes, cutoff, mode field

FormulaMeaning
NA = √(n₁² − n₂²) = n₀ · sin θ_maxnumerical aperture from the core and cladding indices
V = 2π · a · NA / λnormalized frequency for core radius a
single-mode when V < 2.405above it the second mode group propagates
λ_c = 2π · a · NA / 2.405cutoff wavelength
N_modes ≈ V² / 2 (step index), ≈ V² / 4 (graded index)number of guided modes in multimode fibre
w / a ≈ 0.65 + 1.619 · V^−1.5 + 2.879 · V^−6Marcuse approximation; MFD = 2 · w

Examples: n₁ = 1.4675, n₂ = 1.4625 → NA = √(2.1536 − 2.1389) = 0.121. With a = 4.1 µm and NA = 0.12 the cutoff is λ_c = 2π · 4.1 · 0.12 / 2.405 = 1.285 µm — single-mode at 1310 nm and above. At 1310 nm V = 2.36 and w / a = 1.113, so the MFD is 9.1 µm. A 50 µm multimode fibre with NA 0.20 at 850 nm has V = 37 and about 340 guided modes (How light propagates).

Dispersion

FormulaMeaning
Δτ = D · L · Δλchromatic pulse spreading, with D taken as an absolute value: D in ps/(nm·km), L in km, source width Δλ in nm
L_max = CD_tolerance / Ddispersion-limited reach from the transceiver's tolerance (D as an absolute value)
D(λ) = (S₀ / 4) · (λ − λ₀⁴ / λ³)dispersion of G.652 fibre from the zero-dispersion wavelength λ₀ and slope S₀
DGD_mean = PMD_coef · √Lpolarization mode dispersion grows with the square root of length
DGD_max ≈ 3 · DGD_meanthe rare worst case the system must survive
BW_link = EMB / Lmodal bandwidth of a multimode link from the fibre's MHz·km rating

Examples: a DFB laser with Δλ = 0.1 nm over 80 km of G.652 (D = 17) spreads by 136 ps — acceptable for 10G; a Fabry-Pérot laser with Δλ = 1 nm spreads by 1 360 ps and cannot carry 10G over that distance. A 10G module tolerating 1 600 ps/nm reaches 1 600 / 17 = 94 km on G.652. With λ₀ = 1310 nm and S₀ = 0.086 ps/(nm²·km): D(1550) = 0.0215 · (1550 − 790.8) = 16.3 ps/(nm·km). A fibre with 0.1 ps/√km over 400 km has DGD_mean = 2 ps; with a 10 ps limit for 10G the reach is (10 / 0.1)² = 10 000 km, but 1980s fibre at 1 ps/√km allows only (10 / 1)² = 100 km. OM3 (2 000 MHz·km) over 300 m gives 6.7 GHz of modal bandwidth (Dispersion & bandwidth).

FormulaMeaning
PB = P_tx,min − P_rx,sensitivitythe power budget of the transceiver pair
Loss = α · L + N_c · L_c + N_s · L_s + L_components + penaltieseverything the plant and the physics take
Margin = PB − Loss ≥ 3 dBthe design rule; 2 dB minimum on short well-documented links
P_rx,max = P_tx,max − Loss_min ≤ P_overloadthe overload check on short links
L_splitter = 10 · log₁₀ N + excess (0.5–1.5 dB)ideal splitter loss plus excess

Examples: 10GBASE-LR, −8.2 dBm minimum launch, −14.4 dBm sensitivity → PB = 6.2 dB. A 10 km link with 4 connector pairs and 4 splices: 10 · 0.35 + 4 · 0.3 + 4 · 0.05 + 0.5 penalty = 5.4 dB → margin 0.8 dB, too little; measure the plant or use ER. A 10GBASE-ER module at +4 dBm on a 2 km link with 1.5 dB of loss delivers +2.5 dBm into a receiver rated for −1 dBm overload — a 5 dB attenuator is needed. A 1:32 splitter loses 15.05 + 1.5 = 16.5 dB (Link budget).

Reflections

FormulaMeaning
R = ((n₁ − n₂) / (n₁ + n₂))²Fresnel reflection at an index step
Reflectance [dB] = 10 · log₁₀ Rnegative for a fraction below 1
R_event = K_τ + 10 · log₁₀ (10^(H/5) − 1)OTDR reflectance from the spike height H above the backscatter and the backscatter coefficient K_τ
K_τ = K_1ns + 10 · log₁₀ (τ / 1 ns)backscatter coefficient for the pulse width used
ORL [dB] = −10 · log₁₀ Σ 10^(R_i / 10)return loss of the link from the reflectances of its events and the Rayleigh floor

Examples: glass to air, n = 1.468 → R = 0.0359 → −14.4 dB. At 1550 nm K_1ns = −82 dB; with a 1 µs pulse K = −52 dB; a spike of H = 3 dB gives R = −52 + 10 · log₁₀(2.98) = −47.3 dB. A link with events at −50 and −35 dB and a Rayleigh floor of −32 dB returns 10⁻⁵ + 3.2 · 10⁻⁴ + 6.3 · 10⁻⁴ = 9.6 · 10⁻⁴ → ORL = 30.2 dB (Reflections & return loss).

OTDR

FormulaMeaning
d = c · t / (2 · n)distance from round-trip time with the group index n
Δd / d = Δn / ndistance error from an index error
resolution ≈ c · τ / (2 · n) ≈ 0.1 m per ns of pulsethe spatial length of the pulse, the floor of the event dead zone
L_reach ≈ (DR − 6 dB − Σ event losses) / αusable range from the dynamic range
L_fibre = L_cable · (1 + EFL) + Σ slackfibre length versus cable and route length

Examples: a return after 100 µs with n = 1.468 is 10.22 km away; an index error of 0.0015 shifts it by 0.1 % (10 m). A 100 ns pulse is 10 m long in the fibre. An OTDR with 40 dB of dynamic range on a link with 3 dB of event losses reaches (40 − 6 − 3) / 0.2 = 155 km at 1550 nm. A 10 km cable with 0.3 % excess fibre length and eight closures storing 20 m each contains 10.19 km of fibre (Reading an OTDR trace).

Latency and length

FormulaMeaning
t = L · n / c = 4.9 µs per kmone-way propagation delay in fibre
RTT = 2 · tround trip
Δt_PTP ≈ ΔL · 2.45 ns per mtiming error from a length asymmetry ΔL between the two fibres of a pair (half the one-way delay difference)

Examples: 100 km is 490 µs one way and 0.98 ms round trip; a 10 m length difference between the fibres of a pair shifts PTP time by about 25 ns (Fibre characterization).

Mechanics

FormulaMeaning
ε_bend = r / Rstrain on the outside of a bend: glass radius r = 62.5 µm, bend radius R
ε = F / (E · A)strain from tension: E = 72 GPa, A = π · (62.5 µm)² = 1.23 · 10⁻⁸ m²
sag ≈ w · S² / (8 · T)parabolic sag of an aerial span: weight per metre w, span S, tension T

Examples: R = 15 mm gives 0.42 % strain, R = 30 mm gives 0.21 % — the 20 % of proof rule. The proof test of 1 % strain corresponds to 8.8 N on the bare fibre, which is why cables carry the tension, not fibres. A 100 m span of a 1.5 N/m cable at 2 000 N tension sags 0.94 m (Reliability & ageing, Installation).

Planning counts

FormulaMeaning
N_fibres = round up to 12 of (circuits · fibres per circuit · growth factor)fibre count of a cable
N_splice points ≈ L / reel length − 1 + entriesmid-span splices from reel lengths plus building entries
Spare = N_fibres − in use ≥ 25 %the spare rule of thumb

Examples: 20 duplex circuits with a growth factor of 2 need 80 fibres → a 96-fibre cable. A 30 km route on 4 km reels needs 7 mid-span splice points plus two building entries (Fibre network topologies).

In CodingBox

Two inputs of every budget calculation come out of the module's memory: its minimum and maximum transmit power and its receiver sensitivity and overload, plus the live Tx and Rx values once the link is up. CodingBox reads them so the formulas above start from the module in hand, not from a generic datasheet (Check transceiver, DDM in the app, Units & conversions).