# Time delay estimation between two complex signals(IQ)

I need to time align two complex signals. The two signals obtained were at different RF frequency before digitisation. So,I have two complex signals(IQ) and I need to do delay estimation and apply correction on one of the signal.

Cross-correlating the absolute values of two signals and finding the peak gives one answer while cross-correlating the complex values and then finding the peak from the absolute value of the obtained (complex)correlation gives another peak?

Which method shall I choose? what is the best way forward? Any insight into it?

• Here's an insight: Using the absolute values will fail utterly for a complex pure tone, as its absolute value stays constant. Apr 5, 2019 at 14:55

Cross-correlating the absolute values of two signals will often not yield good results. Consider the case in which you are trying to align two continuous (i.e., non-pulsed) signals. Their absolute values are roughly constant with time. Cross-correlating them will yield no peak. If the amplitude of the signals changes with time, you may get a peak, but the cross-correlation will be able to exploit only the amplitude of the signals.

On the other hand, cross-correlating the complex values will yield a better result because it exploits both the amplitude and phase of the signals. Note that you will generally need to look at the absolute value of the correlation, not just the real component, since the phases of the two signals are usually not the same. Some complication arises if the two time-delayed copies of the signal have different frequency shifts, in which case long correlations may not yield a peak. That frequency difference can sometimes yield useful information, however. This is a significant topic in radar.

• Thanks, I actually edited my post. The signals are actually at different frequency at RF before digitisation. How this will effect the correlation?
– g2g2
Apr 10, 2019 at 12:21
• If the two signals are at different frequencies, cross-correlating the I/Q signals will generally not lead to a useful result. If you know the exact frequency difference between the two signals, you can remove the frequency difference before cross-correlating. But you must know the frequency difference exactly - or at least to an accuracy such that the accumulated phase difference between the two frequencies is small over the correlation length. Can you tell us more about your signals? Apr 13, 2019 at 0:14
• Thanks I know the frequency difference. So, I frequency shifted one of the signals and then cross-correlated their complex values. Then I look at the peak of the absolute value of the cross-correlation that gives me delay. Now, If I shift one of the signal using this delay to align them. My question is that will these two signals be aligned now? I think not. As, the dealy I get would be an integer delay. Do I still need to add some phase to one of the signals to align them? what does the phase part of the cross-correlation indicates?
– g2g2
Apr 14, 2019 at 10:13
• I have a transmitter and I transmit my signal to a source and then the signal hits the non-linear device and is recieved at a reciever working at different frequency. All this is done in a controlled environment. All I have the IQ transmit and IQ recieve signals. Now, I must align my Tx to Rx signal to further do my research work. I am stuck here in the first part.
– g2g2
Apr 14, 2019 at 10:23
• Using the technique you described, the signals should be aligned to within one sample period. You can interpolate the peak of the cross correlation magnitude to obtain finer resolution, although the accuracy with be limited by the SNR. The phase of the complex cross correlation indicates the phase difference between the two signals - again assuming that the frequency difference between them has been perfectly removed. Apr 16, 2019 at 5:48