Amplitude and Frequency/Phase Modulation

Amplitude and Frequency/Phase
Modulation
I always had difficulties in understanding frequency modulation (FM) and its frequency spectrum.
Even for the pure tone modulation, the FM spectrum consists of an infinite number of sidebands
whose signs change from one sideband to the next one and whose amplitudes are given by the horrible
Bessel functions. . .
I work for Zurich Instruments, a Swiss maker of lock-in amplifiers and it has become a professional
inclination to always think in terms of demodulation. The pictorial representation of AM/FM that I
like comes with a (pictorial) digression on lock-in demodulation. Reader not interested in demodulation
should read only Sect. 1.1.3 and Sect. 1.21
1.1
Lock-in Demodulation as a Change to a Rotating Frame
of Reference
A lock-in amplifier can find the amplitude AS and phase ϕS of an input signal of the type
VS (t) = AS cos(ωS t + ϕS ).
(1.1)
by a process called demodulation. The existing literature explains demodulation with the multiplication
of the input signal by sine and cosine of the reference phase, also referred to as the in-phase and
quadrature of the reference: this reflects the low level implementation of the scheme (it is a real
multiplication) but I could never really understand it.
I prefer more a different explanation using complex numbers: first I will present the math, then an
equivalent pictorial representation.
1.1.1
Demodulation of the Signal: a Mathematical Approach
The signal of eq. (1.1) can also be written in the complex plane as the sum of two vectors (phasors),
each one of length A2S rotating at the same speed ωS , in opposite directions:
VS (t) =
i
AS h j(ωS t+ϕS )
e
+ e−j(ωS t+ϕS ) .
2
Multiplying by 2e−jωS t stops the counter-clockwise rotating phasors [described by ej(ωS t+ϕS ) ] and
makes the clockwise one precesses at −2ωS :
VS (t)2e−jωS t = AS ejϕS + AS e−j[2ωS t+ϕS ] .
Let us assume we can get rid of the fast rotating phasor by averaging/filtering, indicated by the symbol
h i: the averaged signal becomes
(1.2)
z(t) ≡ VS (t)2e−jωS t = AS ejϕS
1
Many thanks to Nikola Bucalovic for useful discussions and to Andrin Doll for the final revision of this note.
1
This is the demodulated signal.
To make the connection with the existing literature, where the real (or X or in-phase) and the
imaginary (or Y or quadrature) components of the signal are shown, one notes that e−jωS t ≡ cos(ωS t)−
j sin(ωS t), from which z ≡ X + jY where
X = Re VS (t)2e−jωS t = h2VS (t) cos(ωS t)i = AS cos ϕS
Y = Im VS (t)2e−jωS t = h−2VS (t) sin(ωS t)i = −AS sin ϕS .
This is equivalent to multipying the input signal by cos and − sin of the reference signal.
Demodulation consists in two steps just enounced:
• multiplication (or mixing) of the input signal by e−jωS t and
• filtering of the mixed signal: the filters should remove at least the 2ω component. (The type and
implementation of the filters is not the subject of this note.)
1.1.2
Demodulation of the Signal: a Pictorial Representation
I restate the demodulation process using a pictorial representation. Let us start with the input signal
eq. (1.1) and represent it as the sum of two phasors with equal length A2S as before. Simple trigonometry
is sufficient to show that the projection on the x–axis is 2 · A2S cos(ωS t) and has a null projection on
the y–axis, see Figure 1.1a) and b).
a)
b)
c)
fS
fS
Y
X
Figure 1.1: a) Decomposition of the input signal as two counter-rotating phasors of length A2S . b) The
sum of the two phasors is always along the x–axis. c) In the rotating frame, one phasor is at rest and
the other rotating at 2ωS .
Imagine now to stand at the origin and to rotate counter-clockwise at the same speed ωS : you will
see one phasor at rest, at an angle ϕS with your forward direction (ϕS is the angle at time t = 0 of
the input signal), while the other is moving at 2ωS in the clockwise direction2 (the angle between you
and the second phasor is time-dependent, −2ωS t + ϕS , Figure 1.1c).
After averaging the total signal, only the steady phasor remains: elementary trigonometry is sufficient to see that the steady phasor has projection on the x–axis equal to A2S cos ϕS and on the y–axis
equal to A2S sin ϕS .
The factor 12 comes from the decomposition of the real signal eq. (1.1) into the two vectors each
of amplitude A2S , of which one averages out in the rotating frame. Therefore, since one phasor only
is detected, to account for the√missing power, it is customary in lock-in detection to display the
components multiplied by 2 or 2 for peak or RMS amplitude respectively.
2 This
is the rotating frame approximation that NMR people like so much, applied to lock-ins!
2
1.1.3
The Explanation (and Some Easy Math)
The rotating frame picture is equivalent to the mathematical approach: here is why.
Complex exponents are a very practical way of dealing with rotations in a 2D plane: given a
vector (phasor) Rejθ with length R and angle θ with the x–axis, the phasor rotated by an angle φ is
Rej(θ+φ) = Rejθ · ejφ , that is the product of the original phasor with the ”rotation operator by an
angle φ”. The angle φ can also be a time-dependent angle, for instance φ(t) = ωS t, in which case the
phasor rotates at a constant speed.
I can equally well think of ejφ as a rotation of the observer: if the phasor in the previous example
appears at an angle θ + φ, this means that the observer has rotated by an angle −φ, in the clockwise
direction. So a rotation of the observer reference frame by an angle φ in the counter-clockwise direction
multiplies by e−jφ , with the minus sign.
The change to a rotating frame of reference I mentioned above, with an angle φ(t) = ωR t, corresponds to multiplying the input signal (each one of the two phasors) by e−jωR t . But e−jωR t is just
cos ωR t − j sin ωR t! This is why the cos and − sin multiplications to obtain the X (in-phase, the real
part of the product) and the Y (the quadrature, the imaginary part) components.
As a side note: The Fourier transformation is a demodulation with infinitely long averaging
Z +∞
1
f (t)e−jωR t dt.
F (ωR ) =
2π −∞
Think of f (t) as the sum of all components at different frequencies ω.3 The recipe for the Fourier
transform has two steps: first, rotate the reference frame at a speed ωR , f (t)e−jωR t . Now, only the
ωR component is a steady phasor in this new rotating frame of reference. Second, take an infinitely
long average, the time integration from −∞ to +∞ so that all the moving phasors having frequencies
different from ωR average out.
1.1.4
Demodulation at a Different Frequency
The pictorial representation is as correct as the mathematical approach and by no means an approximation of it. We will now only make use of the pictorial representation and predict what happens
to the demodulated signal when the reference/demodulation frequency and the signal frequency differ,
ωR 6= ωS ; we then compare it to the math approach and show it is the same.
Let us assume that the signal is advancing faster than the reference phase, ωS > ωR : in the rotating
frame, the signal slow moving phasor will appear moving counter-clockwise at a speed ωS − ωR . As
before, the fast one rotating at −(ωS + ωR ) is averaged out.
Using now the mathematical approach, we want to check the validity of the result: the multiplication
by the reference signal e−jωR t and the subsequent averaging of the 2ω component gives
h
i
A j(ωS t+ϕ)
−jωR t
−j(ωS t+ϕS )
−jωR t
e
+e
VS (t)2e
=
= Aej[(ωS −ωR )t+ϕS ]
2e
2
a ccw rotating phasor at frequency ωS − ωR : this is exactly the result we obtained in the rotating
frame.
1.2
Signal Modulation
With the previous pictorial representation in mind, we can proceed to analyze signal modulation. Any
generic input signal can be written as
VS (t) = A(t) cos[ωc t + ϕ(t)]
with a constant carrier frequency ωc and adequate A(t) and ϕ(t).
3 Never
mind that I explain the Fourier transform in terms of the Fourier transform: all geeks like recursion.
3
(1.3)
amplitude
1.5
1.0
0.5
0.0
0.5
1.0
1.50
a
b
20 40 60
time
80 100 20 40 60
time
80 100
Figure 1.2: a) Amplitude modulated and b) frequency modulated signal: note that in one case the
amplitude changes with time, in the second the spacing between successive zero crossings.
To understand amplitude and phase modulation, we change to the rotating frame of reference with
ωR = ωc
h
i
VS (t)2e−jωc t = A(t) ej[ωc t+ϕ(t)] + e−j[ωc t+ϕ(t)] e−jωc t = A(t)ejϕ(t) + A(t)e−j[2ωc t+ϕ(t)]
where the 2 is for the peak amplitude.
Let us neglect the 2ωc term (the filters are selected such that A(t) and ϕ(t) are not affected) and
consider the first term only:
z(t) = A(t)ejϕ(t)
(1.4)
For the reader who has skipped the introduction about demodulation:
eq. (1.3) describes a generic modulated signal and it can be written as
VS (t) =
i
1h
A(t)ejϕ(t) + A(t)e−j[2ωc t+ϕ(t)] ejωc t
2
We consider only the first term, z(t) = A(t)ejϕ(t) discarding for simplicity the
factor 21 as done in eq. (1.4): ejωc t accounts for what I refer to a rotation of the
observer, as explained in Sect. 1.1.3.
Eq. (1.4) describes in general neither an amplitude nor a frequency modulated signal since both
vary, see Fig. 1.3a. In an amplitude modulated signal, only the phasor length A(t) changes (the blue
line in the figure) but not its phase: in other words, all the changes are along the phasor direction
and not perpendicular to it. Phase modulation on the other hand would instead move the phasor on
a circle (red line), with no changes to its radius.
1.2.1
Amplitude Modulation
Amplitude and (narrow band) frequency modulations have equal Fourier power spectral densities: in
fact their Fourier transforms differ by the sign of the sidebands but this disappears when squaring to
obtain the power density. One can easily explain the sign by using eq. (1.4) and the rotating frame.
A general AM signal has time independent phase offset ϕc . Let us assume for simplicity ϕc = 0:
VAM (t) = A(t) cos(ωc t)
rotating frame
−→
dAM (t) = AAM (t)
This means that in the rotating frame, the only time dependent term is the the phasor length.
4
(1.5)
pure
PM
a)
b)
pure
AM
d(t)
Figure 1.3: a) The phasor of a generically modulated signal can sweep the grey area. In pure amplitude
modulation, only the length A(t) is time dependent, in pure phase modulation, the phase only changes.
The amplitude and phase modulations are not restricted to be a fraction of the radius and π respectively.
b) The decomposition of the sidebands of an AM signal: the sidebands must add up to have only a
horizontal contribution: at t = 0 they must have the same absolute value of the phase.
To illustrate the spectral properties of this signal, we consider the simplest amplitude modulation,
a pure tone modulation
AAM (t) = 1 + h cos(ωm t) = 1 +
h +jωm t
e
+ e−jωm t
2
with average amplitude 1 and amplitude modulation h.
With reference to Fig. 1.3b, the modulation of the amplitude, h cos(ωm t), originates from the two
blue phasors of length h/2 counter-rotating with frequency fm : their sum, the thick blue arrow, is
always along the x–axis. (The support carrier of length 1 is not shown in the Figure.) At t = 0 they
are both pointing outwards: this will be different in the case of frequency modulation, see Sect. 1.2.2.
These two phasors are the two sidebands of the AM spectrum: the phasor rotating ccw is the upper
sideband at fc + fm and the cw is the lower sideband at fc − fm 4 .
1.2.2
Frequency Modulation
A generic FM signal has the form
VFM (t) = A cos[ωc t + ϕ(t)]
rotating frame
−→
dFM (t) = AejϕFM (t)
(1.6)
with constant A.
Let us now consider the simplest case of frequency modulation
ϕFM (t) = h sin(ωm t)
(1.7)
h is also called the modulation index. The instantaneous frequency of the signal is the time derivative
of the instantaneous phase ωc t + ϕFM (t):
f (t) = fc +
1 dϕFM (t)
= fc + f∆ cos(ωm t)
2π
dt
f∆ ≡ hfm is the peak frequency, the maximum frequency deviation.
4 For
reference,
[1 + h cos(ωm t + ϕm )] cos(ωc t + ϕc ) = cos(ωc t + ϕc ) +
with ω ± = ωc ± ωm and ϕ± = ϕc ± ϕm .
5
h
cos(ω − t + ϕ− ) + cos(ω + t + ϕ+
2
Pictorial representation of sidebands Electrical engineers know that the FM signal with ϕ(t)
given by eq. (1.7) has a frequency spectrum consisting of an infinite number of sidebands at ωc ± nωm
and the amplitude of the n-th sideband is given by the n-th Bessel function. Is there an intuitive
picture of this?
The demodulated signal dFM (t) = AejϕFM (t) has constant amplitude, so it describes a phasor
that moves on a circle of radius A: let us take A = 1. For a small phase swing, Fig. 1.4a, one
can neglect the curvature of the circle and two terms only are sufficient to approximate dFM (t): an
horizontal time independent phasor b0 (h) = 1 and a vertical phasor that has the same time periodicity
as ϕFM (t) ∝ sin(ωm t).
We now need to find its amplitude b1 (h). Let τ ≡ ωm t: for small ϕFM (τ ), one has dFM (τ ) =
ejϕFM (τ ) ≈ 1 + jϕFM (τ ) and the imaginary (i.e. vertical) component is approximated by
b1 (h) sin τ ≈ Im[dFM (t)] ≈ ϕFM (τ ) ≡ h sin τ.
This small angle limit, usually taken for h < 0.2, is called narrow band FM by the engineers.
a)
b)
c)
d)
Figure 1.4: The FM signal and its decomposition in terms of the Bessel functions.
With large angle
q modulations (large h), this approximation fails, because the length of the approx2
2
imated phasor b20 (h) + b21 (h) sin2 τ ≈ 1 + h2 sin2 τ = 1 + h4 [1 − cos(2τ )] changes twice per cycle of
the phasor, see Fig. 1.4b. One could compensate for this overshoot with the additional term b2 (h) in
the horizontal direction, Fig. 1.4c. Since the b2 (h) correction has to take place twice per cycle, it must
have a cos(2τ ) dependence. We conclude that b2 (h) cos(2τ ) is the second set of sidebands at ±2ωm .
However at τ = 0, π, b2 (h) has a contribution towards positive x, and b0 (h) = 1 − b2 (h) must be
smaller than 1 to make the unit phasor, see Fig. 1.4d. Therefore the conditions on b0 (h) and b2 (h) are
(
b0 (h) + b2 (h) = 1
when τ = 0
b0 (h) + b2 (h) cos(2τ ) = cos ϕFM (τ ) −→
b0 (h) − b2 (h) = cos(h) when τ = π
6
a)
b)
Figure 1.5: The sideband phasors for a) b1 (and the odd terms) and b) b2 (and the even terms). The
blue arrow is the direction of the modulation.
At this point, we still do not know we are dealing with the Bessel functions Jn (h), but we can note
that also J0 (h) has one maximum (its global) at h = 0.
One could continue with the third order expansion, now in the vertical direction, which is odd in
time, so its time dependence is b3 (h) sin(3τ ) and imagine that in general, the phasors must satisfy the
following relations
X
X
sin ϕFM (τ ) =
b2n+1 (h) sin[(2n + 1)τ ]
cos ϕFM (τ ) =
b2n (h) cos[2nτ ]
(1.8)
n≥0
n≥0
Before showing that the bn (h) are related to the Jn (h) Bessel function, one should note that the first
vertical phasor is the sum of two counter-rotating complex phasors (Figure 1.5a), which at τ = 0 point
one in the positive and the other in the negative x–axis direction. This also holds for all odd phasors.
On the other hand, for the even phasors, which are horizontal, they are the sum of two phasors
(Figure 1.5b) which at τ = 0 are pointing in the same direction, +x. So: odd phasors have a π phase
difference between the upper and lower sideband, even phasors are in phase. This distinguishes the
AM sidebands from the FM (first set of) sidebands. Eq. (1.8) describes all sidebands at ωc ± nωm with
n ∈ N.
The Relation with the Bessel Coefficients The bn (h) are in fact proportional to the Bessel
coefficients. To show this, let us rewrite eq. (1.8):
i
X
X b2n+1 (h) h
sin ϕFM (τ ) =
b2n+1 (h) sin[(2n + 1)τ ] =
e(2n+1)τ − e−(2n+1)τ
2j
n≥0
cos ϕFM (τ ) =
X
n≥0
Defining Jn (h) ≡
one can write
n≥0
X b2n (h) e2nτ + e−2nτ
b2n (h) cos[2nτ ] =
2
(−1)n bn2(h)
n≥0
to take care of the negative coefficient in the sine, and J0 (h) ≡ b0 (h),
cos ϕFM (τ ) + j sin ϕFM (τ ) ≡ ejh sin(τ ) =
+∞
X
Jn (h)ejnτ
(1.9)
n=−∞
and multiplying both sides by e−jkτ and integrating gives
Z +π
Z +π
+∞
1
1 X
e−j(kτ −h sin τ ) dτ =
Jn (h)
ej(n−k)τ dτ = Jk (h)
2π −π
2π n=−∞
−π
7
(1.10)
amplitude
which is the integral generating function of the Bessel coefficients5 .
1.0
0.8
0.6
0.4
0.2
0.0
0.2
0.4
0
J0
J1
J2
J3
J4
1
2
3
h
4
5
6
Figure 1.6: The first five Bessel functions. Note the zero crossing of J0 (h) at h = 2.4048.
Sidebands, the Hardcore Math While I am at it, I will also show the usual mathematical treatment: this requires some higher math.
To get the frequency spectrum, one starts from the Jacobi–Anger expansion6 :
ejx sin φ =
+∞
X
Jn (x)ejnφ
J−n (x) = (−1)n Jn (x).
n=−∞
We are going to consider a slightly more complicated phase modulation, ϕ(t) = h sin(ωm t + ϕm ) + ϕc :
the FM signal is
VS (t) = cos[ωc t + h sin(ωm t + ϕm ) + ϕc ].
Writing
e
j(ωc t+ϕc ) jh sin(ωm t+ϕm )
e
=e
j(ωc t+ϕc )
+∞
X
Jn (h)e
jn(ωm t+ϕm )
n=−∞
=
+∞
X
Jn (h)ej[(ωc +nωm )t+ϕc +nϕm ]
n=−∞
(1.11)
and taking the real part gives
s(t) =
+∞
X
Jn (h) cos[(ωc + nωm )t + ϕc + nϕm ].
n=−∞
5 From
http://en.wikipedia.org/wiki/Bessel function. This should also solve the Bessel equation
h2 Jk00 (h) + hJk0 (h) + (h2 − k2 )Jk (h) = 0?
6 From
the Laurent series
+∞
X
e(x/2)(t−1/t) =
Jn (x)tn
n=−∞
with the substitution t = eiφ for sin or t = ieiφ for cos. From https://ccrma.stanford.edu/∼jos/mdft/FM Spectra.html.
See also http://mathworld.wolfram.com/BesselFunctionoftheFirstKind.html
8