discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss-gnuradio] Re: dbpsk mod/demod


From: Eric Blossom
Subject: [Discuss-gnuradio] Re: dbpsk mod/demod
Date: Thu, 19 Jun 2008 07:59:43 -0700
User-agent: Mutt/1.5.17 (2007-11-01)

> Eric Blossom wrote:
> > 
> > On Thu, Jun 19, 2008 at 05:16:17AM -0700, mehdimolu wrote:
> >> 
> >> Hi,
> >> I connect dbpsk modulator to dbpsk demodulator. I expected that input and
> >> output must be the same but it is not.
> >> for instance input vector is (0, 1, 1) while 
> >> output vector is (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1,
> >> 0,
> >> 0, 0, 0). what is the reason?
> >> help is appreciated.  
> > 
> > Without actually seeing your code, it's hard to guess.


On Thu, Jun 19, 2008 at 07:24:07AM -0700, address@hidden wrote:
> hi,
> the code I wrote is
>   
> 
> #!/usr/bin/env python
> from gnuradio import gr, gru, modulation_utils
> from gnuradio import blks2
> src_data = (0,1,1)
> Bsrc = gr.vector_source_b(src_data,False)
> Bsink = gr.vector_sink_b()
> def build_graph():
>               
>       fg = gr.top_block ()
>       Bmod = blks2.dbpsk_mod()
>       Bdemod = blks2.dbpsk_demod()    
>       fg.connect(Bsrc, Bmod, Bdemod, Bsink)
>       return fg
> 
> if __name__ == '__main__': 
>       fg = build_graph ()
>       fg.run()
>       print src_data
>       sink_data = Bsink.data()
>       print sink_data 
> 
> regards,
> Mehdi
> 
> 
> 

The reason the output is longer than the input is that there are some
blocks in the demodulator that produce a constant number of extra
samples.  E.g., the non-causal AGC block, gr.feedforward_agc_cc.
When used on the air the extra samples make no difference at all.


The implementation in GNU Radio handles AGC, symbol timing, etc.
To use it effectively, you'll need to provide at least a couple of
bytes of preamble to allow the loops to settle, then some kind of
framing so that you can find the beginning of the frame in the
receiver.

You may find it useful to trace the flow through benchmark_tx.py and
benchmark_rx.py.  There's a reason for all that "extra" code ;-)

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]