mathematics//signal processing//digital filter//notch filter

A notch filter is a digital filter that removes a narrow band around one frequency and passes everything else almost untouched, and its classic uses are taking mains hum (50 or 60 Hz) out of a measurement and taking motor vibration out of a drone's gyro. It is built as a second-order IIR filter tuned by two numbers, the centre frequency and the width of the notch (its quality factor).


A notch filter is a digital filter that removes a narrow band around one frequency and passes everything else almost untouched, and its classic uses are taking mains hum (50 or 60 Hz) out of a measurement and taking motor vibration out of a drone's gyro. It is built as a second-order IIR filter tuned by two numbers, the centre frequency and the width of the notch (its quality factor).

On a multirotor, every motor and propeller shakes the frame at its rotation frequency and its harmonics, typically between about 50 and 500 Hz, and that vibration lands on the gyro as a few sharp lines. A low-pass filter strong enough to suppress a line at 150 Hz would need its corner well below it, and its delay would spread over the whole attitude band. A notch at 150 Hz removes the line and leaves the low frequencies, where the loop lives, with only a small phase shift.

A notch removes noise at its exact frequency for far less delay than a low-pass.

The phase a notch costs is concentrated near its centre and falls away quickly below it, so a loop crossing over at a few hertz pays little for a notch at 150 Hz. That is why drone firmware fights motor noise with notches and keeps the low-pass light (delay margin).

The motor frequency moves with the throttle, so a fixed notch misses it. A dynamic notch follows the line: either it locates the peak with an onboard FFT of the gyro signal, or it takes each motor's speed from the ESC telemetry and places notches at the rotation frequency and its harmonics. Betaflight's RPM filter and PX4's dynamic notch both work from ESC RPM feedback; PX4's filter tuning guide describes the parameters.

A notch is only as good as the frequency it is given. A motor pole count set wrong in the configuration places every notch at the wrong frequency, removing nothing and still costing phase.

A narrow notch is sensitive; a wide one costs more phase. Widening the notch tolerates frequency error and spread between motors, at the price of more delay just below the centre, so its width is a tuning decision like the corner of a low-pass (loop delay).

Notches treat a line once it exists. Balancing propellers, stiffening arms and soft-mounting the IMU lower the vibration before it reaches the sensor (anti-aliasing filter, mechanical part), and a vibration that excites a structural resonance is better moved than filtered.