DSPRelated.com
Forums

Taps

Started by Jake October 23, 2005
Real_McCoy wrote:
> > "Jake" <wh@ever.com> wrote in message news:435BF765.66DB2BA3@ever.com... > > How many taps does an iir filter have? TIA. > > I never understood the reason for calling it taps or tapped-delay line. To > me it is just an equation - ditto for IIR. > > y(k)=-a1y(k-1)-a2y(k-2)+....-any(k-n) + b0u(k)+b1u(k-1)++...+bmu(k-m) > > why the need to know about taps - the equation is obvious.
So does u(k) need to be stored along with the rest or not? I think that's where the "taps" aspect comes from: how much storage space is required. I'm guessing the number of taps in the equation is n+m+1 but I'm open to revision. Thanks.
in article 435C3651.B7AC8BD@ever.com, Jake at wh@ever.com wrote on
10/23/2005 21:18:

> robert bristow-johnson wrote: >> >> in article 435C0D55.EC248FF3@ever.com, Jake at wh@ever.com wrote on >> 10/23/2005 18:23: >> >>> robert bristow-johnson wrote: >>>> >>>> in article 435BF765.66DB2BA3@ever.com, Jake at wh@ever.com wrote on >>>> 10/23/2005 16:49: >>>> >>>>> How many taps does an iir filter have? TIA. >>>> >>>> gee, i dunno. 40, i guess. maybe 1. >>>> >>>> depends on its order. also depends on whether it has zeros or not. >>>> >>>> gotta be more specific in framing the question. >>> >>> I've read somewhere that the number of taps for an FIR filter is the >>> order plus one (for the current input). Is this right? >> >> yup. i guess. > > You guess? Is dsp a *science* or not?
and your point is? biology is certainly a science, last time i checked. you ask them biologists to verify the theory about some issues of the mechanics of the evolution of life and if they don't add some qualification to their answer, they ain't being sufficiently retrospect.
> Do you have any idea how frustrating it is for a beginner to learn when the > experts can't agree on basic definitions or want to play wordgames whenever > someone asks a legitimate question?
yeah, i have some idea. my bigger concern is the frustration that a beginner (or anyone else) will experience when asking the same question, they get a confident answer "yes, absolutely in all cases the number of taps that an FIR filter has is the order of the filter plus one" and find out later, after getting the answer wrong on a test, that a half-band FIR filter has (order+1)/2 number of taps (and the order better be odd). a simple delay line certainly satisfies the definition of an FIR filter and has one tap, no matter what the order is. it's a legitimate question, but a legitimate answer would have to include some qualification.
> If this was in the FAQ, I wouldn't have to ask, but obviously the FAQ is > deficient.
ya know, perhaps there needs to be a new FAQ. so many things on the FAQ are about either particular commercial DSP products or tools or the "where can i find information about...", where maybe some of the FAQ needs to be a sorta highly digested beginning DSP and linear system theory textbook. ya know, you might want to use wikipedia or Wolfram or some other online resource for those kinda FAQs. and, as before, FWIW. (caveat emptor) -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Jake wrote:
> Jerry Avins wrote: > >>Jake wrote: >> >>>How many taps does an iir filter have? TIA. >> >>none > > > What do you call the stored inputs for output calculation? > > Google search, "iir taps" : 20 hits ( but no explanation :-( )
They are generally thought of as terms on denominator and numerator of the transfer function. Just like the taps in an FIR, the number depends on the design. To maintain numerical stability, it is common to use a cascade of second-order sections. http://bores.com/ has free on-line courses, and "The Scientist and Engineer's Guide to Digital Signal Processing" can be read on line at http://dspguide.com/. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Real_McCoy wrote:
> "Jake" <wh@ever.com> wrote in message news:435BF765.66DB2BA3@ever.com... > >>How many taps does an iir filter have? TIA. > > > I never understood the reason for calling it taps or tapped-delay line. To > me it is just an equation - ditto for IIR. > > y(k)=-a1y(k-1)-a2y(k-2)+....-any(k-n) + b0u(k)+b1u(k-1)++...+bmu(k-m) > > why the need to know about taps - the equation is obvious.
We used to build analog FIRs with tapped L-C delay lines. Just like my slide rules, they still work. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
robert bristow-johnson wrote:

   ...

> yeah, i have some idea. my bigger concern is the frustration that a > beginner (or anyone else) will experience when asking the same question, > they get a confident answer "yes, absolutely in all cases the number of taps > that an FIR filter has is the order of the filter plus one" and find out > later, after getting the answer wrong on a test, that a half-band FIR filter > has (order+1)/2 number of taps (and the order better be odd). a simple > delay line certainly satisfies the definition of an FIR filter and has one > tap, no matter what the order is.
It depends on what you count. It's legitimate to say that a half-band filter has the same as any other filter if the same delay , but that almost half of the coefficients attached to them are zero. If you're going to call them taps at all, and so evoke an L-C or bucket-brigade delay line, then thinking of "taps" and "delay elements" as synonyms makes a lot of sense. The tap is there whether it's used or not. ... Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Thanks, Robert  :-)


robert bristow-johnson wrote:
> > in article 435C3651.B7AC8BD@ever.com, Jake at wh@ever.com wrote on > 10/23/2005 21:18: > > > robert bristow-johnson wrote: > >> > >> in article 435C0D55.EC248FF3@ever.com, Jake at wh@ever.com wrote on > >> 10/23/2005 18:23: > >> > >>> robert bristow-johnson wrote: > >>>> > >>>> in article 435BF765.66DB2BA3@ever.com, Jake at wh@ever.com wrote on > >>>> 10/23/2005 16:49: > >>>> > >>>>> How many taps does an iir filter have? TIA. > >>>> > >>>> gee, i dunno. 40, i guess. maybe 1. > >>>> > >>>> depends on its order. also depends on whether it has zeros or not. > >>>> > >>>> gotta be more specific in framing the question. > >>> > >>> I've read somewhere that the number of taps for an FIR filter is the > >>> order plus one (for the current input). Is this right? > >> > >> yup. i guess. > > > > You guess? Is dsp a *science* or not? > > and your point is? biology is certainly a science, last time i checked. > you ask them biologists to verify the theory about some issues of the > mechanics of the evolution of life and if they don't add some qualification > to their answer, they ain't being sufficiently retrospect. > > > Do you have any idea how frustrating it is for a beginner to learn when the > > experts can't agree on basic definitions or want to play wordgames whenever > > someone asks a legitimate question? > > yeah, i have some idea. my bigger concern is the frustration that a > beginner (or anyone else) will experience when asking the same question, > they get a confident answer "yes, absolutely in all cases the number of taps > that an FIR filter has is the order of the filter plus one" and find out > later, after getting the answer wrong on a test, that a half-band FIR filter > has (order+1)/2 number of taps (and the order better be odd). a simple > delay line certainly satisfies the definition of an FIR filter and has one > tap, no matter what the order is. > > it's a legitimate question, but a legitimate answer would have to include > some qualification. > > > If this was in the FAQ, I wouldn't have to ask, but obviously the FAQ is > > deficient. > > ya know, perhaps there needs to be a new FAQ. so many things on the FAQ are > about either particular commercial DSP products or tools or the "where can i > find information about...", where maybe some of the FAQ needs to be a sorta > highly digested beginning DSP and linear system theory textbook. ya know, > you might want to use wikipedia or Wolfram or some other online resource for > those kinda FAQs. > > and, as before, FWIW. (caveat emptor) > -- > r b-j rbj@audioimagination.com > "Imagination is more important than knowledge."
"Jake" <wh@ever.com> wrote in message news:435BF765.66DB2BA3@ever.com...
> How many taps does an iir filter have? TIA.
Let's get real about the semantics: A "tap" refers to an output of a delay line including the input, the output and any interim-delay point outputs. A delay line with no interim "taps" would still have an input "tap" and an output "tap". So, the minimum number of "taps" - as in the physical model - would be 2 as long as there is a single delay element that has any function in the filter. Now, let's ask about filter equations. Each "tap" as above provides the opportunity to multiply and sum the output of all the taps. The multipliers are called the filter coefficients and are generally evident in the filter equation. A FIR filter only delays, multiplies and sums the inputs. An IIR filter also delays, multiplies and sums the previous outputs. There are a variety of canonic forms. So, the number of "taps" depends on both the equation for the filter and the architectural form that's selected. From a "physical" or block diagram point of view: 1 delay -> 2 "taps" maximum 2 delays -> 3 "taps" maximum Here is a canonic form that raises a question: /---\ /---\ x[k]--------| + |----->-------+------>-----| + |----------> y[k] \---/ | b0 \---/ | | | | +--+--+ | ^ | | ^ | |z^-1 | | | +--+--+ | /---\ | /---\ | + |-----<-------+------>-----| + | \---/ -a1 | b1 \---/ | +--+--+ | | | | | ^ |z^-1 | ^ | +--+--+ | /---\ | /---\ | + |-----<-------+------>-----| + | \---/ -a2 | b2 \---/ | +--+--+ | | | | | ^ |z^-1 | ^ | +--+--+ | /---\ | /---\ | + |-----<-------+------>-----| + | \---/ -a3 | b3 \---/ | +--+--+ | | | | | ^ |z^-1 | ^ | +--+--+ | | | | | | | +-------<-------+------>-------+ -a4 b4 y[k]=b0*x[k] + b1*x[k-1] + ... + a1*y[k-1] + a2*y[k-2] + '''' H(z) =[b0 + b1*z^-1 +b2*z^-2...]/ [1 - a1*z^-1 -a2*z^-2 ...] Since a1 and b1 both operate on the same delay output, is that one tap or two taps? Is a "tap" a delay input or output or is a "tap" such an input/output *combined with* a multiply? One might view it either way. One answer: from the diagram above, count the delays and add one. Another answer: from the diagram above, count the coefficients b0, a1, b1 ....an,bn Fred
Jerry Avins wrote:

> robert bristow-johnson wrote:
(snip regarding taps and digital filters)
> It depends on what you count. It's legitimate to say that a half-band > filter has the same as any other filter if the same delay , but that > almost half of the coefficients attached to them are zero. If you're > going to call them taps at all, and so evoke an L-C or bucket-brigade > delay line, then thinking of "taps" and "delay elements" as synonyms > makes a lot of sense. The tap is there whether it's used or not.
I am not so sure of the history of the word 'taps', but I believe I knew it used on shift registers before I knew about IIR and FIR filters. Even more, consider the days of mercury delay lines for computer memories! (Analog shift registers?) It seems, then, that they should not count as taps if the wires don't come out. In the general sense, though, an IIR filter can be considered as multiplying by zero the value that actually comes out of the shift register. That is, if one wants to build a programmable filter one might build the taps without knowing in advance which terms will be zero. A software version might also multiply by zero. In that case, I think they count. The degree of a polynomial depends on the highest exponent, and doesn't change even if many of the lower coefficients are zero. -- glen
Thanks, Fred  :-)


Fred Marshall wrote:
> > "Jake" <wh@ever.com> wrote in message news:435BF765.66DB2BA3@ever.com... > > How many taps does an iir filter have? TIA. > > Let's get real about the semantics: > > A "tap" refers to an output of a delay line including the input, the output > and any interim-delay point outputs. > A delay line with no interim "taps" would still have an input "tap" and an > output "tap". > So, the minimum number of "taps" - as in the physical model - would be 2 as > long as there is a single delay element that has any function in the filter. > > Now, let's ask about filter equations. Each "tap" as above provides the > opportunity to multiply and sum the output of all the taps. The multipliers > are called the filter coefficients and are generally evident in the filter > equation. > > A FIR filter only delays, multiplies and sums the inputs. > An IIR filter also delays, multiplies and sums the previous outputs. > There are a variety of canonic forms. > > So, the number of "taps" depends on both the equation for the filter and the > architectural form that's selected. > > From a "physical" or block diagram point of view: > 1 delay -> 2 "taps" maximum > 2 delays -> 3 "taps" maximum > > Here is a canonic form that raises a question: > > /---\ /---\ > x[k]--------| + |----->-------+------>-----| + |----------> y[k] > \---/ | b0 \---/ > | | | > | +--+--+ | > ^ | | ^ > | |z^-1 | | > | +--+--+ | > /---\ | /---\ > | + |-----<-------+------>-----| + | > \---/ -a1 | b1 \---/ > | +--+--+ | > | | | | > ^ |z^-1 | ^ > | +--+--+ | > /---\ | /---\ > | + |-----<-------+------>-----| + | > \---/ -a2 | b2 \---/ > | +--+--+ | > | | | | > ^ |z^-1 | ^ > | +--+--+ | > /---\ | /---\ > | + |-----<-------+------>-----| + | > \---/ -a3 | b3 \---/ > | +--+--+ | > | | | | > ^ |z^-1 | ^ > | +--+--+ | > | | | > | | | > +-------<-------+------>-------+ > -a4 b4 > > y[k]=b0*x[k] + b1*x[k-1] + ... + a1*y[k-1] + a2*y[k-2] + '''' > > H(z) =[b0 + b1*z^-1 +b2*z^-2...]/ [1 - a1*z^-1 -a2*z^-2 ...] > > Since a1 and b1 both operate on the same delay output, is that one tap or > two taps? Is a "tap" a delay input or output or is a "tap" such an > input/output *combined with* a multiply? One might view it either way. > > One answer: from the diagram above, count the delays and add one. > > Another answer: from the diagram above, count the coefficients b0, a1, b1 > ....an,bn > > Fred
Fred Marshall wrote:
> "Jake" <wh@ever.com> wrote in message news:435BF765.66DB2BA3@ever.com... > >>How many taps does an iir filter have? TIA. > > > Let's get real about the semantics:
...
> One answer: from the diagram above, count the delays and add one. > > Another answer: from the diagram above, count the coefficients b0, a1, b1 > ....an,bn
... Thanks, Fred. You straightened out my thinking in the subject. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;