Prev: Obtaining band-pass/stop coeffiecients from low/high-pass
Next: Signals on FFT bins, and Windowing
From: Tim Wescott on 20 Jul 2010 18:25 On 07/20/2010 02:45 PM, Pawel wrote: > On Jul 20, 10:22 pm, Tim Wescott<t...(a)seemywebsite.com> wrote: >> On 07/20/2010 01:50 PM, Pawel wrote: >> >> >> >>> On Jul 20, 9:30 pm, Tim Wescott<t...(a)seemywebsite.com> wrote: >>>> On 07/20/2010 01:04 PM, Pawel wrote: >> >>>>> Dear All, >> >>>>> Maybe one of You Gurus would be able to shed to confirm (or criticise) >>>>> my way of thinking. I am not DSP expert I am just trying to use DSP >>>>> methods in other fields of science. >>>>> My question relate to an all-pass filter structure: H(z)=z^-N[A(z^-1)/ >>>>> A(z)]. The problem that I am trying to solve do not easily tolerate N >>>>> sample delay z^-N. >>>>> 1. So I thought that it might be possible to express all-pass function >>>>> as a cascade of anti-causal FIR filter A(z^-1) and causal IIR 1/A(z) >>>>> effectively eliminating the excess delay z^-N that it is there to only >>>>> make A(z^-1) causal. My application is offline so it can be >>>>> implemented as a backward filtering? >>>>> 2. Therefore my H_1=A(z^-1)/A(z), now how do I find inverse of it >>>>> H_1inv=A(z)/A(z^-1). 1/A(z^-1) will be unstable since its poles will >>>>> be inside the unit circle (A(z^-1) zeros where inside the circle), >>>>> however I can resort again to the noncausal filtering and treat >>>>> A(z^-1) as causal that would give me a stable filter? >>>>> 3. How do I invert filter H_1? >>>>> 4. What would be pitfalls when I would try to implement this in >>>>> reality for offline processing � I know that there might be some >>>>> problems with initial conditions in forward filtering? >> >>>> What are you really trying to do? >> >>>> By definition, a useful all-pass filter has delay, at least at some >>>> frequencies. It must, because a slope in the phase of a filter's >>>> transfer function in the frequency domain translates to a delay (or >>>> prediction) in the time domain. So the best that you can do is to run >>>> your all-pass filter in just one direction, then shift the answer (which >>>> you can do because you're running off line) to get the least overall >>>> delay, or the least delay "where it matters". >> >>>> Note that this problem with allpass vs. phase delay is evinced a bit if >>>> you think about your question 2: Work out the math, and you'll find >>>> that H_1 * H_1inv is the only no-delay allpass filter in existence: H = 1. >> >>>> -- >> >>>> Tim Wescott >>>> Wescott Design Serviceshttp://www.wescottdesign.com >> >>>> Do you need to implement control loops in software? >>>> "Applied Control Theory for Embedded Systems" was written for you. >>>> See details athttp://www.wescottdesign.com/actfes/actfes.html >> >>> Tim, >> >>> Foremost thanks a lot for reply. >>> My application is in the area of microwave engineering and microwave >>> filter design. I am working on an algortihm that allows to include >>> some defficiences of the transmission lines of which filter is built >>> to be included in the design procedure and their influence >>> eliminated. >> >>> Anyway, I do not want zero delay but I want to retain only nonlinear >>> portion of the all-pass phase shift - z^-N is an artifact coming from >>> the fact that usually one is interested in the causal filter. Would my >>> concept as outlined in the question 1 retain this nonlinear phase >>> shift or I am misinterpreting something? >> >> What is A(z) in your definition above? I ask, because the "control >> engineer's formulation" of an IIR filter would have >> >> A(z) = a_N * z^N + ... + a_1 * z + a_0, >> >> while the "DSP engineer's formulation" of an IIR filter would have >> >> A(z) = a_N / z^N + ... + a_1 / z + a_0. >> >> In the former case, A(1/z) would have a be perfectly causal, if delayed. >> In the latter case A(1/z) would, indeed, have substantial lead that >> would have to be corrected with the z^-N term. You could leave it off >> if you're not interested in causality. >> >> -- >> >> Tim Wescott >> Wescott Design Serviceshttp://www.wescottdesign.com >> >> Do you need to implement control loops in software? >> "Applied Control Theory for Embedded Systems" was written for you. >> See details athttp://www.wescottdesign.com/actfes/actfes.html > > I define A(z) as a_0+a_1z^-1+a_2z^-2+...+a_Nz^-N - which of those > above mentioned cases would it be - forgive me my stupid question? > > Pawel That's the "DSP Engineer's formulation". -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
From: Pawel on 20 Jul 2010 18:35 On Jul 20, 11:25 pm, Tim Wescott <t...(a)seemywebsite.com> wrote: > On 07/20/2010 02:45 PM, Pawel wrote: > > > > > On Jul 20, 10:22 pm, Tim Wescott<t...(a)seemywebsite.com> wrote: > >> On 07/20/2010 01:50 PM, Pawel wrote: > > >>> On Jul 20, 9:30 pm, Tim Wescott<t...(a)seemywebsite.com> wrote: > >>>> On 07/20/2010 01:04 PM, Pawel wrote: > > >>>>> Dear All, > > >>>>> Maybe one of You Gurus would be able to shed to confirm (or criticise) > >>>>> my way of thinking. I am not DSP expert I am just trying to use DSP > >>>>> methods in other fields of science. > >>>>> My question relate to an all-pass filter structure: H(z)=z^-N[A(z^-1)/ > >>>>> A(z)]. The problem that I am trying to solve do not easily tolerate N > >>>>> sample delay z^-N. > >>>>> 1. So I thought that it might be possible to express all-pass function > >>>>> as a cascade of anti-causal FIR filter A(z^-1) and causal IIR 1/A(z) > >>>>> effectively eliminating the excess delay z^-N that it is there to only > >>>>> make A(z^-1) causal. My application is offline so it can be > >>>>> implemented as a backward filtering? > >>>>> 2. Therefore my H_1=A(z^-1)/A(z), now how do I find inverse of it > >>>>> H_1inv=A(z)/A(z^-1). 1/A(z^-1) will be unstable since its poles will > >>>>> be inside the unit circle (A(z^-1) zeros where inside the circle), > >>>>> however I can resort again to the noncausal filtering and treat > >>>>> A(z^-1) as causal that would give me a stable filter? > >>>>> 3. How do I invert filter H_1? > >>>>> 4. What would be pitfalls when I would try to implement this in > >>>>> reality for offline processing I know that there might be some > >>>>> problems with initial conditions in forward filtering? > > >>>> What are you really trying to do? > > >>>> By definition, a useful all-pass filter has delay, at least at some > >>>> frequencies. It must, because a slope in the phase of a filter's > >>>> transfer function in the frequency domain translates to a delay (or > >>>> prediction) in the time domain. So the best that you can do is to run > >>>> your all-pass filter in just one direction, then shift the answer (which > >>>> you can do because you're running off line) to get the least overall > >>>> delay, or the least delay "where it matters". > > >>>> Note that this problem with allpass vs. phase delay is evinced a bit if > >>>> you think about your question 2: Work out the math, and you'll find > >>>> that H_1 * H_1inv is the only no-delay allpass filter in existence: H = 1. > > >>>> -- > > >>>> Tim Wescott > >>>> Wescott Design Serviceshttp://www.wescottdesign.com > > >>>> Do you need to implement control loops in software? > >>>> "Applied Control Theory for Embedded Systems" was written for you. > >>>> See details athttp://www.wescottdesign.com/actfes/actfes.html > > >>> Tim, > > >>> Foremost thanks a lot for reply. > >>> My application is in the area of microwave engineering and microwave > >>> filter design. I am working on an algortihm that allows to include > >>> some defficiences of the transmission lines of which filter is built > >>> to be included in the design procedure and their influence > >>> eliminated. > > >>> Anyway, I do not want zero delay but I want to retain only nonlinear > >>> portion of the all-pass phase shift - z^-N is an artifact coming from > >>> the fact that usually one is interested in the causal filter. Would my > >>> concept as outlined in the question 1 retain this nonlinear phase > >>> shift or I am misinterpreting something? > > >> What is A(z) in your definition above? I ask, because the "control > >> engineer's formulation" of an IIR filter would have > > >> A(z) = a_N * z^N + ... + a_1 * z + a_0, > > >> while the "DSP engineer's formulation" of an IIR filter would have > > >> A(z) = a_N / z^N + ... + a_1 / z + a_0. > > >> In the former case, A(1/z) would have a be perfectly causal, if delayed. > >> In the latter case A(1/z) would, indeed, have substantial lead that > >> would have to be corrected with the z^-N term. You could leave it off > >> if you're not interested in causality. > > >> -- > > >> Tim Wescott > >> Wescott Design Serviceshttp://www.wescottdesign.com > > >> Do you need to implement control loops in software? > >> "Applied Control Theory for Embedded Systems" was written for you. > >> See details athttp://www.wescottdesign.com/actfes/actfes.html > > > I define A(z) as a_0+a_1z^-1+a_2z^-2+...+a_Nz^-N - which of those > > above mentioned cases would it be - forgive me my stupid question? > > > Pawel > > That's the "DSP Engineer's formulation". > > -- > > Tim Wescott > Wescott Design Serviceshttp://www.wescottdesign.com > > Do you need to implement control loops in software? > "Applied Control Theory for Embedded Systems" was written for you. > See details athttp://www.wescottdesign.com/actfes/actfes.html Ok, Just to summarise - so my idea of filtering as presented in question 1 makes sense (?) and it is possible to implement such formulated filter as noncausal (fir anticausal and iir causal) to eliminate z^-N or is it better to filter with causal all-pass filter and later correct for the delay by backshifting with z^N? Pawel
From: Tim Wescott on 20 Jul 2010 20:12 On 07/20/2010 03:35 PM, Pawel wrote: > On Jul 20, 11:25 pm, Tim Wescott<t...(a)seemywebsite.com> wrote: >> On 07/20/2010 02:45 PM, Pawel wrote: >> >> >> >>> On Jul 20, 10:22 pm, Tim Wescott<t...(a)seemywebsite.com> wrote: >>>> On 07/20/2010 01:50 PM, Pawel wrote: >> >>>>> On Jul 20, 9:30 pm, Tim Wescott<t...(a)seemywebsite.com> wrote: >>>>>> On 07/20/2010 01:04 PM, Pawel wrote: >> >>>>>>> Dear All, >> >>>>>>> Maybe one of You Gurus would be able to shed to confirm (or criticise) >>>>>>> my way of thinking. I am not DSP expert I am just trying to use DSP >>>>>>> methods in other fields of science. >>>>>>> My question relate to an all-pass filter structure: H(z)=z^-N[A(z^-1)/ >>>>>>> A(z)]. The problem that I am trying to solve do not easily tolerate N >>>>>>> sample delay z^-N. >>>>>>> 1. So I thought that it might be possible to express all-pass function >>>>>>> as a cascade of anti-causal FIR filter A(z^-1) and causal IIR 1/A(z) >>>>>>> effectively eliminating the excess delay z^-N that it is there to only >>>>>>> make A(z^-1) causal. My application is offline so it can be >>>>>>> implemented as a backward filtering? >>>>>>> 2. Therefore my H_1=A(z^-1)/A(z), now how do I find inverse of it >>>>>>> H_1inv=A(z)/A(z^-1). 1/A(z^-1) will be unstable since its poles will >>>>>>> be inside the unit circle (A(z^-1) zeros where inside the circle), >>>>>>> however I can resort again to the noncausal filtering and treat >>>>>>> A(z^-1) as causal that would give me a stable filter? >>>>>>> 3. How do I invert filter H_1? >>>>>>> 4. What would be pitfalls when I would try to implement this in >>>>>>> reality for offline processing � I know that there might be some >>>>>>> problems with initial conditions in forward filtering? >> >>>>>> What are you really trying to do? >> >>>>>> By definition, a useful all-pass filter has delay, at least at some >>>>>> frequencies. It must, because a slope in the phase of a filter's >>>>>> transfer function in the frequency domain translates to a delay (or >>>>>> prediction) in the time domain. So the best that you can do is to run >>>>>> your all-pass filter in just one direction, then shift the answer (which >>>>>> you can do because you're running off line) to get the least overall >>>>>> delay, or the least delay "where it matters". >> >>>>>> Note that this problem with allpass vs. phase delay is evinced a bit if >>>>>> you think about your question 2: Work out the math, and you'll find >>>>>> that H_1 * H_1inv is the only no-delay allpass filter in existence: H = 1. >> >>>>>> -- >> >>>>>> Tim Wescott >>>>>> Wescott Design Serviceshttp://www.wescottdesign.com >> >>>>>> Do you need to implement control loops in software? >>>>>> "Applied Control Theory for Embedded Systems" was written for you. >>>>>> See details athttp://www.wescottdesign.com/actfes/actfes.html >> >>>>> Tim, >> >>>>> Foremost thanks a lot for reply. >>>>> My application is in the area of microwave engineering and microwave >>>>> filter design. I am working on an algortihm that allows to include >>>>> some defficiences of the transmission lines of which filter is built >>>>> to be included in the design procedure and their influence >>>>> eliminated. >> >>>>> Anyway, I do not want zero delay but I want to retain only nonlinear >>>>> portion of the all-pass phase shift - z^-N is an artifact coming from >>>>> the fact that usually one is interested in the causal filter. Would my >>>>> concept as outlined in the question 1 retain this nonlinear phase >>>>> shift or I am misinterpreting something? >> >>>> What is A(z) in your definition above? I ask, because the "control >>>> engineer's formulation" of an IIR filter would have >> >>>> A(z) = a_N * z^N + ... + a_1 * z + a_0, >> >>>> while the "DSP engineer's formulation" of an IIR filter would have >> >>>> A(z) = a_N / z^N + ... + a_1 / z + a_0. >> >>>> In the former case, A(1/z) would have a be perfectly causal, if delayed. >>>> In the latter case A(1/z) would, indeed, have substantial lead that >>>> would have to be corrected with the z^-N term. You could leave it off >>>> if you're not interested in causality. >> >>>> -- >> >>>> Tim Wescott >>>> Wescott Design Serviceshttp://www.wescottdesign.com >> >>>> Do you need to implement control loops in software? >>>> "Applied Control Theory for Embedded Systems" was written for you. >>>> See details athttp://www.wescottdesign.com/actfes/actfes.html >> >>> I define A(z) as a_0+a_1z^-1+a_2z^-2+...+a_Nz^-N - which of those >>> above mentioned cases would it be - forgive me my stupid question? >> >>> Pawel >> >> That's the "DSP Engineer's formulation". >> >> -- >> >> Tim Wescott >> Wescott Design Serviceshttp://www.wescottdesign.com >> >> Do you need to implement control loops in software? >> "Applied Control Theory for Embedded Systems" was written for you. >> See details athttp://www.wescottdesign.com/actfes/actfes.html > > Ok, > Just to summarise - so my idea of filtering as presented in question 1 > makes sense (?) and it is possible to implement such formulated filter > as noncausal (fir anticausal and iir causal) to eliminate z^-N or is > it better to filter with causal all-pass filter and later correct for > the delay by backshifting with z^N? I think it'll prove easier to implement the all-pass as a causal filter -- basically you'll be able to do the usual direct-form (whatever) as a causal filter, then after the fact you can backshift the data by whatever amount seems optimal. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
From: HardySpicer on 21 Jul 2010 02:30 On Jul 21, 8:04 am, Pawel <prulikow...(a)gmail.com> wrote: > Dear All, > > Maybe one of You Gurus would be able to shed to confirm (or criticise) > my way of thinking. I am not DSP expert I am just trying to use DSP > methods in other fields of science. > My question relate to an all-pass filter structure: H(z)=z^-N[A(z^-1)/ > A(z)]. The problem that I am trying to solve do not easily tolerate N > sample delay z^-N. > 1. So I thought that it might be possible to express all-pass function > as a cascade of anti-causal FIR filter A(z^-1) and causal IIR 1/A(z) > effectively eliminating the excess delay z^-N that it is there to only > make A(z^-1) causal. My application is offline so it can be > implemented as a backward filtering? > 2. Therefore my H_1=A(z^-1)/A(z), now how do I find inverse of it > H_1inv=A(z)/A(z^-1). 1/A(z^-1) will be unstable since its poles will > be inside the unit circle (A(z^-1) zeros where inside the circle), > however I can resort again to the noncausal filtering and treat > A(z^-1) as causal that would give me a stable filter? > 3. How do I invert filter H_1? > 4. What would be pitfalls when I would try to implement this in > reality for offline processing I know that there might be some > problems with initial conditions in forward filtering? > > Regards > > Pawel The answer is yes you can. This is not a new idea and has been used in a few papers for more complex systems. eg here http://www.springerlink.com/content/617jaakplgmnx3a7/ and many similar papers.. Hardy
From: Pawel on 22 Jul 2010 07:11 On Jul 21, 7:30 am, HardySpicer <gyansor...(a)gmail.com> wrote: > On Jul 21, 8:04 am, Pawel <prulikow...(a)gmail.com> wrote: > > > > > Dear All, > > > Maybe one of You Gurus would be able to shed to confirm (or criticise) > > my way of thinking. I am not DSP expert I am just trying to use DSP > > methods in other fields of science. > > My question relate to an all-pass filter structure: H(z)=z^-N[A(z^-1)/ > > A(z)]. The problem that I am trying to solve do not easily tolerate N > > sample delay z^-N. > > 1. So I thought that it might be possible to express all-pass function > > as a cascade of anti-causal FIR filter A(z^-1) and causal IIR 1/A(z) > > effectively eliminating the excess delay z^-N that it is there to only > > make A(z^-1) causal. My application is offline so it can be > > implemented as a backward filtering? > > 2. Therefore my H_1=A(z^-1)/A(z), now how do I find inverse of it > > H_1inv=A(z)/A(z^-1). 1/A(z^-1) will be unstable since its poles will > > be inside the unit circle (A(z^-1) zeros where inside the circle), > > however I can resort again to the noncausal filtering and treat > > A(z^-1) as causal that would give me a stable filter? > > 3. How do I invert filter H_1? > > 4. What would be pitfalls when I would try to implement this in > > reality for offline processing I know that there might be some > > problems with initial conditions in forward filtering? > > > Regards > > > Pawel > > The answer is yes you can. This is not a new idea and has been used in > a few papers for more complex systems. > eg here > > http://www.springerlink.com/content/617jaakplgmnx3a7/ > > and many similar papers.. > > Hardy Thank You very much for all Your replies.
First
|
Prev
|
Pages: 1 2 Prev: Obtaining band-pass/stop coeffiecients from low/high-pass Next: Signals on FFT bins, and Windowing |