Triangular function
A triangular function (also known as a triangle function, hat function, or tent function) is a function whose graph takes the shape of a triangle. Often this is an isosceles triangle of height 1 and base 2 in which case it is referred to as the triangular function. Triangular functions are useful in signal processing and communication systems engineering as representations of idealized signals, and the triangular function specifically as an integral transform kernel function from which more realistic signals can be derived, for example in kernel density estimation. It also has applications in pulse-code modulation as a pulse shape for transmitting digital signals and as a matched filter for receiving the signals. It is also used to define the triangular window sometimes called the Bartlett window.
Definitions
The most common definition is as a piecewise function:
- [math]\displaystyle{ \begin{align} \operatorname{tri}(x) = \Lambda(x) \ &\overset{\underset{\text{def}}{}}{=} \ \max\big(1 - |x|, 0\big) \\ &= \begin{cases} 1 - |x|, & |x| \lt 1; \\ 0 & \text{otherwise}. \\ \end{cases} \end{align} }[/math]
Equivalently, it may be defined as the convolution of two identical unit rectangular functions:
- [math]\displaystyle{ \begin{align} \operatorname{tri}(x) &= \operatorname{rect}(x) * \operatorname{rect}(x) \\ &= \int_{-\infty}^\infty \operatorname{rect}(x - \tau) \cdot \operatorname{rect}(\tau) \,d\tau. \\ \end{align} }[/math]
The triangular function can also be represented as the product of the rectangular and absolute value functions:
- [math]\displaystyle{ \operatorname{tri}(x) = \operatorname{rect}(x/2) \big(1 - |x|\big). }[/math]
Note that some authors instead define the triangle function to have a base of width 1 instead of width 2:
- [math]\displaystyle{ \begin{align} \operatorname{tri}(2x) = \Lambda(2x) \ & \overset{\underset{\text{def}}{}}{=} \ \max\big(1 - 2|x|, 0\big) \\ &= \begin{cases} 1 - 2|x|, & |x| \lt \tfrac12; \\ 0 & \text{otherwise}. \\ \end{cases} \end{align} }[/math]
In its most general form a triangular function is any linear B-spline:[1]
- [math]\displaystyle{ \operatorname{tri}_j(x) = \begin{cases} (x - x_{j-1})/(x_j - x_{j-1}), & x_{j-1} \le x \lt x_j; \\ (x_{j+1} - x)/(x_{j+1} - x_j), & x_j \le x \lt x_{j+1}; \\ 0 & \text{otherwise}. \end{cases} }[/math]
Whereas the definition at the top is a special case
- [math]\displaystyle{ \Lambda(x) = \operatorname{tri}_j(x), }[/math]
where [math]\displaystyle{ x_{j-1} = -1 }[/math], [math]\displaystyle{ x_j = 0 }[/math], and [math]\displaystyle{ x_{j+1} = 1 }[/math].
A linear B-spline is the same as a continuous piecewise linear function [math]\displaystyle{ f(x) }[/math], and this general triangle function is useful to formally define [math]\displaystyle{ f(x) }[/math] as
- [math]\displaystyle{ f(x) = \sum_j y_j \cdot \operatorname{tri}_j(x), }[/math]
where [math]\displaystyle{ x_j \lt x_{j+1} }[/math] for all integer [math]\displaystyle{ j }[/math]. The piecewise linear function passes through every point expressed as coordinates with ordered pair [math]\displaystyle{ (x_j, y_j) }[/math], that is,
- [math]\displaystyle{ f(x_j) = y_j }[/math].
Scaling
For any parameter [math]\displaystyle{ a \ne 0 }[/math]:
- [math]\displaystyle{ \begin{align} \operatorname{tri}\left(\tfrac{t}{a}\right) &= \int_{-\infty}^\infty \tfrac{1}{|a|} \operatorname{rect}\left(\tfrac{\tau}{a}\right) \cdot \operatorname{rect}\left(\tfrac{t-\tau}{a}\right) \,d\tau \\ &= \begin{cases} 1 - |t/a|, & |t| \lt |a|; \\ 0 & \text{otherwise}. \end{cases} \end{align} }[/math]
Fourier transform
The transform is easily determined using the convolution property of Fourier transforms and the Fourier transform of the rectangular function:
- [math]\displaystyle{ \begin{align} \mathcal{F}\{\operatorname{tri}(t)\} &= \mathcal{F}\{\operatorname{rect}(t) * \operatorname{rect}(t)\}\\ &= \mathcal{F}\{\operatorname{rect}(t)\}\cdot \mathcal{F}\{\operatorname{rect}(t)\}\\ &= \mathcal{F}\{\operatorname{rect}(t)\}^2\\ &= \mathrm{sinc}^2(f), \end{align} }[/math]
where [math]\displaystyle{ \operatorname{sinc}(x) = \sin(\pi x) / (\pi x) }[/math] is the normalized sinc function.
See also
- Källén function, also known as triangle function
- Tent map
- Triangular distribution
- Triangle wave, a piecewise linear periodic function
- Trigonometric functions
References
Original source: https://en.wikipedia.org/wiki/Triangular function.
Read more |