Phase-Coordinate Joint Filtering for Delayed Rhythmic Control

A walking robot driven by a central pattern generator (a network whose coupled units produce a steady rhythm on their own, with no external clock) spends most of its life on a repeating loop in state space. Its controller acts on sensor readings that are tens of milliseconds old. It must also cope with physical quantities that drift, such as payload mass or ground friction. The standard fix is to run a Kalman-type filter that estimates the hidden state and the unknown parameters together, then predicts the state forward across the delay. On a rhythmic system this fails for a geometric reason. The loop is strongly curved and contains sharp switches: one population releases the other from inhibition, or a foot strikes the ground. Linearizing the dynamics in ordinary coordinates, as the Extended Kalman Filter does, produces errors that compound over every step of the forward prediction.

We propose to do the filtering in the oscillator's own coordinates. The state becomes a phase (where on the loop the system is), a small amplitude deviation (how far it sits off the loop), and the unknown physical parameters. In these coordinates the forward prediction is close to linear: phase advances at a parameter-dependent rate, amplitude decays, and inputs nudge phase through a known sensitivity curve. All the curvature moves into the measurement model. There it is applied once per measurement instead of being compounded over the delay horizon. The same rhythm that makes ordinary linearization fail also keeps exciting the parameters, so mass and frequency-shaping parameters should become identifiable within a few cycles. A standing or non-rhythmic system does not have this property.

Core Claim

For a controller running on a stable, self-generated rhythm under sensing or actuation delay $\tau$, a joint state-parameter filter written in phase-amplitude coordinates will do three things. It will predict the delayed state with error that stays roughly flat as $\tau$ grows toward a sizable fraction of the gait period. It will stay statistically consistent across rhythm switching events. It will track drifting physical parameters at least as well as sigma-point filtering in raw coordinates at equal compute. First-order and sigma-point filters in raw coordinates will degrade most when the prediction window straddles a switching event. The new part is not "use an Unscented filter" but the choice of state coordinates for the forward prediction. Our ablations are built to separate these two ingredients.

The mechanism fits in one equation. Let $\phi$ be the asymptotic phase of the loop, $r$ the amplitude deviation, $\theta$ the slowly drifting parameters, $\omega(\theta)$ the rhythm frequency, $Z(\phi,\theta)$ the phase response curve (how much a small input shifts the phase at each point of the cycle), $\kappa$ the rate at which perturbations decay back to the loop, and $u$ the control or feedback input. Across the delay, the filter propagates

$$\phi(t+\tau) = \phi(t) + \omega(\theta)\,\tau + \int_t^{t+\tau} Z(\phi(s),\theta)\,u(s)\,ds, \qquad r(t+\tau) = e^{-\kappa\tau} r(t),$$

with $\theta$ following a slow random walk. The measurement is $y = h(\Gamma_\theta(\phi) + r\,v(\phi))$, where $\Gamma_\theta$ is the loop shape and $v$ its leading off-loop direction. This measurement carries all the nonlinearity, and it enters only at measurement times. The error of a first-order step scales with local curvature times state covariance. That is the Jensen-gap term highlighted by Gaussian Ensemble Belief Propagation. In phase coordinates the forward step has little curvature, so the term shrinks. The residual is governed by how fast $Z$ varies, which we measure directly.

Relation to Prior Work

The joint and dual Unscented filters of Dual Estimation and the Unscented Transformation supply the estimation machinery. They showed that propagating deterministic sample points through the true nonlinearity beats first-order linearization for simultaneous state and parameter tracking on chaotic series. They work in raw coordinates, assume known noise levels, and do not consider delay or oscillators. We reuse their augmented-state construction and change the coordinates it runs in. Robust Filtering and Smoothing with Gaussian Processes and Gaussian Ensemble Belief Propagation motivate the work. Both document large linearization failures on strongly curved one-dimensional systems, and both remove linearization by moment matching or ensembles at added cost. We instead remove most of the curvature by reparameterizing, which keeps the filter cheap. Invariant Extended Kalman Filtering for Pedestrian Deep-Inertial Odometry is the closest methodological cousin. It picks coordinates, a Lie group, in which error dynamics stop depending on the estimate. Our proposal does the analogous thing using the symmetry of a limit cycle rather than of rigid-body motion.

