Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase.

Similar presentations


Presentation on theme: "1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase."— Presentation transcript:

1

2 1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase FIR Digital Filters 3. Design of IIR Digital Filters from Analogue Filters (Part I)

3 2 4.2.6. Design of Equiripple Linear-Phase FIR Digital Filters The windowing method and the frequency-sampling method are relatively simple techniques for designing linear-phase FIR filter. Here, a major problem, is a lack of precise control of the critical frequencies such cut off frequencies of pass-band and stop-band. Previous Methods:

4 3 The new filter design method described in this section is formulated as a Chebyshev approximation problem. It is viewed as an optimum design criterion in the sense that the maximum weighted approximation error between the desired frequency response and the actual frequency response is minimized. The resulting filter designs have ripples in both the pass-band and the stop-band. New Method:

5 4 The new filter design method described in this section is formulated as a Chebyshev approximation problem. It is viewed as an optimum design criterion in the sense that the maximum weighted approximation error between the desired frequency response and the actual frequency response is minimized. The resulting filter designs have ripples in both the pass-band and the stop-band. New Method:

6 5 The new filter design method described in this section is formulated as a Chebyshev approximation problem. It is viewed as an optimum design criterion in the sense that the maximum weighted approximation error between the desired frequency response and the actual frequency response is minimized. The resulting filter designs have ripples in both the pass-band and the stop-band. New Method: To describe the design procedure, let us recall the following basic filter specifications

7 6 pass band pass-band ripple stop-band ripple stop band transition band Basic Filter Specifications: A Review

8 7 Design of Equiripple Linear-Phase FIR Digital Filters (Summary) Method: formulated as a Chebyshev approximation problem. Optimum design criterion: minimizing the maximum weighted approximation error between the desired frequency response and the actual frequency response. Result: filter possessing ripples (equirpple) in both the pass-band and the stop-band. Solution: an iterative method based on an alternation theorem and Remez exchange algorithm application.

9 8 Filter description: Filter specifications: Pass-band: Stop-band: M: the number of impulse response coefficients

10 9 Four different cases of linear phase FIR filters: Case 1: symmetric impulse response [h(k)=h(M-1-k)], M odd. Case 2: symmetric impulse response [h(k)=h(M-1-k)], M even. Case 3: antisymmetric impulse response [h(k)=-h(M-1-k)], M odd. Case 4: antisymmetric impulse response [h(k)=-h(M-1-k)], M even.

11 10 We have shown, that the frequency response of linear phase FIR digital filters can be expressed as follows: where is the real-valued frequency response. Frequency response of the linear phase FIR filter

12 11 Case 1: L=(M-1)/2 Case 2: L=(M/2)-1 Case 3: L=(M-3)/2 Case 4: L=(M/2)-1 The represent the parameters of the filter which are linearly related to the unit sample response h(k). where

13 12 A. The actual real-valued frequency response of the filter: B. The desired (ideal) real-valued frequency response of the filter: C. The weighting function of the approximation error:

14 13 The weighting function on the approximation error allows to choose the relative size of the approximation errors in the different frequency bands (i.e. in the pass-band and in the stop-band) differently. In particular, it is convenient to normalize Comments on weighting function: to the unity in the stop-band and set in the pass-band.

15 14 With regard to previous specifications of the desired (ideal) and actual real-valued frequency responses and the weighting function on the approximation error, we can now define the weighted approximation error as

16 15 The modified real-valued desired frequency response: The modified weighting function on the approximation error: The weighted approximation error: for all different types of linear-phase FIR filters.

17 16 Given the error function, the Chebyshev’s approximation problem is basically to determine the filter parameters that minimize the maximum absolute value over the frequency bands in which the approximation is to be performed (set: S). In mathematical terms we seek the solution of the problem:

18 17 Note A.: Here, S represents the set (disjoint union) of frequency bands over which the optimization is to be performed. Basically, the set S consists of the pass-bands and stop- bands of the desired frequency response of the filter.

19 18 Note B.: The described criterion refered to as Chebyshev’s mini- max criterion leads to an equiripple filter i.e. to a filter whose magnitude response oscillates uniformly between the tolerance bounds of each band.

20 19 The solution to the Chebyshev’s approximation problem has been due to Parks and McClellan. Their solution is based on the combination of the alternation theorem with the Remez exchange algorithm. From a formal point of view, Parks’ and McClellan’s solution is represented by a numerical iterative method. Therefore, this method is clearly improper for „the conventional hand-made approach“. Solution: a computer program for designing the FIR filter has been reported by Parks and McClellan. This program represented by sophisticated software tools can be applied for designing all basic kinds of linear phase FIR digital filters as well as digital differentiators and Hilbert transformers.

