DSPRelated.com
Forums

Amplitude response of a FIR Filter in Excel

Started by Web Surf January 27, 2006
I have a Guitar effects processor box.

It models Loudspeaker cabinets as a 136 tap asymmetric FIR filter with 16
bit unsigned coefficients.

I wish to plot out the frequency response of this FIR Filter from its 136
coefficeints.

How does one do that in Excel

The Fourier Analysis, IMABS() route did not seem to work
Web Surf wrote:

> I have a Guitar effects processor box. > > It models Loudspeaker cabinets as a 136 tap asymmetric FIR filter with 16 > bit unsigned coefficients. > > I wish to plot out the frequency response of this FIR Filter from its 136 > coefficeints. > > How does one do that in Excel > > The Fourier Analysis, IMABS() route did not seem to work
Use SciLab. It's _not_ user friendly but it's getting better. You can download it from http://www.scilab.org. You can model your filter directly in the z domain, something like taps = (vector of 136 values, taps(1) = oldest, taps(136) = newest) H_fir = poly(taps, 'z', 'coeff') / %z^135; H_fir.dt = (your sampling rate); Then you can plot its frequency response directly: bode(H_fir); You can do the same for your biquad: H_b = (b0*%z^2 + b1*%z + b2) / (%z^2 + a1*%z + a2); H_b.dt = (your sampling rate); note the change in variables to z -- this is just a SciLabism that you'll have to put up with. Then plot it: bode(H_b); -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott <tim@seemywebsite.com> writes:

> Use SciLab. It's _not_ user friendly but it's getting better. You > can download it from http://www.scilab.org.
Hey Tim, why not Octave? -- % Randy Yates % "My Shangri-la has gone away, fading like %% Fuquay-Varina, NC % the Beatles on 'Hey Jude'" %%% 919-577-9882 % %%%% <yates@ieee.org> % 'Shangri-La', *A New World Record*, ELO http://home.earthlink.net/~yatescr
> >Use SciLab. > >Tim Wescott >Wescott Design Services >http://www.wescottdesign.com >
Thanks ! I already downloaded SCILAB last week and I will try out your code. However I need to plot the FIR Filter and the Biquads in Excel. This is because I need to give many people the ability to see the Biquad Equaliser and FIR Filter responses and I dont wish all to download SCILAB Can you assist with the response formulae to use so that these filters can be plotted in Excel.
Web Surf wrote:

> Can you assist with the response formulae to use so that these filters can > be plotted in Excel.
Web Surf, I tried out what I wrote in Excel, and it worked fine. Which part don't you understand? Regards, Andor
Randy Yates wrote:

> Tim Wescott <tim@seemywebsite.com> writes: > > >>Use SciLab. It's _not_ user friendly but it's getting better. You >>can download it from http://www.scilab.org. > > > Hey Tim, why not Octave?
SciLab seems more complete to me, the language lends itself better to object-oriented programming for those big analysis tasks, and the nicely integrated Octave for windows collides with Cygwin, which I need for C++ development. Frankly the real reason is that any analysis tool that has both state-space and transfer function based linear systems as native data types is my kind of analysis tool. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
Tim Wescott wrote:
> Randy Yates wrote: > >> Tim Wescott <tim@seemywebsite.com> writes: >> >> >>> Use SciLab. It's _not_ user friendly but it's getting better. You >>> can download it from http://www.scilab.org. >> >> >> >> Hey Tim, why not Octave? > > > SciLab seems more complete to me, the language lends itself better to > object-oriented programming for those big analysis tasks, and the nicely > integrated Octave for windows collides with Cygwin, which I need for C++ > development. > > Frankly the real reason is that any analysis tool that has both > state-space and transfer function based linear systems as native data > types is my kind of analysis tool.
Didn't Richard Owlett say that Octave is no longer actively supported? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Jerry Avins <jya@ieee.org> writes:
> [...] > Didn't Richard Owlett say that Octave is no longer actively supported?
They had a release back in May - it's not too out-of-date (yet). -- % Randy Yates % "Watching all the days go by... %% Fuquay-Varina, NC % Who are you and who am I?" %%% 919-577-9882 % 'Mission (A World Record)', %%%% <yates@ieee.org> % *A New World Record*, ELO http://home.earthlink.net/~yatescr
> >Web Surf wrote: > >> Can you assist with the response formulae to use so that these filters
can
>> be plotted in Excel. > >Web Surf, > >I tried out what I wrote in Excel, and it worked fine. Which part don't >you understand? > >Regards, >Andor > >
Hi Andor, Please help Can you email me your Spreadsheet where you plot out a FIR Filter ? I do get some graph from the Fourier analysis, IMABS(), graph half of the output method but have not been able to scale my Y axis to show frequencies.
I am a guitarist trying to understand a bit more about this Guitar Effects
processor that I purchased 3 months ago.

Here are some questions :

1) This new box appears to implement Loudspeaker cabinets as 136 tap
asymmetrical FIR filters. The earlier box implemented as 128 tap.

1.1) Is there any hardware reason to choose a number like 136 ? Any chips
that do 136 tap FIR Filters ? 

1.2) From my attempts to plot frequency response, it appears that there is
no real benefit of having 8 taps more. Is that correct ?  

2) While studying the method to plot FIR Filter response in Excel proposed
by some on this forum, it appears to me that a 128/136 tap filter with
44100 Hz sampling cannot be flexible between 0-300 Hz. Ie all FIR filters
with above hardware will have same response below 300 Hz ( The first point
in the graph as per the proposed plotting methods which draws a straigh
line from 0 Hz to 300 Hz)

Have I understood correctly ? 

Or is this a deficiency of the proposed plotting method.