Noise occurs when increasing SampleRate using LimeSDR-USB with Pothos

Hi all,

I am new to LimeSDR and this stuff is awesome! But I met a problem which is important for me when trying to use it.

I use PothosFlow on my Mac to work with LimeSDR-USB. I want to use Waveform Source block to generate a 10MHz baseband sinusoid signal with sample rate at 40MHz, and then transfer it to Soapy SDR Sink block in order to transmit the signal to LimeSDR board through USB3.0.

I set the frequency in SDR Sink block to be 70MHz and Sample Rate also 40MHz, and I used a spectrum analyzer to see the spectrum. But when I did this, I saw an abnormally high level noise in spectrum as shown in Figure 1.

Then I changed the baseband frequency to be 0.1MHz, and set the sample rate as 1MHz both in Waveform Source block and SDR Sink block. This time everything was fine, and the spectrum is quite clean as shown in Figure 2!

After that, I sustained the frequency as 0.1MHz, and increased the sample rate to be 40MHz, the noise occurred again as shown in Figure 3!

It seems that the highest sample rate for LimeSDR-USB3.0 is 60MHz, so anybody can help me on this? Thank you in advance!

Yuan

Have you tried with all other USB devices unplugged (or as many as you can remove), like no USB hard drives, no USB flash drives, no USB video adapters, …

And have you tried using a different USB port (not all USB ports are equal, performance will depend on the chipset used, which can change from port to port even on the same computer, I’ve seen computers with 4 different USB controllers from different manufacturers).

You said Mac, but no info about model type/CPU/RAM.

The other thing is that pushing 40MSPS IQ samples about as 32-bit floats inside a computer will use a minimum of ~320MB/sec memory bandwidth, and then an additional 160MB/sec when being converted to 12-bit values stored as 16-bit integers and an 160MB/sec when being being bit packed to go across the USB bus. So even with the simple flow graph you used above you could be talking about an idealised minimum of 640MB/sec (in reality it will be more) which could be roughly 20% of the maximum for DDR2 (2003), or 10% of DDR3 memory (2007), or 5% of DDR4 memory (2014), … These numbers are more a guideline than fact, because there is a whole range of performance for each RAM type increasing with higher prices.

If there are other tasks running that are RAM intensive on your computer, and it has slightly lower performance RAM, you could easily be hitting a memory bandwidth bottleneck.

There is also the conversion from floats to integers and packing samples, that requires a good bit of processing power at 40 million samples per second. I would quit all other applications to maximise available processing power.

Then there is the relatively recent patches that help mitigate the Meltdown and Spectre speculative execution vulnerabilities. You are probably talking about a best case of a 10% performance loss and at worst case two to possibly even four fold loss in performance for some tasks depending explicitly on the system calls used. The LimeSDR boards were both created before these CPU flaws were publicly known about, so there is the possibly that the mitigation patches could have a negative influence as well.

Oh and anti-virus, but this is a given, as well power supply issues that the board is not getting enough power for the higher sample rates which will typically use more power than lower sample rates.

I would be inclined to workout what the upper limit is for your computer by incrementing the sample rate up in steps (1-10MSPS) from 1MSPS up to 40MSPS and narrowing down where the problem starts to happen. Knowing where might help in understanding the source of the problem. I’d also be inclined to see if the same thing happens at a centre frequency of say 350MHz (640/2+30). And I would see if the upper limit changes with different USB ports as well. That would be my approach anyhow.

Hi mzs, thank you so much for your suggestions!

My tests were with all the other USB ports unplugged, and I have tried all of them but unfortunately, the problem still exists…

Here is some information about my computer.
37

And I also tried increasing the sample rate in steps and found that the threshold is about 14MHz, which means here is where the problem starts to occur. In addition, this problem seems to have nothing to do with the central frequency I set…

I will try to quit all the other tasks on my computer or maybe change another computer with higher performance and have another try. Thank you again!

14MSPS would use ~ 42MB/sec of USB bandwidth (14x2x12/8) which would be just over the maximum for a USB 2.0 HS port (~40MB/sec). At that data rate a few USB packets would typically be dropped on a USB 2.0 HS port for most chipsets. Does the signal look slightly cleaner at 13MSPS ? Is your LimeSDR-USB plugged into a external USB 2.0 hub by any chance ? Or possibly a thunderbolt to USB 2.0 adapter ? Or is it connected directly into one of the two USB 3.0 ports on the 13" MacBook Pro (Regina) ?

I don’t believe that your RAM or CPU would be a problem, I think that they are totally fine, that there is enough headroom capacity in them to handle a basic flowgraph like you have showed above.

Yeah, the spectrum looks a little cleaner when the sample rate is 13MSPS, but still not quite stable (there are some random shakes sometimes). I use a USB3.0 cable to connect LimeSDR to one of the USB3.0 ports on my computer and the other is left open.

It is true that sometimes LimeSDR would be just recognized as USB2.0 but this problem also exists when recognized as USB3.0.