Estimation of delays between two or more spatially separated sensors is necessary in many applications especially those involving speed or time of flight measurements.
To allow for time-varying delays we assume the delay is constant within a local region. At the central sample estimate a local all-pass filter and extract the delay. Sliding the window by one sample allows a per sample delay to be estimated using the local all-pass (LAP) filter framework.
For an ensemble of signals with the same delay between each consecutive pair of signals we can estimate a common LAP (CLAP) filter. To allow estimation of both small and large and slowly and quickly varying delays the multiscale CLAP uses an iterative framework starting with large filters estimating the delay, aligning the signals and then repeating with a smaller filter .
The multiscale CLAP has been shown to successfully track time-varying delays better than alternative methods based on the coherence of the signals.
Delay estimation code can be found here: LAP_DelayEstimation
This code contains the several implementations of the LAP framework and a signal generation function which has a number of different delay functions.
Time-Varying Delay Estimation Using Common Local All-Pass Filters with Application to Surface ElectromyographyIn Proc. IEEE International Conference on Acoustics, Speech and Signal Processing, 2018, pp. 841–845.