Skip to content

Communications

RF link budget analysis for space communication systems.

Modulation Schemes

Name Bits per Symbol
BPSK 1
QPSK 2
8PSK 3
16QAM 4
32QAM 5
64QAM 6
128QAM 7
256QAM 8

Antenna Patterns

Pattern Description
ParabolicPattern Airy disk model for parabolic reflector antennas
GaussianPattern Gaussian roll-off approximation
DipolePattern Short and general dipole radiation patterns

Quick Example

import lox_space as lox

# Define a Ka-band downlink
frequency = 29 * lox.GHz

# Transmitter: satellite with parabolic antenna
tx_pattern = lox.ParabolicPattern(diameter=0.98 * lox.m, efficiency=0.45)
tx_antenna = lox.ComplexAntenna(pattern=tx_pattern, boresight=[0.0, 0.0, 1.0])
tx = lox.Transmitter(frequency=frequency, power=10 * lox.W, line_loss=1.0 * lox.dB)
tx_system = lox.CommunicationSystem(antenna=tx_antenna, transmitter=tx)

# Receiver: ground station with known system noise temperature
rx_antenna = lox.SimpleAntenna(gain=40.0 * lox.dB, beamwidth=0.5 * lox.deg)
rx = lox.SimpleReceiver(frequency=frequency, system_noise_temperature=200 * lox.K)
rx_system = lox.CommunicationSystem(antenna=rx_antenna, receiver=rx)

# Define a QPSK channel at 5 Msps
channel = lox.Channel(
    link_type="downlink",
    symbol_rate=5 * lox.MHz,
    required_eb_n0=10.0 * lox.dB,
    margin=3.0 * lox.dB,
    modulation=lox.Modulation("QPSK"),
    roll_off=0.35,
    fec=0.5,
)

# Compute a full link budget at 1000 km slant range
stats = lox.LinkStats.calculate(
    tx_system=tx_system,
    rx_system=rx_system,
    channel=channel,
    range=1000 * lox.km,
    tx_angle=0.0 * lox.deg,
    rx_angle=0.0 * lox.deg,
)

print(f"EIRP:        {float(stats.eirp):.1f} dBW")
print(f"FSPL:        {float(stats.fspl):.1f} dB")
print(f"C/N0:        {float(stats.c_n0):.1f} dB·Hz")
print(f"Es/N0:       {float(stats.es_n0):.1f} dB")
print(f"Eb/N0:       {float(stats.eb_n0):.1f} dB")
print(f"Link margin: {float(stats.margin):.1f} dB")

Working with Decibels

import lox_space as lox

# Create from dB value or linear ratio
gain = 30.0 * lox.dB
gain_linear = lox.Decibel.from_linear(1000.0)

# Arithmetic
total = gain + 3.0 * lox.dB   # 33.0 dB
diff = gain - 10.0 * lox.dB   # 20.0 dB

# Convert back
print(f"{float(gain)} dB = {gain.to_linear():.0f} linear")

Free-Space Path Loss

import lox_space as lox

# FSPL at 1000 km range and 29 GHz
loss = lox.fspl(distance=1000 * lox.km, frequency=29 * lox.GHz)
print(f"FSPL: {float(loss):.1f} dB")

Environmental Losses

import lox_space as lox

losses = lox.EnvironmentalLosses(
    rain=2.0 * lox.dB,
    gaseous=0.3 * lox.dB,
    atmospheric=0.5 * lox.dB,
)
print(f"Total: {float(losses.total()):.1f} dB")

# Pass to LinkStats.calculate via the losses parameter
stats = lox.LinkStats.calculate(
    tx_system=tx_system,
    rx_system=rx_system,
    channel=channel,
    range=1000 * lox.km,
    tx_angle=0.0 * lox.deg,
    rx_angle=0.0 * lox.deg,
    losses=losses,
)

Decibel

A value in decibels.

Parameters:

  • value

    The value in dB.

Methods:

  • from_linear

    Creates a Decibel value from a linear power ratio.

  • to_linear

    Returns the linear power ratio.

from_linear staticmethod

from_linear(value: float) -> Decibel

Creates a Decibel value from a linear power ratio.

to_linear

to_linear() -> float

Returns the linear power ratio.


Modulation

Digital modulation scheme.

Parameters:

  • name

    One of "BPSK", "QPSK", "8PSK", "16QAM", "32QAM", "64QAM", "128QAM", "256QAM".

Methods:

bits_per_symbol

bits_per_symbol() -> int

Returns the number of bits per symbol.


ParabolicPattern

