QPSK Demodulator

Hi all,
I’m working on a qpsk demodulator (not differential), see code below :

    # Connect & Initialize base class
    self.connect(self,self.pre_scaler, self.agc, self.costas_loop,
                     self.rrc_filter, self.clock_recovery)

    self.connect(self.clock_recovery, self.diffdec, self.slicer,

self.symbol_mapper,self.unpack, self)

I’ve removed the diff_phasor block in the flowgraph. By default the
constellation mapper use :
# find closest constellation point
rot = 1
#rot = .707 + .707j
rotated_const = map(lambda pt: pt * rot,
psk.constellation[arity])
#print “rotated_const = %s” % rotated_const

    self.slicer = gr.constellation_decoder_cb(rotated_const,

range(arity))

    if self._gray_code:
        self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
    else:
        self.symbol_mapper = gr.map_bb(psk.ungray_to_binary[arity])

I would like to know if rot has to be set to 1 or 0.707 + 0.707j as I
have removed the diff_phasor ?
When I draw the constellation after the clock_recovery block, I see
graphicaly that the symbol are located around +45°, 135°,225°,-45°.

Best regards,

Pepito

Hi,

If you're using the gr_mpsk_receiver_cc block, it should still

expect a rot=1 constellation:

(lines 186-192ish of gnuradio-core/src/lib/general/gr_mpsk_receiver.cc)
void
gr_mpsk_receiver_cc::make_constellation()
{
for(unsigned int m=0; m < d_M; m++) {
d_constellation.push_back(gr_expj((M_TWOPI/d_M)*m));
}
}

d_M is the number of points of PSK modulation, namely 4. This produces a
(1,0), (0,1), (-1,0), (0,-1) constellation.

If you’re using the actual clock_recovery_mm_cc module (I’m not terribly
familiar with it) it looks to be doing the same thing:

gr_complex
gr_clock_recovery_mm_cc::slicer_45deg (gr_complex sample)
{
float real= -1, imag = -1;
if(sample.real() > 0)
real=1;
if(sample.imag() > 0)
imag = 1;
return gr_complex(real,imag);
}

I would think an improperly rotated constellation would be dealt with as
a phase offset in the receiver to be dialed out, but you’d obviously
need your clock recovery and slicer to agree on the constellation. Does
the clock recovery converge to that 45-degree offset, or does it start
there and (perhaps over many samples, limited by response time) converge
to a +?

As an aside, how will you ensure the receiver locks onto the same
rotation as the transmitter?

–Mason

Pepito31 Pepito31 wrote:

Hi all,
I’m working on a qpsk demodulator (not differential), see code below :

I would like to know if rot has to be set to 1 or 0.707 + 0.707j as I
have removed the diff_phasor ?
When I draw the constellation after the clock_recovery block, I see
graphicaly that the symbol are located around +45°, 135°,225°,-45°.

Best regards,

Pepito

Pepito,

Remember that a phase shift is just a phase shift and nothing special.
The information is in the relative position of the constellation points
to each other. You just have to make sure that the receiver knows how to
slice the constellation once the phase locking has been accomplished.

Tom

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs