A classic example of a signal with multiple frequency components is an ideal square wave. (refer to Figure 1.) Consider a 2 V peak-to-peak square wave with a fundamental frequency of 1 Hz. The frequency components that make up the square wave are infinite. It is made up of the summation of weighted harmonics.
Equation (1) shows this summation.
For square waves, only odd harmonic terms are used, (e.g. sin t, sin 3t, sin 5t, etc), where the frequency is in radians per second.
Using Equation (1), we can graph the summation of several harmonics. Figure 2 shows this square wave approximated by the summation of different harmonic sine waves: fundamental frequency or 1st harmonics, summation of the 1st, 3rd, and the 5th harmonics and summation from the 1st to the 13th harmonics.
Once the 5th or 7th harmonic is reached, there is little change in the slope of the edges. For signals like square waves, where the frequency content is known, the switch bandwidth should be based on the highest harmonic passed with minimal attenuation or distortion. If the selection of the switch is based upon the 7th harmonic of the ideal 1 Hz square wave, a switch with a -3 dB point at 7 Hz can be used.
As a rule of thumb, choose a switch for a square wave equal to 7 times the fundamental frequency.