TOPICS
Search

Square Wave


SquareWave

The square wave, also called a pulse train, or pulse wave, is a periodic waveform consisting of instantaneous transitions between two levels. The square wave is sometimes also called the Rademacher function. The square wave illustrated above has period 2 and levels -1/2 and 1/2. Other common levels for square waves include (-1,1) and (0,1) (digital signals).

Analytic formulas for the square wave S(x) with half-amplitude A, period T, and offset x_0 include

S(x)=A(-1)^(|_2(x-x_0)/T_|)
(1)
=Asgn[sin((2pi(x-x_0))/T)]
(2)
=A(2i)/pi[tanh^(-1)(e^(-ipi(x-x_0)/T))-tanh^(-1)(e^(ipi(x-x_0)/T))],
(3)

where |_x_| is the floor function, sgn(x) is the sign function, and tanh^(-1)x is the inverse hyperbolic tangent.

The square wave is implemented in the Wolfram Language as SquareWave[x].

Let the square wave have period 2L. The square wave function is odd, so the Fourier series has a_0=a_n=0 and

b_n=2/Lint_0^Lsin((npix)/L)dx
(4)
=4/(npi)sin^2(1/2npi)
(5)
=2/(npi)[1-(-1)^n]
(6)
=4/(npi){0 for n even; 1 for n odd.
(7)

The Fourier series for the square wave with period 2L, phase offset 0, and half-amplitude 1 is therefore

 f(x)=4/pisum_(n=1,3,5,...)^infty1/nsin((npix)/L).
(8)

See also

Boxcar Function, Hadamard Matrix, Heaviside Step Function, Rectangle Function, Sawtooth Wave, Triangle Wave, Walsh Function

Explore with Wolfram|Alpha

References

Thompson, A. R.; Moran, J. M.; and Swenson, G. W. Jr. Interferometry and Synthesis in Radio Astronomy. New York: Wiley, p. 203, 1986.

Referenced on Wolfram|Alpha

Square Wave

Cite this as:

Weisstein, Eric W. "Square Wave." From MathWorld--A Wolfram Web Resource. https://mathworld.wolfram.com/SquareWave.html

Subject classifications