Parabolic antenna gain pattern.

Parameters:

  • diameter

    Antenna diameter as Distance.

  • efficiency

    Aperture efficiency (0, 1].

Methods:

  • beamwidth

    Returns the half-power beamwidth, or None when the

  • from_beamwidth

    Creates a parabolic pattern from a desired beamwidth.

  • gain

    Returns the gain in dBi at the given frequency and off-boresight angle.

  • peak_gain

    Returns the peak gain in dBi.

beamwidth

beamwidth(frequency: Frequency) -> Angle | None

Returns the half-power beamwidth, or None when the antenna diameter is smaller than ~1.22 wavelengths at this frequency.

from_beamwidth staticmethod

Creates a parabolic pattern from a desired beamwidth.

Parameters:

  • beamwidth

    (Angle) –

    Half-power beamwidth as Angle.

  • frequency

    (Frequency) –

    Frequency.

  • efficiency

    (float) –

    Aperture efficiency (0, 1].

gain

gain(frequency: Frequency, angle: Angle) -> Decibel

Returns the gain in dBi at the given frequency and off-boresight angle.

peak_gain

peak_gain(frequency: Frequency) -> Decibel

Returns the peak gain in dBi.


GaussianPattern

Gaussian antenna gain pattern.

Parameters:

  • diameter

    Antenna diameter as Distance.

  • efficiency

    Aperture efficiency (0, 1].

Methods:

  • beamwidth

    Returns the half-power beamwidth.

  • gain

    Returns the gain in dBi at the given frequency and off-boresight angle.

  • peak_gain

    Returns the peak gain in dBi.

beamwidth

beamwidth(frequency: Frequency) -> Angle | None

Returns the half-power beamwidth.

gain

gain(frequency: Frequency, angle: Angle) -> Decibel

Returns the gain in dBi at the given frequency and off-boresight angle.

peak_gain

peak_gain(frequency: Frequency) -> Decibel

Returns the peak gain in dBi.


DipolePattern

Dipole antenna gain pattern.

Parameters:

  • length

    Dipole length as Distance.

Methods:

  • gain

    Returns the gain in dBi at the given frequency and off-boresight angle.

  • peak_gain

    Returns the peak gain in dBi.

gain

gain(frequency: Frequency, angle: Angle) -> Decibel

Returns the gain in dBi at the given frequency and off-boresight angle.

peak_gain

peak_gain(frequency: Frequency) -> Decibel

Returns the peak gain in dBi.


SimpleAntenna

A simple antenna with constant gain and beamwidth.

Parameters:

  • gain

    Peak gain as Decibel.

  • beamwidth

    Half-power beamwidth as Angle.


ComplexAntenna

An antenna with a physics-based gain pattern and boresight vector.

Parameters:

  • pattern

    An antenna pattern (ParabolicPattern, GaussianPattern, or DipolePattern).

  • boresight

    Boresight direction as [x, y, z].

Methods:

  • beamwidth

    Returns the half-power beamwidth, or None when the

  • gain

    Returns the gain in dBi at the given frequency and off-boresight angle.

  • peak_gain

    Returns the peak gain in dBi.

beamwidth

beamwidth(frequency: Frequency) -> Angle | None

Returns the half-power beamwidth, or None when the underlying pattern does not define a beamwidth.

gain

gain(frequency: Frequency, angle: Angle) -> Decibel

Returns the gain in dBi at the given frequency and off-boresight angle.

peak_gain

peak_gain(frequency: Frequency) -> Decibel

Returns the peak gain in dBi.


Transmitter

A radio transmitter.

Parameters:

  • frequency

    Transmit frequency.

  • power

    Transmit power.

  • line_loss

    Feed/line loss as Decibel.

  • output_back_off

    Output back-off as Decibel (default Decibel(0)).

Methods:

  • eirp

    Returns the EIRP in dBW for the given antenna and off-boresight angle.

eirp

eirp(antenna: SimpleAntenna | ComplexAntenna, angle: Angle) -> Decibel

Returns the EIRP in dBW for the given antenna and off-boresight angle.


SimpleReceiver

A simple receiver with a known system noise temperature.

Parameters:

  • frequency

    Receive frequency.

  • system_noise_temperature

    System noise temperature.


ComplexReceiver

An N-stage cascade receiver using the Friis noise formula.

Parameters:

  • frequency

    Receive frequency.

  • antenna_noise_temperature

    Antenna noise temperature.

  • stages

    List of NoiseStage (ordered: LNA first, then downstream).

  • demodulator_loss

    Demodulator loss as Decibel (default Decibel(0)).

  • implementation_loss

    Other implementation losses as Decibel (default Decibel(0)).

