Estimation of delays between two or more spatially separated sensors is necessary in many applications especially those involving speed or time of flight measurements.
We can equate constant delay between two signals as filtering with an all-pass filter. At the same time any all-pass filter has a rational structure. Therefore, estimating a delay becomes an issue of estimating the linearised all-pass filter.
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 [1].
The multiscale CLAP has been shown to successfully track time-varying delays better than alternative methods based on the coherence of the signals.
Estimation error for a sinusoidal delay.
Code
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.
References
Time-Varying Delay Estimation Using Common Local All-Pass Filters with Application to Surface Electromyography
C. Gilliam, A. Bingham, T. Blu, and B. Jelfs
In Proc. IEEE International Conference on Acoustics, Speech and Signal Processing, 2018, pp. 841–845.
Estimation of conduction velocity (CV) is an important task in the analysis of surface electromyography (sEMG). The problem can be framed as estimation of a time-varying delay (TVD) between electrode recordings. In this paper we present an algorithm which incorporates information from multiple electrodes into a single TVD estimation. The algorithm uses a common all-pass filter to relate two groups of signals at a local level. We also address a current limitation of CV estimators by providing an automated way of identifying the innervation zone from a set of electrode recordings, thus allowing incorporation of the entire array into the estimation. We validate the algorithm on both synthetic and real sEMG data with results showing the proposed algorithm is both robust and accurate.