DSPRelated.com
Forums

Few taps Filters for FSK?

Started by Brian Reinhold January 9, 2004
On Thu, 15 Jan 2004 10:25:39 -0800, "Fred Marshall"
<fmarshallx@remove_the_x.acm.org> wrote:

> >"Rick Lyons" <r.lyons@REMOVE.ieee.org> wrote in message >news:40067255.50327296@news.west.earthlink.net... >> On Wed, 14 Jan 2004 12:25:05 GMT, "Brian Reinhold" >> <breinhold@comcast.net> wrote: >> >> >Fred, >> > >> >Is there a theorem which states that the time it takes to implement a >filter >> >of width 'x' Hz is 1/x of a second? Some IIR filters seem a lot better >than >> >that, though it does seem that FIR filters are at least proportional to >that >> >value. >> >> Hi Brian, >> >> such a great question, ... the answer of >> which I don't know off the top of my head. >> >> But what I think we should say is that the >> time delay through a linear-phase >> nonrecursive FIR filter is roughly proportional >> to the reciprocal of the filter transition >> region width, and not its passband width. > >Rick, > >The time delay through a linear phase FIR filter is 1/2 the length of the >filter isn't it? Well, it is for a lowpass I believe.
Hi Fred, yep, the delay through a linear-phase nonrecursive FIR filter is the (# of taps -1)/2.
>The transition width in frequency is a function of (is limited in how small >it can be) by what we might call the "principal temporal width" (the >distance over which most of the energy resides). >And, the transition width in time is a function of (is limited in how small >it can be) by what we might call the "principal spectral width" i.e. >"bandwidth".
>Call the sample interval 1.0 seconds / sample rate 1Hz just for convenience. >Actually, I apologize for this because the numbers aren't very typical - >just note that this way everything is normalized to the sample interval and >can be changed by multiplying or dividing by the sample interval. > >Let's say we have a causal linear phase lowpass filter of length 4096 >seconds, N=4096. >The frequency sample interval is 1/4096 Hz.
>Let's make the filter a lowpass with band edge at 256 frequency samples or >256/4096 Hz. >Let's make the frequency transition width be 32 samples or 32/4096 Hz. > >With this, here's what we get: > >The unit sample response will be centered at 2048 seconds and will look like >a sin(kt)/kt. >It will be very small at the ends. > >Then: >- The "principal temporal width" will be determined by the *bandwidth* of >the filter. It will be roughly 4096/256 >= 16 seconds or 256 time samples. >- accordingly, the time transition or step response time will be >approximately 16 seconds. >- the "bulk" delay of the filter will be 2048 seconds as above >- the frequency transition width of the filter, at best, can be >approximately 1/4096 Hz which is the reciprocal of the length of the filter. >We selected 32/4096 so this means that the filter can be shortened from >length 4096 to length 4096/32=128. > >If we simplify this into "sinc cartoons": >- there is a sinc in time that's related to the width of the filter / >bandwidth. >- and, there is a sinc in frequency that's related to the temporal length of >the filter and the transition width in frequency. > >So, you are right if you qualified your statement as follows: >I want a lowpass filter that allows a frequency transition width of 32 >samples out of 4096. >I will design the shortest filter possible to achieve this. >I end up with a filter of length 256 - which has a delay of 128 seconds. >This way I've created a connection between the transition width and the >delay. As a practical matter, this is no doubt often the case because the >transition width can drive the filter design, hence its length, hence its >delay. I guess my point is about cause and effect. If you start with an >adequate length, thus delay, then the transition width doesn't drive the >design and is no longer tied to the delay. The connection is in the design >process and not in the physics. picky, picky, eh? > >... and I'm off by one or two factors of 2 somewhere here!! > > >Now, to the point of this thread about scanning: > >If one is scanning with filter something like the one above, there will be a >delay of the latency or bulk delay type of 2048 seconds. There will also be >a time response of 16 seconds - which is the dwell time necessary to detect >the presence of a signal - which might be viewed as a delay of sorts. > >So, in order to scan effectively, the dwell time needs to be >16 seconds in >a 256/4096 Hz band and the delay will be 2048 seconds (for the long filter) >from the time an "event" occurs and the time we see it at the output. >This suggests a scanner design that would "jump back" 16 "bins" or >16*256/4096 = 1Hz in frequency when a detection occurs .... well something >like that - because the event took place earlier in the scan process. I'm >not being too careful about the numbers here just to convey the ideas. >Caveat lector. > >Fred
Ah Fred. Your language and examples are so lofty, I'm sorry to say that they're above my ability to understand. There are several proposed empirical relationships that give the number of taps (and thus the time, or group, delay) required of a convolutional FIR filter to satisfy desired passband ripple, stopband attenuation, and *frequency-domain* transition region width. In all of those proposed algorithms, the number of taps is inversely proportional to the frequency-domain transition region (the end of passband -to- the beginning of the stopband) width. [-Rick-]
r.lyons@REMOVE.ieee.org (Rick Lyons) writes:

> On Thu, 15 Jan 2004 10:25:39 -0800, "Fred Marshall" > <fmarshallx@remove_the_x.acm.org> wrote: > >> >>"Rick Lyons" <r.lyons@REMOVE.ieee.org> wrote in message >>news:40067255.50327296@news.west.earthlink.net... >>> On Wed, 14 Jan 2004 12:25:05 GMT, "Brian Reinhold" >>> <breinhold@comcast.net> wrote: >>> >>> >Fred, >>> > >>> >Is there a theorem which states that the time it takes to implement a >>filter >>> >of width 'x' Hz is 1/x of a second? Some IIR filters seem a lot better >>than >>> >that, though it does seem that FIR filters are at least proportional to >>that >>> >value. >>> >>> Hi Brian, >>> >>> such a great question, ... the answer of >>> which I don't know off the top of my head. >>> >>> But what I think we should say is that the >>> time delay through a linear-phase >>> nonrecursive FIR filter is roughly proportional >>> to the reciprocal of the filter transition >>> region width, and not its passband width. >> >>Rick, >> >>The time delay through a linear phase FIR filter is 1/2 the length of the >>filter isn't it? Well, it is for a lowpass I believe. > > Hi Fred, > yep, the delay through a linear-phase nonrecursive > FIR filter is the (# of taps -1)/2.
What about this filter: h[0] = 0 h[1] = 0 . . . h[30] = 0 h[31] = 1 ??? This filter has 32 taps and its delay is 32 taps. It is also linear-phase and FIR/nonrecursive. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO
"Randy Yates" <yates@ieee.org> wrote in message
news:oet4a90w.fsf@ieee.org...
> r.lyons@REMOVE.ieee.org (Rick Lyons) writes: > > > On Thu, 15 Jan 2004 10:25:39 -0800, "Fred Marshall" > > <fmarshallx@remove_the_x.acm.org> wrote: > > > >> > >>"Rick Lyons" <r.lyons@REMOVE.ieee.org> wrote in message > >>news:40067255.50327296@news.west.earthlink.net... > >>> On Wed, 14 Jan 2004 12:25:05 GMT, "Brian Reinhold" > >>> <breinhold@comcast.net> wrote: > >>> > >>> >Fred, > >>> > > >>> >Is there a theorem which states that the time it takes to implement a > >>filter > >>> >of width 'x' Hz is 1/x of a second? Some IIR filters seem a lot
better
> >>than > >>> >that, though it does seem that FIR filters are at least proportional
to
> >>that > >>> >value. > >>> > >>> Hi Brian, > >>> > >>> such a great question, ... the answer of > >>> which I don't know off the top of my head. > >>> > >>> But what I think we should say is that the > >>> time delay through a linear-phase > >>> nonrecursive FIR filter is roughly proportional > >>> to the reciprocal of the filter transition > >>> region width, and not its passband width. > >> > >>Rick, > >> > >>The time delay through a linear phase FIR filter is 1/2 the length of
the
> >>filter isn't it? Well, it is for a lowpass I believe. > > > > Hi Fred, > > yep, the delay through a linear-phase nonrecursive > > FIR filter is the (# of taps -1)/2. > > What about this filter: > > h[0] = 0 > h[1] = 0 > . > . > . > h[30] = 0 > h[31] = 1 > > ??? This filter has 32 taps and its delay is 32 taps. It is also > linear-phase and FIR/nonrecursive.
Randy, That's a pathological case which can also be represented by adding h[32]....h[64]=0 so that the delay is half the length. Fred
"Rick Lyons" <r.lyons@REMOVE.ieee.org> wrote in message
news:400732c5.99590703@news.west.earthlink.net...
> On Thu, 15 Jan 2004 10:25:39 -0800, "Fred Marshall" > <fmarshallx@remove_the_x.acm.org> wrote: > > > > >"Rick Lyons" <r.lyons@REMOVE.ieee.org> wrote in message > >news:40067255.50327296@news.west.earthlink.net... > >> On Wed, 14 Jan 2004 12:25:05 GMT, "Brian Reinhold" > >> <breinhold@comcast.net> wrote: > >> > >> >Fred, > >> > > >> >Is there a theorem which states that the time it takes to implement a > >filter > >> >of width 'x' Hz is 1/x of a second? Some IIR filters seem a lot
better
> >than > >> >that, though it does seem that FIR filters are at least proportional
to
> >that > >> >value. > >> > >> Hi Brian, > >> > >> such a great question, ... the answer of > >> which I don't know off the top of my head. > >> > >> But what I think we should say is that the > >> time delay through a linear-phase > >> nonrecursive FIR filter is roughly proportional > >> to the reciprocal of the filter transition > >> region width, and not its passband width. > > > >Rick, > > > >The time delay through a linear phase FIR filter is 1/2 the length of the > >filter isn't it? Well, it is for a lowpass I believe. > > Hi Fred, > yep, the delay through a linear-phase nonrecursive > FIR filter is the (# of taps -1)/2. > > >The transition width in frequency is a function of (is limited in how
small
> >it can be) by what we might call the "principal temporal width" (the > >distance over which most of the energy resides). > >And, the transition width in time is a function of (is limited in how
small
> >it can be) by what we might call the "principal spectral width" i.e. > >"bandwidth". > > >Call the sample interval 1.0 seconds / sample rate 1Hz just for
convenience.
> >Actually, I apologize for this because the numbers aren't very typical - > >just note that this way everything is normalized to the sample interval
and
> >can be changed by multiplying or dividing by the sample interval. > > > >Let's say we have a causal linear phase lowpass filter of length 4096 > >seconds, N=4096. > >The frequency sample interval is 1/4096 Hz. > > >Let's make the filter a lowpass with band edge at 256 frequency samples
or
> >256/4096 Hz. > >Let's make the frequency transition width be 32 samples or 32/4096 Hz. > > > >With this, here's what we get: > > > >The unit sample response will be centered at 2048 seconds and will look
like
> >a sin(kt)/kt. > >It will be very small at the ends. > > > >Then: > >- The "principal temporal width" will be determined by the *bandwidth* of > >the filter. It will be roughly 4096/256 > >= 16 seconds or 256 time samples. > >- accordingly, the time transition or step response time will be > >approximately 16 seconds. > >- the "bulk" delay of the filter will be 2048 seconds as above > >- the frequency transition width of the filter, at best, can be > >approximately 1/4096 Hz which is the reciprocal of the length of the
filter.
> >We selected 32/4096 so this means that the filter can be shortened from > >length 4096 to length 4096/32=128. > > > >If we simplify this into "sinc cartoons": > >- there is a sinc in time that's related to the width of the filter / > >bandwidth. > >- and, there is a sinc in frequency that's related to the temporal length
of
> >the filter and the transition width in frequency. > > > >So, you are right if you qualified your statement as follows: > >I want a lowpass filter that allows a frequency transition width of 32 > >samples out of 4096. > >I will design the shortest filter possible to achieve this. > >I end up with a filter of length 256 - which has a delay of 128 seconds. > >This way I've created a connection between the transition width and the > >delay. As a practical matter, this is no doubt often the case because
the
> >transition width can drive the filter design, hence its length, hence its > >delay. I guess my point is about cause and effect. If you start with an > >adequate length, thus delay, then the transition width doesn't drive the > >design and is no longer tied to the delay. The connection is in the
design
> >process and not in the physics. picky, picky, eh? > > > >... and I'm off by one or two factors of 2 somewhere here!! > > > > > >Now, to the point of this thread about scanning: > > > >If one is scanning with filter something like the one above, there will
be a
> >delay of the latency or bulk delay type of 2048 seconds. There will also
be
> >a time response of 16 seconds - which is the dwell time necessary to
detect
> >the presence of a signal - which might be viewed as a delay of sorts. > > > >So, in order to scan effectively, the dwell time needs to be >16 seconds
in
> >a 256/4096 Hz band and the delay will be 2048 seconds (for the long
filter)
> >from the time an "event" occurs and the time we see it at the output. > >This suggests a scanner design that would "jump back" 16 "bins" or > >16*256/4096 = 1Hz in frequency when a detection occurs .... well
something
> >like that - because the event took place earlier in the scan process.
I'm
> >not being too careful about the numbers here just to convey the ideas. > >Caveat lector. > > > >Fred > > Ah Fred. Your language and examples are so lofty, > I'm sorry to say that they're above my ability to > understand. > > There are several proposed empirical relationships > that give the number of taps (and thus the time, or > group, delay) > required of a convolutional FIR filter > to satisfy desired passband ripple, stopband attenuation, and > *frequency-domain* transition region width. > > In all of those proposed algorithms, the number of taps > is inversely proportional to the frequency-domain > transition region (the end of passband -to- the > beginning of the stopband) width.
Rick, Yes, we agree. If you use a design method that involves those parameters then the connection is made. This makes sense because it goes to the shortest filter possible. I was just saying that it isn't *necessarily* this way. It's only because of the design approach. The design methods you mention are going to the question: "How long a filter must I have in order to meet these specs?" or, equivalently: "How short a filter can meet these specs?" Right? Kaiser's expression also includes the ripple values..... The transition width defines the *minimum* length and therefore the *minimum* delay. But the transition width of a filter doesn't necessarily reveal the actual length or the delay of any filter - because the length and the delay can be bigger than that minimum. That is, you could have a filter that's longer than necessary to meet the transition width specs - then the connection is broken. For example, I could define a very long lowpass filter using some very arbitrary method (or even a not-arbitrary method) and it would still have: - the time sinc-like main lobe width inversely proportional to the bandwidth - a bulk delay of half the length - and only if the length is shortened to meet a particular transition band width is the length and the transition width related. For a real practical example, one could design a low ripple filter in the passband, with a very wide transition and very high stop band attenuation that would be a long filter. All of the coefficients in the long filter would go to yield the passband and stopband ripples - so that the transition band doesn't dominate the design. I think that's right. It might be overkill and it might not. A length 16 filter designed with PM with passband 0 - 0.16666 and stopband 0.33333 - 0.5 with equal weights yields a ripple around -48 dB and a length 32 filter with the same specs yields a ripple around -89 dB. The transition band spec remains fixed while the delay doubles. Fred
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> writes:

> "Randy Yates" <yates@ieee.org> wrote in message > news:oet4a90w.fsf@ieee.org... >> r.lyons@REMOVE.ieee.org (Rick Lyons) writes: >> >> > On Thu, 15 Jan 2004 10:25:39 -0800, "Fred Marshall" >> > <fmarshallx@remove_the_x.acm.org> wrote: >> > >> >> >> >>"Rick Lyons" <r.lyons@REMOVE.ieee.org> wrote in message >> >>news:40067255.50327296@news.west.earthlink.net... >> >>> On Wed, 14 Jan 2004 12:25:05 GMT, "Brian Reinhold" >> >>> <breinhold@comcast.net> wrote: >> >>> >> >>> >Fred, >> >>> > >> >>> >Is there a theorem which states that the time it takes to implement a >> >>filter >> >>> >of width 'x' Hz is 1/x of a second? Some IIR filters seem a lot > better >> >>than >> >>> >that, though it does seem that FIR filters are at least proportional > to >> >>that >> >>> >value. >> >>> >> >>> Hi Brian, >> >>> >> >>> such a great question, ... the answer of >> >>> which I don't know off the top of my head. >> >>> >> >>> But what I think we should say is that the >> >>> time delay through a linear-phase >> >>> nonrecursive FIR filter is roughly proportional >> >>> to the reciprocal of the filter transition >> >>> region width, and not its passband width. >> >> >> >>Rick, >> >> >> >>The time delay through a linear phase FIR filter is 1/2 the length of > the >> >>filter isn't it? Well, it is for a lowpass I believe. >> > >> > Hi Fred, >> > yep, the delay through a linear-phase nonrecursive >> > FIR filter is the (# of taps -1)/2. >> >> What about this filter: >> >> h[0] = 0 >> h[1] = 0 >> . >> . >> . >> h[30] = 0 >> h[31] = 1 >> >> ??? This filter has 32 taps and its delay is 32 taps. It is also >> linear-phase and FIR/nonrecursive. > > Randy, > > That's a pathological case which can also be represented by adding > h[32]....h[64]=0 so that the delay is half the length.
Agreed. OK then how about this: h[-3] = 3 h[-2] = 2 h[-1] = 1 h[+0] = 0 h[+1] = 1 h[+2] = 2 h[+3] = 3 This filter is linear-phase and non-recursive, but it's delay is 0, not 3*Ts. Perhaps we could modify our statement to "A symmetric (and thus linear-phase) FIR filter has a delay corresponding to the reflection point of the impulse response"? One might be tempted to simply add "causal" to the original definition, but what about cases like: h[+0] = 0 h[+1] = 0 h[+2] = 0 h[+3] = 0 h[+4] = 3 h[+5] = 2 h[+6] = 1 h[+7] = 0 h[+8] = 1 h[+9] = 2 h[+A] = 3 ?? This filter would, by most people's standards, be called an 11-tap filter, but it's delay is not 5 but rather 7. Right? (I think...) -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO
Randy Yates <yates@ieee.org> writes:
> [...]
I've only worked this out in my head (so it may be WRONG), but isn't it also true that linear phase does not imply symmetric impulse response? That is, not restricting the filter to FIR, this is true, right? For if we convolve a zero-phase filter with a fractional-delay filter, we will necessarily (for non-integer-sample-period delays) have an IIR. Can it be proven that a linear-phase FIR filter MUST be symmetric? -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO
Randy Yates <yates@ieee.org> writes:

> [...] > For if we convolve a zero-phase filter with a > fractional-delay filter, we will necessarily (for non-integer-sample-period > delays) have an IIR.
... that is non-symmetric. -- % Randy Yates % "...the answer lies within your soul %% Fuquay-Varina, NC % 'cause no one knows which side %%% 919-577-9882 % the coin will fall." %%%% <yates@ieee.org> % 'Big Wheels', *Out of the Blue*, ELO
Randy Yates wrote:

> Randy Yates <yates@ieee.org> writes:
> Can it be proven that a linear-phase FIR filter MUST be symmetric?
Yes, but I can't think of how right now. The the converse is true -- a symmetric filter (even IIR) is necessarily linear phase -- is so obvious as to hardly need proof. Think about passing a signal forward and backward through the same asymmetric, wild-phase filter. 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;
"Randy Yates" <yates@ieee.org> wrote in message
news:wu7s9did.fsf@ieee.org...
> > Can it be proven that a linear-phase FIR filter MUST be symmetric?
Hello Randy, Parks & McClellan give a proof in one of their early papers that a linear phase filter must have definite parity. I.e., it is either symmetric or antisymmetric. Clay
On Fri, 16 Jan 2004 03:01:04 GMT, Randy Yates <yates@ieee.org> wrote:

  (snipped)
>> >> Hi Fred, >> yep, the delay through a linear-phase nonrecursive >> FIR filter is the (# of taps -1)/2. > >What about this filter: > >h[0] = 0 >h[1] = 0 >. >. >. >h[30] = 0 >h[31] = 1 > >??? This filter has 32 taps and its delay is 32 taps. It is also >linear-phase and FIR/nonrecursive.
Oh shoot. Another "Yates Trick Question"!! Neat. Isn't its delay 31 samples (instead of 32)? I'll have to think about how that filter could have linear phase. Sheece. [-Rick-]