# Emulating a Variable Delay

I am trying to emulate a satellite link where the delay time between the satellite and ground station changes over time due to the satellite's motion. I plan do this by converting to the frequency domain via FFT, multiplying it by $e^{-2\pi \omega_{delay} }$, and converting back to the time domain via IFFT.

However, when I implement this in GNURadio, it fails to work as I expect.

I generate a signal, pass it through the delay, and then match filter the original signal with the delayed signal. I then change the delay with a GUI slider. When I use the frequency-domain-phase-shifting method that I implemented, the correlation peak does not move when I change the delay. However, if I substitute in gr-baz's variable delay block, the peak does move when I change the delay.

Why does my implementation of the shifting method not work? Is it because my delay block only works with a finite window of the signal?

• At first glance you are properly implementing a delay in the frequency domain, however how do you handle the stream from one FFT block to another (or are your FFT the entire message in one block?). If mutliple blocks, how do you ensure the delay implemented is contiguous? – Dan Boschen Aug 16 '18 at 20:02
• I am not totally sure what you mean. All the FFTs in my flowchart process 2048 samples at a time. I need to be able to handle an indefinitely long signal source in real time, so I cannot load the entire signal into the FFT. Is it not possible to implement the phase shifting method with a FIR? – rytse Aug 16 '18 at 20:17
• You can absolutely implement a variable delay with an FIR filter (although that wasn't your question; your question was why the FFT approach was not working). To implement a variable delay consider a polyphase implementation (I think I have a post showing how that can be used nicely as a variable delay, will look up later if I can find it) or a Farrow Structure FIR filter. – Dan Boschen Aug 16 '18 at 20:31
• This link may help: dsp.stackexchange.com/questions/28252/… and mathworks.com/help/dsp/examples/… – Dan Boschen Aug 16 '18 at 20:33