Normalization to 0dB of filter.

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

Even with my total lack of fundamentals, I might give a go to implementing a crossover based on this:
https://www.vicanek.de/articles/ReverseIIR.pdf

I'm going step by step. As of now I'm trying to implement a Butterworth based on individual complex single pole and single zero filters. Then I might start with a single linear-phase Butterworth, then adding the crossovers, etc.

Copying from here and there (DSPFilters, csound, etc.) It seems that I'm almost there. I now have a Butteworth filter computed via BLT using individual complex 1 pole and 1 zero filters. It works but the magnitude is way off, as I didn't normalize it.

I have seen code that normalizes the gain based on the biquad coefficients, but how to do it in a generalized way?

Post

if your design formulas do not automatically give you the desired unit gain, you can always just evaluate the gain at the frequency where it's supposed to be unity* and then scale all feedforward coeffs by the reciprocal of that (assuming direct form - otherwise, you can just scale input or output). a bit more care has to be taken for filters with passband ripple (cheby or elliptic). for example, in a lowpass, if the ripple is such that you have a dip at DC (iirc, it happens for even order), you have to take that into account, too. in this case, the amount of the dip is known from the design specs - it is the ripple

(*) which is DC for lowpass, nyquist for highpass (assuming BLT) , for bandreject you can use either of the two, for bandpass, it's the (prewarped) center freq (again assuming BLT)
My website: rs-met.com, My presences on: YouTube, GitHub, Facebook

Post

rafa1981 wrote: Wed Dec 08, 2021 8:40 pm I have seen code that normalizes the gain based on the biquad coefficients, but how to do it in a generalized way?
As Robin already pointed out, you just compute the magnitude response at whatever frequency you want to normalize. Most likely the normalization based on biquad coefficients that you've seen is simply the result of substituting z=1 (=normalize at DC) or z=-1 (=normalize at Nyquist) into the transfer function and applying some algebraic simplification.

Post

Thanks. It was really trivial high school math. All I needed was to find this formula, then finding K for Z = 1:

H(z) = K * (z - zero1) (z - zero2) ... ( z - zeroN) / (z - pole1) (z - pole2) ... ( z - poleN)

Post Reply

Return to “DSP and Plugin Development”