Home / Docs-Technical WhitePaper / 21-EFT.WP.Metrology.Sync v1.0
Chapter 6 — Servo Modeling & Filtering (PLL / FLL / PI / PII / Kalman)
One-line objective: Build a unified clock-servo and filtering framework—deriving computable equations, tuning, and robustness strategies for PLL/FLL/PI/PII and Kalman—so that under diverse protocols and noise conditions the loop converges stably and meets SLOs on offset/skew/J.
I. Scope & Objects
- Applicable targets
- End-to-end time/phase/frequency servos: local clock closed-loop to upstream references (PTP/NTP/WR/GNSS/SyncE).
- Operating modes: offline replay tuning, online adaptation, multi-domain streaming.
- Inputs
- Timestamps & measurements: y_k (observed offset, seconds), Delta_k (RTT/OWD estimate), t_k (sample time, step Ts).
- Noise: R (measurement), Q (process), sigma_ADEV(τ) (see TimeBase Ch. 7).
- Protocol metadata: hwts, profile_id, correctionField, asym, dual-form arrival delta_form.
- Outputs
- Estimates & control: hat{phi}_k (phase/time error), hat{f}_k (frequency error, ppb), u_k (control), state ∈ {free, acquire, track, holdover}.
- Quality & compliance: offset_p95/p99, tdev(τ), MTIE(τ), contract evaluation, and manifest.sync.servo.*.
II. Terms & Variables
- States & observations
- phi_k: local vs. reference phase/time error (s)
- f_k: fractional frequency error (ppb)
- a_k: frequency drift (ppb/s, optional third order)
- y_k: observed offset (post-protocol compensation)
- Ts: sampling period (s)
- Control & gains
- u_k: control actuation (incremental frequency correction)
- Kp, Ki, Kii: PI/PII gains
- B: loop bandwidth (Hz), zeta: damping, wn: natural frequency (rad/s)
- Noise & filtering
- Q, R, P_k: Kalman process/measurement and error covariances
- j_gate: gating statistic (chi-square or robust distance)
- psi: stability index (see TimeBase & CrossStats)
*III. Axioms P606- **
- P606-1 (Frequency-before-phase): Establish frequency alignment (FLL/SyncE/NIC PLL) before phase/time lock (PLL/KF).
- P606-2 (Interchangeable noise families): Decompose noise per Allan taxonomy—white PM / flicker PM / white FM / random-walk FM—and design loop bandwidth to satisfy target tdev(τ).
- P606-3 (Dimensional integrity): check_dim(expr) everywhere; unit(phi)="s", unit(f)="ppb", unit(u)="ppb".
- P606-4 (Dual-form logging): When arrival/link estimates correct observations, record both T_arr forms and delta_form.
- P606-5 (Robust-first): Prefer gating and robust costs (Huber/Tukey) over hard rejection; on gating failure, enter holdover.
- P606-6 (Traceable tuning): Persist the origins, derivations, and versions of B, zeta, Q, R in the manifest.
*IV. Minimal Equations S606- **
- S606-1 (Discrete second-order clock model)
x_k = [ phi_k, f_k ]^T
x_{k+1} = A x_k + B u_k + w_k,y_k = H x_k + v_k
with A = [[1, Ts],[0, 1]], B = [[Ts],[1*0]] (control on phase via frequency integral) or B = [[Ts],[0]] (direct to phase increment), and H = [1, 0]。 - S606-2 (PI/PII control laws)
PI: u_k = - Kp * y_k - Ki * s_k,s_k = s_{k-1} + y_k
PII: u_k = - Kp * y_k - Ki * s_k - Kii * r_k,r_k = r_{k-1} + s_k
Closed-loop difference (PI): phi_{k+1} = phi_k + Ts * f_k + Ts * u_k,f_{k+1} = f_k。 - S606-3 (FLL & PLL–FLL composite)
Frequency observation: y_fll,k = ( y_k - y_{k-1} ) / Ts
FLL: u_k = - Kf * y_fll,k;Composite: u_k = - Kp * y_k - Ki * s_k - Kf * y_fll,k。 - S606-4 (Kalman servo, second order)
Predict: x_{k|k-1} = A x_{k-1|k-1} + B u_{k-1},P_{k|k-1} = A P_{k-1|k-1} A^T + Q
Update: K_k = P_{k|k-1} H^T ( H P_{k|k-1} H^T + R )^{-1}
x_{k|k} = x_{k|k-1} + K_k ( y_k - H x_{k|k-1} ),P_{k|k} = ( I - K_k H ) P_{k|k-1}
Control: u_k = - G * [ y_k, hat{f}_k ]^T (design matrix G; degenerate to PI when needed)。 - S606-5 (Third-order model with drift)
x_k = [ phi_k, f_k, a_k ]^T,A = [[1, Ts, 0.5*Ts^2],[0,1,Ts],[0,0,1]],H = [1,0,0] — suited for long holdover/aging. - S606-6 (Bandwidth/damping → gains, approximation)
With wn = 2 * pi * B, bilinear digital approximation: Kp ≈ 2 * zeta * wn * Ts,Ki ≈ ( wn^2 ) * Ts^2。
For PII: choose Kii so the three closed-loop poles cluster near {e^{-wn Ts}, e^{-wn Ts}, e^{-wn Ts}} (via pole placement or numeric solve). - S606-7 (Gating & robust costs)
Residual r_k = y_k - H x_{k|k-1};chi-square gate g_k = r_k^2 / S_k, S_k = H P_{k|k-1} H^T + R; if g_k > chi2_alpha, down-weight or reject.
Huber loss: rho(r) = { 0.5 r^2, |r|≤c ; c(|r|-0.5 c), |r|>c } (equivalent to adaptive inflation of R). - S606-8 (Dual-form arrival delta)
delta_form = | ( 1 / c_ref ) * ( ∫ n_eff d ell ) - ( ∫ ( n_eff / c_ref ) d ell ) |。
V. Implementation Flow M60-6 (Servo Modeling & Filtering)
- Noise modeling & base alignment
- Build windows on tau_mono; estimate sigma_ADEV(τ), tdev(τ); derive orders/magnitudes of Q (white PM → R; white/RW FM → Q).
- Apply protocol compensation and log both arrival forms; compute delta_form.
- Topology selection
- With SyncE: FLL or low-gain PI + KF; without hardware hold: composite PLL–FLL + KF.
- Long holdover: enable third-order [phi,f,a].
- Gain/covariance tuning
- Choose target B, zeta and offset_p99 budget; map to initial Kp, Ki (, Kii) via S606-6.
- Set R from protocol measurement noise (Ch. 4/5); fit Q from sigma_ADEV; minimize overshoot/settling via replay.
- Robust gating
- Configure chi-square gate or Huber constant c; down-weight/reject outliers; trigger state transitions (track → holdover) on persistent gates.
- Under observation starvation (loss/alarms): freeze updates; let state evolve by Q.
- Clock steering & publication
- Apply u_k to local DCO/NCO; log offset/skew/J, tdev/MTIE;
- Persist manifest.sync.servo.* (model, parameters, gates, evaluations, signature).
VI. Contracts & Assertions
- C60-61 (Stability): Closed-loop poles satisfy |z_i| < 1 - eps; overshoot ≤ M_p; settling_time ≤ T_settle.
- C60-62 (Noise match): KF_innov_var ≈ S_k (innovation variance consistent within tol_innov).
- C60-63 (SLO gates): offset_p99 ≤ offset_budget, tdev(τ_grid) ≤ tdev_budget(τ_grid).
- C60-64 (Robustness): gated_ratio ≤ gate_max; consecutive gates beyond threshold → holdover.
- C60-65 (Dual-form consistency): delta_form ≤ tol_Tarr.
- C60-66 (Dimensional checks): check_dim(all expr) = true.
VII. Implementation Bindings I60- (Servo & Filtering APIs)*
- design_servo(noise_report, targets) -> {topology, Kp, Ki, Kii, Q, R}
- pll_pi_step(y_k, Kp, Ki, state) -> {u_k, state'}
- pll_pii_step(y_k, Kp, Ki, Kii, state) -> {u_k, state'}
- fll_step(y_k, y_km1, Kf, Ts) -> u_k
- kf_predict(A, B, x, P, Q, u) -> {x_pred, P_pred}
- kf_update(H, x_pred, P_pred, R, y, robust) -> {x_upd, P_upd, gate_stats}
- auto_gate(residual, S, policy) -> weight
- tune_from_adev(sigma_ADEV, Ts, model_order) -> {Q, R}
- Invariants: state ∈ {free, acquire, track, holdover} lawful transitions; sum(U_components^2) ≈ U_total^2; manifest is replayable.
VIII. Cross-References
- Measurement links & timestamps: Chapter 4.
- Protocol parameters & asymmetry compensation: Chapter 5.
- Allan family & time-base noise: EFT.WP.Metrology.TimeBase v1.0 Chapter 7.
- Compliance, SLOs & release: this volume Chapter 14 and Methods.Cleaning v1.0 Chapter 10.
- Statistical uncertainty & gating tests: Methods.CrossStats v1.0 Appendix E and Appendix B.
IX. Quality SLIs & Risk Control
- SLI/SLO set: offset_p50/p95/p99, tdev@{τ}, MTIE@{τ}, settling_time, overshoot, gate_rate, holdover_time; innovation stats innov_mean≈0, innov_var/S_k ≈ 1.
- Risk mitigation:
- If offset_p99 breaches → reduce bandwidth B, enable FLL assist, or switch upstream.
- Persistent gating → holdover and escalate to third-order model.
- Long-term innov_var mismatch → re-estimate Q/R or enable robust loss.
- Abnormal dual-form deltas → re-check asym/medium tempco and re-calibrate links.
Summary
, ensuring stable convergence and auditable quality under multi-protocol, multi-noise environments.noise modeling → topology selection → gain/covariance tuning → robust gating → manifest publication descriptions of PLL/FLL/PI/PII and Kalman clock servos, delivering a closed-loop workflow from difference-equation and state-spaceThis chapter unifiesCopyright & License (CC BY 4.0)
Copyright: Unless otherwise noted, the copyright of “Energy Filament Theory” (text, charts, illustrations, symbols, and formulas) belongs to the author “Guanglin Tu”.
License: This work is licensed under the Creative Commons Attribution 4.0 International (CC BY 4.0). You may copy, redistribute, excerpt, adapt, and share for commercial or non‑commercial purposes with proper attribution.
Suggested attribution: Author: “Guanglin Tu”; Work: “Energy Filament Theory”; Source: energyfilament.org; License: CC BY 4.0.
First published: 2025-11-11|Current version:v5.1
License link:https://creativecommons.org/licenses/by/4.0/