# Symmetric half band filter - redundant oversampling?

I'm making a basic symmetric decimating half band filter (M=2), with alternating 0 coefficients. The signal is oversampled by a factor of 2, at frequency $$f$$. I must be missing something simple, but it seems like the oversampling is redundant as the samples are never used in the output of the FIR filter.

I've tried to illustrate with a 5-tap scheme below in a ring buffer. The subscripts are to keep track of the values, and if it has an asterix, it's involved in the calculation for the output.

$$t_0: x_a^* | x_e^*|x_d|x_c^*|x_b \rightarrow y_0 = b_0x_a+b_2x_c+b_4x_e\\ t_1 : x_a | x_f|x_d|x_c|x_b \rightarrow \times\\ t_2 : x_a^* | x_f|x_g^*|x_c^*|x_b \rightarrow y_1 = b_0x_g + b_2x_a+b_4x_c$$

At $$t_0$$, $$x_a$$ has been placed in the buffer, and going backwards through the indices in steps of two (as the intermediate coefficient is 0) then uses $$x_c$$ and $$x_e$$. At $$t_1$$, sample $$x_f$$ is placed in the buffer, replacing $$x_e$$; no calculation is done as we're decimating. At $$t_2$$, $$x_g$$ replaces $$x_d$$, and then $$x_c$$ and $$x_a$$ are in the calculation for the output.

So, it seems that the 2X oversampled samples, like $$x_b$$ and $$x_d$$, are never used for any output as they are always multiplied by 0. Are they redundant in this case, and therefore is it possible just to sample at $$\frac{f}{2}$$ and not decimate? (I'm sure this can't be correct!)

• You have to consider the effect on noise when oversampling. Commented Dec 2, 2022 at 8:44
• @Irreducible - of course, the oversampling was just to ease the AA filter requirement a bit. However, that doesn't answer my query: it seems that, due to the 0 coefficients, I don't need to collect the 2X oversampled samples as they never contribute to the output. Thoughts on that? It might just be a property of the filter so we can have our cake and eat it :) Commented Dec 2, 2022 at 20:53

The oversampling at the input to the filter is not redundant. What may be missed is that the data at the input will move through the filter one sample at a time at the input rate. Thus data that is zero'd on one clock sample will be necessary on the next. Further the center coefficient (and the two adjacent coefficients) are all non-zero in the half-band filter with odd length. An odd length half band filter design results in every other coefficients being zeroed beyond the center three coefficients.

• Thanks for your answer Dan. I'm fine with the samples progressing through the buffer a sample at at time, but with reference to the ring buffer I gave in the question, I still can't see how any "odd" sample $x_{2n-1}$ is multiplied with a non-zero even coefficient $b_{2n}$ because they both progress at the same rate? If you have time, could you illustrate this? I've tried drawing it, doing it algebraically, and come to the same result, so clearly I'm missing something basic! :) Commented Dec 3, 2022 at 8:52
• The center tap and the two adjacent taps are not zero’d in the odd length half band filter (which results in zeros at every other sample otherwise), is that what you are missing? Commented Dec 3, 2022 at 12:39
• Dan, yes, thanks - that was the problem! I didn't spot the two consecutive non-zero coefficients - knew it was something silly. Thanks for the help! :) Commented Dec 3, 2022 at 19:55
• I'll add that in the answer specifically since it was that which answered your question. All makes sense now, I see exactly how you could have come to that conclusion. Commented Dec 3, 2022 at 19:57