1 Introduction
A generalized set of equations is formulated for the design of first-order and second-order
low-pass and high-pass filters. A specialized set of equations is then given for the design of
parametric biquad EQ filters.
The parameters governing the characteristics of the filter are:
! filter cut-off frequency, f
! sampling rate (f
! Q factor
! boost/cut gain value at f
These parameters can be used to determine the coefficients of the filter transfer function.
The transfer function for a first-order filter in the digital z-domain can be written as:
H(z) = (b
And for a second-order filter as:
H(z) = (b
This document can be used in conjunction with all the ST digital audio devices having EAQ
filters onboard. These include STA309A, STA320, STA321, STA33xBW and several others.
+ b1.z-1) / (a0 + a1.z-1).
0
+ b1.z-1 + b2.z-2) / (a0 + a1.z-1+ a2.z-2).
0
AN2874
Applications note
BQD filter design equations
(-3 dB corner frequency)
C
).
S
.
C
February 2009 Rev 1 1/6
www.st.com
Low-pass and high-pass filter design AN2874
2 Low-pass and high-pass filter design
First-order filter design
As a first step to obtain the coefficients for the 1st-order low-pass or high-pass filter equation
on page 1, the following equations can be used:
θ
= 2 ∗ π ∗ fC / fS (= the normalized cut-off frequency)
C
K = tan(θ
α = 1 + K.
The denominator coefficients are identical for both low-pass and high-pass filters designed
for the same cut-off frequency and are computed as follows:
a
= 1
0
a
= -(1 - K) / α.
1
The numerator coefficients for a low-pass filter can be calculated as follows:
b
= K / α
0
b
= K / α.
1
The numerator coefficients for a high-pass filter can be calculated as follows:
b
= 1 / α
0
b
= -1 / α.
1
/ 2)
C
Second-order filter design
As a first step to obtain the coefficients for the 2nd-order low-pass or high-pass filter
equation on page 1, the following equations can be used:
θ
= 2 ∗ π ∗ fC / fS
C
K = tan(θ
W = K
α = 1 + K / Q + W.
The denominator coefficients are the same for both low-pass and high-pass filters designed
for the same cut-off frequency and are computed as follows:
a
= 1
0
a
= 2 * (W - 1) / α
1
a
= (1 - K / Q + W) / α.
2
The numerator coefficients for a low-pass filter can be calculated as follows:
b
= W / α
0
b
= 2 * W / α
1
b
= b0.
2
The numerator coefficients for a high-pass filter can be calculated as follow:
b
= 1 / α
0
b
= -2 / α
1
b
= b0.
2
/ 2)
C
2
2/6