Forums

generalized comb filters: help with terminology...

Started by robert bristow-johnson December 6, 2011
okay, we know about comb filters.

    https://ccrma.stanford.edu/~jos/pasp/Comb_Filters.html

the simplest are feedforward comb filters:

    y[n]  =  b_0*x[n]  +  b_M*x[n-M]

    H(z)  =  b_0  +  b_M*z^-M

then there are feedback comb filters:

    y[n]  =  b_0*x[n]  -  a_M*y[n-M]

    H(z)  =  b_0 / (1  +  a_M*z^-M)


now, isn't it still a "comb filter" when you combine the two?

    y[n]  =  b_0*x[n]  +  b_M*x[n-M]  -  a_M*y[n-M]

    H(z)  =  (b_0  + b_M*z^-M) / (1  +  a_M*z^-M)

and, when you observe that, it surely looks like a general 1st-order 
digital filter with z^-1 being replaced by z^-M (forget about the names 
of the coefficients).

so, if you were to generalize this further and create a comb filter as

    H(z)   =   G(z^M)

where G(z) is *any* realizable digital filter, either FIR or IIR, what 
would you call that thing?  i might suggest "Generalized Comb Filter" 
but that hits (using Google) on at least two other uses (that don't seem 
to be very general AFAICT).  one is
    http://arxiv.org/pdf/0707.2436
and there are many papers by this author and the other is
    http://ispl.korea.ac.kr/conference/ICASSP2004/pdfs/0200573.pdf  .

there may be other uses of the term or acronym "GCF".

now we know that *any* realizable G(z) is a comb filter with teeth and 
spaces centered at integer multiples of Nyquist.  if it's a LPF, the 
teeth are at even multiples of Nyquist and if it's an HPF, the teeth are 
at odd multiples of Nyquist.  whether it's an FIR or IIR, there are 
design techniques, like Parks-McClellan for FIR or 
Butterworth/Tchebyshev/Prony/Berchin for IIR, that allows you to design, 
within the constraints of realizability and finite order, pretty much 
whatever shape you want, for a frequency response.  these techniques can 
also be used to design the "teeth" of the comb filter to be whatever 
shape, to the same extent (but you replace z^-1 with z^-M in the 
implementation).

What should this topic be called???!!  Does it have a name?  What 
literature exists out there about this?

any information is appreciated.

-- 

r b-j                  rbj@audioimagination.com

"Imagination is more important than knowledge."



robert bristow-johnson wrote:

