A modified lattice structure with pleasant scaling ... - Semantic Scholar

Report 0 Downloads 19 Views
IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. XX, NO. Y, MONTH 1999

1

A modi ed lattice structure with pleasant scaling properties Jean Laroche Abstract | This communication presents a modi ed latThe standard IIR and FIR lattice lters are depicted tice structure for IIR lters, which exhibits pleasant scaling in Fig. 1. The transfer function of the IIR lter can be properties at no additional computational or memory cost when expressed as the re ection coecients are close to 1. With this structure, the gain at the resonance of a second-order purely-recursive section is nearly independent of the bandwidth. Hs (z ) = A(1z ) = 1 ? ap z ?1 ?1 ::: ? ap z ?p p 1

I. Introduction

L

ATTICE and ladder implementations of IIR and FIR lters have been in use for many years for example for speech synthesis/coding, or simply to implement equalizing lters [5]. Their stability is preserved under linear interpolation of their coecients, which makes them quite attractive for lters whose coecients must vary from frame to frame (as in speech coding). However, lattice lters are not immune from scaling problems which can occur for example when poles are close to the unit circle. The signal is then subjected to a high level of ampli cation, which can result in saturation or over ow. This is especially bothering when implementing equalizing or shelving lters, for which small bandwidths are often desirable. Many strategies can be used to avoid scaling problems in lattice lters (as in any other kind of lters), most of which involve additional multipliers. The structure presented in this paper is almost identical to the standard lattice structure, and requires the same number of additions, multiplications and delay memories, but has the advantage of applying a scaling to the signal which depends on the values of the lter coecients. For IIR lters, this automatic scaling counteracts the ampli cation brought by poles close to the unit circle, and helps prevent over ow.

II. Background: the standard lattice IIR and FIR filters y

x -k p-1

-k p

-k 1

where p is the number of sections in the lter. The coecients api of polynomial A(z ) can be obtained from the re ection coecients ki via the Levinson recursion [6][4][2]. This lter is thus a purely recursive lter with no zeros and no input or output scaling. The transfer function of the FIR lattice lter can be expressed as Hs (z ) = B (z ) where B (z ) is a p-degree polynomial in z ?1, p being the number of sections in the lter. Again, the coecients of polynomial B (z ) can be obtained from the re ection coecients ki via the Levinson recursion. This lter is thus an all-zero lter.

III. The reverse-lattice filters and their scaling properties

By simply inverting the direction of the criss-cross signal paths in Fig. 1, we obtain what we call the reverse-lattice IIR lter, depicted in Fig. 2. As shown in appendix I, the x

y -k p kp

u

-1

-k p-1

-k 1

kp-1

k1 -1

z

z

z-1

Fig. 2. Reverse IIR lattice lter.

transfer function of this new structure is given by

Hr (z ) =

Qp

p 2 i=0 (1 ? ki ) = Y(1 ? k 2 ) i A(z ) i=0

Hs (z )

(1)

which shows that reversing the direction of the arrows merely introduces a normalization factor, but does not modify the recursive structure of the lter. Interestingly, Q y x the scaling by pi=0 (1 ? ki2 ) in the transfer function is disk k k tributed over all the sections that compose the lter: the signals in the upper and lower branches of the lattice lter k k k are scaled at the output of section i by (1 ? ki2 ). These u z z z scaling factors are useful because they counteract the large signal ampli cation that results from having near-unity reFig. 1. Standard IIR (top) and FIR (bottom) lattice lters.

ection coecients ki  1 for some i. In such cases, the 2 Jean Laroche is with the Joint Creative/Emu Technology Center, term (1 ? ki ) becomes smaller as the magnitude of ki apScotts Valley, USA. email: [email protected] proaches 1. kp

kp-1

u

k1

-1

-1

z

p-1

p

p

-1

z-1

z

1

1

p-1

-1

-1

2

IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. XX, NO. Y, MONTH 1999

By reversing the directions of the arrows in the FIR lat- Under the same assumption r  1 as in Eq. (4), the nutice lter, one obtains the "reverse-lattice" FIR lter whose merator in the reverse-lattice transfer function Eq. (3) can be approximated by transfer function is easily shown to be (1 ? k12 )(1 ? k22 ) = (1 ? k12 )(1 ? k2 )(1 + k2 )  2(1 ? k12 )(1 ? k2 )

Hr (z ) = Qp B(1(z?) k2 ) i i=0

