0
$\begingroup$

I'm using a Nuand BladeRF 2.0 micro, which is based on the AD9361. I'm just trying to get a handle for how it behaves at the moment, so I was testing generation of some CW tones using GNU Radio and see some interesting results on my spectrum analyzer.

This is f_s = 30MHz, LO = 900MHz; there is also a 800-1050MHz filter between the BladeRF and the spectrum analyzer.

Generating a 7.5MHz CW tone (1/4 x f_s), just using the Cosine Source block directly connected to the Soapy SDR sink, I get:

7.5MHz tone spectrum

7.6MHz tone spectrum:

7.6MHz tone spectrum

8MHz tone spectrum:

8MHz tone spectrum

What am I seeing here w.r.t the "spikes" above the noise floor, i.e. -70dBm with this RBW?

I understand in principle that there's a reconstruction filter after the DAC, which should be a lowpass filter to prevent higher-frequency images, but that doesn't seem to relate to what I'm seeing in the images above.

Obviously the FFTs in GNU Radio Companion show nothing but the pure tone with everything else >100dB down.

I have some intuitive idea that the difference in the spectrum is due to rounding errors between the floating point representation in GNU Radio and the 12 bit DAC output. I tried to simulate this with a pair of Complex to IShort / IShort to Complex blocks and I can generate the same general structure but the power level of the spikes is still much lower.

Is this just how it should look, or is this an indication of a misconfiguration or other problem?

EDIT: I investigated the behavior using different amplitudes for the Signal Source to see if that would change things, per the suggestion from Marcus Müller, and it seems that is the cause!

Using the same 8MHz tone as before, with the amplitude at 0.25:

250m

Then at 0.5:

500m

Even at 0.99 all is well:

990m

Only when I go to 1.0 do I get all the spurs:

1

EDIT2: time domain view is actually super interesting; I dialed back the LO to 100MHz because my oscilloscope is only good for 300MHz; here is the 7.6MHz tone with the trigger set slightly above where the waveform should ever go:

7.6MHz time domain

Looks like it glitching like that in bursts, and within those bursts every 2.5 microseconds.

spurious burst

Really I have no idea what to make of it. None of that time-domain behavior is apparent with the amplitude at 0.99 either.

$\endgroup$
6
  • $\begingroup$ what's the amplitude of the signal source? Your rounding error intuition would be my first guess as well, but then we'd be talking about a catastrophic rounding failure. Clipping seems more likely! $\endgroup$ Apr 18, 2022 at 11:46
  • $\begingroup$ In the digital domain, the amplitude of the Signal Source is 1.0 - should be full-scale and no more - I will try half-scale and see how it looks. I wouldn't expect to see any clean tones if there was clipping though. In the analogue domain, it's about -2dBm in those screenshots but I tried much lower gain settings (like -30dBm) and the spectrum just moves down rather than changing shape much. $\endgroup$
    – nhw76
    Apr 18, 2022 at 12:07
  • $\begingroup$ It is clipping! I updated the original question with more data. It's very mysterious that it did not show up with the 7.5MHz test, and it only shows up in the last tiny bit of the range. Will have to make sure to stay slightly below full-scale it seems. $\endgroup$
    – nhw76
    Apr 18, 2022 at 12:50
  • $\begingroup$ @MarcusMüller if you want to put your suggestion about clipping as an answer, I will mark it as accepted. $\endgroup$
    – nhw76
    Apr 18, 2022 at 13:37
  • $\begingroup$ huh! at 1.0, it should not be clipping. this is mysterious! $\endgroup$ Apr 18, 2022 at 13:40

2 Answers 2

0
$\begingroup$

At least 2 possibilities:

It could be some windowing artifacts from using a non-windowed (or rectangular windowed) FFT for the spectrum plot. The amount of window artifacts depends on how far the period of the CW tone is from being exactly integer periodic in the length of the FFT.

The other cause of this kind of noise floor could be quantization, which can depend on the ratio between the CW tone and the sample rate(s). The quantization noise pattern can also change with the ratio of the signal level to the full range of the DAC and the ADC.

$\endgroup$
2
  • $\begingroup$ Thanks for the response. On your first point, this isn't an FFT output however. It's from an actual, swept spectrum analyzer using the typical Gaussian filter shape. I suppose that realistically rules out that possibility. The quantization noise is what I think I'm seeing; given that it drops completely away at tones with frequencies that are integral divisors of the sample rate. $\endgroup$
    – nhw76
    Apr 17, 2022 at 22:49
  • $\begingroup$ Harmonics. caused by outputting basically a square wave. But harmonics occur even in analog transmitters. $\endgroup$
    – user10489
    Apr 18, 2022 at 11:32
0
$\begingroup$

Based on discussions with other BladeRF users; it seems there is a known issue with the current firmware - it multiplies the complex samples by 2048 to provide the values for the 12 bit DAC and rounds down; however, the range of the DAC is [-2048, 2047] due to two's complement representation of the signed values.

The net result is that samples of exactly 1.0 overflow the range and get converted to wrong output sample values, resulting in all kinds of weird spurs.

Now I know this, I can stick a constant scaling immediately before the sink to make sure that I never quite hit full-scale.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .