# Triangle function

The triangle function , also tri function, triangle function or tent function, is a mathematical function with the following definition:

{\ displaystyle {\ begin {aligned} \ operatorname {tri} (t) = \ land (t) \ quad & {\ overset {\ underset {\ mathrm {def}} {}} {=}} \ \ max ( 1- | t |, 0) \\ & = {\ begin {cases} 1- | t |, & | t | <1 \\ 0, & {\ mbox {otherwise}} \ end {cases}} \ end {aligned}}} .

Equivalent to this, it can also be defined as a convolution of the rectangular function with itself, as is clearly shown in the figure below: ${\ displaystyle \ operatorname {rect}}$ {\ displaystyle {\ begin {aligned} \ operatorname {tri} (t) = \ operatorname {rect} (t) * \ operatorname {rect} (t) \ quad & {\ overset {\ mathrm {def}} {= }} \ int _ {- \ infty} ^ {\ infty} \ mathrm {rect} (\ tau) \ cdot \ mathrm {rect} (t- \ tau) \ d \ tau \\ & = \ int _ {- \ infty} ^ {\ infty} \ mathrm {rect} (\ tau) \ cdot \ mathrm {rect} (\ tau -t) \ d \ tau \ end {aligned}}} .

The triangle function can be scaled using a parameter : ${\ displaystyle a \ neq 0}$ {\ displaystyle {\ begin {aligned} \ operatorname {tri} (t / a) & = {\ begin {cases} 1- | t / a |, & | t | <| a | \\ 0, & {\ mbox {otherwise}}. \ end {cases}} \ end {aligned}}} The triangle function is mainly used in the field of signal processing for the representation of idealized signal curves. In addition to the Gaussian function , the Heaviside function and the rectangular function, it is used to describe elementary signals. Technical applications are in the area of optimal filters or window functions such as the Bartlett window .

The Fourier transformation of the triangle function gives the squared si function :

{\ displaystyle {\ begin {aligned} {\ mathcal {F}} \ {\ operatorname {tri} (t) \} & = \ mathrm {si} ^ {2} (\ pi f). \ end {aligned} }} ## General form

In general, one would like to scale the triangle function. The stretching in the x-direction and the height at the top are of interest here. Half the period, i.e. the distance from the start of the triangular function to the center point, is used for the stretching . The height at the point is through ${\ displaystyle T}$ ${\ displaystyle t_ {0}}$ ${\ displaystyle t_ {0}}$ ${\ displaystyle a \ cdot \ operatorname {tri} \ left ({\ frac {t-t_ {0}} {T}} \ right)}$ given.

## Derivation

The derivative of the triangle function is a sum of two rectangular functions: ${\ displaystyle \ operatorname {rect}}$ ${\ displaystyle {\ frac {a} {T}} \ left (\ operatorname {rect} \ left ({\ frac {t- (t_ {0} -T / 2)} {T}} \ right) - \ operatorname {rect} \ left ({\ frac {t- (t_ {0} + T / 2)} {T}} \ right) \ right)}$ which can also be represented as the sum of three jump functions : ${\ displaystyle \ epsilon}$ ${\ displaystyle {\ frac {a} {T}} \ left (\ operatorname {\ epsilon} (t- (t_ {0} -T)) - 2 \ operatorname {\ epsilon} (t-t_ {0}) + \ operatorname {\ epsilon} (t- (t_ {0} + T)) \ right),}$ where the period, the center and the height of the triangular function represent. The prefactor therefore appears as the slope of the triangle function in the derivative. ${\ displaystyle 2T}$ ${\ displaystyle t_ {0}}$ ${\ displaystyle a}$ ${\ displaystyle {\ tfrac {a} {T}}}$ ## Triangular oscillation

In contrast to the triangle function shown here, a triangular oscillation is a periodic function that results from the periodic continuation of the interval , generally supplemented by a constant offset. A triangular oscillation in the narrower sense does not contain a constant component , so the minima and maxima are equal in terms of amount. ${\ displaystyle [-1.1]}$ The function

${\ displaystyle \ Delta (t) = 2a \ cdot \ left | \ max (1 - ((2f \ cdot t) {\ bmod {2}}), - 1) \ right | -a}$ or the Fourier series

${\ displaystyle {\ frac {8a} {\ pi ^ {2}}} \ cdot \ sum _ {n = 1} ^ {\ infty} {\ frac {\ cos ((2n-1) \ cdot \ omega \ cdot t)} {(2n-1) ^ {2}}}}$ omega with for the amplitude and for the angular frequency generates a continuous triangular signal. ${\ displaystyle a}$ ${\ displaystyle \ omega}$ Generalized and with the sine basic function of the form

${\ displaystyle a (t) = {\ widehat {a}} \ cdot \ sin (\ omega t + \ varphi)}$ in harmony follows:

${\ displaystyle \ Delta (t) = 2a \ cdot \ left | \ max (1 - ((2f \ cdot (tT {\ frac {2 \ varphi + \ pi} {4 \ pi}})) {\ bmod {2 }})), - 1) \ right | -a}$ .

## source

• Hans Dieter Lüke: Signal transmission . 6th edition. Springer Verlag, 1995, ISBN 3-540-54824-6 .