Hi all, I was wondering if someone could guide me. I am attempting to design an FM Stereo demodulator using DSP, carrying out simlulations in Matlab and then eventually coding in C for an ARM processor. I have done various searching and come up with a lot on this newsgroup and google, however all of it is way above my current knowledge level. I have basically read all posts whilst searching for (digital or dsp) (fm or frequency modulation) stereo (demodulation or demodulator or demod). My knowledge of Matlab is ok, but fairly limited. I have read aspects of the Implementation of FM Demodulator Algorithms on a High Performance DSP Thesis by Haller and Schnyder. I have also read James Shima's Thesis. My main question is, is how can I take demodulate the stereo aspect of FM? I understand how it works in Analogue Demodulation, but how would one do the same in Digital. If I was using just FM I would try to use a mixed demodulator (mixture of delay and phase adapter). I have done a weeks worth of research and I am none the wiser, hence the plea for help. I am fairly novice to all this, so explanations in Layman's Terms would be ideal! Regards in appreciation Ol. Ps. To email me, replace Put_Your_Initials_Here with your initials, or any other word you like. Really, anything!
Digital FM Stereo Demodulator
Started by ●September 16, 2004
Reply by ●September 16, 20042004-09-16
On 16 Sep 2004 04:20:52 -0700, Put_Your_Initials_Here.20.oeames@spamgourmet.com (Ol) wrote:>My main question is, is how can I take demodulate the stereo aspect of >FM? I understand how it works in Analogue Demodulation, but how would >one do the same in Digital. >If I was using just FM I would try to use >a mixed demodulator (mixture of delay and phase adapter).Hey? The digital multiplex demod works the same way as the analog one, which *doesn't* involve "a mixed demodulator (mixture of delay and phase adapter)". You'll need a PLL to double the frequency of the 19kHz pilot and produce a 38kHz sine wave, and a DSBSC demodulator (which is just a pair of multipliers). (Ok, ok, in theory this can also be done with a very narrow 19kHz BPF followed by a frequency doubler (squaring circuit). A PLL can give better noise performance though because it can have a bandwidth that is less that the frequency uncertainty of the pilot tone (+/-3Hz for "professional" systems).) You can use the same deemphasis filter that you're using for mono, *after* the stereo demod, however you should add a strong notch at 19kHz and as much attenuation as possible at higher frequencies. Note that most descriptions of stereo coding won't mention that the 3rd harmonic of the pilot can be used to transmit digital information (RDS), i.e. you should be prepared for a significant amount of 57kHz. There are also optional subcarriers (SCA) at (IIRC) 67kHz and 93kHz. I think these can sum to about 10% of the total peak modulation. Regards, Allan
Reply by ●September 16, 20042004-09-16
Thank you for your reply Allan. You will have to excuse my ignorance. I'll give you a little more detail as to what I have in terms of an FM demodulator using PLL. At the moment I have a Matlab Simulink FM Passband Modulator which outputs a passband representation of the modulated signal. I will obviously have to design the FM Stereo modulator as well, so I can test the demodulator. I do not think Matlab has an FM Stereo mod. This is what I have at the moment for FM Mono. ----- FM Signal ---> *cos --> LPF -----------> =I \--> *sin --> LPF --> *(-1) --> =Q I and Q then go into a PLL demodulator. ----- > You'll need a PLL to double the frequency of the 19kHz pilot and > produce a 38kHz sine wave, Presumably I will need to separate the pilot tone from the received signal??. What is the best way to do this? Do I do this before the IQ separation or after? Once separated, I then need to use the PLL as you suggested above?? to double the pilot tone? And then, if I haven't embarassed myself enough, could you kindly elaborate on... > ...and a DSBSC demodulator (which is just a > pair of multipliers). > You can use the same deemphasis filter that you're using for mono, > *after* the stereo demod, however you should add a strong notch at > 19kHz and as much attenuation as possible at higher frequencies. okay. As you can see, I have duly demonstrated my ignorance :-) Thank you for your patience and help. Regards Ol. Allan Herriman wrote:> On 16 Sep 2004 04:20:52 -0700, > Put_Your_Initials_Here.20.oeames@spamgourmet.com (Ol) wrote: > > >>My main question is, is how can I take demodulate the stereo aspect of >>FM? I understand how it works in Analogue Demodulation, but how would >>one do the same in Digital. >>If I was using just FM I would try to use >>a mixed demodulator (mixture of delay and phase adapter). > > > Hey? The digital multiplex demod works the same way as the analog > one, which *doesn't* involve "a mixed demodulator (mixture of delay > and phase adapter)". > > You'll need a PLL to double the frequency of the 19kHz pilot and > produce a 38kHz sine wave, and a DSBSC demodulator (which is just a > pair of multipliers). > (Ok, ok, in theory this can also be done with a very narrow 19kHz BPF > followed by a frequency doubler (squaring circuit). A PLL can give > better noise performance though because it can have a bandwidth that > is less that the frequency uncertainty of the pilot tone (+/-3Hz for > "professional" systems).) > > You can use the same deemphasis filter that you're using for mono, > *after* the stereo demod, however you should add a strong notch at > 19kHz and as much attenuation as possible at higher frequencies. > > > Note that most descriptions of stereo coding won't mention that the > 3rd harmonic of the pilot can be used to transmit digital information > (RDS), i.e. you should be prepared for a significant amount of 57kHz. > There are also optional subcarriers (SCA) at (IIRC) 67kHz and 93kHz. > I think these can sum to about 10% of the total peak modulation. > > Regards, > Allan
Reply by ●September 16, 20042004-09-16
Ol wrote:> I'll give you a little more detail as to what I have in terms of an FM > demodulator using PLL. At the moment I have a Matlab Simulink FM Passband > Modulator which outputs a passband representation of the modulated signal. > I will obviously have to design the FM Stereo modulator as well, so I can > test the demodulator. I do not think Matlab has an FM Stereo mod.Just to be sure, since you seem to be calling it FM stereo modulator, the stereo subcarrier is AM modulated with carrier supressed. It is generated or decoded by a doubly balanced modulator. The 67kHz SCA subcarrier is FM with a relatively small deviation and amplitude, but you didn't ask about that. -- glen
Reply by ●September 16, 20042004-09-16
glen herrmannsfeldt wrote:> > > Ol wrote: > >> I'll give you a little more detail as to what I have in terms of an FM >> demodulator using PLL. At the moment I have a Matlab Simulink FM Passband >> Modulator which outputs a passband representation of the modulated >> signal. >> I will obviously have to design the FM Stereo modulator as well, so I can >> test the demodulator. I do not think Matlab has an FM Stereo mod. > > > Just to be sure, since you seem to be calling it FM stereo modulator, > the stereo subcarrier is AM modulated with carrier supressed. > It is generated or decoded by a doubly balanced modulator. > > The 67kHz SCA subcarrier is FM with a relatively small deviation > and amplitude, but you didn't ask about that. > > -- glen >Ah. Ok, so the L+R channel is FM modulated, and the L-R stereo channel is AM modulated (with the carrier suppressed). You are right, I didn't know that. At this stage, I am not interested in the 67kHz SCA subcarrier. (Is that the one which contains RDS info?) Thank you, Regards ol.
Reply by ●September 16, 20042004-09-16
Ol wrote: (snip)> Ah. Ok, so the L+R channel is FM modulated, and the L-R stereo channel > is AM modulated (with the carrier suppressed). You are right, I didn't > know that.((L+R)+19kHz+(AM-SC modulated (L-R))+(optional FM SCA subcarrier)) is FM modulated. There is also preephasis in some of those signals. Are you doing the FM demodulation as digital, also? -- glen
Reply by ●September 16, 20042004-09-16
glen herrmannsfeldt wrote: <snip>> > ((L+R)+19kHz+(AM-SC modulated (L-R))+(optional FM SCA subcarrier)) > > is FM modulated.Thank you for clarifying that. I think I am getting my head around it...slowly :-)> > There is also preephasis in some of those signals.Pre-emphasis is where the higher frequency audio tones are emphasised to reduce noise, Correct? And would it also be true to say, that the reverse happens at the demodulator, to bring the high frequence audio tones back to 'normal'?> > Are you doing the FM demodulation as digital, also?Yes I am. Giving that I know very little about the subject... Do you have suggestions or hints which I may find relevant? Primarily, I am going to be doing the simulation in matlab simulink, then implementing into C. I don't wish to repeat myself, however it may make it easier for you... *<snip>* I am attempting to design an FM Stereo demodulator using DSP, carrying out simlulations in Matlab and then eventually coding in C for an ARM processor. I have done various searching and come up with a lot on this newsgroup and google, however all of it is way above my current knowledge level. ... My main question is, is how can I demodulate the stereo aspect of FM? ... *<snip>* Everyone has been very patient and helpful. I'm not looking for the answer, however, ideally I am looking for an algorithm in psuedo-code or something so that I can learn, and implement it myself. rgds Ol. -- Oliver To email me, replace 'place_your_initals_here' with your initials, or any other word you like!
Reply by ●September 16, 20042004-09-16
Ol wrote: (snip)> I don't wish to repeat myself, however it may make it easier for you...> *<snip>* > I am attempting to design an FM Stereo demodulator using DSP, carrying > out simlulations in Matlab and then eventually coding in C for an ARM > processor. I have done various searching and come up with a lot on > this newsgroup and google, however all of it is way above my current > knowledge level.I understood this to mean only the stereo demodulator. For that, you are at a relatively low frequency, so it isn't so hard to do with available processors. As I understand it, in the early days of FM stereo broadcasts there were separate boxes as FM demodulators, and tuners would have an unfiltered output to supply the signal needed. Demodulating FM from a 10.7MHz IF might not be so hard, either. Directly from 100Mhz or so, with filters good enough to separate out a single station, sounds hard to me. -- glen
Reply by ●September 16, 20042004-09-16
Ol wrote: ...> Everyone has been very patient and helpful. I'm not looking for the > answer, however, ideally I am looking for an algorithm in psuedo-code or > something so that I can learn, and implement it myself. > > rgds > Ol.Ol, It's a mystery to me how someone can set out do design something whose nature he doesn't understand. Designing a circuit or apparatus is akin to plotting a rout from what you have to what you want. There may be a bit of exploration needed along the way, but if the destination isn't known, there's no hope of getting there or even knowing if you stumble on it. Somewhere, there must be a specification of the FM stereo broadcast signal, including tolerances on frequencies and their stability. Finding it should be the first part of your project. Some would call that research, but it's merely search. Find out what you need to do before concerning yourself with how to do it. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●September 16, 20042004-09-16
glen herrmannsfeldt wrote:> > > Ol wrote: > > (snip) > >> I don't wish to repeat myself, however it may make it easier for you... > > >> *<snip>* >> I am attempting to design an FM Stereo demodulator using DSP, carrying >> out simlulations in Matlab and then eventually coding in C for an ARM >> processor. I have done various searching and come up with a lot on >> this newsgroup and google, however all of it is way above my current >> knowledge level. > > > I understood this to mean only the stereo demodulator. For that, > you are at a relatively low frequency, so it isn't so hard to do > with available processors. > > As I understand it, in the early days of FM stereo broadcasts > there were separate boxes as FM demodulators, and tuners would > have an unfiltered output to supply the signal needed.Tuners sold while the standard was in development but had not yet been sold had an output before the deemphasis filter. I sold some of those tuners, but I never saw the add-on to make one of them work.> > Demodulating FM from a 10.7MHz IF might not be so hard, either. > Directly from 100Mhz or so, with filters good enough to separate > out a single station, sounds hard to me.That's like demodulating TV sound from the video IF instead of using the 4.5 Mhz intercarrier signal. Plain dumb, if you ask me. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������






