I posted a similar question a while ago here (I'm posting this follow-up since I'd like to focus more on cross-correlation now). I have a setup where I have two software-defined radios connected to different antennas, and a circuit switches the antennas on and off at the same time. I am trying to time-sync the two signals as precisely as possible. The radios are sampling at 2.4 MS/s and I'm sampling about 0.2 seconds of data. Even though I've synced the two clocks of the radios, due to slight hardware differences there will always be a slight delay in one of the signals which is why I need to sync them in software. I have a system that is able to sync the signals most of the time just by getting the signal's envelopes and identifying where the antenna switching happens, but this doesn't work so well when the "silence" part is too noisy / too high amplitude, so I would like to use cross correlation.
I'm normalizing both signals to have a max amplitude of 1, and I've also tried downsampling to make it lower detail. I'm just doing
signal.correlate(s0, s1) and plotting the result, but I don't even see any local maximum at the correct delay (I know the correct delay from the other method).
Here's the plotted correlation:
And here it is zoomed in to where I'd expect the actual delay to be:
There doesn't seem to be any local max around 1069.
Is anyone able to successfully sync these two signals using cross correlation, or is it just not possible for this kind of data? Everyone doing similar project to me uses cross correlation to do the time synchronization, so I'm not sure why it's not working at all for me (even when I use their code). Any help would be greatly appreciated!