0
$\begingroup$

I am involved in designing a 10th order high pass filter with cutoff frequency 300Hz.

My hardware AIC3204 has a 5 biquads of direct form I, 24bit coefficient so I have chosen the FDA (filter design and anylysis) tool of MATLAB to design a 10th order filter and convert it to SOS sections 5 such and realize coefficients from it.

This is my procedure:

enter image description here

and realization of direct form I

enter image description here

Coefficients obtained as a file:

%
% Generated by MATLAB(R) 7.12 and the Signal Processing Toolbox 6.15.
%
% Generated on: 05-Aug-2013 15:26:23
%

% Coefficient Format: Hexadecimal

% Discrete-Time IIR Filter (real) 
% ------------------------------- 
% Filter Structure : Direct-Form I, Second-Order Sections
% Number of Sections : 5 
% Stable : Yes 
% Linear Phase : No 
% Arithmetic : fixed 
% Numerator : s24,22 -> [-2 2) 
% Denominator : s24,22 -> [-2 2) 
% Scale Values : s24,23 -> [-1 1) 
% Input : s16,15 -> [-1 1) 
% Output : s16,11 -> [-16 16) 
% Numerator State : s16,15 -> [-1 1) 
% Denominator State : s16,15 -> [-1 1) 
% Numerator Prod : s40,37 -> [-4 4) 
% Denominator Prod : s40,37 -> [-4 4) 
% Numerator Accum : s40,35 -> [-16 16) 
% Denominator Accum : s40,35 -> [-16 16) 
% Round Mode : convergent 
% Overflow Mode : wrap 
% Cast Before Sum : true


SOS matrix: 
400000 000000 c00000 400000 7ab444 3b9018 
400000 000000 c00000 400000 8bd4b8 377a90 
400000 000000 c00000 400000 7404d3 34d7f8 
400000 000000 c00000 400000 976d93 2b9955 
400000 000000 c00000 400000 067eae d364fd 

Scale Values: 
77c3b6 
77c3b6 
6f5fe0 
6f5fe0 
6c9b03

Is my approach correct?

How can these higher order SOS filters be realised?

$\endgroup$

1 Answer 1

1
$\begingroup$

Your basic approach seems correct so far. To implement your 2nd order filters you have to cascade the biquad filters, so that the output of the first feeds into the input of the next and so on.

This is due to the theorem that the overall transfer function $H(z)$ of $n$ cascaded subsystems is the multiplication of the transfer functions of the respective subsystems $H_i(z)$ like this

$$ H(z) = H_1(z) \cdot H_2(z) \cdot \,\, ... \, \cdot H_n(z)$$

So what Matlab gives you, are the coefficients $a_j$ and $b_j$ for the biquad filter transfer functions (called SOS matrix in your result): $$ H_{biquad}(z) = \frac{b_0 + b_1z^{-1} + b_2 z^{-2}}{1 + a_1z^{-1} + a_2 z^{-2}}$$

To implement it you should use the Direct Form I in time domain - its just the inverse Z-transform of the transfer function above:

$$y[n] = b_0 x[n] + b_1 x[n-1] + b_2x[n-2] - a_1y[n-1]-a_2y[n-2]$$

Now you just have to cascade the filters, so that the output $y[n]$ of the first feeds into the input $x[n]$ of the next biquad and so on.

You may also want to check a similar question asked here: How does cascading biquad sections for higher order filters work?

And also the documentation of the Matlab biquad filter where it tells you how the SOSMatrix and ScaleValues are defined: Matlab Biquad Documentation

$\endgroup$
2
  • $\begingroup$ in the above function Hbiquad my hardware filter has t/f like this H(z)=(N0+2N1*z-1+N2*z-2)/(2^23-2*D1*z-1-D2*z-2) i have set the filter arithmetic to 24 bit and what should be numerator fraction length and denom fractional length ? $\endgroup$
    – kakeh
    Oct 14, 2013 at 15:49
  • $\begingroup$ To get the coefficients you need based on your transfer function you can just equate the coefficients to get the same structure as in the $H_{biquad}$. Regarding the fraction lengths, I am not sure, because I have not implemented a biquad filter on a fixed-point arithmetic system. $\endgroup$
    – lmNt
    Oct 14, 2013 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.