Methods:

chain_gain

chain_gain() -> Decibel

Returns the total RF chain gain in dB.

from_feed_loss_and_noise_figure staticmethod

from_feed_loss_and_noise_figure(
    frequency: Frequency,
    antenna_noise_temperature: Temperature,
    feed_loss: Decibel,
    receiver_noise_figure: Decibel,
    receiver_gain: Decibel,
    demodulator_loss: Decibel | None = None,
    implementation_loss: Decibel | None = None,
) -> ComplexReceiver

Creates a two-stage model: lossy feed line at room temperature followed by a receiver.

from_lna_and_noise_figure staticmethod

from_lna_and_noise_figure(
    frequency: Frequency,
    antenna_noise_temperature: Temperature,
    lna_gain: Decibel,
    lna_noise_temperature: Temperature,
    receiver_noise_figure: Decibel,
    demodulator_loss: Decibel | None = None,
    implementation_loss: Decibel | None = None,
) -> ComplexReceiver

Creates a two-stage model: LNA followed by a receiver characterised by noise figure.

system_noise_temperature

system_noise_temperature() -> Temperature

Returns the system noise temperature via the Friis formula.


NoiseStage

A single stage in an RF receiver chain.

Parameters:

  • gain

    Stage gain as Decibel.

  • noise_temperature

    Stage equivalent noise temperature.


Channel

A communication channel.

Parameters:

  • "uplink", "downlink", or "crosslink".

  • symbol_rate

    Symbol rate as Frequency.

  • required_eb_n0

    Required Eb/N0 as Decibel.

  • margin

    Required link margin as Decibel.

  • modulation

    Modulation scheme.

  • roll_off

    Roll-off factor (default 0.35).

  • fec

    Forward error correction code rate (default 0.5).

  • chip_rate

    Chip rate for DSSS as Frequency (optional).

Methods:

  • bandwidth

    Returns the occupied channel bandwidth.

  • c_n

    Computes C/N from a given C/N0.

  • data_rate

    Returns the raw bit rate.

  • eb_n0

    Computes Eb/N0 from a given C/N0.

  • es_n0

    Computes Es/N0 from a given C/N0.

  • information_rate

    Returns the information (post-FEC) bit rate.

  • link_margin

    Computes the link margin from a given Eb/N0.

  • processing_gain

    Returns the DSSS processing gain in dB, or None for narrowband.

  • spreading_factor

    Returns the DSSS spreading factor, or None for narrowband.

bandwidth

bandwidth() -> Frequency

Returns the occupied channel bandwidth.

c_n

c_n(c_n0: Decibel) -> Decibel

Computes C/N from a given C/N0.

data_rate

data_rate() -> Frequency

Returns the raw bit rate.

eb_n0

eb_n0(c_n0: Decibel) -> Decibel

Computes Eb/N0 from a given C/N0.

es_n0

es_n0(c_n0: Decibel) -> Decibel

Computes Es/N0 from a given C/N0.

information_rate

information_rate() -> Frequency

Returns the information (post-FEC) bit rate.

link_margin(eb_n0: Decibel) -> Decibel

Computes the link margin from a given Eb/N0.

processing_gain

processing_gain() -> Decibel | None

Returns the DSSS processing gain in dB, or None for narrowband.

spreading_factor

spreading_factor() -> float | None

Returns the DSSS spreading factor, or None for narrowband.


EnvironmentalLosses

Atmospheric environmental losses computed from ITU-R models.

Computes rain, gaseous, cloud, scintillation, and depolarization attenuation for a slant path.

Parameters:

  • lat

    Latitude.

  • lon

    Longitude.

  • frequency

    Frequency.

  • elevation

    Elevation angle (clamped to >= 5 deg).

  • probability

    Exceedance probability (% of average year).

  • diameter

    Physical antenna diameter.

  • polarisation_tilt

    Polarisation tilt angle (default 45 deg for circular).

Methods:

  • total

    Returns the total environmental loss in dB.

Attributes:

atmospheric property

atmospheric: Decibel

General atmospheric loss (combined total).

cloud property

cloud: Decibel

Cloud attenuation.

depolarization property

depolarization: Decibel

Depolarization loss.

gaseous property

gaseous: Decibel

Gaseous absorption.

rain property

rain: Decibel

Rain attenuation.

scintillation property

scintillation: Decibel

Scintillation loss.

total

total() -> Decibel

Returns the total environmental loss in dB.


