Triangle wave

# Triangle wave

Overview
A triangle wave is a non-sinusoidal waveform
Non-sinusoidal waveform
Non-sinusoidal waveforms are waveforms that are not pure sine waves. They are usually derived from simple math functions. While a pure sine consists of a single frequency, non-sinusoidal waveforms can be described as containing multiple sine waves of different frequencies. These "component" sine...

named for its triangular
Triangle
A triangle is one of the basic shapes of geometry: a polygon with three corners or vertices and three sides or edges which are line segments. A triangle with vertices A, B, and C is denoted ....

shape.
Discussion

Encyclopedia
A triangle wave is a non-sinusoidal waveform
Non-sinusoidal waveform
Non-sinusoidal waveforms are waveforms that are not pure sine waves. They are usually derived from simple math functions. While a pure sine consists of a single frequency, non-sinusoidal waveforms can be described as containing multiple sine waves of different frequencies. These "component" sine...

named for its triangular
Triangle
A triangle is one of the basic shapes of geometry: a polygon with three corners or vertices and three sides or edges which are line segments. A triangle with vertices A, B, and C is denoted ....

shape.

Like a square wave
Square wave
A square wave is a kind of non-sinusoidal waveform, most typically encountered in electronics and signal processing. An ideal square wave alternates regularly and instantaneously between two levels...

, the triangle wave contains only odd harmonic
Harmonic
A harmonic of a wave is a component frequency of the signal that is an integer multiple of the fundamental frequency, i.e. if the fundamental frequency is f, the harmonics have frequencies 2f, 3f, 4f, . . . etc. The harmonics have the property that they are all periodic at the fundamental...

s. However, the higher harmonics roll off
Roll-off
Roll-off is a term commonly used to describe the steepness of a transmission function with frequency, particularly in electrical network analysis, and most especially in connection with filter circuits in the transition between a passband and a stopband...

much faster than in a square wave (proportional to the inverse square of the harmonic number as opposed to just the inverse).

It is possible to approximate a triangle wave with additive synthesis
Additive synthesis is a technique of sound synthesis that creates musical timbre by explicitly adding sinusoidal overtones together.The timbre of an instrument is composed of multiple harmonic or inharmonic partials , of different frequencies and amplitudes, that change over time...

by adding odd harmonics of the fundamental, multiplying every (4n−1)th harmonic by −1 (or changing its phase by π), and rolling off the harmonics by the inverse square of their relative frequency to the fundamental
Fundamental frequency
The fundamental frequency, often referred to simply as the fundamental and abbreviated f0, is defined as the lowest frequency of a periodic waveform. In terms of a superposition of sinusoids The fundamental frequency, often referred to simply as the fundamental and abbreviated f0, is defined as the...

.

This infinite Fourier series converges to the triangle wave:
where is the angular frequency
Angular frequency
In physics, angular frequency ω is a scalar measure of rotation rate. Angular frequency is the magnitude of the vector quantity angular velocity...

.

Another definition of the triangle wave, with range from -1 to 1 and period 2a is:

where the symbol represent the floor function of n.

Also, the triangle wave can be the absolute value of the sawtooth wave
Sawtooth wave
The sawtooth wave is a kind of non-sinusoidal waveform. It is named a sawtooth based on its resemblance to the teeth on the blade of a saw....

:

The triangle wave can also be expressed as the integral of the square wave:

• Triangle function
• Sine wave
Sine wave
The sine wave or sinusoid is a mathematical function that describes a smooth repetitive oscillation. It occurs often in pure mathematics, as well as physics, signal processing, electrical engineering and many other fields...

• Sawtooth wave
Sawtooth wave
The sawtooth wave is a kind of non-sinusoidal waveform. It is named a sawtooth based on its resemblance to the teeth on the blade of a saw....

• Square wave
Square wave
A square wave is a kind of non-sinusoidal waveform, most typically encountered in electronics and signal processing. An ideal square wave alternates regularly and instantaneously between two levels...

• Wave
Wave
In physics, a wave is a disturbance that travels through space and time, accompanied by the transfer of energy.Waves travel and the wave motion transfers energy from one point to another, often with no permanent displacement of the particles of the medium—that is, with little or no associated mass...

s
• Sound
Sound
Sound is a mechanical wave that is an oscillation of pressure transmitted through a solid, liquid, or gas, composed of frequencies within the range of hearing and of a level sufficiently strong to be heard, or the sensation stimulated in organs of hearing by such vibrations.-Propagation of...

• Zigzag
Zigzag
A zigzag is a pattern made up of small corners at variable angles, though constant within the zigzag, tracing a path between two parallel lines; it can be described as both jagged and fairly regular....