DSPRelated.com
Forums

Digital FM Demodulation - Filtering

Started by Alasdair September 22, 2003
Hi, 

I have no experience of 'software radio', however I am now trying to
model a digital FM radio. I am using a simple arctan of the I and Q to
generate the instantaneous phase and then differentiating by
subtracting successive phases and dividing by the sample interval to
give the FM output.

My questions are:
What if any low pass filtering should I put on the output of my FM
demodulation circuit, e.g. what spurii might I get?
What would be the consequences if I had no filtering on the output of
the demodulator?

The reason I ask is ordinarily if I knew my demodulated signal was
going to have a frequency no greater than X, then I would filter the
output to reject anything outside of X. However the sample rate at the
input of the demodulator is much greater (>100 times) than the
frequency the demodulated signal can be. With my demodulator the
sample rate at the output is the same as the input, hence a simple low
pass FIR filter is not so simple, but I still want to decimate the
output waveform and avoid folding in any spurii.

Thanks, 

Al

Alasdair wrote:
> > Hi, > > I have no experience of 'software radio', however I am now trying to > model a digital FM radio. I am using a simple arctan of the I and Q to > generate the instantaneous phase and then differentiating by > subtracting successive phases and dividing by the sample interval to > give the FM output.
That is a pretty heavyweight method. Here is more efficient way: FM Output = I*dQ/dt - Q*dI/dt You may have to take care about the input amplitude limiting.
> My questions are: > What if any low pass filtering should I put on the output of my FM > demodulation circuit, e.g. what spurii might I get?
It is determined by input I and Q bandwidth.
> What would be the consequences if I had no filtering on the output of > the demodulator?
The typical effect is the noise in the form of high and narrow spikes at the output.
> The reason I ask is ordinarily if I knew my demodulated signal was > going to have a frequency no greater than X, then I would filter the > output to reject anything outside of X. However the sample rate at the > input of the demodulator is much greater (>100 times) than the > frequency the demodulated signal can be. With my demodulator the > sample rate at the output is the same as the input, hence a simple low > pass FIR filter is not so simple, but I still want to decimate the > output waveform and avoid folding in any spurii.
The intelligent way would be to decimate in the front of FM demodulator, not after it. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
You will have to normalize by I*I+Q*Q and make sure that everything is in
time synch (no delay of differentiated signal relative to the I and Q
signals).

Dirk

Dirk A. Bell
DSP Consultant

"Vladimir Vassilevsky" <vlv@abvolt.com> wrote in message
news:3F6F106A.3EB57988@abvolt.com...
> > > Alasdair wrote: > > > > Hi, > > > > I have no experience of 'software radio', however I am now trying to > > model a digital FM radio. I am using a simple arctan of the I and Q to > > generate the instantaneous phase and then differentiating by > > subtracting successive phases and dividing by the sample interval to > > give the FM output. > > That is a pretty heavyweight method. Here is more efficient way: > > FM Output = I*dQ/dt - Q*dI/dt > > You may have to take care about the input amplitude limiting. > >
<clipped>
> > Vladimir Vassilevsky > > DSP and Mixed Signal Design Consultant > > http://www.abvolt.com
Since the FM detector is non-linear (arctan or other),
filtering/decimation prior to demodulation is not the same as
filtering/decimation post demodulation.  Even if the signal
i(t)+j*q(t) is bandlimited to nyquist, the signal phi(t)=arg(i+jq) is
not (except in trivial cases) so you need to be oversampled to
minimize the aliasing caused by the non-linearity.  Because arctan is
a memoryless non-linearity, the phase sequence phi(n) will exactly
equal phi(nT) (T is sample period) for all n even with aliasing but
the derivative will always be in error.  The pre-detection noise
bandwidth will not affect the post detection SNR above threshold but
it will affect threshold.  Since demodulation is non-linear, the
output will contain frequencies not present in the original modulating
signal so filtering is needed for proper decimation.  You need to use
the normal tricks for an efficient decimator.

Matt

alcmarsh@hotmail.com (Alasdair) wrote in message news:<404614f2.0309220622.9606186@posting.google.com>...
> Hi, > > I have no experience of 'software radio', however I am now trying to > model a digital FM radio. I am using a simple arctan of the I and Q to > generate the instantaneous phase and then differentiating by > subtracting successive phases and dividing by the sample interval to > give the FM output. > > My questions are: > What if any low pass filtering should I put on the output of my FM > demodulation circuit, e.g. what spurii might I get? > What would be the consequences if I had no filtering on the output of > the demodulator? > > The reason I ask is ordinarily if I knew my demodulated signal was > going to have a frequency no greater than X, then I would filter the > output to reject anything outside of X. However the sample rate at the > input of the demodulator is much greater (>100 times) than the > frequency the demodulated signal can be. With my demodulator the > sample rate at the output is the same as the input, hence a simple low > pass FIR filter is not so simple, but I still want to decimate the > output waveform and avoid folding in any spurii. > > Thanks, > > Al
Matt Boytim wrote:
> > Even if the signal > i(t)+j*q(t) is bandlimited to nyquist, the signal phi(t)=arg(i+jq) is > not (except in trivial cases)
Hey Matt, Really? I can't off-the-cuff think of why this may or may not be. Are you sure? Do you have a pointer? This (FM demodulation) is actually of significant interest to me as well. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO http://home.earthlink.net/~yatescr
Vladimir Vassilevsky <vlv@abvolt.com> wrote in message news:<3F6F106A.3EB57988@abvolt.com>...
(snip)
> That is a pretty heavyweight method. Here is more efficient way:
- Thanks for that information. Currently I'm trying to build a, hopefully simple and close to theory, model to use as a gold standard for regression testing a more optimised implementation.
> The intelligent way would be to decimate in the front of FM demodulator, > not after it.
Not sure I understand this. If I am modulating my carrier with say 100KHz per volt, and my original audio signal has amplitude 1 volt and frequency 1 KHz, then as I understand it the bandwidth into the demodulator will be circa 200 KHz (requiring > 200 KSPS I and Q), and the bandwidth required to represent audio signal coming out of the demodulator will still be 1KHz (requiring > 2 KSPS I only). If I decimate on the way into the demodulator will I not loose information? If I decimate on the way out it will require a pretty heavy filter. What I'd like to do is just throw away the samples without filtering first, but this is 'well dodgy', unless I have a good understanding of the sources of 'artefacts' in the demodulator output at frequencies greater that the original audio signal. Any comments or contradictions in my understanding above are gratefully received. Thanks Al
Well, if for example a bandlimited i(t)+jq(t) has a trajectory through
the origin, phi(t) will instantaneously flip 180 degrees which would
have infinite bandwidth.

