Skip to content

Out-of-Sequence Measurements and Fixed-Lag Smoothing

Out-of-Sequence Measurements and Fixed-Lag Smoothing curated visual

Visual: measurement timeline showing acquisition time, arrival time, fixed-lag smoother window, retrodiction update, stale rejection, and replay policy.

Sensors report when a measurement was acquired; middleware reports when it arrived. These are different times. Updating a current-time state with an old measurement as if it were current injects timing-dependent spatial error.

Out-of-sequence measurement (OOSM) handling is the estimator policy for delayed measurements whose acquisition time is earlier than already-processed data. Fixed-lag smoothing is the standard robotics answer when delayed evidence is important but full batch smoothing is too expensive.



Time Semantics

Every measurement should carry at least:

FieldMeaning
acquisition time t_zwhen the physical signal was sampled or integrated
sensor clocktime base used by the device
host receipt time t_arrwhen software received the packet
estimator time t_nowstate horizon already processed
latency estimatemodeled offset between acquisition and availability

The residual belongs at t_z, not at t_arr.

text
camera frame acquired at 10.000 s
arrives at estimator at 10.085 s
current propagated state is 10.080 s

This is an OOSM by acquisition time.

Policy Options

PolicyMechanismUse when
Reject staledrop measurements older than maximum agesensor is low value or delay is unbounded
Delay compensationmodel known latency in the residualdelay is stable and smaller than state spacing
State-history EKFupdate past state, propagate correction forwardlow-dimensional filters with manageable buffers
Rollback and replayrestore checkpoint at t_z, replay later inputsdeterministic filter pipeline exists
Fixed-lag smootheradd factor at t_z inside sliding windowmulti-sensor delayed evidence matters
Continuous-time smootherevaluate trajectory at exact acquisition timerolling shutter, LiDAR deskew, calibration

The worst policy is silent arrival-time fusion.


Fixed-Lag Smoothing

A fixed-lag smoother estimates only a recent trajectory window:

text
X_window = { x_(t-L), ..., x_t }

minimize over X_window:
  sum_i || r_i(X_i, z_i) ||^2_Ri

When a delayed measurement arrives:

  1. Convert t_z to the estimator time base.
  2. If t_z is inside the active lag, attach the measurement factor to the corresponding state or interpolation interval.
  3. Reoptimize or incrementally update the active window.
  4. Publish the current state and updated covariance or health status.
  5. If t_z is older than the lag boundary, reject it or process it through an explicitly designed stale-measurement path.

Variables older than the lag are marginalized into a prior. That keeps compute bounded but makes the lag boundary a real information boundary.


Retrodiction and Replay

Filters can handle OOSMs by retrodiction:

text
buffer states and covariances
receive z_d at delayed time d
update x_d using z_d
propagate correction from d to now

This needs cross-covariances or stored transition products. A simpler but more expensive implementation is rollback and replay:

text
load checkpoint before t_z
insert delayed measurement in timestamp order
replay controls, IMU, and measurements to current time

Replay is attractive for deterministic logs and incident analysis. For online systems, fixed-lag smoothing often gives the same conceptual benefit with a bounded optimization window.


Stale-Rejection Rules

Define rejection policies before tuning:

  • t_z < t_now - lag: reject or route to offline smoother.
  • sensor clock conversion missing: reject and report timestamp fault.
  • frame duration overlaps multiple states but no interpolation exists: reject or down-weight until modeled.
  • duplicate measurement ID: ignore or replace deterministically.
  • message arrival would require replay beyond compute budget: reject and count budget miss.

Rejection should be visible in estimator health. Silent drops make replay and safety analysis impossible.


Implementation Notes

  • Store measurements by acquisition time in a monotonic priority queue.
  • Keep raw IMU/control data long enough to replay the entire lag plus margin.
  • Use hardware timestamps where possible; receipt time is only a fallback.
  • Make the online and replay estimators use the same ordering policy.
  • Keep marginalization and FEJ policy consistent; stale linearization priors can create false certainty.
  • Plot residuals against acquisition time, arrival delay, speed, yaw rate, and acceleration.
  • Include sensor frame duration for rolling-shutter cameras and spinning LiDAR.
  • Export counters for delayed accepted, delayed rejected, replayed, and over-lag measurements.

Failure Modes

Failure modeSymptomMitigation
Arrival-time fusionlocalization bias grows with speed and yaw rateupdate at acquisition time
Lag too shortuseful camera/GNSS updates are rejectedincrease lag or reduce pipeline latency
Lag too longsolver misses real-time budgetreduce variables, marginalize features, or split smoother
Missing cross-covarianceretrodicted EKF correction is inconsistentstore transition products or use smoothing
Non-deterministic replayonline and offline estimates disagreetimestamp-total ordering and stable tie breaks
Stale marginal priorold delayed measurement cannot affect current stateexplicit over-lag policy
Hidden clock jumpmany measurements become OOSM at onceclock monitor and time-base reset

Minimal Mental Model

A delayed measurement is not wrong because it arrived late. It is wrong only if the estimator applies it at the wrong time or after the system has deliberately closed the window in which it can still be used consistently.


Sources

Public research notes collected from public sources.