21 20 4.2.6.1. MATLAB Function for Optimal Equiripple FIR Filter Design: b=remez(N,F,A) REMEZ Parks-McClellan optimal equiripple FIR filter design. b=remez(N,F,A) returns a length N+1 linear phase (real, symmetric coefficients) FIR filter having the best approximation of the desired frequency response described by F and A in the mini-max sense. F is a vector of frequency band edges in pairs, in ascending order between “0” and “1”. “1” corresponds to the Nyquist frequency or half of the sampling frequency. A is a real vector the same size as F. It specifies the desired amplitude of the frequency response of the resultant filter b.

22 21 4.2.6.1. MATLAB Function for Optimal Equiripple FIR Filter Design: b=remez(N,F,A) REMEZ Parks-McClellan optimal equiripple FIR filter design. b=remez(N,F,A) returns a length N+1 linear phase (real, symmetric coefficients) FIR filter having the best approximation of the desired frequency response described by F and A in the mini-max sense. F is a vector of frequency band edges in pairs, in ascending order between “0” and “1”. “1” corresponds to the Nyquist frequency or half of the sampling frequency. A is a real vector the same size as F. It specifies the desired amplitude of the frequency response of the resultant filter b.

23 22 4.2.6.1. MATLAB Function for Optimal Equiripple FIR Filter Design: b=remez(N,F,A) REMEZ Parks-McClellan optimal equiripple FIR filter design. b=remez(N,F,A) returns a length N+1 linear phase (real, symmetric coefficients) FIR filter having the best approximation of the desired frequency response described by F and A in the mini-max sense. F is a vector of frequency band edges in pairs, in ascending order between “0” and “1”. “1” corresponds to the Nyquist frequency or half of the sampling frequency. A is a real vector the same size as F. It specifies the desired amplitude of the frequency response of the resultant filter b.

24 23 4.2.6.1. MATLAB Function for Optimal Equiripple FIR Filter Design: b=remez(N,F,A) REMEZ Parks-McClellan optimal equiripple FIR filter design. b=remez(N,F,A) returns a length N+1 linear phase (real, symmetric coefficients) FIR filter having the best approximation of the desired frequency response described by F and A in the mini-max sense. F is a vector of frequency band edges in pairs, in ascending order between “0” and “1”. “1” corresponds to the Nyquist frequency or half of the sampling frequency. A is a real vector the same size as F. It specifies the desired amplitude of the frequency response of the resultant filter b.

25 24 Example: By using MATLAB, design a low-pass optimum equiripple FIR filters of length M=21, M=41, M=61, M=101 with the pass-band edge frequency and stop-band edge frequency

26 25 F=[0 0.25 0.5 1]; Solution and Results: A=[1 1 0 0]; b21=remez(20,F,A); b41=remez(40,F,A); b61=remez(60,F,A); b101=remez(100,F,A); application of MATLAB function b=remez(N,F,A) Then, the magnitude responses of the designed filters are given in the next figures.

27 26 Magnitude Responses [dB] M=21 M=41 M=61 M=101 Details: the next figures

28 27 Magnitude Responses: Details [dB] M=21 M=41 M=61 M=101

29 28 4.3. Comparison of Design Methods for Linear-Phase FIR Digital Filters Historically, the design method based on the use of windows to truncate the impulse response and to obtain the desired spectral shaping was the first method proposed for designing linear-phase FIR filters. The frequency-sampling method and the Chebyshev approximation method were developed in the 1970s and have since became very popular in the design of practical linear-phase filters.

30 29 4.3. Comparison of Design Methods for Linear-Phase FIR Digital Filters Historically, the design method based on the use of windows to truncate the impulse response and to obtain the desired spectral shaping was the first method proposed for designing linear-phase FIR filters. The frequency-sampling method and the Chebyshev approximation method were developed in the 1970s and have since became very popular in the design of practical linear-phase filters.

31 30 B. The Frequency Sampling Method: The method provides an improvement over the window design method, since is specified at the frequencies, and the transition band is a multiple of. This filter design method is particularly attractive when the FIR filter is realized either in the frequency domain by means of the FFT or in any of the frequency sampling realizations. The attractive feature of these realizations is that is either zero or unity at all frequencies, except in the transition band.

32 31 C. The Chebyshev Design Procedure Based on the Remez Exchange Algorithm The Chebyshev approximation method provides total control of the filter specifications. It is usually preferable over the other two methods. For a low- pass filter, the specification are given in terms of the parameters: M, However, it is more natural in filter design to specify and to determine the filter length M that satisfies the specifications.

33 32 Although there is no simple formula to determine the filter length from these specifications, a number of approximations have been proposed for estimating M from. A particularly, simple formula attributed to Kaiser for approximating M is where the transition band is defined as:

34 33 A more accurate formula proposed by Herrmann et al. is where

35 34 5. Design of IIR Digital Filters from Analogue Filters 5.1. Introduction

