Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 7 Finite Impulse Response(FIR) Filter Design

Similar presentations


Presentation on theme: "Chapter 7 Finite Impulse Response(FIR) Filter Design"— Presentation transcript:

1 Chapter 7 Finite Impulse Response(FIR) Filter Design

2 - The design of a digital filter involves five steps:
Filter design steps - The design of a digital filter involves five steps: (1) Specifications of the filter requirements (2) calculation of suitable filter coefficients (3) Representation of the filter by a suitable structure (realization) (4) Analysis of the effects of finite wordlength on the filter performance (5) Implementation of filter in software and/or hardware

3 Filter design Need to decide : Type of filter
Amplitude and/or phase responses Tolerances Sampling frequency Wordlength of the input data

4 Filter specifications
Important parameters Another important parameter peak passband deviation (or ripples) stopband deviation passband edge frequency stopband edge frequency sampling frequency Filter order N

5 ILPF Fig. 7-3.

6 FIR coefficient calculation
Most common methods used for calculating Window method Optimal method

7 The window method of calculating FIR filter coefficients
Step 1 : specify the desired frequency response of filter, Step 2 : obtain the impulse response, , of desired filter by evaluating the inverse Fourier transform Step 3 : select a window function and then determine the number of coefficients using the appropriate relationship between the filter length and the transition width, Step 4 : obtain values of for chosen window function and the values of the actual FIR coefficient, , by multiplying by (7-26)

8 Window method Design of FIR filter using window method
Frequency response of filter, Impulse response, Ideal lowpass response (7-19) (7-20)

9 Table 7.2 Summary of ideal impulse responses for standard frequency selective filters
and are the normalized passband or stopband cutoff frequencies

10 Fig. 7-4. (The frequency scale is normalized by T = 1)

11 Truncation for FIR Rectangular window

12 Fig. 7-5.

13 Fig. 7-6.

14 Fig. 7-7.

15 Some common window functions
Hamming window Appropriate relationship between transition width and filter length (7-21) (7-22) where N is filter order and is normalized transition width

16 Properties of common window functions
Fig Window functions: (a) Rectangular, (b) Hamming, (c) Blackman

17 Table 7.3 Summary of important features of common window functions

18 Kaiser window Trade-off transition width against ripple
using a ripple control parameter, (7-23) where is zero-order modified Bessel function of the first kind where typically

19 Determination of parameter
by using the stopband attenuation requirement through empirical relationships below The number of filter coefficients N where is the stopband attenuation value and since the passband and stopband ripples are nearly equal (7-25) where is the normalized transition width

20 Example 7-2 Obtain coefficients of FIR lowpass filter using Hamming window Lowpass filter Passband cutoff frequency Transition width Stopband attenuation Sampling frequency

21 Using Hamming window Considering the smearing effect of the window function

22 Symmetrical function Calculation of Using the symmetry property to obtain the other coefficients

23

24 Fig. 7-9.

25 Example 7-3 Obtain coefficients using Kaiser window
From filter specifications Stopband attenuation passband attenuation Transition region Sampling frequency Passband cutoff frequency

26 Using Kaiser window The number of filter order N The ripple parameter Normalized cutoff frequency

27 Calculation of FIR coefficients

28 Symmetrical function Calculation of Using the symmetry property to obtain the other coefficients

29

30

31

32 Fig

33

34 The optimal method Basic concepts Equiripple passband and stopband
Mathematically expressed as over the passbands and stopbands Weighted Approx. error Weighting function Ideal desired response Practical response

35 Practical response Ideal response Fig

36  equiripple passband and stopband of the resulting filter response,
with the ripple alternating in sign between equal amplitude levels The minima and maxima are known as extrema. For linear lowpass filters, for example, there are either m+1 or m+2 extrema, m=(N+1)/2, type 1 filter m= N/2, type 2 filter

37 Fig. 7-12. Extremal frequencies

