# DSP Tricks: Frequency demodulation algorithms

An often used technique for measurement of the instantaneous frequency of a complex sinusoidal signal is to compute the derivative of the signal’s instantaneous θ(*n*) phase as shown in **Figure 13–60 below**.

*Figure 13–60 ** Frequency demodulator using an arctangent function.*

This is the traditional discrete signal FM demodulation method, and it works fine. The demodulator’s instantaneous output frequency is **Eq13-111 below:**

where *f _{s}*is the sample rate in Hz.

Computing instantaneous phase θ(*n*) requires an arctangent operation, which is difficult to implement accurately without considerable computational resources. Here’s a scheme for computing ∆θ(*n*) for use in Eq. (13–111) without the intermediate θ(*n*) phase computation (and its pesky arctan-gent). We derive the ∆θ(*n*) computation algorithm as follows, initially using continuous-time variables based on the following definitions:

*i***( t) = in-phase signal,
q(t) = quadrature phase signal,
θ(t) = tan^{–1}[q(t)/i(t)] = instantaneous phase,
∆θ(t) = time derivative of θ(t). (13-112)
**

First, we let *r*(*t*)= *q*(*t*)/*i*(*t*) be the signal for which we’re trying to compute the derivative of its arctangent. The time derivative of tan^{–1}[*r*(*t*)], a calculus identity, is

Because d[*r*(*t*)]/dt = d[*q*(*t*)/*i*(*t*)]/dt, we use the calculus identity for the derivative of a ratio to write

Plugging Eq. (13–114)’s result into Eq. (13–113), we have

Replacing *r*(*t*) in Eq. (13–115) with *q*(*t*)/*i*(*t*) yields

We’re getting there. Next we multiply the numerator and denominator of the first ratio in Eq. (13–116) by *i*^{2}(*t*), and replace *t*with our discrete time variable index *n*to arrive at our final result of

** **

*Figure 13–61. **Frequency demodulator without arctangent: (a) standard process; **(b) simplified process.*

The implementation of this algorithm, where the derivatives of *i*(*n*) and *q*(*n*) are *i*’(*n*) and *q*’(*n*) respectively, is shown in Figure 13–61(a). The ∆φ(*n*) output sequence is used in Eq. (13–111) to compute instantaneous frequency.

The Differentiator is an tapped-delay line FIR differentiating filter with an odd number of taps. Reference [54] reports acceptable results when the differentiator is a FIR filter having 1,0,–1 as coefficients.

The Delay elements in Figure 13–61 are used to time-align *i*(*n*) and *q*(*n*) with the outputs of the differentiators such that the delay is (*K*–1)/2 samples when a *K*-tap differentiator is used. In practice, the Delay can be obtained by tapping off the center tap of the differentiating filter.

If the *i*(*n*)+*jq*(*n*) signal is purely FM and *hard limited *such that *i*^{2}(*n*)+*q*^{2}(*n*) = Constant, the denominator computations in Eq. (13–117) need not be performed. In this case, using the 1,0,–1 coefficient differentiators, the FM demodulator is simplified to that shown in Figure 13–61(b) where the Scaling operation is multiplication by the reciprocal of Constant.

*Used with the permission of the publisher, Prentice Hall, this on-going series of articles on Embedded.com is based on copyrighted material from "Understanding Digital Signal Processing, Second Edition" by Richard G. Lyons. The book can be purchased on line. *** **

*Richard Lyons** is a consulting systems engineer and lecturer with Besser Associates. As a lecturer with Besser and an instructor for the University of California Santa Cruz Extension, Lyons has delivered digitasl signal processing seminars and training course at technical conferences as well at companies such as Motorola, Freescale, Lockheed Martin, Texas Instruments, Conexant, Northrop Grumman, Lucent, Nokia, Qualcomm, Honeywell, National Semiconductor, General Dynamics and Infinion.*

Please confirm the information below before signing in.

{* #socialRegistrationForm *} {* firstName *} {* lastName *} {* displayName *} {* emailAddress *} {* addressCountry *} {* companyName *} {* ednembJobfunction *} {* jobFunctionOther *} {* ednembIndustry *} {* industryOther *}