DSPRelated.com
Forums

Half sinc IIR?

Started by Bob Cain January 30, 2004
Does anybody know if there is an IIR that will generate a
half sinc, i.e. the part from the peak to infinity, in
response to an impulse?


Thanks,

Bob
-- 

"Things should be described as simply as possible, but no
simpler."

                                             A. Einstein
Bob Cain wrote:
> > Does anybody know if there is an IIR that will generate a > half sinc, i.e. the part from the peak to infinity, in > response to an impulse?
I don't believe that this can be done with just an IIR. However, since sinc (x) == { sin (x)/x x != 1 { 1 x == 1 a sine oscillator based on the rotating phasor idea (in the comp.dsp FAQ I think) could generate the sine part and then all you need to do is emulate the tapering. Not a straight IIR, but very close. Erik -- +-----------------------------------------------------------+ Erik de Castro Lopo nospam@mega-nerd.com (Yes it's valid) +-----------------------------------------------------------+ "I've got an idea! Sun, Oracle, and IBM hold down MS while Linux gets to kick them!" -- Lou Grinzo on LinuxToday.com
I know there is an FIR!  :-)
(well, maybe not infinity, but approximated to a given degree)

"Bob Cain" <arcane@arcanemethods.com> wrote in message
news:401AEB80.D000686C@arcanemethods.com...
> > Does anybody know if there is an IIR that will generate a > half sinc, i.e. the part from the peak to infinity, in > response to an impulse? > > > Thanks, > > Bob
"Bob Cain" <arcane@arcanemethods.com> wrote in message
news:401AEB80.D000686C@arcanemethods.com...
> Does anybody know if there is an IIR that will generate a > half sinc, i.e. the part from the peak to infinity, in > response to an impulse?
There isn't really -- stable IIR impulse responses must eventually decay exponentially -- you can't do the 1/x decay that sinc has. Why do you want a half sinc?

Matt Timmermans wrote:
> > "Bob Cain" <arcane@arcanemethods.com> wrote in message > news:401AEB80.D000686C@arcanemethods.com... > > Does anybody know if there is an IIR that will generate a > > half sinc, i.e. the part from the peak to infinity, in > > response to an impulse? > > There isn't really -- stable IIR impulse responses must eventually decay > exponentially -- you can't do the 1/x decay that sinc has.
Hmm, that does come as a surprise (and probably shouldn't.) Have to think about it.
> > Why do you want a half sinc?
I was thinking to avoid the windowed approximation to get closer to a real brick wall in the non-real-time situations where I can process the data first forward and then backward in time. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein

Bob Cain wrote:
> > I was thinking to avoid the windowed approximation to get > closer to a real brick wall in the non-real-time situations > where I can process the data first forward and then backward > in time.
Which, on reconsideration, means I asked the wrong question, but you get the idea. Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein
In article <bdFSb.6882$qU3.630604@news20.bellglobal.com>,
Matt Timmermans <mt0000@sympatico.nospam-remove.ca> wrote:
> >"Bob Cain" <arcane@arcanemethods.com> wrote in message >news:401AEB80.D000686C@arcanemethods.com... >> Does anybody know if there is an IIR that will generate a >> half sinc, i.e. the part from the peak to infinity, in >> response to an impulse? > >There isn't really -- stable IIR impulse responses must eventually >decay exponentially -- you can't do the 1/x decay that sinc has.
The sin(x) can be produced by an IIR. The next 1/x for small dx can be approximated by a Newton-Raphson iteration or two of about similar computational complexity to an IIR step. How many bits of accuracy do you need? IMHO. YMMV. -- Ron Nicholson rhn AT nicholson DOT com http://www.nicholson.com/rhn/ #include <canonical.disclaimer> // only my own opinions, etc.
"Ronald H. Nicholson Jr." <rhn@mauve.rahul.net> wrote in message
news:bvfga0$497$1@blue.rahul.net...
> The sin(x) can be produced by an IIR. The next 1/x for small dx > can be approximated by a Newton-Raphson iteration or two of about > similar computational complexity to an IIR step. > > How many bits of accuracy do you need?
Calculating 1/x is not hard, but you can't *convolve* an input of unbounded length with the right half of 1/x using *finite memory* for the state.
"Bob Cain" <arcane@arcanemethods.com> wrote in message
news:401B368B.A010C761@arcanemethods.com...
> Bob Cain wrote: > > > > I was thinking to avoid the windowed approximation to get > > closer to a real brick wall in the non-real-time situations > > where I can process the data first forward and then backward > > in time. > > Which, on reconsideration, means I asked the wrong question, > but you get the idea.
Yes, you want a causal brick-wall filter, which don't really exist either. If you can process forwards and backwards, then you can use a high order IIR. The final result after both passes would be linear phase, except that the result of the first pass is infinitely long, and you would have to process that infinitely long tail with the reverse pass. Here's an idea on how you could cheat: If you stop the forward pass abruptly when all further input is 0, you should be able to simulate generating that infinite tail and then consuming it in the opposite direction, because the state variables of the reverse direction filter at that point can be derived from a simple linear combination of the state variables of the forward filter. Then you can just continue with the reverse filtering using that calculated state. This way you can get have linear phase from a high order IIR without a bunch of extra work. It would be interesting to see how closely the resulting impulse response resembles a sinc!

Matt Timmermans wrote:
> > "Ronald H. Nicholson Jr." <rhn@mauve.rahul.net> wrote in message > news:bvfga0$497$1@blue.rahul.net... > > The sin(x) can be produced by an IIR. The next 1/x for small dx > > can be approximated by a Newton-Raphson iteration or two of about > > similar computational complexity to an IIR step. > > > > How many bits of accuracy do you need? > > Calculating 1/x is not hard, but you can't *convolve* an input of unbounded > length with the right half of 1/x using *finite memory* for the state.
So we are right back to the same essential problem. FWIW, what I should have been looking for is a function, implementable by an IIR, whose autocorrelation is a sinc. There, now that (I think) I've stated it properly I realize I haven't a clue if it exists or how to find it. :-( Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein