Rectangular function

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

Rectangular function with T=1

The rectangular function (also known as the rectangle function, rect function, Pi function, Heaviside Pi function,[1] gate function, unit pulse, or the normalized boxcar function) is defined as[2]

rect(tT)=Π(tT)={0,if |t|>T212,if |t|=T21,if |t|<T2.

Alternative definitions of the function define rect(t=±T2) to be 0,[3] 1,[4][5] or undefined. The area under the curve does not change for the different definitions of the functions at t=±T2.

The rectangular function can be used as the basis for a rectangular wave.

History

[edit | edit source]

The rect function has been introduced 1953 by Woodward[6] in "Probability and Information Theory, with Applications to Radar"[7] as an ideal cutout operator, together with the sinc function[8][9] as an ideal interpolation operator, and their counter operations which are sampling (comb operator) and replicating (rep operator), respectively.

Relation to the boxcar function

[edit | edit source]

The rectangular function is a special case of the more general boxcar function:

rect(tXY)=H(t(XY/2))H(t(X+Y/2))=H(tX+Y/2)H(tXY/2)

where H(x) is the Heaviside step function; the function is centered at X and has duration Y, from XY/2 to X+Y/2.

Fourier transform of the rectangular function

[edit | edit source]
Plot of normalized sinc(x) function (i.e. sinc(πx)) with its spectral frequency components.

The unitary Fourier transforms of the rectangular function are[2] rect(t)ei2πftdt=sin(πf)πf=sinc(πf)=sincπ(f), using ordinary frequency f, where sincπ is the normalized form[10] of the sinc function and 12πrect(t)eiωtdt=12πsin(ω/2)ω/2=12πsinc(ω/2), using angular frequency ω, where sinc is the unnormalized form of the sinc function.

For rect(x/a), its Fourier transform isrect(ta)ei2πftdt=asin(πaf)πaf=a sincπ(af).

Self convolution of the Rectangular function

[edit | edit source]
The unit Rectangular function (in which T=1) along with the piecewise defined splines that result from successive convolutions of the Rectangular function with itself.

The self convolution of the dis-continuous rectangular function results in the triangular function, a piecewise defined spline that is continuous, but not continuously differentiable. Successive convolutions of the rectangular function result in piecewise defined pulses with lower maximums which are wider and smoother, with "smoother" meaning higher-order derivatives are coninuous.[11]

A convolution of the discontinuous rectangular function with itself results in the triangular function, which is a continuous function:

rect(2t/T)*rect(2t/T)=tri(t/T)={1+t,T<t<01t,0<t<T0otherwise

Self convolution of the rectangular function applied twice yields a continuous and differentiably continuous parabolic spline:

rect(2t/T)*rect(2t/T)*rect(2t/T)=tri(t/T)*rect(2t/T)={98+32t+12t2,32T<t<12T34t2,12T<t<12T9832t+12t2,12T<t<32T0otherwise

A self convolution of the rectangular function applied three times yields a continuous, and a second order differentiably continuous cubic spline:

tri(t/T)*tri(t/T)={43+2t+t2+16t3,2T<t<T23t212t3,T<t<023t2+12t3,0<t<T432t+t216t3,T<t<2T0otherwise

A self convolution of the rectangular function applied four times yields a continuous, and a third order differentiably continuous 4th order spline:

4thorder spline={625384+12548t+2516t2+512t3+124t4,52T<t<32T5596524t54t256t316t4,32T<t<12T11519258t2+14t4,12T<t<12T5596+524t54t2+56t316t4,12T<t<32T62538412548t+2516t2512t3+124t4,32T<t<52T0otherwise


Since the Fourier Transform of the Rectangular function is the Sinc function, the Convolution theorem mean that the Fourier transform of pulses resulting from successive convolution of the Rectangular function with itself is simply the Sinc function to the order of the number of times that the convolution function was applied + 1 (i.e., the Fourier transform of the Triangular function is Sinc2, the Fourier transform of parabolic spline resulting from two successive convolutions of the Rectangular function with itself is Sinc3, etc.)

Use in probability

[edit | edit source]

Viewing the rectangular function as a probability density function, it is a special case of the continuous uniform distribution with a=1/2,b=1/2. The characteristic function is

φ(k)=sin(k/2)k/2,

and its moment-generating function is

M(k)=sinh(k/2)k/2,

where sinh(t) is the hyperbolic sine function.

Rational approximation

[edit | edit source]

The pulse function may also be expressed as a limit of a rational function:

Π(t)=limn,n(Z)1(2t)2n+1.

Demonstration of validity

[edit | edit source]

First, we consider the case where |t|<12. Notice that the term (2t)2n is always positive for integer n. However, 2t<1 and hence (2t)2n approaches zero for large n.

It follows that: limn,n(Z)1(2t)2n+1=10+1=1,|t|<12.

Second, we consider the case where |t|>12. Notice that the term (2t)2n is always positive for integer n. However, 2t>1 and hence (2t)2n grows very large for large n.

It follows that: limn,n(Z)1(2t)2n+1=1++1=0,|t|>12.

Third, we consider the case where |t|=12. We may simply substitute in our equation:

limn,n(Z)1(2t)2n+1=limn,n(Z)112n+1=11+1=12.

We see that it satisfies the definition of the pulse function. Therefore,

rect(t)=Π(t)=limn,n(Z)1(2t)2n+1={0if |t|>1212if |t|=121if |t|<12.

Dirac delta function

[edit | edit source]

The rectangle function can be used to represent the Dirac delta function δ(x).[12] Specifically,δ(x)=lima01arect(xa).For a function g(x), its average over the width a around 0 in the function domain is calculated as,

gavg(0)=1adx g(x)rect(xa). To obtain g(0), the following limit is applied,

g(0)=lima01adx g(x)rect(xa) and this can be written in terms of the Dirac delta function as, g(0)=dx g(x)δ(x).The Fourier transform of the Dirac delta function δ(t) is

δ(f)=δ(t)ei2πftdt=lima01arect(ta)ei2πftdt=lima0sinc(af). where the sinc function here is the normalized sinc function. Because the first zero of the sinc function is at f=1/a and a goes to infinity, the Fourier transform of δ(t) is

δ(f)=1, means that the frequency spectrum of the Dirac delta function is infinitely broad. As a pulse is shorten in time, it is larger in spectrum.

See also

[edit | edit source]

References

[edit | edit source]
  1. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  2. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  3. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  4. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  5. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  10. ^ Wolfram MathWorld, https://mathworld.wolfram.com/SincFunction.html
  11. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
  12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).