Skip to main content

Module budget

Module budget 

Source
Expand description

Link budgets: how much signal a LoRa link has to spend, and where it goes.

A link closes while the power reaching the receiver stays above the weakest signal the receiver can still demodulate. Everything between the transmitting radio and that demodulator adds or takes away decibels: the transmit power, the antenna and cable at each end, and the path itself. LinkBudget keeps that account, and the functions here give each term on its own.

Every value is a Decibels, held to a hundredth of a decibel and computed with a fixed-point logarithm, so a node can budget its own link with no floating point. Each term comes from the document that defines it:

  • free_space_loss_db is the free-space basic transmission loss of Recommendation ITU-R P.525-5, equation (5), 20 log10(4 pi d / lambda).
  • fresnel_radius_mm is the radius of the first Fresnel ellipsoid, from Recommendation ITU-R P.526-16, equation (2).
  • noise_floor_dbm is the thermal noise in a channel, -174 dBm/Hz plus 10 log10 of the bandwidth, as Semtech application note AN1200.22 derives it.
  • demodulator_snr_db is the signal-to-noise ratio the LoRa demodulator needs at each spreading factor, from Table 6-1 of the Semtech SX1261/2 datasheet.
  • Fcc15247 is the conducted power limit and antenna gain rule of 47 CFR 15.247(b).

A receiver’s sensitivity is its noise floor, raised by its noise figure and lowered by the demodulator SNR. With the 6 dB noise figure AN1200.22 takes as typical, that sum lands within about half a decibel of the SX1261/2 datasheet at 125 and 250 kHz, and within 3 dB of every SF7 to SF12 figure in it and in the SX1276 datasheet. The datasheet figures are measured, so where a deployment has them for its own radio, they are the better number.

§Examples

use pamoja_lora::budget::{self, Decibels, LinkBudget};
use pamoja_lora::LinkSettings;

// SF12 at 125 kHz, sent at 14 dBm between antennas with no gain.
let link = LinkSettings::new(12, 125_000);
let budget = LinkBudget {
    transmit_power_dbm: Decibels::from_db(14),
    ..LinkBudget::default()
};

// With the default 6 dB noise figure the receiver hears down to -137.03 dBm, so the
// link survives 151.03 dB of path loss.
assert_eq!(budget.sensitivity_dbm(link).to_string(), "-137.03");
assert_eq!(budget.max_path_loss_db(link).to_string(), "151.03");

// Five kilometers of free space at 868.1 MHz takes 105.20 dB of that.
let loss = budget::free_space_loss_db(5_000, 868_100_000);
assert_eq!(loss.to_string(), "105.20");
assert_eq!(budget.margin_db(link, loss).to_string(), "45.83");

Structs§

Decibels
A level, a gain, or a loss in decibels, held to a hundredth of a decibel.
LinkBudget
The gains and losses of a link, from the transmitting radio to the receiving one.

Enums§

Fcc15247
A 902-928 MHz transmitter as 47 CFR 15.247 classes it for a power limit.

Constants§

GATEWAY_NOISE_FIGURE_DB
A typical noise figure for a LoRaWAN gateway receiver, in dB.
RADIO_NOISE_FIGURE_DB
A typical noise figure for a Semtech sub-GHz LoRa radio, in dB.
THERMAL_NOISE_DBM_PER_HZ
The thermal noise power density at room temperature, in dBm per hertz.

Functions§

demodulator_snr_db
Returns the signal-to-noise ratio the LoRa demodulator needs at a spreading factor, in dB.
free_space_loss_db
Returns the free-space basic transmission loss between isotropic antennas, in dB.
fresnel_radius_mm
Returns the radius of the first Fresnel ellipsoid at a point on a path, in millimeters.
noise_floor_dbm
Returns the thermal noise power in a channel, in dBm.
sensitivity_dbm
Returns the weakest signal a receiver can demodulate on a link, in dBm.