pass/stop FIR digital filters - Wiley Online Library

1 downloads 0 Views 85KB Size Report
New designs of low=high-pass and mid-pass=stop FIR digital filters. Ishtiaq Rasool Khan∗;† and Ryoji Ohba. Division of Applied Physics; Graduate School of ...
INTERNATIONAL JOURNAL OF CIRCUIT THEORY AND APPLICATIONS Int. J. Circ. Theor. Appl. 2001; 29:423–431 (DOI: 10.1002/cta.161)

LETTER TO THE EDITOR

New designs of low=high-pass and mid-pass=stop FIR digital 0lters Ishtiaq Rasool Khan∗;† and Ryoji Ohba Division of Applied Physics; Graduate School of Engineering; Hokkaido University; Sapporo 060-8628; Japan

SUMMARY New designs of highly e8cient low=high- and mid-pass=stop (centre-symmetric band-pass=stop) FIR non-recursive digital 0lters are presented. The designs are based on the modulation property of DFT, applied to the already presented MAXFLAT halfband low-pass 0lters. The presented 0lters have explicit formulas for their tap-coe8cients, and therefore are very easy to design. They have highly smooth frequency response and wider transition regions like MAXFLAT 0lters. The design formulae are modi0ed to give new classes of low=high- and mid-pass=stop 0lters, for which, like in equiripple 0lters, the transition bandwidth can be reduced by increasing the size of ripple on magnitude response. It is shown, with the help of design examples, that the performance of these 0lters is comparable to that of equiripple 0lters. Copyright ? 2001 John Wiley & Sons, Ltd. KEY WORDS:

digital 0lters; MAXFLAT; FIR; low-pass; high-pass; band-pass; band-stop

1. INTRODUCTION Maximally Bat (MAXFLAT) 0nite impulse response (FIR) digital 0lters are one of the most important classes of digital 0lters, which 0nd their applications when time-domain properties are of more importance or when smooth frequency response and higher stopband attenuation are desired. The general design procedure of MAXFLAT 0lters is based on approximating a suitable polynomial, like Hermite [1], Krawtchouk [2] or Bernstein polynomial [3], etc., to the frequency response of the 0lter and then mapping it to the 0lter function by suitable transformations. Tap-coe8cients of the 0lter are then calculated by inverse discrete Fourier transform of the 0lter function. Some other MAXFLAT design techniques have also been reported and can be found in References [4–9]. ∗ Correspondence

to: Ishtiaq Rasool Khan, Division of Applied Physics, Graduate School of Engineering, Hokkaido University, Sapporo 060-8628, Japan. † E-mail: [email protected] Contract=grant sponsor: Japan Society for Promotion of Science (JSPS)

Copyright ? 2001 John Wiley & Sons, Ltd.

Received 19 July 2000 Revised 26 January 2001

424

I. R. KHAN AND R. OHBA

We have already presented the designs of maximally linear digital diJerentiators [10,11], MAXFLAT FIR Hilbert transformers [12] and half-band low=high-pass FIR digital 0lters [13]. The presented designs are better than the available MAXFLAT designs in the sense that they give the explicit formulae for the tap-coe8cients without the need of inverse Fourier transformation. In this paper, we present a new class of low=high-pass and mid-pass=stop FIR 0lters (band-pass=stop 0lters with pass=stop band symmetric around ! = 0:5, where ! = 1 is the Nyquist frequency), having their cutoJ frequency at any speci0ed location. The presented 0lters have highly smooth frequency response like MAXFLAT 0lters, but are easier to design with the help of explicit formulas for their tap-coe8cients. Like MAXFLAT 0lters, the 0lters presented in this paper also have wider transition bands, which can be narrowed by increasing their length. On the other hand, transition bands of equiripple 0lters [14,15], which are popular for their Bexibility and the fact that they can meet the design speci0cations with minimum number of tap-coe8cients, can be narrowed down for the same length at the expense of a ripple on their magnitude response. We modify the designs presented in this paper, such that they also attain the same characteristics, and a design parameter can control the transition bandwidth for a 0xed length by controlling the size of ripple on magnitude response. The design complexity of the presented 0lters is far less than that of equiripple 0lters, which are designed with iterative procedures [16] involving the solution of simultaneous equations and an intensive search over a dense frequency grid in each iteration. We have presented the design examples, which show that the performance of presented 0lters is comparable to that of equiripple 0lters. In Section 2 of this article, we use the double sideband modulation to convert a half-band low-pass 0lter to a mid-stop 0lter. However, this 0lter has opposite phase in lower and upper halfbands, which is corrected in Section 3 by using convolution, and designs of mid-pass=stop 0lters are obtained. In Section 4, mid-stop=pass 0lters are converted to low=high-pass 0lters. The presented designs are modi0ed and compared with equiripple 0lters in Section 5.

