Digital Signal Processing Reference
In-Depth Information
0 : 0201 0 : 0402 z 2
þ 0 : 0201 z 4
HðzÞ¼
1 2 : 1192 z 1
þ 2 : 6952 z 2
1 : 6924 z 3
þ 0 : 6414 z 4
wðnÞ¼xðnÞþ 2 : 1192 wðn 1 Þ 2 : 6952 wðn 2 Þþ 1 : 6924 wðn 3 Þ 0 : 6414 wðn 4 Þ
yðnÞ¼ 0 : 0201 wðnÞ 0 : 0402 wðn 2 Þþ 0 : 0201 wðn 4 Þ
Using MATLAB to calculate the scale factor S , it follows that
»
h
¼
impz([1],[1
2.1192 2.6952
1.6924 0.6414]);
»
sf
¼
sum(abs(h))
28.2196
Hence we choose S ¼ 32. To scale the filter coefficients in the Q-15 format, we use the factors A ¼ 4
and B ¼ 1. Then the developed DSP equations are
x s ðnÞ¼xðnÞ= 32
sf
¼
w s ðnÞ¼ 0 : 25 x s ðnÞþ 0 : 5298 w s ðn 1 Þ 0 : 6738 w s ðn 2 Þþ 0 : 4231 w s ðn 3 Þ 0 : 16035 w s ðn 4 Þ
wðnÞ¼ 4 w s ðnÞ
y s ðnÞ¼ 0 : 0201 wðnÞ 0 : 0402 wðn 2 Þþ 0 : 0201 wðn 4 Þ
yðnÞ¼ 32 y s ðnÞ
Using the method described in Section 9.5, we can convert filter coefficients into the Q-15 format; each
coefficient is listed in Table 9.4 .
Table 9.4 Filter Coefficients in Q-15 Format
IIR Filter
Filter Coefficients
Q-15 Format (Hex)
0.5298
0 43D0
a 1
0.6738
0 A9C1
a 2
0.4230
0 3628
a 3
0.16035
0 EB7A
a 4
0.0201
0
0293
b 0
0.0000
0
0000
b 1
0.0402
0
FADB
b 2
0.0000
0
000
b 3
0.0201
0
0293
b 4
 
Search WWH ::




Custom Search