I understanding the Fourier components of a square wave

Click For Summary
SUMMARY

The discussion centers on understanding the Fourier components of a square wave, specifically the correct summation of cosine waves to approximate the square wave. The first three Fourier components are identified as D_1 = (4/π)A cos(kx), D_2 = -(4/3π)A cos(3kx), and D_3 = (4/5π)A cos(5kx), with A being the amplitude of the square wave. A critical point made is that the amplitude of the square wave in the example is A = π/4, and the correct summation requires adjusting the amplitudes of the cosine components accordingly. The discussion clarifies that only odd harmonics contribute to the Fourier series of the square wave.

PREREQUISITES
  • Understanding of Fourier series and harmonic analysis
  • Knowledge of trigonometric functions and their properties
  • Familiarity with calculus, particularly integration techniques
  • Basic concepts of waveforms and signal processing
NEXT STEPS
  • Study the derivation of Fourier series for different waveforms
  • Learn about the Gibbs phenomenon in Fourier series approximations
  • Explore the application of Fourier transforms in signal processing
  • Investigate the impact of amplitude and phase on waveforms in Fourier analysis
USEFUL FOR

Students and professionals in physics, electrical engineering, and applied mathematics who are looking to deepen their understanding of Fourier analysis and its applications in waveform synthesis.

jeff.berhow
Messages
17
Reaction score
0
In my physics book there is an example of making a square wave by "simply" summing up a few cosine waves. The book says these first three waves are the first three Fourier components of a square wave, yet when I sum the three wave functions up, I get something way off; as does my calculator.

For example, if we take the easiest case of x = 0, we get the sum of 1, 1/3, and 1/5 equals 1.53m. However, when I look at the plot for the sums, the amplitude seems to be at about 0.9m. That is nowhere near the sum of the three wave functions at zero. This means that I am missing something fundamentally important here. What is it?

Here's a link to the graphs and the example problem. Thanks for your help.

http://i.imgur.com/DrjU0VE.jpg?1
 
Physics news on Phys.org
They forgot a minus sign: the amplitude of ##D_2## should be ##-\frac{1}{3} D_M##.
 
Excellent. Thank you very much, DrClaude.
 
Here is how to relate the amplitude of the cosine waves to the amplitude A of the square wave. For this example, A = \frac{\pi}{4}.

D_1 = \frac{4}{\pi}A cos(kx)
D_2 = -\frac{4}{3\pi}A cos(3kx)
D_2 = \frac{4}{5\pi}A cos(5kx)

http://www.wolframalpha.com/input/?i=sum+of+a+series&a=*C.sum+of+a+series-_*Calculator.dflt-&f2=4%2Fpi++%28-1%29%5Ek%2F%282k+%2B+1%29&x=5&y=6&f=Sum.sumfunction_4%2Fpi++%28-1%29%5Ek%2F%282k+%2B+1%29&f3=0&f=Sum.sumlowerlimit_0&f4=infinity&f=Sum.sumupperlimit_infinity&a=*FVarOpt.1-_**-.***Sum.sumvariable---.*--

If are curious how this can be found:
a_n = \frac{2}{T} \int_{-T/2}^{T/2} f(x)cos\left(2\pi \frac{n}{T} x\right)dx
Where f(x) is the square wave. We observe that the square wave is symmetric across x=0, so we integrate from 0 to T/2, and multiply by 2.
a_n = \frac{4}{T} \int_{0}^{T/2} f(x)cos\left(2\pi \frac{n}{T} x\right)dx
We split this up into two integrals for the positive an negative portions. The square wave is +A in the positive portion and -A in the negative portion.
a_n = \frac{4}{T}\int_{0}^{T/4} A cos\left(2\pi \frac{n}{T} x\right)dx - \frac{4}{T}\int_{T/4}^{T/2} A cos\left(2\pi \frac{n}{T} x\right)dx

a_n = \left. \frac{4}{T}\frac{T}{2\pi n} A sin\left(2\pi \frac{n}{T} x\right) \right|_{0}^{T/4} - \left. \frac{4}{T}\frac{T}{2\pi n} A sin\left(2\pi \frac{n}{T} x\right)\right|_{T/4}^{T/2}
a_n = \frac{2}{\pi n}A \left[sin \left( \frac{\pi n }{2}\right) - 0 - sin\left(\pi n\right) + sin\left(\frac{\pi n }{2}\right) \right] = \frac{4}{\pi n}Asin \left( \frac{\pi n }{2}\right) - \frac{2}{\pi n}Asin\left(\pi n\right)
The second term is always zero, since n is an integer, and thus sin\left(\pi n\right) = 0
a_n = \frac{4}{\pi n}A sin \left( \frac{\pi n }{2}\right)
a_n = 0, \frac{4A}{\pi}, 0, -\frac{4A}{3\pi}, 0, \frac{4A}{5\pi}, 0 , ...

Notice that only the terms with odd n are non-zero. Also, the sign alternates every odd term.

Edit: I have fixed this to show a square wave for any amplitude A. For the square wave in this example, A = \frac{\pi}{4}
 
Last edited:
MisterX said:
Actually all three have the wrong amplitude. They should be multiplied by \frac{4}{\pi}, in addition to the second one being negated.
If you look carefully at the figure, you will see that the square wave being approximated has an amplitude of ##\pi/2##, so there is no missing ##4/\pi## factor.
 
DrClaude said:
If you look carefully at the figure, you will see that the square wave being approximated has an amplitude of ##\pi/2##, so there is no missing ##4/\pi## factor.

Oops, somehow I assumed it was supposed to have an amplitude of D_M. The depicted square wave does seem to have an amplitude of about ##\pi/4##, or in other words a ##\pi/2## peak-to-peak amplitude.
 

Similar threads

  • · Replies 19 ·
Replies
19
Views
2K
  • · Replies 3 ·
Replies
3
Views
509
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 33 ·
2
Replies
33
Views
3K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K