hardware//electronics//analog filter//anti-aliasing filter
An anti-aliasing filter is a low-pass analog filter placed before a converter to remove content above half the sampling rate, and every measurement chain that samples a signal with energy beyond that limit needs one, because after sampling that energy folds into the band and poses as real signal (aliasing). It is the one filter in a chain that must act in the continuous world: a 240 Hz motor vibration sampled at 250 Hz becomes a 10 Hz line that no later processing can tell apart from a real 10 Hz motion.
An anti-aliasing filter is a low-pass analog filter placed before a converter to remove content above half the sampling rate, and every measurement chain that samples a signal with energy beyond that limit needs one, because after sampling that energy folds into the band and poses as real signal (aliasing). It is the one filter in a chain that must act in the continuous world: a 240 Hz motor vibration sampled at 250 Hz becomes a 10 Hz line that no later processing can tell apart from a real 10 Hz motion.
Its job sets its design. It must pass the band that matters untouched and be well down by the Nyquist frequency fs/2f_s/2fs/2 (sampling theorem), and since no real filter drops at a single frequency, the gap between the two decides how steep and how complex it has to be. Sampling at 5 to 10 times the bandwidth of interest leaves room for a simple second- or fourth-order filter; sampling just above twice the bandwidth would demand a brick wall, with the phase distortion and component tolerance that come with it.
It must come before the converter, and it costs delay like any filter.
An anti-aliasing filter set too low eats into the band of the loop and adds phase lag; set too high, it lets folded vibration through. Its corner is the first entry of the delay budget of every loop that reads that sensor (loop delay).
A modern sensor often carries it inside. A MEMS inertial unit samples its element at several kilohertz and filters digitally before delivering data at the output rate, so the anti-aliasing and the delay that comes with it are set by a register in the chip; the datasheet holds half the measurement model (IMU). The sigma-delta converter does the same at the extreme, oversampling so far that a simple analog stage suffices and decimating digitally (sampling).
Vibration can also be filtered mechanically. The rubber dampers under a flight controller are a mechanical anti-alias filter: a soft mount and its mass form a low-pass that attenuates motor and propeller vibration of hundreds of hertz before it reaches the IMU, while the slow motions of the vehicle pass through. A mount that is too soft resonates in the attitude band instead (resonance).
No filter beats removing the cause. Balanced propellers and a stiff frame lower the vibration that the filter has to fight, and every hertz of cut-off the filter can then give back is phase the attitude loop keeps.
The digital filters that follow the converter (digital filter) clean what is already in the band; they cannot undo what this one let fold.