0% found this document useful (0 votes)
9 views17 pages

Wirelesspi Frequency Modulation FM and Demodulation Using DSP Techniques

Uploaded by

Hendiek Cakep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views17 pages

Wirelesspi Frequency Modulation FM and Demodulation Using DSP Techniques

Uploaded by

Hendiek Cakep
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Wireless Pi

Discover the Joy of Signals, Wireless and Machine Learning

Frequency Modulation (FM) and


Demodulation Using DSP Techniques

Frequency Modulation ﴾FM﴿ is as old as the history of wireless communications


itself. The past few decades saw the rise of digital signal processing in all spheres
of life that pervaded even the implementation of analog modulation schemes.
Today many of the FM systems are built using discrete‐time techniques instead of
the conventional circuitry as described below.

Frequency Modulation

https://wirelesspi.com/
In digital communications, data is sent through altering a characteristic of an
electromagnetic wave such as amplitude, frequency or phase in discrete steps
﴾e.g., M number of levels﴿. Such systems are known as Amplitude Shift Keying
﴾ASK﴿, Frequency Shift Keying ﴾FSK﴿ and Phase Shift Keying ﴾PSK﴿, respectively.
Analog modulation schemes, on the other hand, vary the desired parameter in a
continuous fashion according to the message signal.

Frequency Modulated ﴾FM﴿ systems trade off bandwidth with power, i.e., they
exhibit good noise performance at a cost of high bandwidth. This is why they are
used in FM audio broadcasting and specialized point‐to‐point communication
systems. We now turn towards how an FM modulator is implemented through
DSP techniques.

Message Signal

The starting point is the familiar relation between the frequency f and
instantaneous phase θ(t) = 2πf t in a sinusoid. The frequency is defined as the
rate of change of phase.

1 dθ(t)
f =
2π dt

This frequency needs not be constant at all times and can be represented as f (t).
As the frequency changes, the relation still holds true. In our scenario, the
message signal, denoted by x(t), can modulate the frequency variations in a
carrier sinusoid. Therefore,

1 dθ(t)
x(t) =
2π dt

To find the phase θ(t) from here, we need to integrate both sides of the above
equation starting with zero initial conditions at time 0.

θ(t) = 2π ∫ x(τ )dτ (1)


0

https://wirelesspi.com/
If the carrier wave is represented as

y(t) = Ac sin(2πfc t),

then the waveform for an FM signal is given by introducing the time‐varying


phase into the above expression.

y(t) = Ac sin [2πfc t + θ(t)]

t
(2)
= Ac sin[2πfc t + 2πkf ∫ x(τ )dτ ]
0

where the phase θ has been replaced from Eq ﴾1﴿ that is multiplied with a new
factor k , the frequency deviation constant.
f

Frequency Deviation

To understand what the frequency deviation means, consider the instantaneous


phase expression in Eq ﴾2﴿.

θc (t) = 2πfc t + 2πkf ∫ x(τ )dτ (3)


0

The instantaneous frequency is thus given by

1 dθc (t)
f (t) = = fc + kf x(t)
2π dt

This equation shows that the instantaneous frequency varies according to the
message signal scaled by the frequency deviation. The maximum deviation of this
frequency occurs for the maximum value of |x(t)|. Denoting this value by A , we m

get the peak frequency deviation.

Δf = kf Am (4)

Peak frequency deviation represents how far the modulated signal frequency can

https://wirelesspi.com/
stretch in either direction as compared to the carrier frequency. Note that it
depends on the frequency deviation constant as well as the peak amplitude of the
input signal.

Next, we turn our attention towards the modulation index.

Modulation Index

Consider a sinusoidal message signal written as

x(t) = Am cos(2πfm t)

Plugging this expression into Eq ﴾2﴿, we get

Am
y(t) = Ac sin[2πfc t + 2πkf sin(2πfm t)]
2πfm

= Ac sin [2πfc t + β sin(2πfm t)]

In the above expression, the parameter β is the FM modulation index defined as

kf Am
β =
fm

If it is scaled by the maximum value in the message signal A , the modulation


m

index can be interpreted as the normalized frequency deviation, where this


