Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WFM stereo decoding #7

Open
ha7ilm opened this issue Mar 6, 2016 · 7 comments
Open

Add WFM stereo decoding #7

ha7ilm opened this issue Mar 6, 2016 · 7 comments

Comments

@ha7ilm
Copy link
Owner

ha7ilm commented Mar 6, 2016

Block diagram:
csdr-stereo-wfm

csdr-wfm-stereo-svg.zip

@ha7ilm ha7ilm changed the title Add stereo WFM decoding Add WFM stereo decoding Mar 6, 2016
@ha7ilm
Copy link
Owner Author

ha7ilm commented Mar 7, 2016

Also RDS is a feature requested.

@DD4WH
Copy link

DD4WH commented Apr 9, 2017

Hi!
I am not sure whether this scheme would work properly, but maybe I am misunderstanding parts of it.
The phase of the audio has to be the same for L+R and L-R, so you would probably want to take the 19k pilot tone, double it and mix the 38k tone with the L+R demodulated audio.
Also, I would not put the LPF15k BEFORE the adding/substracting, because if those are IIR filters, they would introduce a phase change.
You will probably already know the CUTESDR manual by Whiteley (2011), I find it an excellent publication with FM stereo and RDS demodulating/decoding working code in C: https://github.com/DD4WH/Teensy-ConvolutionSDR/wiki/Links-&-Resources

Also, in the Teensy Convolution SDR, I have implemented a simpler scheme for demodulating stereo FM, which might also be useful for libcsdr, because it needs very low processing power for stereo demodulation and even works on decent small microcontrollers like the Teensy 3.6:
https://github.com/DD4WH/Teensy-ConvolutionSDR/wiki/Demodulation-modes

All the best, Frank DD4WH

@ha7ilm
Copy link
Owner Author

ha7ilm commented Apr 10, 2017

Frank,

Thank you for your valuable thoughts on this topic.

I've just drafted this very quickly, without much research.

As far as I can see, I need to look into this topic at a deeper level when I'll come to implement it.

VY 73!

Andras, HA7ILM

@DD4WH
Copy link

DD4WH commented Apr 10, 2017

Andras,
unfortunately I am not a programmer and therefore not able to contribute directly to this Linux environment. For my project, your lib has helped me a lot (mainly your thesis, but also parts of the code).
Thanks a lot for making all this open source and for your very nice work!
73 de Frank

@ha7ilm
Copy link
Owner Author

ha7ilm commented Apr 10, 2017

Thanks!

Teensy-ConvolutionSDR also looks great!

@jj1bdx
Copy link

jj1bdx commented Jan 28, 2019

My fork of NGSoftFM will be of your interest (on how to decode the composite signals).
BTW the algorithm of csdr's fmdemod_quadri_cf() made my fork faster and taught me how to vectorize the code. Thank you very much! :)

@jj1bdx
Copy link

jj1bdx commented Jan 28, 2019

Note well that the stereo MPX 38kHz subcarrier must be in the same phase with the 19kHz pilot signal, so it should be regenerated from the received 19kHz signal. See ITU-R Recommendation BS.450-3 Section 2.2.2.5 as follows:

2.2.2.5 The relative phase of the pilot signal and the sub-carrier is such that, when the transmitter is modulated by a multiplex signal for which A is positive and B = -A, this signal crosses the time axis with a positive slope each time the pilot signal has an instantaneous value of zero. The phase tolerance of the pilot signal should not exceed ± 3° from the above state. Moreover, a positive value of the multiplex signal corresponds to a positive frequency deviation of the main carrier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants