Forum: GNU Radio Why d_phase in Costas loop different in gr_costas_loop from gr_mpsk_receiver?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mir M. Ali (Guest)
on 2009-05-27 10:33
(Received via mailing list)
Hi,

Why is the d_phase equation different in these two files?
d_phase += d_alpha*phase_error; // In gr_mpsk_receiver.cc
and
d_phase = d_phase + d_freq + d_alpha * error; // In gr_costas_loop.cc
The d_freq term is omitted and I don't understand why.

Thanks,
Ali
Jason U. (Guest)
on 2009-05-27 16:33
(Received via mailing list)
> Why is the d_phase equation different in these two files?
> d_phase += d_alpha*phase_error; // In gr_mpsk_receiver.cc
> and
> d_phase = d_phase + d_freq + d_alpha * error; // In gr_costas_loop.cc
> The d_freq term is omitted and I don't understand why.

gr_costas_loop is wrong, and gr_mpsk_receiver used to have the same
error and has since been updated.  The frequency component of the
rotation has already been added to the current phase estimate during
de-rotation of of the samples (in mm_sample, I think); so here all we
have to do is update the phase estimate by the estimated error.

I would also check your version of gr_costas_loop to see if the phase
estimate is clipped, or wrapped.  There was an error where the phase
was clamped to 2*pi rather than rolling over, which would cause an
error once the phase drifted that far; this has also been fixed in the
latest version of mpsk_receiver.

Jason
Jason U. (Guest)
on 2009-05-27 16:39
(Received via mailing list)
> gr_costas_loop is wrong, and gr_mpsk_receiver used to have the same
> error and has since been updated.  The frequency component of the
> rotation has already been added to the current phase estimate during
> de-rotation of of the samples (in mm_sample, I think); so here all we
> have to do is update the phase estimate by the estimated error.

DOH! I it's still early for me.

gr_costas_loop is /not/ wrong.  The reason that d_freq is added is
because the phase advances normally over time, and this line updates
the phase estimate for both changes over time and the error.

It is not need in mpsk receiver because it is split into two parts
(one in mm_sample and one where you got that line from).

Sorry for the confusion.

Jason
This topic is locked and can not be replied to.