<<

Amplitude and Frequency/

I always had difficulties in understanding (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 . 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(ωSt + ϕ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), AS each one of length 2 rotating at the same speed ωS, in opposite directions:

AS h i V (t) = ej(ωS t+ϕS ) + e−j(ωS t+ϕS ) . 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:

−jωS t jϕS −j[2ωS t+ϕS ] VS(t)2e = ASe + ASe .

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

−jωS t jϕS z(t) ≡ VS(t)2e = ASe (1.2)

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 −jωS t imaginary (or Y or quadrature) components of the signal are shown, one notes that e ≡ cos(ωSt)− j sin(ωSt), from which z ≡ X + jY where

 −jωS t X = Re VS(t)2e = h2VS(t) cos(ωSt)i = AS cos ϕS

 −jωS t Y = Im VS(t)2e = h−2VS(t) sin(ωSt)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 AS eq. (1.1) and represent it as the sum of two phasors with equal length 2 as before. Simple trigonometry AS is sufficient to show that the projection on the x–axis is 2 · 2 cos(ωSt) and has a null projection on the y–axis, see Figure 1.1a) and b).

a) b) c)

fS

fS Y X

AS Figure 1.1: a) Decomposition of the input signal as two counter-rotating phasors of length 2 . 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 2 the input signal), while the other is moving at 2ωS in the clockwise direction (the angle between you and the second phasor is time-dependent, −2ωSt + ϕS, Figure 1.1c). After averaging the total signal, only the steady phasor remains: elementary trigonometry is suffi- AS cient to see that the steady phasor has projection on the x–axis equal to 2 cos ϕS and on the y–axis AS equal to 2 sin ϕS. 1 The factor 2 comes from the decomposition of the real signal eq. (1.1) into the two vectors each AS of amplitude 2 , 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.

2This 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) = ωSt, 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) = ωRt, corre- sponds to multiplying the input signal (each one of the two phasors) by e−jωRt. But e−jωRt is just cos ωRt − j sin ωRt! 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

1 Z +∞ −jωRt F (ωR) = f(t)e dt. 2π −∞

Think of f(t) as the sum of all components at different frequencies ω.3 The recipe for the Fourier −jωRt transform has two steps: first, rotate the reference frame at a speed ωR, f(t)e . 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 approx- imation 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ωRt and the subsequent averaging of the 2ω component gives

A h i  V (t)2e−jωRt = ej(ωS t+ϕ) + e−j(ωS t+ϕS ) 2e−jωRt = Aej[(ωS −ωR)t+ϕS ] S 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[ωct + ϕ(t)] (1.3) with a constant carrier frequency ωc and adequate A(t) and ϕ(t).

3Never mind that I explain the Fourier transform in terms of the Fourier transform: all geeks like recursion.

3 1.5 a b 1.0 0.5 0.0 0.5 amplitude 1.0 1.5 0 20 40 60 80 100 20 40 60 80 100 time time

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 −jωct j[ωct+ϕ(t)] −j[ωct+ϕ(t)] −jωct jϕ(t) −j[2ωct+ϕ(t)] VS(t)2e = A(t) e + e e = A(t)e + A(t)e 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 1 h i V (t) = A(t)ejϕ(t) + A(t)e−j[2ωct+ϕ(t)] ejωct S 2 We consider only the first term, z(t) = A(t)ejϕ(t) discarding for simplicity the 1 jωct factor 2 as done in eq. (1.4): e 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 and (narrow band) frequency 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:

rotating frame VAM(t) = A(t) cos(ωct) −→ dAM(t) = AAM(t) (1.5)

This means that in the rotating frame, the only time dependent term is the the phasor length.

4 pure a) PM b)

pure d(t) AM

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 h A (t) = 1 + h cos(ω t) = 1 + e+jωmt + e−jωmt AM m 2 with average amplitude 1 and amplitude modulation h. With reference to Fig. 1.3b, the modulation of the amplitude, h cos(ωmt), 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 4 sideband at fc + fm and the cw is the lower sideband at fc − fm .