> > so, if you were to generalize this further and create a comb filter as > > H(z) = G(z^M)
This is what they call interpolated filters. Combining LPF and HPF comb structures could make for very efficient filters with arbitrary response. Rick Lyons wrote a few articles about it. BTW, you can insert a crude fractional delay approximation instead of z^M; it makes for peculiar results. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On Dec 6, 3:17=A0pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> okay, we know about comb filters. >
> > so, if you were to generalize this further and create a comb filter as > > =A0 =A0 H(z) =A0 =3D =A0 G(z^M) > > where G(z) is *any* realizable digital filter, either FIR or IIR, what > would you call that thing?
Think of this as *delay-scaling* of G(z). Effectively we are looking at the input as M *interleaved* subsequences each being operated on by G(z). For example, if M =3D 3 and the input is x[0], x[1], x[2], x[3], x[4], x[5], x[6], .... then we think of these as 3 interleaved sequences, call them a, b, c where a[0] =3D x[0], a[1] =3D x[3], a[2] =3D x[6], .... b[0] =3D x[1], b[1] =3D x[4], b[2] =3D x[7], .... c[0] =3D x[2], c[1] =3D x[5], c[2] =3D x[8[, ... etc. Each of these is filtered through G(z) as though the others never existed; a, b, c don't interact with each other and the corresponding output sequences continue on their merry way, still interleaved, still not speaking to each other. It is sort of like how Congress works these days (except there are no veto threats!) Dilip Sarwate
On 12/6/11 3:40 PM, Vladimir Vassilevsky wrote:
> > robert bristow-johnson wrote: > >> >> so, if you were to generalize this further and create a comb filter as >> >> H(z) = G(z^M) > > This is what they call interpolated filters.
i dunno, Vlad. who is they?
> Combining LPF and HPF comb structures could make for very efficient > filters with arbitrary response.
well, arbitrary *repeating* response.
> Rick Lyons wrote a few articles about it.
well, if they are that IEEE tips & tricks (or something else), i wouldn't mind a solid reference.
> BTW, you can insert a crude fractional delay approximation instead of > z^M;
that's the idea for audio/music application. and the fractional delay need not be terribly crude. a 16-tap polyphase isn't terribly expensive and can be very good. another way to do it is to use an APF for the fractional delay. but the delay is somewhat frequency dependent, which may or may not be a good thing.
> it makes for peculiar results.
i wonder what the frequency response would look like around Nyquist, because since it's still just a digital filter, there would still have to be symmetry about Nyquist. when M is an integer, the tooth (or space between teeth) lies squarely on top of Nyquist, but that is not the case for non-integer M. so (for non-integer M) you would have to have unequal spacing between the tooth just below Nyquist and the tooth just above. otherwise, i dunno what would be appreciably different if you used a *really* good fractional delay, that z^-M should become very nearly e^(-j*w*M) whether M is an integer or not and it should look like a comb. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."

robert bristow-johnson wrote:

> On 12/6/11 3:40 PM, Vladimir Vassilevsky wrote: > >> >> robert bristow-johnson wrote: >> >>> >>> so, if you were to generalize this further and create a comb filter as >>> >>> H(z) = G(z^M) >> >> >> This is what they call interpolated filters. > > i dunno, Vlad. who is they?
Stupidents ?
>> Combining LPF and HPF comb structures could make for very efficient >> filters with arbitrary response. > > well, arbitrary *repeating* response.
Not only that. You can apply other filters attenuating some comb teeth and emphasising the others, and then combine them. This is the same idea as in the multirate processing, but without changing the sampling rate. The resulting response could be arbitrary; and the implementation could be more efficient then a direct PM design or an FFT.
>> Rick Lyons wrote a few articles about it. > > well, if they are that IEEE tips & tricks (or something else), i > wouldn't mind a solid reference.
It is simple. Just play around it and you will get the idea.
>> BTW, you can insert a crude fractional delay approximation instead of >> z^M; > > that's the idea for audio/music application. and the fractional delay > need not be terribly crude. a 16-tap polyphase isn't terribly expensive > and can be very good.
If the fractional delay is good, then the behavior of such filter is clear. It is interesting to see what happens if the delay approximation is simple and crude; i.e. frequency dependent. another way to do it is to use an APF for the
> fractional delay. but the delay is somewhat frequency dependent, which > may or may not be a good thing.
The accurate approximation of a fractional delay could be demanding while the whole point of interpolated filters is simplification.
>> it makes for peculiar results. > > i wonder what the frequency response would look like around Nyquist, > because since it's still just a digital filter, there would still have > to be symmetry about Nyquist. when M is an integer, the tooth (or space > between teeth) lies squarely on top of Nyquist, but that is not the case > for non-integer M. so (for non-integer M) you would have to have > unequal spacing between the tooth just below Nyquist and the tooth just > above. > > otherwise, i dunno what would be appreciably different if you used a > *really* good fractional delay, that z^-M should become very nearly > e^(-j*w*M) whether M is an integer or not and it should look like a comb.
Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
On 12/6/11 3:45 PM, dvsarwate wrote:
> On Dec 6, 3:17 pm, robert bristow-johnson<r...@audioimagination.com> > wrote: >> >> so, if you were to generalize this further and create a comb filter as >> >> H(z) = G(z^M) >> >> where G(z) is *any* realizable digital filter, either FIR or IIR, what >> would you call that thing? > > Think of this as *delay-scaling* of G(z).
actually, i like to think of it as *frequency-scaling*. instead of teeth at even or odd integer multiples of pi, it can be at integer multiples of an arbitrary w0 << pi (not so much "<<", maybe a "<" and a half).
> Effectively we are > looking at the input as M *interleaved* subsequences each > being operated on by G(z). For example, if M = 3 and > the input is x[0], x[1], x[2], x[3], x[4], x[5], x[6], .... then we > think of these as 3 interleaved sequences, call them a, b, c > where > > a[0] = x[0], a[1] = x[3], a[2] = x[6], .... > b[0] = x[1], b[1] = x[4], b[2] = x[7], .... > c[0] = x[2], c[1] = x[5], c[2] = x[8[, ... > > etc. Each of these is filtered through G(z) as though the > others never existed; a, b, c don't interact with each > other
really? i think that's true only for the feedforward comb, no? lessee, if that were true for the feedback, maybe it could be for integer M and that the states before feedback (indexed 0 to M-1) recirculate. now can it be true for non-integer M (assuming an almost perfect sinc() interpolation)? hmmm...
> and the corresponding output sequences continue > on their merry way, still interleaved, still not speaking to > each other.
... you might be right. not sure about recursive with non-integer M, though (which is my primary interest).
> It is sort of like how Congress works these > days (except there are no veto threats!)
it's worse than that! good grief. i am convinced that they're committing widespread acts of sodomy when they're in session. no doubt. :-\ still groping for an available label for this thing that seems, for semantic purposes, best labeled as "generalized" or "general" comb filters. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Dec 6, 6:58=A0pm, robert bristow-johnson <r...@audioimagination.com>
wrote:

> > ... you might be right. =A0not sure about recursive with non-integer M, > though (which is my primary interest). >
If M is not an integer, what is meant by y[n-M] in
>>y[n] =3D b_0*x[n] - a_M*y[n-M]
Are you upsampling to get fractionally delayed samples?
On 12/6/11 10:42 PM, dvsarwate wrote:
> On Dec 6, 6:58 pm, robert bristow-johnson<r...@audioimagination.com> > wrote: > >> >> ... you might be right. not sure about recursive with non-integer M, >> though (which is my primary interest). >> > > If M is not an integer, what is meant by y[n-M] in > >>> y[n] = b_0*x[n] - a_M*y[n-M] > > Are you upsampling to get fractionally delayed samples?
well, in one sense, yes; but really, no. if D is not an integer, how you get y[n-D] is lessee (assume normalized sampling rate, y[n] = y(n) for integer n.) +inf y(t) = SUM{ y[k] * sinc(t - k) } k=-inf +inf y(n-D) = SUM{ y[k] * sinc(n-D - k) } k=-inf inf = SUM{ y[k] * sinc((k-n) + D) } k=-inf inf = SUM{ y[n+k] * sinc(k+D) } k=-inf inf = SUM{ y[n-M+k] * sinc(k+D-M) } k=-inf where M = floor(D) and the integer part of the delay. 0 <= D-M < 1 is the fractional part of the delay. now we start approximating... K/2 y(n-D) ~= SUM{ y[n+k-M] * sinc(k+D-M) * w((k+D-M)/K) } k=-K/2+1 where w(x/K) is a good window (like a Kaiser) of width K and K is decently large, like 16 or 32. and, for realizability, M > K/2 so, at whatever value of D, i have a delayed value, no matter what the precision is on D. but i can't have an infinite number of h(t) = sinc(t) * w(t/K) values. so, by having a table of uniformly spaced values of h(t), then in that sense, i am upsampling. Dilip, this is kinda fundamentally how i look at sampling and reconstruction, whether is for sample rate conversion (where the D might be moving sorta fast) or for precision delay (where the D is moving slowly). -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Dec 7, 3:09=A0am, robert bristow-johnson <r...@audioimagination.com>
wrote:

In short, when you write

> y[n] =A0=3D =A0b_0*x[n] =A0- =A0a_M*y[n-M]
where *M* is not an integer, a_M*y[n-M] really is a *weighted* sum of various y[n-k] (where both n and k are integers, and k might be both positive and negative). Thus, in reality we have something y[n] =3D b_0*x[n] - sum_{k =3D -i}^{k =3D +i} (c_k)*y[n-k] for appropriately chosen coefficients c_k or y[n] =3D b_0*x[n] - sum_{k =3D 1}^{k =3D i} (c_k)*y[n-k] to keep it causal and not have current output dependent on future outputs. And rather than describe this as a perfectly ordinary IIR filter with transfer function E(z) which is a rational function (ratio of polynomials in z), we choose to write the transfer function as H(z) =3D b_0 / (1 + a_M*z^-M) =3D G(z^M) where G(z) is a rational function of z but H(z) is not because M is not an integer? OK, whatever floats your boat....
On Dec 6, 6:58=A0pm, robert bristow-johnson <r...@audioimagination.com>
wrote:
> On 12/6/11 3:45 PM, dvsarwate wrote: > > > On Dec 6, 3:17 pm, robert bristow-johnson<r...@audioimagination.com> > > wrote: > > >> so, if you were to generalize this further and create a comb filter as > > >>
=A0H(z) =A0 =3D =A0 G(z^M)
> > >> where G(z) is *any* realizable digital filter, either FIR or IIR, what > >> would you call that thing? > > > Think of this as *delay-scaling* of G(z). > > actually, i like to think of it as *frequency-scaling*. =A0instead of > teeth at even or odd integer multiples of pi, it can be at integer > multiples of an arbitrary w0 << pi (not so much "<<", maybe a "<" and a > half). > > > =A0Effectively we are > > looking at the input as M *interleaved* subsequences each > > being operated on by G(z). =A0For example, if M =3D 3 and > > the input is x[0], x[1], x[2], x[3], x[4], x[5], x[6], .... then we > > think of these as 3 interleaved sequences, call them a, b, c > > where > > > a[0] =3D x[0], a[1] =3D x[3], a[2] =3D x[6], .... > > b[0] =3D x[1], b[1] =3D x[4], b[2] =3D x[7], .... > > c[0] =3D x[2], c[1] =3D x[5], c[2] =3D x[8[, ... > > > etc. =A0Each of these is filtered through G(z) as though the > > others never existed; a, b, c don't interact with each > > other > > really? =A0i think that's true only for the feedforward comb, no? =A0less=
ee,
> if that were true for the feedback, maybe it could be for integer M and > that the states before feedback (indexed 0 to M-1) recirculate. =A0now ca=
n
> it be true for non-integer M (assuming an almost perfect sinc() > interpolation)? > > hmmm... > > > and the corresponding output sequences continue > > on their merry way, still interleaved, still not speaking to > > each other. > > ... you might be right. =A0not sure about recursive with non-integer M, > though (which is my primary interest). > > > =A0It is sort of like how Congress works these > > days (except there are no veto threats!) > > it's worse than that! =A0good grief. =A0i am convinced that they're > committing widespread acts of sodomy when they're in session. > > no doubt. > > :-\ > > still groping for an available label for this thing that seems, for > semantic purposes, best labeled as "generalized" or "general" comb filter=
s.
> > -- > > r b-j =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0r...@audioimagination.com > > "Imagination is more important than knowledge."
Robert I wouldn't use GCF as many would think of Greatest Common Factor. How about Canonical Comb Filter? Okay I know CCF sounds like a unit on your natural gas bill. Then you may pick Universal Tine Filter although UTF is in use (I have some in my barn for my tractor), it is not likely to be confused with DSP. Clay p.s. I recall seeing a paper a few years back that used fractional delays in a biquad filter.