Download presentation
Published byOsborn Caldwell Modified over 8 years ago
1
The IIR FILTERs These are highly sensitive to coefficients,
that may affect stability. The magnitude-frequency response of these filters is proven and the phase-frequency response is poor. These filters have short time delay better time response.
2
The FIR filters Their frequency response is poor.
FIRF have truncated time-response. Their frequency response is poor. These can be designed for time-limited as well as frequency-limited response. These are inherently stable. Can be designed for Linear phase performance. …..contd
3
Advantages of FIR filters
Any arbitrary magnitude response can be designed using frequency sampling technique. It is the first choice of the designer should the time delay be not important. The components required are many times more than an equivalent IIRF. …..contd
4
Properties of FIR filters….
It is simple to implementation. The finite word length effect is less severe on frequency performance. Non-causal filters can be designed for the use of mathematical manipulations. To reduce the computation time of convolution of the long discrete sequences, FFT algorithms are available.
5
Properties of FIR filters….
FFT can be implemented on hardware as well as on soft-ware. They can be expressed recursively. FIRF have no support of analog filters. Computer Aided Designs are essential to design such filters.
6
Comparison between IIR and FIR by example 10.01.
The following transfer functions, one is recursive and other is non-recursive. Both yield identical magnitude-frequency response. We Compare their computational and storage requirements. Recursive Transfer function H1(z) = (bo+ b1 z-1 + b2 z-2) / (1+a1 z-1 + a 2 z-2) where [bo b1 b2] = [ ] [a1 a2] =[ ] and
7
Non recursive transfer function for N=12:
Example contd… Non recursive transfer function for N=12: yields h(0) = h(11) = x 10-2 h(1) = h(10) = x 10-1 h(2) = h(9) = x 10-1 h(3) = h(8) = x 10-1 h(4) = h(7) = x 10-1 h(5) = h(6) = x 100
8
Summary: Computational and storage requirements
item IIR filter H1 (z) FIR filter H2 (z) Number of multiplication 4 12 Storage elements 3 Storage locations, coefficients 5 24 Thus we see that IIR filter requires far less components and storage space. But since FIR filter coefficients are symmetrical, it results in efficient implementation.
9
The word-length N, can be even or, odd. It returns four cases:
Necessary and sufficient condition for a linear phase response filter is: The transfer function of the filter should be symmetrical. This symmetry can be positive or, negative. The word-length N, can be even or, odd. It returns four cases:
10
STEPS IN FIR FILTER DESIGN
1. Filter Specifications: Filter transfer function H(z), Required amplitude and phase responses, acceptable tolerances, sampling frequency and the word length of the input data. Coefficient Calculations: to determine the coefficients of H(z) so as to satisfy the filter specifications.
11
STEPS IN FIR FILTER DESIGN….
Realization: Conversion of the transfer function into suitable structure. Analysis of finite word length effects: Error effect of quantization of input signal, Effect of coefficient quantization. Optimization of word-length. Implementation: Producing software codes and/or hardware and performing the actual filtering.
12
Design specifications
Pass / Stop band specifications: Magnitude deviation (includes ripple) Pass/Stop band edge frequency (or frequencies in case of band pass/stop filter). Sampling Frequency. Word length of the filter
13
Methods of Calculation of FIR Coefficients
The Window Method, Frequency Sampling Method, Optimal or, Min-max design method. If the common mathematical model is symmetrical, each method can lead to design of a linear phase FIRF.:
14
The window method A suitable window function w[n] is selected,
required word length is calculated. Then it is multiplied with the impulse response of a (ideal) LPF. Thus hw [n] = h[n] w[n] Or, hw [n] = H[F] W[F].
15
a finite transition width
The window method…. The spectrum of ideal low pass filter have a jump discontinuity at F = Fc. But the windowed spectrum shows over-shoot, ripple and a finite transition width but no abrupt jump.
16
Window method contd… It’s normalized signal magnitude at
F = Fc is 0.5. It corresponds to attenuation of -6 dB. The ripple in pass band and over-shoot is attributed to Gibb’s phenomena; 9% minimum. The side-lobs produces the ripple in pass band and stop band. The ripples in pass band and stop band have odd symmetry.
17
Transition width is the width of mainlobe of the window.
Peak side lob attenuation
18
Window method contd… The transition width is due to main lob.
Wider the main lob, wider is the transit band. Wider is the window width, smaller is the width of main-lob. Number of minima and maxima in the pass band and stop band are decided by N. Unlike in Tchebyshev Filters, the peaks here have different heights, maximum near band edges, decaying thereafter.
19
Note that number of samples equal maxima and minima of a rectangular window in pass- and stop band. The peak occurs near band edges. Maxima-Minima
20
Rectangular Window This window has two properties:
maximum number of alternating maxima and minima and their peaks follow the attenuation at the rate of –6.02dB per octave or, equivalent -20dB/dec. Mathematical model of different type windows follows.
21
Empirical Mathematic Models Of Different Type Of Windows
Window Representation Expression Rectangular wR[n] Bartlett wT[n] – {2|n| / (N-1)} Von Hann whn [n] cos{2n/(N-1)} Hamming whm [n] cos{2n/(N-1)} Blackman wb [n] cos{2n/(N-1)} cos{4n/(N-1)} Kaiser wK[n,] Io(x1)/Io(x2); ratio of modified Bessel’s function of order zero; where x1=( {1 – 4[n/(N-1)]2}); and x2= ()
22
Characteristics of Windows
We now examine the characteristics of various other type of windows and compare their performances for N=21and N=51. Before that note various nomeclatures.
23
Mathematical representation: Nomenclatures
GP / GS = Peak Gain of main-lob / side-lobe dB ASL = Side-lobe attenuation = (GP /GS) dB. WM = Half-width of main-lobe W6 / W3 = - 6 dB / -3dB half-width DS = stop-band attenuation dB/dec. FWS = C/N where C= constant of filter. WS = Half width in main-lobe to the peak level of first side lob. Aws= Peak side-lobe attenuation in dB AWP = Pass band attenuation in dB
26
GP = |sinc(j)| / Io(); ASL = Sinh()/0.22;
Window Gp GS/Gp ASLdB WM WS W6 W3 DS AWS FWS AWP Rectangular 1 0.2172 13.3 0.81 0.6 0.44 20 21.7 0.92 1.562 Bartlett Triangular 0.5 0.0472 26.5 2 1.62 0.88 0.63 40 25 Von Hann Hanning 0.0267 31.5 1.87 1.0 0.72 60 44 3.21 0.1103 Hamming 0.54 0.0073 42.7 1.91 0.9 0.65 53 3.47 0.0384 Blackman 0.42 0.0012 58.1 3 2.82 1.14 0.82 75.3 5.71 0.003 Kaiser = 0.26 0.4314 0.0010 2.98 2.72 1.11 0.80 Note: The widths; WM, WS, W6, W3; must be normalized by the window length N. Empirical Values for Kaiser Window depends on the value of defined as: GP = |sinc(j)| / Io(); ASL = Sinh()/0.22; WM = (1+2); W 6 = (0.661+2)
27
PROCEDURE OF CALCULATING FILTER COEFFICIENTS USING WINDOW
Specify the desired frequency response of the filter Hd(). Obtain the impulse response hD [n] of the desired filter by inverse Fourier transform. Select a window which satisfies the pass-band attenuation specification.
28
PROCEDURE OF CALCULATING FILTER COEFFICIENTS USING WINDOW…
Determine the number of coefficients using the appropriate relationship between the filter length and the transition width f expressed as a fraction of the sampling frequency. Obtain the values of w[n] for the chosen window function and that of the actual FIR coefficients h[n] and multiplying them. Plot the response and verify the compliance of specifications.
29
Ideal impulse response hD[n]
Summery of ideal impulse response of standard frequency selective filters Filter type Ideal impulse response hD[n] HD [0] Low Pass 2fcsinc(nc) 2fc High Pass 1-2fcsinc(nc) 1-2fc Band Pass 2f2sinc(n2)- 2f1sinc(n1) 2(f2-f1) Band Stop 1-[2f2sinc(n2)- 2f1 inc(n1)] 1-2(f2-f1) Note: fc, f1 and f2 are the normalized edge frequencies. N is the length of the filter [Ifeachor: p.353]
30
Remarks: The TF of a filter is an even symmetric function.
It is an ideal transfer function. It has a linear phase response. No error value of n . But for an FIR filter, n should be finite. With finite n, the response will have ripples. The response will also have at least 9% overs-hoots near critical frequencies, Gibbs Phenomena.
31
Remarks: If the n in truncated range is increased, ripple is reduced so also the overshoot, upto 9%. Increased n means increase in number of coefficients. Ideal truncation is equivalent to convolving an ideal filter hD having frequency response sinc() with rectangular frequency window, W(). It is equivalent to multiplication in time domain.
32
convolution of an ideal filter with a sinc window function.
Peak side lob attenuation
33
Meaning of given specifications are: Sampling frequency fs = 8000 Hz.
Example: Design a low-pass FIR filter to meet the following specs: Pass band edge frequency: Hz Transition width: Hz. Stop-band attenuation AWS= > 50 dB Sampling frequency fs = Hz. Problem Statement: Meaning of given specifications are: Sampling frequency fs = 8000 Hz. Pass band edge frequency: fc =1500/8000 Transition width f = 500/8000. Stop-band attenuation AWS= > 50 dB
34
GP = |sinc(j)| / Io(); ASL = Sinh()/0.22;
Window Gp GS/Gp ASLdB WM WS W6 W3 DS AWS FWS AWP Rectangular 1 0.2172 13.3 0.81 0.6 0.44 20 21.7 0.92 1.562 Bartlett Triangular 0.5 0.0472 26.5 2 1.62 0.88 0.63 40 25 Von Hann Hanning 0.0267 31.5 1.87 1.0 0.72 60 44 3.21 0.1103 Hamming 0.54 0.0073 42.7 1.91 0.9 0.65 53 3.47 0.0384 Blackman 0.42 0.0012 58.1 3 2.82 1.14 0.82 75.3 5.71 0.003 Kaiser = 0.26 0.4314 0.0010 2.98 2.72 1.11 0.80 Note: All widths; WM, WS, W6, W3; must be normalized by the window length N. Empirical Values for Kaiser Window depends on the value of defined as: GP = |sinc(j)| / Io(); ASL = Sinh()/0.22; WM = (1+2); W 6 = (0.661+2)
35
Design considerations contd…
The filter function is HD ()= 2fc sinc(nc). Because of stop-band attenuation characteristics, either of the Hamming, Blackman or, Kaiser windows can be used. We use Hamming window: whm[n] = cos{2n/(N-1)}
36
Design considerations contd…
f = transition band width/sampling frequency = 0.5/8 = = 3.3/N. Thus N = 52.8 53 i.e. for symmetrical window –26 n 26. fc’ = fc + f/2 = ( )/8000 = Calculate values of hD [n] and whm[n] for –26 n 26 Add 26 to each index so that the indices range from 0 to 52. Plot the response of the design and verify the specifications.
37
Calculations: c = 2fc = 1.3745 2fc=1.3745/ = 0.4375
hD(n) = 2fc [sin(nc)/ nc] wn = [ cos(2n/N) The input signal to the filter function is a series of pulses of known width but of different heights manipulated as per the window function. The overall is the multiplication of two.
38
Calculations… h(n) = hD [n] w D[n] = 0.4375 {[sin(nc)/ nc]}
x {[ cos(2n/N)} at n=0, since sin(nc)/nc = 1, and cos(0) = 1; h(0) = x[ ] = Again since 2fc / c = 1/ h(n)= [sin(1.3745n)/n] [ cos(2n/53)]
39
Coefficient Calculations
40
Sampling frequency fs = 1000 Hz.
Example: Design a filter for the specifications: Pass band: Hz. Transition width: Hz Pass band ripple: dB max. Stop-band attenuation: > 60 dB Sampling frequency: Hz. Problem statement: The filter in question is a band pass filter, with Sampling frequency fs = Hz. Pass band edge frequency: fc = /1000 Pass band ripple: p= 0.1 dB max. Transition width f = 50/1000. Stop-band attenuation AWS= > 60 dB
41
GP = |sinc(j)| / Io(); ASL = Sinh()/0.22;
Window Gp GS/Gp ASLdB WM WS W6 W3 DS AWS FWS AWP Rectangular 1 0.2172 13.3 0.81 0.6 0.44 20 21.7 0.92 1.562 Bartlett Triangular 0.5 0.0472 26.5 2 1.62 0.88 0.63 40 25 Von Hann Hanning 0.0267 31.5 1.87 1.0 0.72 60 44 3.21 0.1103 Hamming 0.54 0.0073 42.7 1.91 0.9 0.65 53 3.47 0.0384 Blackman 0.42 0.0012 58.1 3 2.82 1.14 0.82 75.3 5.71 0.003 Kaiser = 0.26 0.4314 0.0010 2.98 2.72 1.11 0.80 Note: All widths; WM, WS, W6, W3; must be normalized by the window length N. Empirical Values for Kaiser Window depends on the value of defined as: GP = |sinc(j)| / Io(); ASL = Sinh()/0.22; WM = (1+2); W 6 = (0.661+2)
42
Design considerations contd…
The filter function is HD()= 2f2 sinc(n2) -2f1 sinc(n1) Because of stop-band attenuation characteristics, either of the Blackman or, Kaiser windows can be used. From the specifications of pass band and stop-band: 20 log(1+p) = or, p = ; -20 log (s) = 60 dB, or, s = therefore = min(p, s) =
43
Design considerations contd…
We use Blackman window: wb[n] = cos{2n/(N-1)} cos{4n/(N-1)} f = transition band width/sampling frequency = 50/1000 =0.05 = 5.5/N. hence N 110. i.e. for symmetrical even window –55 n 55, but for n=0., being an even window. We can choose N = 111.
44
Design considerations contd…
For N =111,Plot the response of the design and verify the specifications. Calculate values of hD [n] and whm [n] for –55 n 55 Add 55 to each index so that the indices range from 0 to111.
45
Comparison of commonly used windows with Kaiser window:
Window type Peak normalized side lob amplitude Approximate. Width of main-lob Appx. peak error 20 log Equivalent Kaiser Window Transition Width Rectangular -13 4/(M+1) -21 /M Bartlett -25 8/M /37/M Hanning -31 -44 /M Hamming -41 -53 /27/M Blackman -57 12/M -74 /M The comparison shows that the Kaiser window is more efficient than any other window in question.
46
Example: take-up above problem and solve it using Kaiser window.
Soln. specifications are repeated here: Sampling frequency fs = Hz. Pass band edge frequency: fc = /1000 Pass band ripple: p= 0.1 dB max. Transition width f = 50/1000. Stop-band attenuation AWS= > 60 dB
47
GP = |sinc(j)| / Io(); ASL = Sinh()/0.22;
Window Gp GS/Gp ASLdB WM WS W6 W3 DS AWS FWS AWP Rectangular 1 0.2172 13.3 0.81 0.6 0.44 20 21.7 0.92 1.562 Bartlett Triangular 0.5 0.0472 26.5 2 1.62 0.88 0.63 40 Von Hann Hanning 0.0267 31.5 1.87 1.0 0.72 60 44 3.21 0.1103 Hamming 0.54 0.0073 42.7 1.91 0.9 0.65 53 3.47 0.0384 Blackman 0.42 0.0012 58.1 3 2.82 1.14 0.82 75.3 5.71 0.003 Kaiser = 0.26 0.4314 0.0010 2.98 2.72 1.11 0.80 Note: All widths; WM, WS, W6, W3; must be normalized by the window length N. Empirical Values for Kaiser Window depends on the value of defined as: GP = |sinc(j)| / Io(); ASL = Sinh()/0.22; WM = (1+2); W 6 = (0.661+2)
48
Design using Kaiser Window
The filter function is HD()= 2f2 sinc(n2) -2f1sinc(n1) Because of stop-band attenuation characteristics, either of the Blackman or, Kaiser windows can be used. From the specifications of pass band and stop-band: 20 log(1+p) = 0.1 dB or, p = ; -20 log (s) = 60 dB, or, s = therefore = min(p, s) = f = transition band width/sampling frequency = 50/1 =0.05= (AWS-7.95)/ 14.36N = ( )/14.36N or, N =72.49 73. ..contd
49
Design using Kaiser Window…
Calculation of by empirical formulae. = if A 21 dB; = (AWS -21) (A-21) if A <21<50 dB = (AWS -8.7) if A 50 Hence = 5.65 Evaluate the coefficients. Evaluate the performance. plot the graph and verify the performance of designed filter.
50
Advantages and disadvantages of the window method.
It is simple to apply and simple to understand. It involves minimum computation. Lacks flexibility. Both peak pass band and stop-band ripples are nearly equal, limits the choice of designer. Because of convolution of the spectrum of the window function and the desired response, pass band and stop-band edge frequencies can not be precisely specified. Maximum ripple magnitudes in pass-band and stop-band in the filter response is fixed regardless of N (except in Kaiser Window).
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.