On the delay side, Event-Triggered Stabilization of Nonlinear Systems with Time-Varying Sensing and Actuation Delay proves stability of predictor feedback but assumes an exact model and noise-free full-state measurements. Data Efficient Reinforcement Learning for Legged Robots forward-predicts a quadruped's state across planning delay with a learned model and periodic trajectory generators, but does not estimate physical parameters online. Our filter supplies the missing piece: a noisy-measurement, parameter-aware predictor for exactly this setting. The human work of Wolpert, Ghahramani and Jordan and Bhushan and Shadmehr motivates the combination. It shows forward-model state estimation bridging sensory delay, and trajectory breakdown when the forward model's parameters are wrong. Both studies concern single reaches, not rhythmic movement.

On the oscillator side, Sparse Firing in a Hybrid Central Pattern Generator and Astrocyte Regulated Neuromorphic CPG produce robust rhythms but run without sensory feedback or estimation. SYNLOCO and Puppeteer and Marionette handle payloads and obstacles with model-free residual or supervisory policies rather than explicit estimates. The scalar Poincaré map analysis of Houghton et al. constrains our design. It shows that analytic phase descriptions become intractable beyond two neurons. We therefore compute phase, amplitude, and phase response numerically from simulation of the nominal model, not in closed form. Puppeteer also constrains scope: rhythm modulation alone crossed gaps only 17% of the time, against 99% when the rhythm could be overridden. Our claims are therefore limited to steady rhythmic regimes. During large, non-rhythmic departures the filter must detect the growth of $r$ and hand over to a raw-coordinate filter.

Research Program

The first component builds phase-amplitude coordinates for oscillators whose rhythm emerges from their structure rather than being written down. For each nominal parameter value on a grid, we simulate the closed-loop system and extract the loop $\Gamma_\theta$. We estimate asymptotic phase by relaxing perturbed trajectories back to the loop. We measure $Z(\phi,\theta)$ and $\kappa$ by pulse perturbations, then interpolate these objects smoothly in $\theta$ so the filter can differentiate or sample through them. Hybrid loops with contact events are handled the same way. Asymptotic phase is still defined for a stable hybrid cycle, but $Z$ may be discontinuous at impacts, and we will report where this happens.

The second component is the filter itself. It is an augmented Kalman filter over $(\phi, r, \theta)$ with delayed, noisy measurements. It predicts to $t+\tau$ with the propagation above and treats phase as a circular variable. We implement both a first-order and a sigma-point version, so that coordinate choice and linearization method can be varied independently.

The third component is identifiability analysis. We compute the observability rank of the augmented system along the loop and ask how many cycles of data are needed for the parameter covariance to shrink below a threshold. We contrast this with the same system held at a fixed point, where we expect mass to be only weakly observable.

The fourth component closes the loop. The estimated $\theta$ and predicted phase feed the oscillator's frequency and amplitude commands, which are the $\omega,\mu$ interface used by Puppeteer. This lets us check whether better estimates translate into better locomotion.

Baselines

The naive reference is a filter that ignores delay and uses nominal parameters. It acts on the most recent filtered state as if it were current. This bounds how much prediction and parameter tracking matter at all.

