DSPRelated.com
Forums

Audio Low Frequency Instability

Started by Dirk Bruere at NeoPax November 8, 2007
Dirk Bruere at NeoPax <dirk.bruere@gmail.com> wrote in 
news:1194960881.866941.52480@19g2000hsx.googlegroups.com:

> On 9 Nov, 16:30, robert bristow-johnson <r...@audioimagination.com> > wrote: >> On Nov 8, 9:31 am,DirkBruereat NeoPax <dirk.bru...@gmail.com> >> wrote: >> >> > Can anyone point me to the reasons why IIR peaking filters become >> > unstable at low audio frequencies? And, of course, how to get around >> > this problem? I need a set of peaking filters that operate between >> > 10Hz and 100Hz. >> >> Dirk, it's what everyone else said about arithmetic precision, but >> here is why it is worse at low frequencies: >> >> cos(2*pi*f0/Fs) >> >> is the only frequency dependent term that tunes the filter (there is a >> sin(2*pi*f0/Fs) term in the calculation of Q). the problem with the >> cos() term is that it gets closer and closer to 1 as f0 gets lower, >> and the information it contains is express as its *difference* from >> 1. but those bits might have already fallen off of your word, even if >> you had floating point. >> >> r b-j > > So there are presumably two ways of overcoming this problem (assuming > 96kHz sampling and filter frequency <100Hz). > The first is to use more bits eg 64 bit float. > The second is to reduce the sampling frequency eg take only every 10th > sample to provide a 'frequency' of 9600Hz and work with that. > What method is used in digital pro-audio? > > Dirk > >
In pro audio, its common to implement the filter in fixed point using a DFI with either first order error shaping or double precision. This works well with a SHARC since it is a 32 bit fixed point processor (80 bit accumulator) as well as a floating point DSP. A high Q at very low frequency is still probably difficult. You might need a double precision 64 bit solution. Analog Devices has an application note that might be of interest: www.analog.com/UploadedFiles/Application_Notes/94729852EE270v01.pdf Al Clark Danville Signal Processing, Inc.
On Nov 13, 8:34 am, Dirk Bruere at NeoPax <dirk.bru...@gmail.com>
wrote:
> On 9 Nov, 16:30, robert bristow-johnson <r...@audioimagination.com> > wrote: > > > > > On Nov 8, 9:31 am,DirkBruereat NeoPax <dirk.bru...@gmail.com> > > wrote: > > > > Can anyone point me to the reasons why IIR peaking filters become > > > unstable at low audio frequencies? And, of course, how to get around > > > this problem? I need a set of peaking filters that operate between > > > 10Hz and 100Hz. > > > Dirk, it's what everyone else said about arithmetic precision, but > > here is why it is worse at low frequencies: > > > cos(2*pi*f0/Fs) > > > is the only frequency dependent term that tunes the filter (there is a > > sin(2*pi*f0/Fs) term in the calculation of Q). the problem with the > > cos() term is that it gets closer and closer to 1 as f0 gets lower, > > and the information it contains is express as its *difference* from > > 1. but those bits might have already fallen off of your word, even if > > you had floating point. > > > r b-j > > So there are presumably two ways of overcoming this problem (assuming > 96kHz sampling and filter frequency <100Hz). > The first is to use more bits eg 64 bit float. > The second is to reduce the sampling frequency eg take only every 10th > sample to provide a 'frequency' of 9600Hz and work with that. > What method is used in digital pro-audio?
dunno if it will solve your particular low-frequency problem, but i have found for audio (where the most interesting frequencies are often 7 or 8 octaves below Nyquist) is to use trig identities to express all of the terms with (1 - cos(2*pi*f0/Fs)) in terms of something with sin() instead. it requires a little change in the architecture of the filter. r b-j
robert bristow-johnson wrote:
> On Nov 13, 8:34 am, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> > wrote: >> On 9 Nov, 16:30, robert bristow-johnson <r...@audioimagination.com> >> wrote: >> >> >> >>> On Nov 8, 9:31 am,DirkBruereat NeoPax <dirk.bru...@gmail.com> >>> wrote: >>>> Can anyone point me to the reasons why IIR peaking filters become >>>> unstable at low audio frequencies? And, of course, how to get around >>>> this problem? I need a set of peaking filters that operate between >>>> 10Hz and 100Hz. >>> Dirk, it's what everyone else said about arithmetic precision, but >>> here is why it is worse at low frequencies: >>> cos(2*pi*f0/Fs) >>> is the only frequency dependent term that tunes the filter (there is a >>> sin(2*pi*f0/Fs) term in the calculation of Q). the problem with the >>> cos() term is that it gets closer and closer to 1 as f0 gets lower, >>> and the information it contains is express as its *difference* from >>> 1. but those bits might have already fallen off of your word, even if >>> you had floating point. >>> r b-j >> So there are presumably two ways of overcoming this problem (assuming >> 96kHz sampling and filter frequency <100Hz). >> The first is to use more bits eg 64 bit float. >> The second is to reduce the sampling frequency eg take only every 10th >> sample to provide a 'frequency' of 9600Hz and work with that. >> What method is used in digital pro-audio? > > dunno if it will solve your particular low-frequency problem, but i > have found for audio (where the most interesting frequencies are often > 7 or 8 octaves below Nyquist) is to use trig identities to express all > of the terms with (1 - cos(2*pi*f0/Fs)) in terms of something with > sin() instead. it requires a little change in the architecture of the > filter. > > r b-j >
Thanks. That's a neat trick! -- Dirk http://www.transcendence.me.uk/ - Transcendence UK Remote Viewing classes in London
On Nov 13, 9:24 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com>
wrote:
> robert bristow-johnson wrote:
...
> > dunno if it will solve your particular low-frequency problem, but i > > have found for audio (where the most interesting frequencies are often > > 7 or 8 octaves below Nyquist) is to use trig identities to express all > > of the terms with (1 - cos(2*pi*f0/Fs)) in terms of something with > > sin() instead. it requires a little change in the architecture of the > > filter. > > > Thanks. That's a neat trick!
well, i didn't really spell it out but all's i was thinking of is the same trick i did for accurately expressing frequency response at low frequencies. i posted something about that a while ago: http://groups.google.com/group/comp.dsp/browse_frm/thread/8c0fa8d396aeb444/a1bc5b63ac56b686 where the main idea is to replace cos(w) <-- 1 - 2*(sin(w/2))^2 where w = 2*pi*f/Fs is the low frequency in the frequency response. but now we replace w with w0=2*pi*f0/Fs where f0 is the very low resonant frequency of the audio filter so we are replacing cos(w0) <-- 1 - 2*(sin(w0/2))^2 in the filter coefficients and expressing all of the "1" terms with direct paths in the signal flow graph. then, if you maintain some kind of pseudo-floating-point with 2*(sin(w0/2))^2 (shifting bits right after multiplying with scaled up versions of those tiny numbers) you'll be able to implement an accurate filter even for low values of w0. that's the trick. r b-j
robert bristow-johnson wrote:
> On Nov 13, 9:24 pm, Dirk Bruere at NeoPax <dirk.bru...@gmail.com> > wrote: >> robert bristow-johnson wrote: > ... >>> dunno if it will solve your particular low-frequency problem, but i >>> have found for audio (where the most interesting frequencies are often >>> 7 or 8 octaves below Nyquist) is to use trig identities to express all >>> of the terms with (1 - cos(2*pi*f0/Fs)) in terms of something with >>> sin() instead. it requires a little change in the architecture of the >>> filter. >> >> Thanks. That's a neat trick! > > well, i didn't really spell it out but all's i was thinking of is the > same trick i did for accurately expressing frequency response at low > frequencies. i posted something about that a while ago: > > http://groups.google.com/group/comp.dsp/browse_frm/thread/8c0fa8d396aeb444/a1bc5b63ac56b686 > > where the main idea is to replace > > cos(w) <-- 1 - 2*(sin(w/2))^2 > > where w = 2*pi*f/Fs is the low frequency in the frequency response. > but now we replace w with w0=2*pi*f0/Fs where f0 is the very low > resonant frequency of the audio filter so we are replacing > > cos(w0) <-- 1 - 2*(sin(w0/2))^2 > > in the filter coefficients and expressing all of the "1" terms with > direct paths in the signal flow graph. then, if you maintain some > kind of pseudo-floating-point with 2*(sin(w0/2))^2 (shifting bits > right after multiplying with scaled up versions of those tiny numbers) > you'll be able to implement an accurate filter even for low values of > w0. > > that's the trick. > > r b-j >
Takes me back 35 yrs to my maths "A" level exams. I'll have to dig out all my old trig books. I can certainly see how people make a career out of DSP. It's one thing to understand such stuff, but another to think it up. Reminds me why I gave up physics. -- Dirk http://www.transcendence.me.uk/ - Transcendence UK Remote Viewing classes in London