Digital Signal Processing Reference
In-Depth Information
1
A wðnÞ¼
1
A xðnÞ
1
A a 1 wðn 1 Þ
1
A a 2 wðn 2 Þ/
1
A a M wðn MÞ
w s ðnÞ¼
wðnÞ¼A w s ðnÞ
Similarly, scaling the second equation yields
1
B yðnÞ¼
1
B b 0 wðnÞþ
1
B b 1 wðn 1 Þþ/þ
1
B b M wðn MÞ
y s ðnÞ¼
and
yðnÞ¼B y s ðnÞ
To avoid the first adder overflow (first equation), the scale factor S can be safely determined by
Equation (9.3) :
S ¼ I max ðjhð 0 Þj þ jhð 1 Þj þ jhð 2 Þj þ/Þ
(9.3)
where hðkÞ is the impulse response due to the denominator polynomial of the IIR filter, where the poles
can cause a larger value to the first sum. Hence, h(k) is given by
hðnÞ¼Z 1
1
(9.4)
1 þ a 1 z 1
þ/þ az M
All the scale factors A , B , and S are usually chosen to be a power of 2, respectively, so that the shift
operations can be used in the coding process. Example 9.15 serves as illustration.
EXAMPLE 9.15
Given the IIR filter
yðnÞ¼0:75xðnÞþ1:49xðn 1Þþ0:75xðn 2Þ1:52yðn 1Þ0:64yðn 2Þ
with a passband gain of 1 and a full range of input, use the direct-form II implementation to develop the DSP
implementation equations in the Q-15 fixed-point system.
Solution:
The difference equations without scaling in the direct-form II implementation are given by
wðnÞ¼xðnÞ1:52wðn 1Þ0:64wðn 2Þ
yðnÞ¼0:75wðnÞþ1:49wðn 1Þþ0:75wðn 2Þ
To prevent overflow in the first adder, we obtain the reciprocal of the denominator polynomial as
1
1 þ 1:52z 1 þ 0:64z 2
AðzÞ¼
Using the MATLAB function impz() leads to:
>> h ¼ impz(1,[1 1.52 0.64]);
>> sf
¼
sum(abs(h))
sf
¼
10.4093
 
Search WWH ::




Custom Search