Forum: GNU Radio bug in wfm_rcv_pll and fix, who has stereo FM specs/info a

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
3719f4fea703e38bcbf8de6fe6bcdf55?d=identicon&s=25 Martin Dvh (Guest)
on 2007-06-17 17:16
(Received via mailing list)
Hi,
I found a nasty bug in the wfm_rcv_pll.py code.

The pilot tone pll should return the recovered carrier,
For this you should use gr.pll_refout_cc, not gr.pll_carriertracking_cc.
pll_carriertracking returns the input transformed to baseband using the
recovered carrier.
pll_refout returns the recovered carrier.

With the fixed code I now actually get stereo.
(Before you would get a kind of attenuated, distorted, spectrum inverted
stereo)

I tested it with a stereo-coder I wrote in gnuradio, and now I seem to
actually get stereo seperation.
(stereo modulater is attached)

But now I do get a lot of noise when decoding stereo.

I also don't quite understand why double side band suppressed carrier
Left-Right audio is attenuated and needs a factor 20 for gain.
(It seems to be correct or at least close)

The code comments say 10 dB
The actual code uses a factor 20 which corresponds to 20 *log10(20)= 26
dB.
This 26 dB seems to be quite accurate, but where is this number based
on?

can you give me a link to more info or the stereo FM specs on this.

            # Pick off the double side band suppressed carrier
Left-Right audio. It is attenuated 10 dB so apply 10 dB gain

            stereo_dsbsc_filter_coeffs =
