Implementing digital-bert with UHD

Hi,

I am currently new to the GNU Radio project and are currently trying to
get the digital-bert scripts (gnuradio-examples) working with UHD (for
my USRP N210).

At the beginning I have swapped the existing USRP sinks in
‘benchmark_tx.py’ and ‘benchmark_rx.py’ with the code below.
Therefore I changed some command line arguments (ip…IP address of the
board, gain…Gain of the d’board).

def _setup_usrp(self, interp, freq, gain, ip):
# Setup single usrp sink
self._usrp = uhd.single_usrp_sink(
device_addr=“addr=”+ip,
io_type=uhd.io_type.COMPLEX_FLOAT32,
num_channels=1,
)

   # Tune to center frequency
   tr = self._usrp.set_center_freq(freq, 0)

   if not (tr):
       print "Failed to tune to center frequency!"
   else:
       print "Actual intermediate frequency:", 

n2s(tr.actual_inter_freq)

   # Set TX gain
   self._usrp.set_gain(gain, 0)
   print "Gain d'board:", n2s(self._usrp.get_gain()), "dB"

Afterward I executed the scripts and everything seems to work,
but the terminal output shows:

Freq. Offset: -945 Hz Timing Offset: 3.7 ppm Estimated SNR: 6.8 dB
BER: 0.182979
Freq. Offset: -1011 Hz Timing Offset: 4.0 ppm Estimated SNR: 6.8 dB
BER: 0.182914
Freq. Offset: -1102 Hz Timing Offset: 3.9 ppm Estimated SNR: 6.9 dB
BER: 0.18345
Freq. Offset: -3122 Hz Timing Offset: 3.5 ppm Estimated SNR: 7.0 dB
BER: 0.183047
Freq. Offset: -748 Hz Timing Offset: 3.5 ppm Estimated SNR: 6.9 dB
BER: 0.184062

So the SNR and BER are quite bad and the values aren’t changing, while
modifying the signal energie (amplitude) for transmition.

Does have anybody an explanation or hint for this behavior? Or are there
working scripts for UHD available?

Thanks,
Daniel

On Wed, Mar 30, 2011 at 2:12 AM, [email protected] wrote:

but the terminal output shows:
BER: 0.184062

So the SNR and BER are quite bad and the values aren’t changing, while
modifying the signal energie (amplitude) for transmition.

Does have anybody an explanation or hint for this behavior? Or are there
working scripts for UHD available?

Thanks,
Daniel

Perhaps you are in a particularly bad multipath environment? Although I
agree that changing the power should have more than a tenth of a dB
effect
on the SNR. Have you tried turning it down? Or really, can your plot the
spectrum at the receiver and verify that the power is actually changing?

Also, the SNR estimator in gr_probe_mpsk_snr_c is not the most robust
estimator at low SNR. It gets biased when calculating the mean by any
samples over the decision boundaries with the effect of having an
“irreducible” SNR (that’s not really the right word for it, but I’m
relating
it to being the opposite of an irreducible BER in multipath channels).
But I
think this point is around 3 - 4 dB, but it’s been a while since I’ve
looked
at it.

This reminds me that I have three other SNR estimators that do an
excellent
job at low SNR (theoretically, in the mythical AWGN channels) that I
really
need to put into GNU Radio. They are increasingly better at their
estimates
at the expense of computational complexity (e.g., one uses the skewness
while another uses the kurtosis).

Tom

Thanks for your reply…

Perhaps you are in a particularly bad multipath environment? Although I agree
that changing the power should have more than a tenth of a dB effect on the SNR.
Have you tried turning it down? Or really, can your plot the spectrum at the
receiver and verify that the power is actually changing?
It actually turned out, that I’ve forgotten to specify the right antenna
on my UHD sink/soure and therefore was receiving cross talk from the
second channel.
I’m still a freshman on GNUradio :-).

Also, the SNR estimator in gr_probe_mpsk_snr_c is not the most robust estimator
at low SNR. It gets biased when calculating the mean by any samples over the
decision boundaries with the effect of having an “irreducible” SNR (that’s not
really the right word for it, but I’m relating it to being the opposite of an
irreducible BER in multipath channels). But I think this point is around 3 - 4 dB,
but it’s been a while since I’ve looked at it.

This reminds me that I have three other SNR estimators that do an excellent job
at low SNR (theoretically, in the mythical AWGN channels) that I really need to
put into GNU Radio. They are increasingly better at their estimates at the expense
of computational complexity (e.g., one uses the skewness while another uses the
kurtosis).
Would be a nice move…

Daniel

On 14.04.2011 at 16:29 Tachwali, Yahia wrote:

Hello Daniel,

Do you mind sharing the modified benchmark-examples that you got them to work on
UHD. I am trying to do the same thing using DQPSK but I am getting a continuous
failed to receive packets. It seems to me that the packet format expected by the
receiver is different from that in the transmitter. I would appreciate sharing the
code with me. Thank you.

Kind regards,
Yahia Tachwali
Thanks for the interest in my source code, but I still need a few weeks
to finish the code and make it a little bit ‘cleaner’.
Afterwards I will put it in a public repository, so at this moment I can
only post some code pieces, if needed.

Kind regards,
Daniel Bartel

Hi Daniel

Can you share the codes with me. I am also trying to make the
digital-bert scripts to work with uhd( mine is USRP N200) to calculate
bit error rate and signal to noise ratio.

Thanks
Saketh