Here is a square-wave presented by Fourier series perspective: enter image description here

Above coefficients shows that a square-wave is composed of only its odd harmonics.

But here below a square-wave is presented by Fourier transform perspective: enter image description here

Above plot shows that a square-wave is composed of all frequencies not only harmonics, plot is continuous.

When I look at the FFT of a square-wave it looks like the Fourier transform which is continuous.

Series and transform gives different interpretation of a square wave. Why is that?

  • 1
    $\begingroup$ The Fourier transform of a square wave exists only as an impulse train and cannot be represented as you have shown. What you have is a Discrete Fourier Transform of a sequence of numbers that is another sequence of numbers. (That you have computed the DFT via the FFT algorithm and are calling it the FFT is irrelevant here). The sequence of numbers that is the DFT does not have the plot that you have shown: it should be a sequence of dots, similar to the Fourier series coefficients graph.That your graphics program has "connected the dots" is unfortunate. $\endgroup$ – Dilip Sarwate Oct 16 '16 at 23:11
  • $\begingroup$ i dont know it so well. but what is a square wave composed of then? thats the question. does a 1kHz square wave in freq. domain include a component at 999Hz or only is composed of odd harmonics of 1kHz. why are they different when we look at series and FFT? $\endgroup$ – user16307 Oct 16 '16 at 23:23
  • $\begingroup$ i have no idea how you make the case that the two displayed spectra are different. $\endgroup$ – robert bristow-johnson Oct 17 '16 at 1:26
  • $\begingroup$ @robertbristow-johnson one is continuous the other one is discrete. if u follow continuous plot u might conclude for a 1Hz square wave signal there is 1.1Hz component which is greater than 3Hz component. which would be wrong. the continuous plot is wrong thats what u see in a scope. $\endgroup$ – user16307 Oct 17 '16 at 1:29
  • $\begingroup$ you think that second plot represents the continuous Fourier Transform of a square wave??? $\endgroup$ – robert bristow-johnson Oct 17 '16 at 1:32

The Fourier series expansion of a square wave is indeed the sum of sines with odd-integer multiplies of the fundamental frequency. So, responding to your comment, a 1 kHz square wave doest not include a component at 999 Hz, but only odd harmonics of 1 kHz.

The Fourier transform tells us what frequency components are present in a given signal. As the signal is periodic in this case, both the Fourier series and the Fourier transform can be calculated, and they should tell us the same information. The Fourier transform of a continuous periodic square wave is composed by impulses in every harmonic contained in the Fourier series expansion. Maybe this picture from Oppenheim's Signals and Systems may help.

enter image description here

The actual Fourier transform are only the impulses. The dotted-line is a sinc function that doesn't apply to this question, but gives the notion that this transform has something to do with the transform of a square pulse (i.e. a not periodic signal), which happens to be a sinc.

To put it mathematically:

  • The Fourier series coefficients are $$\frac{\sin(k\omega_0 T)}{k\pi}$$
  • The Fourier transform is $$\sum\limits_{k=-\infty}^{\infty}\frac{2\sin(k\omega_0 T)}{k}\delta(\omega - k\omega_0)$$

So the series coefficients and the Fourier transform are the same, except that there is a proportionality factor of $2\pi$ and, in the first case, you plot bars (as the coefficients do not describe a function, they are just numbers), but in the second one you have impulses (because the Fourier transform is a function).

  • $\begingroup$ i dont understand so in reality would a 1kHz square wave has no 999 Hz component? But in oscilloscope 999Hz component greater than 3kHz component. I dont get it. $\endgroup$ – user16307 Oct 17 '16 at 0:50
  • $\begingroup$ No, a purely 1 kHz square wave doesn't have a 999 Hz component. $\endgroup$ – Tendero Oct 17 '16 at 0:53
  • $\begingroup$ try feeding a square wave to a scope and check its FFT. you might get surprised. thats why i asked this question $\endgroup$ – user16307 Oct 17 '16 at 0:56
  • 2
    $\begingroup$ Well, in reality, function generators are not ideal. They have noise and square waves are not actually square. So, if the wave you are measuring doesn't have much amplitude, then noise of the generator and the oscilloscope itself would interfere in the measurement (also, the FFT function of scopes tends to be a poor tool for precise measurements) and then, components of 3, 5 or 7 kHz could get very small in comparison. That could explain what you are getting. $\endgroup$ – Tendero Oct 17 '16 at 1:00
  • 1
    $\begingroup$ @SH $T$ is the pulse width, not the period of the signal. $\endgroup$ – Tendero Mar 8 at 0:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.