Skip to content

tests: per-MCS clean-power-ceiling calibration (adaptive-link recipe)#196

Merged
josephnef merged 1 commit into
masterfrom
per-mcs-power-ceiling
Jul 6, 2026
Merged

tests: per-MCS clean-power-ceiling calibration (adaptive-link recipe)#196
josephnef merged 1 commit into
masterfrom
per-mcs-power-ceiling

Conversation

@josephnef

Copy link
Copy Markdown
Collaborator

Why

From /tmp/adaptive-link-recipes.md (the OpenIPC-FPV "Adaptive Link" topic): the #1 hand-tuning chore is the universal law "higher MCS ⇒ lower max clean power" — the PA garbles dense QAM first, so each MCS has a power ceiling above which video breaks. The whole ecosystem hand-calibrates this per adapter ("raise power until garbage, back off 5"; e.g. Johhn's 8812AU: 58@MCS0/1 → 30@MCS5) and bakes it into per-MCS power tables (wlan_adapters.yaml). This automates it, reusing the diagnostics this session already shipped.

What

tests/per_mcs_power_ceiling.sh — for each MCS, sweep the flat TXAGC index (DEVOURER_TX_PWR) while a second devourer adapter reports per-frame stats (DEVOURER_STREAM_OUT). The ceiling per MCS is the highest power that still delivers cleanly — the point just before frames garble. Output is the mcs → safe-power table + the law-check.

The metric matters, and the measurement corrected my first guess: the EVM knee (PA compression) turned out to be nearly the same power for every MCS, so keying on it gave a flat table. What actually differs per MCS is the decode threshold — a denser constellation garbles at lower power — so frame-delivery collapse, not the EVM knee, is the right signal.

Validation (8812AU, 8×8 sweep, chip-RSSI ground — no SDR)

Per-MCS delivery (frames/cell) shows the cliff directly:

MCS ceiling idx note
0–3 56 deliver across the whole range
4 44 0 frames at idx56
5–7 32 delivery collapses to ~0 at idx44

RESULT ceiling MCS0=56 → top=32 (drop 24 index steps ≈ 12 dB); 0 law inversions → LAW REPRODUCED. This matches the community's known 8812AU shape.

Chip-RSSI is the sensor (not the B210 — its front end limits on near-field frames, measured earlier this session). Fixed near-field geometry is valid: the delivery cliff is the PA's clean limit regardless of distance.

Scope

Tooling only — no library change. The table feeds the runtime controls already shipped: SetTxPowerOffsetQdb (per-rate baseline, #188) + the Jaguar2 per-packet offset (#194). A runtime per-MCS clamp was considered and rejected: per-MCS TXAGC is individually addressable only on Jaguar1; J2/J3 group rates, so it'd be invasive for little gain. The calibration table is the valuable artifact.

🤖 Generated with Claude Code

Automates the #1 hand-tuning chore in the OpenIPC-FPV adaptive-link topic:
the universal law "higher MCS => lower max clean power" (the PA garbles dense
QAM first), which the community measures by hand per adapter ("raise power
until garbage, back off 5") and bakes into per-MCS power tables.

tests/per_mcs_power_ceiling.sh reuses this repo's diagnostics: for each MCS it
sweeps the flat TXAGC index (DEVOURER_TX_PWR) while a second devourer adapter
reports per-frame stats (DEVOURER_STREAM_OUT). The ceiling per MCS is the
highest power that still DELIVERS cleanly — the point just before frames
garble. Key finding that shaped the metric: the EVM *knee* (PA compression) is
nearly the same power for every MCS, so it does NOT show the law; what differs
is the decode threshold, so a denser constellation's delivery cliff comes at
lower power. Delivery, not the EVM knee, is the right signal.

Validated on 8812AU (8x8 sweep, chip-RSSI ground — no SDR, per the
B210-front-end-limits lesson): ceiling MCS0-3 = idx56, MCS4 = 44, MCS5-7 = 32
(delivery collapses to 0 frames at idx44 for MCS7). A 24-index (~12 dB) taper,
0 law inversions — reproducing the community shape (Johhn's 8812AU 58@MCS0/1
tapering to 30@MCS5). Output is the mcs->safe-power table an adaptive link
consumes; it feeds the runtime controls already shipped (SetTxPowerOffsetQdb
baseline + the Jaguar2 per-packet offset). Tooling only, no library change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@josephnef josephnef merged commit cce12e3 into master Jul 6, 2026
15 checks passed
@josephnef josephnef deleted the per-mcs-power-ceiling branch July 6, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant