jgaeddert / liquid-dsp

digital signal processing library for software-defined radios
http://liquidsdr.org
MIT License
1.82k stars 426 forks source link

Question: couldn't we make a decision-directed version of symsync? #265

Open pfeatherstone opened 2 years ago

pfeatherstone commented 2 years ago

First of all, why is the following line: https://github.com/jgaeddert/liquid-dsp/blob/471f46660ddfab7e6713341324f473b7785da101/src/filter/src/symsync.c#L521 not:

_q->q = tanh( _mf*_dmf );

?

(I'm about to purchase Mengali so i can read the paragraph you reference (£250 !))

Then, couldn't we have a decision directed version of symsync where the timing error uses the true symbol value rather than the output of the matched filter? So:

e = tanh(y_true, y_dot)

instead of

e = tanh(y, y_dot)
pfeatherstone commented 2 years ago

Then all of the components of symtrack could be decision-directed too! Indeed this value https://github.com/jgaeddert/liquid-dsp/blob/471f46660ddfab7e6713341324f473b7785da101/src/framing/src/symtrack.c#L358-L359

could be used to update the symsync object.

pfeatherstone commented 2 years ago

In fact, couldn't you just cross-correlate with sym_out to get the time delay (timing phase or whatever it's called)

pfeatherstone commented 2 years ago

Side question: is there a difference between what symsync does and a delay locked loop (DLL)?

jgaeddert commented 2 years ago

So one nice thing about what's done in symsync is that you can be completely agnostic to the modulation format. Sure, knowing the modulation scheme gives you a performance boost, but in most situations this is sufficient.

The symtrack class has the ability to operate without knowledge of the specific modulation scheme as well, actually. So you can recover timing, the bulk of the carrier offset, and even equalization even blind. Seemed like a useful design choice. Of course having knowledge of the modulation scheme helps you out.

Yeah, Mengali is expensive. If you are affiliated with a university, you might find a copy in its library and not have to buy it.

jgaeddert commented 2 years ago

symsync is a type of delay-locked loop. In general, this kind of flow control can be tricky, and stability can be an issue. I'm sure there are better ways to do this (e.g. extended Kalman filters) but this seemed like a reasonable balance between performance and computational complexity.

pfeatherstone commented 2 years ago

It would be really interesting to see a Kalman filter based timing recovery algorithm. Do you know of a book that elaborates on this?

jgaeddert commented 2 years ago

Not specifically. Kalman filters can be fairly computationally complex which is one of the reasons I've avoided them (requires matrix inversion each step). Also, while the regular (linear) Kalman filter is optimal, the extended Kalman filter for non-linear problems is suboptimal so typically PID controllers work pretty well for this. But when you're dealing with symbol timing recovery simultaneously with carrier phase and equalization, things get trickier.