linkbudget
RF link budget analysis for satellite and terrestrial communication systems.
Features
| Module | Description |
|---|---|
| Transmitter | Output power, gain, EIRP (dBm/dBW) |
| Receiver | Gain, noise temperature, noise figure, SNR, G/T |
| Path Loss | Free space path loss (FSPL) from frequency and distance |
| Link Budget | End-to-end: TX → path loss → RX → SNR → Eb/No → BER → margin |
| PHY Rate | Shannon capacity from SNR and bandwidth |
| Orbits | Slant range, circular orbit speed/period |
| Doppler | Doppler shift, received frequency, max radial velocity |
| Power Flux Density | PFD (dBW/m²) and PFD per MHz for regulatory analysis |
| Quantization | ADC/DAC quantization SNR and ENOB |
| Modulation | BPSK, QPSK, M-PSK, M-QAM, MSK — symbol rate, bandwidth, spectral efficiency |
| Energy (Eb/No) | Eb/No, Es/No, Ec/No, C/No conversions between all energy-per-bit metrics |
| BER | Theoretical BER curves (erfc/Q-function), required Eb/No, link margin |
| Sensitivity | Receiver MDS from modulation, code rate, NF, target BER |
| EVM | Error Vector Magnitude ↔ SNR conversions and margin checking |
| Coding (FEC) | CodedModulation, FecCode enum, coding gain constants, DVB-S2 presets |
Link Budget — End-to-End Example
use ;
use coding;
let budget = LinkBudget ;
// RF metrics
println!;
println!;
println!;
println!;
// Uncoded performance
println!;
println!;
println!;
println!;
let margin = budget.link_margin_db.unwrap;
println!;
// With FEC coding — DVB-S2 QPSK rate 3/4 (LDPC)
let coded = dvbs2_qpsk_r34;
println!;
println!;
println!;
Modulation & BER
use ;
let mod_qpsk = Qpsk;
// Symbol rate and occupied bandwidth
let rs = mod_qpsk.symbol_rate; // 10 Mbps, rate 3/4
let bw = mod_qpsk.occupied_bandwidth; // 35% roll-off
println!;
println!;
// BER at Eb/No = 10 dB
println!;
// Required Eb/No for BER = 1e-6
println!;
// Link margin: actual vs required
println!;
Energy-per-Bit Conversions
use energy;
// SNR = 20 dB in 10 MHz noise bandwidth
let c_no = snr_to_c_over_no; // → 80 dB·Hz
let eb_no = c_over_no_to_eb_over_no; // 5 Mbps → 13 dB
println!;
println!;
// Full chain: SNR → Eb/No via modulation and code rate
use Modulation;
let eb_no = snr_to_eb_over_no;
Coded Modulation (FEC)
use ;
use Modulation;
// DVB-S2 preset
let cm = dvbs2_qpsk_r34;
println!; // "QPSK + LDPC (R=0.75)"
println!;
println!;
// Required Eb/No with coding gain
println!;
// Link margin at 8 dB Eb/No
println!;
// Custom: 16-QAM + Turbo rate 1/2
let custom = new;
Available DVB-S2 Presets
| Preset | Modulation | FEC | η (bits/s/Hz) |
|---|---|---|---|
dvbs2_qpsk_r12() |
QPSK | LDPC R=1/2 | 1.00 |
dvbs2_qpsk_r34() |
QPSK | LDPC R=3/4 | 1.50 |
dvbs2_8psk_r23() |
8-PSK | LDPC R=2/3 | 2.00 |
dvbs2_16apsk_r34() |
16-APSK | LDPC R=3/4 | 3.00 |
dvbs2_32apsk_r56() |
32-APSK | LDPC R=5/6 | 4.17 |
Sensitivity
use ;
// Matched filter (root-raised-cosine) — ideal, α-independent
let matched = sensitivity_matched_filter_dbm.unwrap;
println!;
// Bandpass filter — practical, includes roll-off penalty
let bandpass = sensitivity_bandpass_dbm.unwrap;
println!;
// Roll-off penalty
println!;
Roll-Off Factor (α)
The roll-off factor α controls the excess bandwidth of raised-cosine pulse shaping:
| α | Excess BW | Sensitivity Penalty |
|---|---|---|
| 0.00 | 0% (brick-wall, impractical) | 0.00 dB |
| 0.20 | 20% (DVB-S2) | 0.79 dB |
| 0.25 | 25% | 0.97 dB |
| 0.35 | 35% (legacy DVB-S) | 1.30 dB |
| 0.50 | 50% | 1.76 dB |
| 1.00 | 100% | 3.01 dB |
With a matched filter (RRC at TX + RX), noise bandwidth = symbol rate regardless of α, so sensitivity is unaffected. The penalty applies when using a simple bandpass filter set to the occupied bandwidth Rs×(1+α).
EVM
use evm;
// EVM ↔ SNR
println!;
println!;
// Pass/fail check with margin
let = evm_margin; // measured 5%, required 8%
println!;
Doppler
use doppler;
let shift = doppler_shift_hz; // 14 GHz, 7 km/s
println!; // ~327 kHz
let received = doppler_received_frequency;
println!;
Power Flux Density
use ;
let pfd = power_flux_density_dbw_per_m2;
println!;
let pfd_mhz = pfd_per_mhz;
println!;
Quantization
use ;
println!; // 74.00
println!; // 10.5
CLI
Diagnostics (Tracing)
linkbudget uses tracing for structured, runtime-controllable diagnostics. Set the RUST_LOG environment variable to see what the CLI is doing:
# See HTML generation and browser launch info
RUST_LOG=linkbudget=info
# See path resolution, file URL construction, and all diagnostics
RUST_LOG=linkbudget=debug
# Only warnings and errors (quiet mode)
RUST_LOG=linkbudget=warn
If you use linkbudget as a library, install any tracing subscriber in your application to capture events. Without a subscriber, all tracing calls are zero-cost no-ops.
References
- Path Loss, Antenna Gain, and Frequency Dependence — Eric Jacobsen
- Understanding Eb/No, SNR, and Power Efficiency — Eric Jacobsen
- Raised-cosine filter — Wikipedia
- Proakis, J. (1995). Digital Communications (3rd ed.). McGraw-Hill.
- ETSI EN 302 307 — DVB-S2 (LDPC + BCH coding, modulation schemes)