Recursive FIR digital filter design using a -transform on a finite ring

10
IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, VOL. ASSP-31, NO. 5, OCTOBER 1983 1155 Recursive FIR Digital Filter Design Using a z-Transform on a Finite Ring HIDE0 MURAKAMI, IRVING S. REED, AND ALBERT ARCESE Abstract-Properties of a new complex number-theoretic z-transform (CNT z-transform) over a finite ring are presented here and related to the usual z-transform. Using the Chinese remainder theorem, it is con- venient to use finite rings that are isomorphic to the direct sum of finite or Galois fields of theformGF(q2)where q is a Mersenne prime. Many propertiesofthe usual z-transform are preserved in the CNT z-transform. This transform is used in the present paper to design both recursive and nonrecursive FIR filters on a finitering. The advantages of the FIR filter on a finite ring are the following: 1) the absence of a roundoff error build up in the computation of either the recursive or nonrecursive realization of the filter; 2) when the FIR filter is recursive, the question of stability does not arise as long as the magnitudes of the impulse response and the input sequence do not ex- ceed their design values; 3) for the frequency sample representation of the FIR filter an absolute error bound on the impulse response function can be obtained in terms of the power spectrum. The time required to compute a nonrecursive FIR filter on the Galois field GF(q2), where q is a Mersenne prime, is competitive with the similar nonrecursive realization on the usual complex number field, usingthe FFT algorithm. 0 I. INTRODUCTION VER the last few years, number-theoretic transforms over finite fields and rings have drawn the attention of many researchers [l] -[6], [7, sect.6.191. These transforms have been used primarily to improve the computational speed and to make error-free the calculation of finite digital convolutions. The transform pair is given by X(k) = x(n) ank d- 1 FZ=0 x(n) = d-1 X(k) a-nk d-1 k=O where a is the root of unity of order d, i.e., d is the least positive integer such that ad = 1. When the integer d is highly composite (the product of many small factors, e.g., d = 2L), the FFT algorithm can be used to compute the transforms. Several results of papers [ l ] , [2] are used in the develop- ment of this paper. Their transforms were developed in detail over the Galois field GF(q2), and the direct sum of such Galois Manuscript received January 8, 1982; revised November 22, 1982 and January 12, 1983. This work was supported in part by MITRE IR&D, Project 90080 and Air Force Contract F19628-81C-0001, Project 7090. H. Murakami and I. S. Reed are with the Department of Electrical Engineering, University of Southern California, Los Angeles, CA 90007. A. Arcese is with The MITRE Corporation, Bedford, MA 01730. fields using methods analogous to those used for the complex number field. This transform has been suitably called the complexnumbertheoretic (CNT) transform[5] . The CNT transform makes it possible to relate quite closely the number theoretic transforms to the usual Fourier analysis. Digital filters over the usual complex number field are equiv- alent to sets of linear-difference equations with constant coef- ficients. The z-transform has proven tobe useful in the design and analysis of these difference equations [7] -[9] . A complex number-theoretic transform (CNT transform) was introduced over a finite ring, isomorphic to the direct sum of Galois fields in [ 101 . The CNT transform was used to design a filter specified by a set of first-order difference equations on the finite ring and also to reduce the number of such difference equations. Now a new z-transform is introduced which, in addition to the results in [lo], allows for more general realiza- tions infilter design. Properties of the CNT z-transform are explained in this paper in parallel with the usual z-transform. It is shown that many of the properties of the z-transform are preserved in the CNT z-transform. As it will be seen, the CNT z-transform represen- tation enables one to design an FIR filter over the finite ring byeither recursive or nonrecursive techniques in a manner analogous to the z-transform method of filter design over the usual complex number field. The accumulation of roundoff and truncation error, as well as stability, sometimes cause trouble in the design of recursive FIR filters on the usual complex number field [8], [lo] . The FIR filters developed here, over the finite ring, do nothave any accumulation of errors in recursive computations. The question of stability due to particular design configurations does not arise as long as the impulse response and the input sequence satisfy the appropriate dynamic range constraint (Section IV). In this paper, nonrecursive FIR filter design methods are also developed. These techniques areuseful because the CNT trans- form can be computed by the FFT algorithm [ l ] , [2]. It was observed [lo] that primitive eighth roots of unity in the Galois field G F ( c ~ ~ ) are powers of two when 4 is a Mersenne prime. Using this property, a radix-8 FFT algorithm for evaluating the CNT transform was shown to be faster than the usual FFT algorithm in computing the discrete Fourier trans- form (DFT) [ 111 . Also, power-of-two primitive roots of unity in GF[(2P - 1)2] are easily determined [20] . Using the radix- two FFT algorithm, nonrecursive FIR filters over the Galois field GF(q2) are competitive in computational speed with the nonrecursive realization on the ordinary complex number field. Filters designed over a finite ring require input sequences to 0096-3518/83/1000-1155$01 .OO 0 1983 IEEE

Transcript of Recursive FIR digital filter design using a -transform on a finite ring

IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, VOL. ASSP-31, NO. 5 , OCTOBER 1983 1 1 5 5

Recursive FIR Digital Filter Design Using a z-Transform on a Finite Ring HIDE0 MURAKAMI, IRVING S. REED, AND ALBERT ARCESE

Abstract-Properties of a new complex number-theoretic z-transform (CNT z-transform) over a finite ring are presented here and related to the usual z-transform. Using the Chinese remainder theorem, it is con- venient to use finite rings that are isomorphic to the direct sum of finite or Galois fields of the form GF(q2) where q is a Mersenne prime. Many properties of the usual z-transform are preserved in the CNT z-transform. This transform is used in the present paper to design both recursive and nonrecursive FIR filters on a finite ring.

The advantages of the FIR filter on a finite ring are the following: 1) the absence of a roundoff error build up in the computation of either the recursive or nonrecursive realization of the filter; 2) when the FIR filter is recursive, the question of stability does not arise as long as the magnitudes of the impulse response and the input sequence do not ex- ceed their design values; 3) for the frequency sample representation of the FIR filter an absolute error bound on the impulse response function can be obtained in terms of the power spectrum. The time required to compute a nonrecursive FIR filter on the Galois field GF(q2), where q is a Mersenne prime, is competitive with the similar nonrecursive realization on the usual complex number field, using the FFT algorithm.

0 I. INTRODUCTION

VER the last few years, number-theoretic transforms over finite fields and rings have drawn the attention of many

