square wave

Information about square wave

Enlarge picture
Sine, square, triangle, and sawtooth waveforms


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


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.

Enlarge picture
Animation of the additive synthesis of a square wave with an increasing number of harmonics


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.

Square wave sound sample
5 seconds of square wave at 1 kHz
Problems listening to the file? See media help


5 seconds of a 3.5 kHz square wave
Problems listening to the file? See media help

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%. 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:



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):



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



when

See also

Square may mean:

Entertainment

  • Square (album), an album by Buck 65
  • Square (band), a musical trio from Lincoln, Nebraska
  • Square Enix, a video game company
  • Square Co.

..... Click the link for more information.
Non-sinusoidal waveforms are waveforms that are not pure sine waves. They are usually derived from simple math functions. While a pure sine consists of a single frequency, non-sinusoidal waveforms can be described as containing multiple sine waves of different frequencies.
..... Click the link for more information.
Waveform means the shape and form of a signal such as a wave moving in a solid, liquid or gaseous medium.

In many cases the medium in which the wave is being propagated does not permit a direct visual image of the form.
..... Click the link for more information.
Electronics is the study of the flow of charge through various materials and devices such as, semiconductors, resistors, inductors, capacitors, nano-structures, and vacuum tubes. All applications of electronics involve the transmission of power and possibly information.
..... Click the link for more information.
Signal processing is the analysis, interpretation and manipulation of signals. Signals of interest include sound, images, biological signals such as ECG, radar signals, and many others.
..... Click the link for more information.
A digital system is one that uses discrete values (often electrical voltages), representing numbers or non-numeric symbols such as letters or icons, for input, processing, transmission, storage, or display, rather than a continuous range of values (ie, as in an analog system).
..... Click the link for more information.
clock signal is a signal used to coordinate the actions of two or more circuits. A clock signal oscillates between a high and a low state, normally with a 50% duty cycle, and is usually in the form of a square wave.
..... Click the link for more information.
A synchronous circuit is a digital circuit in which the parts are synchronized by a clock signal.

In an ideal synchronous circuit, every change in the logical levels of its storage components is simultaneous.
..... Click the link for more information.
Electromagnetic (EM) radiation is a self-propagating wave in space with electric and magnetic components. These components oscillate at right angles to each other and to the direction of propagation, and are in phase with each other.
..... Click the link for more information.
NOiSE is a one volume manga created by Tsutomu Nihei as a prequel to his acclaimed ten-volume work, Blame!.

It offers some rather sketchy information concerning the Megastructure's origins and initial size, as well as the origins of Silicon life.
..... Click the link for more information.
analog-to-digital converter (abbreviated ADC, A/D or A to D) is an electronic integrated circuit, which converts continuous signals to discrete digital numbers. The reverse operation is performed by a digital-to-analog converter (DAC).
..... Click the link for more information.
sine wave or sinusoid is a function that occurs often in mathematics, physics, signal processing, electrical engineering, and many other fields. Its most basic form is:



which describes a wavelike function of time (t) with
..... Click the link for more information.
Subtractive synthesis is a method of subtracting harmonic content from a sound via sound synthesis, characterised by the application of an audio filter to an audio signal. For example, taking the output of a sawtooth generator and using a low-pass filter to dampen its higher
..... Click the link for more information.
The sawtooth wave (or saw wave) is a kind of non-sinusoidal waveform. It is named a sawtooth based on its resemblance to the teeth on the blade of a saw.

The usual convention is that a sawtooth wave ramps upward as time goes by and then sharply drops.
..... Click the link for more information.
Fourier series is a mathematical tool used for analyzing periodic functions by decomposing such a function into a weighted sum of much simpler sinusoidal component functions sometimes referred to as normal Fourier modes, or simply modes for short.
..... Click the link for more information.
In mathematics, the Gibbs phenomenon (also known as ringing artifacts), named after the American physicist J. Willard Gibbs, is the peculiar manner in which the Fourier series of a piecewise continuously differentiable periodic function f
..... Click the link for more information.
In mathematics, σ-approximation adjusts a Fourier summation to eliminate the Gibbs phenomenon which would otherwise occur at discontinuities.

A σ-approximated summation for a series of period T can be written as follows:


..... Click the link for more information.
In mathematics, σ-approximation adjusts a Fourier summation to eliminate the Gibbs phenomenon which would otherwise occur at discontinuities.

A σ-approximated summation for a series of period T can be written as follows:


..... Click the link for more information.
Bandwidth is the difference between the upper and lower cutoff frequencies of, for example, a filter, a communication channel, or a signal spectrum, and is typically measured in hertz.
..... Click the link for more information.
This article or section is in need of attention from an expert on the subject.
Please help recruit one or [ improve this article] yourself. See the talk page for details.
..... Click the link for more information.
Pulse-width modulation (PWM) of a signal or powersource involves the modulation of its duty cycle, to either convey information over a communications channel or control the amount of power sent to a load.
..... Click the link for more information.
rise time (also risetime) refers to the time required for a signal to change from a specified low value to a specified high value. Typically, these values are 10% and 90% of the step height.
..... Click the link for more information.
In electronics, fall time (pulse decay time) is the time required for the amplitude of a pulse to decrease (fall) from a specified value (usually 90 percent of the peak value exclusive of overshoot or undershoot) to another specified value (usually 10 percent of the peak
..... Click the link for more information.
Damping is any effect, either deliberately engendered or inherent to a system, that tends to reduce the amplitude of oscillations of an oscillatory system.

Definition


..... Click the link for more information.
Bandwidth is the difference between the upper and lower cutoff frequencies of, for example, a filter, a communication channel, or a signal spectrum, and is typically measured in hertz.
..... Click the link for more information.
Heaviside step function, H, also called unit step function, is a discontinuous function whose value is zero for negative argument and one for positive argument. It seldom matters what value is used for H(0), since is mostly used as a distribution.
..... Click the link for more information.
The rectangular function (also known as the rectangle function, rect function, unit pulse, or the normalized boxcar function) is defined as:


..... Click the link for more information.
This article or section is in need of attention from an expert on the subject.
Please help recruit one or [ improve this article] yourself. See the talk page for details.
..... Click the link for more information.
The rectangular function (also known as the rectangle function, rect function, unit pulse, or the normalized boxcar function) is defined as:


..... Click the link for more information.
pulse wave is a kind of non-sinusoidal waveform that is similar to a square wave, but does not have the symmetrical shape associated with a perfect square wave. It is a term common to synthesizer programming, and is a typical waveform available on many synths.
..... Click the link for more information.

This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.