Frequency spectrum of a square wave

Status
Not open for further replies.

mngeow

New Member
Ok so I have this question where I'm asked to draw the frequency spectrum of a square wave:

**broken link removed**

then I went ahead and looked at the answer which was :

**broken link removed**

So I have no idea how they got this answers,but I'm guessing that for the magnitudes they are just V/1,V/3,V/5,V/7,V/9 ... (V=voltage of square wave) and for the frequencies they are just f*1,f*3,f*5,f*7,f*9...(f=frequency of square wave) ,and that we use 1,3,5,7,9 because a square wave only contains odd harmonics.Am I correct?I'm quite unsure about this.

Thanks in advance!
 
Last edited:
Hello there,

I would think that your course would have taught Fourier analysis, or at least what a Fourier series is. That's where these components come from.

In one way of doing it in the analysis you calculate the coefficients An and Bn of the waveform. The An range for n from 0 to infinity, and the Bn range for n from 1 to infinity. The DC component is A0/2 and the amplitudes of the other components are sqrt(An^2+Bn^2).
For the square wave, the amplitudes of some of the components such as the even harmonics are all zero, so you end up with amplitudes for only the odd frequencies 1,3,5,7,9, etc. It just so happens that the amplitudes work out to 1/n too, so the amplitudes are 1/1, 1/3, 1/5, 1/7, 1/9, etc.

If you calculate the Fourier series components and you want to check your answers, you can use LT Spice by generating a square wave with a pulse source and instructing the software to do a Fourier analysis using the ".four" statement along with a ".tran" statement.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…