Why d_phase in Costas loop different in gr_costas_loop from gr_mpsk_receiver?

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

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

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