The moving average

You will learn

Why averaging L samples is a low-pass filter, and where its nulls fall.

Average the last L samples and a tone at f comes out multiplied by |sin(pi f L) / (L sin(pi f))|. For L = 4 that is 1 at DC, 0.65328 at 1/8 of the sample rate and exactly 0 at 1/4: every multiple of 1/L is a null. It needs no multiplier at all, which is why FPGA designs reach for it early. The spec signals.t27 computes the response and the output sample by sample.

Open the interactive lesson →