View metadata, citation and similar papers at core.ac.uk brought to you by CORE

provided by CiteSeerX

MINIMUM-PHASE FIR FILTER DESIGN USING REAL CEPSTRUM

Soo-Chang Pei, and Huei-Shan Lin Department of Electrical Engineering National Taiwan University Taipei, Taiwan 10617, R.O.C Email: [email protected], FAX: 886-2-23671909

ABSTRACT linear phase filter is not equiripple in the stop band, we The real cepstrum is used to design an arbitrary length cannot merely shift up its to get the minimum-phase FIR filter from a mixed-phase sequence. sequence with double zeros for its z-transform. Moreover, There is no need to start with the odd-length equiripple the minimum phase filter magnitude response becomes linear-phase sequence first. Neither phase-unwrapping nor square root of the original one by keeping half the zeros on root-finding is needed. Only two FFTs and an iterative and inside the unit circle. Recently, a different approach procedure are required to compute the filter impulse based on root moments was proposed to design response from real cepstrum; the resulting magnitude minimum-phase FIR filters [6], which preserves the same response is exactly the same with the original sequence. magnitude response. But it needs to start from a linear phase FIR filter, due to the complex conjugate relation 1. INTRODUCTION between its zeros. Moreover, we need to select a proper radius of integration contour in advance to calculate In many low delay applications of FIR filters design such moments accurately. From the previous works of Mian and as data communication system, linear phase characteristic Nainer [2], we can extend it and avoid phase-unwrapping is not necessary and, minimum phase design can preserve by using real cepstrum. This benefits from the problem desired magnitude response and has the advantage of itself, that is, constructing the minimum-phase component from its magnitude. It is known that a minimum-phase minimum delay over other counterparts with the same sequence’s magnitude determines its phase. Through magnitude response. several deductions, we will find that real cepstrum There has many methods been developed to design determines a sequence’s minimum-phase component. minimum-phase FIR filters, especially the one proposed by Moreover, in our works, the minimum-phase filter will Herrmann and Schuessler [1]. It starts with an odd-length retain the original magnitude response exactly. linear-phase equiripple FIR filter and shifts it up by In the following sections, we first discuss several basic one-half the stop band’s peak-to-peak ripple, resulting in related concepts. Next, the formal steps for second-order zeros on the unit circle. The zeros inside the minimum-phase sequence construction using real cepstrum unit circle and a simple zero out of each pair of double will be summarized. Furthermore, we refer to this method zeros on the unit circle are then retained to obtain the in an alternative viewpoint by treating it as passing the minimum-phase filter with half the degree. However, the original sequence through an allpass filter. Finally, several difficulty of root-finding procedure limits this method and design examples are shown and illustrated the effectiveness the magnitude response becomes approximately square of this approach. root of the original one. Therefore, later researches resorted to other methods to avoid root-finding procedure. Mian 2. BASIC CONCEPTS ON CEPSTRUM and Nainer [2] utilized the complex cepstrum to extract the minimum-phase component. In this method, only two FFTs A. Complex Cepstrum and Real Cepstrum are required, but cumbersome process of Let h(n)nh )( be a real sequence with eH jω )( as its Fourier phase-unwrapping is required. To avoid phase-unwrapping, transform. Its complex cepstrum ˆ nh )( and real cepstrum Pei and Lu [3] applied differential cepstrum to design the as;dlˆ nc )( are defined as equiripple minimum-phase FIR filter, but 3 FFTs are ˆ eH jω = [ eH jω ]= jω + eHjeH jω ])([arg)(log)(log)( required. Rather than using cepstrum, an approach based (1) on Newton-Raphson iterative algorithm [4] was recently ˆ jω )( ℜ= { ˆ eHeeC jω }= eH jω )(log)( (2) recommended to find the minimum-phase spectral factor of ˆ −1 ˆ jω polynomials. The work emphasizes on its better accuracy )( = { eHFnh )( } (3) than that could be obtained by root-finding when there’s no ˆ )( = −1 { ˆ eCFnc jω )( } (4) zeros on the unit circle. If there are indeed double zeros on the unit circle, however, precision will be lost. where F −1 denotes the inverse Fourier transformation. Among the several methods mentioned above, all are to Note that in (1) and (3), to compute complex cepstrum, design a linear-phase equiripple FIR filter first. If this we need to perform logarithm on a . The we can simply drop the non-causal part of ˆ nh )( to ˆ imaginary part of the complex logarithm must be acquire min nh )( , and calculate min nh )( directly using (6). continuous and without its linear-phase term to avoid Calculating complex cepstum ˆ nh )( from nh )( , however, ambiguity. To achieve this, we can first compute the is concerned with taking logarithm on complex number, principle value of the phase (between -π and π), then where phase unwrapping is needed. We can skip the unwrap the phase to a continuous one, and remove the complicated procedure of phase unwrapping by adopting linear-phase term. its real cepstrum, which does not involve phase B. Properties of Minimum/Maximum-Phase Sequence unwrapping. The reason we can directly use real cepstrum and Its Complex Cepstrum comes from (7) and (8) as shown in Fig. 1(a) and (b). Note that ˆ eC j ω )( is the real part of ˆ eH jω )( from (2). Because From [5], there are two useful properties. the real cepstrum ˆ nc )( is the inverse Fourier transform ˆ a. If nh )( is a minimum-phase sequence, nh )( will of ˆ eC jω )( , we find that real cepstrum is exactly the even be a causal sequence. That is, ˆ nh = 0)( for n < 0 . part sequence of complex cepstrum using (8). If we further ˆ b. If nh )( is a maximum-phase sequence, nh )( will combine this corollary with (7), now we know we can be an anti-causal sequence. That is, ˆ nh = 0)( for n > 0 ˆ reconstruct min nh )( from ˆ nc )( using (7), rather than C. Explicit Formula between Minimum-Phase Sequence from ˆ nh )( . and Its Complex Cepstrum If zH )( has its zeros on the unit circle, the region of An arbitrary sequence nh )( and its complex cepstrum convergence of log [ ( zH )]acannot include the unit circle. sdfasˆ nh )( has an implicit recursive relation [5] as From this computational point of view, we should avoid the ˆ zeros existing on the unit circle. But in practice, it’s often e h )0( n = 0 (5)  ∞ to design digital filters with some zeros on the unit circle in nh )( =   k  ˆ  ∑   − nknhkh ≠ 0)()( z-domain. We can overcome this problem by selecting a k −∞=  n  different contour Cc slightly inside unit circle while If nh )( is a finite minimum-phase sequence, the above computing ˆ nc )( from ˆ zC )( [5]. This can be achieved summation can be reduced to finite terms as equivalently by first multiplying the input h(n)nh )( with an ˆ e h )0( n = 0 (6) exponential sequence as  n nh )( = n   k  ˆ  α nh )( = 1-N0,....,n (10) ∑  − nknhkh > 0)()( nw )( = Lwith >>= 81024 N k=0  n   0 LN −= 1,.....n D. Reconstruction of a Causal Sequence from its Even where α < 1 and α ≅ 1 . This step will cause the radius of its Part zeros scaled down by the factor α , i.e. moving its zeros If nh )( is a causal sequence, it can be recovered simply slightly inside the unit circle. Besides, even though the sequence is finite, its cepstrum by its even part sequence nh )( e sequence is still infinite [5]. Computationally, aliasing = nunhnh )()()( , (7) e + effect will occur. To reduce the aliasing effect, we must append w(n)nw )( with several trailing zeros as in (10).  n < 00 where  Now we summarize the overall steps for constructing the nu )( = n = 01 +  minimum-phase sequence nh )( from any mixed-phase  min  n > 02 sequence nh )( as follows : 1. Choose α < 1 and α ≅ 1 to move the zeros slightly E. Fourier Transform Pair between Time- and Frequency- inside on the unit circle. n Domain 2. Perform L-point (FFT)L on α nh )( , nn == 0,1,…,(N-1)(N −1,...,1,0 ) ,

to get α kH )( , k = 0,1,…,(L-(Lk −1,...,1,0 ) , L >>= 81024 N . Let e nh )( and 0 nh )( are the even and odd parts of jω jω 3. Perform (IFFT)L on α kH )(log to get ˆα nc )( . sequence nh )( . R eH )( and R eH )( are the real and 4. Construct ˆ nh )( from ˆ nc )( using (7). imaginary parts of its Fourier transform, respectively. Now, ,min α α 5. Compute nh )( from ˆ nh )( using (6). if nh )( is a real sequence, we have the following Fourier ,min α ,min α 6. Rescale nh )( to get −n . transform relations : ,min α min = ,min α nhnh )()( α = eHnhF jω )()( (8) {}e R 4. ALLPASS FILTERING VIEWPOINT = ejHnhF jω )()( (9) {}o I In this section, we provide another viewpoint on the above works. In fact, the proposed process in the previous section 3. CONSTRUCTION OF MINIMUM-PHASE is equivalent to pass the mixed-phase sequence through an SEQUENCE proper allpass filter to become a minimum phase output sequence. Intuitively, this can be inferred from the fact that Let min nh )( denote the minimum-phase counterpart of nh )( , ˆ the mixed-phase sequence and its minimum-phase nh )( and ˆmin nc )( be the complex cepstrum and the real min counterpart have the same magnitude response with cepstrum of nh )( , respectively. min different phase response. Formally, We can prove this by From the above concept, if we want to extract the considering the characteristics of an allpass filter’s minimum-phase part from a mixed-phase sequence nh )( , complex cepstrum. An allpass filter’s transfer function Hapap()(z)zH can be numerical problem. Also, while we compute the real expressed as cepstrum sequence, zero-padding are necessary to reduce N −1 − za )1( N (11) the aliasing effect. During the process, there’s no need to zH )( = ∏k =1 k awhereZ < 1 ap N k unwrap the phase or find the roots. Neither do we need to − za )1( ∏k =1 k begin with an odd-length equiripple linear-phase filter and N We can drop the linear-phase term z to compute its get the square root magnitude response. The resultant complex cepstrum as follow: minimum phase filter magnitude response will be exactly

[ ap zH )(log ] the same as the original one. N N −= 1log za +− 1log − za −1 ∑k =1 ()k ∑k=1 ()k (12) Table 1. Comparison between the proposed method and several n n N ∞ a N ∞ a = k z n − k z −n existing methods in the open literature. ∑∑kn=11= n ∑∑kn=11= n −n n proposed −1  N − ak  −n ∞  N − ak  −n [1] [2] [3] [6] [4] =  z +  z method ∑∑n==−∞  k 1 n  ∑∑n==11 k n      Herrmann’s v v v v*1 v Thus, approach [1] factorization*2 RF CC DC RM NR RC N n Phase-unwrapping v  − ak  ∑ > 0n (13) FFT 2 3 2 2  k=1 n ˆ Iteration v*3 v ap nh =  0)( = 0n N − a −n minimum-phase square square square the square the  k < 0n ∑ filter’s magnitude root*4 root root same root same  k =1 n Low complexity v v Notice that an allpass filter’s complex cepstrum is an *1: The prototype is not necessarily an equiripple one. odd sequence. From the previous discussion, while we *2: RF: root-finding, CC: complex cepstrum, DC: differential drop the non-causal part of the mixed-phase sequence, it cepstrum, RM: root moment, NR: Newton-Raphson iteration, RC: can be viewed as to apply an allpass filter whose real cepstrum non-causal part is just the negative non-causal part of the *3: The specific iterative procedure depends on which mixed phase sequence as shown in Fig. 1(c). Therefore, the root-finding algorithm is applied. two non-causal parts will be added and cancelled to be zero. *4: Square root of the prototype’s magnitude response. Moreover, if we consider the zeros’ locations, we find that, ()zH (zH ) by multiplying H(z) with Hapap(z), the effect is that REFERENCES the ()zH ’s zeros lying outside the unit circle will be cancelled by the poles of H (z)()zH ’s denominator, and apap [1] O. Herrmann and W. Schuessler, “Design of reflected inside unit circle at their reciprocal conjugate nonrecursive digital filters with minimum phase,” locations. Electronics Letters, vol. 6, no. 11, pp. 329-330, May 5. DESIGN EXAMPLES 1970 [2] G. A. Mian and A. P. Nainer, “A fast procedure to In the following, two examples are given to illustrate design equiripple minimum-phase FIR filters,” IEEE the design of minimum-phase FIR filter by the proposed Transactions on Circuits and Systems, vol. CAS-29, method. Among the two examples, the first one is a no. 5, pp. 327-331, May 1982. linear-phase equiripple lowpass filter. The other one is a S.-C. Pei and S.-T. Lu, “Design of minimum-phase lowpass mixed-phase filter which emphasizes that we need [3] not to start with a linear-phase filter to accomplish our FIR filters by differential cepstrum,” IEEE work. In the two cases, their original frequency Transactions on Circuits and Systems, vol. CAS-33, magnitude/phase response and zero-pole plot are shown in no. 5, pp. 570-576, May 1986. Fig.2 and Fig.3, respectively. [4] H. J. Orchard and A. N. Willson, “On the computation of a minimum-phase spectral factor,” IEEE 6. CONCLUSION Transactions on Circuits and Systems-I: Fundamental We have introduced a simple effective method to Theory and Applications, vol. 50, no. 3, pp. 365-375, construct a minimum-phase FIR filter from a mixed-phase March 2003 filter. In Table 1, we compare the new method with other [5] A. V. Oppenheim and R. W. Schafer, “Discrete-time ones proposed in some literature. In our design procedure ,” (Prentice Hall, 1975.) pp. 501-511. and the procedure in [6], the efforts required are merely [6] T. Stathaki and I. Fotinopoulos, “Equiripple Minimum two FFTs and a recursive procedure to compute the Phase FIR Filter Design from Linear Phase Systems either from real cepstrum or from root Using Root Moments,” IEEE Trans. On Circuits and moments. Therefore the complexities are lowest. Note that Systems II: Analog and Digital Signal Processing, Vol. coefficients scaling are used to handle the unit-circle zeros’ 48, Issue 6, pp. 580-587, June 2001. 4 4 4

2 2 2

(a) 0 = 0 + 0

-2 -2 -2

-4 -4 -4 -10 0 10 -10 0 10 -10 0 10 mixed phase ˆ nh )( = even part ˆ nc )( + odd part p p p 4 4 4

2 2 2 (b) 0 × 0 = 0 -2 -2 -2

-4 -4 -4 -10 0 10 -10 0 10 -10 0 10 even part t () minimumii phase h ˆ ˆ nc )( × + nu )( = min nh )(

+ 4 4 4

2 2 2 (c) 0 + 0 = 0 -2 -2 -2

-4 -4 -4 -10 0 10 -10 0 10 -10 0 10 ˆ allpass filter ˆ ˆ mixed phase nh )( + ap nh )( = minimum phase nh )( min Fig. 1. Construction of minimum phase filter from a mixed phase sequence. (a) Real cepstrum ˆ nc )( , i.e. the even part of

ˆ jω complex cepstrum nh )( , can be effectively computed by IFFT L eH |})(|{log without phase unwrapping and root-finding. ˆ ˆ ˆ ˆ (b) Reconstruct min nh )( from its even part ˆ nc )( . (c) min nh )( is obtained by passing nh )( through a proper allpass filter ap nh )( by canceling its non-causal part.

Linear Phase Minimum Phase Linear Phase Minimum Phase 1.5 1.5 1 1

1 1 0.5 0.5

0.5 0.5 Magnitude Magnitude Magnitude Magnitude

0 0 0 0 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 frequency (a) frequency frequency (a) frequency 4 4 4 4

2 2 2 2

0 0 0 0 Phase Phase Phase Phase -2 -2 -2 -2

-4 -4 -4 -4 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1 frequency (b) frequency frequency (b) frequency 1 1 1 1 0.5 0.5 0.5 17 17 12 12 0 0 0 0 -0.5 -0.5 -0.5 -1

Imaginary Part Imaginary -1 Part Imaginary Imaginary Part Imaginary Part Imaginary -1 -1 -4 -3 -2 -1 0 1 -2 -1 0 1 2 -2 -1 0 1 2 -2 -1 0 1 2 Real Part (c) Real Part Real Part (c) Real Part

Fig. 2. Equiripple lowpass linear phase and minimun phase Fig. 3. Lowpass mixed phase and minimum phase filters filters with length 18 (a) Amplitude response (b) Phase with length 13 (a) Amplitude response (b) Phase response response and (c) Zero-pole plot. and (c) Zero-pole plot.