There are some good resources on our site:
Understanding the Bilateral Filter - Neighbors and Sigma.
How to Validate Bilateral Filter Implementation?
What Is the Bilateral Filter Category: LPF, HPF, BPF or BSF?
Is the Bilateral Filter a Solution of Some Variational Method?
In my opinion, the best way to understand the Bilateral Filter is looking at concise ...
From what you've said, you have two sample sets:
$$x_n, n = 0 \ldots N-1$$ and $$y_m, m = 0 \ldots M-1$$
where $M \ne N$ and you want to compare the distributions of the underlying processes.
Do you know anything about the expected distribution of the measurements?
If they're Gaussian, then you can just calculate the sample mean and sample standard deviation ...
You have many great code examples at our community:
2D Frequency Domain Convolution Using FFT (Convolution Theorem).
Kernel Convolution in Frequency Domain - Cyclic Padding.
2D Image Convolution: Spatial Domain vs. Frequency Domain Convolution in the Computational Complexity Sense.
Applying Image Filtering (Circular Convolution) in Frequency Domain.
There is a somewhat more fundamental issue with delay/range estimation in this scenario, of which you haven't made mention, and that is the inherent phase ambiguity when trying to match two continuous-wave sine functions. If you send a waveform out with phase of $0$ rad, and get one back with a phase of $\pi/2$ rad, was it delayed by 250ns or was it delayed ...
Are the PI and IIR LPF filters equivalent?
A PI filter is an IIR LPF, but a low-pass filter is more general. So -- no.
Is my understanding of this "modified" PLL structure correct?
I can't tell, but I think you're lacking in the understanding of closed-loop control systems.
Should the IIR filter work in this case?
Maybe, but it depends on ...
I had a look at the two .wav files.
The most likely cause of the "error" is that the file 1.wav has about 70 milliseconds (~3340 samples) of noise at the beginning.
Even 2.wav has a very long period of just noise at the beginning. It is just noise for about the first 30 milliseconds (about 1440 samples.)
With less than 5000 samples, you aren't ...
What you describe is a linear phase. Assuming that your sample rate is 48 kHz, you can implement this simply with a delay of -1.2 samples.
The tricky parts here are that the delay is negative, i.e. the filter is non causal and that the delay is fractional (and not an integer number of samples).
This can all be done, but needs to be carefully tailored to the ...