# Is it difficult to do FM demodulation digitally?

Started by May 5, 2011
```I've been looking at making an FM demodulator for a software defined
radio. In principle at least this is trivial if you have a complex
signal (I and Q), as you can compute the phase (atan(Q/I), then the
modulation amplitude is just the derivative of phase with time. As far
as I can see, this is should trivially easy, though the lack of arctan
function might be the stumbling block on a fixed point DSP, but that&#347;
not an issue for me, as a general purpose x86 CPU will be used.

http://www.dsprelated.com/showmessage/50153/1.php

gives a formula:

Vfm = (I*dQ/dt - Q*dI/dt)/(I^2 + Q^2)

However, if one looks at many reports of the FlexRadio software
getting a decent FM demodulator. The performance of those never seems
to live up to the hype.

covering 1.8 to 30 MHz and also 50 MHz. This is based on a DSP, using
DSP for demodulation of SSB, variable bandwidth filters, AGC, noise
reduction etc. But for FM demodulation Kenwood have chosen to convert
to another IF frequency (455 kHz) and add an FM demodulator chip. All
they use the DSP for on FM is for audio processing.

Why would a manufacturer of a transceiver go to the bother of adding a
new IF stage and a FM demodulation chip, when this could be done in

This is making me think that FM demodulation is a lot more complex
than I thought it would be.

Has anyone got any comments on the best way to demodulate a mono FM
signal by using the I and Q outputs of an IQ demodulator?

Dave
```
```On May 5, 8:34&nbsp;am, David Kirkby <drkir...@gmail.com> wrote:
> I've been looking at making an FM demodulator for a software defined
> radio. In principle at least this is trivial if you have a complex
> signal (I and Q), as you can compute the phase (atan(Q/I), then the
> modulation amplitude is just the derivative of phase with time. As far
> as I can see, this is should trivially easy, though the lack of arctan
> function might be the stumbling block on a fixed point DSP, but that&#347;
> not an issue for me, as a general purpose x86 CPU will be used.
>
> http://www.dsprelated.com/showmessage/50153/1.php
>
> gives a formula:
>
> Vfm = (I*dQ/dt - Q*dI/dt)/(I^2 + Q^2)
>
> However, if one looks at many reports of the FlexRadio software
> defined radio, it is clear that FlexRadio have never succeeded in
> getting a decent FM demodulator. The performance of those never seems
> to live up to the hype.
>
> Radio Society of Great Britain) about a Kenwood TS-590S HF transceiver
> covering 1.8 to 30 MHz and also 50 MHz. This is based on a DSP, using
> DSP for demodulation of SSB, variable bandwidth filters, AGC, noise
> reduction etc. But for FM demodulation Kenwood have chosen to convert
> to another IF frequency (455 kHz) and add an FM demodulator chip. All
> they use the DSP for on FM is for audio processing.
>
> Why would a manufacturer of a transceiver go to the bother of adding a
> new IF stage and a FM demodulation chip, when this could be done in
> the DSP they already have?
>
> This is making me think that FM demodulation is a lot more complex
> than I thought it would be.
>
> Has anyone got any comments on the best way to demodulate a mono FM
> signal by using the I and Q outputs of an IQ demodulator?
>
> Dave

Dave,
For plane vanilla FM demod, there is hardware that does it for real
cheap. Perhaps the Rx manufacturer was motivated by price. I've done
FM demod via DSP in a software radio succesfully, but the units were
special purpose and I had a lot of horsepower and the system was
highly oversampled - the units were originaly designed for a different
application. So I was able to drop in some code and have it work well.
But to add a DSP and A/D just for demodulation is pricey compared a
simple analog pll demodulator. Sometimes you have to consider the
other components of the system.

Clay
```
```
David Kirkby wrote:

> I've been looking at making an FM demodulator for a software defined
> radio. In principle at least this is trivial if you have a complex
> signal (I and Q), as you can compute the phase (atan(Q/I), then the
> modulation amplitude is just the derivative of phase with time.

Devil is in the details. Look for the sample rate and the accuracy
required to make a decent FM demodulator.

> As far
> as I can see, this is should trivially easy, though the lack of arctan
> function might be the stumbling block on a fixed point DSP, but that&#347;
> not an issue for me, as a general purpose x86 CPU will be used.
>
> http://www.dsprelated.com/showmessage/50153/1.php
>
> gives a formula:
>
> Vfm = (I*dQ/dt - Q*dI/dt)/(I^2 + Q^2)
>
>
> However, if one looks at many reports of the FlexRadio software
> defined radio, it is clear that FlexRadio have never succeeded in
> getting a decent FM demodulator. The performance of those never seems
> to live up to the hype.
>
> Radio Society of Great Britain) about a Kenwood TS-590S HF transceiver
> covering 1.8 to 30 MHz and also 50 MHz. This is based on a DSP, using
> DSP for demodulation of SSB, variable bandwidth filters, AGC, noise
> reduction etc. But for FM demodulation Kenwood have chosen to convert
> to another IF frequency (455 kHz) and add an FM demodulator chip. All
> they use the DSP for on FM is for audio processing.
>
> Why would a manufacturer of a transceiver go to the bother of adding a
> new IF stage and a FM demodulation chip, when this could be done in
> the DSP they already have?

I am not familiar with TS-590S architecture details; however from what
you wrote it looks like zero IF SDR. Perhaps their DSP is not capable of
high sample rates and has a problem with DC offset also.

> This is making me think that FM demodulation is a lot more complex
> than I thought it would be.

It takes some effort to do the things for good.

> Has anyone got any comments on the best way to demodulate a mono FM
> signal by using the I and Q outputs of an IQ demodulator?

To begin with, do not use the outputs of the external I/Q demodulator.
Sample the real signal, do complex signals in the software.

DSP and Mixed Signal Design Consultant
http://www.abvolt.com

```
```On May 5, 3:44&#2013266080;pm, Clay <c...@claysturner.com> wrote:

> Dave,
> For plane vanilla FM demod, there is hardware that does it for real
> cheap. Perhaps the Rx manufacturer was motivated by price. I've done
> FM demod via DSP in a software radio succesfully, but the units were
> special purpose and I had a lot of horsepower and the system was
> highly oversampled - the units were originaly designed for a different
> application. So I was able to drop in some code and have it work well.
> But to add a DSP and A/D just for demodulation is pricey compared a
> simple analog pll demodulator. Sometimes you have to consider the
> other components of the system.
>
> Clay

Thank you Clay,

But the issue here is that this Kenwood TS-590S HF transceiver already
has the A/D and DSP. So it would not need to be added. Instead they
must add at least a mixer to convert to 455 kHz and the demodulation
chip, when the A/D and DSP are already present.

It does the demodulation of single side band, IF filtering and
countless other things in a 32-bit DSP, so why would they take the FM
demodulation to another intermediate frequency and use another chip?

I don't know the sample rate used in the ICOM, but the last
intermediate frequency is 24 kHz, so they wont be using a very fast/
expensive ADC/DSP combo that is for sure.

The fact the Flexradio seems to have countless problems with FM
demodulation, makes me think this might be difficult. But I'd like to
know what the issues are.

I'd be interested in how you did this. Did you try different methods
before coming up with the best one?
```
```On May 5, 4:52&#2013266080;pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote:

> I am not familiar with TS-590S architecture details; however from what
> you wrote it looks like zero IF SDR. Perhaps their DSP is not capable of
> high sample rates and has a problem with DC offset also.

No, it's not a zero IF, but it is a low frequency. The last IF is 24
kHz. I don't know the sample rate of the ADC.

Is FM more difficult to do that AM or SSB?

The Flexradio are zero IF, and maybe that's that's part of the
problem.

> > This is making me think that FM demodulation is a lot more complex
> > than I thought it would be.
>
> It takes some effort to do the things for good.

Unfortunately, I don't know how to do this right.

> > Has anyone got any comments on the best way to demodulate a mono FM
> > signal by using the I and Q outputs of an IQ demodulator?
>
> To begin with, do not use the outputs of the external I/Q demodulator.
> Sample the real signal, do complex signals in the software.

What's the advantage of doing that?

There's one disadvantage for us, in that we intend using a high
quality (24-bit, 192 kbit/s) audio sound-card to do the digitization.
If we sample the real signal, we can only get 192,000 samples per
second. Given the audio card has 6 channels, we can use two of them to
double the sample rate, by using one to sample the I and the other to
sample the Q.

A lot of zero-IF DSP based receivers are made, but I think 1/f noise
must be more of a problem than if one uses a low IF like Kenwood do in

While zero-IF is conceptionally simple,  I don''t think it is
technically as good as using a non-zero IF frequency, but I may be
wrong.

> DSP and Mixed Signal Design Consultanthttp://www.abvolt.com

Dave
```
```
David Kirkby wrote:

> There's one disadvantage for us, in that we intend using a high
> quality (24-bit, 192 kbit/s) audio sound-card to do the digitization.

Bad idea. That won't work. Stop here.

VLV

```
```On May 5, 1:55&#2013266080;pm, David Kirkby <drkir...@gmail.com> wrote:
> On May 5, 3:44&#2013266080;pm, Clay <c...@claysturner.com> wrote:
>
> > Dave,
> > For plane vanilla FM demod, there is hardware that does it for real
> > cheap. Perhaps the Rx manufacturer was motivated by price. I've done
> > FM demod via DSP in a software radio succesfully, but the units were
> > special purpose and I had a lot of horsepower and the system was
> > highly oversampled - the units were originaly designed for a different
> > application. So I was able to drop in some code and have it work well.
> > But to add a DSP and A/D just for demodulation is pricey compared a
> > simple analog pll demodulator. Sometimes you have to consider the
> > other components of the system.
>
> > Clay
>
> Thank you Clay,
>
> But the issue here is that this Kenwood TS-590S HF transceiver already
> has the A/D and DSP. So it would not need to be added. Instead they
> must add at least a mixer to convert to 455 kHz and the demodulation
> chip, when the A/D and DSP are already present.
>
>
> It does the demodulation of single side band, IF filtering and
> countless other things in a 32-bit DSP, so why would they take the FM
> demodulation to another intermediate frequency and use another chip?
>
> I don't know the sample rate used in the ICOM, but the last
> intermediate frequency is 24 kHz, so they wont be using a very fast/
> expensive ADC/DSP combo that is for sure.
>
> The fact the Flexradio seems to have countless problems with FM
> demodulation, makes me think this might be difficult. But I'd like to
> know what the issues are.
>
> I'd be interested in how you did this. Did you try different methods
> before coming up with the best one?

David, I was working with narrowband FM - i.e., the spectral occupancy
was 30kHz. If you are looking at commercial braodcast FM - you are
then looking at a much higher spectral occupancy. For example the
typical broadcast channel is 200kHz wide so you will need to sample at
least 400kHz. The channel is wider than the deviation which in the US
is +-75kHz with mono stations being allowed to go an extra 10%. But
you can see your samping rate needs to be pretty high.

You can cheat and narrow the channel down with filtering before
demodulating, but then you lose your quieting and then end up with a
not so high hi-fi.

Perhaps the DSP that was already in the receiver was was maxed out
with its other tasks. And that is why they added another one.

IHTH,
Clay

```
```On 5.5.11 9:09 , David Kirkby wrote:
> On May 5, 4:52 pm, Vladimir Vassilevsky<nos...@nowhere.com>  wrote:
>
>> I am not familiar with TS-590S architecture details; however from what
>> you wrote it looks like zero IF SDR. Perhaps their DSP is not capable of
>> high sample rates and has a problem with DC offset also.
>
>
> No, it's not a zero IF, but it is a low frequency. The last IF is 24
> kHz. I don't know the sample rate of the ADC.
>
> Is FM more difficult to do that AM or SSB?

It should work with NBFM, but the sample rate (24 k) is far too

--

Tauno Voipio, OH2UG
```
```On May 5, 8:10&#2013266080;pm, Clay <c...@claysturner.com> wrote:

> David, I was working with narrowband FM - i.e., the spectral occupancy
> was 30kHz. If you are looking at commercial braodcast FM - you are
> then looking at a much higher spectral occupancy. For example the
> typical broadcast channel is 200kHz wide so you will need to sample at
> least 400kHz. The channel is wider than the deviation which in the US
> is +-75kHz with mono stations being allowed to go an extra 10%. But
> you can see your samping rate needs to be pretty high.

I'm looking only at narrow band FM for amateur radio use, where
typically the channel spacing is 12.5 KHz, so onereally needs to keep
the modulation under that. I'm not interested in commercial FM
transmissions. Hence I would have thought that using a 24-bit sound
card able to sample at 192 KHz would have  been suitable.

> You can cheat and narrow the channel down with filtering before
> demodulating, but then you lose your quieting and then end up with a
> not so high hi-fi.
>
> Perhaps the DSP that was already in the receiver was was maxed out
> with its other tasks. And that is why they added another one.
>
> IHTH,
> Clay

Perhaps that's the reason, but the fact I know the FlexRadio has FM
demodulation issues makes me wonder if demodulating even narrow band
FM is more difficult than I thought it would be.

Dave
```
```On May 5, 7:13&#2013266080;pm, Vladimir Vassilevsky <nos...@nowhere.com> wrote:
> David Kirkby wrote:
> > There's one disadvantage for us, in that we intend using a high
> > quality (24-bit, 192 kbit/s) audio sound-card to do the digitization.
>
> Bad idea. That won't work. Stop here.

I wish you would elaborate more.

I think you might be jumping to conclusions. I'm only looking to
demodulate narrow band FM with a bandwidth of 10 kHz or so. I would
have thought that perfectly possible with a sample frequency of 192
KHz.

What makes you say an audio card can't be used?

> VLV

Dave

Dave
```