- Announcement about May 10th, 2018 update and your password.
Until now, I have used simple moving average filtering to suppress noise from sensor signals because it is easy to implement. Although it is good for signal processing because it has no overshot and constant phase delay its transfer function is not ideal. It has large "humps" in the stop band.
I think a well designed FIR or IIR filter can do much better and give better stop band attenuation for the same delay. Unfortunatelly, the propeller is not the best choice for general FIR or IIR filters because multiplications are expensive, at least for PASM implementations required for high speed.
Does anybody know a good "trick" for improved low pass filtering? Cascade multiple moving average filters? Clever adjustment of the coefficiens of an IIR filter so that only a few shifts/adds would do?
I have a PID control loop with a noisy sensor input signal. A larger averaging window size reduces the noise but also adds delay which is not good for the stability of the PID loop. I have to find the best compromise of low noise vs. delay. I have no influence on the analogue side of the sensor circuit. The sensor is "digital" i.e. has a built-in ADC. I receive the values via serial communication with 20kHz sample rate and 12 bits resolution.