27 January 2009

Digital Filters

BRIEF THEORY OF DIGITAL FILTERS

The input and output signals of a digital filter are related through the convolution summation process, which is defined as



Yk(from 0 to infinity)=summation. gi x (k-i)

Where Yk is the filter output sequence and gi is the filter impulse response sequence.

Using the standard Z-transform equation X (z)= (summation from i=0 to infinity) Xk Z-k on

above equation we obtain



Y (Z) = (summation from k=0 to infinity)[g0xk+g1x (k-1)+g2x (k-2)+............] Z-k



=g0(summation from k=0 to infinity)xkZ-k+g1(summation from k=0 to infinity)x (k-1) Z-k+g2(summation from k=0 to infinity)x (k-2)Z-k



=g0 X (z)+g1 X (z) z-1+g2 X(z)Z-2+..............

=[g0+g1z-1+g2z-2+...] X (z)



Therefore, Y (Z) = G (Z). X (Z) Where G (Z)= g0+g1z-1+g2z-2+...



Or G (Z) = Y (Z)/ X(Z) is the transfer function of the digital filter.





Digital filter transfer function is sometimes derived by z-transforming the transfer function of a known analogue filter G (S), that is G (Z)=Z [G (S)]



In general G (Z)= {a0+a1z-1+a2z-2+................+apz-p}/ { 1+b1z-1+b2z-2+...............+bqz-q }

= Y(Z) / X (Z)



Where, ai (0 <=i<= p) and bj (0 <= j <= q) are the digital filter coefficients.



It follows that,



X (Z)[a0+a1z-1+a2z-2+..........apz - p]=Y (Z)[1+b1z-1+b2z-2+.... bqz -q]



i.e. a0X(z)+a1X(z)Z-1+a2X(z)Z-2+.......apX(z)Z-p

=y (z)+b1y (z) Z-1+b2y (z) Z-2+...+aqy (z) Z-q.



But Z-k corresponds to a delay equal to k sampling periods, consequently the above equation may be written as in a linear difference equation form:



a0+xk+a1x (k-1)+a2x (k-2)+.....+ap x (k-p)



= yk+b1y (k-1)+b2y (k-2)+...+bqy(k-q)



Therefore, yk= a0 x k+a1x (k-1)+a2x(k-2)+..........+apx(k-p)-



b1y (k-1)-b2y (k-2)-..............-bq (k-q).



This equation is recursive, Where by the present output sample value, yk is computed using a scaled version of the present input sample xk and scaled version of previous input and output samples. This form corresponds to as Infinite Impulse Response (IIR) digital filters.



The poles and zeros of G (Z) may be determined by factoring the digital transfer function numerator and denominator polynomials to yield:





G (Z) = {f (z-z1)(z-z2).................(z-zp)} / {(z-p1) (z-p2) ................(z-pq)}



The multiplying factor f is a real constant and Zi (0 <= i <= p) and pj(0<= j<= q) are the zeros and poles respectively. The poles and zeros are either real or exit as complex conjugate pairs.



In general as T-->0-, the poles of G (z) migrate towards the (1+j0) point in the Z-plane, thereby making G (Z) approach a marginally stable condition.

The issue of stability is eliminated where the bj coefficients are zero-valued (no poles in G (Z)), corresponding to



G (Z)= a0+a1z-1+a2z-2+..................+apz-p / 1

= Y (Z) / X(Z)





And it follows that



Yk =a0Xk+a1X (k-1)+a2X (k-2)+...........+apX (k-p)



This equation is non-recursive, where the present output sample value is computed using a scaled version of the present input sample and version of previous input samples. This form corresponds to a Finite Impulse Response (FIR) digital filter. This form is also commonly known as transversal filter.



TYPES OF DIGITAL FILTERS

The most straightforward way to implement a digital filter is by convolving the input signal with the digital filter's impulse response. All possible linear filters can be made in this manner. When the impulse response is used in this way, filter designers give it a special name: the filter kernel.

There is also another way to make digital filters, called recursion. When a filter is implemented by convolution, weighting the samples in the input, and adding them together calculate each sample in the output. Recursive filters are an extension of this, using previously calculated values from the output, besides points from the input. Instead of using a filter kernel, recursive filters are defined by a set of recursion coefficients. The important point is that all linear filters have an impulse response, even if you don't use it to implement the filter. To find the impulse response of a recursive filter, simply feed in an impulse, and see what comes out. The impulse responses of recursive filters are composed of sinusoids that exponentially decay in amplitude. In principle, this makes their impulse responses infinitely long. However, the amplitude eventually drops below the round-off noise of the system, and the remaining samples can be ignored. Because of this characteristic, recursive filters are also called Infinite Impulse Response or IIR filters. In comparison, filters carried out by convolution are called Finite Impulse Response or FIR filters

