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:
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:
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:
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
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