Frequency and the Fourier Transform
Any signal can be written as a sum of sine waves. The Fourier transform shows how much of each frequency a signal contains. For a robot, it is the fastest way to find motor vibration or electrical noise hiding in sensor data.
The discrete Fourier transform
For \(N\) samples \(x_n\), the strength of frequency bin \(k\) is
Here \(N = 256\) samples over one second, so bin \(k\) is \(k\) hertz, and the highest frequency you can see is 128 Hz, the Nyquist limit.
What to notice
Each sine wave shows up as one sharp spike in the spectrum, while random noise spreads thinly across every frequency. Picture wave 1 as a slow real motion and wave 2 as motor vibration. Set the cutoff between them and the filtered red signal keeps the motion and drops the vibration. Move the cutoff below wave 1 and you remove the real signal too.
Real robots use filters like this on IMUs, force sensors, and encoders. The trade-off is always the same: a lower cutoff gives a smoother signal, but a filter in real time also adds delay.