Re: Amplitude response of a Biquad Filter



"rkthebad" <raviyenduri@xxxxxxxxx> wrote in
news:gtKdnSB967nLbXHenZ2dnUVZ_sWdnZ2d@xxxxxxxxxxxx:

Jerry Avins <jya@xxxxxxxx> wrote in
news:jYmdnUS6N9GRUXHeRVn-qw@xxxxxxx:

rkthebad wrote:
Hello,

I have implemented a 5-band equalizer in fixed point using the
formulae
provided in the Cookbook. I get the desired output when I intend to
boost/cut the higher 4 bands. But, when I am trying to boost the
first band, the output becomes distorted. I noticed that a cut on
the first band works perfectly fine.

Assumption : Wrong implementation of filter coefficients????
Well, to test this, I first tried using white noise as my
input
signal. This gives me a perfect result in terms of the exact change
in dB level. But, when I use an ordinary audio file, I see the
before mentioned problem.

Any insights to this problem will be helpful.

It seems that the low end saturates when you boost it. If there's
already a lot of bass in the audio file, you don't have much
headroom.

If white noise distorted, could you tell by listening?

Jerry

Another possible problem could be related to your implementation of
the filter. A high Q filter with at a low center frequency relative to
the sampling rate may have problems in a typical DF II (direct form)
implementation. You mentioned fix point, how many bits?

A DF I (possibly with first order error shaping) might be a solution.

--
Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com


I am using a 16-bit fixed point implementation.

I have my filter routine setup in a direct form II configuration.

The following are the specifications that I am using presently:
5-bands with center frequencies : 100 Hz, 300 Hz, 1 kHz, 3 kHz and 10
kHz. I could have used the 2-Octave frequencies but even there the
first band is at a very low freq. (63 Hz).
Quality Factor = 4
Sampling frequencies ranging from 8 kHz to 48 kHz (audio related
sampling frequencies).

And the white noise that I am using to test the system right now is at
a sampling freq. of 8 kHz.

~ R K


Try testing the same signals with 8k sampling. Recalculate your
coefficients so that you are still looking at 100 Hz CF with the same
boost. The basic idea is to create what you think is an identical filter
from the point of view of the low frequencies.

If the results improve, it would suggest that precision & implementation
are likely problems. If the overload is at the same point, it would
suggest that you just have too much low frequency content in the input
that you are trying to boost.

16 bit precision is generally not enough for high quality audio. This was
a major reason why Motorola (now Freescale) was once king in the
professional audio space. Their 56K family were 24 bit fixed point when
most everything else was 16 bit. In todays world, the SHARC is dominant
in this space due largely to its 32 bit fixed and floating point
capability.

You can use a 16 bit DSP for high quality audio. Its a bit more
complicated and slower since you need to do double precision math to
create 32 bits. If the DSP is fast enough, the extra computational steps
may be acceptable.


--
Al Clark
Danville Signal Processing, Inc.
--------------------------------------------------------------------
Purveyors of Fine DSP Hardware and other Cool Stuff
Available at http://www.danvillesignal.com
.



Relevant Pages

  • Re: Audio Sampling Question
    ... By which you mean ultrasonic frequencies (close to the Nyquist limit imposed by the ... If used strictly for audio frequencies, a front end filter truly isn't required. ... I didn't have that luxury. ...
    (sci.electronics.design)
  • Re: Amplitude response of a Biquad Filter
    ... first band, the output becomes distorted. ... Wrong implementation of filter coefficients???? ... I could have used the 2-Octave frequencies but even there the first band is ... Sampling frequencies ranging from 8 kHz to 48 kHz (audio related sampling ...
    (comp.dsp)
  • Re: Michael Reichmann reasoning for AA filters?
    ... It causes ringing in the fourier domain (time in audio, space in imaging) not in the frequency domain. ... There is NO power at higher frequencies - that is the point of the stop filter. ... If you look at the fourier terms required to create a brick wall type filter, the even terms are positive, but the odd terms are negative. ...
    (rec.photo.digital)
  • Re: signal with high- and low-frequency components, real-time application
    ... For my application I try to keep the higher frequencies and remove the ... A high-pass filter, ... first/last values) or it has some kind of delay. ... Sampling rate is 1 Hz and I can't wait 20 ...
    (comp.dsp)
  • Re: ADC without antialias filter? was: Anti-aliasing ADC samples
    ... As a rule of thumb it is well known to use a filter to cut all frequencies ... But filtering these Signals to ... avoid frequencies over half the sampling rate may extend the QRS and in this ...
    (sci.electronics.design)