Two Dimensional IIR
and FIR Digital Notch Filter
Design
Soo-Chang Pei * and Chien-Cheng Tseng
Department
ofElectrical Engineering
National Taiwan University
Taipei, Taiwan,
R.O.C.
Abstract
In this paper, the two dimensional (2D) digital notch
filter design problem is investigated. First, we develop a simple algebraic method for 2D IIR notch filter design.
This approach not only has closed-form transfer function but also satisfies bounded input bunded output ( ~ 1 ~ 0 ) stability condition. Next, we use Lagrange multiplier method to design 2D FIR notch filters. This design is
optimal in least square sense. Finally, we apply the 2D
notch filter to eliminate sinusoidal or narrowband inter- ferences superimposed on an image. Simulation results are presented to demonstrate the effectiveness of these approaches.
I. Introduction
In many applications of signal processing it is desired to remove narrowband or sinusoidal interferences while leaving the broadband signal unchanged. Examples are in the areas of com- munication, control, biomedical engineering and others. In 1D
case, a typical example is t o cancel 60 Hz power line interfer- ence in the recording of electrocardiograms(ECGf3) [l]. Usually
this task can be achieved by the notch filters characterized by a
unit gain a t all frequencies except a t the sinusoidal frequencies in which their gain is zero. In 2D case, one of the image corrup-
tion examples is the occurrence of a 2D sinusoidal interference
pattern (often called coherent noise) superimposed on an image
[2]. The Fourier spectrum of this corrupted image exhibits a pair
of symmetric peak impulses due to the sinusoidal interference,
so we usually remove these impulses manually in spectrum do- main and then take the inverse Fourier transform of this result to restore image
[a].
This method is only suitable for off-line processing. For real-time processing purpose, a 2D notch filteris preferred. However, 2D notch filter design techniques have
not been proposed until now. Thus it is still an open question in the filter design area. In this paper, we will present some simple approaches to design 2D IIR and FIR notch filters.
If 2D notch filter is considered to design as an IIR type fil-
ter, some well-known optimization techniques which have been developed to design general 2D filters can be used here [ 3 ] . How-
ever, these methods are not only time-consuming but also dif- ficult to control stability. Because 2D notch filter is a special
one, we may use a simple algebraic method to design it. The main feature of this approach is easy to monitor stability and have closed-form transfer function. A similar technique have
been successfully used to design the special 3D IIR beam fil- ter for enhancing a spatial plane-wave by Bruton[$]. On the other hand, if 2D notch filter is designed as a FIR type filter, it is basically a mininization problem with linear constraints. Therefore, many well-established optimization methods can be used, In this paper, we will use Lagrange multiplier methods to design it in the least square sense.
11. 2D IIR Notch Filter Design
In this section, we will use simple algebraic method t o design
2D IIR notch filter. The frequency response for a 2D ideal notch
filter is given by
where ( w ~ N , w ~ N ) is t h e notch frequency. Now the problem is to find a 2D IIR filter which satisfies this specification. The proposed method, as shown in Fig.1, can be divided into two simple filter designs. One is 2D parallel line filter H p ( z l , ZZ), the other is 2D straight line filter
H,(zl,zz).
Then the desired notch filter transfer function is given byH N ( Z 1 , . 2 ) = 1 - H p ( Z l , z z ) H s ( z l , z 2 ) (2)
Now, let us design filters Hp(rl, 2 2 ) and H a ( z l , z2) as follows:
( A ) 2D Parallel Line Filter:
The frequency specification of 2D parallel line filter is given by (3)
This special filter can be easily designed by choosing H P ( ~ 1 ~ 2 2 )
as
H p ( z l , z 2 ) = f f B P ( Z ) I z = z z (4)
where H g p ( z ) is a 1D bandpass filter whose transfer function is
given by
After some manipulation, we can get two important relations of
H g p ( 2 ) as follows. 2 cos(w0) 1
+
tan(?) a1 = (7) 1 -tan(?) 1 +tan(?) a2 =where W O is the center frequency of H g p ( z ) and BW is the 3dB bandwidth of H ~ p ( 2 ) . Hence, we only require to choose
W O = W 2 N and let BW be as small as possible, then H p ( z 1 , z 2 )
will be a desired design.
[ B ) 2D Straight Line Filter:
Designing 2D IIR digital filter by frequency transformation of
2D analog protype filter is a simple and useful method, so we
will use this technique t o obtain the transfer function of straight line filter H s ( z l , 2 2 ) . Consider the simple first-order 2D Laplace
transform transfer function
890 &7603-1254-6/93$03.00 0 1993 IEEE
which corresponds to the voltage transfer function of the 2D inductance-resistance network shown in Fig.2. The frequency response is given by
( 9 )
Therefore, the magnitude response G(R1. 0 2 ) can be written as
A maximum value of unity occurs in G(R1,
n,)
at a straight linewhere
L I R l
+
, 5 2 0 2 = 0 (resonant line) (11) and the two -3dB lines which G ( R I , 0 2 ) =5
areL1O1
+
L 2 0 2 =i R
(-3dI3 lines) ( 1 2 )If we apply the double bilinear transformation
111.
2D
FIR Notch Filter Design
In this section, we will use Lagrange multiplier method to design 2D FIR notch filter. In general, FIR filters have many advantages over IIR filters. For example, stability is never an
issue and linear phahe is simple t o achieve. However, FIR filter requires larger arithmetic operations than IIR filter during im- plimentation.
A 2D linear phase FIR digital filter with transfer function H ( q , z 2 ) has a frequency response
Ni N2
*=- v , % - A I 2
W ( e 2 W l , e l w 2 ) = e - 3 b l d l e - 3 N 2 " 2 h ( m , n j e - 3 ( " " l + " w 2 )
(18) where the impulse rrsponse h ( m , n ) satisfy the half-plane sym- metric condition, i.e.
h ( m , n ) = h( --m, - n ) (19) ,and the filter length is (2N1+ 1 ) x ( 2 N 2
+
1). After some manipu- tation, it is easily shown that the magnitude response G(wl, w2 jof H ( z 1 , z z ) is given by H G(WI 1 ~2= ) a( ~ ) g t ( ~ i , ~ 2 ) (20) (13) 2 , - 1 = a
+
1 s, = _ _ i = l J * = I to T ( s l , s Z ) , then we get the desired straight line filter aswhere the dimension R = ( N I
+
1 )+
N2(2N1+
1) and 1+
z;'+
2;1+
*;'z;' q i + R + L i - L z Z ; I + R - L - L g , ( m , n j = cos(-mLw1+ nw2) (21) (22) h(0,O) i = 1 R R Rc;
'z;lz;' H 3 ( z l l z 2 ) = R+L,+L1 + R-L,+LZ{
2h(m,n) i#
1 It isobvious that a m a x i m u m v a l u e o f u n i t y o c c u r s i n I H , ( e J W l , e J W 2 ) I where u(i) =For t h a sake of convenience, we rewrite G(w1,wz) as the follow-
%
2 2
L1 tan(%)
+
L2 tan( -) = 0 (resonant h e ) (14) ing vector formand that / H s ( e 3 w 1 , e J w 2 ) I = where
G(w~,LJ~)
= A ' C ( W ~ , W ~ ) (23)in which the vectors are t a n ( % )
+
L z t a n ( 5 ) = ztR (-3dB lines) (1512 2 A = [ ~ ( l ) . ( 2 ) . . . a ( R ) ] '
Hence, if we properly choose the parameters as C ( W i r W 2 ) = [ g i ( W i , ' + 2 ) S2(LJlrLJ2) " ' g R ( W 1 , ~ z ) l t
and R is as small as possible, then H s ( z 1 . z 2 ) will be a straight line filter whose resonant line pass the point ( L J I N , W ~ N ) ex- actly even though it exists bending effect due to the bilin- ear transformation [5]. Moreover, in order to ensure bounded- input/bounded-output (BIBO) stability of this filter, we must constrain L1 and L2 to be nonnegative [6]. Due to this con-
straint and Eq.(17), we see that notch frequency ( W I N , W 2 N ) will only locate at second quadrant. However, this restriction poses no pract,ial problem because the 2D input signal can be reori- ented to place the signal in the correct second quadrant before filtering .
Based on the preceding discussion, we consider an example with notch frequency ( W l , V , W 2 N ) = (0.5?r, - 0 . 5 ~ ) . The param- eters BW = 0 . 0 0 1 ~ and R = 0.001. Fig.3 shows the frequencv reponse plot of notch filtcr. It is clear that the specification is
well satisfied as expected. When the parameters R and BR'
approach zero, H N ( Z ~ , 2 3 ) becomes an ideal notch filter.
Generally speaking, two most common critera used in linear phase FIR designs are the least square error and the minimax error criteria. Now, let's design G(w1, w2) to approximate the ideal notch filter frequency response in least square error sense.
- In this sense, thi. filter design problem can be formulated as
as follows:
Minimize J_", J_", / G ( w l , w z ) - 1/2dwldw2
=
r:,,
J:",(AtC(wl.wz) - 1 ) 2 d ~ 1 d w 2= 4'QA - 2 P ' A
+
1Subject to C " ' ( u 1 ~ . d 2 , v ) A = 0
where the positive definite symmetric matrix Q and the vector P are given by
Therefore, the optimal solution is given by
Awt =
[I
- Q - ’ C ( W ~ N , W Z N ) [ C ~ ( W ~ N , W Z N ) Q - ’C ( W ~ N , W Z N ) ] - ~ C * ( W ~ N , W Z N ) ] Q - ’ P (26) Based on the preceding discussion, we will design a 2D FIR notch filter with notch frequency (w1N,uZN) = (0.55~, 0 . 5 ~ ) . The filter length is 11x11. Fig.4 shows the 2D frequency response of FIR notch filter. It can be seen from this result that the specification is well satisfied.
IV.
Application Examples
In this section, we will use the 2D notch filter to remove single sinusoidal interference superimposed on an image. A no- table example of this periodic image degration is found in image that has been derived from electro-optical scanner[2]. This in- terference is usually caused by coupling and amplification of low-level signals in the electronic circuitry. All the examples are performed on the VAX 3600 computer. The images used are 512 by 512 black and white images. The intensity of each pixel is quantized into 256 gray levels (8 bbp).
The image shown in Fig.5(a) is the Lena image corrupted by a sinusoidal pattern of the form
3Osin(O.lam - 0.27rn) (27) The Fourier spectrum of this image, shown in Fig.S(b), exhibit a pair of symmetric peak impulses located at (O.la, -0.25~) and ( - 0 . 1 5 ~ , 0 . 2 ~ ) . We usually remove this impluse manually in the frequency domain and take the inverse Fourier transform of this result to restore image. The resultant image, shown in Fig.5(c), is clearly free from interference. Although this method is sim- ple, it is only suitable for off-line batch processing. For real-time processing purpose, the 2D notch filter is preferred. Moreover, sinusoidal frequency may not exactly locate at the resolution grid of 2D fast Fourier tansform, so a small region around the peak impulse must be removed. This will cause some infor- mation loss of the image. In 2D notch filter case, the notch frequency can be chosen exactly the same as the sinusoidal fre- quency, so there is nearly no information loss. Now, we design a 2D IIR notch filter with ( w ~ N , w ~ N ) = (0.15~, -0.25~), R = 0.1, and BW = 0 . 0 5 ~ to remove the interference in spatial domain. Resultant image suffers very severe transient states degradation near the two boundaries in Fig.5(d). In order to suppress this transient states due to incomplete boundary data, the algorithm developed in [7] can be used. We compute the initial condition by extending the boundary values of the given image data be- yond its region of support. T h e resultant filtered image, shown in Fig.S(e), is free from the interference. Furthermore, we may design a 2D FIR notch filter with ( W ~ N , W ~ N ) = (O.la, -0.25~) and length 11x11 to remove sinusoidal interference. T h e filtered image is shown in Fig.S(f). It is clear that the interference has been removed.
Finally, we compare the computation complexity of the above three methods. For a image with size N x N , the F F T method requires N 3 log, N complex multiplications to restore an image,
but IIR notch filter only require 20N2 real multiplications. As to a MlxM2 FIR notch filter, it requires F N Z real multi- plications. Hence, the notch filtering technique is much more efficient than conventional F F T method in computation com- plexity
V. Conclusion
In this paper, the 2D IIR and FIR digital notch filter design-
s have been studied. The IIR notch filter is designed by very simple algebraic method, and the FIR notch filters are designed by Lagrange multiplier method. Several design and application examples have been used to illustrate the effectiveness of these approaches. However, only the fixed 2D notch filters are con- sidered here. Thus it is interesting to develop the adaptive 2D notch filter algorithm. This topic will be investigated in the furture.
References
[ I ] B.Widrow and S.D.Stearns, ”Adaptive Signal Processing”. Englewood Cliffs, NJ: Prentice Hall 1985,
[2] R.C.Gonzalez and P.Wintz, ”Digital Image Processing”, Addison-Wesley, 2nd edition, pp.237-247,1987.
(31 J.S.Lim, ”Two-Dimensional Signal and Image Processing”,
Englewood Cliffs, NJ: Prentice-Hall 1990.
[4] L.T.Bruton and N.R.Bartley. ”Three-dimensional image processiiig using the concept of network resonance”, IEEE Trans. Circuits and Syst., Vol. CASX32, pp664-672, July 1985.
151 S.C.Pei and S.B.Jaw, ”Comments on highly selective three- dimensional recursive beam filters using intersection reso- nant planes”, IEEE Trans. Circuits and Syst., Vol. CAS-33, pp.669-670, July 1986.
[6] P.Agathoklis and L.T.Bruton. ”Practical BIB0 stability of
N-dimensional discrete systems”, Proc. Inst. Elect. Eng., Vo1.130, pt.G, No.6, pp.236-242, Dec. 1983.
[7] W,E.Alexander, ”Initial condition transient suppression for
2-dimensional recursive filters”, 1984 Int’1 conf. on Acoust. Speech, Signal processing, pp.2011-2014
.
input output
-
-
F c
I
parallel line straight line
filter filter
L I I Fig.2 First order 2D inductance-resistance network.
Fig.4 FIR notch filter.
I
Fig.3 IIR notch filter.