Wirelesspi Frequency Modulation FM and Demodulation Using DSP Techniques
Wirelesspi Frequency Modulation FM and Demodulation Using DSP Techniques
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.
https://wirelesspi.com/
If the carrier wave is represented as
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
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
Δ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.
Modulation Index
x(t) = Am cos(2πfm t)
Am
y(t) = Ac sin[2πfc t + 2πkf sin(2πfm t)]
2πfm
kf Am
β =
fm
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.
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
With continuous‐time details covered, we can easily translate this process into a
digital FM modulator.
Discrete‐Time Implementation
nTs
https://wirelesspi.com/
(n−1)Ts nTs
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.
that is written as
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.
What remains is a complex exponential with the discrete‐time phase from Eq ﴾5﴿.
From here, the FM demodulation techniques can be divided into three different
https://wirelesspi.com/
categories.
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.
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
Using Eq ﴾7﴿ in the above expression and taking the angle through atan2﴾ ﴿
operation or an approximation of atan2﴾ ﴿, we can write
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.
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
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.
Start with expressing the signal z[n] in its real ﴾in‐phase﴿ and imaginary
﴾quadrature﴿ components.
zQ (nTs )
−1
θ(nTs ) = tan [ ]
zI (nTs )
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
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
N − 1
Group Delay =
2
We now move towards our third and final approach for DSP‐based FM
demodulation.
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
https://wirelesspi.com/
About the Author
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/