Calculating Q factor for cascading biquads

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Thanks mystran and Z1202,

To set the Q values of a cascade with an overall response response < 0.5, I've set 1 filter to sqrt(0.5), and the second to the required Q factor * sqrt(2), giving the overall response I was after. Not sure if it's a correct approach, but it's a close approximation if not.

Post

Let fs,fc,q is the original biquard(order=2) input paramter of the cook book, if we want to improve the slope of filter, meanwhile enlarge the order, for example, N=2, pole number=4.
R=1/2/q;
if 0<R<1
just follow the VAFilter book, rotate the poles at unit circle, and calculate the q_new;
then re-calculate the coeffs by the cook book.
end
if R>1(meanwhile, q<0.5)
we can not use the rotate poles method, we need shirink the radii of the circle(scale the cutoff analog cutoff wc, then convert to fc!!!);
then calculate q_new = 1/2/cos(alpha(pole_index)).
end
Below is just discuss for R>1 case:
if N is even
isEven=1
else
isEven = 0
end
alpha = pi/N*(0.5*isEven+(0:1:N-1))
neg=1
wc = tan(fc/fs*pi);
for i=1:1:N
k = 1 + floor((i-isEven)/2)
q_new = 1/2/cos(alpha(k))
if N is even
shift_factor = (R+sqrt(R*R-1))^(neg/NN)
else if N is odd
if i==1
shift_factor = 1
else
shift_factor = (R+sqrt(R*R-1))^(neg/NN)
end
end
neg=-neg
wc_new = wc*shift_factor; %%shirink the radii of circles!!!
fc_new = atan(wc_new)*fs/pi
calc iir coef use cook book with fs, fc_new, q_new, store to sos array.
end
sos array would contains 2*6 coeffs if you want to get a 4 order new cascade filter

Post Reply

Return to “DSP and Plugin Development”