Vous êtes sur la page 1sur 4

A DIRECT APPROACH T O T H E DESIGN OF MULTIDIMENSIONAL PCAS DIGITAL FILTERS SATISFYING GAIN AND GROUP DELAY SPECIFICATIONS SIMULTANEOUSLY

Martin Anderson and Stuart Lawson'

Digital filters with linear or almost linear phase are required in many applications including video, sonar and image processing. A direct design approach is reported here which can be applied to 1-D and M-D filter design so long as the filter structure is a parallel combination of allpass subfilters(PCAS). PCAS filters are used because of their low complexity and roundoff noise as well as their ability to realise nonminimum phase transfer functions. The filter design will be shown to reduce to the solution of two sets of linear simultaneous equations. Examples are given in both the I-D and 2-D case to illustrate the method. Phase Function of M-D Allpass Subfilter To simplify notation, the bold type is used to represent vectors and matrices. The M-D 2 transform is defined using the vector z = [LI,2 2 , .., 2 , t { l T . The M-D frequency is defined using the vector u = [ w ~ , w z. ,. , w M ] ~ . The 2 transfer function of an M-D allpass digital filter of order N=(.Vl, N2,.., N M ] is given by

where

N is the set of all M

x 1 integer vectors up to and including N

Noting that N ( r ) = D ( z - ' ) z - ~ ,the phase is given by

Using eqn.(2) it can be shown[l] that

where [o] is the D x 1 null vector and ~ ( [ o= ]) 1. Eqn.(3) is linear in the filter coefficients a ( n ) and so can form the basis of a set of simultaneous linear equations to solve for ~ ( n The ) . set is generated by choosing a number of frequency p0int.s in the bands of interest. The number of frequency points will, in general, be greater than the number of coefficients. The resulting overdetermined equation set can be solved in the least squares sense. The equations to be solved can be written in the following matrix form,

Aa=b
where a = [a(n)lT, A= [sin {nu- i ( 4 ~ p Nu)}], b = [sin { f(4ap N W ) } ] ~ .

(4)

for n E N - [o]

E 'RALP.

'Department of EngiueeringJJnivemity of WarwicL,Coventry,CV47AL 2' 1993 The Institution of Electrical Engineers Printed and published by the IEE. Savoy Place. London WCZR OBL. UK.

The weighted least squares solution to eqn.(4) is


a = [ATWA]-ATWb

(5)

where W is a positive definite weighting matrix. For filter design, this matrix will, in most cases, be diagonal. We have used a simplified case in which W is set t o be the unit matrix. This solution is unique if A ~ W A is non singular. PCAS Transfer Function Let the transfer function of AP1 be H1 and that of AP2 be H 2 then, because of their allpass nature, it is well known that

where M ( w ) , 4(w) and ~ ( w= ) TO^, 7 0 2 , .., TOM] are the magnitude, phase and group delay of the overall ] the transfer function H = ${HI Hz}, and & , T , = [711, TIP, .., TIM] and 4 2 , T, = [m,722. .., T ~ M are phase and group delay(s) of API and AP2 respectively. In the passband, M ( w ) = 1 and so, using eqn.(6), 41 4 2 . For ALP it is also required that 4(w) = -kw , where k=[kl, k 2 , .., kM]. Hence, in the passband, both 41 and 4 2 should approximate to -kw.

In the stopband, M ( w ) = 0 and so , using eqn.(6), 41

= 42 + x .

There is no ALP condition

Design Algorithm Using the results of the previous section, the ALP design algorithm for an M-D lowpass filter of order N can now be formulated. Firstly the order of the allpass subfilters must be determined. It is known that in the I-D case, their orders must differ by one . Good multidimensional results have also beeii obtained by ensuring their orders also differ by one in each dimension, so the calculation is straightforward. In addition, the order of AP1 must be less than that of AP2. The design procedure concentrates on A P I first. In the passband, the phase $1 must approximate -kw , so that eqn.(3) is used over a set of points in the passband region, R,. The point w = [o]is not used as it yields a zero row in the matrix A. The over-determined set of linear equations is then solved for the subfilter coefficients using eqn.(5). The next stage is to design AP2. In this case, both the passband region R , and the stopband region R, have to be considered. In the passband region R,, 42 must also approximate -kw . In the stopband region a,, it must approximate $1 - x . Eqn.(3) is used to generate a set of simultaneous linear equations over X p and 72.. for AP2. A weighted least squares solution for the equations is obtained using eqn.(5) , giving the filter coefficients for AP2. General Properties

. The phase of a multidimensional allpass subfilter is fixed at zero when D ( z ) = D ( z - ) z - ~ The M phase is also fixed at C=l - N , w , when w, E { - 7 r , o , m } , {i=l,M}. This results in either fixed passbands or stopbands a t these frequencies. When D ( z ) = D ( z - ) z - occurs ~ depends on the region of

3f2

k 31.0 32.0 33.0 34.0 35.0 36.0 37.0 38.0 39.0 40.0 41.0

Table 1: Example 1: variation of various parameters with k

T
0.0004 0.0004 0.0003 0.0003 0.0002 0.0001 0.0001 0.0001 0.0001 0.0002 0.0002 66.88 68.53 70.03 71.67 73.64 75.98 78.61 81.42 84.32 87.27 90.21

4.39 4.29 3.97 3.53 3.10 2.80 2.66 2.68 2.84 3.09 3.42

support of the polynomial D(z) and the polynomial coefficients. For responses which are symmetric in all dimensions with n; > 0, the allpass subfilters have zero phase when W I w2 .. 3~ = 0. The desired filter response is obtained by using the technique described in [l]. In some cases the desired fixed response at certain frequencies can be obtained by inserting a delay z - N D in the upper subfilter branch , which then modifies the branch phase to -(Ni Np)w,. The value of k is crucial in ensuring a satisfactory solution. In extreme cases, the design could be unstable. Upper and lower bounds for the 1-D case have been reported [5]. We have found for each design, a range for k that yields acceptable results. The number of frequency points on R, and R, is a variable parameter too. However, with the various filters designed, the effect of increasing the number of points appears not to be significant. The minimum number is equal to the number of filter coefficients in AP2, but in general is chosen t o be much greater because of the large frequency space w .

+ + +

Example I:]-D lowpass An ALP lowpass filter was designed using the following narrowband specifi, = 0.05, fa = 0.1, ap = 0.1 dB and a, = 70 dB, where a , , a, are the passband and stopband cation: f tolerances, respectively. The filter order used was 19. In order t o measure the success of the design method, the percentage delay error, d e . is used and is defined as follows:
d e = 200

(-) l+X
1-X

(7)

where X = T , , , ~ ~ / T , , , This ~ ~ . error was chosen because it does not depend on the actual values of maximum and minimum delay, only on their ratio. This error is calculated over the passband of the designed filter. In addition, the passband ripple and minimum stopband attenuation, both in dB's, are recorded. Various values of k were tried and the results are summarised in Table 1. The grid consisted of only 30 equi-spaced frequency points. This contrasts with 50 used in [2]. From the table, i t is clear that the case when k = 33 yields a design that meets the specification. The resulting delay error is 3.97%. It is possible to perform a single variable optimisation on k to find the minimum delay error subject to the constraints on ap and as. It turns out that the optimum value of k, in this case is 37.39 at which the delay error is 2.65%. Example II:2-D lowpass fan filter An ALP 45" lowpass fan filter was designed with the following specification Rp E I 4 2 2b2l

72, E

lull

+ 0.2n 5 2 1 4

(8)

3/3

Figure 1: g t h x 9h order 2-D fan filter response T h e orders of the upper and lower branches were set to N= [4,4] and N = [5,5] respectively. giving an overall filter order of N= [9.9]. The difficult specification required the subfilter polynomials to have non-symmetric half plane support[4]. T h a t is, the allpass subfilters had support in the first and second quadrants but were still recursively computable. The correct fixed PCAS response its described in section 4. was obtained by inserting an extra t; delay in the upper branch. Iiith k= [4.4] and R, plus R, consisting of approximately 400 points, the filter achieved the following specification ap = 0.0382 dB, a, = 40.97 dB ,del = 13.56% and de2 = 15.96% with average passband group delays 70, = 4.508 and 7 0 0 2 = 4.0207. The magnitude response is shown in figure 3 . Acknowledgements The authors would like to thank both SERC(UK) and the Isle of Man Government for supporting this work

References
[I] M.S.Anderson and S.S.Lawson, Direct design of ALP 2D IIR digital filters, Electronics Letters, Vo1.29, 804-5, 1993 [2] M.Lang and T.I.Laakso, Design of Allpass Filters for Phase Approximation and Equalization Using LSEE Error Criterion, Proc. ISCAS-92, San Diego, IEEE, 2417-2420. 1992. [3] S.S.Lawson, A New Direct Design Technique for ALP Recursive Digital Filters. Proc. ISCAS-93, Chicago, IEEE, 499-502,1993. [4] M.Ekstrom, R.Twogood and J.Woods, Two -dimensional recursive filter design- a spectral factorisation approach, IEEE Trans. A S S P , Vo1.28, 16-26,1980. [5] Z.Jing, A new method for digital dpass filter design, IEEE Trans. acoustic.^, Speech 4 S:g.Proc., vo1.35, 1557-1564.1987.

3/4