Filter Classification

Figure (1) summarizes how digital filters are classified by their use and by their implementation. The use of a digital filter can be broken into three categories: time domain, frequency domain and custom. As previously described, time domain filters are used when the information is encoded in the shape of the signal's waveform. Time domain filtering is used for such actions as: smoothing, DC removal, waveform shaping etc. In contrast, frequency domain filters are used when the information is contained in the amplitude, frequency, and phase of the component sinusoids. The goal of these filters is to separate one band of frequencies from another. Custom filters are used when a special action is required by the filter, something more elaborate than the four basic responses (high-pass, low-pass, band- pass and band-reject). For instance, custom filters can be used for de-convolution, a way of counteracting an unwanted convolution.

Filter classifications. Filters can be divided by their use and how they are implemented.

The tree structure of different filters is as shown bellow:





BREIF CHARECTRESTICS OF EACH FILTER



IIR FILTERS



i) BUTTERWORTH FILTER: The magnitude response of butterworth filter decreases monotonically as the frequency increases from 0 to ∞. The transition band is more in Butterworth filter compared to Chebyshev filters. The poles of the filter lie on a circle.



ii) CHEBYSHEV FILTER: The magnitude response of the Chebyshev filter exhibits either in pass band or in stop band according to type. Type-I Chebyshev filters are all pole filters that exhibit equiripple behavior in the pass band and monotonic characteristics in the stop band. On the other hand, the type-II Chebyshev filter contains both poles and zeros and exhibits a monotonic behavior in the pass band and on equripple behaviors in the stop band.



For the same specification the number of poles in Butterworth is more compared to the Chebyshev filter i.e. the order of the Chebyshev filter is less than that of Butterworth. This is a great advantage because less number of discrete components will be necessary to construct the filter.



FIR FILTERS



WINDOWS



i) RECTANGULAR WINDOW: Frequency response obtained from this window differs from the desired response in many ways. It doesn’t follow quick transitions in the desired response. The frequency response changes slowly. The window response side lobes give rise to the ripples in both pass band and stop band.



ii) TRIANGULAR (BARTLETT) WINDOW: This produces smooth magnitude response in both pass band and stop band. But here transition region is more and attenuation in stop band is less.



iii) HANNING WINDOW: The main lobe width of Hanning window is twice that of the rectangular window, which results in a doubling of the transition region of the filter. The filter with this window has smaller ripples in both pass band and stop band of the filter. At higher frequencies the stop band attenuation is much greater.



iv) HAMMING WINDOW: Because the Hamming window generates less oscillation in the side lobes than the Hanning window, for the same main lobe width, the Hamming window is generally preferred.



v) BLACKMAN WINDOW: The additional cosine term (compared with Hamming and Hanning windows) reduces the side lobes, but increases the main lobe; it is just an important over hamming window.



vi) KAISER WINDOW: When the parameter α is varied, both the transition width and peak ripple in the side lobes changes. For α =0 both the numerator and denominator of the window coefficients are 1: the Kaiser window becomes rectangular window when α =5.4414, the Kaiser window sequence resemble Hamming window and for α =8.885 the Kaiser window becomes Blackman window.



From the above characteristics is can be noted that the triangular window has a transition width twice that of rectangular window. However the attenuation in stop band for triangular window is less. Therefore, it is not so popular for FIR filter design. The Hanning and Hamming windows have same transition width. But the Hamming window is most widely used, because it generates less ringing in the side lobes. The Blackman window reduces the side lobe level, at the cost of increase in transition width. The Kaiser window is superior to other windows, because for given specification its transition width is always small. By varying the parameter α desired side lobe level and main lobe peak can be achieved. Further, varying the length N can vary the main lobe width. That is why Kaiser window is the favorite window for many digital filter designers.



References



1. “
Digital Signal Processing” By Sanjit K.Mitra

2. “Digital Signal Processing” By P.Ramesh Babu

3. Digital Filters” By T.J.Terrel And E.T.Powner

4. “BASIC Digital Signal Processing” By Gordon B. Lockart And Barry M.G.Cheetham

5. “
Digital Signal Processing” By Alan V.Oppenheim And Ronald W.Schafer

6. “
DSP Microprocessors: Advances and Automotive Applications” By Subra Ganeshan And Dr.Gopal Arvamudhan

No comments:

Post a Comment

Your Comments... (comments are moderated)