# FM Stereo decoder, frequency doubler, IIR issues

**URL:** <https://www.ruby-forum.com/t/fm-stereo-decoder-frequency-doubler-iir-issues/228492>\
**Category:** GNU Radio\
**Created:** [April 24, 2013, 2:57pm UTC](https://www.ruby-forum.com/t/fm-stereo-decoder-frequency-doubler-iir-issues/228492 "2013-04-24T14:57:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cremes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e19b73/32.png) [@cremes](https://www.ruby-forum.com/u/cremes)\
**Post date:** [April 24, 2013, 2:57pm UTC](https://www.ruby-forum.com/t/fm-stereo-decoder-frequency-doubler-iir-issues/228492/1 "2013-04-24T14:57:18Z")

</div>

Hi list,

I just got started with GNU Radio Companion for use with my FCDPP and  
it’s  
been great, already am decoding FM stereo and it sounds very good.  
However  
it probably isn’t the most optimal way to do it:

My filters are the inbuilt bandpass - they’re a bit hard on the CPU and  
was  
hoping to use the IIR filters as biquads instead but I can’t seem to get  
them to work. Filter was designed with this applet (  
[http://www.earlevel.com/main/2010/12/20/biquad-calculator/](http://www.earlevel.com/main/2010/12/20/biquad-calculator/) ) and I fed  
the  
A values into Feed-Forward of the IIR and B values to the Feed-Backward  
and  
it would not pass signal so I swapped A and B values and it apparently  
just  
passed the signal unaffected. Any ideas what I’m doing wrong?

What is the internal resolution for the IIRs? I am asking because some  
of  
my filter Q’s are in the 10-60 range and am concerned about blowing them  
up.

Also, what would be the most efficient way (in GNU Radio) to get the  
absolute value of a signal? The best I’ve come up with so far was a  
Float-\>Complex feeding a Complex-\>Magnitude.

Thanks!

Chuck

---

<div class="post-metadata">

**Author:** ![cremes](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/e19b73/32.png) [@cremes](https://www.ruby-forum.com/u/cremes)\
**Post date:** [April 28, 2013, 7:23pm UTC](https://www.ruby-forum.com/t/fm-stereo-decoder-frequency-doubler-iir-issues/228492/2 "2013-04-28T19:23:15Z")

</div>

On Wed, Apr 24, 2013 at 8:56 AM, Chuck R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> Hi list,
> 
> I just got started with GNU Radio Companion for use with my FCDPP and it’s  
> been great, already am decoding FM stereo and it sounds very good. However  
> it probably isn’t the most optimal way to do it:

There are FM receivers/demod blocks already that you can play and  
experiment with. In 3.6, they are located in  
gnuradio-core/src/python/gnuradio/blks2impl, look for wfm\_rcv blocks.

Obviously, though, nothing stopping you from building and  
experimenting on your own.

> My filters are the inbuilt bandpass - they’re a bit hard on the CPU and was  
> hoping to use the IIR filters as biquads instead but I can’t seem to get  
> them to work. Filter was designed with this applet (  
> [A biquad calculator | EarLevel Engineering](http://www.earlevel.com/main/2010/12/20/biquad-calculator/) ) and I fed the A  
> values into Feed-Forward of the IIR and B values to the Feed-Backward and it  
> would not pass signal so I swapped A and B values and it apparently just  
> passed the signal unaffected. Any ideas what I’m doing wrong?

I think this has already been addressed in another email thread, but  
try negating the A vector. And try using the gr\_filter\_design tool.

> What is the internal resolution for the IIRs? I am asking because some of my  
> filter Q’s are in the 10-60 range and am concerned about blowing them up.

The taps are passed in as double-precision floating point.

> Also, what would be the most efficient way (in GNU Radio) to get the  
> absolute value of a signal? The best I’ve come up with so far was a  
> Float-\>Complex feeding a Complex-\>Magnitude.

Well, you could always write a block to do that yourself. There’s also  
the blocks::transcendental block that you can use. Should be able to  
pass it “fabsf” and “float” as the arguments.

> Thanks!
> 
> Chuck

Tom
