Technical discussions related to Audio Signal Processing (digital effects, acoustics, noise reduction, musical signal processing, etc).
Hi, I've measured the impulse response of a loudspeaker, and considered as a FIR. Plotting its zeros, I see that nearly all the zeros are very close to the unit circle...so that a little error in precision make the filter unstable. I wonder why it is so. Changing a little bit the measurement position doed not involve any unstability of the filter...nor the filtering with FIR is unstable... There is something that I do not understand....
At 03:08 AM 6/15/2007, s...@yahoo.it wrote: >Hi, >I've measured the impulse response of a loudspeaker, and considered >as a FIR. Plotting its zeros, I see that nearly all the zeros are >very close to the unit circle...so that a little error in precision >make the filter unstable. > >I wonder why it is so. Changing a little bit the measurement >position doed not involve any unstability of the filter...nor the >filtering with FIR is unstable... > >There is something that I do not understand.... Zeros do not make the filter unstable. You are confusing poles near or outside the unit circle. You should implement an FIR using a double width accumulator (32 bit coefficients, 64 bit result, fixed point) or IEEE float. I think that the fixed point implementation is slightly better. This is because a big float x little float ~= big float. You won't have this issue with a fixed point MAC with double width accumulator. You round your result after all the summations. Al Clark Danville Signal Processing, Inc. -------------------------------------------------------------------- Purveyors of Fine DSP Hardware and other Cool Stuff Available at http://www.danvillesignal.com
Simone- > Yes I use a pole-zero plot of the matlab fdatool GUI. > I join the impulse response (in .wav), could you tell me if with the same > signal I am using, you do not have this problem in Hypersignal? > Really appreciate your help. If you can send me a .wav file of the filter coefficients (impulse response) or send a text file with floating-point coefficients I can try. My version of Hypersignal is Hypersignal-Macro from 2005. -Jeff > ----- Original Message ----- > From: "Jeff Brower" <j...@signalogic.com> > To: "Simone Fontana" <s...@yahoo.it> > Cc: <a...@yahoogroups.com> > Sent: Saturday, June 16, 2007 9:17 PM > Subject: Re: [audiodsp] real impulse response as FIR filter >> Simone- >> >>> Thanks, I know that zeros cannot provoke unstability, but i am sure of >>> this: >>> working with matlab, my filter has zeros (400) very close to the unit >>> circle. changing one of this zeros of a very little value (say 10^-8) >>> make >>> my response change abnormally, from my standpoint. it passes from a >>> maximum >>> value of 1 to 10^78!!! >>> >>> I can admit that with 400 zeros, it is a matter of precision. >>> But I do not understand the physichal explication of the problem. >> >> It's just a MATLAB issue. If I do the same thing with Hypersignal >> software, no change. >> >> How are you changing the zeros? Using a pole-zero plot? >> >> -Jeff >> >>> ----- Original Message ----- >>> From: "Jeff Brower" <j...@signalogic.com> >>> To: "Simo Fontana" <s...@yahoo.it> >>> Cc: <a...@yahoogroups.com> >>> Sent: Friday, June 15, 2007 9:11 PM >>> Subject: Re: [audiodsp] real impulse response as FIR filter >>> >>> >>>> Simo- >>>> >>>>> I've measured the impulse response of a loudspeaker, and considered as >>>>> a FIR. Plotting its zeros, I see that nearly all the zeros are very >>>>> close to the unit circle...so that a little error in precision make >>>>> the filter unstable. >>>>> >>>>> I wonder why it is so. Changing a little bit the measurement position >>>>> doed not involve any unstability of the filter...nor the filtering >>>>> with FIR is unstable... >>>>> >>>>> There is something that I do not understand.... >>>> >>>> As Al Clark pointed out, zero locations are not going to make your FIR >>>> filter >>>> unstable. >>>> >>>> I would add that FIR filters -- by definition -- do not contain poles. >>>> You cannot >>>> have "instability issues" with an FIR filter, for example phenomena like >>>> a >>>> sudden >>>> "blow up" in the output or limit cycle oscillations. You could, >>>> however, >>>> have >>>> numerical precision or accuracy issues in the results (again as Al >>>> pointed >>>> out). >>>> >>>> -Jeff >>>>
Simo- > I've measured the impulse response of a loudspeaker, and considered as > a FIR. Plotting its zeros, I see that nearly all the zeros are very > close to the unit circle...so that a little error in precision make > the filter unstable. > > I wonder why it is so. Changing a little bit the measurement position > doed not involve any unstability of the filter...nor the filtering > with FIR is unstable... > > There is something that I do not understand.... As Al Clark pointed out, zero locations are not going to make your FIR filter unstable. I would add that FIR filters -- by definition -- do not contain poles. You cannot have "instability issues" with an FIR filter, for example phenomena like a sudden "blow up" in the output or limit cycle oscillations. You could, however, have numerical precision or accuracy issues in the results (again as Al pointed out). -Jeff
Thanks, I know that zeros cannot provoke unstability, but i am sure of this: working with matlab, my filter has zeros (400) very close to the unit circle. changing one of this zeros of a very little value (say 10^-8) make my response change abnormally, from my standpoint. it passes from a maximum value of 1 to 10^78!!! I can admit that with 400 zeros, it is a matter of precision. But I do not understand the physichal explication of the problem. Simo ----- Original Message ----- From: "Jeff Brower" <j...@signalogic.com> To: "Simo Fontana" <s...@yahoo.it> Cc: <a...@yahoogroups.com> Sent: Friday, June 15, 2007 9:11 PM Subject: Re: [audiodsp] real impulse response as FIR filter > Simo- > >> I've measured the impulse response of a loudspeaker, and considered as >> a FIR. Plotting its zeros, I see that nearly all the zeros are very >> close to the unit circle...so that a little error in precision make >> the filter unstable. >> >> I wonder why it is so. Changing a little bit the measurement position >> doed not involve any unstability of the filter...nor the filtering >> with FIR is unstable... >> >> There is something that I do not understand.... > > As Al Clark pointed out, zero locations are not going to make your FIR > filter > unstable. > > I would add that FIR filters -- by definition -- do not contain poles. > You cannot > have "instability issues" with an FIR filter, for example phenomena like a > sudden > "blow up" in the output or limit cycle oscillations. You could, however, > have > numerical precision or accuracy issues in the results (again as Al pointed > out). > > -Jeff >
Yes I use a pole-zero plot of the matlab fdatool GUI. I join the impulse response (in .wav), could you tell me if with the same signal I am using, you do not have this problem in Hypersignal? Really appreciate your help. ----- Original Message ----- From: "Jeff Brower" <j...@signalogic.com> To: "Simone Fontana" <s...@yahoo.it> Cc: <a...@yahoogroups.com> Sent: Saturday, June 16, 2007 9:17 PM Subject: Re: [audiodsp] real impulse response as FIR filter > Simone- > >> Thanks, I know that zeros cannot provoke unstability, but i am sure of >> this: >> working with matlab, my filter has zeros (400) very close to the unit >> circle. changing one of this zeros of a very little value (say 10^-8) >> make >> my response change abnormally, from my standpoint. it passes from a >> maximum >> value of 1 to 10^78!!! >> >> I can admit that with 400 zeros, it is a matter of precision. >> But I do not understand the physichal explication of the problem. > > It's just a MATLAB issue. If I do the same thing with Hypersignal > software, no change. > > How are you changing the zeros? Using a pole-zero plot? > > -Jeff > >> ----- Original Message ----- >> From: "Jeff Brower" <j...@signalogic.com> >> To: "Simo Fontana" <s...@yahoo.it> >> Cc: <a...@yahoogroups.com> >> Sent: Friday, June 15, 2007 9:11 PM >> Subject: Re: [audiodsp] real impulse response as FIR filter >>> Simo- >>> >>>> I've measured the impulse response of a loudspeaker, and considered as >>>> a FIR. Plotting its zeros, I see that nearly all the zeros are very >>>> close to the unit circle...so that a little error in precision make >>>> the filter unstable. >>>> >>>> I wonder why it is so. Changing a little bit the measurement position >>>> doed not involve any unstability of the filter...nor the filtering >>>> with FIR is unstable... >>>> >>>> There is something that I do not understand.... >>> >>> As Al Clark pointed out, zero locations are not going to make your FIR >>> filter >>> unstable. >>> >>> I would add that FIR filters -- by definition -- do not contain poles. >>> You cannot >>> have "instability issues" with an FIR filter, for example phenomena like >>> a >>> sudden >>> "blow up" in the output or limit cycle oscillations. You could, >>> however, >>> have >>> numerical precision or accuracy issues in the results (again as Al >>> pointed >>> out). >>> >>> -Jeff >>>
Simone- > Thanks, I know that zeros cannot provoke unstability, but i am sure of this: > working with matlab, my filter has zeros (400) very close to the unit > circle. changing one of this zeros of a very little value (say 10^-8) make > my response change abnormally, from my standpoint. it passes from a maximum > value of 1 to 10^78!!! > > I can admit that with 400 zeros, it is a matter of precision. > But I do not understand the physichal explication of the problem. It's just a MATLAB issue. If I do the same thing with Hypersignal software, no change. How are you changing the zeros? Using a pole-zero plot? -Jeff > ----- Original Message ----- > From: "Jeff Brower" <j...@signalogic.com> > To: "Simo Fontana" <s...@yahoo.it> > Cc: <a...@yahoogroups.com> > Sent: Friday, June 15, 2007 9:11 PM > Subject: Re: [audiodsp] real impulse response as FIR filter >> Simo- >> >>> I've measured the impulse response of a loudspeaker, and considered as >>> a FIR. Plotting its zeros, I see that nearly all the zeros are very >>> close to the unit circle...so that a little error in precision make >>> the filter unstable. >>> >>> I wonder why it is so. Changing a little bit the measurement position >>> doed not involve any unstability of the filter...nor the filtering >>> with FIR is unstable... >>> >>> There is something that I do not understand.... >> >> As Al Clark pointed out, zero locations are not going to make your FIR >> filter >> unstable. >> >> I would add that FIR filters -- by definition -- do not contain poles. >> You cannot >> have "instability issues" with an FIR filter, for example phenomena like a >> sudden >> "blow up" in the output or limit cycle oscillations. You could, however, >> have >> numerical precision or accuracy issues in the results (again as Al pointed >> out). >> >> -Jeff >
Simone- > here you can find the file.wav. Here are the Hypersignal time-domain and freq-domain plots of your .wav file: http://www.signalogic.com/images/Fontana_filter_impulse_response.jpg http://www.signalogic.com/images/Fontana_filter_freq_response.jpg First, note that the FIR filter you have provided does not have linear phase (impulse response is not symmetric). It looks like a minimum-phase FIR filter. Second, I used Hypersignal's waveform editor to slightly move the negative peak in the time domain plot of your filter. There was no discernible change in the frequency response. That stands to reason -- there shouldn't be a lot of sensitivity to slight perturbation of a single tap in a 390-tap FIR filter. -Jeff > ----- Original Message ----- > From: Jeff Brower > To: Simone Fontana > Cc: a...@yahoogroups.com > Sent: Sunday, June 17, 2007 9:28 PM > Subject: Re: [audiodsp] real impulse response as FIR filter > > Simone- > > > Yes I use a pole-zero plot of the matlab fdatool GUI. > > I join the impulse response (in .wav), could you tell me if with the > same > > signal I am using, you do not have this problem in Hypersignal? > > Really appreciate your help. > > If you can send me a .wav file of the filter coefficients (impulse > response) or send a text file with floating-point > coefficients I can try. My version of Hypersignal is Hypersignal-Macro > from 2005. > > -Jeff > > > ----- Original Message ----- > > From: "Jeff Brower" <j...@signalogic.com> > > To: "Simone Fontana" <s...@yahoo.it> > > Cc: <a...@yahoogroups.com> > > Sent: Saturday, June 16, 2007 9:17 PM > > Subject: Re: [audiodsp] real impulse response as FIR filter > > > > > >> Simone- > >> > >>> Thanks, I know that zeros cannot provoke unstability, but i am sure > of > >>> this: > >>> working with matlab, my filter has zeros (400) very close to the unit > >>> circle. changing one of this zeros of a very little value (say 10^-8) > >>> make > >>> my response change abnormally, from my standpoint. it passes from a > >>> maximum > >>> value of 1 to 10^78!!! > >>> > >>> I can admit that with 400 zeros, it is a matter of precision. > >>> But I do not understand the physichal explication of the problem. > >> > >> It's just a MATLAB issue. If I do the same thing with Hypersignal > >> software, no change. > >> > >> How are you changing the zeros? Using a pole-zero plot? > >> > >> -Jeff > >> > >>> ----- Original Message ----- > >>> From: "Jeff Brower" <j...@signalogic.com> > >>> To: "Simo Fontana" <s...@yahoo.it> > >>> Cc: <a...@yahoogroups.com> > >>> Sent: Friday, June 15, 2007 9:11 PM > >>> Subject: Re: [audiodsp] real impulse response as FIR filter > >>> > >>> > >>>> Simo- > >>>> > >>>>> I've measured the impulse response of a loudspeaker, and considered > as > >>>>> a FIR. Plotting its zeros, I see that nearly all the zeros are very > >>>>> close to the unit circle...so that a little error in precision make > >>>>> the filter unstable. > >>>>> > >>>>> I wonder why it is so. Changing a little bit the measurement > position > >>>>> doed not involve any unstability of the filter...nor the filtering > >>>>> with FIR is unstable... > >>>>> > >>>>> There is something that I do not understand.... > >>>> > >>>> As Al Clark pointed out, zero locations are not going to make your > FIR > >>>> filter > >>>> unstable. > >>>> > >>>> I would add that FIR filters -- by definition -- do not contain > poles. > >>>> You cannot > >>>> have "instability issues" with an FIR filter, for example phenomena > like > >>>> a > >>>> sudden > >>>> "blow up" in the output or limit cycle oscillations. You could, > >>>> however, > >>>> have > >>>> numerical precision or accuracy issues in the results (again as Al > >>>> pointed > >>>> out). > >>>> > >>>> -Jeff > >>>> [Image] > > > Name: direct_front.wav > direct_front.wav Type: Winamp media file (audio/wav) > Encoding: base64
Simone- > but, actually, i have to say that I did not have this problem. > If I move a tap in the filter, i do not have any problem. > My problem is if I slightly move a zero in the Z-domain... I can only guess that the software you're using has trouble in multiplying out zeros into a real-valued polynomial. Maybe you're moving a zero in such a way that a complex filter coefficient results and that causes some issue with the time domain plot... -Jeff > the filter is 'nearly' minimum phase, because there are zeros outside the > unit circle...,namely a number of zeros 'nearly' equal to the number of taps > before the main peak: 92 zeros! If I truncate the response keeping only the > part after the main peak. the non minimum-phase zeros becomes 4. > > have you got the possibility to plot the zeros of the filter? > -Simone > > ----- Original Message ----- > From: "Jeff Brower" <j...@signalogic.com> > To: "Simone Fontana" <s...@yahoo.it> > Cc: <a...@yahoogroups.com> > Sent: Monday, June 18, 2007 8:55 PM > Subject: Re: [audiodsp] real impulse response as FIR filter > > > Simone- > > > >> here you can find the file.wav. > > > > Here are the Hypersignal time-domain and freq-domain plots of your .wav > > file: > > > > http://www.signalogic.com/images/Fontana_filter_impulse_response.jpg > > > > http://www.signalogic.com/images/Fontana_filter_freq_response.jpg > > > > First, note that the FIR filter you have provided does not have linear > > phase (impulse > > response is not symmetric). It looks like a minimum-phase FIR filter. > > > > Second, I used Hypersignal's waveform editor to slightly move the negative > > peak in > > the time domain plot of your filter. There was no discernible change in > > the > > frequency response. That stands to reason -- there shouldn't be a lot of > > sensitivity > > to slight perturbation of a single tap in a 390-tap FIR filter. > > > > -Jeff > > > >> ----- Original Message ----- > >> From: Jeff Brower > >> To: Simone Fontana > >> Cc: a...@yahoogroups.com > >> Sent: Sunday, June 17, 2007 9:28 PM > >> Subject: Re: [audiodsp] real impulse response as FIR filter > >> > >> Simone- > >> > >> > Yes I use a pole-zero plot of the matlab fdatool GUI. > >> > I join the impulse response (in .wav), could you tell me if with > >> the > >> same > >> > signal I am using, you do not have this problem in Hypersignal? > >> > Really appreciate your help. > >> > >> If you can send me a .wav file of the filter coefficients (impulse > >> response) or send a text file with floating-point > >> coefficients I can try. My version of Hypersignal is > >> Hypersignal-Macro > >> from 2005. > >> > >> -Jeff > >> > >> > ----- Original Message ----- > >> > From: "Jeff Brower" <j...@signalogic.com> > >> > To: "Simone Fontana" <s...@yahoo.it> > >> > Cc: <a...@yahoogroups.com> > >> > Sent: Saturday, June 16, 2007 9:17 PM > >> > Subject: Re: [audiodsp] real impulse response as FIR filter > >> > > >> > > >> >> Simone- > >> >> > >> >>> Thanks, I know that zeros cannot provoke unstability, but i am > >> sure > >> of > >> >>> this: > >> >>> working with matlab, my filter has zeros (400) very close to the > >> unit > >> >>> circle. changing one of this zeros of a very little value (say > >> 10^-8) > >> >>> make > >> >>> my response change abnormally, from my standpoint. it passes > >> from a > >> >>> maximum > >> >>> value of 1 to 10^78!!! > >> >>> > >> >>> I can admit that with 400 zeros, it is a matter of precision. > >> >>> But I do not understand the physichal explication of the > >> problem. > >> >> > >> >> It's just a MATLAB issue. If I do the same thing with Hypersignal > >> >> software, no change. > >> >> > >> >> How are you changing the zeros? Using a pole-zero plot? > >> >> > >> >> -Jeff > >> >> > >> >>> ----- Original Message ----- > >> >>> From: "Jeff Brower" <j...@signalogic.com> > >> >>> To: "Simo Fontana" <s...@yahoo.it> > >> >>> Cc: <a...@yahoogroups.com> > >> >>> Sent: Friday, June 15, 2007 9:11 PM > >> >>> Subject: Re: [audiodsp] real impulse response as FIR filter > >> >>> > >> >>> > >> >>>> Simo- > >> >>>> > >> >>>>> I've measured the impulse response of a loudspeaker, and > >> considered > >> as > >> >>>>> a FIR. Plotting its zeros, I see that nearly all the zeros are > >> very > >> >>>>> close to the unit circle...so that a little error in precision > >> make > >> >>>>> the filter unstable. > >> >>>>> > >> >>>>> I wonder why it is so. Changing a little bit the measurement > >> position > >> >>>>> doed not involve any unstability of the filter...nor the > >> filtering > >> >>>>> with FIR is unstable... > >> >>>>> > >> >>>>> There is something that I do not understand.... > >> >>>> > >> >>>> As Al Clark pointed out, zero locations are not going to make > >> your > >> FIR > >> >>>> filter > >> >>>> unstable. > >> >>>> > >> >>>> I would add that FIR filters -- by definition -- do not contain > >> poles. > >> >>>> You cannot > >> >>>> have "instability issues" with an FIR filter, for example > >> phenomena > >> like > >> >>>> a > >> >>>> sudden > >> >>>> "blow up" in the output or limit cycle oscillations. You could, > >> >>>> however, > >> >>>> have > >> >>>> numerical precision or accuracy issues in the results (again as > >> Al > >> >>>> pointed > >> >>>> out). > >> >>>> > >> >>>> -Jeff > >> >>>> > >> > >> [Image] > >> > >> > >> Name: direct_front.wav > >> direct_front.wav Type: Winamp media file (audio/wav) > >> Encoding: base64 > >
Ok, thanks but, actually, i have to say that I did not have this problem. If I move a tap in the filter, i do not have any problem. My problem is if I slightly move a zero in the Z-domain... the filter is 'nearly' minimum phase, because there are zeros outside the unit circle...,namely a number of zeros 'nearly' equal to the number of taps before the main peak: 92 zeros! If I truncate the response keeping only the part after the main peak. the non minimum-phase zeros becomes 4. have you got the possibility to plot the zeros of the filter? -Simone ----- Original Message ----- From: "Jeff Brower" <j...@signalogic.com> To: "Simone Fontana" <s...@yahoo.it> Cc: <a...@yahoogroups.com> Sent: Monday, June 18, 2007 8:55 PM Subject: Re: [audiodsp] real impulse response as FIR filter > Simone- > >> here you can find the file.wav. > > Here are the Hypersignal time-domain and freq-domain plots of your .wav > file: > > http://www.signalogic.com/images/Fontana_filter_impulse_response.jpg > > http://www.signalogic.com/images/Fontana_filter_freq_response.jpg > > First, note that the FIR filter you have provided does not have linear > phase (impulse > response is not symmetric). It looks like a minimum-phase FIR filter. > > Second, I used Hypersignal's waveform editor to slightly move the negative > peak in > the time domain plot of your filter. There was no discernible change in > the > frequency response. That stands to reason -- there shouldn't be a lot of > sensitivity > to slight perturbation of a single tap in a 390-tap FIR filter. > > -Jeff > >> ----- Original Message ----- >> From: Jeff Brower >> To: Simone Fontana >> Cc: a...@yahoogroups.com >> Sent: Sunday, June 17, 2007 9:28 PM >> Subject: Re: [audiodsp] real impulse response as FIR filter >> >> Simone- >> >> > Yes I use a pole-zero plot of the matlab fdatool GUI. >> > I join the impulse response (in .wav), could you tell me if with >> the >> same >> > signal I am using, you do not have this problem in Hypersignal? >> > Really appreciate your help. >> >> If you can send me a .wav file of the filter coefficients (impulse >> response) or send a text file with floating-point >> coefficients I can try. My version of Hypersignal is >> Hypersignal-Macro >> from 2005. >> >> -Jeff >> >> > ----- Original Message ----- >> > From: "Jeff Brower" <j...@signalogic.com> >> > To: "Simone Fontana" <s...@yahoo.it> >> > Cc: <a...@yahoogroups.com> >> > Sent: Saturday, June 16, 2007 9:17 PM >> > Subject: Re: [audiodsp] real impulse response as FIR filter >> > >> > >> >> Simone- >> >> >> >>> Thanks, I know that zeros cannot provoke unstability, but i am >> sure >> of >> >>> this: >> >>> working with matlab, my filter has zeros (400) very close to the >> unit >> >>> circle. changing one of this zeros of a very little value (say >> 10^-8) >> >>> make >> >>> my response change abnormally, from my standpoint. it passes >> from a >> >>> maximum >> >>> value of 1 to 10^78!!! >> >>> >> >>> I can admit that with 400 zeros, it is a matter of precision. >> >>> But I do not understand the physichal explication of the >> problem. >> >> >> >> It's just a MATLAB issue. If I do the same thing with Hypersignal >> >> software, no change. >> >> >> >> How are you changing the zeros? Using a pole-zero plot? >> >> >> >> -Jeff >> >> >> >>> ----- Original Message ----- >> >>> From: "Jeff Brower" <j...@signalogic.com> >> >>> To: "Simo Fontana" <s...@yahoo.it> >> >>> Cc: <a...@yahoogroups.com> >> >>> Sent: Friday, June 15, 2007 9:11 PM >> >>> Subject: Re: [audiodsp] real impulse response as FIR filter >> >>> >> >>> >> >>>> Simo- >> >>>> >> >>>>> I've measured the impulse response of a loudspeaker, and >> considered >> as >> >>>>> a FIR. Plotting its zeros, I see that nearly all the zeros are >> very >> >>>>> close to the unit circle...so that a little error in precision >> make >> >>>>> the filter unstable. >> >>>>> >> >>>>> I wonder why it is so. Changing a little bit the measurement >> position >> >>>>> doed not involve any unstability of the filter...nor the >> filtering >> >>>>> with FIR is unstable... >> >>>>> >> >>>>> There is something that I do not understand.... >> >>>> >> >>>> As Al Clark pointed out, zero locations are not going to make >> your >> FIR >> >>>> filter >> >>>> unstable. >> >>>> >> >>>> I would add that FIR filters -- by definition -- do not contain >> poles. >> >>>> You cannot >> >>>> have "instability issues" with an FIR filter, for example >> phenomena >> like >> >>>> a >> >>>> sudden >> >>>> "blow up" in the output or limit cycle oscillations. You could, >> >>>> however, >> >>>> have >> >>>> numerical precision or accuracy issues in the results (again as >> Al >> >>>> pointed >> >>>> out). >> >>>> >> >>>> -Jeff >> >>>> [Image] >> >> >> Name: direct_front.wav >> direct_front.wav Type: Winamp media file (audio/wav) >> Encoding: base64 >