Skip to content

Clock impairment length normalization introduces one-sample alignment jumps #476

Description

@ajpotts

Summary

Clock jitter and drift restore the input length by center-cropping or padding the variable-length resampler output. A one-sample change in raw output length can therefore move the final signal by a full sample and overwhelm the intended fractional-sample impairment.

Evidence

For an 8192-sample complex tone with 5000 polyphase branches and seed 7:

  • 0 ppm: raw length 8216, final best lag 0
  • 10 ppm: raw length 8217, final best lag 1
  • 100 ppm: raw length 8217, final best lag 1
  • 1000 ppm: raw length 8217, final best lag 1

The wrappers crop or pad based only on output length. If exactly one sample is discarded, slice_back is zero and a slice ending at -slice_back can also become empty.

Proposed direction

Track group delay and sampling-time origin explicitly, then normalize length without changing alignment when raw output count crosses an integer boundary. Add impulse or tone regression tests for alignment and the one-sample discard case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions