The Bartlett window

The Bartlett window, also known as the triangular window, is one of the simplest window functions used in digital signal processing. It linearly tapers the signal toward zero at both ends, forming a symmetric triangular shape. Unlike cosine-based windows such as Hann or Hamming, the Bartlett window uses a linear decrease toward the edges, making it computationally efficient and easy to implement. However, this simplicity comes with trade-offs in spectral performance.

\[ w(n) = 1 - \left| \frac{n - \frac{N-1}{2}}{\frac{N-1}{2}} \right|, \quad 0 \le n \le N-1 \]
Time-Domain Effect: The original signal (gray) continues with full amplitude to the edges, while the Bartlett-windowed signal (orange) is linearly tapered to zero, forming a characteristic triangular shape.
Frequency-Domain Comparison: The rectangular window (red) shows strong spectral leakage, with side lobes only 15–30 dB below the main peak. The Bartlett window (orange) provides moderate side lobe suppression, with first side lobes at approximately -26 dB, falling off at -12 dB per octave.

The Bartlett window reduces edge discontinuities by linearly tapering the signal to zero at both ends. When applied to a signal, it improves over the rectangular window by reducing spectral leakage, but it does not achieve the same level of side lobe suppression as cosine-based windows like Hann or Hamming. The first side lobe of the Bartlett window is attenuated to approximately -26 dB, compared to -31 dB for Hann and -41 dB for Hamming.

Use Case: Low-Cost Embedded Systems and Real-Time Processing

The Bartlett window's main advantage is its computational simplicity. Unlike cosine-based windows that require evaluating trigonometric functions (or precomputed tables), the Bartlett window uses only subtraction, absolute value, and division. This makes it attractive for low-cost embedded systems, real-time applications on limited hardware, and FPGA implementations where computational resources are scarce and memory is limited.

Practical example: In low-power IoT (Internet of Things) sensors performing vibration monitoring, the microcontroller may lack a floating-point unit (FPU) and have limited RAM. Implementing a Hann window would require either slow software trigonometric computations or a large precomputed table. The Bartlett window can be computed with just a few integer operations, making real-time spectral analysis feasible on such constrained hardware, even if the spectral performance is not optimal.

Trade-offs and Limitations

The Bartlett window provides a compromise between the rectangular window (no leakage reduction) and smoother cosine-based windows. Its main limitations are:

  • Moderate side lobe suppression – First side lobe at only -26 dB, compared to -31 dB for Hann and -41 dB for Hamming
  • Slower roll-off – Side lobes fall off at -12 dB per octave, compared to -18 dB per octave for Hann and Blackman
  • Linear rather than smooth tapering – The discontinuity in the first derivative at the center and edges creates higher far side lobes

When applied to a signal, the Bartlett window reduces discontinuities at the boundaries, similar to other window functions. However, because the tapering is linear rather than smooth (the derivative is discontinuous at the peak and at the edges), it does not suppress spectral leakage as effectively as Hann or Blackman windows. This makes it unsuitable for applications requiring high dynamic range or detection of weak signals near strong ones.

Conclusion

The Bartlett (triangular) window is best suited for applications where computational efficiency is the primary concern and spectral performance requirements are modest. Its first side lobe is attenuated to approximately -26 dB, with a roll-off of -12 dB per octave. While it significantly improves over the rectangular window by eliminating edge discontinuities, it is outperformed by cosine-based windows like Hann, Hamming, and Blackman in terms of spectral purity. For low-cost embedded systems, real-time processing on limited hardware, or educational demonstrations of windowing concepts, the Bartlett window remains a useful and practical choice.

See also: The Bartlett Window implementation