gr.firdes.complex_band_pass(20.0,


Greetings,
Martin

fix for wrong pll is below:
--- gnuradio-core/src/python/gnuradio/blksimpl/wfm_rcv_pll.py
2007-06-11 18:12:55.000000000 +0200
+++ gnuradio-core/src/python/gnuradio/blksimpl/wfm_rcv_pll_fixed.py
2007-06-17 08:07:43.000000000 +0200
@@ -131,8 +131,8 @@
             max_freq = -2.0*math.pi*18990/audio_rate;
             min_freq = -2.0*math.pi*19010/audio_rate;

-            self.stereo_carrier_pll_recovery =
gr.pll_carriertracking_cc(alpha,beta,max_freq,min_freq);
-            self.stereo_carrier_pll_recovery.squelch_enable(False);
+            self.stereo_carrier_pll_recovery =
gr.pll_refout_cc(alpha,beta,max_freq,min_freq);
+            #self.stereo_carrier_pll_recovery.squelch_enable(False)
#pll_refout does not have squelch yet, so disabled for now


             # set up mixer (multiplier) to get the L-R signal at
baseband
3596cfe1d579c65b9babd35e8787977c?d=identicon&s=25 Matt Ettus (Guest)
on 2007-06-20 07:07
(Received via mailing list)
Martin Dvh wrote:
> Hi,
> I found a nasty bug in the wfm_rcv_pll.py code.
>
> The pilot tone pll should return the recovered carrier,
> For this you should use gr.pll_refout_cc, not gr.pll_carriertracking_cc.
> pll_carriertracking returns the input transformed to baseband using the recovered 
carrier.
> pll_refout returns the recovered carrier.
>

Great catch, Martin.

> With the fixed code I now actually get stereo.
> (Before you would get a kind of attenuated, distorted, spectrum inverted stereo)
>

Can you check it in?

> I tested it with a stereo-coder I wrote in gnuradio, and now I seem to actually get 
stereo seperation.
> (stereo modulater is attached)
>
> But now I do get a lot of noise when decoding stereo.
>
> I also don't quite understand why double side band suppressed carrier Left-Right audio 
is attenuated and needs a factor 20 for gain.
> (It seems to be correct or at least close)
>

I would try this with the regular (non-PLL) FM demod.  I think the
rolloff of the PLL tracking loop is what is giving you the lower gain.
3719f4fea703e38bcbf8de6fe6bcdf55?d=identicon&s=25 Martin Dvh (Guest)
on 2007-06-21 03:33
(Received via mailing list)
Matt Ettus wrote:
>
>
> Great catch, Martin.
>
>
>>With the fixed code I now actually get stereo.
>>(Before you would get a kind of attenuated, distorted, spectrum inverted stereo)
>>
>
>
> Can you check it in?
Sure,
I will change the example(s) too, because they try to enable the squelch
which the pll_refout does not have.
(I will disable the squelch for now. Probably implement squelch in
pll_refout later)

I am working on an improved FM-stereo-receiver and a stereo-fm
transmitter too.
So I will get back on this when it is finished and add it to the
examples.

>
>
> I would try this with the regular (non-PLL) FM demod.  I think the
> rolloff of the PLL tracking loop is what is giving you the lower gain.
Yes, that seems to be the problem.
For now I switched to using the non-PLL FM-demod.

Do you know if/how I can make a PLL which does not have this high
roll-of.
I played with the pll-parameters but that doesn't seem to help.
It is critically damped, so that is probably the best we can get with
this pll.
Would I need another type of pll with a higher order loop-filter or
something like that.

Greetings,
Martin
3596cfe1d579c65b9babd35e8787977c?d=identicon&s=25 Matt Ettus (Guest)
on 2007-06-21 05:31
(Received via mailing list)
>
I think it's just a question of bandwidth.  Have you confirmed that the
PLL has at least 60 kHz of bandwidth?

Matt
3719f4fea703e38bcbf8de6fe6bcdf55?d=identicon&s=25 Martin Dvh (Guest)
on 2007-06-21 12:47
(Received via mailing list)
Matt Ettus wrote:
>>Would I need another type of pll with a higher order loop-filter or something like that.
>>
>
>
>
> I think it's just a question of bandwidth.  Have you confirmed that the
> PLL has at least 60 kHz of bandwidth?
Bandwidth should be 200 kHz.

But when I look at the FFT of the output I see about 10 dB/octave
roll-of for the pll_demod.
The quadrature_demod has a straight freq response (as expected)

See testcode below:

I wrote a small loopback test fm_mod ->fm-demod
http://www.olifantasia.com/pub/projects/gnuradio/m...
The main code is:
        #mod
        max_dev=75e3
        mod_gain = 2 * math.pi * max_dev / self.sample_rate
        self.fm_mod = gr.frequency_modulator_fc (mod_gain)
        #demod pll
        bandwidth = 200e3
        alpha = 0.25*bandwidth * math.pi / self.sample_rate
        beta = alpha * alpha / 4.0
        max_freq = 2.0*math.pi*100e3/self.sample_rate
        self.fm_demod_pll = gr.pll_freqdet_cf
(alpha,beta,max_freq,-max_freq)
        #demod quadrature
        fm_demod_gain = 1.0/mod_gain
        self.fm_demod_quadrature = gr.quadrature_demod_cf
(fm_demod_gain)

When I look at the FFT of the output I see about 10 dB/octave roll-of
for the pll_demod.
http://www.olifantasia.com/pub/projects/gnuradio/m...
Should this be right?

The quadrature_demod has a straight freq response (as expected)

Martin
C01923474e5c07a74b6d32bfbb512c16?d=identicon&s=25 Hew How Chee (Guest)
on 2007-06-21 14:19
(Received via mailing list)
Hi,

This document might be useful.

RECOMMENDATION  ITU-R  BS.450-3
Transmission standards for FM sound broadcasting at
VHF

Regards,
Hew

--- Martin Dvh <gnuradiomail@olifantasia.com> wrote:

>
> can you give me a link to more info or the stereo FM
> specs on this.
>
>
> Greetings,
> Martin





____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket:
mail, news, photos & more.
http://mobile.yahoo.com/go?refer=1GNXIC
3719f4fea703e38bcbf8de6fe6bcdf55?d=identicon&s=25 Martin Dvh (Guest)
on 2007-06-21 18:49
(Received via mailing list)
Hew How Chee wrote:
> Hi,
>
> This document might be useful.
>
> RECOMMENDATION  ITU-R  BS.450-3
> Transmission standards for FM sound broadcasting at
> VHF
Is it downloadable somewhere?
I already found that this is the standard I need, but could not find a
place where I could download it.

Greetings,
Martin
C01923474e5c07a74b6d32bfbb512c16?d=identicon&s=25 Hew How Chee (Guest)
on 2007-06-22 13:40
(Received via mailing list)
Hi Martin,

Goto
http://www.itu.int/rec/R-REC-BS.450-3-200111-I/en
and click on the electronic bookshop. After that
register for 3 free download.

Regards,
Hew

--- Martin Dvh <gnuradiomail@olifantasia.com> wrote:

> I already found that this is the standard I need,
> wrote:
> >
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
This topic is locked and can not be replied to.