2. PHASE DISTORTED MID-STOP FILTERS Explicit formulae for the tap-coe8cients of a type I MAXFLAT half-band low-pass FIR 0lter of length 4N − 1 having unity gain in passband and zero in stopband can be written as [13] c0 = 0:5 c±(2k−1) =

(1a)

(−1)k+1 (2N − 1)!!2 22N (N + k − 1)!(N − k)!(2k − 1)

c±(2k−2) = 0;

k = 1; 2; 3; : : :; N;

(1b) (1c)

where double factorial of an integer n is given as n!! = n(n − 2)(n − 4) : : : (¿1). If we set c0 in Equation (1a) to zero and multiply c±(2k−1) in Equation (1b) by 2, the magnitude response of the resultant 0lter will have a gain of 1 in the passband and −1 in the stopband as is shown in Figure 1 for N = 8. Copyright ? 2001 John Wiley & Sons, Ltd.

Int. J. Circ. Theor. Appl. 2001; 29:423–431

425

FIR DIGITAL FILTERS

Figure 1. Frequency response of a half-band low-pass 0lter of length 31 having a gain of 1 in passband and −1 in the stopband.

Now consider the sinusoidal sequences sin( k=4N ) and cos( k=4N ) for k varying from 1 to 4N − 1 and being an integer taking any value between 0 and 4N . The sine sequences obtained for even , and the cosine sequences obtained for odd , are represented by purely imaginary sequences in frequency domain. However if is odd for the sine sequences and even for the cosine sequences, they are transformed to real sequences in frequency domain, and their 4N -point discrete Fourier transform (DFT) can be written as s(n) =

(−1)int[ =2] ( (n + int[ =2]) + (n − int[ =2])) 2

(2)

where int[ =2] gives the integer part of =2 and (n − n0 ) is a unit discrete impulse sequence having a value of unity at at n = n0 , and all other zeros. If the frequency response shown in Figure 1 is convoluted with s(n) given by Equation (2), the resultant response will be as shown in Figure 2 for = 9 and 10. Depending on whether the integer part of =2 is odd or even, the lower halfband of the response becomes positive or negative, respectively. By multiplying the sinusoidal sequences by a suitable sign term, the response can be made to follow the same pattern for all values of . However, as we shall see later, this is not needed in the presented designs of low=high-pass and mid-pass=stop 0lters, as changing the sign of the responses shown in Figure 2 does not aJect the 0nal results. The convolution of the two sequences in frequency domain can be carried out by having their element-by-element multiplication in time domain, i.e. tap-coe8cients of the 0lter having frequency response as shown in Figure 2 can be generated as g±(2k−1) = 2c±(2k−1) S2k−1

(3a)

g±(2k−2) = 0;

(3b)

Copyright ? 2001 John Wiley & Sons, Ltd.

k = 1; 2; 3; : : :; N

Int. J. Circ. Theor. Appl. 2001; 29:423–431

426

I. R. KHAN AND R. OHBA

Figure 2. Frequency response of mid-stop 0lters of length 31 for = 9 and 10. Lower and upper half-bands of the response are of opposite phase.

where S2k−1 = sin( (2k + 2N − 1)=4N )

if = odd

= cos( (2k + 2N − 1)=4N )

if = even

(3c)