But, in general, the FM modulation of a bandlimited signal produces a
signal which has infinite bandwidth, which we typically approximate as
finite bandwidth.  The truncation of bandwidth is equivalent to adding
modulation components that cancel the truncated components; these
components extend to infinite frequency.  It is like making a sine
wave from square waves - you start with the fundamental, then add a
square wave to cancel the 3rd harmonic, then one to cance what's left
at the 5th, and so on.  It doesn't matter if we explicity go through
the special fm construction or just truncate the spectrum, the
demodulated result will be the same - a detected signal of infinite
bandwidth.

Because arctan is memoryless, the arctan(i(nT)+jq(nT)) will be
identical to arctan(i(t)+jq(t)) at all nT but if you reconstruct
phihat(t) from arctan(i(nT)+jq(nT)) then phi(t) and phihat(t) will
disagree between the sample points because of aliasing (the usual
infinitely many signals have the identical sample points but only one
is bandlimited).  So the phi(nT) that you get corresponds to an
aliased phit(t) and not a bandlimited phi(t).

To minimize the aliasing you want to be oversampled relative to the
message bandwidth, which for large index fm you probably already are
but for phase modulation maybe not.

Because angle modulation is non-linear this doesn't seem surprising to
me.  I don't have any references.  The guy who taught me about fm has
died.

Does this help?

Matt

Randy Yates <yates@ieee.org> wrote in message news:<3F6FD798.9CB600BD@ieee.org>...
> Matt Boytim wrote: > > > > Even if the signal > > i(t)+j*q(t) is bandlimited to nyquist, the signal phi(t)=arg(i+jq) is > > not (except in trivial cases) > > Hey Matt, > > Really? I can't off-the-cuff think of why this may or may not be. Are > you sure? Do you have a pointer? This (FM demodulation) is actually > of significant interest to me as well.
Thanks Matt, 

So I think what you are telling me is that I can not do without a
'proper' LPF and decimate - only that there are efficient and
inefficient ways of doing this.

It seems to me that in the general case even if decimation is done
efficiently if the FM modulation is quite wide compared to the
bandwidth of the audio signal, then this decimation will be a
significant part of the overall complexity of the demodulator.

Would you agree I am correct in thinking this, or do I have a
misunderstanding somewhere?


Thanks, 


Al
alcmarsh@hotmail.com (Alasdair) wrote in message news:<404614f2.0309230300.41fcbee8@posting.google.com>...
> Thanks Matt, > > So I think what you are telling me is that I can not do without a > 'proper' LPF and decimate - only that there are efficient and > inefficient ways of doing this.
Yes, and yes.
> > It seems to me that in the general case even if decimation is done > efficiently if the FM modulation is quite wide compared to the > bandwidth of the audio signal, then this decimation will be a > significant part of the overall complexity of the demodulator. > > Would you agree I am correct in thinking this, or do I have a > misunderstanding somewhere?
The decimation filter will be non-trivial. Your pre-detection filter (if you have one) may dominate throughput because it must run at the high rate and may have no special properties; the decimation filter benefits from the rate reduction, don't care regions, etc. For large (composite) decimation factors, a cascade of CIC's, half-bands, and FIR's is typical and efficient. Matt
> > > Thanks, > > > Al

Alasdair wrote:

> Hi, > > I have no experience of 'software radio', however I am now trying to > model a digital FM radio. I am using a simple arctan of the I and Q to > generate the instantaneous phase and then differentiating by > subtracting successive phases and dividing by the sample interval to > give the FM output. > > My questions are: > What if any low pass filtering should I put on the output of my FM > demodulation circuit, e.g. what spurii might I get? > What would be the consequences if I had no filtering on the output of > the demodulator? > > The reason I ask is ordinarily if I knew my demodulated signal was > going to have a frequency no greater than X, then I would filter the > output to reject anything outside of X. However the sample rate at the > input of the demodulator is much greater (>100 times) than the > frequency the demodulated signal can be. With my demodulator the > sample rate at the output is the same as the input, hence a simple low > pass FIR filter is not so simple, but I still want to decimate the > output waveform and avoid folding in any spurii. > > Thanks, > > Al
Why not use a PLL? Tom