SymbolSync¶
SymbolSync recovers symbol timing from a baseband stream: a timing
error detector (TED) measures how far the sampling instant is from the
symbol's centre, a loop filter turns that into a rate correction, and an
NCO moves the sampling instant. The same loop, with the same detectors
and the same lock quantity, is ratesync_loop_t, which RateSync and the
receivers' demodulators run. This page is the design of that loop. It
derives what the loop's timing error must be from the signal, and sizes
the loop from it.
1. Who uses it¶
| consumer | pulse | detector | outputs a symbol | bn (a symbol) |
|---|---|---|---|---|
SymbolSync |
the caller's | Gardner or DTTL | the caller's sps |
the caller's |
RateSync |
RRC or integrate-and-dump | Gardner or DTTL; the derivative-bank detector is the decided default, not built yet | m |
the caller's |
MpskReceiver |
RRC or integrate-and-dump | Gardner | 8 | the caller's |
AsyncDsssReceiver's demodulator |
integrate-and-dump | Gardner | 8 | 0.005 |
DsssReceiver's demodulator |
integrate-and-dump | Gardner | 8 | 0.005 |
RateSync's row is in two tenses on purpose. Its header has Gardner and
DTTL today. The detector that goes with its matched bank, and the
feedforward estimate that starts its loop
(SymbolTimingEstimator), are decided and not yet
built into it: RateSync's timing, §9.
The DSSS receivers are the demanding case. Their symbol clock is not tied to the code, so after despreading the timing is recovered from data transitions alone, at Es/N0 from 4 dB, through stretches with no transitions (the 415.1-B-1 period's 275-symbol gap).
2. Design goals¶
- The timing loop is sized by the loop SNR rule, as the code and carrier loops are (async-dsss-receiver.md §1.3): a loop SNR of at least 20 dB at the lowest Es/N0 the consumer states, counting the detector's noise-by-noise loss.
- The timing error's variance is derived for each detector and each pulse, and measured, open loop and closed loop. The two must agree.
- A locked loop does not slip. At a 20 dB loop SNR a whole-symbol slip is a rare event with a rate theory gives; the loop meets it.
- The rate state stays inside what the signal can have. The symbol rate is known to the source's tolerance and the Doppler dilation; nothing in the loop may sit outside that.
- The lock quantity says whether the loop samples near the eye centre of a signal that has transitions. It does not measure the timing error (§7); the timing error is measured at the strobe. Its threshold separates a locked loop from an unlocked one at the consumer's lowest Es/N0, with stated false-lock and false-unlock probabilities.
3. What it composes, and what each leaves to it¶
| object | what it guarantees | what it leaves to this loop |
|---|---|---|
NCO |
the phase word and its control port, exact to one LSB | "nco_steer_scale has no production caller"; steering is unbounded |
LoopFilter |
bn is the loop's noise bandwidth, to a closed form |
"no anti-windup and no output bound" |
Farrow / Resampler |
the interpolant; mu, the sampling instant |
"a wrapping mu is a residual rate error, and one wrap is one input interval of slip" |
LockDet |
the verify counts compound as documented | which quantity it is stepped on, and its thresholds |
Each of the three certified reports hands the bound to its caller. This loop is that caller, so goals 3 and 4 are its to meet.
4. The detector¶
With y_k the matched-filter output at the symbol strobe and y_mid,k
the output half a symbol earlier:
Gardner: e_k = Re{ y_mid,k · conj(y_k − y_{k−1}) }
DTTL: e_k = Re{ y_mid,k · conj(d_k − d_{k−1}) }, d = the hard decision
Its mean against a standing timing offset τ (in symbols) is the
S-curve S(τ), with two zeros a symbol: a stable one at the eye centre
and an unstable one half a symbol away. The slope at the stable zero is
the detector gain Kd = S′(0), per symbol of timing error. The loop
divides by it once, at construction (dp_symsync_ted_slope()), so a
correctly normalized detector has unit slope.
For data symbols a_k and the overall pulse g(t) (Nyquist, g(0) = 1):
5. The timing error's variance¶
The loop is far narrower than the symbol rate, so it sees the detector's
noise only through its spectral density at zero frequency,
S_e(0) = Σ_m R_e(m), the sum of the error's autocorrelation over all
lags. Adjacent errors share samples, so the lags matter: summing them is
what separates this from the variance of one error. For a loop of noise
bandwidth bn a symbol:
S_e(0) has three parts, each a function of the pulse alone:
S_self: self noise, the data's own contribution at zero timing error. It is the floor a noiseless loop rests on.S_sn / γ: signal by noise.S_nn / γ²: noise by noise. It is this detector's squaring loss.
5.1 Gardner on integrate-and-dump BPSK¶
This is the DSSS receivers' case, and it has a closed form. The pulse
after the integrator is the triangle g(t) = 1 − |t|/T. At zero timing
error a mid sample is (a_k + a_{k−1})/2, which is 0 on a transition and
±1 otherwise, and the difference a_k − a_{k−1} is 0 where the mid
sample is not. Their product is always 0:
S_self= 0. This detector on this pulse has no self noise.Kd= 3/2. FromS(τ) = (3/2)τ − 3τ²for i.i.d. data.S_e(0) = (3/4)(1/γ)(1 + 1/γ). One error has variance(3/2)/γ + 1/γ²; the lag-1 correlation is−(3/8)/γ − (1/8)/γ²; further lags are 0.
So:
The factor 1 + 1/γ is the noise-by-noise loss, S_L = 1/(1 + 1/γ).
The result assumes a transition density of one half; with density p_t
both Kd and the signal-by-noise term scale with it.
5.2 Other pulses, and DTTL¶
For an RRC matched pair g is the raised cosine and S_self is not
zero: the mid sample at a transition carries the neighbours' tails. The
three coefficients are sums over g at half-symbol spacing and are
computed, not typed. For DTTL the difference is of decisions, so the
coefficients also depend on the decision error rate at γ; they are an
expectation over the decision, computed numerically. One function
returns Kd, S_self, S_sn and S_nn for a detector, a pulse and a
γ, beside dp_symsync_ted_slope(), which already returns the first.
6. The loop SNR rule, and the bandwidth it gives¶
The timing loop's SNR is taken on the symbol clock's phase,
φ = 2π·τ, as a carrier loop's is taken on the carrier's:
A 20 dB loop SNR is σ_τ = 0.0159 symbols rms. With §5.1:
| Es/N0 | σ_τ at bn 0.005 |
loop SNR at bn 0.005 | bn for 20 dB |
|---|---|---|---|
| 4 dB | 0.043 symbols | 11.4 dB | 0.00068 |
| 5 dB | 0.037 symbols | 12.6 dB | 0.00091 |
| 10 dB | 0.019 symbols | 18.4 dB | 0.0035 |
The DSSS receivers ship bn 0.005, chosen on steady-state EVM. By this
derivation that is about seven times wider than the rule allows at
Es/N0 4 dB. The gain a loop actually runs at also scales with the square
of the signal amplitude at the detector (Gardner's error carries A²),
so the level the demodulator's gain control delivers at low Es/N0 moves
the effective bandwidth further.
7. The lock quantity¶
averaged over a block. It is a signed measure of where the loop samples,
not a detection statistic with a noise-only null. On integrate-and-dump
data with no noise it is +2 on a transition and 0 otherwise at the eye
centre, mean +1; half a symbol off the two samples trade places and the
mean is −1; with no transitions it is 0. Noise pulls the magnitude
toward 0. With no noise, a transition at timing error τ (in symbols)
gives
So the quantity is not a measure of the timing error:
- it is flat at the centre. The 20 dB rule's
σ_τof 0.0159 symbols lowers the mean by 0.2%; it crosses zero only at a quarter symbol; - it is even in
τ, so it cannot say which way the loop is off; - its mean moves with
γand with the transition density as much as withτ: a centred loop at low Es/N0 and an off-centre loop at high Es/N0 can read the same.
What it can do is tell a loop near the eye centre from one that is not, or from no signal. Its mean and variance are computed from the same model as §5, locked and unlocked, and:
- its threshold sits between the locked mean at the consumer's lowest
γand the unlocked mean, with the block length and counts set by the two variances and the stated error probabilities; - its sign is information. A block mean below zero says the loop is nearer the unstable zero than the stable one.
8. Slips¶
A slip is the loop's phase leaving one stable zero for the next. Its
mean time is a function of ρ and bn that grows exponentially with
ρ; at 20 dB it is far longer than any pass. A loop that slips while
its flags are up is therefore running at a loop SNR well under the rule,
or is not yet settled. Two things can do that besides the bandwidth:
the rate state away from the signal's rate (goal 4), and a stretch with
no transitions, where the detector's output is noise alone and the loop
coasts on its rate state.
9. Unknowns¶
- Which convention
bncarries inσ_τ² = 2·bn·S_e(0)/Kd².LoopFilter's report measuresbnas the noise bandwidth; the factor of 2 here is the one-sided form. A measured closed-loopσ_τsettles it, and moves §6's table by at most 3 dB. - Whether the loop SNR is defined on the clock's phase, as §6 takes it. It is the definition that makes 20 dB mean the same margin against a slip as it does for a carrier.
- The coefficients for RRC and for DTTL, and the lock quantity's mean
and variance against
τandγ: derived in §5 and §7, computed by nothing yet. - The closed-loop
σ_τ, measured. It needs the strobe's input-sample time as telemetry (#3177). - The signal amplitude at the detector inside each receiver at Es/N0 4 dB, and so the gain the loop really runs at.
- The loop through a gap: how far the phase coasts in 275 symbols with no transitions, from the rate state's error.
- The rate state's bound: the range the consumer's signal can have, and what the loop does at its edge.
- The slip rate against
ρ, measured where it is not zero, to check §8 against theory.
10. The work, in order¶
- The coefficient function of §5.2, held to §5.1's closed form and to an
open-loop measurement of
S_e(0)on the real detector. - The strobe-time probe (#3177), and the closed-loop
σ_τagainst §5's form, for both detectors and both pulses. - The lock quantity's mean and variance against
τandγ, computed and measured; its threshold re-derived from §7. - The rate state's bound, and the loop through a gap.
- Each consumer's
bnfrom §6 at its own lowest Es/N0, and the slip rate measured against §8. - The certification report (
tests/validation/symsync/), which the object does not have.
11. Measured: both loops on the rectangle¶
One run of validate_timing_loop_noise on both timing loops, in two
parts.
The rectangle against the linear loop. The harness's sweep at 2, 4
and 8 input samples per symbol, 400,000 symbols by 6 seeds a row. The
linear loop's timing error is §5's form with the detector noise and slope
the same run measured, through the loop filter's noise bandwidth for the
loop's gain (§6). RateSync matches it at all three rates.
| input samples per symbol | loop | no noise, bn 0.005: timing error rms, symbols | Es/N0 4 dB, bn 0.005 / 0.002 / 0.00068: timing error rms, symbols | the linear loop's, symbols | delivered Bn/bn | the loop filter's law |
|---|---|---|---|---|---|---|
| 2 | RateSync | 0.00014 | 0.0422 / 0.0270 / 0.0159 | 0.0431 / 0.0273 / 0.0159 | 0.96 / 0.98 / 1.01 | 1.000 |
| 2 | SymbolSync | 0.00000 | 0.0362 / 0.0213 / 0.0120 | 0.0443 / 0.0280 / 0.0163 | 0.70 / 0.61 / 0.57 | 1.048 |
| 4 | RateSync | 0.00007 | 0.0424 / 0.0267 / 0.0157 | 0.0430 / 0.0272 / 0.0159 | 0.97 / 0.96 / 0.97 | 1.000 |
| 4 | SymbolSync | 0.00000 | 0.0448 / 0.0276 / 0.0158 | 0.0438 / 0.0277 / 0.0162 | 1.10 / 1.04 / 1.00 | 1.048 |
| 8 | RateSync | 0.00003 | 0.0435 / 0.0270 / 0.0158 | 0.0432 / 0.0273 / 0.0159 | 1.01 / 0.98 / 0.99 | 1.000 |
| 8 | SymbolSync | 0.00000 | 0.0465 / 0.0282 / 0.0160 | 0.0442 / 0.0280 / 0.0163 | 1.16 / 1.07 / 1.01 | 1.048 |
That holds because the matched bank's rectangle arms follow the fraction
of an input interval: each edge tap weighs the share of its own input
interval inside the symbol. Arms that are the rectangle merely sampled on
the input grid are identical across one input interval, and a loop
steering them cannot see a timing error inside it. On such arms
RateSync read 0.289, 0.090 and 0.050 symbols rms at 2, 4 and 8 samples
per symbol where this table reads 0.042 to 0.044, and did not hold lock at
2 (#3362).
test_RateConverter_core.c and test_ratesync_core.c hold the arms, and
the harness's --check holds the closed-loop row.
SymbolSync steers a Farrow interpolator behind the bank and reads close
to its own law at 4 and 8. At 2 it reads under it; that row and the
root-raised cosine at 2 and 4 are not explained
(#3363).
The loop filter's output against time. The harness's --trace mode:
each closed-loop scenario from the first strobe, at 8 samples per symbol,
three times over. Started at the eye center the loop holds lock. Started
a quarter and a half symbol off it the loop acquires: half a symbol is the
detector's unstable zero, and a quarter is where its restoring force is
largest.
The table has the scenarios the four figures draw: the case the DSSS receivers run (the rectangle at Es/N0 4 dB) holding and acquiring, and the two settings that move a loop's rate state (level and clock offset).
A loop-filter panel is the output averaged over a block of symbols, with
its integrator, in parts per million of the symbol rate. A held scenario
shows all 60,000 symbols; an acquiring one shows its first 20 / bn,
where the acquisition is. A timing panel is the strobe's distance from
the eye center, in symbols, from both starting offsets. An acquisition
ends at 0 or at −1, the next eye center.
The integrator's mean, the output's rms and the timing error's rms are over the second half of each scenario, per symbol.
| run | when | machine | commit | toolchain | command |
|---|---|---|---|---|---|
validate_timing_loop_noise --trace, 108 scenarios of 29,000 or 30,000 or 59,000 or 60,000 symbols, one seed; and its sweep at --sps 2, 4, 8, 400,000 symbols by 6 seeds a row |
2026-11-25 20:15 UTC, 269 s | omni-x7358h: Intel(R) Core(TM) Ultra X7 358H (16 threads) |
47106df9e, clean |
GNU 15.2.0; glibc 2.43; build Release, flags -O3 -DNDEBUG, native OFF | make symsync-record |
| loop | pulse | Es/N0 | bn | level A | clock, ppm | started off center, symbols | ends at, symbols from center | inside 0.25 symbol for good after, symbols | integrator mean, ppm | output rms, ppm | timing error rms, symbols | figure |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| RateSync | rectangle | 4 dB | 0.00068 | 1 | 0 | 0 | -0.00 | — | +1.0 | 1024 | 0.0144 | plot |
| RateSync | rectangle | 4 dB | 0.00068 | 1 | 0 | 0.25 | +0.00 | 25 | +0.4 | 1015 | 0.0155 | plot |
| RateSync | rectangle | 4 dB | 0.00068 | 1 | 0 | 0.5 | -1.00 | 1798 | +1.1 | 1026 | 0.0135 | plot |
| RateSync | rectangle | 4 dB | 0.002 | 1 | 0 | 0.25 | +0.00 | 22 | +9.3 | 2955 | 0.0262 | plot |
| RateSync | rectangle | 4 dB | 0.002 | 1 | 0 | 0.5 | -1.00 | 489 | +10.0 | 2976 | 0.0248 | plot |
| RateSync | rectangle | 4 dB | 0.005 | 1 | 0 | 0 | -0.00 | — | +50.1 | 7348 | 0.0383 | plot |
| RateSync | rectangle | 4 dB | 0.005 | 1 | 0 | 0.25 | +0.00 | 21 | +49.4 | 7271 | 0.0453 | plot |
| RateSync | rectangle | 4 dB | 0.005 | 1 | 0 | 0.5 | -1.00 | 274 | +52.5 | 7356 | 0.0396 | plot |
| RateSync | rectangle | none | 0.005 | 1 | 0 | 0 | +0.00 | — | -0.0 | 0 | 0.0000 | plot |
| RateSync | root-raised cosine | 10 dB | 0.002 | 0.5 | 0 | 0 | -0.00 | — | +0.0 | 691 | 0.0071 | plot |
| RateSync | root-raised cosine | 10 dB | 0.002 | 2 | 0 | 0 | +0.00 | — | +103.5 | 11328 | 0.0213 | plot |
| RateSync | root-raised cosine | none | 0.005 | 1 | -1000 | 0 | -0.01 | — | +1019.0 | 4375 | 0.0043 | plot |
| RateSync | root-raised cosine | none | 0.005 | 1 | +1000 | 0 | +0.01 | — | -981.0 | 4369 | 0.0043 | plot |
| SymbolSync | rectangle | 4 dB | 0.00068 | 1 | 0 | 0 | -0.01 | — | +3.4 | 1125 | 0.0171 | plot |
| SymbolSync | rectangle | 4 dB | 0.00068 | 1 | 0 | 0.25 | -0.00 | 0 | +6.0 | 1128 | 0.0113 | plot |
| SymbolSync | rectangle | 4 dB | 0.00068 | 1 | 0 | 0.5 | -0.00 | 917 | +5.5 | 1121 | 0.0167 | plot |
| SymbolSync | rectangle | 4 dB | 0.002 | 1 | 0 | 0.25 | -0.00 | 0 | +26.1 | 3328 | 0.0230 | plot |
| SymbolSync | rectangle | 4 dB | 0.002 | 1 | 0 | 0.5 | -0.00 | 354 | +18.5 | 3311 | 0.0265 | plot |
| SymbolSync | rectangle | 4 dB | 0.005 | 1 | 0 | 0 | -0.01 | — | +70.7 | 8399 | 0.0469 | plot |
| SymbolSync | rectangle | 4 dB | 0.005 | 1 | 0 | 0.25 | -0.00 | 0 | +64.8 | 8412 | 0.0444 | plot |
| SymbolSync | rectangle | 4 dB | 0.005 | 1 | 0 | 0.5 | -1.00 | 169 | +77.7 | 8401 | 0.0496 | plot |
| SymbolSync | rectangle | none | 0.005 | 1 | 0 | 0 | +0.00 | — | +0.0 | 0 | 0.0000 | plot |
| SymbolSync | root-raised cosine | 10 dB | 0.002 | 0.5 | 0 | 0 | -0.00 | — | +27.1 | 2709 | 0.0109 | plot |
| SymbolSync | root-raised cosine | 10 dB | 0.002 | 2 | 0 | 0 | -0.00 | — | +27.1 | 2709 | 0.0109 | plot |
| SymbolSync | root-raised cosine | none | 0.005 | 1 | -1000 | 0 | +0.01 | — | +1026.1 | 4756 | 0.0050 | plot |
| SymbolSync | root-raised cosine | none | 0.005 | 1 | +1000 | 0 | -0.01 | — | -982.1 | 4748 | 0.0049 | plot |
See also: RateSync's timing on a rate cascade, the lock statistic's sizing as shipped, the loop filter, the NCO.



