# Need to extract phase of incoming signal, how to find FFT bin of frequency of interest in GNU Radio?

When receiving a higher frequency signal, say 2 GHz, the freq as shown in frequency sink is often off by some amount (1-2 MHz) on the ettus B200. So I can't just assume the location of the signal is at the halfway point in the FFT bin.

Right now I'm using a hacky method using argmax and probe blocks to find the correct bin from which to extract the phase. But this doesn't feel fundamentally sound and doesn't work as well as I'd like. For example if I tune the frequency mid-measurement things start to go wonky. Anyone have any advice? My screen is ridiculously small so I can't capture the whole screen at once, but here's the relevant portion of the flow graph

EDIT: Problem was a misunderstanding in GRC. I'm fairly new to it so I didn't realize that the freq conversions happen at the USRP, not the waveform generators. The signal I was seeing on Frequency sink was VERY biased. I reformatted flowgraph to appropriate settings for the baseband frequency I was using, and the frequency of interest is exactly where it should be now,

fft_bin = (baseband_freq * fft_size / samp_rate) + fft_size/2

For those curious, this was just a pass-through sort of test comparing phase at USRP sink of Tx/Rx port with that of USRP source at Rx2 port. Serving as proving I understand what is happening before moving to next step.

EDIT2:

Leveled up: screen capture skills acquired

• 1-2 MHz is far, far too much. the b210's oscillator is accurate to <10 ppm, typically, not 1000 ppm to 2000ppm. Something is wrong with your description. – Marcus Müller Jan 29 at 19:34
• also, grc has a "screen capture" functionality that exports the whole canvas. – Marcus Müller Jan 29 at 19:52
• hm, what meaning does "phase" have in absence of frequency synchronization? That doesn't seem to be sensible to me, but I bet you have a reason why you're doing this! Maybe you could use said screen capture functionality to show your whole flow graph, and describe what you're doing, in the bigger picture. – Marcus Müller Jan 29 at 21:07