# Log POWER FFT Output - Samples flipped in frequency

**URL:** <https://www.ruby-forum.com/t/log-power-fft-output-samples-flipped-in-frequency/233876>\
**Category:** GNU Radio\
**Created:** [January 19, 2015, 1:26pm UTC](https://www.ruby-forum.com/t/log-power-fft-output-samples-flipped-in-frequency/233876 "2015-01-19T13:26:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [January 19, 2015, 1:26pm UTC](https://www.ruby-forum.com/t/log-power-fft-output-samples-flipped-in-frequency/233876/1 "2015-01-19T13:26:27Z")

</div>

Hi,

I am working with a B200 and GNURadio over Debian. At first sight, UHD  
driver and GNURadio work fine with my B200.

In my first example I am sampling at 2Msamples centered at 938MHz. I  
generate a 20KHz FM signal with my generator at 937.1MHz.

When doing an FFT I see clearly my signal at the expected level/freq.  
However I want to estimate power (I am aware that I need calibration in  
order to give an accurate power figure).

I set in GRC an USRP signal source followed by an “log POWER FFT” (1024  
points) and a sink file.

Furthermore I see those samples in real time with a “QT GUI Vector sink”  
and I realized that the samples from “log POWER FFT” are flipped. I mean  
the first samples I get are from 938 to 939MHz and then from 937 from  
938MHz.

Does it make sense? ( I expected to get them from 937 to 939MHz without  
any  
jump). (The same way as using a FFT sink).

The aim of my example is to monitor the presence of power at certain  
bands.

Thanks in advance,

Jorge

---

<div class="post-metadata">

**Author:** ![jorgegetafe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/eada6e/32.png) [@jorgegetafe](https://www.ruby-forum.com/u/jorgegetafe)\
**Post date:** [January 19, 2015, 2:41pm UTC](https://www.ruby-forum.com/t/log-power-fft-output-samples-flipped-in-frequency/233876/2 "2015-01-19T14:41:06Z")

</div>

Looks like the log power fft doesn’t fftshift. I didn’t even know we had  
such a block 🙂 It’s a hier block anyway, you could chain fft -\> complex  
to mag -\> qt gui vector sink for equal results.

M

---

<div class="post-metadata">

**Author:** ![jorgegetafe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/eada6e/32.png) [@jorgegetafe](https://www.ruby-forum.com/u/jorgegetafe)\
**Post date:** [January 19, 2015, 2:47pm UTC](https://www.ruby-forum.com/t/log-power-fft-output-samples-flipped-in-frequency/233876/3 "2015-01-19T14:47:30Z")

</div>

On 01/19/2015 07:24 AM, Jorge G. wrote:

> in order to give an accurate power figure).  
> without any jump). (The same way as using a FFT sink).  
> Discuss-gnuradio mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)  
> That’s normal for FFTW-based FFTs (and a lot of others).

The output goes from:

DC to BW/2  
-BW/2 to DC

Where BW is your signal bandwidth.