It can be noted from Figure 2 that the resultant 0lter is a mid-stop 0lter, i.e. a band-stop 0lter with stopband symmetric around ! = 0:5. The 0lter has cutoJ frequencies at !c = (1± =2N )=2, and with varying from 0 to 2N , the lower cutoJ frequency varies from 0.5 to zero. As the value of = 2N + N1 gives the same 0lter as for = 2N − N1 , total number of 0lters with distinct cutoJ frequencies is 2N + 1. The larger number of distinct cutoJ frequencies means that the design speci0cations can be met more closely. It can be seen from Figure 2 that the upper and lower half-bands of the frequency responses have opposite phase and therefore the 0lter in itself has almost no applications. However, as described in the subsequent sections, it can lead to the design of general low=high-pass and mid-pass=stop 0lters with speci0ed cutoJ frequencies. 3. MID-PASS=STOP FILTERS It can be noted that a band-stop 0lter with a stopband symmetric around ! = 0:5, and having cutoJ frequencies at !c = (1 ± =2N )=2, can be obtained by multiplying the frequency response shown in Figure 2 by itself. This squaring process can be carried out by taking circular convolution of the sequence g calculated from Equation (3) with itself. Linear convolution is not used because it gives the resultant sequence of length 8N − 3, which is almost double of that in case of circular convolution, which gives the resultant sequence of length 4N − 1. It should be noted that the alternating elements in sequence g are zeros, however, the last coe8cient is non-zero. If we append a zero at the end of g, convolution will give a sequence of length 4N + 1 with alternating zeros, and due to symmetry, the total number of distinct Copyright ? 2001 John Wiley & Sons, Ltd.

Int. J. Circ. Theor. Appl. 2001; 29:423–431

427

FIR DIGITAL FILTERS

Figure 3. Frequency response of bandpass and bandstop 0lters of length 33 having cutoJ frequencies at 0.2 and 0.8.

non-zero coe8cients will be N + 1 only. The complete design procedure of a mid-stop 0lter using this technique can be summarized as below: (1) Given lower cutoJ frequency !c , calculate = Int[(0:5 − !c )4N ]. (2) Calculate g using Equation (3). (3) The coe8cients of the mid-stop 0lter are given as h±(2k−1) = 0 h±2k =

2N −1  i=−2N +1 i=odd

(4a) gi gi+2k−4lN ;

k = 0; 1; 2; : : :; N

(4b)

where l = 1 if i + 2k ¿2N

otherwise l = 0

The term 4lN in Equation (4b) is to ensure that convolution is circular one. The magnitude response of a mid-stop 0lter for cutoJ frequencies 0.2 and 0.8 is shown in Figure 3 for N = 8 (length = 33). Frequency response of a mid-pass 0lter can be obtained by subtracting the frequency response of a mid-stop 0lter of same cutoJ frequencies from an all-pass 0lter. In time domain, this can be done by subtracting the tap-coe8cients of the midstop 0lter from a unit discrete impulse, i.e. by subtracting the centre element from 1 and changing the sign of the rest. Using this procedure, the mid-stop 0lter shown in Figure 3 is changed to a midpass 0lter and its magnitude response is also plotted in Figure 3. Copyright ? 2001 John Wiley & Sons, Ltd.

Int. J. Circ. Theor. Appl. 2001; 29:423–431

428

I. R. KHAN AND R. OHBA

Figure 4. Frequency response of low- and high-pass 0lters of length 31 having cutoJ frequency at 0.41.

4. LOW=HIGH-PASS FILTERS The frequency response of the mid-stop 0lters designed above is symmetric around ! = 0:5, and it can be noted from Equation (4) that alternate tap-coe8cients are zeros. From wellknown signal processing concepts, this 0lter can be modi0ed to a low-pass 0lter simply by neglecting these zeros. The cutoJ frequency of the low-pass 0lter obtained in this way will be double the lower cutoJ frequency of the mid-stop 0lter. The complete design can be summarized as below: 1. Given cutoJ frequency !c , calculate = Int[(1 − !c )2N ]. 2. Calculate g using Equation (3). 3. The coe8cients of the low-pass 0lter are given as h±k =

2N −1  i=−2N +1 i=odd

gi gi+2k−4lN ;

