Square wave

A square wave is a kind of non-sinusoidal waveform, most typically encountered in electronics and signal processing. An ideal square wave alternates regularly and instantaneously between two levels.

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

In contrast to the sawtooth wave, which contains all integer harmonics, the square wave contains only odd integer harmonics.

Using Fourier series we can write an ideal square wave as an infinite series of the form:egin{align}x_{mathrm{square(t) & {} = frac{4}{pi} sum_{k=1}^infty {sin{left ((2k-1)2pi ft ight )}over(2k-1)} \ & {} = frac{4}{pi}left (sin(2pi ft)+{1over3}sin(6pi ft)+{1over5}sin(10pi ft) + cdots ight ).end{align}

A curiosity of the convergence of the Fourier series representation of the square wave is the Gibbs phenomenon. Ringing artifacts in non-ideal square waves can be shown to be related to this phenomenon. The Gibbs phenomenon can be prevented by the use of σ-approximation, which uses the Lanczos sigma factors to help the sequence converge more smoothly.

An ideal square wave requires that the signal changes from the high to the low 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 or cause a badly positioned threshold to be crossed multiple times.)

The ratio of the high period to the total period of a square wave is 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 and off periods and then averaging, it is possible to represent any value between the two limiting levels. This is the basis of pulse width modulation.

Characteristics of imperfect square waves

As 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%. Formulas 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_{n=-infty}^{+infty} sqcap(t - nT) = sum_{n=-infty}^{+infty} left ( u left(t - nT + {1 over 2} ight) - u left(t - nT - {1 over 2} ight) ight )

"T" is 2 for a 50% duty cycle. It can also be defined in a piecewise way:

: x(t) = egin{cases} 1, & |t| < T_1 \ 0, & T_1 < |t| leq {T over 2} end{cases}

when

: x(t + T) = x(t)

See also

*Rectangular function
*Pulse wave
*Sine wave
*Triangle wave
*Sawtooth wave
*Waveform
*Sound
*Multivibrator


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • square wave — stačiakampis signalas statusas T sritis automatika atitikmenys: angl. rectangular wave; square wave; square wave signal vok. Rechteckschwingung, f; Rechteckwelle, f rus. прямоугольный сигнал, m pranc. onde carrée, f; onde rectangulaire, f …   Automatikos terminų žodynas

  • square wave — noun : the rectangular wave form of a quantity which varies periodically and abruptly from one to the other of two uniform values * * * Math., Physics. a graph, function, vibration, etc., that is periodic and equal to one constant on one half of… …   Useful english dictionary

  • square wave — stačiakampė banga statusas T sritis automatika atitikmenys: angl. square wave vok. Rechteckwelle, f rus. прямоугольная волна, f pranc. onde carrée, f …   Automatikos terminų žodynas

  • Square-wave — A&V A square or rectangular shaped periodic wave that alternately assumes two fixed values for equal lengths of time, the transition being negligible in comparison with the duration of each fixed value …   Audio and video glossary

  • square wave — noun Electronics a periodic wave that varies abruptly in amplitude between two fixed values …   English new terms dictionary

  • square wave — /ˈskwɛə weɪv/ (say skwair wayv) noun Physics a wave form which alternates between two fixed values for equal lengths of time, the time of transition between the two values being very short …   Australian English dictionary

  • square wave — noun Date: 1932 a waveform that varies periodically and abruptly from one to the other of two uniform values …   New Collegiate Dictionary

  • square wave — Math., Physics. a graph, function, vibration, etc., that is periodic and equal to one constant on one half of the period and a different constant, which may be zero, on the other half. [1930 35] * * * …   Universalium

  • square wave — noun A nonsinusoidal waveform, commonly encountered in electronics and signal processing, that alternates regularly and instantaneously between two levels …   Wiktionary

  • square wave signal — stačiakampis signalas statusas T sritis automatika atitikmenys: angl. rectangular wave; square wave; square wave signal vok. Rechteckschwingung, f; Rechteckwelle, f rus. прямоугольный сигнал, m pranc. onde carrée, f; onde rectangulaire, f …   Automatikos terminų žodynas


Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.