discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: Missing Positive Spectrum


From: Paul Boven
Subject: Re: Missing Positive Spectrum
Date: Fri, 12 Feb 2021 12:59:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

Hi again,

The problem turned out to be a bit more insidious...

On 2/12/21 11:58 AM, Paul Boven wrote:
Try: [list(range(-15, 0)) + list(range(1, 17))]

This should of course have been:
[list(range(-16,0)) + list(range(1, 17))]

Part of your problem is that you are doing a 128 channel FFT, and then view it through a sink block that also has an FFT resolution of 128 channels. This means that the block will pick exactly 128 samples, and display only those. With everything a nice power of two, there is a potential that you're always seeing the FFT of the same part of your packet, which is exactly what was happening here.

Let's look at your original 'Occupied Carriers':


[np.arange(-ncarrier/2,0)]+[np.arange(1,ncarrier/2+1)]

Which produces:

[array([-16., -15., -14., -13., -12., -11., -10., -9., -8., -7., -6., -5., -4., -3., -2., -1.]),
 array([ 1.,  2.,  3.,  4.,  5.,  6.,  7.,  8.,  9., 10., 11., 12., 13.,
        14., 15., 16.])]

So you have a vector of vectors, with the first inner vector running from -16 to -1, and the second one running from 1 to 16.

This means that the OFDM block will first consume 16 symbols and put them at the negative frequencies, and then it will consume another 16 symbols, and put those at the positive frequencies. But, due to the QT sink block running in lockstep with all this, you only ever saw the negative half.

You can easily verify this by changing the QT GUI sink to have a resolution of e.g. 1024. You will suddenly see a symmetric spectrum. But don't be fooled by this either, because actually you are alternatingly outputting a negative (-16 ... -1) spectrum, and then a positive (1 ... 16) spectrum.

You can prove this by adding a 'Denterleave' block with a block size of 128, and then use two QT GUI Sink blocks (at 128 resolution again). You must also set the Cyclic Prefix length to zero for this demonstration to work. You'll see one spectrum that only has negative frequency components, and the other one only has positive frequency components - they are alternating! Clearly not what you want your OFDM signal to look like. The vector at the top of this mail should solve that.

Regards, Paul Boven.



reply via email to

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