Forums

DSP Riddle: Infinitely Narrow Notch Filter

Started by Andor May 19, 2006
Fred Marshall wrote:
> "Martin Eisenberg" <martin.eisenberg@udo.edu> wrote in message > news:1148154198.209375@ostenberg.wh.uni-dortmund.de... >> Fred Marshall wrote: >> >>> I am speaking of discrete time / discrete frequency here. >> >> You can't meaningfully use the phrase "infinitely narrow" if >> you're working on a grid. Alternatively, you might take the >> discrete spectrum to specify a continuous spectrum through >> circular sinc interpolation; but prescribing a zero at one grid >> point (and its images) will leave the continuous notch finitely >> wide. > > Martin, > > Why not? It seems I didn't make my point clearly enough. > Make the grid arbitrarily fine. From a constructive point of > view, it's the same thing as making the spacing between points > approach being infinitely small seems to me.
Sorry, indeed I missed that you intended a limiting process. Given that, I believe your post shows what you said it did. (And yes, what underlay my comment is that such limiting basically takes us from a countable specification to an uncountable one.) Martin -- Quidquid latine scriptum sit, altum viditur.
Andor wrote:
> Friends, > > as I wrote down my solution to the riddle, it turned out that the > solution was flawed! I guess we cannot have an infinitely narrow notch > after all. Here is what I wrote: > > > >>Consider the linear transformation H which transforms >>an input sequence x[n] into an output sequence y[n] >>using the following transformation rule: >> >>y[n] = x[n] + c0 x[n-1] + x[n-2] - c0 y[n-1] - y[n-2] (1) >> >>with c0 = - 2 cos(w0). > > >>I will show the proposed properties of the system H directly: >> >>1. H(w) = 1, for w =/= w0, and 0 <= (w, w0) <= pi (thanks Randy). > > > [snip, because unimportant] > > >>2. H(w0) = 0. >>We look at the response of the system to the input sequence >>x[n] = exp(j w0 n). For simplicity, we use an intermediate >>variable u[n], and rewrite (1) as: >> >>u[n] = x[n] + c0 x[n-1] + x[n-2], (1.a) >>y[n] = - c0 y[n-1] - y[n-2] + u[n]. (1.b) >> >>Computing u[n], we get: >>u[n] = exp(j w0 n) + c0 exp(j w0 (n-1) ) + exp(j w0 (n-2)) >>= exp(j w0 (n-1)) ( exp(j w0) + c0 + exp(-j w0) ) >>= exp(j w0 (n-1)) ( 2 cos(w0) + c0) = 0 >> >>where in the last step we used c0 = -2 cos(w0). Since >>u[n] = 0 for all n, so is y[n] (which follows from equation (1.b)). > > > That last comment in brackes is not correct. If u[n] = 0, then by > equation (1.b) we have > > y[n] - 2 cow(w0) y[n-1] + y[n-2] = 0, > > which does _not_ imply y[n] = 0 for all n. In fact, the above is just > the oscillator recursion, any y[n] = A1 exp(- j w0 n) + A2 exp(j w0 n), > where A1 and A2 can be complex, is a solution to the recursion. I guess > the problem is that no initial values of y[n] are defined, and > therefore y[n] is not defined (just as 0 * oo). When we realize > equation (1) for a causal sequence x[n], n >= 0, we will in general get > an oscillation at w0 (depeding on the sequence x[n]). Interestingly, > the amplitude and phase of the oscillation at w0 depends only on the > first two values x[0] and x[1], and not on the rest of the sequence - > these are the remains of the infinitely narrow notch. :-) > > Best regards, > Andor >
The other reason, that's not obfuscated by math, is that an infinitely narrow filter (low-pass as well as notch) would need to run for an infinitely long time to get an answer -- so any filter that's been running for a _finite_ amount of time won't be infinitely narrow. I still stand by my Kalman solution as being the most correct. It violates your unstated assumption of a linear time invariant filter, but that violation is necessary (note that an 'IIR' filter, in general, doesn't have to be either linear or time invariant). -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Tim,

Which of Andor's requirements implied a finite-time filter? 

--Randy

Randy Yates wrote:

> Tim, > > Which of Andor's requirements implied a finite-time filter? > > --Randy >
Well, reality kind of imposes that limitation. All of the discussion except for my suggestion of a Kalman filter got all snarled up in the zero times infinity problems inherent in an infinitely narrow notch filter -- at least if it's a linear time invariant (or shift invariant) filter. Not only does the Kalman sidestep that problem, but it does so in a way that's physically realizable. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html
Tim Wescott wrote:
> Randy Yates wrote: > >> Tim, >> >> Which of Andor's requirements implied a finite-time filter? >> --Randy >> > Well, reality kind of imposes that limitation. > > All of the discussion except for my suggestion of a Kalman filter got > all snarled up in the zero times infinity problems inherent in an > infinitely narrow notch filter -- at least if it's a linear time > invariant (or shift invariant) filter. Not only does the Kalman > sidestep that problem, but it does so in a way that's physically > realizable.
I doubt it. You'd have to show that if it zeroed out 60.0000 Hz, it would pass 60.0001 without attenuation or phase shift. Fat chance! Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
Jerry Avins wrote:
> Tim Wescott wrote: > >>Randy Yates wrote: >> >> >>>Tim, >>> >>>Which of Andor's requirements implied a finite-time filter? >>>--Randy >>> >> >>Well, reality kind of imposes that limitation. >> >>All of the discussion except for my suggestion of a Kalman filter got >>all snarled up in the zero times infinity problems inherent in an >>infinitely narrow notch filter -- at least if it's a linear time >>invariant (or shift invariant) filter. Not only does the Kalman >>sidestep that problem, but it does so in a way that's physically >>realizable. > > > I doubt it. You'd have to show that if it zeroed out 60.0000 Hz, it > would pass 60.0001 without attenuation or phase shift. Fat chance! > > Jerry
Give it 10000 seconds. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Posting from Google? See http://cfaj.freeshell.org/google/ "Applied Control Theory for Embedded Systems" came out in April. See details at http://www.wescottdesign.com/actfes/actfes.html


> > > > I doubt it. You'd have to show that if it zeroed out 60.0000 Hz, it > > would pass 60.0001 without attenuation or phase shift. Fat chance!
> Give it 10000 seconds. >
This should be interesting.... It looks to me it boils down to can Jerry add zeroes to his question faster than Tim can add zeroes to his answer. -jim ----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups ----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Tim Wescott wrote:
> Jerry Avins wrote: > >> Tim Wescott wrote: >> >>> Randy Yates wrote: >>> >>> >>>> Tim, >>>> >>>> Which of Andor's requirements implied a finite-time filter? >>>> --Randy >>>> >>> >>> Well, reality kind of imposes that limitation. >>> >>> All of the discussion except for my suggestion of a Kalman filter got >>> all snarled up in the zero times infinity problems inherent in an >>> infinitely narrow notch filter -- at least if it's a linear time >>> invariant (or shift invariant) filter. Not only does the Kalman >>> sidestep that problem, but it does so in a way that's physically >>> realizable. >> >> >> >> I doubt it. You'd have to show that if it zeroed out 60.0000 Hz, it >> would pass 60.0001 without attenuation or phase shift. Fat chance! >> >> Jerry > > > Give it 10000 seconds. >
Right. If you are the sort of person who needs to know the mains is 60.0000Hz and not 60.0001Hz, I think the need to wait about 3 hours is the least of your problems. :-) Steve
Jerry Avins wrote:
> Tim Wescott wrote: > > Randy Yates wrote: > > > >> Tim, > >> > >> Which of Andor's requirements implied a finite-time filter? > >> --Randy > >> > > Well, reality kind of imposes that limitation. > > > > All of the discussion except for my suggestion of a Kalman filter got > > all snarled up in the zero times infinity problems inherent in an > > infinitely narrow notch filter -- at least if it's a linear time > > invariant (or shift invariant) filter. Not only does the Kalman > > sidestep that problem, but it does so in a way that's physically > > realizable. > > I doubt it. You'd have to show that if it zeroed out 60.0000 Hz, it > would pass 60.0001 without attenuation or phase shift. Fat chance!
Is there a difference between 60.0000 and 60.0001 Hz signal content which you could describe precisely? Is so, then an adaptive filter could use that same description to identify which was present, and remove only first type. For any number of zeros for which you could describe precise identification within the original signal. And if you can't describe the difference, then I don't think your method can show that either an adaptive or an allpass filter doesn't work. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
Tim,

What does reality have to do with this problem? As far as
I can tell, it's posed as a theory question.

I don't mean to demean your Kalman filter solution - it
seems like a good "practical" approach from what I
know about them (which isn't much).

--Randy