0

I am not familiar with this halfband filter implementation: input is feed into two paths: the upper path is simply same as input, say x0, x1, x2, etc. The lower path is a halfband filter coefficients (every other coeff is 0), say y0, y1, y2, etc. Then the output is picked between upper and lower alternatively. That is, the output would look like x0, y0, x1, y1, x2, y2, ... etc. Note x0, x1, ... is the input and the upper path output.

So the top path is a downsample-by-2 of the input. The bottom path is a delay-by-1 of a halfband filter output. The combined output is not a halfband filter. Maybe I missed something why this structure is still called "halfband filter"?

Thanks

hbf
  • 13
  • 4
  • Your description is confusing, as you first say "the upper path is simply same as input, say x0, x1, x2, etc." but then you later say "the top path is a downsample-by-2 of the input." which would then be x0, x2, x4 ... or x1, x3, x5 ... Can you correct your description to make it clearer what you are referring to? – Dan Boschen May 11 '21 at 22:12
  • sorry for the confusion. Let me clear it a bit: input is x0, x1, x2, .... Output is x0, y0, x1, y1, x2, y2,... where y1, y2, ... are output from the HBF for input x0, x1, x2,... – hbf May 11 '21 at 22:43
  • The rates don't seem to match or I am still confused--- y0,y1,y2 is half the rate of x0,x1,x2 so how does that get resolved in terms of the output timing? – Dan Boschen May 11 '21 at 22:48
  • Now I am not sure what you referred to "output timing". Yes, y0, y1, is after the halfband filter. There is a switch picking either the upper path (x0, x1, ...) and lower path (y0, y1,...). So you missed the switch? – hbf May 11 '21 at 22:52
  • I understand there is a switch. Is the output of the halfband filter decimated by two? The output will also be delayed based on the length of the half band filter, which would be a significant delay compared to the main path if the upper path is simply passed through. Do you have a further reference as to where this filter you are describing originated and the application context? It seems like it is attempting to be an interpolate by 2 upsampler. – Dan Boschen May 11 '21 at 22:55
  • (If the filter were such that it would provide the interpolated value between x0 and x1, and between x1 and x2 etc then that would make sense) – Dan Boschen May 11 '21 at 22:58
  • Oh I see where you are confused. No, I don't see the HBF is decimated by 2. There is no further delay either. I don't have any reference materials on this architecture. Actually that's what I got confused too. But just in case someone had seen this before. – hbf May 11 '21 at 23:00
  • There has to be delay in the HBF-- if it has a symmetric number of taps (with every other one zero) the delay will be half the total number of taps including the zeros). You say you don't have any reference materials, so where are you seeing this filter or how did you come across it? Can you provide the coefficients? – Dan Boschen May 11 '21 at 23:03
  • well, the HBF is a normal one: odd number of coeffs, every other one is zero, etc. The delay you referred to can be handled in the upper path by inserting leading zeros to align with HBF output. That is fine. So putting the delay aside, the filter is not an HBF. I read this from some older papers – hbf May 11 '21 at 23:08
  • well that is exactly the detail that wasn’t clear- if the top path is delay compensated then this is a simple 2x interpolator – Dan Boschen May 11 '21 at 23:12
  • I wish I could provide all details and references :-). But why this is a "simple 2x interpolator"? Is the HBF itself already sufficient for a 2x interpolator? In other words, why x0, x1, ... in the final output? – hbf May 11 '21 at 23:16
  • The half band hasn’t done anything to increase the rate- it is just filtering your input signal to half it’s bandwidth but for every input you get one output so input and output are at the same rate. If the filter could provide the interpolated value between the x inputs then this is exactly what you need to increase the sampling rate in addition to the output commutator which you have. If you can provide the coefficients, I can be even clearer if it still isn't clear yet. – Dan Boschen May 11 '21 at 23:19
  • Ah I see. you meant interpolation plus the original input samples. So it should not be called a HBF and should be more accurately called interpolator. Of course, lots of details aren't shown in the original text. So let's say this is an interpolator then. – hbf May 11 '21 at 23:23
  • I added a graphic, it should be really clear. Yes call it an interpolator, but the half band filter can efficiently provide a 1/2 sample delay offset since every other coefficient would be zero. – Dan Boschen May 11 '21 at 23:29
  • Yup, got it. Thanks for clearing it up the naming in my original post. – hbf May 11 '21 at 23:30

1 Answers1

1

This is just a 2x interpolator: the delay between the top path and bottom path are 1/2 a sample offset at the input rate such that the half band output is providing the expected interpolated value in between each or the input samples to provide a 2x up-sampled output.

In the graphic below to help make this very clear, the blue samples represent the original waveform x[n] after a fixed number of sample processing delay. The red samples are the output of the interpolation filter, providing the same waveform with an additional 1/2 sample delay (which can be done easily by using an even number of taps and half-band filter). Then the output commutator selects from each providing the upsampled waveform at twice the input rate.

interpolation

Below I posted existing slides I already have of this process as a Half Band Decimator which combines the Half Band Construction with Polyphase decomposition. The interpolator is formed in same fashion by reversing this, as in feeding the filter and the delay and commuting the output between the two. The major significance in doing this is that we run all filter elements at half the clock rate after the polyphase transformation:

Starting with a 7 tap Half Band Filter where as in the typical half band construction we place the taps to coincide with the zeros of the Sinc impulse response to minimize number of coefficients:

Half Band Filter

Next we do the polyphase decomposition by mapping rows to columns as given with the decimate by 2 (2 polyphase filters) below:

HB Polyphase Decomposition

Which then reduces to the simplified form below: reduced polyphase

Given the symmetric taps, we can further simplify this to be:

simplified polyphase

And the same in a more general form:

general form

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135