Hello,

I've been trying to create a program to estimate the Bit Error Rate of some
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:

*CODE*

from gnuradio import gr, blks2
import time

class graph(gr.top_block):
    def __init__(self):
        gr.top_block.__init__(self)

        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 input
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__':
    try:
        tb = graph()
        tb.start()
        while True:
            print  tb.ber()
            time.sleep(0.2)

        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 noise in
this channel.
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,
Dinart
_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
http://lists.gnu.org/mailman/listinfo/discuss-gnuradio

Reply via email to