[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] two possible bugs in qpsk receiving with GNU radi
From: |
Brian Padalino |
Subject: |
Re: [Discuss-gnuradio] two possible bugs in qpsk receiving with GNU radio |
Date: |
Thu, 19 Jun 2008 13:30:18 -0400 |
On Thu, Jun 19, 2008 at 12:52 PM, Zenny Zhang <address@hidden> wrote:
> I was working on qpsk receiving with GNU radio and I was wondering if
> these are something we should change.
>
> 1. The qpsk constellation in the current code seems to be (1,0),
> (0,1j), (-1,0), (0,-1j). Should it be rotated by 45 degrees?
I wouldn't be worried about this. Just tilt your head to the side a
bit, and does it look better to you? Phase alignment is part of the
receiver - and it's why you need some type of correlation to figure
out the offset. Staying purely real or purely imaginary helps since
you stop multiplying by sqrt(2) and just do some simple
additions/subtractions.
> 2. I understand that in the current mpsk_receiver_cc block, qpsk
> decisions are obtained by calling the generic decision function.I just
> want to mention, in case anyone wants to use the decision_qpsk
> function, that it has bug in it and will never return decision 0.
> unsigned int
> gr_mpsk_receiver_cc::decision_qpsk(gr_complex sample) const
> {
> unsigned int index = 0;
>
> // Implements a simple slicer function
> if((sample.real() < 0) && (sample.imag() > 0))
> index = 1;
> else if((sample.real() < 0) && (sample.imag() < 0))
> index = 2;
> //bug here begin
> else
> index = 3;
> //bug here end
> // fixed begin
> else if((sample.real() > 0) && (sample.imag() < 0))
> index = 3;
> // fixed end
>
> return index;
> }
I couldn't find this code in the repository. Can you please link to it?
I first went to the gr_mpsk_receiver_cc code and found the QPSK case here:
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/lib/general/gr_mpsk_receiver_cc.cc#L97
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/lib/general/gr_mpsk_receiver_cc.cc#L155
It apparently uses gr_quad_0deg_slicer( ) which is defined in gr_math.h here:
http://gnuradio.org/trac/browser/gnuradio/trunk/gnuradio-core/src/lib/general/gr_math.h#L116
As a note, there are also 45 degree versions written there as well.
Are you sure the code you pasted is actually the code that is being used?
Brian