k = 0; 1; 2; : : :; N

(5)

where l = 1 if i + 2k ¿2N

otherwise l = 0

A high-pass 0lter can be obtained from a low-pass 0lter of the same cutoJ frequency by subtracting the centre coe8cient h0 from 1 and changing the sign of the others. The magnitude responses of low and high-pass 0lters for !c = 0:41 and N = 15 (length = 31) are shown in Figure 4. 5. FILTERS WITH NARROW TRANSITION BANDS The 0lters presented in Sections 3 and 4 are derived from MAXFLAT half-band low-pass 0lters, and therefore they have highly smooth frequency responses and wider transition bands, Copyright ? 2001 John Wiley & Sons, Ltd.

Int. J. Circ. Theor. Appl. 2001; 29:423–431

429

FIR DIGITAL FILTERS

as clear from Figures 2–4. Transition bandwidths of these 0lters cannot be reduced without increasing their lengths. In Reference [13], we presented a simple procedure to reduce the transition bandwidth of halfband MAXFLAT 0lters at the expense of a small ripple on their magnitude responses. The same procedure can be used for the 0lters given in Sections 3 and 4, to narrow down their transition bands. The resultant 0lters have a ripple on their frequency responses, the amplitude of which is linked to their transition bandwidths, as in equiripple 0lters. As observed in Equation (1), tap-coe8cients of MAXFLAT 0lters have a large dynamic range, i.e., the ratio of the last coe8cients to the centre coe8cient is very small (∼ 10−10 for example, for the half-band 0lter given by c in Equation (1) for N = 8). The importance of these small elements lies in keeping the frequency response maximally Bat. If these small elements are ignored to implement the 0lter with a smaller number of tap-coe8cients, a small sized ripple appears on the magnitude response of the 0lter. This is the basic idea used to narrow down the transition bandwidths of the 0lters presented in Sections 3 and 4. We design a 0lter of very large length to have narrow transition band but while implementing it, we ignore the smaller coe8cients away from the central coe8cient. In this situation the actual length of the 0lter will be smaller, but its transition bandwidth will be smaller corresponding to the larger length, and the price will be paid as a small ripple residing on the magnitude response of the 0lter. This process to obtain narrow transition widths has a drawback of considerable increased computational burden, and therefore we use an alternate simple way to implement the procedure by multiplying N in Equation (1b) by a factor   1 as c±(2k−1) =

(−1)k+1 (2N − 1)!!2 ; + k − 1)!(N − k)!(2k − 1)