because k2  1. Multiplying the gain at the resonance of the standard lattice structure in Eq. (4) by the previous expression yields the gain at the resonance for the reverselattice structure: 2 )(1 ? k2 ) jHr (!r )j  2(1 ? k1 p (1 ? k2 ) 1 ? k12 (5) q 2  2 1 ? k1  2j sin !0 j This expression shows that the gain at the resonance 10

0

−10 r=0.8 −20 Amplitude in dB

where B (z ) is the same polynomial as in the standard FIR lattice lter. This results is quite simply the inverse of the result in the QIIR case: the transfer function is scaled by the factor 1= pi=0 (1 ? ki2 ) which is larger than 1 and can become extremely large when the re ection coecients approach 1 in magnitude. This type of scaling is not desirable in practice because it is likely to generate saturation problems. Example: a second-order lter. To illustrate the scaling bene ts brought by the reverse-lattice topology, let us consider an second-order section both in its standard lattice and reverse-lattice implementations. For a regular lattice implementation (or a Direct-Form implementation) the all-pole transfer function between x and y can be expressed in terms of the radius r and the angle !0 of the poles, as well as in terms of the re ection coecients k1 and k2 , via the Levinson recursion: Hs (z ) = 1 ? a z ?11 ? a z ?2 1 2 1 = 1 ? 2r cos ! z ?1 + r2 z ?2 (2) 0 = 1 + k (1 + k 1)z ?1 + k z ?2 1 2 2

−30

r=0.974

−40

−50

r=0.999

−60

where we assumed that the second-order section has two complex conjugate poles. From this, we have k2 = r2 and r cos2 !0 . When the reverse-lattice structure is used k1 = ?21+ r instead, the transfer function becomes: Fig. 3. Frequency response of the reverse-lattice second-order lter with a constant pole angle !0 = =4 and pole radii varying from 2 )(1 ? k 2 ) 0.8 to 0.999 (1 ? k (3) Hr (z ) = 1 + k (1 + k1 )z ?1 +2 k z ?2 1 2 2 −70

It is a standard result that for the transfer function in Eq. (2), the gain at the true resonance !r (which di ers from the pole angle !) is exactly given by 0

r cos2 !0  When r is close to 1 (large resonance), k1 = ?21+ r ? cos !0 and the gain at the resonance of the regular lattice second-order section can be approximated in terms of the re ection coecients as: 1p (4) jHs (!r )j = (1 ? k2 ) 1 ? k12

0.05

0.1

0.15

0.2 0.25 0.3 Normalized frequency

0.35

0.4

0.45

0.5

40 r=0.999 30

20 Amplitude in dB

jHs (!r )j = (1 ? r2 )1j sin ! j

0

10 r=0.8

0

−10

−20

which shows that in the direct-form and the regular lattice implementations, the gain at the resonance becomes Fig. 4. Frequency response of the standard lattice second-order lter arbitrarily large as k2 = r2 approaches 1. We will see that with a constant pole angle !0 = =4 and pole radii varying from this is not the case for the reverse-lattice implementation. 0.8 to 0.999 0

0.05

0.1

0.15

0.2 0.25 0.3 Normalized frequency

0.35

0.4

0.45

0.5

LAROCHE: A MODIFIED LATTICE STRUCTURE WITH PLEASANT SCALING PROPERTIES

for the reverse-lattice structure is approximately independent of the pole radius. As long as the pole angle is constant, and the radius close to 1, the resonance gain of the reverse-lattice remains approximately constant. This is illustrated in Fig. 3 which displays the frequency response of the reverse-lattice when the pole radius is varied between :8 and :99 while the angle remains xed at =4. This behavior can be desirable in practice: if the all-pole output y is used, then the gain of the lter is decoupled from the bandwidth, which is useful for audio applications such as equalization or shelving lters. If the all-pass output u is used, then the automatic scaling ensures that the signals in the delay elements do not exceed the dynamic range, a useful feature for xed-point implementations. By contrast, Fig. 4 presents the frequency response of the standard lattice topology in the same conditions. Additional scaling would be required in that case to either decouple gain and bandwidth, or avoid internal signal over ow. As the angle comes closer to 0, the gain at the resonance becomes smaller and smaller because of the term sin !0 in Eq. (5). While this may not be ideal (one might prefer the gain to remain approximatively independent of the resonant frequency), it still seems more desirable than in the standard lattice case Eq. (4) where the gain can reach extremely large values when the resonant frequency approaches DC. It is also possible to reverse the direction of the crisscross signal paths selectively in certain sections of the lter and not in others. It is straightforward to show that the resulting transfer function for the IIR case becomes: Q 2 Hm (z ) = i2EA(1(z?) ki ) where E contains the indexes of the sections whose arrows have been reversed. For example, Fig. 5 shows the topoly

x

u

-k 2

-k 1

k2

k1 z-1

3

normalization (the power of the output noise is equal to the power of the uncorrelated input noise). The so-called reverse-lattice is not normalized in any exact sense, although in the second-order case, one might argue it is approximately normalized to the resonance gain, for any given resonance frequency. For higher-order lters, the automatic scaling helps reduce internal over ow problems resulting from the use of near-unity re ection coecients. The modi ed structure can be used as part of a mixed lattice-ladder ARMA lter as a replacement for the standard lattice structure, yielding an ARMA lter with good scaling properties. Note that this desirable feature comes at no additional cost since the reverse-lattice structure requires the same number of additions, multiplications and delays as the standard lattice structure2.

References

[1] J. Dattorro. The implementation of recursive digital lters for high- delity audio. J. Audio Eng. Soc., 36(11):851|878, Nov 1988. [2] A. H. Gray and J. D. Markel. Digital lattice and ladder lter synthesis. IEEE Trans. Audio and Electroacoust., AU-21(6):491{ 500, Dec 1973. [3] A. H. Gray and J. D. Markel. A normalized digital lter structure. IEEE Trans. Acoust., Speech, Signal Processing, 23(3):268{277, Jun 1975. [4] J. D. Markel and A. H. Gray. Fixed point implementation algorithms for a class of orthogonal polynomial lter structures. IEEE Trans. Acoust., Speech, Signal Processing, 23:486{494, Oct 1975. [5] D. C. Massie. An engineering study of the four-multiply normalized ladder lter. J. Audio Eng. Soc., 41(7-8):564{582, jul-aug 1993. [6] B. Picinbono. Theorie des signaux et des systemes avec problemes resolus. Collection Pedagogique de Telecommunication. Dunod, Paris, 1989.

Appendix I. Transfer function of the reverse IIR lattice

In this section, we derive the relation between the transfer functions of the reverse-lattice IIR lter, and of the reverse-lattice IIR lter. Fig. 6 depicts a standard and a xi

z-1

xi-1

x i-1

-k i

-k i

ki

ki

ui

Fig. 5. Mixed standard/reverse IIR lattice lter.

xi

z-1

ui-1

ui

ui-1

z-1

Fig. 6. The standard (left) and reverse (right) IIR sections.

ogy of a second-order purely recursive lter where only section 2 is "reversed". Its transfer function is reverse-lattice section. For the standard lattice section, it 2 1 ? k is easy to verify that the Z-transforms of the input and the 2 Hm (z ) = 1 + k (1 + k )z ?1 + k z ?2 output of each section can be related in a matrix form as: 1 2 2

IV. Conclusion

This paper presented yet another lattice structure that is "normalized" in some sense. Other examples include the Kelly-Lochbaum ladder structure [1] which can be proved to exhibit DC normalization1 or the normalized ladder structure [3] which exhibits uncorrelated noise power













Xi (z ) = 1 ki z ?1 Xi?1 (z ) = M Xi?1 (z ) i Ui?1 (z ) Ui (z ) ki z ?1 Ui?1 (z )



or

2 Strictly speaking, if only the pole-only output y of the IIR lter is used (and not the allpass output u), the leftmost lower multiplication 1 The author thanks Dana Massie and Dave Rossum for pointing by k in the standard lattice can be eliminated, which is not the case in the reverse-lattice. out this fact.

4

IEEE TRANSACTIONS ON SIGNAL PROCESSING, VOL. XX, NO. Y, MONTH 1999 







Xi?1 (z ) = M ?1 Xi (z ) (6) i Ui (z ) Ui?1 (z ) assuming matrix Mi is non-singular. The input-output re-

lation for the reverse-lattice section is quite similar:      Xi (z ) = 1 1 ki z ?1 Xi?1 (z ) or Ui (z ) 1 ? ki2 ki z ?1 Ui?1 (z ) 





Xi?1 (z ) = (1 ? k2 )M ?1 Xi (z ) i i Ui (z ) Ui?1 (z )



(7)

Comparing Eq. (6) and Eq. (7) reveals that the signals at the righ-hand side of each reverse-lattice section is scaled by the factor (1 ? ki2) but otherwise identical to those in the standard lattice section. As a result, the overall reverselattice transfer-function is that of the standard lattice lter scaled by the product of the normalizing factors:

Hr (z ) =

p Y i=0

(1 ? ki2 ) Hs (z )

It is easy to check that the transfer function Hxu (z ) between xi and ui remains allpass, as in the standard case, because the scaling factor (1 ? ki2 ) appears in both the numerator and the denominator of Hxu (z ).