I’ve been trying to create a program to estimate the Bit Error Rate of
modulations, but found some bugs on it.
After trying to exactly where the bug was, I could set it apart from the
rest of the code, here is a simple program where the bugs appear:
from gnuradio import gr, blks2
self.src = gr.glfsr_source_b(20, True, 0, 42) #bit generator self.mod = blks2.dbpsk_mod(5) self.demod = blks2.dbpsk_demod(5) self.xor = gr.xor_bb() self.probe = gr.probe_density_b(0.01) #1's density in xored
and output is ber
self.connect(self.src,self.mod,self.demod,(self.xor,0)) self.connect(self.src,(self.xor,1)) self.connect(self.xor,self.probe) def ber(self): return self.probe.density()
if name == ‘main’:
tb = graph()
tb.wait() except KeyboardInterrupt: pass
END OF CODE
The three problems I’ve got are:
1- The demodulator outputs more bits than it was sent, if we put a
gr.head(100) in the source, the demod generates more than 100 bits.
2- src bit sequence and the demodulated bit sequence are very different,
even after the lock of the demod. That’s strange because there’s no
3- Some seconds after the execution of the code, the probe density stops
changing, like if the program was not running anymore.
Thanks for helping,