I am implementing EQ lines in my filter. I need to do biquad with slope 24 db/oct, 36/oct and bigger so I would like to cascade several biquads. I am stuck with calculating frequency response of two biquads - now I am able to calculate magnitude and phase and draw one curve (peak filter). Should I multiply this response by itself? Thank you in advance for the answers.

The application of a filter to a signal in the time domain is defined as convolution. Convolution in the time domain is mathematically equivalent to multiplication in the frequency domain. So if we filter a signal, and then filter the output of the first filter, this is equivalent to multiplying the signal by both filters in the frequency domain. Therefor, this is equivalent to filtering with a third single filter whose frequency response is equal to the product of the first two filters’ frequency responses. Because frequency responses are complex numbers, the resulting magnitude is equal to the product of the two input magnitudes and the resulting phase is the sum of the input phases. This can be easily extrapolated for more than two filters as well.

Should I multiply this response by itself?

The transfer function of some cascaded biquads is simply the complex multiplication of the individual transfer functions, i.e. magnitudes are multiplied and phases are added.

It's much more efficient to design the filter at the desired order and property and then break it into biquads than the other way around. If you want a 36dB/octave filter, just design a 6th order Butterworth filter and don't cascade three second order Butterworth filters.

• Note that magnitude as a ratio is multiplied. If you're using magnitude in dB then you add them -- because a dB is log ratio, and log this + log that = log (this * that). Dec 2 '20 at 18:55
• Maybe it's just semantics but "magnitude" means linear amplitude and once it's in dB I would call it either "log magnitude" or just level. Dec 3 '20 at 18:00
• It is "just" semantics -- but that doesn't mean it won't tangle people up. "Log magnitude" certainly clarifies the meaning -- or saying "the magnitude is 20dBm" is pretty unambiguous. Dec 3 '20 at 22:26

Thank you for the answer, but i need some clarification - i think i am missing something important to draw this plot. I am doing steps below:

1. calculate in for loop freq response of standard biquad (peak) and get array of complex responses
2. get abs() from each response and it gives me magnitude for given frequency on plot
3. do 20 * log10(magn) to get values in dB and i am getting for example peak line with min in -9dB
4. Phase i am calculating for each magnitude in first biquad using atan2(imag(freqRes)/real(freqRes)).

Then i am trying to calculate 4th order so cascading the biquad:

1. each complex response from previous biquad i am multiplying by itself (freqRes)^2
2. an multiply it by exp(2jphase) so (freqRes)^2 * (cos(2jphase) + sin(2j*phase)
3. and do an abs() and 20log() from this value

I am getting incorrect values - instead of curve with max/min gain in -9 dB and steeper slope i have -18 dB. Maybe i am using phase incorrectly?

• Hello @Mike91, I am assuming you are the OP. Instead of posting an answer as an extension to your initial question, please use the same account used when posting the initial question and edit the question there with the clarifications needed. Dec 2 '20 at 8:54
• Hello @Gilles, actually i post questions as guest without account and don't have access to it. Dec 2 '20 at 9:43
• it's best you open an account if you want a better follow up. Also to better comment on the answers people freely provide to your question, and if satisfied to upvote/accept those answers. Dec 2 '20 at 10:26