BladeRF Signal Generation
-
- Posts: 18
- Joined: Tue Feb 25, 2014 6:39 am
BladeRF Signal Generation
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.
-
- Posts: 455
- Joined: Thu Jun 06, 2013 8:15 pm
Re: BladeRF Signal Generation
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?"
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?"
-
- Posts: 18
- Joined: Tue Feb 25, 2014 6:39 am
Re: BladeRF Signal Generation
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
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
-
- Posts: 455
- Joined: Thu Jun 06, 2013 8:15 pm
Re: BladeRF Signal Generation
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.)
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.)
-
- Posts: 18
- Joined: Tue Feb 25, 2014 6:39 am
Re: BladeRF Signal Generation
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.
-
- Posts: 455
- Joined: Thu Jun 06, 2013 8:15 pm
Re: BladeRF Signal Generation
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
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