Page 1 of 1

Generated noise from BladeRF

Posted: Fri Nov 10, 2017 6:49 am
by samv
Hello everybody,
I have built a QPSK transmitter which send random data. this modulated signal is sent to the osmocom block which interfaces with the bladeRF. When I read the signal on a spectrum analyzer, i get noise around my signal that I don't want. What is noise come from? And how do I remove it?
Here is my osmocom setup

Tx freqency: 1.6GHz
sample rate : 4MHz
Bandwidth filter: 1.5MHz

Links below are screenshots from the spectrum analyzer and the GRC flowgraph

Thank you in advance for your help :)

Re: Generated noise from BladeRF

Posted: Fri Nov 10, 2017 5:20 pm
by ykhaled
Why don you post the spectrum analyzer plot?
did you calibrate your I/Q?

Re: Generated noise from BladeRF

Posted: Mon Nov 13, 2017 12:53 am
by samv
I have posted my spectrum analyser result ( last three link in my fist post). I repost here:
free mode:
Max holde:

I made the DC offset correction as Bladerf recommended. I haven't done the I/Q balance calibration. I will try to do it.
Thank you.

[UPDATE] I made the I/Q calibration and DC offset calibration following the guide on bladerf wiki. I have still the same probleme after sending my data. Here is the result:

Re: Generated noise from BladeRF

Posted: Mon Nov 13, 2017 11:23 am
by rtucker

So I was indeed able to reproduce this issue...

Looking at the generated signal, something that caught my eye was the constellation:

That didn't look quite right, so I looked at the time domain:

There's a lot of really fast switching going on there, like more than I'd expect for 8 samples per symbol at a 4 MHz sample rate. Each symbol should last for about 2 us, but some of these transitions are closer to 1 us.

Long story short, I think the constellation object expects the random source to be in the range [0,3], and it's overflowing and behaving poorly. I set the random source range to [0,4) and life is good...

Time domain display:

Let me know if this cleans things up for you. Thanks! -rt

Re: Generated noise from BladeRF

Posted: Tue Nov 14, 2017 3:08 am
by samv
Thank you very much for your answer! It works now!
There is still some point that I don't understand:

1: the spectrum image shows a "house" with a peak in the middle of the signal.
Here is a capture of what I expected:
Image ->

Here is a capture of what I received:
Image ->

How can I avoid this "house effect"? Or is it a normal form?
I did the DC offset calibration by the way.

2. If I want to send data, should I use another block to generate the QPSK or should I unpack all my bit before going the QPSK constellation?

3. My reception does not synchronize every time when I start my flowgraph. I have the stop it and start it again and sometimes it works, sometimes not. this picture shows an unsynchronized reception:
Image ->

I post the result of my flowgraph , mainly based on the gnuradio qpsk tutorial:
Image ->

I have lots of questions sorry, but I would like to understand what my qpsk mod/demod does not work correctly

Thank you in advance ;)

Re: Generated noise from BladeRF

Posted: Wed Nov 15, 2017 2:22 pm
by rtucker
OK, so I looked through the source code ( :shock: ) and re-implemented the Constellation Modulator using individual blocks and... it worked a lot better.

First: the range on Random Source should indeed be [0,256), as it was in your original version. Each 8-bit byte gets chunked into four 2-bit symbols, so the weird "house" look was because 3 out of every 4 symbols was 00. This makes repeating patterns, which are Bad.

Secondly, the actual problem with the excessively wide signal is because the RRC filter in the Constellation Modulator is producing I/Q values outside of the range (-1,1). When the samples are being converted from complex to int16_t for transmission, an overflow occurs and everything goes bad.

Here it is without scaling the output from the modulator:

Note the numerous points falling outside of (-1,1)

And here it is, multiplying by 0.707 (arbitrary choice of 1/sqrt(2)):

Everything's within (-1,1) and life is good!

Here's my flowgraph for the above (only thing changed was the multiplication constant):

I have reason to believe your receiver will have a better time with this!

Thank you for following up! I need more practice with signal processing, for sure :)

Re: Generated noise from BladeRF

Posted: Tue Nov 21, 2017 3:25 am
by samv
Thank you for your income, after doing this correction, my emission looks great :) thanks again.

Now I am dealing with the reception part. I noticed some phenomenon that I do not understand:
- I Have some lost connection sometimes. My emission fall down for a mili sec and start again. Having this problem, I cannot execute a correct BER test. I run the bladeRF on USB 3.0 but I don't where this problem is coming from.

- The synchronisation needs a lot a of gain even though I use a cable instead of the antennas.

If someone has an idea, it would be amazinh :)

thank you

Re: Generated noise from BladeRF

Posted: Fri Nov 24, 2017 12:48 am
by samv
Ok I find the problem with the sync, it was the calibration. So my reception looks good when no cut out appears.

[RESOLVED -> check update]I still have this problem with the cut out or interruption of the signal. It is like the USB cannot support my data rate... Is it even possible?
I am working on a virtual machine which support USB 3.0 as well as my PC has USB 3.0 port onboard.
my sample rate is 4M on osmocom block and the freq is 1.6GHz.

Has anyone noticed a similar trouble?

Thank you
Ok, I've noticed that when I mouve my mouse, I generate the cut off. Is it that normal?
I will try not on a virtual machine if anything change.

lost of connection is probably generated by the virtual machine. On a pure ubuntu pc, I have not cut off at all.

Re: Generated noise from BladeRF

Posted: Fri Nov 24, 2017 6:15 am
by samv
I have a strange reaction I do not understand:
My qpsk sync works fine when I send random data[img

But when I send PRBS data, my sync does not work...

Am I missing something here?

Re: Generated noise from BladeRF

Posted: Tue Dec 05, 2017 6:07 am
by samv
Anyone any ideas? I still haven't understood this problem?

Thank you :)