As a low-math jack-of-all-trades, when the July 2005 DspStore monthly newsletter http://www.dspstore.com/$Newsletter/e-newsletters/July2005.asp?ID=41294# arrived by email with an article "TechOnLine - Digital Filters An Introduction" at http://www.techonline.com/community/related_content/20365 by Iain A. Robin which explained the shape of the maths for common filters, I was much impressed. Perhaps nobody has said it so clearly because "everyone knows that". Interested, I followed the link to his site http://www.dsptutor.freeuk.com/ which directed me to http://www.prosig.com/signal-processing/ where an article http://www.prosig.com/signal-processing/PhaselessFiltering.html "REMOVING PHASE DELAY USING PHASELESS FILTERING" by running a file of samples thru a filter, then running the resulting sample file thru the filter in reverse sample order to flatten group delay. What a preamble. I hope credit is given to the correct parties. Now, the question is, could something like this process be achieved in relatively real-time? I vaguely envisage small overlapped reverse scanned buffers with windowing to reduce glitch artefacts. This of course is a rather mechanical approach, a more elegant mathematical solution is to be preferred. Possibly some limitations on filter complexity or passband & stopband shape may have to be accepted. I am uncertain of the complexity level, but imagine it to be similar to the better music time-stretch/pitch shift algorithms, a good example of which is to be found in the "Amazing Slow Downer" at http://www.ronimusic.com. Worth a test. I think that technique for phaseless filtering, once invented, would become a significant DSP function block which would sit up there near FFT's. Comments? Jim Adamthwaite.
Phaeless filtering
Started by ●July 29, 2005
Reply by ●July 29, 20052005-07-29
Jim Adamthwaite wrote:> As a low-math jack-of-all-trades, when the July 2005 DspStore monthly > newsletter > > http://www.dspstore.com/$Newsletter/e-newsletters/July2005.asp?ID=41294# > > arrived by email with an article > > "TechOnLine - Digital Filters An Introduction" > > at http://www.techonline.com/community/related_content/20365 > > by Iain A. Robin which explained the shape of the maths for common filters, > I was much impressed. Perhaps nobody has said it so clearly because > "everyone knows that". Interested, I followed the link to his site > > http://www.dsptutor.freeuk.com/ > > which directed me to > > http://www.prosig.com/signal-processing/ > > where an article > > http://www.prosig.com/signal-processing/PhaselessFiltering.html > > "REMOVING PHASE DELAY USING PHASELESS FILTERING" > > by running a file of samples thru a filter, then running the resulting > sample file thru the filter in reverse sample order to flatten group delay. > > > What a preamble. I hope credit is given to the correct parties. > > Now, the question is, could something like this process be achieved in > relatively real-time? I vaguely envisage small overlapped reverse scanned > buffers with windowing to reduce glitch artefacts. This of course is a > rather mechanical approach, a more elegant mathematical solution is to be > preferred. > > Possibly some limitations on filter complexity or passband & stopband shape > may have to be accepted. > > I am uncertain of the complexity level, but imagine it to be similar to the > better music time-stretch/pitch shift algorithms, a good example of which is > to be found in the "Amazing Slow Downer" at http://www.ronimusic.com. Worth > a test. > > I think that technique for phaseless filtering, once invented, would become > a significant DSP function block which would sit up there near FFT's. > > Comments? > Jim Adamthwaite.The filters used are IIR: infinite impulse response. Infinite only in theory, though. In practice, the output of a stable filter decays asymptotically to zero with zero input, and after a while becomes smaller than can be represented. At that point, the response ends (assuming no limit cycle). To avoid messing up the signal, you need to include that tail in the reverse-direction filtering operation. There are other difficulties, but that alone rules out real time. There is a simple alternative, though: a symmetrical FIR -- finite impulse response -- filter. They have no phase distortion either. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 29, 20052005-07-29
Um... OK. Sorry about the Phaeless filtering, spell checking don't work too well in that box. Jim A.
Reply by ●July 29, 20052005-07-29
Reply by ●July 29, 20052005-07-29
"Jim Adamthwaite" <secad@netspace.net.au> wrote in message news:dcdcrl$178r$1@otis.netspace.net.au...> Um... OK. > > Sorry about the Phaeless filtering, spell checking don't work too well in > that box. > Jim A.That's been an annoyance to me for some time--the fact that MS Outlook Express doesn't spell check the Subject line (whereas Outlook does). So you end up with misspellings where it is most obvious! -- Jon Harris SPAM blocker in place: Remove 99 (but leave 7) to reply
Reply by ●July 29, 20052005-07-29
Jim wrote:> Now, the question is, could something like this process be achieved in > relatively real-time? I vaguely envisage small overlapped reverse scanned > buffers with windowing to reduce glitch artefacts. This of course is a > rather mechanical approach, a more elegant mathematical solution is to be > preferred.Yes, the algorithm can be run in real-time. It is implemented in this box (as you can read on the second side of the 212kB PDF brochure): http://www.weiss.ch/eq1/images/brochureEQ1-LP.PDF> I think that technique for phaseless filtering, once invented, would become > a significant DSP function block which would sit up there near FFT's.There have been a number of arguments in the past about the pros and cons of linear-phase filters (search the archives if this interests you), specifically when used in audio processing. I do believe they have their place, but they aren't such an universal tool like the FFT. Regards, Andor
Reply by ●July 29, 20052005-07-29
"Jerry Avins" <jya@ieee.org> wrote in message news:9_OdnRi-UfH2v3ffRVn-tw@rcn.net...> Jim Adamthwaite wrote: >> As a low-math jack-of-all-trades, when the July 2005 DspStore monthly >> newsletter >> >> http://www.dspstore.com/$Newsletter/e-newsletters/July2005.asp?ID=41294# >> >> arrived by email with an article >> >> "TechOnLine - Digital Filters An Introduction" >> >> at http://www.techonline.com/community/related_content/20365 >> >> by Iain A. Robin which explained the shape of the maths for common >> filters, >> I was much impressed. Perhaps nobody has said it so clearly because >> "everyone knows that". Interested, I followed the link to his site >> >> http://www.dsptutor.freeuk.com/ >> >> which directed me to >> >> http://www.prosig.com/signal-processing/ >> >> where an article >> >> http://www.prosig.com/signal-processing/PhaselessFiltering.html >> >> "REMOVING PHASE DELAY USING PHASELESS FILTERING" >> >> by running a file of samples thru a filter, then running the resulting >> sample file thru the filter in reverse sample order to flatten group >> delay. >> >> >> What a preamble. I hope credit is given to the correct parties. >> >> Now, the question is, could something like this process be achieved in >> relatively real-time? I vaguely envisage small overlapped reverse >> scanned >> buffers with windowing to reduce glitch artefacts. This of course is a >> rather mechanical approach, a more elegant mathematical solution is to be >> preferred. >> >> Possibly some limitations on filter complexity or passband & stopband >> shape >> may have to be accepted. >> >> I am uncertain of the complexity level, but imagine it to be similar to >> the >> better music time-stretch/pitch shift algorithms, a good example of which >> is >> to be found in the "Amazing Slow Downer" at http://www.ronimusic.com. >> Worth >> a test. >> >> I think that technique for phaseless filtering, once invented, would >> become >> a significant DSP function block which would sit up there near FFT's. >> >> Comments? >> Jim Adamthwaite. > > The filters used are IIR: infinite impulse response. Infinite only in > theory, though. In practice, the output of a stable filter decays > asymptotically to zero with zero input, and after a while becomes smaller > than can be represented. At that point, the response ends (assuming no > limit cycle). To avoid messing up the signal, you need to include that > tail in the reverse-direction filtering operation. There are other > difficulties, but that alone rules out real time. > > There is a simple alternative, though: a symmetrical FIR -- finite impulse > response -- filter. They have no phase distortion either. > > JerryI might describe what's in that reference as follows: 1) Filter a block of data using an IIR filter. 2) Filter the resulting output in reverse direction through the same IIR filter. In order to do this, you need to decide when the output of the filter "stops" relative to the size of the input block. Otherwise, you will compute forever and wait forever. Having made the decision when the output stops, you have defined a FIR filter that has a truncated version of the IIR filter. Since there were no constraints mentioned regarding the IIR filter and because IIR filters don't normally have linear phase / constant delay with frequency, running the output in the opposite direction through the so-defined FIR filter is the same as running the output straight through a reversed version of the FIR filter EXCEPT in the first case the output is reversed relative to the original input. So, you might want to reverse the filter instead of the data. If you reverse the filter instead of the data for the second pass, then it's as though there are two FIR filters in series. This suggests that you might combine their impulse responses into a single impulse response. Assuming that the impulse response decays then you might want to put the reversed filter first, followed by the original - in order to get a more "well behaved" impulse response. Either way, it becomes a symmetrical FIR filter that has linear phase and *does* have delay in the normal way of defining delay. If you want to define the reversed precursor part of the filter output as happening at negative times then you can define the filter as having zero delay. That's up to your own convention for assigning time indices. Fred
Reply by ●July 30, 20052005-07-30
hi guyz. i'm finally back home in the Green Mountains (actually i'm 30 meters above sea level by the Lake). in article HLudnTGmWJVOGHffRVn-tg@centurytel.net, Fred Marshall at fmarshallx@remove_the_x.acm.org wrote on 07/29/2005 15:34:> I might describe what's in that reference as follows: > > 1) Filter a block of data using an IIR filter. > 2) Filter the resulting output in reverse direction through the same IIR > filter. > In order to do this, you need to decide when the output of the filter > "stops" relative to the size of the input block. Otherwise, you will > compute forever and wait forever.this is what *truncated* IIR filters are good for. they're really are, strictly speaking, FIR filters, but they are implemented by use of recursion. (again, the moving average or moving sum is a good first example of the truncated IIR.)> Having made the decision when the output stops, you have defined a FIR > filter that has a truncated version of the IIR filter.but you can't just hack off samples from the output of the IIR. you need a legit LTI implementation of this thing.> Since there were no constraints mentioned regarding the IIR filter and > because IIR filters don't normally have linear phase / constant delay with > frequency, running the output in the opposite direction through the > so-defined FIR filter is the same as running the output straight through a > reversed version of the FIR filter EXCEPT in the first case the output is > reversed relative to the original input. So, you might want to reverse the > filter instead of the data. > > If you reverse the filter instead of the data for the second pass, then it's > as though there are two FIR filters in series. This suggests that you might > combine their impulse responses into a single impulse response. Assuming > that the impulse response decays then you might want to put the reversed > filter first, followed by the original - in order to get a more "well > behaved" impulse response. Either way, it becomes a symmetrical FIR filter > that has linear phase and *does* have delay in the normal way of defining > delay.check out that whatever paper by Avery Wang and Julius Smith about that (must i look it up?). if you reverse the FIR as a truncated IIR, it is theoretically stable (because you cancelled an unstable pole with a zero) but the roundoff noise blows up. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
Reply by ●July 31, 20052005-07-31
"robert bristow-johnson" <rbj@audioimagination.com> wrote in message news:BF11A261.8C57%rbj@audioimagination.com...> hi guyz. i'm finally back home in the Green Mountains (actually i'm 30 > meters above sea level by the Lake). > > in article HLudnTGmWJVOGHffRVn-tg@centurytel.net, Fred Marshall at > fmarshallx@remove_the_x.acm.org wrote on 07/29/2005 15:34: > >> I might describe what's in that reference as follows: >> >> 1) Filter a block of data using an IIR filter. >> 2) Filter the resulting output in reverse direction through the same IIR >> filter. >> In order to do this, you need to decide when the output of the filter >> "stops" relative to the size of the input block. Otherwise, you will >> compute forever and wait forever. > > this is what *truncated* IIR filters are good for. they're really are, > strictly speaking, FIR filters, but they are implemented by use of > recursion. (again, the moving average or moving sum is a good first > example > of the truncated IIR.) > > >> Having made the decision when the output stops, you have defined a FIR >> filter that has a truncated version of the IIR filter. > > but you can't just hack off samples from the output of the IIR. you need > a > legit LTI implementation of this thing.Who's gonna stop me, big guy? :-) (It does define a FIR that probably approximated the IIR response if the IIR was stable in the first place). I do believe that's what was being contemplated.... ...............................> > check out that whatever paper by Avery Wang and Julius Smith about that > (must i look it up?). if you reverse the FIR as a truncated IIR, it is > theoretically stable (because you cancelled an unstable pole with a zero) > but the roundoff noise blows up.I should think the roundoff noise would depend on the order of the two "FIRs". Forward then Reverse looks like it might be much worse than Reverse then Forward if the impulse response decays as it should. In the former, the combined impulse response is high at the ends. In the latter it's high in the middle like most well-behaved FIRs.... Fred
Reply by ●July 31, 20052005-07-31
Fred Marshall wrote:> I should think the roundoff noise would depend on the order of the two > "FIRs". > Forward then Reverse looks like it might be much worse than Reverse then > Forward if the impulse response decays as it should. In the former, the > combined impulse response is high at the ends. In the latter it's high in > the middle like most well-behaved FIRs....Isn't it more efficient to convolve one FIR with the reverse of the other FIR and then convolve the file once forward with the result of that? Bob -- "Things should be described as simply as possible, but no simpler." A. Einstein






