Document repeater validation and operating limits
This commit is contained in:
+38
-28
@@ -9,24 +9,24 @@ repeats, 214 RX candidates, repeat delay set to 200 ms).
|
||||
| Quantity | min | median | max | n |
|
||||
|---|---|---|---|---|
|
||||
| RxDone -> reconstructed end of frame ("deaf tail") | 9 360 us | 12 240 us | 17 120 us | 214 |
|
||||
| TX airtime (SetTx to TxDone) | 10 421 us | 13 422 us | 14 560 us | 72 |
|
||||
| Programmed repeat delay (frame end -> TX start) | 200 001 us | 200 001 us | 200 008 us | 72 |
|
||||
| TX operation latency (routine entry -> observed TxDone) | 10 421 us | 13 422 us | 14 560 us | 72 |
|
||||
| Scheduled frame end -> TX-routine entry | 200 001 us | 200 001 us | 200 008 us | 72 |
|
||||
| Repeated frame length (over-the-air bytes) | 63 | 100 | 113 | 72 |
|
||||
|
||||
Independent confirmation from the SDR side (raw IQ, same run): observed
|
||||
burst duration differs from the computed airtime by 0.2-1.5 ms
|
||||
(median 1.2 ms), and firmware TX events align to observed RF within
|
||||
0-3.1 ms (median 2.4 ms).
|
||||
(median 1.2 ms), and firmware TX-operation events align to observed RF
|
||||
within 0-3.1 ms (median 2.4 ms).
|
||||
|
||||
## Derived
|
||||
|
||||
```
|
||||
repeat delay accuracy : +1 us to +8 us against a 200 ms setting
|
||||
(jitter well under 10 us)
|
||||
RX deaf time per repeat : ~225.7 ms median
|
||||
repeat scheduling accuracy : +1 us to +8 us against a 200 ms setting
|
||||
(at TX-routine entry, not RF onset)
|
||||
RX deaf time per repeat : ~225.7 ms historical median
|
||||
= 12.2 ms deaf tail
|
||||
+ 200.0 ms programmed delay
|
||||
+ 13.4 ms TX airtime
|
||||
+ 13.4 ms TX operation latency
|
||||
```
|
||||
|
||||
The programmed delay dominates by design; it exists to make SDR
|
||||
@@ -59,31 +59,41 @@ a production repeater.
|
||||
artefact, not a design target (see docs/STANDARDS_GAPS.md).
|
||||
- The fixed-255 tail is an SX1262 packet-engine limitation, so it applies
|
||||
to any SX126x-based design. Budget for it, or implement early-stop RX.
|
||||
- Repeat-delay accuracy of a few microseconds shows the ESP32-S3 side has
|
||||
ample timing margin; timing precision will not be the constraint.
|
||||
- TX-routine scheduling jitter is only a few microseconds. Actual RF starts
|
||||
after packet setup and buffer transfer, so it must be measured at RF when
|
||||
exact over-the-air delay matters.
|
||||
|
||||
## Airtime measurement vs true channel occupancy
|
||||
## Computed airtime vs TX operation latency
|
||||
|
||||
`tx_airtime_us` and the duty-cycle ledger both use wall time from `SetTx`
|
||||
to the moment `TxDone` is observed. That interval includes SPI round-trips
|
||||
and up to ~1 ms of polling granularity, so it over-states true channel
|
||||
occupancy:
|
||||
Current `airtime_us`, cumulative `stats.tx_airtime_us`, and the duty ledger
|
||||
all use computed channel occupancy:
|
||||
|
||||
```
|
||||
computed airtime, 102-byte payload : (102 * 80 us) + 640 us = 8.8 ms
|
||||
measured SetTx -> TxDone observed : 13.4 ms median
|
||||
airtime = 48-bit preamble + 16-bit sync + payload at 100 kbps
|
||||
= (radio_payload_bytes * 80 us) + 640 us
|
||||
|
||||
102-byte radio payload : 8.8 ms
|
||||
26-byte beacon payload : 2.72 ms
|
||||
```
|
||||
|
||||
Consequences, both deliberate:
|
||||
`wmbus_tx.tx_operation_us` separately records the longer interval from
|
||||
entry into the TX routine through observed TxDone. It includes standby,
|
||||
packet-parameter and buffer SPI transactions, the actual transmission, and
|
||||
polling/notification latency. Historical firmware mislabeled this interval
|
||||
as `airtime_us`; its 102-byte median was 13.4 ms.
|
||||
|
||||
- The reported duty cycle is conservative (over-counted by roughly 50 %),
|
||||
so the 0.1 % guard suppresses slightly earlier than strictly required.
|
||||
For a compliance guard, erring high is the safe direction.
|
||||
- Independent confirmation that the real occupancy matches the computed
|
||||
airtime comes from the SDR side, not the firmware: observed burst
|
||||
durations in raw IQ differ from the computed airtime by 0.2-1.5 ms
|
||||
(median 1.2 ms), i.e. the transmission itself is ~9-10 ms for a 100-byte
|
||||
frame as expected.
|
||||
The distinction matters:
|
||||
|
||||
A production implementation should budget on computed airtime and use the
|
||||
measured value only for latency diagnostics.
|
||||
- Computed occupancy is independent of task scheduling and SPI speed, so
|
||||
the duty guard no longer consumes roughly 50% extra budget.
|
||||
- Operation latency remains useful for diagnosing stalls and TxDone timing,
|
||||
but is not a regulatory airtime measurement.
|
||||
- Raw-IQ burst duration remains the independent check. In the historical
|
||||
102-byte run it differed from computed airtime by 0.2-1.5 ms (median
|
||||
1.2 ms).
|
||||
|
||||
The rolling-hour ledger uses 61 keyed one-minute buckets rather than a
|
||||
fixed event ring. It therefore cannot forget high-rate events merely
|
||||
because an event count was exceeded. The oldest overlapping minute is
|
||||
counted in full, making the result conservatively high by at most one
|
||||
minute's included traffic at the window boundary.
|
||||
|
||||
Reference in New Issue
Block a user