Skip to content

Space-frequency diversity sim for the outer FEC (#134)#143

Merged
josephnef merged 1 commit into
masterfrom
space-frequency-diversity
Jul 2, 2026
Merged

Space-frequency diversity sim for the outer FEC (#134)#143
josephnef merged 1 commit into
masterfrom
space-frequency-diversity

Conversation

@josephnef

Copy link
Copy Markdown
Collaborator

Summary

The design/sim half of #134 (space × frequency diversity), the frequency-led
follow-up from the #130 re-prioritisation. Adds the spatial axis to the existing
frequency-diversity model and quantifies how the two interact — parameterised by
the antenna correlation ρ we measured on hardware (#130), so the hardware finding
drops straight into the FEC model.

What it models

Over the real RS codec (stream_fec_rs), each channel is independently in
outage with a spatially-reduced probability, symbols hop round-robin across
channels, and the MDS code repairs the erasures. The spatial factor is
p_channel_dead = p_branch^N_eff, N_eff = n_ant/(1+(n_ant-1)ρ²) — independent
antennas turn per-branch outage p into p^N, correlated antennas leave it at
p.

Result (ρ sweep, N_ch=3, N_ant=4, p_branch=0.4)

ρ freq space spacefreq
0.9 (static) 65 % 65 % 74 %
0.5 65 % 88 % 98 %
0.1 (mobile) 65 % 97 % 99.8 %
  • Frequency diversity is correlation-independent (flat 65 %) — the dependable
    axis.
  • Spatial diversity is conditional on ρ — near-useless static, near-perfect
    mobile, matching the measured static-vs-motion behaviour.
  • The axes multiply — space-frequency dominates both throughout.

Contents

  • tools/precoder/space_freq_diversity_sim.py — Monte-Carlo, --sweep-rho,
    --self-test.
  • tools/precoder/test_space_freq_diversity_sim.py — pytest (N_eff limits,
    spatial-outage reduction, spacefreq dominance, frequency-axis ρ-independence,
    spatial-pays-more-when-decorrelated).
  • docs/fused-fec.md — "Adding the spatial axis" section.

Testing

--self-test green; 5 pytest pass. Pure-Python (numpy-free, GNU-Radio-env safe),
consistent with the sibling hop_diversity_sim.py.

🤖 Generated with Claude Code

Adds the spatial axis to the frequency-diversity model: spatial antenna combining
lowers each channel's outage probability, frequency hopping spreads the erasures,
and the two multiply. Crucially the spatial factor is parameterised by the
measured antenna correlation ρ (via N_eff), so the hardware finding drops in —
independent antennas turn per-branch outage p into p^N, correlated antennas leave
it at p.

- tools/precoder/space_freq_diversity_sim.py: Monte-Carlo over the real RS codec
  (stream_fec_rs), four configs (none/freq/space/spacefreq), a --sweep-rho that
  walks static→mobile, and a --self-test.
- test_space_freq_diversity_sim.py: pytest coverage (N_eff limits, spatial-outage
  reduction, spacefreq dominance, frequency-axis ρ-independence, spatial pays more
  when decorrelated).
- docs/fused-fec.md: "Adding the spatial axis" section — the two axes multiply,
  but spatial is a conditional bonus (worth only what the antennas are
  decorrelated) while frequency is the dependable, correlation-independent axis.

Result (ρ sweep, p_branch 0.4): frequency-only recovery is flat in ρ (immune to
the correlation problem); spatial goes from near-useless at ρ=0.9 (static) to
near-perfect at ρ=0.1 (mobile); space-frequency dominates throughout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@josephnef josephnef added enhancement New feature or request spatial-diversity Spatial-diversity axis: exploiting idle RF chains for the single-stream link labels Jul 2, 2026
@josephnef josephnef merged commit a9f4365 into master Jul 2, 2026
13 checks passed
@josephnef josephnef deleted the space-frequency-diversity branch July 2, 2026 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request spatial-diversity Spatial-diversity axis: exploiting idle RF chains for the single-stream link

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant