Frequency of square wave


I have a hard time understanding the concept of frequency in square waves. With sine waves, it is straightforward. You increase the frequency and the signal appears more often in the same time interval. That can apply to square waves too. But I know that in order for a pulse to appear immediately (for example 0V to 5V in lim(time)->0) the frequency must be infinite.

So what's going on here?

On one hand we have the straight forward frequency that you increase it and you see more square waves over the same time.

On the other hand we have the frequency harmonics that are almost infinite.

What is true?

What would fourier analysis give us?

Best Answer

You're confusing bandwidth with the fundamental frequency, or repetition rate.

A square wave behaves the exact same way as a sine wave, in that as its fundamental frequency increases, you will see more cycles in a given amount of time.

Square waves theoretically have infinite bandwidth. (I seem to recall seven times the fundamental as a practical rule of thumb from school.) Intuitively, more higher harmonics are needed to sharpen the rising and falling edges.

Plotting it out as a summation of sines is easy and will help with your understanding.