BladeRF Signal Generation

Follow our development of DSP and SDR tutorials

Moderator: robert.ghilduta

Post Reply
2011EE10487
Posts: 18
Joined: Tue Feb 25, 2014 6:39 am

BladeRF Signal Generation

Post by 2011EE10487 » Sun Mar 30, 2014 12:12 pm

I tried to generate a sine wave using bladeRF but I couldn't get a clear for all sample rates. I could get a sine wave when my sample rate is below 2.5MHz. So is there any way to determine the maximum sample rate for the device. Further is there any relation between bandwidth and sample rate.

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF Signal Generation

Post by jynik » Mon Mar 31, 2014 10:02 am

You might want to check out this wiki page -- it sounds like it might cover what you're looking for.

You'll generally want your bandwidth to be <= than your sample rate. Look into "complex sampling" if you're thinking, "Hey, shouldn't my bandwidth be 1/2 * fs?, according to the Nyquist Rate?"

2011EE10487
Posts: 18
Joined: Tue Feb 25, 2014 6:39 am

Re: BladeRF Signal Generation

Post by 2011EE10487 » Tue Apr 01, 2014 11:44 am

Hi,
I tried your wiki and I was getting a gap of 1, but in between I sometimes got a gap of high positive and negative value (10^3 - 10^4 or even more) at 4MHz sampling rate. I further decrease my sample rate to 2 MHz but was getting the same problem. So to decide my maximum sample rate do I have to do hit and trial such that I get a gap of just 1 or is there same other method.


Thanks

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF Signal Generation

Post by jynik » Tue Apr 01, 2014 5:51 pm

The gap of 1 is to be expected; it's a known issue where some buffers in the FPGA and/or FX3 have some leftover samples.

Even on USB 2.0, I feel like you should be seeing much better results at lower sample rates such as 4Msps. Have you had a chance to test the blade on other systems? What is your host machine running, and is all your bladeRF stuff (host code, firmware, FPGA) up todate?

As far as this wiki article goes, you're correct -- it's just a quick trial and error approach to get a rouch feel as to where your system stands. If you really want something more precise, you'll probably want to write something to automate it. (That's been requested as a potential bladeRF-cli feature.)

2011EE10487
Posts: 18
Joined: Tue Feb 25, 2014 6:39 am

Re: BladeRF Signal Generation

Post by 2011EE10487 » Tue Apr 01, 2014 8:06 pm

Yes all my bladerf stuff are up todated. My system is a hp lenevo g6, 2nd generation i5. I am running Ubuntu 12.10 and I haven't tried it on other system. Further I'm using USB 2.0.

jynik
Posts: 455
Joined: Thu Jun 06, 2013 8:15 pm

Re: BladeRF Signal Generation

Post by jynik » Thu Apr 03, 2014 4:19 pm

With those specs, something tells me you should be seeing some better performance.

I think trying another machine might be worthwhile...if nothing else, just as a sanity check. I see that the latest GNU Radio Live DVD has added support for the bladeRF. I haven't used it myself yet, but perhaps you might want to give that a shot on another machine? (At least you won't have to install everything on whatever test machine you might try.)

Another thing worth trying is making sure your machine isn't scaling your CPU frequency down. I've noticed performance improvements after setting my cpu frequency scaling governer to 'performance'; my disto appears to default it to 'on-demand'.

Here's a script to do this: https://gist.github.com/jynik/9907605

Post Reply