researchers [ l ] - [6] , [7, sect. 6.191. These transforms have been used primarily to improve the computational speed and to make error-free the calculation of finite digital convolutions. The transform pair is given by

X(k) = x(n) ank d - 1

FZ=0

x(n) = d-1 X(k) a-nk d - 1

k=O

where a is the root of unity of order d, i.e., d is the least positive integer such that ad = 1. When the integer d is highly composite (the product of many small factors, e.g., d = 2 L ) , the FFT algorithm can be used to compute the transforms.

Several results of papers [ l ] , [2] are used in the develop- ment of this paper. Their transforms were developed in detail over the Galois field GF(q2), and the direct sum of such Galois

Manuscript received January 8, 1982; revised November 22, 1982 and January 12, 1983. This work was supported in part by MITRE IR&D, Project 90080 and Air Force Contract F19628-81C-0001, Project 7090.

H. Murakami and I . S. Reed are with the Department of Electrical Engineering, University of Southern California, Los Angeles, CA 90007.

A. Arcese is with The MITRE Corporation, Bedford, MA 01730.

fields using methods analogous to those used for the complex number field. This transform has been suitably called the complex number theoretic (CNT) transform [5] . The CNT transform makes it possible to relate quite closely the number theoretic transforms to the usual Fourier analysis.

Digital filters over the usual complex number field are equiv- alent to sets of linear-difference equations with constant coef- ficients. The z-transform has proven to be useful in the design and analysis of these difference equations [7] -[9] .

A complex number-theoretic transform (CNT transform) was introduced over a finite ring, isomorphic to the direct sum of Galois fields in [ 101 . The CNT transform was used to design a filter specified by a set of first-order difference equations on the finite ring and also to reduce the number of such difference equations. Now a new z-transform is introduced which, in addition to the results in [ lo ] , allows for more general realiza- tions in filter design.

Properties of the CNT z-transform are explained in this paper in parallel with the usual z-transform. It is shown that many of the properties of the z-transform are preserved in the CNT z-transform. As it will be seen, the CNT z-transform represen- tation enables one to design an FIR filter over the finite ring by either recursive or nonrecursive techniques in a manner analogous to the z-transform method of filter design over the usual complex number field.

The accumulation of roundoff and truncation error, as well as stability, sometimes cause trouble in the design of recursive FIR filters on the usual complex number field [8 ] , [ l o ] . The FIR filters developed here, over the finite ring, do not have any accumulation of errors in recursive computations. The question of stability due to particular design configurations does not arise as long as the impulse response and the input sequence satisfy the appropriate dynamic range constraint (Section IV).

In this paper, nonrecursive FIR filter design methods are also developed. These techniques are useful because the CNT trans- form can be computed by the FFT algorithm [ l ] , [2]. It was observed [lo] that primitive eighth roots of unity in the Galois field G F ( c ~ ~ ) are powers of two when 4 is a Mersenne prime. Using this property, a radix-8 FFT algorithm for evaluating the CNT transform was shown to be faster than the usual FFT algorithm in computing the discrete Fourier trans- form (DFT) [ 111 . Also, power-of-two primitive roots of unity in GF[(2P - 1)2] are easily determined [20] . Using the radix- two FFT algorithm, nonrecursive FIR filters over the Galois field GF(q2) are competitive in computational speed with the nonrecursive realization on the ordinary complex number field.

Filters designed over a finite ring require input sequences to

0096-3518/83/1000-1155$01 .OO 0 1983 IEEE

1156 IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, VOL. ASSP-31, NO. 5, OCTOBER 1983

the filter to be complex (Gaussian) integer-valued and to satisfy the dynamic range constraint. Such complex integer valued sequences can be achieved by proper scaling and quantization of the input sequences. The quantization and the dynamic range constraint are inherent requirements in representing num- bers in a digital computer since only finite length registers can be assigned to represent numbers.

The FIR filter that is designed to operate without error on a finite ring, such as R42 (ring of Gaussian integers), is more naturally a "digital" filter than the usual FIR digital filter. By the very finiteness of the ring, R,. , only fixed length digital registers are needed to realize the FIR filter on a finite ring. Such digital filters when realized as discrete transducers are information lossless in the sense of Shannon [ 13, p. 261.

11. STABILITY AND ACCUMULATION OF ERRORS IN AN FIR FILTER OVER THE USUAL COMPLEX

NUMBER FIELD A simple FIR filter over the usual complex number field is

reviewed in this section. The structure of this filter is similar to the design in Section I11 on a finite ring. The stability problem and accumulation of errors of the FIR filter over the usual complex number field are discussed here briefly to moti- vate the need for an FIR filter in which the arithmetic is free of roundoff error.

The z-transform [8] of a finite-duration sequence of length d is defined by

G(z) = g(n ) z d-1

n = o

over the usual complex number field. Notice that f 1 used in [8] corresponds to z in the present notation. In (3) d is the window size. This z-transform can be expressed in terms of d samples at equal spacing around the unit circle in the z-plane as

C ( Z ) = (1 - z d ) - ~

1 d - 1 G,

d m=o 1 - WrnZ

where

The FIR system can be realized as a cascade of a simple FIR system with an infinite impulse response (IIR) system [8, p. 1601. The system function of the FIR system is 1 - zd and the IIR portion of the network consists of a parallel combina- tion of d complex first-order systems with poles at Since the first-order systems have poles exactly on the unit circle, a stability difficulty arises. The behavior of the accu- mulation of roundoff or truncation error in such a filter is discussed in [1,0, sect. 111 and [14]. When floating point rounding is employed the variance of the error grows linearly with n [ 10, eq. (9)] .

111. CNT Z-TRANSFORM AND ITS PROPERTIES In this section, a CNT z-transform is defined and developed

in parallel with the usualz-transform. First, some of the results in [ l ] , [ 2 ] are needed before defining the CNTz-transform.

Let q be a product of primes q = q k , and let 4 denote a solution of the equation x2 = - 1 mod q. If one lets R , be the ring of residues of integers mod q , then set

R42 = {s + ? t l s , t E R q } (5)

of q2 elements y c h that addition is given by (s + ? t ) + (u + i u ) = (s ;t u), + i (t + u), a,"d multiplication is given by (s + i t)(u t i u ) = (su - tu) , + i (su + tu), is a finite commutative ring [2, Theorem 13. (x), denotes residue mod q . If (-1) is not a quadratic residue of q k , for k = 1 , 2 , . . * , r , then the set Rq2 is isomorphic to the direct sum of Galois fields defined by [2 , Theorem 21.

A

A

S,, = G F ( q ~ ) ~ G F ( q ~ ) ~ . . . ~ G G F ( q : j

={(a1,a2 , . . . , a , ) j a , E G F ( q ~ j , k = 1 , 2 , . . . , r } (6)

where

(pl,a2,'..,a,)f(bl,b:! , . . . , b , ) = ( a l f b , , + a z + h , . . . , a r + b , ) (71

and

(al,a2,...,a,).(~l,bZ,...,b,)=(~lbl,~zbZ,...,avb,~ . (8 )

The isomorphic mapping CP from Rq2 to S,z is given by

@: (s + ? t ) -+ (s + P t),, + (s + P t),, f . . . + (s t ? t),, (9)

where (s + P t)qk = ( s ) , ~ + ? (t),, and the inverse mapping is given by the Chinese remainder theorem [IO] .

It was shown [ l ] that (-1) is not a quadratic residue of a Mersenne prime

M P = Z p - 1 for p=2,3 ,5 ,7 ,13 ,17 ,19 ,31 ,61 ,89 ,

107,. * . , which allows complex extension fields.

Since A4; - 1 = 2 p + ' ( 2 p - ' - l ) , primitive dth roots of unity exist in GF(Mi) if d12P+1. Algorithms to find such roots of unity were developed also in [ 1 ] , [ 1 1 ] , and [20] . If 4 =

primitive dth roots of unity in R,z are found by Theorem 3 in [ 2 ] and Theorem 1 in [ 2 0 ] . Since d is a power of two, a radix two FFT algorithm can be used to compute the CNT transform. This is explained in more detail in Section VI.

Now let a complex integer sequence h(n> of length d be the impulse response of the filter. The following theorem is a direct generalization of Theorem 4 in [ 2 ] .

Theorem I : Let a! be a primitive dth root of unity in R,2 and

M P I MP2 . . . MP, and d12Pk+1 for ( k = 1 , 2 , . . . , T ) , then

s= {1 ,a ! , - . . , a d - ' ) . (1 0)

Then a d-point CNT z-transform over Rq2

H ( z ) = h ( n ) z n d - 1

(1 1 a) n = o

and its inverse

h(n) = d - l z-nH(z) ( 1 1b) z E S

exist.

MURAKAMI e t al . : RECURSIVE FIR DIGITAL FILTER DESIGN 1 1 5 7

Proof: By (14) in [2] TABLE 1 PROPERTIES OF THE CNT 2-TRANSFORM

zm = I d, r n = O m o d d

Z € S 0, rn $0 mod d.

for (0 < j < d - 1). (1 3)

Since d and q are relatively prime [2, proof of Theorem 41, d-' exists inR,z [ 15, Theorem 2.131 and the theorem follows.

Equation (13) is known as the Reed inversion formula [ 17, p. 4081. To show the circular convolution property of the transform, let

d-1 H(z)= h(n)zn, G(z)= g(n)z"

d-1

n=o n=o

and E(z) = H(z) C(z).

Then by (1 1 b) the inverse transform of E(z) is

e ( j ) =d-' z-jE(z) =d-' z- j h( i )zn d-1

Z E S Z E S n = o

=d-' k ( n ) g ( m ) ~ ~ + ~ - j d-1 d-1

n=o m = o Z E S

n=o

where ( j ; n)d denotes the residue o f j - n mod d. Next we derive the analog of Parseval's theorem. Let H(z)

and G(z) be the CNT z-transforms of h(n) and g(n), respec- tively. Then the CNT z-transform of the product of these sequences is

d-1 h(n)g(n)zn = k ( n ) (d-' U-" G(u)) z n

d-1

n=o n=o u E S

=d-' G(u) h(n)zn u - ~ d-1

u E S n=o

Table I. The properties 3-10 in the table are straightforward to prove. It is interesting to compare this table with properties of the usual z-transform in Table 2.1 in [8, p. 671 .

Iv. IMPULSE RESPONSE REPRESENTATION OF FILTERS AND THE DYNAMIC RANGE CONSTRAINT

This section first shows that FIR filters with any desired complex integer finite impulse response can be represented in terms of the CNT z-transform. It also is demonstrated that such filters can be realized by the recursive structure shown in Fig. 1. For the latter purpose the following theorem is proven.

Theorem 2: Every CNT z-transform H ( z ) = h(n)zn 4, over R,z has a unique representation of the form

H(z) = ( 1 - zd) d-1 a,

m =o 1 - a m z

where 01 is an element of order d in Rq2 and

a, =d-' H(Z)~, ,~ - rn =d- ' k ( n ) d m n . d-1

n=o

Proofl First we show that for a given H(z) = Xi:; k (n)zn the expression

m =o

(15) with = d - l G(u)H(z/u).

u E S

An interesting special case of (15) is the case h(n) =g(n) and d-1

z = 1. In this case a, = d-' k ( n ) K m n n=o

d-1 lk(n)I2 =d-' H(z)K(l/F) (16) is equal to H(z).

where denotes the complex conjugate and lh(n)I2 denotes formula (13) on the sum of squares of the real and imaginary party of k ( n ) in the ring Rqz , (1 - zd) a m / ( l - P z ) ,

n=o z ES Applying the inverse CNT z-transform or the Reed inversion

d-1

Some properties of the CNT z-transform are summarized in m =o

1158 IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, VOL. ASSP-31, NO. 5, OCTOBER 1983

Fig. 1. Recursive FIR system using first-order difference equationsonRqz

one has Theorem 2 says that any FIR system on R,. can be imple-

d - 1 a, mented by a linear combination of first-order difference equa- tions by the structure shown in Fig. 1. The weights a, =

k=O h(n) a-mn for (m = O,1, . . . , d - 1) are the inverse d-l z-j (1 - z d ) c

Z E5 1 - a m z m = o d-1 C d - 1

d-1 (1 - zd)z-i CNT transform of the sequence h(n) and can be computed by Zd-1 the FFT algorithm (see Section VI).

m =o The dynamic range constraint is now considered. In order Now observe that that the filter output y ( n ) = C,dIh x(n - k ) h (k ) be the correct

arithmetic convolution, it is sufficient that [ 1 3 , [lo] d-1 1 - z d d i f z = a - l a n d l = m m o d d

(am2)k = k=O 1 - a m z = 1 i f z = a - z a n d I + m m o d d 4 - 1~4dmax( lp (n ) ( , Iq (n ) [ )max( jv (n ) j , I s (n ) ( ) (19)

n n

by (12). Thus,

d-' z-i (1 - zd) __- d-1 a,

z E5 m=o 1 - a m z

= a, aim d - 1

m=o

m=o n=o

n=o

(18) where p ( n ) and 4(n) are the real and imaginary parts of the input sequence x ( n ) , and v(n) and ~ ( n ) are the real and imagi- nary parts of the impulse response h(n).

In Section I1 above, an FIR system on the usual complex number field was implemented as a cascade of an FIR system with an IIR system. It gave difficulties with the stability. This type of problem does not arise in the design of the filter H ( z ) on R,z . One does not need to worry about the stability in realizing the filter H ( z ) as long as a dynamic range constraint, such as (1 9), is satisfied. This property is a direct consequence of the finite modular arithmetic in the ring Rq2 . Therefore, the design problem on R,2 is primarily a problem of complexity reduction.

Therefore, the inverse CNT z-transform of (1 - z d ) c$J0 a,/(l - a m z ) gives the desired impulseresponseh(n). Next, to show uniqueness, suppose that (1 - zd) C g-20 am /(1 - amz) = (1 - zd) 2 $-Lo bm/(l - aimz). Then one has the identity In many situations, one wants to design a filter with given (1 - z d ) C $-20 (a, - bm)/( l - ai,~) = 0. Substituting z = ai-' frequency samples or frequency response function. The usual in the identity and using (18), one has d(a l - bl) = 0. Since z-transform of a finite-duration sequence of length d over the dlqkz - 1, d and 4 are relatively prime, az - bl = 0 for (1 = 0 , 1, usual complex number field in (3) can be rewritten in the . . . , d - 1)[16, Theorem 2.31. following form:

V. THE FREQUENCY SAMPLE REPRESENTATION OF

FIR FILTERS

MURAKAMI e t al . : RECURSIVE FIR DIGITAL FILTER DESIGN 1 1 5 9

tGd- l d-1 (d-i)nZn

n=O

N

where o = e i2?r/d and GI = G (z)l,=, - 1 = g(n) o-'. d-1

n=o

Here the frequency sample GI can be assumed to have been previously scaled and quantized to a complex integer value for ( I = 0, 1, . . . , d - 1). In order to represent the above filter on the finite ring R,. , the complex roots of unity oLn in (20) need also to be quantized and scaled to be complex integers. To accomplish this, one must multiply (20) first by a scale factor p and then quantize, where p is an integer. The multi- plication by the scale constant p obviously does not change the filter characteristics. Quantization of a complex number x is accomplished here mathematically by taking the principal part [x] of x. The principal part [x] of a complex number x is defined as the complex integer less than or equal to the number. Other methods of quantization may also be used.

Now multiply (20) by the scale factor p and quantize. Then the complex integer version of the z-transform is given by

H(z) = Go [ ~ w " ~ ] z ~ t G1 [ p o n ] z n t . . . d-1 d- 1

n= 0 n=O

To justify the above approximation, a bound of the truncation error is computed. Since

&(z) = dg(n) z n = ( C . G 1 a") z n d-1 d-1

n=O n=O 1=0

by (20) and

d-1 H(z)= h(n)zn = GI [ p a z n ] Z"

d-1 d-1

n=O n=O Z=O

by (21), one has

d - 1 d-1 dg(n) = GI and h(n) = GI [ p o l n ] .

I=0 1-0

Thus, the error is bounded from above, as follows [ 101 :

where

1 g^(n) = -- h(n).

Pd

Thus, the scaled and quantized version (21) of the z-transform (20) can approximate (20) with any desired accuracy.

H(z) in (21) can be expressed in a more convenient form.

First, let

w, (z) = [ p o ' " ] zn d - 1

n=o

Then, by applying Theorem 2 to each W I (z), one obtains

where

Thus, substituting (22) and (23) into (21), H(z) can be ex- pressed by the form

Therefore, if one computes a table of cZ,, evaluated by c1,, =

integer frequency samples GI for (I = 0, 1, . . . , d - 1) can be expressed by the CNT z-transform by (24). The representation (24) of H(z) is realized by the block diagram in Fig. 1, except that a, in the diagram is replaced by

d-1 z d - 1 n=O [ p a z n ] the filter with any given complex

d-1

I=0 Glcl,, for (m = 0, 1 , . * . , d - 1).

Because of the z-transform representation, filter realizations other than given in Fig. 1 are possible depending upon the polynomial forms of (24).

In [ lo] some properties of the weights q m are explained. It turns out that many of the c ~ , ~ ' s are zero. Thus, if the filter to be implemented is a frequency selective filter with only a few passbands, filtering technique developed in this section is more efficient than the direct-form convolution realization [S, p. 1561 or the nonrecursive techniques ex- plained in the following section. Furthermore, such filters can be designed more efficiently using higher order difference equations that the first-order difference equations of the form (24).

VI. NONRECURSIVE REALIZATION OF FILTERS In the previous two sections, it was shown that an FIR

filter with any desired finite impulse response or frequency samples can be expressed in terms of the CNT z-transform. Nonrecursive techniques to realize a filter with a given CNT z-transform are developed now in this section. These tech- niques are precisely similar to the standard nonrecursive realiza- tion of an FIR filter over the usual complex number field when the FFT algorithm is used to compute the discrete Fourier transform (DFT).

The CNT z-transform of a finite-duration sequence h(n) of length d is given by (1 la). The complex number theoretic

1160 IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, VOL. ASSP-31, NO. 5, OCTOBER 1983

(CNT) transform is [ 1 ] , [2]

&(k) L H(.k) = h(n) Orkn d-1

n=o

and the inverse CNT transform is

k=O

Since the power-of-two roots of unity in GF(y2), where y is a Mersenne prime of the form 2p - 1, are easily determined [20], the CNT transform and the inverse CNT transform can be evaluated more efficiently than the DFT by using an FFT algorithm [ 1 1 ] .

If H(k) and X ( k ) are the CNT transforms of two sequences h(n) andx(n), respectively, then the inverse CNT transform of H(k) X ( k ) gives the circular convolution of the two sequences h(n) and x(n) [I], [2]. Therefore, the standard nonrecursive FIR filtering techniques [8, ch. 31 based on the DFT and the FFT algorithm can be used to implement nonrecursive FIR filters on R,z .

A nonrecursive FIR filter is designed as follows. First H(k) for (k = 0, 1, . . . , d - 1) is evaluated by either

k(k) = y h(n) akn n=1

or

k(k) = y ( y GI [pa'"]) akn n = o z=o

depending on whether the impulseAresponse h(n) or the fre- quency samples Gz's are given. If X ( k ) is the CNT transform o,f thejnput sequence x(n) , then the inverse CNT transform of X ( k ) H(k) gives the desired filter output, where H(k) is eval- uated by (25a) or (26). The number of computations required to implement the above system is proportional to 2d log, d + d.

In most applications, one is interested in implementing a linear convolution of two sequences. In suchcases, the overlap- save method [9, ch. 71, [17] can be used, employing the CNT transform in place of the DFT.

Various approaches for designing FIR digital filters using the theory of weighted Chebyshev approximation, are discussed in [ 18 J . A general-purpose computer program which is capable of designing a large class of optimum FIR linear phase digital filters has been written in Fortran [19]. This program gives the desired impulse response of the optimum FIR filter speci- fied as low-pass, high-pass, bandpass, etc. By properly scaling and quantizing the desired impulse response and using (25a), the optimum FIR linear phase digital filter can be designed on the finite ring I?,. . In the next section, examples of FIR filter design on a finite ring are presented. This paper i s concerned with the design procedure, not implementation. The cornpari- son of an FIR filter for which the standard recursive imple- mentations are sensitive to the accumulation of finite precision arithmetic errors is given in [ 10 J .

TABLE 11 INTEGER VALuEn IMPCJLSE RESPONSE OF THI. ci = 32 BAKIWASS FILTER

IK EXAMPLI: I

h( O ) = -56=h(31) h( 1)= 10=h(30)

h( 3 ) = -65=h(28) h( 2 ) = 76=h(29)

h( 4)= 140=hiZ71 h( 5 ) = 25=h(26j h(. 6) -20@=h(25) h( 7 ) = 71=h(24) h( 8)= -397=h(23) h( 9 ) = 113=h(22) h ( lo)= 662=h(21)

hi 1Zi= 851=hf19'1 h( 11)= -1@5=h(20)

h i 13j=-1zoZ=hiisj h( 14)=-2965=h(17) 3( 1 5 ) = 3041=h(16)

1 I d 84' 126' 1st ' a2a' M' 448 512'

-1-

Fig. 2. Log magnitude response for thed = 32 bandpass integer rounded impulse response filter in Example 1.

VIII. EXAMPLES OF FIR FILTER DESIGN ON A FINITE RING

An FIR filter is designed. in. this section to have both a re- cursive and nonrecursive information lossless realization. The following example is taken from a d = 32 bandpass filter, given in [19].

Example 1: The impulse response of a d = 32 bandpass filter was given in [ 19, Fig. 91 . The impulse response of this filter is first multiplied by lo4 and then rounded off to be integers. The resulting integer-valued impulse response is shown in Table 11. Fig. 2 i s the log magnitude response for the integer rounded impulse response filter. The degradation due to the integer truncation is small, as one can see by comparing Fig. 2 to Fig. 3.

4 is chosen to be the Mersenne prime q = 231 - 1 = 2147483647 for the design on the Galois field GF(4'). Since the impulse response of a filter is bounded by 3041 (see Table II), the dynamic range of the input sequence to the filter is bounded above by m:x ( jP(n)l) < (y - 1)/(4d. 3041) 5517, approximately 12 bits. The algorithm in [ lo ] is used to obtain

MURAKAMI er al.: RECURSIVE FIR DIGITAL FILTER DESIGN 1161

a?

i

Fig. 3. Log magnitude response for the d = 32 bandpass floating point impulse response filter in Example 1.

TABLE 111 WEIGHT VALUES FOR THE d = 32 BANDPASS FILTER IPI' EXAMPLE 1

a ( 0)= -1073741824 + O I a( 11= 1575715265 + 287689566 a( 2 j = a ( 3 ) = a ( 4)= a ( 5 ) = a( 6 j = a ( 7 ) = a ( 8)= a ( 9)= a ( lo)= a ( 11)= a ( 1 2 ) = a ( 13)= a ( 14)= a( 1 5 ) = a( 16)= a ( 17)= a ( 18)= a ( 19)= a ( 20)= a ( 21)= a ( 22)=

a ( 24)= a ( 23)=

a ( 25)= a ( 26)= a ( 27)= a ( 2 8 ) = a ( 29)= a ( 30)= a ( ,31)=

-1OS1335950 + 309457497 567b45875 + 147657,6247 5

-1280253412 + 363265933 4 SO4519993 + -800559689 i

1103338166 + 157283598 i

-2130729411 + 740004717 i 1547595207 + 109865199 -525696361 + ,748678559 i

-62358263 + -374116186 1 836092857 + -133i630638 5.

-1357479193 + 1948907906 h 1167796059 + 1612964808 i

0 + 0 . 1 - 790004454 + -1948907906 i

-979687588 + -1612964808 1 -1341390790 + 1337630538 i

2084725381 + -1773367461 1 1621787286 + -748678559 i 1547595207 + 2037618448 i

-1043045479 + -157283598 f 1342177497 + -1332177497 i

-1280253412 + -363265933

-1081533950 + 1835026150 i -1580057772 + -1476576247 f

-571768382 + -28i689566 i

20682$199 + -1905571647

1312177497 + 1342177497 f

16754236 + -740004717

206824199 + -241912000 i -1342963654 + 800759889 i

a primitive dth root of unity in GF(q2) as a = 967747991 + ? 1241207368.

First the filter is designed to be recursive by the technique in Section IV. By Theorem 2, the weights a, = d-' xd-' h(n) a-mn are evaluated by the FFT algorithm for (m = 0, 1, . . . , d - 1). These weights are listed in Table 111. Using these weights, the recursive FIR filter is implemented by the system in Fig. 1.

Now the same filter is designed to be nonrecursive by the technique given in Section VI. In this case the result is equiv- alent to a circular convolution. The CNT transform of the impulse response is given by (25a), i.e., H ( k ) = x.,":; h(n)

n=O

TABLE 1V CNT TRANSFORM OF THE I ~ ~ P U L S E RESPONSE IT TABLE 11

CAT( a)= -16 + CAT( 1)= lOj0764599 + -616131524

0 2

aT( 2)- 978398624 + -5799670 1

c\.T( 4)= 2122319659 + 2001996531 i c\T( 3)' -242948048 + -1312705316 i

c\T( 5)= -165919891 + -887091621 $ ChT( 6)= 175925427 + 848750588 & c\T( 7)= 982283024 + -738107842 1 ChT( 8)= OT( 9)=.-1611348095 + -57830827 &

6964 + -6964 &

ChT( lo)= 130922743 + -1368202721 & CLT( 1 1 ) ~ -1789898023 + -335303771 1 &T( 12)= 25167660 + 2001991123 6 CAT( 13)= -2008264416 + 1234299717 & CLT( 14)= 862251889 + -75266328 & W( 1 5 ) ~ -489661236 + -88027229 & ChT( 16)= o + 0 %

CkT( 18)= -1285231758 + 75266328 1 CAT( 1 7 ) = 1657822411 + 88027229 &

n~( 1g)= 13g2?9231 + 913183930 & CY?( 2 0 ) = -2122315987 + -2001991123 $ a~( a)= 357585624 + 335393771 c\T( 22j= 150922743 + -779280926 I CAT( 23)- 536135552 + 57830827 1 CAT( 24j- ChT( 25)= o\T( 26)- O;T( 27)= CAT( 28)= a\T( 29)= CYT( 30)= chT( 31)=

-1165200623 6964

1 5 9 2 3 4 2 7

-25163988 -242918048

-1116719048 -1169034823

-165919891

+ +

6964 & 738107842 &

1298733059 & 887091621 &

-2001996331 & -834776331 &

616131524 i 5799670 1

akn and listed in Table IV. These weights are multiplied at the CNT transform domain of input sequences.

The next two examples are based on the frequency sample representation of Section V.

Example 2: The d = 32 bandpass filter of Example 1 can be designed by the frequency sample representation of Section V. For the ring Rq2 , 4 was taken as q = M5M7MI3 = (25 - 1) (2' - 1) (213 - 1) = 32247967. From [20] , a + ?b where

and b = -32p-1 are primitive 2p+1 roots of unity in GF[(2P- 1)2]. Thus, - 2 6 + ? 1 0 , 1 0 2 - ? 3 0 , and - 3 0 7 7 - ? 7544 are primitive 32nd roots of unity in GF(Mz), GF(M;), and GF(M:3). The inverse mapping from the direct sum of Galois fields to the ring is given by

a = 22p- 1

3 1 2 0 7 7 1 ~ ~ + 1 1 4 2 6 4 4 5 ~ ~ + 1 7 7 0 0 7 5 2 ~ ~ s mod 4 (27a)

3120771t, + 1 1426645t2 + 17700752t3 E t mod 4 (27b)

Table V is the Fourier transform of the impulse response function given in Table 11. Tables VI-VI11 are the filter weights in the fields GF(Mt), GF(M;), and GF(M:3). They were obtained, by first taking a radix two fast complex number theoretic transform of the scaled Fourier coefficients in each of the fields, clm = c:Z:-' [pol" ] with a scale factor of p = 10 000. The filter weights were then obtained by

l = o zm where GI are the spectral coefficients given by Table VII. The realization of the filter is given by Fig. 1.

Example 3: An eight-point moving window Fourier trans- form was designed also by the frequency representation o f Section IV [lo]. The Fourier transform of the impulse response function gk = omk are the spectral lines GI = d6, -1 .

The filter weights 2 ; Z t - l GI cln are. simply dc,,. For the ring Rq2, q = 7 . 31 127. Primitive eighth roots of unity

x l = d - l G

1162 IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, VOL. ASSP-31, NO. 5 , OCTOBER 1953

TABLE V

G( 1)-

G( 3)= G( 2 ) =

G( 5 ) = G( 4)=

G( 6)= G( 7)= G ( 8)= G( 9)= G( lo)= G( 11)= G( IZ)= G( 13)= G( 14)= G( 15)= G( 16)- G( 17)= G( 18)- G( 19)- G( 20)= G( 21)= G( 22)= G( 23)= G( 24)= G( 25)= G( 26)= G( 27)= G( 28)= G ( 29)= G ( 30)= G( 3l)= G( 32)=

.o +

.o +

.o +

. o +

-171.000000000 + 40.0000000000 +

242.000000000 + 245.000000000 +

-201.000000000 + 217.000000000 +

-1~8.000000000 + 171.000000000 +

-7.00000000000 + 74.0000000000 +

.o +

.o +

.o +

.o +

.n +

217.000000~00 +

-171.000000000 + 242.000000000 +

40.0000000000 + .o + .o + .o +

-245.000000000 +

.o

. o 1 i

-16.C000000000 1 .o i

-161.000000000 201.000000000 i -~17.000000000 i

91.b000000000 1

. o

.o 1

.o i i

-16.~000000000 91.0000000000 i -161.000000000 I -~17.000000000 i 201.000000000 : -255.000000000 i 245.000000000 i

~179.000000000 i 278.000000000 4 25.0000000000 p .o t .o & .9 ? .o

.o I

.o 1

TABLE VI

a( 1)=

a( 3)= a ( 2 ) =

a( 5 ) = a( 4 ) =

a( 5 ) - af 71=

. o 24.0000000000 ~.00000000000 30.0000000000

-3.00000000000 22.0000000000

16.0000000000 a i 8j= -~0.0000000000 + ~ ~ I O O O O O O O O O O < a[ 91= 19.0000000000 + -9.00000000000

~ ~ ~ . . -

a( l o j = a( ll)= a( 12)=

a( 14)= a( lj)=

a( 1 5 ) = a( 16)= a( 17)- a ( 18)= a( 19)= a( 20)= a( 21)= a( 22)= a( 23)= a( 2 4 ) = a( 25)= a( 2 6 ) = a( 27)= a( 26)= a( 29)= a( 30)= a( X ) = a( 32)=

l8.f)000000000 26.0000000000

-11.0~00000000 -21.0000000000 27.0000000000 14.0000000000 -23.0000000000

-14.0000000000

6.00000000000 -21.0000000000 5.00000000000 -13.0000000000 28.0000000000 -20.0000000000 28.000000000C

.o 2.00000000c00

-17.0000000000 -6.00000000000 8.00000000000

-1.00000000000 19.0000000000

15.0000000000

+

+ + + + + + + + + + + + + + +

29.0000000000 i

-24.0000000000 .o 1 -7.00000000000 E -8.00000000000 E -25.0000000000 9 -13.0030000000 4

12.0000000000 P

5.00000000000 i - ~ O . ~ ~ O O O O O O O O i 19.0000000000 i 26.0000000000 ?

15.0000000000 9 11.0000000000 i 18. 0000000000 E

6.00000000000 j: 6.00000000000 E

15.0000000000 i

-25.0000000000 1"

26.0000000000 e

-3.00000000000 ?

-26.0000000000 i 8.00000000000 i

a ( lj= a( 2)' a( 5)' a( L ) = a ( 5 ) = a( ?I= a( I ) =

a( 9)= a( 8)=

a( 11)= a( lo)=

a( l 3 ) = a( 1 2 ) =

a( 14)= a( 15)= a( 16)= a( 17)= a( le)= a( 19)= a( 20)= a( 21)= a( 22)= a( 23)= a ( 24)= a( 25)=

a ( 2 7 ) = a( 26)=

a ( 28)- a ( 29)= a( 30)= a( X)= a( 32)=

TABLE VI1

. o 47.0000000000 101.000000000

83.0000000000 37.0000000000

-61.0000000000 -110.000000000 -110.000000000 93.0000000000

-83.0000000000 -1~2.000000000 72.0000000000 111.000000000 101.000000000 9.00000000000

62.0000000000 . o

7.00000000000 104.000000000 73.3000000000 126.000000000 -98.0000000000 -54.0000000000

-104.000000000 96.0000000000

-61.0000000000 -90.0000000000

120.000000000 28.0000000000

-18.0000000000 95.0000000000

27. o~oooooooo

+ + + + i

+ + + + + + + + + + + + + + + + + + + + + + + + + + +

34,0000300000 -72.0000000000 j=

-48.0000000000 i 74.0300000000 1 -84.0000000000 -77.0000000000 i;

62.0000300000 i 38.0000000000 i -23.0C00000000 i 48.0000000000.i

. o i

-5.00000000000 1

120.000000000 i

-53.0000000000 i -37.0000000000 1 8~.00000000000 i 18.0000000000

-79.0000000000 62.0000000000 i

100.000000000

-1.00000000000 i -122.000000000 i

-125.000000000 i -91.0000000000 j= -93.0000000000 1 -97.0000000000 i 82.0000000000 i -14.0000000000 i

49.0000000000 1 -86.0000000000 i

-115.000000000 b -87.0000000000 i

TABLE VI11

a( 1)=

a( 3)' a( 2)=

a( 5 ) = a( 4 )=

a( 7)= a( 6)=

a( 5)= a( 9)= a( lo)= a ( 11)= a( 12)= a( i3)- a( 14)= a( 15)= a( 16)= a( 17)=

a( 19)= a( 18)=

a( 20)= a( 21)=

a( 23)= a( 22)=

a( 24)= a( 25)= a( 26)= a( Z i ) = a( 28)= a( 29)= a( 30)= a[ 31)= a ( 32)=

-3812.00000000 -6872.00000000 -406l.OOOOOC0C

.o

-936.000000000

-2803.00000000

-7581.00000000 310.000000000

.o -2111.00000000 1518 .OOOOOOOO 3489. 00000000 470.000000000

-2964.000000000 5147.000000000 1444.000000000

-~959.000000000 7208.000000000 4249.000000000 -~724.000000000 j801.000000000 -1540.000000000 4025.000000000

- 4989.000000000

+ + + + + + + + t + + + + + + + + + + + + + + + + + + + + + + +

.o 1 -3974. OOCOOOOO 1 -1870.00000000 i -7432.00030000 $ -4212.00000000 1

1770.000000CO i -3%. 00000000 i 2542.00000000 i 3624.00000000 -5365.00000000 i 2727.00000000 i 7146.00000000 ; 5872.00000000 i 2555.00000000 i [email protected] f 7916.00000000 i -2151.OCOOO000 1 5202.00000000 1 77S7.00000000 I

-1275.00000000 1

-1340.00000000

-2496.00000000 i -56;l. 00000000 I -7656.00000000 i

-5085.00000000 i 2445.00000000

-7327.00000000 I 4298.00000000 f

-5662.00000000 50.0000000000 ; -5492.00000000 i 5667.00000000 i

over GF(Ml) are given by f. 2(P-')I2 f ?2(p-1)/2 and for these fields were chosen as 2 + ?2 ,4 I- ?4,8 + ?8 [ l o ] . The inverse mapping is given by

19685s' + 2667s2 + 5208~3 = s mod q

196892 t 2667t2 + 5208t3 f t mod q. (28b)

The filter weights cmn, for a scale factor of p = 10.0 are coo = 3 + ? . O , cI1 = 6 + i . 0, and cI5 = 4 f ? . 0 for GF(72); ~ o o = ~ o t ~ ~ ~ , c l l = 4 + ? - 0 , andc15 = 6 + ? . 0 for GF(31');

a n d c o o = 1 0 + ? ~ 0 , c l l = 6 5 + i ~ 0 , a n d c 1 5 = 7 2 + ? ~ O f o r GF(127'). The remaining weights were determined by [ lo , Theorem 51. The realization of the moving window Fourier transform is given by Fig. 1. Fig. 4 is a plot of the real part of the error for the moving window Fourier transform designed on the ring. The input function is the integer version of a cosine scaled by a factor of 10. Notice that even in these small fields and for the small scale factor chosen for p, the filter designed on the ring is in good agreement with the usual Fourier transform.

MURAKAMI et al.: RECURSIVE FIR DIGITAL FILTER DESIGN 1163

h-’ 0.1

-0.1

k I .o

- 1.0 Fig. 4. Moving window Fourier transform designed on a ring R q 2 .

VIII. SUMMARY A new complex number-theoretic z-transform and its prop-

erties have been presented in this paper. It was shown how this transform may be used to design recursive and nonrecursive FIR filters on a ring isomorphic to the direct sum of Galois fields. It was shown that any FIR filter with any desired finite impulse response or set of frequency samples can be expressed in terms of the CNT z-transform. Nonrecursive techniques to realize a filter with a given CNT z-transform were also developed in this paper. The filters designed on a finite ring are errorless and information lossless. The time required to compute a nonrecursive FIR filter on the Galois field GF(q2), where q is a Mersenne prime, is competitive with the nonrecursive realization on the usual complex number field, using the FFT algorithm. Examples of FIR filter design on a finite ring have also been presented in this paper. These examples illustrate how FIR filters may be designed by either the impulse response or the frequency sample representation. If the subfields of the ring R , z are sufficiently small, then the table lookup approach for the field operations suggested in [21], can be used to simplify the subfield operations of the design.

ACKNOWLEDGMENT The authors would like to thank the referees and an editor

for their helpful suggestions.

REFERENCES [ 11 I. S. Reed and T. K. Truong, “The use of finite fields to compute

convolutions,” IEEE Trans. Inform. Theory, vol. IT-21, pp.

[2] - , “Complex integer convolutions over a direct sum of Galois fields,” IEEE Trans. Inform. Theory, vol. IT-21, pp. 657-661, Nov. 1975.

[3] J. M. Pollard, “The fast Fourier transform i n - a finite field,” Math. Comput,, vol. 25: Apr. 1971.

[4] C. M. Rader, “Discrete convolution via Mersenne transforms,” IEEE Trans. Comput., vol. C-21? Dec. 1972.

208-213, M a . 1975.

[5] R. C. Agarwal and C. S. Burrus, “Number theoretic transforms to implement fast digital convolution,” Proc. IEEE, vol. 63, pp. 550-560, Apr. 1975.

[6] S. W. Golomb, I . S. Reed, and T. K. Truong, “Integer convolu- tions over the finite field GF(3 X 2 n + l ) , ” S I A M J . Appl. Math., to be published.

[7] L. R. Rabiner and B. Gold, Theory and Application of Digital Signal Processing. Englewood Cliffs, NJ: Prentice-Hall, 1975.

[SI A. V. Oppenheim and R. W. Schafer, Digital Signal Processing. Englewood Cliffs, NJ: Prentice-Hall, 1975.

[9] B. Gold and C. M. Rader, Digital Processing of Signals. New York: McGraw-Hill, 1969.

[ l o ] H. Murakami and I. S. Reed, “Recursive realization of finite impulse filters using finite field arithmetic,” IEEE Trans. Inform. Theory, vol. IT-23, pp. 232-242, Mar. 1977.

[11] J. S. Cooley and J. W. Tukey, “An algorithm for the machine calculation of complex Fourier series,” Math. Comput., vol. 19, pp. 297-301, Apr. 1965.

[12] C. E. Shannon and W. Weaver,-The Mathematical Theory of Communication. Urbmd, IL: Univ. Illinois Press, 1949.

[13] G. M. Dillard, “Recursive computation of the discrete Fourier transform with application to a pulse-Doppler radar system,” Comput. Elec. Eng., vol. 1, pp. 143-152, 1973.

[14] A. V. Oppenheim and C. J. Weinstein, “Effects of finite register length in digital filtering and the fast Fouricr transform,” Proc. IEEE, v01. 60, pp. 967-976, Aug. 1972.

[ 151 I . Nivcn and H. S. Zuckerman, An Introduction to the Theory of Numbers. New York: Wiley, 1972.

[16] E. R. Berlekamp, Algebraic Coding Theory. New York: McGraw- Hill, 1968.

[ I71 T. G. Stockham, “Highspeed convolution and correlation,” in Proc. AFIPS 1966 Spring Joint Comput. Conf:, vol. 28, pp. 229- 233.

[ 181 L. R. Rabiner, J. H. McClellan, and T. W. Parks, “FIR digital filter design techniquesusing weightedchebyshev approximation,” Proc. IEEE, vol. 63, pp. 595-610, Apr. 1975.

[I91 J. H. McClellan, T. W. Parks, and L. R. Rabiner, “A computer program for designing optimum FIR linear phase digital fibers,” IEEE Trans. Audio, Electroacoust., vol. AU-21, pp. 506-526, Dec. 1973.

[20] I . S. Reed, T. K. Truong, and R. L. Miller, “Simple method for computing elements of order Zkn, where n12P-l - 1 and 2 < k < p + 1, in GF[(ZP - 1)2] ,” Electron. Lett., vol. 14, pp. 697- 698, 1978.

[ 21 ] A. Baraniecka and G. A. Jullien, “Residue number system imple- mentations of number theoretic transforms in complex residue rings,” IEEE Trans. Acoust., Speech, Signal Processing, vol. ASSP-28, pp. 285-291, June 1980.

1164 IEEE TRANSACTIONS ON ACOUSTICS, SPEECH, AND SIGNAL PROCESSING, VOL. ASSP-31, NO. 5, OCTOBER 1983

Hideo Murakami was born in Hukui, Japan, on May 10, 1945. He and Computer Science at the University of Southern California, Los received the B.S. degree in elcctrical engineering from Kanazawa Uni- Angeles. He presently holds the newly established Charles Lee Powell versity, Kanazawa, Japan, in 1968, and the M S . and Ph.D. degrees in Professorship in Computer Engineering at U.S.C. He i s also a Consultant electrical engineering from the University of Southern California, Los to RAND Corporation, the Institute of Defense Analyses, and a Director Angeles, in 1973 and 1977, respectively. of Adaptive Sensors, Inc. His interests include mathematics, computer

From 1968 to 1970 he was employed at Mitsubishi Electric Corpora- design, coding theory, stochastic processes, and information theory. tion, Hyogo, Japan. He was formerly with the University of Southern Dr. Reed was elected to the National Academy of Engineering in 1979. California, Los Angeles. His interests include digital signal processing, image processing, and coding theory.

Irving S. Reed was born in Seattle, WA, on November 12, 1923. He received the B.S. and Ph.D. degrees in mathematicsfrom theCalifornia Institute of Technology, Pasadena, in 1944 and 1949, respectively.

From 1951 to 1960 he was associated with Lincoln Laboratory, Massachusetts Institute of Technology, Lexington. From 1960 to 1968 he was a Senior Staff Member with the RAND Corporation, Santa Monica, CA. Since 1963 he has been a Professor of Electrical Engineering

Albert Arcese is a member of the Technical Staff at The MITRE Corporation, Bedford, MA. He is a Visiting Lecturer in the Department of Electrical Engineering, University of Lowell, Lowell, MA, and the Department of Electrical Engineering, Northeastern University, Boston, MA. He was formerly with the Department of Electrical Engineering, Universidad de Los Andes, Bogota, Colombia. His interests are in statistics.

Design and Implementation of a Single-Chip 1 -D Median Filter

Abstract-The design and implementation of a VLSI chip for the one- dimensional median filtering operation is presented. The device is de- signed to operate o n 8-bit sample sequences with a window size of five samples. Extensive pipelining and employment of systolic data-flow concepts at the bit level enable the chip to filter at rates up to ten megasamples per second. A configuration for using the chip for ap- proximate two-dimensional median filtering operation is also presented.

M I. INTRODUCTION

EDIAN filtering is a nonlinear signal smoothing opera- tion in which the median of the samples in a sliding

window of size w = 2 n + 1 replaces the sample at the middle of the window. The resulting filtered sequence tends to follow the polynomial trends in the original sample sequence while sharp discontinuities of short duration are filtered out. Further properties of median filtering have been described in [l] while [2] describes its application to speech processing. Recently,

Manuscript received April 28, 1982; revised December 13,1982. This work was supported in part by the Office of Naval Research under Con- tracts N00014-76-C-0370, NR 044-0422 and N00014-80-C-0236, NR 048-659, in part by the National Science Foundation under Grant MCS 78-236-76, and in part by the Defense Advanced Research Projects Agency (DOD), ARPA Order No. 3597, monitored by the Air Force Avionics Laboratory under Contract F33615-81-K-1539.

The author is with the Department of Computer Science, Carnegie- Mellon University, Pittsburgh, PA 15213.

an algorithm for real-time median filtering has been presented in [ 3 ] . Systolic algorithms for one- and multidimensional median-filtering operations and the more general case of com- puting running-order statistics have been recently proposed by Fisher [ 4 ] .

This work presents the design and implementation of a VLSI chip for the one-dimensional median-filtering operation. The device is designed to operate on 8-bit sample sequences using a fixed window size of five samples. Extensive pipelining and employment of systolic data-flow concepts at the bit level en- able the chip to have a very high throughput, Le., the chip can be clocked at rates up to 10 MHz and produce one median every clock cycle after an initial delay to fill the pipeline. The chip is designed to operate as a shift register in a signal process- ing system environment, filtering data coming from a source before going into the actual computing system.

11. SYSTOLIC ALGORITHMS AND STRUCTURES Rapidly advancing VLSI technology offers system designers

a very high potential for parallel operations. However, in order to exploit this potential, algorithms to be implemented with VLSI computing structures should have regular and sim- ple communication schemes. This is mainly due to the fact that communication, especially irregular communication, is

0096-35 18/83/1000-1164$01 .OO 0 1983 IEEE