38 The procedure of optimal method
Use the alternation theorem (Parks and McClellan) to find the optimum set of extremal frequencies Determine the frequency response using the extremal frequencies Obtain the impulse response coefficients

39 Optimal FIR filer design
Transfer function of lowpass filter Symmetric property gives (7-28) where where and ,

40 Let be defined by normalized frequency, then Normalize as
-> Normalized passband : -> Normalized stopband : Desired magnitude response Weighting function (7-30) (7-31)

41 (7-32) (7-33) for in and

42 Alternation theorem Let is the unique best approximation if and only if is equiripple at and has at least m+2 extremal points in , that is, there exists such that (7-34) where

43 From equations (7-33) and (7-34)
Equation (7-32) into equation (7-35) yields Matrix form (7-35)

44 then the optimal filter is given by
Summary Step 1. Choose filter length as 2m+1 Step 2. Choose m+2 points of in F Step 3. Calculate and e using equation (7-36) Step 4. Calculate using equation (7-29). If , go to step 5, otherwise go to step 6 Step 5. Determine m local minima or maxima points Step 6. Obtain , , then the optimal filter is given by

45 Example 7-4 Specification of desired filter
Filter length : 3 , Choose three frequencies and normalize them, two of them are cutoff frequencies, the third one arbitrarily

46 The error at and is 2x0.196= 0.392, and the error at is 0.196.
From and The error at and is 2x0.196= 0.392, and the error at is => not have => Not the characteristic of the optimal filter (7-37)

47 For this filter for all f in
Choose a new set of For this filter for all f in Transfer of the optimal function (7-38) (7-39)

48 Fig. 7-13. Characteristics of filter H(f)

49 Optimal method using MATLAB
Based on Parks-McClellan and Remez algorithm Calculation of coefficients for FIR filter using Remez where N is the filter length F is the normalized frequency band edges M is the magnitude response WT is the relative weight between ripples

50 Example 7-5 Specification of desired filter
Pass band : 0 – 1000Hz Transition band : 500Hz Filter length : 45 Sampling frequency : 10,000Hz Normalized frequency band edges Magnitude response

51 Table 7-4. Impulse response coefficients

52 Fig.7-14. Frequency response of filter

53 Example 7-6 Specification of desired filter
Pass band : 3kHz – 4kHz Transition band : 500Hz Pass band ripple : 1dB Rejection band attenuation : 25dB Sampling frequency : 20kHz Frequency band edges and magnitude response

54 Estimation of filter length Pass and rejection band ripples
Using Remezord in MATLAB where and are ripples of dB scale in pass and rejection band

55 Table 7-5. Impulse response coefficients of filter

56 Fig. 7-15. Frequency response of filter

57 Frequency sampling method
Design of FIR filter Taking N samples of the frequency response at intervals of , Filter coefficients (7-40) where , are samples of desired frequency response

58 Linear phase filters with positive symmetrical impulse response
For N even For N odd Upper limit in the summation is (7-41) where

59 Fig

60 Example 7-7 (1) Show the From equation (7-40) is symmetry
is real value (7-42)

61 (2) Design of FIR filter Specification of desired filter
Pass band : 0 – 5kHz Sampling frequency : 18kHz Filter length : 9 Selection of frequency samples at intervals of Fig

62 Coefficient of FIR filter using equation (7-42)
Table 7-6.

63 Comparison of the window, optimum and frequency sampling methods
Optimal method Easy and efficient way of computing FIR filter coefficients Making filter with good amplitude response characteristics for reasonable values of N Window method In the absence of the optimal software or when the passband and stopband ripples are equal, the window method represents a good choice Particularly simple method to apply and conceptually easy to understand Frequency sampling method Filters with arbitrary amplitude-phase response can be easily designed Lack of precise control for the location of the bandedge frequencies or the passband ripples


Download ppt "Chapter 7 Finite Impulse Response(FIR) Filter Design"

Similar presentations


Ads by Google