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
noncausal all-pass
Started by ●July 20, 2010
Reply by ●July 20, 20102010-07-20
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 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
Reply by ●July 20, 20102010-07-20
On Jul 20, 9:30�pm, Tim Wescott <t...@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.htmlTim, 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? Pawel
Reply by ●July 20, 20102010-07-20
On 07/20/2010 01:50 PM, Pawel wrote:> On Jul 20, 9:30 pm, Tim Wescott<t...@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 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
Reply by ●July 20, 20102010-07-20
On Jul 20, 10:22�pm, Tim Wescott <t...@seemywebsite.com> wrote:> On 07/20/2010 01:50 PM, Pawel wrote: > > > > > On Jul 20, 9:30 pm, Tim Wescott<t...@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.htmlI 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
Reply by ●July 20, 20102010-07-20
On 07/20/2010 02:45 PM, Pawel wrote:> On Jul 20, 10:22 pm, Tim Wescott<t...@seemywebsite.com> wrote: >> On 07/20/2010 01:50 PM, Pawel wrote: >> >> >> >>> On Jul 20, 9:30 pm, Tim Wescott<t...@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? > > PawelThat'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
Reply by ●July 20, 20102010-07-20
On Jul 20, 11:25�pm, Tim Wescott <t...@seemywebsite.com> wrote:> On 07/20/2010 02:45 PM, Pawel wrote: > > > > > On Jul 20, 10:22 pm, Tim Wescott<t...@seemywebsite.com> �wrote: > >> On 07/20/2010 01:50 PM, Pawel wrote: > > >>> On Jul 20, 9:30 pm, Tim Wescott<t...@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.htmlOk, 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
Reply by ●July 20, 20102010-07-20
On 07/20/2010 03:35 PM, Pawel wrote:> On Jul 20, 11:25 pm, Tim Wescott<t...@seemywebsite.com> wrote: >> On 07/20/2010 02:45 PM, Pawel wrote: >> >> >> >>> On Jul 20, 10:22 pm, Tim Wescott<t...@seemywebsite.com> wrote: >>>> On 07/20/2010 01:50 PM, Pawel wrote: >> >>>>> On Jul 20, 9:30 pm, Tim Wescott<t...@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
Reply by ●July 21, 20102010-07-21
On Jul 21, 8:04=A0am, Pawel <prulikow...@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)=3Dz^-N[A(z^-1)/ > A(z)]. The problem that I am trying to solve do not easily tolerate N > sample delay z^-N. > 1. =A0 =A0 =A0So 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. =A0 =A0 =A0Therefore my H_1=3DA(z^-1)/A(z), now how do I find inverse =of it> H_1inv=3DA(z)/A(z^-1). =A01/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. =A0 =A0 =A0How do I invert filter H_1? > 4. =A0 =A0 =A0What would be pitfalls when I would try to implement this i=n> reality for offline processing =96 I know that there might be some > problems with initial conditions in forward filtering? > > Regards > > PawelThe 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
Reply by ●July 22, 20102010-07-22
On Jul 21, 7:30=A0am, HardySpicer <gyansor...@gmail.com> wrote:> On Jul 21, 8:04=A0am, Pawel <prulikow...@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)=3Dz^-N[A(z^-1)=/> > A(z)]. The problem that I am trying to solve do not easily tolerate N > > sample delay z^-N. > > 1. =A0 =A0 =A0So I thought that it might be possible to express all-pas=s 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. =A0 =A0 =A0Therefore my H_1=3DA(z^-1)/A(z), now how do I find invers=e of it> > H_1inv=3DA(z)/A(z^-1). =A01/A(z^-1) will be unstable since its poles wi=ll> > 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. =A0 =A0 =A0How do I invert filter H_1? > > 4. =A0 =A0 =A0What would be pitfalls when I would try to implement this=in> > reality for offline processing =96 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.. > > HardyThank You very much for all Your replies.






