Signal Processing 9 (1985) 245-251 North-Holland
245
C A S C A D E REALIZATION OF LINEAR P H A S E FIR FILTERS WITH LOW SENSITIVITY M. BHATTACHARYA Advanced Techniques Group, Electronics & Radar Development Establishment, Highgrounds, Bangalore-560 001, India
R.C. AGARWAL IBM T.J. Watson Research Center, Yorktown Heights, N Y 10598, U.S.A.
S.C. DUTTA ROY Department of Electrical Engineering, Indian Institute of Technology, Hauz Khas, New Delhi-110016, India Received 9 July 1984 Revised 10 May 1985
Abstract. The errors due to coefficient quantization in a digital filter are sensitive functions of its pole and zero locations. In this paper, a detailed analysis is made of the sensitivity, with respect to the location of zeros, of elemental fourth-order sections, for cascade realization of linear phase FIR filters. New structures are suggested for the realization of the sections with low sensitivity. Performance analysis of these structures in implementation of a few representative filters indicates their suitability for practical applications.
Zusammenfassung. Die Fehler, die v o n d e r Quantisierung der Koeffizienten eines digitalen Fiites herriihren, sind in hohem Maj~ v o n d e r Lage der Pole und Nullstellen des Filters abhfngig. Fiir elementare Filterstufen 2. und 4. Grades, wie sic fiir die Realisierung linearphasiger Filter in Kaskadenstruktur verwendet werden k6nnen, wird eine detaillierte Analyse der Empfindlichkeit der (Jbertragungsfunktion gegen Quantisierung abh/ingig yon der Lage der Nullstellen durchgefiihrt. Fiir die Realiserung von Filterstufen mit geringer Empfindlichkeit werden einige neue Strukturen vorgeschlagen. Die Analyse des Verhaltens wird anhand einiger repr/isentativer Beispiele durchgefiihrt; sie zeigt, daJ3 diese Strukturen fiir praktische Anwendungen geeignet sind. R~um6. Les erreurs dues ~ la quantification des coefficients d'un filtre num6rique sont li6es h la position des poles et des z6ros. La sensibilit6 des filtres non recursifs h phase lin6aire realis6s par une cascade de sections du second et du quatri6me ordre est analys6e par rapport ~. la position des z6ros. De nouvelles structures moins sensibles sont d6cdt6s. Ces structures sont utilis6es pour la r6alisation de quelques filtres typiques. Keywords. FIR filters, sensitivity, cascade realization.
1. Introduction Coefficient quantization is one of the major sources of error in implementation of digital filters. Truncation or rounding of a multiplier coefficient causes the realized transfer function to differ from the desired one, leading to the problem of coefficient sensitivity. While there exists a volume of literature pertaining to the appreciation and
minimization of the effects of coefficient sensitivity in the case of IIR filter structures (see e.g., [1-5]), relatively much less has been reported so far in the case of FIR filter structures [6-8]. Finite precision design algorithms are, however, available for such filters [9]. Herrmann and Schiiessler [6] considered the effects of parameter quantization in cascade realization of linear phase FIR filters, and suggested
0165-1684/85/$3.30 O 1985, Elsevier Science Publishers B.V. (North-Holland)
M. Bhattacharya et al. / Linear phase FIR filters
246
implementation of a fourth-order section having reciprocal pairs of complex conjugate zero pairs, as a cascade of two second-order sections; this requires five multiplications, of which one could be absorbed in scaling. Chan and Rabiner [7] made a detailed statistical analysis of quantization effects in the direct form FIR filters, and showed that a set of specifications under a given wordlength constraint can be transformed to another set of specifications without constraint. Any known design technique can then be used to obtain a filter with this latter set of specifications, which upon quantization to the given wordlength, will meet the desired specifications. Recently Mahanta, Agarwal, and Dutta Roy [8] have presented structures, known as modified direct form or 'nested' structures, which have low sensitivity and roundoff noise characteristics under fixed-point arithmetic implementation. For the direct form realization, it is clear that even if the coefficients are in error, the linearity of phase will be preserved. However, closely spaced zeros on the unit circle in the z-plane may move away from the unit circle, resulting in the system not meeting the specifications. For cascade realization the various types of elemental transfer functions are shown in Table 1 [1]. Hi(z) can be implemented accurately. In implementing H2(z)
Table 1 Types of elemental transfer functions in cascade realization of linear phase FIR filter Type
Transfer function
Location of zeros in terms of polar coordinates (r, 0)
Hi(z)
z-l+1
r = l , 0 = 0 , 7r
H2( z )
1--pz-l + z -2 p = ( r + l/r) cos O
1-az-l+bz-2-az-3+z
r~l,O=O,
Signal Processin8
where c=2r cos 0, d = r 2 and multiplication by 1/d can be absorbed in scaling. (This approach will hereafter be referred to as HS form of implementing H4(z).) In this paper, we present new structures for implementing the sensitive fourth-order sections in cascade realization of linear phase FIR filters. The structures, with appropriate choice of the sections depending on location of zeros, lead to cascade realization with less wordlength requirements than the direct form Nth-order realization.
2. New structures
Two structures F1 and F2 for implementing H4(z)'s are developed in a manner similar to that in [5], i.e. by replacing the basic building block viz. the unit delay operator z -1 by another building block.
2.1. Structure F1 In this structure, z -1 is replaced by
-4,
Z11, where (2)
Tr
r = 1, 0 ~ 0 , ~r
re±JO andl-e±J o, r
a = 2 c o s O(r+ l/r) b = 4 c o s 2 0 + r 2 + l / r 2,
1
H4(z)=-~(1-cz-l+dz-2)(d-cz-l+z -2) (1)
z~-1 = z -1 - 1.
=2cos 0
n,(z)
for complex conjugate zeros on the unit circle, rounding of the coefficient can lead to movement of such zeros on the unit circle; real zeros, after quantization would remain real as ]Pl is more than 2 in such cases. Implementation of H4(z) with reduced sensitivity, along with preservation of linearity in phase, can be achieved by cascading two second-order sections [2, 6] as follows
r # l , 0 ~ 0 , cr
Figures l(a) and l(c) show the z~-1 block and the realization of H4(z), respectively. In Fig. l(c), also shown are the scaling factors and noise sources due to roundoff after multiplication. The modified coefficients are given by
al=b+2-2a,
b~=4-a.
(3)
247
M. Bhattacharya et al. / Linear phase FIR filters
(o)
(b) e 2 (n)
Si- 1 I Ig. I
t-1
:L I
x(n)~el(n)
(s,-2 / s~-~)
(sWsO
<~ ez(n)
Si-i I I
I gi-1
IL I
x(n)~~el(n) ( s~_~/s
~,(n) i-1
)
(s~_,/s~)
~d~
Fig. 1. (a) z~-1 block; (b) z21 block; (c) and (d) F1 and F2 realization of H4(z) section, respectively. is defined as
2.2. Structure F2
Here, z -1 is replaced by z~-I, where
x, 0[HI (4)
2"21 = 2 "-1 "~ 1.
Figures l(b) and l(d) show the z~-1 block and the realization of H4(z), respectively. In this case, the modified coefficients are given by a2=b+2+2a,
b2=-4-a.
(5)
3. Sensitivity analysis
S~, - [H I Oxi x,
4HI2
where the latter expression is useful in evaluation of Sx, in many cases. The deviation in [H I is given by A[H[ = [HI Y, S~, f
The sensitivity of the transfer function magnitude [H[ with respect to a multiplier coefficient xi
(6)
21Ht 2 3Xi
AX i
.
(7)
Xf
Using (6) the sensitivities for canonic forms are Vol. 9, No. 4, December 1985
M. Bhanacharya et aL / Linear phase FIR filters
248 Table 2
Peak sensitivity values for various structures for several values of 8 and 0
8
0
0/8
S~p
Shy
So,.
Sblp
Sop
Sap
0.001 0.001 0.001 0.001
0.01 0.005 0.002 0.0005
10 5 2 0.5
1.990E+ 7.407E+ 4.444E + 1.600E+
1.492E+ 10 5.555E+10 3.333E + 11 1.200E+ 12
25.368 6.231 1.278 0.600
47.941 11.692 1.075 0.231
111351.112 251090.384 1064797.738 3988017.491
55169.708 125018.763 531601.533 2000986.017
0.01 0.01 0.01 0.01
0.1 0.05 0.02 0.005
10 5 2 0.5
1961932.868 7837486.450 49290356.68 499020710.8
1476412.889 5882544.169 36971915.86 374270462.3
25.231 6.641 1.547 0.990
48.960 11.766 1.478 0.376
1095.948 2426.575 8060.613 31201.570
500.535 1163.061 3983.693 15442.479
0.1 0.1 0.1 0.1
1 0.5 0.2 0.05
10 5 2 0.5
74.932 606.407 4395.284 42967.629
101.675 496.326 3325.442 32274.306
27.405 6.343 1.468 0.990
53.161 11.197 1.3123 0.385
6.532 21.057 77.257 288.658
9.164 12.194 35.309 129.849
10 10 11 12
obtained as Sa = - 2 a cos w / ( b - 2 a
cos w + 2 cos 2w),
Sb = b / ( b - 2 a cos w + 2 cos 2w)
(8) (9)
for H4(z), where w is the angular frequency, with the sampling angular frequency being normalized to 2~r radians. The corresponding expressions for sensitivities in the new structures and in the HS form are given by S~, = a~/ ( b - 2a cos w + 2 cos 2w) = - [ a l / ( 2 a cos w)]S~,
(10)
Sb, = 2bl(cos w - 1)/(b - 2 a cos w + 2 cos 2w)
= [(2bl(cos w - 1)/b)]Sb, S~2= a 2 / ( b - 2 a
(11)
cos w + 2 cos 2w)
= - [ a E / ( 2 a cos w)]Sa,
(12)
Sh = 2bE(COS w + 1 ) / ( b - 2 a cos w + 2 cos 2w) = [2b2(cos w + 1)/b]Sb
(13)
Sc = 2 c [ c - (1 + d) cos w]/q,
(14)
Sd = 2d[ d - c cos w + cos 2w]/ q
(15)
and
with q = (1 + c2+ d 2) - 2 ( c + cd) cos w + 2 d cos 2w. Sisnal Processing
As in [5], we adopt peak value of the sensitivity of the transfer function magnitude IHI as a measure for comparing various structures. Variation of this peak value with parameters (8, 0), defining the location of zeros, where t~ = l - r ,
(16)
i.e., radial distance of zeros from the unit circle will identify the regions in the z-plane with large values of sensitivity. Also, comparison with similar characteristics for other structures will indicate the region where one structure should be preferrred to others. In Table 2, we give the peak values of sensitivities for the structures, except F2. In the appendix, it is shown that sensitivity characteristics of F2 structure is complementary in nature to F1, i.e. sensitivity characteristics of F2 with angular locations (Tr - 0) of zeros are the same as those of F1 structure with angular location of 0 of zeros. From Table 2 we find that F1 is better than the other structures for small values of 0 and B. Similarly, F2 will be better than others for large values of 0 (i.e., close to rr) and small 8. In Table 3, we also provide the approximate expressions for peak sensitivities of various structures for small 8 and 0 values, which will indicate the order of magnitude of various peak sensitivities. Hence, depending on angular location of zeros, appropri-
M. Bhattacharya et al. / Linear phase FIR filters
249
Table 3
Table 4
Approximate values of peak sensitivities for different structures for small values of 6 and 0
Wordlength requirement in selected sections
0>>6 1
Direct realization
Filter No.
1
2
Type Length N Passband edge Stopband edge 61
Lowpass 24 0.08 0.16 0.01243364 0.01243364 One H4(z) in F1 form
Differentiator 32 0.5 (Full band) -0.00620231 -(i) Two H4(z)'s in F1 form (ii) Two H4(z)'s in F2 form
13 16 17
16 17 20
0<<6 8
Sap ~ t~202
Sap ---~~
3 Sbp ~ 46202
Sb ~
6
62
02 F1 realization
Sa~"~ 02
Herrmann & Sch/iessler realization
Number, type of selected sections and type of structure chosen Wordlength (bits) for achieving specification with realization in: (i) F1/F2 form (ii) HS form (iii) Canonic form
Sa~"~ 1 202
S~,,~ ~-~
S~,~~ ~-:
1 SoP ~ 8-0
4 SoP ~ ~2
1
Sdp ~ 260
Sd
2
62
ate structure could be chosen for sensitive sections (i.e. with small 6 and small 0) for low sensitivity realization.
Notes: (a) Filter examples are taken from [10]. (b) 81 in the case of differentiator refers to deviation in slope. For the other case, 6 t and 62 refer to standard convention for passband and stopband specification as in [10].
4. Performance analysis 4.1. W o r d l e n g t h requirements Quantization
Table 5
effects, u n d e r
f i x e d - p o i n t arith-
m e t i c o n t w o filters as g i v e n in [10] w e r e s t u d i e d in t w o p h a s e s . I n t h e first p h a s e , d e p e n d i n g o n t h e
Wordlength requirement and type of structures for all sections except of the type Ht(z) Filter No.
1
2
Number of H2(z)'s
9 Sections in canonic form; 11 bits
1 Section in canonic form; 15 bits
Number of
1
7
F1 form; 13 bits (or 16 bits by HS form)
(i) 2 Sections each by F1 and F2; 16 bits (or 17 bits by HS form) (ii) 3 Sections in canonic form; 15 bits
(6, 0) p a r a m e t e r s t h e s e n s i t i v e f o u r t h - o r d e r sections
were
selected
for
implementation
by
appropriate low sensitivity structure. Assuming the rest o f t h e s e c t i o n s to b e r e a l i z e d w i t h infinite p r e c i s i o n , w o r d l e n g t h r e q u i r e m e n t for c o e f f i c i e n t s
H4(z)'s
in s e l e c t e d s e c t i o n s w e r e c o m p u t e d to m e e t t h e
Structure for H4(z)'s
t o l e r a n c e s p e c i f i c a t i o n s . S i m i l a r c o m p u t a t i o n was c a r r i e d o u t w i t h t h e s e l e c t e d s e c t i o n s in c a n o n i c and HS forms. Table 4 illustrates the improvement in w o r d l e n g t h . In
the
second
phase,
selected
sections
are
a s s u m e d to b e r e a l i z e d b y s t r u c t u r e s w i t h s p e c i f i c w o r d l e n g t h f o r m u l t i p l i e r s , as i n d i c a t e d in T a b l e 4. T h e n t h e w o r d l e n g t h r e q u i r e m e n t for o t h e r sections
were
computed.
In Table
Wordlength 17 (bits) for direct Nth-order realization
20
5, w o r d l e n g t h Vol. 9, No. 4, December 1985
250
M. Bhattacharya et al. / Linear phase FIR filters
requirement for multipliers of the various sections are given along with the same required for direct Nth-order realization. This illustrates the extent of overall improvement by cascade realization employing our schemes. Two observations deserve specific mention. It is well known that due to problems of coefficient sensitivity and roundott noise, cascade realization is preferred over direct Nth-order realization in the case of IIR filters. When the problem of coefficient sensitivity alone is considered, the same is found to be true in the case of FIR filters, irrespective of the design algorithms by which the transfer function is derived. For example, it was seen that a filter of length N = 29 derived from finite precision design algorithm with same passband and stopband specifications as that of Filter 1, while being realized with nine bits in direct Nth-order form, could be realized in cascade form with seven bits for one fourth-order section employing our structure and with six bits for the rest of the sections in canonic form. Secondly, the example of Filter 1 here is the same as lowpass filter example 1 of [8]. Referring to Table IV of [8] which shows the improvement in passband and stopband specifications with increasing wordlength, it is seen that use of nested form of [8] required eleven bits, while use of schemes given here requires thirteen bits for the fourth-order section and eleven bits for other sections. Noting that the magnitude of the coefficients in nested form are always between 0.5 and 1 (i.e., full utilization of wordlength is possible), and that in our case, for some multipliers there will be a few zero-value bits preceding the leading non-zero bit, we find that cascade realizations employing the new structures are just marginally inferior to the nested form in [8].
4.2. Noise aspect In Figs. 1(c) and l(d), the realization of a fourth order section are shown in detail where el(n) through e4(n) are the roundoff noise sources. We Signal Processing
use sum scaling, where Si = ~ If(k)l k
(17)
with f ( k ) as the unscaled impulse response function from the input to the point shown and gi(k) is the unscaled impulse response function from the point shown to the output. Further, Si's are adjusted as powers of two so that multiplication by scale factors like S~_~/Si are achieved by wordshifts only; the scaling procedure is the same for the other sections. Using section ordering algorithm of [ 11 ] for cascading, the ratio of Signalto-Noise ratio (SNR) in cascade realization with respect to that in direct Nth-order realization was evaluated to be -7.96 dB and -8.52 dB for Filters 1 and 2, respectively. This shows that SNR degradation is of the order of one bit, in effect.
4.3. Computational considerations In general, any effort to reduce sensitivity is associated with a certain amount of additional computation (see for example [5, 6]). From Fig. 1, we see that implementation of H4(z) would need five extra additions as compared to the canonic form. But, these additional computations would be needed only for those sections selected for implementation by F1/F2 structures, depending on (/~, 0) parameters. We note that realization in HS form would need 2 M additional multiplications for implementing M fourth-order sections.
5. Conclusions
While cascade realization of FIR filter is associated with increased roundoff noise, it is advantageous over direct Nth-order realization in respect of wordlength requirement. Use of low sensitivity structures for selected sections depending on (6, 0) parameters along with use of section ordering algorithm leads to cascade realization of FIR filters, which, as seen from performance analysis of different filter implementations, provides an
M. Bhattacharya et al. / Linear phase FIR filters
attractive alternative to direct Nth-order realization.
251
Hence we see that values of Sa~ and S~ at ( a t - w) are the same as those o f S,, and Sb~ at w, respectively. As such, F1 and F2 structures are complementary.
Appendix Consider two fourth-order sections, the first with coefficients a and b and zero location 0 being realized by F1, the second one with coefficients a~ and b~ with zero location ( ~ r - 0 ) = 0n being realized by F2. From Table 1,
a ~ = 2 cos =-2
G,(r+l/r)
cos O ( r + l / r ) = - a , (A1)
b~ -- 4 cos 2 0 , , + r 2 + 1 / r 2 =4cos 20+r2+l/r2=b. U s i n g (3), (5) a n d (A1) a2-- b ~ + 2 + 2 a ~ , = b + 2 - 2 a
= al (A2)
b2 = - 4 -
a~=-4+
a =-bl.
A t a n g l e (~r - w), u s i n g (A2), (10) a n d (12),
Sa~ = - a 2 / [ b ~ - 2a= c o s ( w - w) + 2 cos 2 ( r r - w)]
=-al/[b-2a = Sa,
cos w + 2 cos 2w]
e v a l u a t e d at w.
S i m i l a r l y , f r o m (13), ( A 2 ) , a n d (11)
Sb2 = 2b2[cos( "rr - w) +
/[b=-2a~
1]
c o s ( w - w ) + 2 cos 2(~r- w)]
=2bl(COS w-1)/[b-2a
= Sh,
evaluated at w.
cos w + 2 cos 2w]
References [1] L.R. Rabiner and B, Gold, Theory and Application of Digital Signal Processing, Prentice-Hall, New Jersey, 1975. [2] A.V. Oppenheim and R.W. Schafer, Digital SignaIProcessing, Prentice-Hall, New Jersey, 1975. [3] L.R. Rabiner and C.M. Radar, Eds., Digital Signal Processing, IEEE Press, New York, 1972. [4] Digital Signal Processing Committee, Ed., Selected Papers in Digital Signal Processing, II, IEEE Press, New York, 1976. [5] R.C. Agarwal and C.S. Burrus, "New recursive digital filter structures having very low sensitivity and roundoff noise", IEEE Trans. Circuits Syst., Vol. CAS-22, Dec. 1975, pp. 921-927. [6] O. Herrmann and W. Schiiessler, "On the accuracy problem in the design of non-recursive digital filters", Arch. Elek. Ubertragung., Vol. 24, 1970, pp. 525-526. [7] D.S.K. Chan and L.R. Rabiner, "Analysis of quantization errors in the direct form for finite impulse response digital filters", IEEE Trans. Audio Electroacoust., Vol. AU-21, Aug. 1973, pp. 354-366. [8] A. Mahanta, R.C. Agarwal and S.C. Dutta Roy, "FIR filter structures having low sensitivity and roundoff noise", IEEE Trans. Acoust., Speech, Signal Processing, Vol. ASSP30, Dec. 1982, pp. 913-920. [9] Digital Signal Processing Committee, Ed., Programs for Digital Signal Processing, IEEE Press, New York, 1979. [10] J.H. McClellan, T.W. Parks and L.R, Rabiner, "A computer program for designing optimum FIR linear phase digital filters", IEEE Trans. Audio Electroacoust., Vol. AU-21, Dec. 1973, pp. 505-526. [11] D.S.K. Chan and L.R. Rabiner, "An algorithm for minimizing roundoff noise in cascade realizations of finite impulse response digital filters", Bell Sys. Tech. J., Vol. 52, Mar. 1973, pp. 347-385. [12] D.S.K. Chan and L.R. Rabiner, "Theory ofroundoff noise in cascade realizations of finite impulse response digital filters", Bell Sys. Tech. J., Vol. 52, Mar. 1973, pp. 329-345.
Vol. 9, No. 4, Deccmbcr 1985