discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] cross correlation in the time domain and through


From: Andy Walls
Subject: Re: [Discuss-gnuradio] cross correlation in the time domain and through Fourier tranform ?
Date: Thu, 22 Jun 2017 16:42:50 -0400

From:   jmfriedt
Date:   Thu, 22 Jun 2017 20:00:55 +0200
> 
> 
> However I'd like to demonstrate the same effect when going through the 
> Fourier 
> domain. I convert
> the stream to vector (4096 sample long is much more than the about 256-sample 
> long PRN), multiply
> one vector with the complex conjugate of the other, iFFT the result, making 
> sure I don't swap
> quadrants (I checked that FFT -> iFFT without swapping creates the same 
> original signal), back to stream
> and display the result -> same pictures as above, top graphs.
> 1. is this the correct way of processing Fourier transforms of incoming 
> signals

Well, for cross correlation, you want f[n] * conj(g[-n]) and it looks
like your math is performing that using F(s)conj(G(s)) so I think that
is OK.  Note that the time reversal really doesn't work for arbitrary
g[n], unless g[n] is of finite length or is periodic (which it is in
your simulation).


> 2. why are the cross-correlation peaks generated in the Fourier domain not 
> located at the exact same time
> than those generated in the time domain ? I could understand some lag due to 
> the low pass filter or 
> accumulating the data in the vector, but here I get a bit of jitter of cross 
> correlation peaks generated
> through the Fourier transform wrt those generated in the time domain.

Probably because the cyclic convolution != the linear convolution
without sufficient zero padding.  Without zero padding, you're going to
get aliasing at the start or end the output of your frequency domain
convolution.

See section 9.9 of 
http://www.ece.rutgers.edu/~orfanidi/intro2sp/orfanidis-i2sp.pdf
equations 9.9.1, 9.9.3, 9.9.7, and especially 9.9.10.
Also see section 9.9.2 on the Overlap-Add and Overlap-Save methods of
filtering a continuous stream using FFT's and fast convolution.



> Obvisouly this should all end up in a passive radar measurement: I can live 
> with time-domain 
> cross-correlation calculation, but this is the first time I am using the 
> stream 
> -> vector 
> functionality so I'd like to understand the consequences.

If you can detect the Tx pulses, track the PRIs, and work a Tx pulse
interval at a time, you should be able to do the proper zero padding and
perform fast convolution.

However your simulation doesn't look like a passive radar setup to me.

Regards,
Andy

> Thanks, JM
> 
> -- 
> JM Friedt, FEMTO-ST Time & Frequency/SENSeOR, 26 rue de l'Epitaphe, 25000 
> Besancon, France




reply via email to

[Prev in Thread] Current Thread [Next in Thread]