The main raw-coordinate competitor is the joint Unscented filter of Dual Estimation and the Unscented Transformation, run on the full augmented state and propagated across $\tau$ through the true dynamics. It is the strongest competitor because it already removes first-order linearization error, which is the problem our coordinates target. To check our implementation we first reproduce its Mackey-Glass result, where the Dual Unscented filter reached normalized MSE 0.15 against 0.20 for the Dual EKF, as reported in that paper. On the rhythmic benchmarks it receives the same measurements, the same delay, and the same noise-tuning budget as our filter: an equal-size grid search over process and measurement noise and parameter random-walk variance on held-out episodes. It also gets a matched number of dynamics evaluations per step. Beating it means lower phase-prediction error and a normalized estimation error squared (NEES, a standard test of whether the filter's reported covariance matches its actual errors) closer to nominal. This must hold on windows that contain switching events, at equal or lower compute.

A raw-coordinate Extended Kalman filter shows how bad first-order prediction is here. The file gives an anchor for the size of this gap: on the 1D nonlinear benchmark in Robust Filtering and Smoothing with Gaussian Processes, the EKF reached negative log-likelihood 3050, the UKF 25.6, and GP-ADF 0.0197. We rerun that benchmark as a calibration of our implementations. An ensemble filter in the style of GEnBP serves as the high-compute raw-coordinate reference.

On the robot we compare against a residual-policy controller in the SYNLOCO style, trained with payload randomization and given a history of observations. SYNLOCO reports carrying an 11 kg payload on a 12 kg Go1 at 0.8 m/s. That is a different robot and does not involve injected latency. For the A1 with injected delay and payload change, there is no reported result on Lacuna, so we train this baseline ourselves with a sample budget stated alongside the results.

The key ablation is a phase-coordinate EKF, first-order but in our coordinates, compared against the raw-coordinate UKF. If the phase EKF matches or beats the raw UKF, the coordinates rather than the sampling are doing the work. A second ablation freezes $\theta$ at nominal inside the phase filter, isolating the value of joint estimation.

Why not just…?

Why not just run a joint Unscented filter in ordinary coordinates? This is the real threat, and it may be enough for short delays. Sigma points capture curvature to second order within one step. They do not prevent error from compounding over many steps, and when a spread-out sigma set straddles a phase switch, points can fall on both sides of the switch. That is the multimodality failure described for Robust Filtering and Smoothing with Gaussian Processes. The horizon sweep below settles this. If raw-coordinate UKF error stays flat as $\tau$ grows to a quarter period, including on switch-straddling windows, our coordinate change adds little. We would then report it as a cheaper first-order equivalent rather than an accuracy gain.

Why not just train a policy with domain randomization and observation history? Such a policy can absorb payload and delay implicitly, as SYNLOCO's residual approach suggests. However, it gives no calibrated estimate of mass or phase, and it retrains when the delay distribution changes. Data Efficient Reinforcement Learning for Legged Robots reports model-based learning with trajectory priors as over 1000x more sample efficient than PPO. We train the policy baseline and measure two things: velocity-tracking error after an unseen payload step, and degradation when test delay exceeds the training range. A policy that wins on both would narrow our claim to interpretability and sample cost.

Why not just use an adaptive-frequency oscillator or phase-locked loop that entrains to sensor feedback? This is the simplest way to track phase and frequency, and for pure phase tracking it may match us. It does not predict across a known delay with uncertainty, does not separate frequency change caused by payload from change caused by friction, and gives no consistency check. We include it as a phase-only baseline. If it matches phase error, the case for the filter rests on parameter tracking and NEES.

Proposed Experiments

The first testbed is a set of emergent oscillators with known ground truth. These include a two-cell half-center oscillator with post-inhibitory rebound, a synaptic-depression pair of the kind analyzed by Houghton et al., and a population-rate reduction of the 2,000-neuron hybrid CPG of Strohmer et al., which reports a 188.44° average anti-phase difference that our reduction must reproduce. We also use a driven damped pendulum, a mechanical limit cycle that connects to the pendulum benchmark of Deisenroth et al.; no numerical result for that benchmark was found on Lacuna. On each system we observe a noisy, delayed subset of variables and let one parameter drift, such as a synaptic time constant or a pendulum length. We then sweep $\tau$ from 0 to 40% of the period.

The second testbed is the Unitree A1 in MuJoCo through LocoMuJoCo (codebase). The robot runs an amplitude-controlled phase oscillator CPG as in Puppeteer, with sensing delay of 10 to 60 ms, step and ramp payload changes, and friction changes.

Metrics are the same across testbeds. We measure phase and state prediction error at $t+\tau$, parameter tracking error and settling time in gait cycles, and NEES consistency. On the robot we add velocity-tracking error, fall rate, and compute per filter step.

The decisive check is prediction error plotted against $\tau$ divided by the period, split into windows that do and do not contain a switching event. We predict that raw-coordinate filters degrade sharply on switch-containing windows while the phase filter does not. We also predict the phase-coordinate EKF lands at or below the raw UKF. A second check compares parameter-covariance collapse on the rhythmic system against the same system held still. Mass should become identifiable within a few cycles only when the rhythm is running. If either prediction fails, the coordinate-change hypothesis is wrong in the regime tested, and we will say so.