Triangle wave
Triangle wave
Main page
2308868

Triangle wave

logo
Community Hub0 subscribers
What are your thoughts?
Be the first to start a discussion here.
Be the first to start a discussion here.
Triangle wave

A triangular wave or triangle wave is a non-sinusoidal waveform named for its triangular shape. It is a periodic, piecewise linear, continuous real function.

Like a square wave, the triangle wave contains only odd harmonics. However, the higher harmonics roll off much faster than in a square wave (proportional to the inverse square of the harmonic number as opposed to just the inverse).

A triangle wave of period p that spans the range [0, 1] is defined as where is the floor function. This can be seen to be the absolute value of a shifted sawtooth wave.

For a triangle wave spanning the range [−1, 1] the expression becomes

A more general equation for a triangle wave with amplitude and period using the modulo operation and absolute value is

For example, for a triangle wave with amplitude 5 and period 4:

A phase shift can be obtained by altering the value of the term, and the vertical offset can be adjusted by altering the value of the term.

As this only uses the modulo operation and absolute value, it can be used to simply implement a triangle wave on hardware electronics.

See all
User Avatar
No comments yet.