DEV Community

TildAlice
TildAlice

Posted on • Originally published at tildalice.io

FFT vs Welch: Legacy Vibration Code Migration Pitfalls

The 10Hz Bearing That Broke Everything

You inherit a vibration monitoring script written in 2015. It uses raw FFT, hardcoded 2048-point windows, and zero overlap. You think "I'll just swap in scipy.signal.welch() — it's the modern way, right?" Then you push to production and the false alarm rate triples.

This happened on a pump monitoring system running 24/7 on an edge device. The old FFT code was brittle and ugly, but it worked. The Welch replacement looked cleaner, followed best practices, and completely missed a bearing fault that the legacy FFT had caught for three years straight.

Here's what I learned migrating five different legacy vibration analysis scripts to modern scipy APIs. Some of it wasn't in the documentation.

Close-up of a vintage oscilloscope displaying a green waveform next to a blurred person.

Photo by cottonbro studio on Pexels

What the Legacy Code Actually Did

Most industrial FFT code from 2010-2016 looks like this:


python
import numpy as np

# Legacy vibration FFT (circa 2015)
def analyze_vibration_old(signal, fs=10000):
    """Original FFT-based analysis — do not modify (in production since 2017)"""

---

*Continue reading the full article on [TildAlice](https://tildalice.io/fft-welch-legacy-vibration-migration-pitfalls/)*
Enter fullscreen mode Exit fullscreen mode

Top comments (0)