To make post-processing easier, I export scope measurements as CSV files, which are then post-processed (mostly in Microsoft Excel, which is not the best tool for the job, but it is all I have at my disposal).
One of the post processing used is a simple moving average, and I was wondering how it does transform the source measurement. I expect it to behave similarly to a low-pass filter, but I guess it is not the same. Hence, my question.
I am specifically looking for a Bode plot. Thanks in advance.
Answer
The frequency response of the moving average is called the asinc or psinc, the aliased sinc or periodic sinc (sinc for cardinal sine), or the Dirichlet function.
Since the sum of the moving average filter coefficients is equal to one, it preserves constant signal, hence is somewhat lowpass. When the length $N=2$, the shape in the frequency domain is shaped like a cosine, hence decreasing.
Otherwise, it ripplles in the frequency domain. When the length is even, the amplification at Nyquist is $0$, when odd, of $1/N$, as shown below:
So it's globally lowpass, not the best, but one of the fastest to compute, allowing fast recursive computations.
No comments:
Post a Comment