1.2.2 Frequency Modulation A generic FM signal has the form

rotating frame jϕFM(t) VFM(t) = A cos[ωct + ϕ(t)] −→ dFM(t) = Ae (1.6) with constant A. Let us now consider the simplest case of frequency modulation

ϕFM(t) = h sin(ωmt) (1.7) h is also called the modulation index. The instantaneous frequency of the signal is the time derivative of the instantaneous phase ωct + ϕFM(t):

1 dϕ (t) f(t) = f + FM = f + f cos(ω t) c 2π dt c ∆ m f∆ ≡ hfm is the peak frequency, the maximum frequency deviation.

4For reference,

h  − − + + [1 + h cos(ωmt + ϕm)] cos(ωct + ϕc) = cos(ωct + ϕc) + cos(ω t + ϕ ) + cos(ω t + ϕ 2 ± ± with ω = ωc ± ωm and ϕ = ϕc ± ϕm.

5 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? jϕFM(t) The demodulated signal dFM(t) = Ae 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(ωmt). We now need to find its amplitude b1(h). Let τ ≡ ωmt: for small ϕFM(τ), one has dFM(τ) = jϕFM(τ) e ≈ 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 modulations (large h), this approximation fails, because the length of the approx- q 2 2 2 h2 2 h2 imated phasor b0(h) + b1(h) sin τ ≈ 1 + 2 sin τ = 1 + 4 [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):

X X b2n+1(h) h i sin ϕ (τ) = b (h) sin[(2n + 1)τ] = e(2n+1)τ − e−(2n+1)τ FM 2n+1 2j n≥0 n≥0

X X b2n(h) cos ϕ (τ) = b (h) cos[2nτ] = e2nτ + e−2nτ  FM 2n 2 n≥0 n≥0

n bn(h) Defining Jn(h) ≡ (−1) 2 to take care of the negative coefficient in the sine, and J0(h) ≡ b0(h), one can write +∞ jh sin(τ) X jnτ cos ϕFM(τ) + j sin ϕFM(τ) ≡ e = Jn(h)e (1.9) n=−∞ and multiplying both sides by e−jkτ and integrating gives

+∞ 1 Z +π 1 X Z +π e−j(kτ−h sin τ)dτ = J (h) ej(n−k)τ dτ = J (h) (1.10) 2π 2π n k −π n=−∞ −π

7 which is the integral generating function of the Bessel coefficients5.

1.0 J0 J1 0.8 J2 J3 0.6 J4

0.4

0.2 amplitude 0.0

0.2

0.4 0 1 2 3 4 5 6 h

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 treat- ment: this requires some higher math. To get the frequency spectrum, one starts from the Jacobi–Anger expansion6:

+∞ jx sin φ X jnφ n e = Jn(x)e J−n(x) = (−1) Jn(x). n=−∞

We are going to consider a slightly more complicated phase modulation, ϕ(t) = h sin(ωmt + ϕm) + ϕc: the FM signal is VS(t) = cos[ωct + h sin(ωmt + ϕm) + ϕc]. Writing

+∞ +∞ j(ωct+ϕc) jh sin(ωmt+ϕm) j(ωct+ϕc) X jn(ωmt+ϕm) X j[(ωc+nωm)t+ϕc+nϕm] e e = e Jn(h)e = Jn(h)e n=−∞ n=−∞ (1.11) and taking the real part gives

+∞ X s(t) = Jn(h) cos[(ωc + nωm)t + ϕc + nϕm]. n=−∞

5From http://en.wikipedia.org/wiki/Bessel function. This should also solve the Bessel equation 2 00 0 2 2 h Jk (h) + hJk(h) + (h − k )Jk(h) = 0?

6From the Laurent series +∞ (x/2)(t−1/t) X n e = Jn(x)t 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