Design of 1-D and 2-D FIR digital filters with complex coefficients using a least-squares approach

Design of 1-D and 2-D FIR digital filters with complex coefficients using a least-squares approach

Pergamon PII: ComputersE/err. Engng Vol. 23. No. 4. pp. 213-281. 1997 0 1997Elsevier Science Ltd. All rights reserved Printed in Great Britain Soo45...

499KB Sizes 0 Downloads 53 Views

Pergamon

PII:

ComputersE/err. Engng Vol. 23. No. 4. pp. 213-281. 1997 0 1997Elsevier Science Ltd. All rights reserved Printed in Great Britain Soo45-7906(97)ooW-9 0045-7906/97 s17.00 + 0.00

DESIGN OF 1-D AND 2-D FIR DIGITAL FILTERS WITH COMPLEX COEFFICIENTS USING A LEAST-SQUARES APPROACH E. ABDEL-RAHEEM’,

F. EL-GUIBALY*

and T. YEAP’

Department of Electrical Engineering, University of Ottawa, 161 Louis Pasteaur St., Ottawa, Ontario KIN 6N5, Canada and Department of Electrical and Computer Engineering, University of Victoria, P.O. Box 3055, Victoria, British Columbia V8W 3P6, Canada Abatraet-An approach for the design of I-D and 2-D FIR digital filters with complex coefficients is presented. In this approach, the error measure is formulated as a quadratic function and the filter coefficients are obtained by solving a set of linear equations. The proposed approach is more e&ient than the eigenfilter approach regarding the amount of computation and design time. Moreover, the proposed approach leads to smaller least-squares errors. Design examples are included to illustrate the advantages of the approach. 0 1997 Elsevier Science Ltd. Key words: Digital filter design, least-squares algorithms.

