Space-frequency diversity sim for the outer FEC (#134)#143
Merged
Conversation
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>
Closed
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 inoutage 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)ρ²)— independentantennas 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)
axis.
mobile, matching the measured static-vs-motion behaviour.
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-testgreen; 5 pytest pass. Pure-Python (numpy-free, GNU-Radio-env safe),consistent with the sibling
hop_diversity_sim.py.🤖 Generated with Claude Code