# Harmonics of square wave [closed]

I have a square wave, with 10% duty cycle. It is 90ms LOW, 10ms HIGH. Sampling frequency is 1kHz.

In spectral domain, after following this example, I get fundamental frequency (10Hz), as well as its harmonics. Also, the whole spectrum is enveloped with harmonics if 100Hz (which comes from pulse duration 10ms)

That is simply the case of spectral decomposition working properly for square wave, because of Fourier transform definition, right? I also read similar question but still a bit confused

• what is your confusion about? your spectrum above looks correct to me. notice every 10th harmonic is zero. that's because you're duty cycle is 10%. normally we call it a "square wave" when the duty cycle is 50% and then every even harmonic is zero. – robert bristow-johnson Jun 13 '19 at 18:51