Rectangular function
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]
{\displaystyle \operatorname {rect} \left({\frac {t}{a}}\right)=\Pi \left({\frac {t}{a}}\right)=\left\{{\begin{array}{rl}0,&{\text{if }}|t|>{\frac {a}{2}}\\{\frac {1}{2}},&{\text{if }}|t|={\frac {a}{2}}\1,円&{\text{if }}|t|<{\frac {a}{2}}.\end{array}}\right.}
Alternative definitions of the function define {\textstyle \operatorname {rect} \left(\pm {\frac {1}{2}}\right)} to be 0,[3] 1,[4] [5] or undefined.
Its periodic version is called a rectangular wave .
History
[edit ]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 ]The rectangular function is a special case of the more general boxcar function:
{\displaystyle \operatorname {rect} \left({\frac {t-X}{Y}}\right)=H(t-(X-Y/2))-H(t-(X+Y/2))=H(t-X+Y/2)-H(t-X-Y/2)}
where {\displaystyle H(x)} is the Heaviside step function; the function is centered at {\displaystyle X} and has duration {\displaystyle Y}, from {\displaystyle X-Y/2} to {\displaystyle X+Y/2.}
Fourier transform of the rectangular function
[edit ]The unitary Fourier transforms of the rectangular function are[2] {\displaystyle \int _{-\infty }^{\infty }\operatorname {rect} (t)\cdot e^{-i2\pi ft},円dt={\frac {\sin(\pi f)}{\pi f}}=\operatorname {sinc} (\pi f)=\operatorname {sinc} _{\pi }(f),} using ordinary frequency f, where {\displaystyle \operatorname {sinc} _{\pi }} is the normalized form[10] of the sinc function and {\displaystyle {\frac {1}{\sqrt {2\pi }}}\int _{-\infty }^{\infty }\operatorname {rect} (t)\cdot e^{-i\omega t},円dt={\frac {1}{\sqrt {2\pi }}}\cdot {\frac {\sin \left(\omega /2\right)}{\omega /2}}={\frac {1}{\sqrt {2\pi }}}\cdot \operatorname {sinc} \left(\omega /2\right),} using angular frequency {\displaystyle \omega }, where {\displaystyle \operatorname {sinc} } is the unnormalized form of the sinc function.
For {\displaystyle \operatorname {rect} (x/a)}, its Fourier transform is{\displaystyle \int _{-\infty }^{\infty }\operatorname {rect} \left({\frac {t}{a}}\right)\cdot e^{-i2\pi ft},円dt=a{\frac {\sin(\pi af)}{\pi af}}=a\ \operatorname {sinc} _{\pi }{(af)}.}
Self convolution of the Rectangular function
[edit ]The self convolution of the dis-continous 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:
{\displaystyle {\begin{aligned}\operatorname {rect(2t/T)} *\operatorname {rect(2t/T)} =\operatorname {tri(t/T)} ={\begin{cases}1+t,&-T<t<0\1円-t,&,円,円,円,円,0円<t<T\0円&,円,円,円,円,円{\text{otherwise}}\\\end{cases}}\end{aligned}}}
Self convolution of the rectangular function applied twice yields a continuous and differentiably continous parabolic spline:
{\displaystyle {\begin{aligned}\operatorname {rect(2t/T)} *\operatorname {rect(2t/T)} *\operatorname {rect(2t/T)} =\operatorname {tri(t/T)} *\operatorname {rect(2t/T)} ={\begin{cases}{\frac {9}{8}}+{\frac {3}{2}}t+{\frac {1}{2}}t^{2},&-{\frac {3}{2}}T<t<-{\frac {1}{2}}T\\{\frac {3}{4}}-t^{2},&-{\frac {1}{2}}T<t<{\frac {1}{2}}T\\{\frac {9}{8}}-{\frac {3}{2}}t+{\frac {1}{2}}t^{2},&,円,円,円,円,円{\frac {1}{2}}T<t<{\frac {3}{2}}T\0円&,円,円,円,円,円{\text{otherwise}}\\\end{cases}}\end{aligned}}}
A self convolution of the rectangular function applied three times yields a continuous, and a second order differentiably continous cubic spline:
{\displaystyle {\begin{aligned}\operatorname {tri(t/T)} *\operatorname {tri(t/T)} ={\begin{cases}{\frac {4}{3}}+{2}t+t^{2}+{\frac {1}{6}}t^{3},&-2T<t<-T\\{\frac {2}{3}}-t^{2}-{\frac {1}{2}}t^{3},&-T<t<0\\{\frac {2}{3}}-t^{2}+{\frac {1}{2}}t^{3},&,円,円,円,円,0円<t<T\\{\frac {4}{3}}-{2}t+t^{2}-{\frac {1}{6}}t^{3},&,円,円,円,円,円T<t<2T\0円&,円,円,円,円,円{\text{otherwise}}\\\end{cases}}\end{aligned}}}
A self convolution of the rectangular function applied four times yields a continuous, and a third order differentiably continous 4th order spline:
{\displaystyle {\begin{aligned}4^{th},円{\text{order spline}}={\begin{cases}{\frac {625}{384}}+{\frac {125}{48}}t+{\frac {25}{16}}t^{2}+{\frac {5}{12}}t^{3}+{\frac {1}{24}}t^{4},&-{\frac {5}{2}}T<t<-{\frac {3}{2}}T\\{\frac {55}{96}}-{\frac {5}{24}}t-{\frac {5}{4}}t^{2}-{\frac {5}{6}}t^{3}-{\frac {1}{6}}t^{4},&-{\frac {3}{2}}T<t<-{\frac {1}{2}}T\\{\frac {115}{192}}-{\frac {5}{8}}t^{2}+{\frac {1}{4}}t^{4},&-{\frac {1}{2}}T<t<{\frac {1}{2}}T\\{\frac {55}{96}}+{\frac {5}{24}}t-{\frac {5}{4}}t^{2}+{\frac {5}{6}}t^{3}-{\frac {1}{6}}t^{4},&,円,円,円,円,円{\frac {1}{2}}T<t<{\frac {3}{2}}T\\{\frac {625}{384}}-{\frac {125}{48}}t+{\frac {25}{16}}t^{2}-{\frac {5}{12}}t^{3}+{\frac {1}{24}}t^{4},&,円,円,円,円,円{\frac {3}{2}}T<t<{\frac {5}{2}}T\0円&,円,円,円,円,円{\text{otherwise}}\\\end{cases}}\end{aligned}}}
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 ]Viewing the rectangular function as a probability density function, it is a special case of the continuous uniform distribution with {\displaystyle a=-1/2,b=1/2.} The characteristic function is
{\displaystyle \varphi (k)={\frac {\sin(k/2)}{k/2}},}
and its moment-generating function is
{\displaystyle M(k)={\frac {\sinh(k/2)}{k/2}},}
where {\displaystyle \sinh(t)} is the hyperbolic sine function.
Rational approximation
[edit ]The pulse function may also be expressed as a limit of a rational function:
{\displaystyle \Pi (t)=\lim _{n\rightarrow \infty ,n\in \mathbb {(} Z)}{\frac {1}{(2t)^{2n}+1}}.}
Demonstration of validity
[edit ]First, we consider the case where {\textstyle |t|<{\frac {1}{2}}.} Notice that the term {\textstyle (2t)^{2n}} is always positive for integer {\displaystyle n.} However, {\displaystyle 2t<1} and hence {\textstyle (2t)^{2n}} approaches zero for large {\displaystyle n.}
It follows that: {\displaystyle \lim _{n\rightarrow \infty ,n\in \mathbb {(} Z)}{\frac {1}{(2t)^{2n}+1}}={\frac {1}{0+1}}=1,|t|<{\tfrac {1}{2}}.}
Second, we consider the case where {\textstyle |t|>{\frac {1}{2}}.} Notice that the term {\textstyle (2t)^{2n}} is always positive for integer {\displaystyle n.} However, {\displaystyle 2t>1} and hence {\textstyle (2t)^{2n}} grows very large for large {\displaystyle n.}
It follows that: {\displaystyle \lim _{n\rightarrow \infty ,n\in \mathbb {(} Z)}{\frac {1}{(2t)^{2n}+1}}={\frac {1}{+\infty +1}}=0,|t|>{\tfrac {1}{2}}.}
Third, we consider the case where {\textstyle |t|={\frac {1}{2}}.} We may simply substitute in our equation:
{\displaystyle \lim _{n\rightarrow \infty ,n\in \mathbb {(} Z)}{\frac {1}{(2t)^{2n}+1}}=\lim _{n\rightarrow \infty ,n\in \mathbb {(} Z)}{\frac {1}{1^{2n}+1}}={\frac {1}{1+1}}={\tfrac {1}{2}}.}
We see that it satisfies the definition of the pulse function. Therefore,
{\displaystyle \operatorname {rect} (t)=\Pi (t)=\lim _{n\rightarrow \infty ,n\in \mathbb {(} Z)}{\frac {1}{(2t)^{2n}+1}}={\begin{cases}0&{\mbox{if }}|t|>{\frac {1}{2}}\\{\frac {1}{2}}&{\mbox{if }}|t|={\frac {1}{2}}\1円&{\mbox{if }}|t|<{\frac {1}{2}}.\\\end{cases}}}
Dirac delta function
[edit ]The rectangle function can be used to represent the Dirac delta function {\displaystyle \delta (x)}.[12] Specifically,{\displaystyle \delta (x)=\lim _{a\to 0}{\frac {1}{a}}\operatorname {rect} \left({\frac {x}{a}}\right).}For a function {\displaystyle g(x)}, its average over the width {\displaystyle a} around 0 in the function domain is calculated as,
{\displaystyle g_{avg}(0)={\frac {1}{a}}\int \limits _{-\infty }^{\infty }dx\ g(x)\operatorname {rect} \left({\frac {x}{a}}\right).} To obtain {\displaystyle g(0)}, the following limit is applied,
{\displaystyle g(0)=\lim _{a\to 0}{\frac {1}{a}}\int \limits _{-\infty }^{\infty }dx\ g(x)\operatorname {rect} \left({\frac {x}{a}}\right)} and this can be written in terms of the Dirac delta function as, {\displaystyle g(0)=\int \limits _{-\infty }^{\infty }dx\ g(x)\delta (x).}The Fourier transform of the Dirac delta function {\displaystyle \delta (t)} is
{\displaystyle \delta (f)=\int _{-\infty }^{\infty }\delta (t)\cdot e^{-i2\pi ft},円dt=\lim _{a\to 0}{\frac {1}{a}}\int _{-\infty }^{\infty }\operatorname {rect} \left({\frac {t}{a}}\right)\cdot e^{-i2\pi ft},円dt=\lim _{a\to 0}\operatorname {sinc} {(af)}.} where the sinc function here is the normalized sinc function. Because the first zero of the sinc function is at {\displaystyle f=1/a} and {\displaystyle a} goes to infinity, the Fourier transform of {\displaystyle \delta (t)} is
{\displaystyle \delta (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 ]References
[edit ]- ^ Wolfram Research (2008). "HeavisidePi, Wolfram Language function" . Retrieved October 11, 2022.
- ^ a b Weisstein, Eric W. "Rectangle Function". MathWorld .
- ^ Wang, Ruye (2012). Introduction to Orthogonal Transforms: With Applications in Data Processing and Analysis. Cambridge University Press. pp. 135–136. ISBN 9780521516884.
- ^ Tang, K. T. (2007). Mathematical Methods for Engineers and Scientists: Fourier analysis, partial differential equations and variational models. Springer. p. 85. ISBN 9783540446958.
- ^ Kumar, A. Anand (2011). Signals and Systems. PHI Learning Pvt. Ltd. pp. 258–260. ISBN 9788120343108.
- ^ Klauder, John R (1960). "The Theory and Design of Chirp Radars" . Bell System Technical Journal. 39 (4): 745–808. doi:10.1002/j.1538-7305.1960.tb03942.x.
- ^ Woodward, Philipp M (1953). Probability and Information Theory, with Applications to Radar. Pergamon Press. p. 29.
- ^ Higgins, John Rowland (1996). Sampling Theory in Fourier and Signal Analysis: Foundations. Oxford University Press Inc. p. 4. ISBN 0198596995.
- ^ Zayed, Ahmed I (1996). Handbook of Function and Generalized Function Transformations. CRC Press. p. 507. ISBN 9780849380761.
- ^ Wolfram MathWorld, https://mathworld.wolfram.com/SincFunction.html
- ^ Spooner, Chad (January 28, 2021). "SPTK: Convolution and the Convolution Theorem".
- ^ Khare, Kedar; Butola, Mansi; Rajora, Sunaina (2023). "Chapter 2.4 Sampling by Averaging, Distributions and Delta Function". Fourier Optics and Computational Imaging (2nd ed.). Springer. pp. 15–16. doi:10.1007/978-3-031-18353-9. ISBN 978-3-031-18353-9.