discuss-gnuradio
[Top][All Lists]
Advanced

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

Re: [Discuss-gnuradio] new to GNU radio


From: George Nychis
Subject: Re: [Discuss-gnuradio] new to GNU radio
Date: Sun, 02 Mar 2008 17:22:25 -0500
User-agent: Thunderbird 2.0.0.12 (X11/20080227)

I may not be the best to explain this, but I'll give it my best shot.

With simple PSK it is modulating with a 1 or a 0 based on two constellation points, and depending on the variation of PSK you will have more than 1 constellation point and these will map to more than 1 bit. You can see this with QPSK, for example:
http://en.wikipedia.org/wiki/Image:QPSK_Gray_Coded.svg

So QPSK isn't exactly demodulating to 0 or 1, that's PSK. With QPSK it's demodulating to bit sequences of length 2.

So, what you end up doing is finding out where this phase shift places your symbol around the unit circle. Whichever constellation it is closest to, it will produce the bits relative to the constellation.

As you are looking at dbpsk.py as an example of how the demodulation is done (generating bits from your samples and symbols), start here:
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py#L268

You will see that it uses the diff_phase_cc() block to use the phase shifting of symbols. You can look at the code for this block to further understand whats going on.

Then, if you look a little further down in the python code you will find the code which attempts to map the given symbols to a constellation point, which then produces your bits.

The actual constellation mapping is specified within the psk.py module:
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/python/gnuradio/blks2impl/psk.py

You will find that the number of constellations is dependent on the modulation (PSK=2, QPSK=4, 8PSK=8) and that make_constellation actually places them around the unit circle for use with the symbol mapper.

Remember, the python does the block setup and connections, then the actual mapping is actually happening within the C++ code of the blocks. So, if you want to see how the actual symbol mapping to constellations is done, you look at the C++ code for gr.map_bb, which would be in gr_map_bb.cc:
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/lib/general/gr_map_bb.cc

This is a general overview... if you have more specific questions, people can probably give you more specific answers... your question just seemed rather open :)

- George


Manav Rohil wrote:
Hi

I am new to gnu radio and am trying to understand how a packet
transmission happens using GNU radio

I am looking at benchmark_tx.py and benchmark_rx.py.I understood that
this is the top block which uses transmit_py and receive_py as the
underlying blocks.
I am using DQPSK for modulation.I went through dbpsk.py to understand
how the modulation is done.What i couldnt find out is where is the bit
stream modulated with the carrier frequency.From the theory of QPSK i
know that the phase of the carrier is changed depending if the bit that
modulates it is '1' or '0'.
I cant figure out where this happens in the code.

My eventual aim is to put a block for BPSK in place.Any pointers on how
to do it will use greatly appreciated


Please help me

Manav




reply via email to

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