normalization is with respect to the maximum frequency in the message signal.
This is where the ideas of narrowband FM and wideband FM arise where a small
modulation index β << 1 indicates narrowband FM while a large β represents
wideband FM.

For a non‐sinusoidal signal, the FM modulation index is written as

kf Am Δf
β = =
B B

https://wirelesspi.com/
where B is the bandwidth of the message signal x(t), A m is its maximum value in
absolute sense and Δf is defined in Eq ﴾4﴿. But how much is the bandwidth B
occupied by an FM signal?

FM Bandwidth

FM signals are non‐linear and hence there is no straightforward way to derive the
occupied bandwidth. As an approximation, Carson’s rule gives the effective
bandwidth of an FM signal that is determined on the basis of 98% bandwidth
occupancy.

BFM = 2(β + 1)B = 2(Δf + B)

where B is the message signal bandwidth and β is defined in the last equation
above. The spectra of the message signal, integration of the message signal and
the modulated signal are plotted in the figure below.

https://wirelesspi.com/
For example, in commercial FM broadcasts, the audio signal has a maximum
frequency of approximately f m = 15 kHz while the peak frequency deviation is
75 kHz. From Carson’s rule, the bandwidth can be approximated as

75
BFM = 2 ( + 1) 15 = 180 kHz
15

If an AM system was used to transmit the same information, the bandwidth


required would only be twice the audio signal bandwidth, or 30 kHz. While worse
than Amplitude Modulated ﴾AM﴿ systems in terms of bandwidth, FM signals enjoy
certain advantages for which bandwidth is a worthwhile price to pay.

1. Noise in communication systems impact the amplitude of a wireless signal


differently as compared to its frequency. While amplitude variations from noise
appear in the demodulated signal in AM systems, white noise is distributed
uniformly in frequency and exhibits no such variations in frequency. Therefore,
FM signals are inherently immune to random noise and offer better signal
fidelity suited to high‐quality broadcasting systems.
2. Since the variations in the message are encoded into signal frequency but not
the amplitude, the modulation signal has a constant envelope that can be
transmitted with efficient non‐linear amplifiers.

With continuous‐time details covered, we can easily translate this process into a
digital FM modulator.

Discrete‐Time Implementation

The modulation phase in Eq ﴾1﴿ is a continuous‐time description of the


modulation process. For a discrete‐time implementation, we need to sample this
signal after including the frequency deviation k . f

nTs

θ(nTs ) = 2πkf ∫ x(τ )dτ


0

https://wirelesspi.com/
(n−1)Ts nTs

= 2πkf ∫ x(τ )dτ + 2πkf ∫ x(τ )dτ (5)


0 (n−1)Ts

= θ[(n − 1)Ts ] + 2πkf Ts x[(n − 1)Ts ]

where the continuous‐time integral has been replaced with the backward
difference version of a discrete‐time integrator. A block diagram of a discrete‐
time FM modulator is now drawn in the figure below where D denotes a unit time
delay commonly written as z −1
. The diagram includes the complete instantaneous
phase in the carrier signal, see Eq ﴾3﴿. The Look‐Up Table ﴾LUT﴿ stores the values of
cosine and sine functions. The complete setup forms a Numerically Controlled
Oscillator ﴾NCO﴿ for FM signal generation. The NCO combined with a Digital to
Analog Converter ﴾DAC﴿ turns into a Direct Digital Synthesizer ﴾DDS﴿
implmentation.

Analogous to Eq ﴾2﴿, the output y[n] is a complex exponential at a frequency f c

that is written as

j[2πfc nTs +θ(nTs )]


y[n] = Ac e (6)

An example FM signal with a noisy message signal of frequency 1 Khz, frequency


deviation 2.5 kHz and a carrier frequency of 5 kHz is plotted in the figure below
﴾only the real part is shown﴿. Observe the frequency variations in the modulated
signal according to the message signal.

https://wirelesspi.com/
We now see how this signal can be demodulated using digital signal processing
techniques.

FM Demodulation

To focus on the signal processing operations, let us remove the carrier term by
multiplying y[n] in Eq ﴾6﴿ with e −j2πfc nTs
and assume that A is equal to 1 for
c