CommunicationSystem

A communication system combining an antenna with optional transmitter and receiver.

Parameters:

  • antenna

    A SimpleAntenna or ComplexAntenna.

  • receiver

    A SimpleReceiver or ComplexReceiver (optional).

  • transmitter

    A Transmitter (optional).

Methods:

carrier_power

carrier_power(
    rx_system: CommunicationSystem,
    losses: Decibel,
    range: Distance,
    tx_angle: Angle,
    rx_angle: Angle,
) -> Decibel

Computes the received carrier power in dBW.

carrier_to_noise_density

Computes the carrier-to-noise density ratio (C/N0) in dB·Hz.

Parameters:

  • rx_system

    (CommunicationSystem) –

    The receiving CommunicationSystem.

  • losses

    (Decibel) –

    Additional losses as Decibel.

  • range

    (Distance) –

    Slant range as Distance.

  • tx_angle

    (Angle) –

    Off-boresight angle at transmitter as Angle.

  • rx_angle

    (Angle) –

    Off-boresight angle at receiver as Angle.

noise_power

noise_power(bandwidth: Frequency) -> Decibel

Computes the noise power in dBW for a given bandwidth.


LinkStats

Complete link budget statistics.

Methods:

Attributes:

bandwidth property

bandwidth: Frequency

Channel bandwidth.

c_n property

c_n: Decibel

C/N in dB.

c_n0 property

c_n0: Decibel

Carrier-to-noise density ratio in dB·Hz.

carrier_rx_power property

carrier_rx_power: Decibel

Received carrier power in dBW.

eb_n0 property

eb_n0: Decibel

Eb/N0 in dB.

eirp property

eirp: Decibel

EIRP in dBW.

es_n0 property

es_n0: Decibel

Es/N0 in dB.

frequency property

frequency: Frequency

Link frequency.

fspl property

fspl: Decibel

Free-space path loss in dB.

gt property

gt: Decibel

Receiver G/T in dB/K.

margin property

margin: Decibel

Link margin in dB.

noise_power property

noise_power: Decibel

Noise power in dBW.

slant_range property

slant_range: Distance

Slant range.

symbol_rate property

symbol_rate: Frequency

Symbol rate.

calculate staticmethod

Computes a full link budget.

Parameters:

  • tx_system

    (CommunicationSystem) –

    The transmitting CommunicationSystem.

  • rx_system

    (CommunicationSystem) –

    The receiving CommunicationSystem.

  • channel

    (Channel) –

    The Channel.

  • range

    (Distance) –

    Slant range as Distance.

  • tx_angle

    (Angle) –

    Off-boresight angle at transmitter as Angle.

  • rx_angle

    (Angle) –

    Off-boresight angle at receiver as Angle.

  • losses

    (EnvironmentalLosses | None, default: None ) –

    EnvironmentalLosses (optional, defaults to none).


fspl builtin

Computes the free-space path loss in dB.

Parameters:

Returns:

  • Decibel

    Free-space path loss as a Decibel value.


freq_overlap builtin

Computes the frequency overlap factor between a receiver and an interferer.

Parameters:

  • rx_freq

    (Frequency) –

    Receiver center frequency.

  • rx_bw

    (Frequency) –

    Receiver bandwidth.

  • tx_freq

    (Frequency) –

    Interferer center frequency.

  • tx_bw

    (Frequency) –

    Interferer bandwidth.

Returns:

  • float

    Overlap factor in [0, 1].


power_flux_density builtin

Computes the power flux density in dBW/m²/ref_bw.

Parameters:

  • eirp

    (Decibel) –

    EIRP as Decibel.

  • distance

    (Distance) –

    Distance.

  • occupied_bw

    (Frequency) –

    Occupied bandwidth as Frequency.

  • reference_bw

    (Frequency) –

    ITU reference bandwidth as Frequency.

Returns:


pfd_mask builtin

Computes the ITU RR Article 21.16 PFD mask value.

Parameters:

  • elevation

    (Angle) –

    Elevation angle.

  • start_val

    (Decibel) –

    PFD limit at low elevation as Decibel.

  • end_val

    (Decibel) –

    PFD limit at high elevation as Decibel.

Returns:

  • Decibel

    PFD mask value as Decibel.


slant_range builtin

Computes the slant range from a ground station to a satellite.

Parameters:

  • elevation

    (Angle) –

    Elevation angle.

  • earth_radius

    (Distance) –

    Earth radius as Distance.

  • altitude

    (Distance) –

    Satellite altitude as Distance.

Returns: