Modem¶
DVB-S2 modem models — ModCod tables, performance curves, ACM policies, and throughput computation.
Modem Model¶
ModemModel
¶
Modem that maps (Eb/N0, bandwidth, time) to throughput.
Composes a ModCod table, performance curves, and an ACM policy to select the best modulation/coding and compute achievable throughput.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
modcods
|
list of ModCod
|
Available modulation and coding schemes. |
required |
curves
|
dict of str to PerformanceCurve
|
Performance curves keyed by ModCod name. |
required |
target_bler
|
float
|
Target block error rate threshold. |
required |
acm_policy
|
ACMPolicy
|
Adaptive coding and modulation selection policy. |
required |
Source code in src/opensatcom/modem/modem.py
throughput_mbps
¶
Compute throughput for given channel conditions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ebn0_db
|
float
|
Current Eb/N0 in dB. |
required |
bandwidth_hz
|
float
|
Allocated bandwidth in Hz. |
required |
t_s
|
float
|
Current simulation time in seconds. |
required |
Returns:
| Type | Description |
|---|---|
dict
|
Result dictionary with keys:
|
Source code in src/opensatcom/modem/modem.py
DVB-S2 Built-in Tables¶
dvbs2
¶
DVB-S2 built-in ModCod table and performance curves.
get_dvbs2_modcod_table
¶
Return the full DVB-S2 ModCod table.
Returns:
| Type | Description |
|---|---|
list of ModCod
|
28 standard DVB-S2 ModCods (QPSK through 32APSK). |
get_dvbs2_performance_curves
¶
Return analytic performance curves for all DVB-S2 ModCods.
Returns:
| Type | Description |
|---|---|
dict of str to PerformanceCurve
|
Analytic BER curves keyed by ModCod name. |
Source code in src/opensatcom/modem/dvbs2.py
Performance Curves¶
TablePerformanceCurve
¶
Table-based performance curve using interpolation.
Accepts a list of (ebn0_db, bler) points sorted by ebn0_db ascending. Uses np.interp for lookup — no scipy dependency.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
points
|
list[tuple[float, float]]
|
List of (ebn0_db, bler) pairs defining the performance curve. Points are sorted internally by ebn0_db ascending. |
required |
Source code in src/opensatcom/modem/curves.py
bler
¶
Interpolate BLER at given Eb/N0.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ebn0_db
|
float
|
Energy per bit to noise spectral density ratio in dB. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Interpolated block error rate at the given Eb/N0. |
Source code in src/opensatcom/modem/curves.py
required_ebn0_db
¶
Find Eb/N0 required to achieve target BLER.
Interpolates in reversed BLER→Eb/N0 direction (BLER decreases with Eb/N0).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_bler
|
float
|
Desired block error rate threshold. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Required Eb/N0 in dB to achieve the target BLER. |
Source code in src/opensatcom/modem/curves.py
AnalyticBERCurve
¶
Analytic BER/BLER curve for coded modulation.
Uses closed-form approximations calibrated to DVB-S2 reference thresholds. For QPSK: BER ~ erfc(sqrt(Eb/N0 * code_rate)) For higher-order: M-PSK/M-QAM approximations with coding gain offset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
bits_per_symbol
|
float
|
Bits per modulation symbol (2 = QPSK, 3 = 8PSK, 4 = 16APSK, 5 = 32APSK). |
required |
code_rate
|
float
|
FEC code rate (e.g., 0.5, 0.75). |
required |
required_ebn0_ref_db
|
float
|
Reference required Eb/N0 in dB at BLER = 1e-5 from the DVB-S2 standard. This anchors the waterfall curve. |
required |
Source code in src/opensatcom/modem/analytic_curves.py
bler
¶
Estimate BLER at given Eb/N0 (dB).
Uses a waterfall-shaped curve centered on the reference threshold.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ebn0_db
|
float
|
Energy per bit to noise spectral density ratio in dB. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Estimated block error rate, clamped to [1e-10, 1.0]. |
Source code in src/opensatcom/modem/analytic_curves.py
required_ebn0_db
¶
Find Eb/N0 required to achieve target BLER.
Inverts the waterfall curve analytically.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
target_bler
|
float
|
Desired block error rate threshold. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Required Eb/N0 in dB to achieve the target BLER. |
Source code in src/opensatcom/modem/analytic_curves.py
ACM Policy¶
HysteresisACMPolicy
¶
ACM policy with hysteresis to prevent ModCod flapping.
ModCods are sorted by required Eb/N0 (ascending = least demanding first). Step down (to lower ModCod) immediately when Eb/N0 drops below threshold. Step up (to higher ModCod) only when Eb/N0 exceeds threshold + hysteresis and hold time has elapsed since last switch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
modcods
|
list[ModCod]
|
Available ModCod configurations to select from. |
required |
curves
|
dict[str, PerformanceCurve]
|
Mapping of ModCod name to its performance curve, used to look up the required Eb/N0 for each ModCod at the target BLER. |
required |
target_bler
|
float
|
Target block error rate used to compute Eb/N0 thresholds. |
required |
hysteresis_db
|
float
|
Additional Eb/N0 margin (in dB) required to step up to a higher ModCod, preventing rapid oscillation. Default is 0.5. |
0.5
|
hold_time_s
|
float
|
Minimum time (in seconds) that must elapse after the last ModCod switch before an upstep is permitted. Default is 2.0. |
2.0
|
Source code in src/opensatcom/modem/acm.py
select_modcod
¶
Select ModCod based on current Eb/N0 and time.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ebn0_db
|
float
|
Current measured Eb/N0 in dB. |
required |
t_s
|
float
|
Current simulation time in seconds. |
required |
Returns:
| Type | Description |
|---|---|
ModCod
|
The selected ModCod for the current link conditions. |