WM8940
Pre-Production
+0
-5
R -10
E
S
P
-15
O
N
S
-20
E
-25
(dB)
-30
-35
-40
20
50
100
200
500
1k
2k
Frequency (Hz)
T
5k
10k
20k
Figure 48 Cumulative Notch + Low Pass Filters Responses (48kHz);
NF0 fc = 1kHz; NF1 fc = 5kHz; NF2 fc = 10kHz; LPF fc = 11kHz; fb = 100Hz, 600Hz, 2kHz
NOTCH FILTER WORKED EXAMPLE
The following example illustrates how to calculate the a0 and a1 coefficients for a desired centre frequency and -3dB
bandwidth.
fc = 1000 Hz
fb = 100 Hz
fs = 48000 Hz
w0 = 2πfc / fs = 2π x (1000 / 48000) = 0.1308996939 rads
wb = 2πfb / fs = 2π x (100 / 48000) = 0.01308996939 rads
a0
=
1− tan( wb
1+ tan(wb
/ 2)
/ 2)
=
1− tan(0.01308996939 / 2) = 0.9869949627
1+ tan(0.01308996939 / 2)
a1 = −(1+ a0 )cos(w0 ) = −(1+ 0.9869949627)cos(0.1308996939) = -1.969995945
NFn_A0 = -a0 x 213 = -8085 (rounded to nearest whole number)
NFn_A1 = -a1 x 212 = 8069 (rounded to nearest whole number)
These values are then converted to a 14-bit sign / magnitude notation:
NFn_A0[13] = 1; NFn_A0[12:0] = 13’h1F95; NFn_A0 = 14’h3F95 = 14’b11111110010101
NFn_A1[13] = 0; NFn_A1[12:0] = 13’h1F85; NFn_A1 = 14’h1F85 = 14’b01111110000101
w
Pre-Production, Rev 3.0, February 2007
82