DSPRelated.com
Forums

How to implement 0 phase IIR in real time?

Started by zaitax September 2, 2011
On Fri, 02 Sep 2011 22:45:51 -0500, zaitax wrote:

>>On 9/2/2011 8:46 AM, Tim Wescott wrote: >>> On Fri, 02 Sep 2011 07:27:18 -0500, zaitax wrote: >>> >>>> Hi all, >>>> >>>> Is there a way to implement 0 phase IIR in real time? Filtfilt in > matlab >>>> could implement,but it is non real time. Now I want to let a signal >>>> through the PEQ filter without phase delay,I've thought a lot of >>>> ways, but no one can achieve real time. Please help me. >>> >>> Step 1: Move to a different universe. >>> >>> Step 2: Enjoy! >>> >>> (No, you can't make a zero-delay filter. You can't make a zero delay >>> filter because that implies having portions of it see into the future. >>> If you could do _that_, you'd be making tons of money on the stock >>> market, not messing around with DSP.) >>> >>> >>Tim, >> >>He didn't say zero delay. He said zero phase. .. and then he mentioned >>"phase delay" whatever that is. :-) >> >>Well, maybe that means something to him that's different from what we >>might assume. >> >>zaitax, >> >>Depending on what you're really trying to accomplish I would suggest >>something like this: >> >>1) if you mean zero delay then Tim is right. >> >>2) if you mean zero phase then just tweak your clock (i.e. time > reference) >> >>3) if you mean zero phase *difference* over frequency then use a linear >>phase FIR filter perhaps. After all this would be a fixed delay and a >>fixed delay is the only realizable thing you can get. >> >>4) if you don't have to operate in real time then you might use a linear >>phase, centered at t=0 (whatever that means) FIR filter so there is >>"zero delay" in the context of that filter. This is simply changing >>your time reference as in (2) above. >> >>Fred >> >> > Hi all, > > I am doing in a KTV system, which required through PEQ
Whoa! Abbreviation overload! You must be young -- please don't dump any but the most common abbreviations on us without disambiguation (i.e., limit yourself to IIR, FIR, and FFT).
> filter without > phase distortion, but the total system delay is required very low, so I > want to make a zero delay PEQ. I thought put the PEQ IIR into linear > phase FIR, but that would require a lot of order for FIR, the delay will > be high. Who can tell me there is another way to reduce delay? > > In addition, zero phase filter should not be zero delay? If there is a > delay, input and output signal phase difference will be not zero.
There are filters called "zero phase" but that's "zero phase when you're working off line". You cannot have a zero delay filter that actually does something, because it's impulse response would have to be symmetrical around zero time, leading to the need for a filter with time- predicting elements -- hence my (admittedly wise-ass) suggestion to try it out in a different universe.
> I recently read a paper "Design Method of Digital Filter with Zero Phase > Based on All Phase", he said in all phase method to design a zero phase > filter, but when I according to his method using MATLAB simulation, gets > the linear phase FIR filter, delay of FIR will have a phase difference > between input and output, how he got zero phase? I was confused.
Again, he probably got his zero phase after the fact. -- www.wescottdesign.com
On Sep 2, 10:46&#4294967295;pm, robert bristow-johnson <r...@audioimagination.com>
wrote:

>..... design the magnitude specs at 1/2 the number of dB originally > intended....
That is indeed an unusual design specification! So, design the filter to have the square root of each specified magnitude? Shades of root-raised-cosine filters!
On 9/3/2011 7:44 AM, Rune Allnor wrote:

   ...

> Read up on badic systems theory.
That's basic systems theory. Jerry -- Engineering is the art of making what you want from things you can get.
On 9/3/11 9:56 PM, dvsarwate wrote:
> On Sep 2, 10:46 pm, robert bristow-johnson<r...@audioimagination.com> > wrote: > >> ..... design the magnitude specs at 1/2 the number of dB originally >> intended.... > > That is indeed an unusual design specification! So, design the > filter to have the square root of each specified magnitude?
yes. because, as with filtfilt(), you're running it through the filter twice. once forward in time (the regular filter) and again backwards (but then time-reversing the result). so if the filter attenuates some frequency by 1 dB when it filters the data once, it attenuates it by 2 dB when you filter it twice. for the shelving and peaking EQ filters, it just means to set the knobs to 1/2 the number of dB boost or cut as originally intended. if the bandedges are defined to be at the mid-dB points, then the shape of running it twice will, qualitatively, appear about the same as the shap of running it once (but with twice the dB in the spec). -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On 4 Sep, 04:00, Jerry Avins <j...@ieee.org> wrote:
> On 9/3/2011 7:44 AM, Rune Allnor wrote: > > &#4294967295; &#4294967295;... > > > Read up on badic systems theory. > > That's basic systems theory.
It is indeed. I haven't become very good friends with my touch phone keypad... Rune
On 9/4/2011 7:26 AM, Rune Allnor wrote:
> On 4 Sep, 04:00, Jerry Avins<j...@ieee.org> wrote: >> On 9/3/2011 7:44 AM, Rune Allnor wrote: >> >> ... >> >>> Read up on badic systems theory. >> >> That's basic systems theory. > > It is indeed. I haven't become very good friends > with my touch phone keypad...
I just wanted to assure zaitax that he didn't have a new word to learn. Actually, I like your new word. I wish I could fine a goodic use for it. Jerry -- Engineering is the art of making what you want from things you can get.