|Table of contents|
2 Examining the square wave
3 See also
Origins and uses
Square waves are universally encountered in digital switching circuits.
In musical terms, it is often described as sounding hollow, and is therefore used as the basis for wind instrument sounds created using subtractive synthesis.
Using Fourier series we can write an ideal square wave as an infinite series of the form
An ideal square wave requires that the signal changes from the maximum to the minimum state cleanly and instantaneously. This is impossible to achieve in real-world systems, as it would require infinite bandwidth.
Real-world square-waves have only finite bandwidth, and often exhibit ringing effects similar to those of the Gibbs phenomenon, or ripple effects similar to those of the σ-approximation.
For a reasonable approximation to the square-wave shape, at least the fundamental and third harmonic need to be present, with the fifth harmonic being desirable. These bandwidth requirements are important in digital electronics, where finite-bandwidth analog approximations to square-wave-like waveforms are used. (The ringing transients are an important electronic consideration here, as they may go beyond the electrical rating limits of a circuit).
The ratio of the high to low periods of a square wave are called the duty cycle. A true square wave has a 50% duty cycle - equal high and low periods. The average level of a square wave is also given by the duty cycle, so by varying the on to off periods, it is possible to represent any value between the two limiting levels. This is the basis of pulse width modulation.