1. INTRODUCTION The design of digital filters with complex coefficients has been considered by many authors [l, 21. These filters are used for processing complex data. In [3], Vaidyanathan and Nguyen introduced the eigenfilter method for the design of FIR digital filters. The method involves minimizing a quadratic measure of the error in the passband and stopband. In this approach, the filter coefficients are obtained as the eigenvector corresponding to the smallest eigenvalue of a real, symmetric, and positive definite matrix. To obtain the solution in an efficient way, an iterative inverse-power method is generally used [3] that requires solving a system of linear equations several times, which is time consuming and involves a large amount of computation. Pei and Shyu [4] have extended the eigenfilter approach to the design of complex-coefficient FIR digital filters. Recently, Ramachandran and Sunder introduced an efficient least-squares approach for the design of linear-phase 1-D and 2-D FIR digital filters [5,6]. In this paper, the least-squares approach proposed by Ramachandran and Sunder is extended to the design of complex coefficient one-dimensional (1-D) and two-dimensional (2-D) FIR digital filters. In this approach, the error measure is formulated as a quadratic function and the filter coefficients are obtained by solving a set of linear equations. The proposed approach is more efficient than the eigenfilter approach regarding the amount of computation and design time. Moreover, it leads to smaller least-squares errors. Design examples are included to illustrate the advantages of the approach. 2. DESIGN

OF I-D FILTERS

The frequency response of a complex-coefficient

FIR digital filter is

N-l

= C h(n)e

H(P)

-jnw,

II-0

where N is the filter length. Defining x = [h(O) h(l)***h(N - l)]’

(2)

and c(o)

=

[l

e-bc..e-“N-‘h,~]T

273

(3)

E. Abdel-Raheem

274

et al.

then the frequency response can be written as H(e”“) = x’C(w) .

(4)

o(e’c”) = M(o)e -‘rcn,

(9

Let the desired frequency response be

where M(w) and T are the desired magnitude response and group delay, respectively. A passband error measure can be expressed as

s (‘5.

E,

=

[D(e’(“) - H(e”“)]*.[D(e”“) - H(e”“)] dw = x”Q,x - xTpf - x”p, + d, (‘Jr,

(6)

where * and H denote the complex conjugate and complex conjugate transpose operations, respectively, w,, and oP, are the lower and upper passband edge frequencies, and d is a constant. It is noted that Q, is a Hermitian positive definite N x N matrix with entries Q,(k,J)

=

s s

“‘pue,h’e - kJ do,

Osk,lIN-

I

(7)

“‘Pi

and p, is an N-element column vector with entries “5”

pdk) =

elk”‘e -P

0 I k I N - 1.

do,

(8)

“‘PI

Similarly, a stopband error measure can be formulated as E, = x”Qsx ,

(9)

where Qs is a Hermitian positive definite N x N matrix with entries

QJk,i)

=

“‘“e’““‘e-‘“”

0 I k,l I N - 1 ,

dw,

(10)

s“‘%,

where w,, and 0,” are the lower and upper stopband edge frequencies. For a desired filter with I passbands and J stopbands, the total error measure to be minimized is E = xHQx - xTp* - x”p + D ,

(11)

where D is a constant and

Q = i a,Qp, + i BiQs, ,=I

,=

I

P = &,P,,3 ,=I

with a, and B, being weights. To obtain the optimum point x, E is differentiated with respect to the elements of x* to get the following set of linear equations Qx=P,

(12)

FIR digital filters with complex coefficients

275

which can be solved using a powerful numerical method that avoids matrix inversion like the Cholesky factorization [5,7]. 3. DESIGN For a 2-D complex-coefficient

OF 2-D FILTERS

FIR filter, the frequency response is [8]

jy(&J1,2”2)

=

Ni’ N~‘~(n,,n,)e-“““‘e-i~“~~~ . ,,,=o

(13)

,r,=O

If IV, = A$ = N, then the above formula can be written as H(e”“l,e”“q = XTC(W,,OJ, where

h(O,N - 1)

h(1 ,O) Wl) x=

h(l,N-

1)

h(N -

1,0)

W

- l),l) l,N-

h(N-

1)

and

,-j(N-ltv,

e

e-i(N-

-

j(N -

Ihole

,,,o,e

- jw2

- /(N -

I ka?

(14)

276

E. Abdel-Raheem et

al.

0.5

0 Normalized frequency Fig. 1. Amplitude response of the filter of Example I.

Accordingly, the error measure to be minimized can be put in the form E = xHQx - xTp* - x”p +

D ,

(1%

where

Q=aQ,+PQs is

an N2 x N2 matrix with entries C?(W) = a

e’n,qeWn2m’e ~,n,,qe-,+,I>do, d02 + ,j &l”‘leW’Jze -inVJle-IV’+ do, dW2 JJ P ss S

(16)

for 1 < k, 1 I N2 where P and S denote the passband and stopband, respectively, and n,=Lm,=L-

k-l N

I-

N

j.

1

J,

n, = (k - 1) - n,N

(17)

m, = (I - 1) -m,N.

(18)

25

L-8.5

0

-

Normalized frequency

Fig. 2. Group delay characteristic of the filter of Example I.

FIR digital filters with complex coefficients 1.2

277

1

1. 0.8. 0.8. a

0.4. 0.2. OL x

Fig. 3. Amplitude response of the filter of Example 2. (a) 3-D plot. (b) Contour plot.

Table I. Computation Lksinn

ROposod Eilzenfilter

Proposed Eigkilter

I

CPU time, s

ALSE

A.. dB

A,. dB

0.219 I .070

2.066 3.799

9.253 x 10’ 9.334 x 104

0.23 I 0.225

33.08 32.85

Table 2. Computation Design

comparisons for Example

MFLOPS

MFLOPS 4.565 36.140

comparisons for Example 2 CPU time, s

ALSE

39.116 84.766

1.911 x IO” I.%5 x lo”

E. Abdel-Raheem et al.

278

1.2, 1. 0.8. $ & 0.8. %

0.4. 0.2. OX A

x

Fig. 4. Amplitude response of the filter of Example 3. (a) 3-D plot. (b) Contour plot.

The notation entries

L-J stands for the floor function;

p is an W-element

column

vector

with

for 1 5; k s W. The above integrations can be evaluated in closed form for rectangular filters and numerically for circular filters. The filter coefficients are then obtained by solving (12).

FIR digital filters with complex coefficients

Design Proposed Eigenfilter

279

Table 3. Computation comparisons for Example 3 MFLOPS CPU time, s ALSE 85.983x IV 1.169X lo? 404.273 1.197X IO’ 794.I34 176.218x 10’

4. DESIGN

EXAMPLES

AND COMPARISONS

In this section, three design examples are presented. The designs were performed using MATLAB and run on a Sun SPARC station. Example 1. A single passband complex-coefficient filter with length N = 38 and a desired frequency response - II I o I

- 0.1x < w <0.3X - 0.231~and 0.38~ I o < A

with a, = 1 and fi, = f12= 2 was designed using the proposed approach. The amplitude response of the resulting filter is shown in Fig. 1 while the group delay characteristic is shown in Fig. 2. The same design was carried out using the eigenfilter approach. A comparison between the two approaches was carried out in terms of the number of millions of floating point operations (MFLOPs), central processing unit (CPU) time, absolute least-squares error (ALSE), maximum passband ripples (A,) in dB, and minimum stopband attenuation (AJ in dB. The results of the comparison are summarized in Table 1. Example 2. A 2-D complex-coefficient filter of dimension (N,, NJ with rectangular passband, N, = N2 = 11 and desired frequency response e-&e-& O(@Q9)

0

=

1

0.4571~ o, I 0.05~ and - 0.05n I w2 I 0.4% - x s o, I - 0.65~ and 0.25~ I ol I K and - 71I, o2 I - 0.25~ and 0.657~I o2 < n

with a = fi = 1 was designed. The 3-D plot and the contour plot of the amplitude response of the resulting filter is shown in Fig. 3(a) and (b) (each contour plot used in this paper has 13 levels), respectively. The same design was carried out using the eigenfilter approach and the results obtained are summarized in Table 2. Example 3. A 2-D complex-coefficient filter of dimension (N,, N2) with circular passband, N, = N2 = 11 and desired frequency response

with a = /I = 1 was designed. The 3-D plot and the contour plot of the amplitude response of the resulting filter is shown in Fig. 4(a) and (b), respectively. The same design was carried out using the eigenfilter approach and the results obtained are summarized in Table 3. From Tables l-3, it is clearly seen that the proposed approach is efficient in terms of the amount of computation and design time compared to the eigenfilter approach. Moreover, the proposed approach results in lower ALSE than the eigenfilter approach. 5. CONCLUSIONS

An efficient least-squares approach has been extended to the design of 1-D and 2-D FIR digital filters with complex coefficients. The approach was successful in producing good designs in terms of filter qualities (i.e. passband ripples and stopband attenuations) while reducing the amount of

280

E. Abdel-Raheem et al.

computation and design time compared to the eigenfilter approach. Moreover, the least-squares error for the proposed approach was found to be less than that obtained from the eigenfilter approach. Design examples have been included to illustrate the approach. authors wish to thank Micronet, Networks of Centres of Excellence Program, and the Natural Sciences and Engineering Research Council of Canada for supporting this work. Also the fruitful discussion with Dr Sunder S. Kidambi is greatly acknowledged by the first author.

Acknowledgements-The

REFERENCES 1. Crystal, T. H. and Ehrman, L., The design and applications of digital filters with complex coefficients. IEEE Trans. Audio Electroacoust.,

1968, AU-16,

315-320.

2. Takebe, T., Nishikawa, K. and Yamamoto, M., Complex coefficient digital allpass networks and their applications to variable delay equalizer design. Proc. IEEE Inr. Symp. Circuits. Syst., Houston TX, 605-608, April 1980. 3. Vaidyanathan, P. P. and Nguyen, T. Q., Eigenfilter: a new approach to least-squares FIR filter design and applications including Nyquist filters. IEEE Trans. Circuits Sys~., 1987, CAS-34, I l-23. 4. Pei, S.-C. and Shyu, J.-J., Complex eigenfilter design of arbitrary complex coefficient FIR digital filters, IEEE Trans. Circuirs Syst.-II,

5. Ramachandran, Signal Processing,

1993, 40, 32-40.

R. and Sunder, S., A unified and efficient least-squares design of linear-phase nonrecursive filters. 1994, 36, 41-53.

6. Sunder, S. and Ramachandran, R., An efficient least-squares approach for the design of two-dimensional linear-phase nonrecursive filters. Proc. IEEE Int. Symp. Circuits Syst., London, UK, pp. 577-580, May 1994. 7. Stewart, G.W., Introduction to Matrix Computation. Academic Press, New York, 1973. 8. Lu, W.-S. and Antoniou, A., Two-dimensional Digital Filters. Marcel Dekker, New York, 1992.

AUTHORS’ BIOGRAPHIES

&am AWeI-R&em received the B.Sc. (Hons.) and the M.Sc. degrees in electrical engineering from Ain Shams University, Cairo, Egypt, in 1984 and 1989, respectively. In 1995, he received the Ph.D. in electrical engineering from University of Victoria, B.C., Canada. He is currently with the department of electrical engineering at the University of Ottawa, Canada. His research interests include digital signal processing, digital communications, and digital VLSI circuit design.

Dr Fayez ElguIbaly received his B.Sc. (EE) in 1972 from Cairo University and his B.Sc. (Math) from Ain Shams University in Cairo. He received his Ph.D. degree from the University of British Columbia in 1979 in Electrical Engineering. He joined the Electrical and Computer Engineering Department of the University of Victoria in 1984. Dr Elguibaly’s research interests include ATM switching fabric design, Computer Arithmetic, Mapping parallel algorithms on processor arrays, and VLSI design for DSP and Digital Communications. Dr Elguibaly is a Senior Member of the IEEE since 1983 and is a member of the Association of Professional Engineers and Geoscientists of British Columbia. He consults with the Canadian Space Agency and PMC-Sierra.

FIR

281

Tet Yeap received the B.A.Sc. degree in electrical engineering from the Queen’s University in 1982. He then received the M.A.Sc. and Ph.D. degrees in electrical engineering from the University of Toronto, in 1984 and 1991, respectively. He is currently an assistant professor in the Department of Electrical Engineering, University of Ottawa. His research interest include broadband access architecture, neural networks, multi-media and parallel computer architectures.