22N (N

k = 1; 2; 3; : : :; N

(6)

The rest of the designs presented in Sections 3 and 4 remain unaltered. In this case, the elements g±(2k−1) for |k |¿N will not add their share in the summations of Equations (4b) and (5), and the size of the ripple appearing on the frequency response will be a bit larger. However, the magnitude of these ignored elements is very small, and the increase in the size of the ripple will be very small, which should be tolerable as a consequence of a considerable decrease in the computational burden. We have shown the magnitude responses of examples of designs of low=high-pass and mid-pass=stop 0lters in Figures 5 and 6 for  = 10. Rests of the design speci0cations are the same as for the 0lters shown in Figures 3 and 4. By comparing the magnitude responses shown in Figures 5 and 6 with those in Figures 3 and 4, the eJectiveness of the presented method to reduce the transition widths can be observed. The magnitude responses of equiripple 0lters of the same speci0cations are also shown in Figures 5 and 6 for comparison. It can be observed that the performances of the presented Taylor 0lters are comparable to those of the equiripple 0lters. Equiripple 0lters have larger ripples on the entire frequency band except near the transition edges, where the ripple size becomes larger for Taylor 0lters. 6. CONCLUSIONS We have used digital signal processing techniques, like modulation and convolution to obtain new designs of low=high-pass and mid-pass=stop 0lters from MAXFLAT half-band low-pass Copyright ? 2001 John Wiley & Sons, Ltd.

Int. J. Circ. Theor. Appl. 2001; 29:423–431

430

I. R. KHAN AND R. OHBA

Figure 5. Transition edges of the 0lters shown in Figure 3 are sharpened and their frequency responses are compared with those of equiripple 0lters.

Figure 6. Transition edges of the 0lters shown in Figure 4 are sharpened and their frequency responses are compared with those of equiripple 0lters.

0lters. The presented designs have wide transition bands and highly smooth magnitude responses. Like MAXFLAT 0lters, their smoothness is increased and transition bandwidth is decreased by increasing length. We modify the designs to get a new class of 0lters for which the transition bandwidth can be controlled with a design parameter . These 0lters have a small ripple on their frequency responses and their transition bandwidths can be reduced by increasing the size of the ripple. This characteristic, also owned by the equiripple 0lters, is very useful in practical applications for changing the transition bandwidths without changing the actual number of tap-coe8cients (multipliers) of the 0lter. Presented designs of 0lters are quite simple and straightforward as compared to those of equiripple 0lters, and the performances of both are comparable. Copyright ? 2001 John Wiley & Sons, Ltd.

Int. J. Circ. Theor. Appl. 2001; 29:423–431

FIR DIGITAL FILTERS

431

REFERENCES 1. Herrmann O. On the approximation problem in nonrecursive digital 0lter design. IEEE Transactions on Circuit Theory 1971; 18:411– 423. 2. Bromba MAU, Ziegler H. Explicit formula for 0lter function of maximally Bat nonrecursive digital 0lters. Electronics Letters 1980; 16(24):905– 906. 3. Rajagopal LR, Dutta Roy SC. Design of maximally-Bat FIR 0lters using the Bernstein polynomial. IEEE Transactions on Circuits and Systems 1987; 34(12):1587–1590. 4. Thajchayapong P, Puangpool M, Banjongjit S, Maximally Bat F.I.R. 0lter with prescribed cutoJ frequency. Electronics Letters 1980; 16(13):514 –515. 5. Hanna MT. Design of linear phase FIR 0lters with a maximally Bat passband. IEEE Transactions on Circuits and Systems—II 1996; 43(2):142–147. 6. Aikawa N, Yabiku N, Sato M. Design method of maximally Bat FIR 0lter in consideration of even and odd order. Proceedings of the IEEE International Symposium on Circuits and Systems, Singapore, 1991; 276 –279. 7. Cooklev T, Nishihara A, Maximally Bat FIR 0lters. Proceedings of the IEEE International Symposium on Circuits and Systems, Chicago, IL, May 1993; 96 – 99. 8. Stubberud PA, Leondes CT. The design of frequency sampling 0lters by the method of Lagrange multipliers. IEEE Transactions on Circuits and Systems—II 1993; CAS-40:51–54. 9. Jinaga BC, Dutta Roy SC. Coe8cients of maximally Bat non-recursive digital 0lters. Signal Processing 1984; 7:185–189. 10. Khan IR, Ohba R. Digital diJerentiators based on Taylor series. IEICE Transactions on Fundamentals 1999; E82-A(12):2822–2824. 11. Khan IR, Ohba R. New design of full band diJerentiators based on Taylor series. IEE Proceedings-Vision, Image and Signal Processing 1999; 146(4):185–189. 12. Khan IR, Ohba R. E8cient design of halfband low=high pass FIR 0lters using explicit formulas for tap coe8cients. IEICE Transactions on Fundamentals 2000; E-83A(11):2370 –2373. 13. Khan IR, Ohba R. New e8cient designs of discrete and diJerentiating FIR Hilbert transformers. IEICE Transactions on Fundamentals 2000; E-83A(12):2736 –2738. 14. Parks TW, McClellan JH. Chebyshev approximation for non recursive digital 0lters with linear phase. IEEE Transactions on Circuit Theory 1972; 19:189 –194. 15. Cetin AE, Gerek ON, Yardimci Y. Equiripple FIR 0lter design by the FFT algorithm. IEEE Signal Processing Magazine 1997; 14(2):60 – 64. 16. IEEE Digital Signal Processing Committee. Programs for Digital Signal Processing. IEEE Press: New York, 1979.

Copyright ? 2001 John Wiley & Sons, Ltd.

Int. J. Circ. Theor. Appl. 2001; 29:423–431