I’m trying to synchronize on the bits in an asynchronous digital signal
using M&M clock recovery block. For instance, roughly 7 samples of +1.
represent a “1” and roughly 7 samples of -1. represent a “0”.
I’ve reduced the problem the following test case: a square (or sine)
wave generator with a period of 14 samples (a continuous series of 7
sample "1"s and "0"s) and a clock recovery block with the initial value
of omega = 7. This is a fair reproduction of what I see on sync headers
in my signal, which are a long series of such 101010s
Am I wrong to assume that the clock recovery should in this case return
roughly [+1, -1, +1, -1, …] (synchronizing on the crests of the input
This does not seem to happen, neither for a square wave nor a sine wave.
The clock recovery never seems to settle on the correct frequency and
phase, even when the initial omega matches input frequency perfectly.
I’ve tried plenty of different settings for mu and omega gains. The sync
just drifts more or less slowly.
I see M&M clock recovery is a pretty common source of questions, but I
failed to find a good answer on how to use it. A suggestion I saw is to
write your own synchronizer. I can do that but I don’t want to reinvent
the wheel if a well researched one already exists.
Am I misunderstanding what M&M clock recovery is supposed to do? Is
there another existing block that is more suited for this kind of bit