simplicity.

−j2πfc nTs jθ(nTs )


z[n] = y[n]e = e

What remains is a complex exponential with the discrete‐time phase from Eq ﴾5﴿.

jθ(nTs ) j{θ[(n−1)Ts ]+2πkf Ts x[(n−1)Ts ]}


z[n] = e = e (7)

From here, the FM demodulation techniques can be divided into three different

https://wirelesspi.com/
categories.

Differentiate and access phase


Access phase and differentiate
Phase‐Locked Loop ﴾PLL﴿

We describe each of these categories in detail next.

Differentiate and Access Phase

A conventional demodulation technique used in old analog FM receivers is to


differentiate the FM signal y(t) in Eq ﴾2﴿.

ẏ (t) = Ac [2πfc + 2πkf ⋅ x(t)] cos[2πfc t + 2πkf ∫ x(τ )dτ ]


0

After passing through a DC blocker, this process renders the message signal x(t)
as envelope variations of the derivative ﴾sinusoidal﴿ signal. An envelope detector
can then track these changes to reproduce x(t) at the receiver.

In discrete domain, this would be an inefficient method to demodulate an FM


signal. But something that closely resembles this technique can be implemented.
For this purpose, consider the block diagram below where D denotes a unit time
delay, commonly shown as z −1
.

https://wirelesspi.com/
What happens when the above signal is multiplied with a delayed and conjugated
version of itself? Since a conjugate operation reverses the phase sign, we have

jθ(nTs ) −jθ[(n−1)Ts ] j{θ(nTs )–θ[(n−1)Ts ]}


v[n] = e ⋅ e = e

We deduce that conjugate multiplication computes the difference between


phases. Apparently, this is a delayed conjugate product operation used in many
signal processing applications. Behind the scene, this is an implementation of a
discrete‐time first‐difference differentiator.

Using Eq ﴾7﴿ in the above expression and taking the angle through atan2﴾ ﴿
operation or an approximation of atan2﴾ ﴿, we can write

∡v[n] = 2πkf Ts ⋅ x[(n − 1)Ts ]



Message Signal

which is our desired message signal delayed by one time unit and scaled by
2πkf Ts .

1
x[(n − 1)Ts ] = ∡v[n]
2πkf Ts

The demodulated waveform for an FM signal is shown in the figure below. A very
important step to remember is to first unwrap the phase obtained to remove the
discontinuities so that the differentiator can compute the correct values.

https://wirelesspi.com/
While this is a simple procedure, the first‐difference differentiator suffers from a
performance penalty due to excessive noise. We describe an improved technique
for FM demodulation next.

Access Phase and Differentiate

The above technique computes the derivative ﴾first difference﴿ first and accesses
the phase next. A better technique is to access the phase first and then compute
the derivative with a superior filter. There are two routes to this end.

1. Consider the signal z[n] in Eq ﴾7﴿ and access its phase through an atan2﴾ ﴿
operation.

∡z[n] = θ(nTs )

As shown earlier in Eq ﴾1﴿, the derivative of this phase is our desired message
signal x[n]. In practice, this derivative is computed through a derivative FIR
filter with impulse response h[n] that can be computed through a variety of
techniques ﴾see the design of a discrete‐time differentiator for details﴿. This is
convolved with the signal phase as

1
x[n] = {θ(nTs ) ∗ h[n]}
2πkf Ts

A block diagram of this procedure is drawn in the figure below.

https://wirelesspi.com/
Again, it is of utmost importance to unwrap the phase after extraction to get a
valid result. This technique is more suited to FPGA implementations where a
CoRDiC routine can be pipelined for a faster output.

2. From a DSP ﴾Digital Signal Processor﴿ implementation perspective, the phase


access and derivative operation can be simplified as follows.

Start with expressing the signal z[n] in its real ﴾in‐phase﴿ and imaginary
﴾quadrature﴿ components.

z(nTs ) = zI (nTs ) + jzQ (nTs )

The phase θ(nT s) is then given by