36 35 Just as in the FIR filter design, there are several methods that can be used to design digital filters having an infinite-duration of unit sample response. The methods described in this section are all based on taking an analogue filter and converting it to a digital filter. Analogue filter design is well-developed field, so it is not surprising that we begin the design of digital filters in the analogue domain and then convert the design into the digital domain.

37 36 input signal Analogue filter output signal Analogue filter description

38 37 B. System (transfer) function: A. The linear constant-coefficient differential equation: Basic Characteristics/Models of Analogue Filters C. Impulse response h(t) is related to H A (p) by:

39 38 Each of these three equivalent characterizations of analogue filters leads to alternative method for converting the analogue filters into the digital domain (into digital filters).

40 39 1. The left-half p-plane should be mapped into the inside of the unite circle in the z-plane. Thus the stable analogue filter has to be converted to a stable digital filter. 2. The axis in the p-plane should be mapped into the unit circle in the z-plane. Thus there has to exist direct relationship between the two frequency variables in the two domains. Consequently, if the conversion method of analogue filters into digital filters is to be effective, it should possess the following desirable properties: We recall that an analog linear time-invariant system with transfer (system) function is stable if and only if all of its poles lies in the left-half p-plane.

41 40 It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle. Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology.

42 41 It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle. Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology.

43 42 Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology. It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

44 43 Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology. It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

45 44 Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology. It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

46 45 Therefore, in the design of IIR filters, we shall specify the desired filter characteristics for the magnitude response only. This does not mean that we consider the phase response unimportant. Since the magnitude and phase characteristics are related, we specify the desired magnitude characteristics and accept the phase response that is obtained from the design methodology. It can be shown that physically realizable (causal) and stable IIR filters cannot have linear phase. If the restriction on causality is removed, it is possible to obtain a linear phase IIR filters, at least in principle.

47 46 The procedures for digital filter design from analogue filters to be discussed in this course: 1.Method of approximation of derivatives. 2.Impulse-invariant method (impulse invariant transformation). 3.The matched Z-transformation method. 4.Bilinear transformation method.

48 47 5.2. Method of Approximation of Derivatives

49 48 Basic idea: approximation of the differential equation: by an equivalent difference equation. Basic principle: to substitute derivative at time t=nT by the backward difference: where T represents the sampling interval.

50 49 Analogue differentiator The output: The input: Transfer function: Digital differentiator The input: The output: Transfer function: Transform-domain equivalent

51 50 The second derivative is replaced by the second backward difference:

52 51

53 52 Transform-domain equivalent: It is easily to see from the previous expression that the substitution for the k-th derivative of y(t) results in the equivalent transfer-domain relationship !

54 53 Consequently, the transfer function of the digital IIR filter obtained as a result of the approximation of the derivatives by the finite backward differences is p-z Mapping

55 54 If :Properties:

56 55 Taking real and imaginary parts of z gives Thus the line from p-plane is mapped into the z-plane into the circle described

57 56 p-plane 0 Mapping: 0 1 Unit Circle z-plane Image of

58 57 Therefore, the axis maps onto perimeter of the circle of radius 1/2 in the z-plane. Except for extremely small values of, the image of the axis of the p-plane is off the unit circle in the z-plane. Therefore, the property 2 is not fulfiled.

59 58 To see whether the 1st property of p-z mapping is satisfied, we set into

60 59 Stable analogue filters are mapped into stable digital filters but their frequency properties are not maintained, i.e. this mapping does not preserve the shape of the analogue frequency characteristics (the imaginary axis of p-plane does not map onto the unit circle). The left-half p-plane is mapped inside a circle with the center at Re[z]=1/2 and radius 1/2. The right-half p-plane maps into the region outside the circle with the center at Re[z]=1/2 and radius 1/2. Results:

61 60 Mapping: 1 0 Unit Circle z-plane p-plane 0 Image of the left-half of p-plane

62 61 If T is decreased, more of the frequency response will be concentrated near z=1. For a low-pass filter, this improved the matching between the analog and digital filter frequency responses, but significant distortion will still exists and T may have to be inordinately small. The possible location of the poles of the digital filter are confined to relatively small frequencies and, as a consequence, the mapping is restricted to design of low- pass filters and band-pass filters having relatively small resonant frequencies.

63 62 1 0 Unit Circle z-plane

64 63 If the desired filter is not low-pass (e.g. if it is high-pass or band-stop filter), the above mentioned procedure (T decreasing) typically cannot be applied. As a result, the backward difference transformation is seldom used.

65 64 Example: Use the backward difference approximation of the derivative to convert the analog low-pass filter with the transfer function into a digital IIR filter.

66 65 Solution:


Download ppt "1 Lecture 5: March 20, 2007 Topics: 1. Design of Equiripple Linear-Phase FIR Digital Filters (cont.) 2. Comparison of Design Methods for Linear- Phase."

Similar presentations


Ads by Google