|
A square wave is a basic kind of non-sinusoidal waveform encountered in electronics and signal processing. An ideal square wave alternates regularly and instantaneously between two levels, which may or may not include zero.
Origins and uses Square waves are universally encountered in digital switching circuits and are naturally generated by binary (two-level) logic devices. They are used as timing references or "clock signals", because their fast transitions are suitable for triggering synchronous logic circuits at precisely determined intervals. However, as the frequency-domain graph shows, square waves contain a wide range of harmonics; these can generate electromagnetic radiation or pulses of current that interfere with other nearby circuits, causing noise or errors. To avoid this problem in very sensitive circuits such as precision analog-to-digital converters, sine waves are used instead of square waves as timing references. In musical terms, they are often described as sounding hollow, and are therefore used as the basis for wind instrument sounds created using subtractive synthesis. Additionally, the distortion effect used on electric guitar clips the outermost regions of the waveform, causing it to increasingly resemble a square wave as more distortion is applied. Simple two-level Rademacher functions are square waves. Examining the square wave
Characteristics of imperfect square waves As we have already mentioned, an ideal square wave has instantaneous transitions between the high and low levels. In practice, this is never achieved because of physical limitations of the system that generates the waveform. The times taken for the signal to rise from the low level to the high level and back again are called the rise time and the fall time respectively. If the system is overdamped, then the waveform may never actually reach the theoretical high and low levels, and if the system is underdamped, it will oscillate about the high and low levels before settling down. In these cases, the rise and fall times are measured between specified intermediate levels, such as 5% and 95%, or 10% and 90%. Formulae exist that can determine the approximate bandwidth of a system given the rise and fall times of the waveform. Other definitions The square wave has many definitions, which are equivalent except at the discontinuities: It can be defined as simply the sign function of a sinusoid: x(t) = sgn(sin(t)) which will be 1 when the sinusoid is positive, −1 when the sinusoid is negative, and 0 at the discontinuities. It can also be defined with respect to the Heaviside step function u(t) or the rectangular function ⊓(t): x(t) = sum_^ sqcap(t - nT) = sum_^ left ( u left(t - nT + ight) - u left(t - nT - ight) ight ) T is 2 for a 50% duty cycle. It can also be defined in a piecewise way: x(t) = egin 1, & |t| < T_1 \ 0, & T_1 < |t| leq end when x(t + T) = x(t) See also | ||||||||||
|
| |||||||||||
![]() |
|
| |