zQ (nTs )
−1
θ(nTs ) = tan [ ]
zI (nTs )

Using basic calculus identity, its derivative can be written as

d zQ (nTs ) 1 d zQ (nTs )
˙ −1
θ (nTs ) = tan [ ] = [ ]
2 2
dt zI (nTs ) 1 + z (nTs )/z (nTs ) dt zI (nTs )
Q I

Next, we can simplify the above expression as

2
z (nTs ) zI (nTs )ż Q (nTs )– zQ (nTs )ż I (nTs )
I
˙
θ (nTs ) =
2 2 2
z (nTs ) + z (nTs ) z (nTs )
I Q I

https://wirelesspi.com/
This generates our final relation as

zI (nTs )ż Q (nTs )– zQ (nTs )ż I (nTs )


˙
θ (nTs ) =
2 2
z (nTs ) + z (nTs )
I Q

A block diagram of this approach is shown in the figure below.

Note the following in this figure.

There is no atan2﴾ ﴿ computation that gives rise to extra complexity in


the algorithm.
As with the previous atan2 + differentiate approach, the derivative here
can be implemented with an FIR filter.
In this technique, it is imperative to design an FIR differentiator with an
https://wirelesspi.com/
odd number of taps. The reason is to align the signals in the two parallel
branches with each other as the group delay of an FIR filter of length N
is given by

N − 1
Group Delay =
2

With an odd number of taps the delay in the FIR differentiator is an


integer number of samples. Therefore, the Delay block above is simply
an integer number of samples. In a practical implementation, the first
and last (N − 1)/2 samples from the differentiator are removed to
automatically obtain alignment with z ] and z
I [n .
Q [n]

We now move towards our third and final approach for DSP‐based FM
demodulation.

Phase‐Locked Loop ﴾PLL﴿

A discrete‐time Phase‐Locked Loop ﴾PLL﴿ that is used for carrier and clock
synchronization in Software Defined Radios ﴾SDR﴿ can also be employed to
demodulate an FM signal. A block diagram of such an aproach is shown in the
figure below where the input signal s[n] can be replaced with our input signal
z[n] in this case. Just like a carrier PLL tracks the phase and frequency of an
incoming sinusoid, the same PLL can track the frequency of an FM modulated
signal and automatically performs the demodulation in this process.

https://wirelesspi.com/
The loop constants in the above Proportional‐plus‐Integrator ﴾PI﴿ filter can be
computed as described in the PLL in an SDR context. The main problem with this
approach is the need for a large lookup table for Direct Digital Synthesis ﴾DDS﴿ to
store samples of sines and cosines.

Conclusion

Three different approaches for FM demodulation in DSP based systems are


described, namely differentiate and then access the phase, access the phase and
then differentiate and a PLL. The atan2﴾ ﴿ and differentiator approach, along with
its derivative FIR filters, give the best results in terms of complexity and output
SNR performance.

https://wirelesspi.com/
About the Author

Qasim Chaudhari is an independent consultant and trainer with expertise in wireless


communications, Software Defined Radio (SDR) and Digital Signal Processing (DSP).
He obtained a PhD in Electrical Engineering from Texas A&M University and worked
at various organizations including Qualcomm, Renzym, Center for Energy Efficient
Telecommunications and RMIT University. He has developed and implemented
DSP algorithms for real world demonstrations of many wireless systems such as a
MIMO-OFDM testbed, low-SNR receivers and phase of arrival based localization.

As the founder of https://wirelesspi.com, his focus is on explaining concepts through


beautiful figures, simple mathematics and intuitive reasoning. He is an author of two
books, Wireless Communications from the Ground Up - An SDR Perspective (along
with a video course with practical exercises to implement the concepts) and 5G Physical
Layer - An Easy Guide to Key Technologies. You can reach him at [email protected].
Send and receive wireless signals over the air without expensive
SDR hardware through a speaker ﴾Tx﴿ and a microphone ﴾Rx﴿

Learn about 5G physical layer through great visualizations, simple maths and intuitive
explanations

Learn about Wireless Communications and SDR through great visualizations, simple maths
nd intuitive explanations

https://wirelesspi.com/

You might also like