jgaeddert / liquid-dsp

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

[Question] FSK synchronization #376

Open pfeatherstone opened 4 months ago

pfeatherstone commented 4 months ago

I have a 4-FSK signal that i want to demodulate. It doesn't have a preamble or anything like that to assist with synchronization. The fskdem object requires perfect symbol timing. How can we realise symbol timing?

xerpi commented 4 months ago

This might help: https://liquidsdr.org/doc/symtrack/

pfeatherstone commented 3 months ago

Does that work with FSK? Not sure

pfeatherstone commented 3 months ago

Yeah symtrack is only designed to work with modem objects which doesn't include FSK

xerpi commented 3 months ago

I think you can still use symsync (and symtrack maybe). Just make sure to pass the samples through a Gaussian filter (LIQUID_FIRFILT_GMSKRX) after FM demodulation before using symsync. Check this example: https://github.com/jgaeddert/liquid-dsp/blob/master/examples/gmsk_tracking_example.c#L62

Here's more info on what makes GMSK different regarding the matched filter: https://dsp.stackexchange.com/a/74319

GMSK doesn't just use a Gaussian filter instead of a raised-cosine filter. It uses a Gaussian filter on the phase, before applying it to the modulator. This makes it a nonlinear operation. When a raised-cosine filter is applied to some modulated signal, it is applied after modulation, as a linear operation.

Edit: Oops, I just realized this is about FSK and not GMSK, although apparently they are quite similar 🤔

pfeatherstone commented 3 months ago

I've tried using symsync for FSK4 and it's not working well at all.

pfeatherstone commented 3 months ago

I'm using something similar to freqdem or GNURadio's Quadrature demod block to basically convert FSK4 to ASK4 then I need some kind of symbol synchronization and PLL. In this case the error in the amplitude equals to frequency error, which then needs to be fed to a PLL loop. So i don't think i can simply re-use an ASK4 demod algorithm.