A102 of 28
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

A10 · Lesson 2 · Fourier coefficients

Measuring how much of each sinusoid a signal contains

Lesson 1 took the square wave's recipe on trust: odd harmonics, amplitudes 4/nπ. How would you find the recipe for a signal you've never seen? Multiply it by a test sinusoid and average over one period. If the signal contains that sinusoid, the product leans positive and the average is big; if not, the positive and negative parts cancel to exactly zero. That multiply-and-average step, a correlation, is how every spectrum analyzer and every radio receiver picks out one frequency from many.

Play

  • The square wave (period 1 s) is multiplied by a test sinusoid at harmonic n; the shaded area is their product over one period. The readout is the Fourier coefficient: twice the product's average.
  • Try n=1,2,3,4. Which harmonics give zero, and how can you see it in the shading?
  • Delay the square wave with d. Switch the test from sine (c=0) to cosine (c=1). Where does the harmonic go?

Predict

The square wave is multiplied by sin⁡(2⋅2πt), its second harmonic. What is the average of the product over one period?

Name it

Fourier coefficients

Orthogonality. Over one period T, the average of the product of two harmonics is zero unless they're the same frequency and the same type:

1T∫0Tsin⁡(mω0t)sin⁡(nω0t)dt={12m=n0m≠n

and the same for cosines, while every sine is orthogonal to every cosine. So when you multiply x(t)=a0+∑(ancos⁡nω0t+bnsin⁡nω0t) by sin⁡(kω0t) and average, every term vanishes except bk/2. That gives the coefficients:

a0=1T∫0Txdtan=2T∫0Txcos⁡(nω0t)dtbn=2T∫0Txsin⁡(nω0t)dt

The amplitude of the nth harmonic is An=an2+bn2, however the signal is shifted in time. Shifting it just moves the harmonic between its sine and cosine parts, which is what the d slider shows.

The square wave. For x=+1 on the first half period and −1 on the second, bn=2nπ(1−cos⁡nπ): that's 4nπ for odd n and 0 for even n, the recipe from lesson 1.

Symmetry shortcuts. If x(t) is even (x(−t)=x(t)), all the bn are zero; if it's odd (x(−t)=−x(t)), all the an are zero.

The complex form. Using ejθ=cos⁡θ+jsin⁡θ packs each pair into one complex number:

x(t)=∑n=−∞∞cnejnω0tcn=1T∫0Tx(t)e−jnω0tdt

For a real signal, c−n is the conjugate of cn, and |cn|=An/2: each sinusoid splits into two counter-rotating phasors (A3), half the amplitude each.

Power adds up by harmonic (Parseval's theorem). The average power of a signal, its mean square, is a02+∑An2/2. For the ±1 square wave, the mean square is 1, and the fundamental alone carries 12(4/π)2=81% of it.

Worked example

Find the Fourier coefficients of the sawtooth x(t)=2tT−1 for 0≤t<T, repeating.

Show the solution
  1. The DC term. The sawtooth's average is 0, so a0=0.
  2. The cosine terms. The repeating sawtooth is odd about t=0 (just before 0 it's near +1, just after, near −1), so every an is zero too.
  3. The integral for the sines. The −1 integrates to zero over a period, and ∫0Ttsin⁡(nω0t)dt=−T22πn
  4. The sine terms. bn=2T⋅2T⋅(−T22πn)=−2πn
  5. The sizes. Every harmonic is present, falling as 1/n: 0.637, 0.318, 0.212 and so on.

Answer a0 and every an are zero, and bn=−2πn, so the harmonics have sizes 0.637, 0.318, 0.212 and so on.

Worked example

What fraction of the sawtooth's power is in its fundamental?

Show the solution
  1. The total power. The sawtooth sweeps evenly from −1 to 1, so its mean square is 13.
  2. The fundamental's power. P1=12(2π)2=0.203
  3. The fraction. 0.2031/3=61%
  4. Compare with a square wave. A square wave puts 81% in its fundamental. The sawtooth spreads more into its harmonics because it has even ones too.

Answer 61% of the sawtooth's power is in its fundamental.

Worked example

A half-wave rectifier passes the positive halves of a 10 V sine. What are its DC level, fundamental and 2nd harmonic?

Show the solution
  1. The DC level. For a half-wave rectified sine of peak A=10 V: Aπ=10Vπ=3.18V
  2. The fundamental. Its amplitude is A2=5V
  3. The 2nd harmonic. The even harmonics have amplitudes 2Aπ(n2−1), so for n=2: V2=203π=2.12V The odd harmonics above the first are zero.
  4. What the supply's filter faces. A power supply's filter has to suppress that 2.12 V component at twice the line frequency, along with the fundamental.

Answer the DC level is 3.18 V, the fundamental 5 V and the 2nd harmonic 2.12 V.

Check

A pulse train is 5 V for a fraction 0.1 of each period and 0 V the rest of the time. What is its DC coefficient a0?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

Check

A periodic signal is x(t)=7+4sin⁡(ω0t)+(−9)cos⁡(3ω0t).

(a)

What is a0?

(b)

What is b1?

(c)

What is a3?

Check

A harmonic has an = −6 and bn = 1. What is its amplitude?

Check

A pulse train of height 4 and duty cycle 0.1 is centered on t=0, so it's even. Its fundamental's cosine coefficient is a1=2Aπsin⁡(πD). What is a1?

Check

What percentage of a ±1 square wave's power is in its 3th harmonic?

Check

A half-wave rectifier passes the positive halves of a sine of peak 12 V.

(a)

What is the DC level?

Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.

(b)

What is the 2nd harmonic's amplitude?

Check

Find the average of the sawtooth x=AtT over 0≤t<T.

Step 1

What is ∫0TAtTdt?

Type it the way you would write it, like 3sin(2πft) or 3*sin(2*pi*f*t). Angles can be in radians or carry a degree sign, like 45°.

Explain why

Why does multiplying a signal by sin⁡(kω0t) and averaging pick out just the kth sine coefficient?

Practice

Keep practicing

9 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.