find cross correlation lag by optimization I have data from many closely located sensors (geophones). These are often contaminated with coherent noise which I need to remove. Some of the most effective de-noising methodologies work if the noise signals are aligned. To do that I do cross correlation on neighbouring sensor data and find the delay and shift my data accordingly. The problem is the noise source is moving, but slowly. So I would need to recalculate the delay for every new data set. Knowing the initial delay (estimated from the first data set), is there a way, using some optimization methods to find the subsequent delays, i.e. at each step use the previous delay estimate as input (together with new data) to some optimization function and find the delay for the new data set (in Matlab) ?

Thanks in advance
This paper has an algorithm that seems to try to do what you're reqeuesting.  I don't have time right now to look at implementing it, but may do in a few days.

The paper uses the signal model:



and the RLS algorithm to modify a filter:



I'm not sure whether this qualifies as any different, as it seems to use the peak of the autocorrelation as its delay estimate.