Download presentation
Presentation is loading. Please wait.
Published byNoreen Harper Modified over 9 years ago
2
12015-9-171Zhongguo Liu_Biomedical Engineering_Shandong Univ. Biomedical Signal processing Chapter 7 Filter Design Techniques Zhongguo Liu Biomedical Engineering School of Control Science and Engineering, Shandong University
3
2 Chapter 7 Filter Design Techniques 7.0 Introduction 7.1 Design of Discrete-Time IIR Filters From Continuous-Time Filters 7.2 Design of FIR Filters by Windowing 7.3 Examples of FIR Filters Design by the Kaiser Window Method 7.4 Optimum Approximations of FIR Filters 7.5 Examples of FIR Equiripple Approximation 7.6 Comments on IIR and FIR Discrete- Time Filters
4
3 Filter Design Techniques 7.0 Introduction
5
4 Frequency-selective filters pass only certain frequencies Any discrete-time system that modifies certain frequencies is called a filter. We concetrate on design of causal Frequency-selective filters
6
5 Stages of Filter Design The specification of the desired properties of the system. The approximation of the specifications using a causal discrete-time system. The realization of the system. Our focus is on second step Specifications are typically given in the frequency domain.
7
6 Frequency-Selective Filters Ideal lowpass filter
8
7 Frequency-Selective Filters Ideal highpass filter
9
8 Frequency-Selective Filters Ideal bandpass filter
10
9 Frequency-Selective Filters Ideal bandstop filter
11
10 If input is bandlimited and sampling frequency is high enough to avoid aliasing, then overall system behave as a continuous-time system: Linear time-invariant discrete-time system continuous-time specifications are converted to discrete time specifications by:
12
11 Example 7.1 Determining Specifications for a Discrete-Time Filter Specifications of the continuous-time filter: 1. passband 2. stopband
13
12 Example 7.1 Determining Specifications for a Discrete-Time Filter Specifications of the continuous-time filter: 1. passband 2. stopband
14
13 Example 7.1 Determining Specifications for a Discrete-Time Filter Specifications of the discrete-time filter in
15
14 Filter Design Constraints Designing IIR filters is to find the approximation by a rational function of z. The poles of the system function must lie inside the unit circle(stability, causality). Designing FIR filters is to find the polynomial approximation. FIR filters are often required to be linear- phase.
16
15 Filter Design Techniques 7.1 Design of Discrete-Time IIR Filters From Continuous-Time Filters
17
16 7.1 Design of Discrete-Time IIR Filters From Continuous-Time Filters The traditional approach to the design of discrete-time IIR filters involves the transformation of a continuous-time filter into a discrete filter meeting prescribed specification.
18
17 Three Reasons 1.The art of continuous-time IIR filter design is highly advanced, and since useful results can be achieved, it is advantageous to use the design procedures already developed for continuous-time filters.
19
18 Three Reasons 2.Many useful continuous-time IIR design method have relatively simple closed form design formulas. Therefore, discrete-time IIR filter design methods based on such standard continuous-time design formulas are rather simple to carry out.
20
19 Three Reasons 3.The standard approximation methods that work well for continuous-time IIR filters do not lead to simple closed-form design formulas when these methods are applied directly to the discrete-time IIR case.
21
20 Steps of DT filter design by transforming a prototype continuous-time filter The specifications for the continuous- time filter are obtained by a transformation of the specifications for the desired discrete-time filter. Find the system function of the continuous-time filter. Transform the continuous-time filter to derive the system function of the discrete-time filter.
22
21 Constraints of Transformation to preserve the essential properties of the frequency response, the imaginary axis of the s-plane is mapped onto the unit circle of the z-plane.
23
22 Constraints of Transformation In order to preserve the property of stability, If the continuous system has poles only in the let half of the s-plane, then the discrete-time filter must have poles only inside the unit circle.
24
23 7.1.1 Filter Design by Impulse Invariance The impulse response of discrete-time system is defined by sampling the impulse response of a continuous-time system. Relationship of frequencies
25
24 relation between frequencies S plane Z plane - Relationship of frequencies
26
25 Aliasing in the Impulse Invariance
27
26 periodic sampling T : sample period; fs=1/T:sample rate Ωs=2π/T:sample rate Review
28
27 Time domain : Complex frequency domain : Laplace transform Relation between Laplace Transform and Z-transform Review
29
28 Fourier Transform frequency domain : Laplace transform Fourier Transform is the Laplace transform when s have the value only in imaginary axis, s=jΩ Since So
30
29 For discrete-time signal , 令: z-transform of discrete- time signal Laplace transform the Laplace transform
31
30 so : Laplace transform Laplace transform continuous time signal z-transform z-transform discrete-time signal let :
32
31 DTFT : Discrete Time Fourier Transform S plane Z plane -
33
32 plane
34
33 If input is bandlimited and f s >2f max, : discrete-time filter design by impulse invariance
35
34 relation between frequencies S plane Z plane - Relationship of frequencies
36
35 periodic sampling T : sample period; fs=1/T:sample rate Ωs=2π/T:sample rate Review
37
36 proof of T : sample period; fs=1/T:sample rate;Ωs=2π/T:sample rate Review s(t) 为冲击串序列,周期为 T ,可展开傅立叶级数
38
37 periodic sampling
39
38 discrete-time filter design by impulse invariance
40
39 Steps of DT filter design by transforming a prototype continuous-time filter Obtain the specifications for continuous- time filter by transforming the specifications for the desired discrete-time filter. Find the system function of the continuous- time filter. Transform the continuous-time filter to derive the system function of the discrete- time filter.
41
40 Transformation from discrete to continuous In the impulse invariance design procedure, the transformation is Assuming the aliasing involved in the transformation is neglected, the relationship of transformation is
42
41 Steps of DT filter design by transforming a prototype continuous-time filter Obtain the specifications for continuous- time filter by transforming the specifications for the desired discrete-time filter. Find the system function of the continuous- time filter. Transform the continuous-time filter to derive the system function of the discrete- time filter.
43
42 Continuous-time IIR filters Butterworth filters Chebyshev Type I filters Chebyshev Type II filters Elliptic filters
44
43 Steps of DT filter design by transforming a prototype continuous-time filter Obtain the specifications for continuous- time filter by transforming the specifications for the desired discrete-time filter. Find the system function of the continuous- time filter. Transform the continuous-time filter to derive the system function of the discrete- time filter.
45
44 Transformation from continuous to discrete
46
45 Example 7.2 Impulse Invariance with a Butterworth Filter Specifications for the discrete-time filter: Assume the effect of aliasing is negligible
47
46 Example 7.2 Impulse Invariance with a Butterworth Filter
48
47 Example 7.2 Impulse Invariance with a Butterworth Filter
49
48 Example 7.2 Impulse Invariance with a Butterworth Filter Plole pairs:
50
49 Example 7.2 Impulse Invariance with a Butterworth Filter Plole pairs:
51
50 Example 7.2 Impulse Invariance with a Butterworth Filter
52
51 Basic for Impulse Invariance To chose an impulse response for the discrete-time filter that is similar in some sense to the impulse response of the continuous-time filter. If the continuous-time filter is bandlimited, then the discrete-time filter frequency response will closely approximate the continuous-time frequency response. The relationship between continuous-time and discrete-time frequency is linear; consequently, except for aliasing, the shape of the frequency response is preserved.
53
52 7.1.2 Bilinear Transformation Bilinear transformation can avoid the problem of aliasing. Bilinear transformation maps onto Bilinear transformation:
54
53 7.1.2 Bilinear Transformation
55
54 7.1.2 Bilinear Transformation
56
55 7.1.2 Bilinear Transformation
57
56 relation between frequency response of H c (s), H(z)
58
57 Comments on the Bilinear Transformation It avoids the problem of aliasing encountered with the use of impulse invariance. It is nonlinear compression of frequency axis. S plane Z plane -
59
58 Comments on the Bilinear Transformation The design of discrete-time filters using bilinear transformation is useful only when this compression can be tolerated or compensated for, as the case of filters that approximate ideal piecewise-constant magnitude-response characteristics.
60
59 Bilinear Transformation of
61
60 Comparisons of Impulse Invariance and Bilinear Transformation The use of bilinear transformation is restricted to the design of approximations to filters with piecewise-constant frequency magnitude characteristics, such as highpass, lowpass and bandpass filters. Impulse invariance can also design lowpass filters. However, it cannot be used to design highpass filters because they are not bandlimited.
62
61 Comparisons of Impulse Invariance and Bilinear Transformation Bilinear transformation cannot design filter whose magnitude response isn’t piecewise constant, such as differentiator. However, Impulse invariance can design an bandlimited differentiator.
63
62 Butterworth Filter, Chebyshev Approximation, Elliptic Approximation 7.1.3 Example of Bilinear Transformation
64
63 Example 7.3 Bilinear Transformation of a Butterworth Filter
65
64 Example 7.3 Bilinear Transformation of a Butterworth Filter
66
65 Locations of Poles Plole pairs:
67
66 Example 7.3 Bilinear Transformation of a Butterworth Filter Plole pairs:
68
67 Ex. 7.3 frequency response of discrete-time filter
69
68 Example 7.4 Butterworth Approximation (Hw)
70
69 Example 7.4 frequency response
71
70 Chebyshev filters C Chebyshev filter (type I) 1 Chebyshev polynomial Chebyshev filter (type II) 1
72
71 Example 7.5 Chebyshev Type I, II Approximation Type I Type II
73
72 Example 7.5 frequency response of Chebyshev Type I Type II
74
73 E elliptic filters Elliptic filter 1 Jacobian elliptic function
75
74 Example 7.6 Elliptic Approximation
76
75 Example 7.6 frequency response of Elliptic
77
76 *Comparison of Butterworth, Chebyshev, elliptic filters: Example -Given specification -Order Butterworth Filter : N=14. ( max flat) Chebyshev Filter : N=8. ( Cheby 1, Cheby 2) Elliptic Filter : N=6 ( equiripple) B C E
78
77 -Pole-zero plot (analog) -Pole-zero plot (digital) BC1C2E BC1C2E (14)(8)
79
78 -Magnitude -Group delay B C1 C2 E B C1 C2 E
80
79 7.2 Design of FIR Filters by Windowing FIR filters are designed based on directly approximating the desired frequency response of the discrete- time system. Most techniques for approximating the magnitude response of an FIR system assume a linear phase constraint.
81
80 Window Method An ideal desired frequency response Many idealized systems are defined by piecewise-constant frequency response with discontinuities at the boundaries. As a result, these systems have impulse responses that are noncausal and infinitely long.
82
81 Window Method The most straightforward approach to obtaining a causal FIR approximation is to truncate the ideal impulse response.
83
82 Windowing in Frequency Domain Windowed frequency response The windowed version is smeared version of desired response
84
83 Window Method If
85
84 Choice of Window is as short as possible in duration. This minimizes computation in the implementation of the filter. approximates an impulse.
86
85 Window Method then would look like, except where changes very abruptly. If is chosen so that is concentrated in a narrow band of frequencies around
87
86 Rectangular Window for the rectangular window has a generalized linear phase. As M increases, the width of the “main lobe” decreases. While the width of each lobe decreases with M, the peak amplitudes of the main lobe and the side lobes grow such that the area under each lobe is a constant.
88
87 Rectangular Window will oscillate at the discontinuity. The oscillations occur more rapidly, but do not decrease in magnitude as M increases. The Gibbs phenomenon can be moderated through the use of a less abrupt truncation of the Fourier series.
89
88 Rectangular Window By tapering the window smoothly to zero at each end, the height of the side lobes can be diminished. The expense is a wider main lobe and thus a wider transition at the discontinuity.
90
89 7.2 Design of FIR Filters by Windowing Method To design an ilowpass FIR Filters Review
91
90 7.2.1 Properties of Commonly Used Windows Rectangular Bartlett (triangular)
92
91 7.2.1 Properties of Commonly Used Windows Hanning Hamming
93
92 7.2.1 Properties of Commonly Used Windows Blackman
94
93 7.2.1 Properties of Commonly Used Windows
95
94 Frequency Spectrum of Windows (a) Rectangular, (b) Bartlett, (c) Hanning, (d) Hamming, (e) Blackman, (M=50) (a)-(e) attenuation of sidelobe increases, width of mainlobe increases.
96
95 7.2.1 Properties of Commonly Used Windows biggest , high oscillations at discontinuity smallest , the sharpest transition Table 7.1
97
96 7.2.2 Incorporation of Generalized Linear Phase In designing FIR filters, it is desirable to obtain causal systems with a generalized linear phase response. The above five windows are all symmetric about the point,i.e.,
98
97 7.2.2 Incorporation of Generalized Linear Phase Their Fourier transforms are of the form
99
98 7.2.2 Incorporation of Generalized Linear Phase
100
99 Frequency Domain Representation
101
100 Example 7.7 Linear-Phase Lowpass Filter The desired frequency response is
102
101 magnitude frequency response
103
102 7.2.1 Properties of Commonly Used Windows smallest , the sharpest transition biggest , high oscillations at discontinuity
104
103 7.2.3 The Kaiser Window Filter Design Method Trade side-lobe amplitude for main-lobe width
105
104 Figure 7.24 As increases, attenuation of sidelobe increases, width of mainlobe increases. As M increases, attenuation of sidelobe is preserved, width of mainlobe decreases. M=20 (a) Window shape, M=20, (b) Frequency spectrum, M=20, (c) beta=6 =6
106
105 Table 7.1 Transition width is a little less than mainlobe width
107
106 Increasing M wile holding constant causes the main lobe to decrease in width, but does not affect the amplitude of the side lobe. Comparison If the window is tapered more, the side lobe of the Fourier transform become smaller, but the main lobe become wider. M=20 =6 M=20
108
107 Filter Design by Kaiser Window
109
108 Filter Design by Kaiser Window M=20
110
109 Example 7.8 Kaiser Window Design of a Lowpass Filter
111
110 Example 7.8 Kaiser Window Design of a Lowpass Filter
112
111 Example 7.8 Kaiser Window Design of a Lowpass Filter
113
112 Ex. 7.8 Kaiser Window Design of a Lowpass Filter
114
113 7.3 Examples of FIR Filters Design by the Kaiser Window Method The ideal highpass filter with generalized linear phase
115
114 Example 7.9 Kaiser Window Design of a Highpass Filter Specifications: By Kaiser window method
116
115 Example 7.9 Kaiser Window Design of a Highpass Filter Specifications: By Kaiser window method
117
116 7.3.2 Discrete-Time Differentiator
118
117 Example 7.10 Kaiser Window Design of a Differentiator Since kaiser’s formulas were developed for frequency responses with simple magnitude discontinuities, it is not straightforward to apply them to differentiators. Suppose
119
118 Group Delay Phase: Group Delay:
120
119 Group Delay Phase: Group Delay: Noninteger delay
121
120 7.4 Optimum Approximations of FIR Filters Goal: Design a ‘best’ filter for a given M In designing a causal type I linear phase FIR filter, it is convenient first to consider the design of a zero phase filter. Then insert a delay sufficient to make it causal.
122
121 7.4 Optimum Approximations of FIR Filters
123
122 7.4 Optimum Approximations of FIR Filters Designing a filter to meet these specifications is to find the (L+1) impulse response values In Packs-McClellan algorithm, is fixed, and is variable. Packs-McClellan algorithm is the dominant method for optimum design of FIR filters.
124
123 7.4 Optimum Approximations of FIR Filters
125
124 7.4 Optimum Approximations of FIR Filters
126
125 7.4 Optimum Approximations of FIR Filters
127
126 Minimax criterion Within the frequency interval of the passband and stopband, we seek a frequency response that minimizes the maximum weighted approximation error of
128
127 Other criterions
129
128 Let denote the closet subset consisting of the disjoint union of closed subsets of the real axis x. Alternation Theorem is an r th-order polynomial. denotes a given desired function of x that is continuous on is a positive function, continuous on The weighted error is The maximum error is defined as
130
129 Alternation Theorem A necessary and sufficient condition that be the unique rth-order polynomial that minimizes is that exhibit at least (r+2) alternations; i.e., there must exist at least (r+2) values in such that and such that for
131
130 Example 7.11 Alternation Theorem and Polynomials Each of these polynomials is of fifth order. The closed subsets of the real axis x referred to in the theorem are the regions
132
131 7.4.1 Optimal Type I Lowpass Filters For Type I lowpass filter The desired lowpass frequency response Weighting function
133
132 7.4.1 Optimal Type I Lowpass Filters The weighted approximation error is The closed subset is or
134
133 7.4.1 Optimal Type I Lowpass Filters The alternation theorem states that a set of coefficients will correspond to the filter representing the unique best approximation to the ideal lowpass filter with the ratio fixed at K and with passband and stopband edge and if and only if exhibits at least (L+2) alternations on, i.e., if and only if alternately equals plus and minus its maximum value at least (L+2) times. Such approximations are called equiripple approximations.
135
134 7.4.1 Optimal Type I Lowpass Filters The alternation theorem states that the optimum filter must have a minimum of (L+2) alternations, but does not exclude the possibility of more than (L+2) alternations. In fact, for a lowpass filter, the maximum possible number of alternations is (L+3).
136
135 7.4.1 Optimal Type I Lowpass Filters Because all of the filters satisfy the alternation theorem for L=7 and for the same value of, it follows that and/or must be different for each,since the alternation theorem states that the optimum filter under the conditions of the theorem is unique.
137
136 Property for type I lowpass filters from the alternation theorem The maximum possible number of alternations of the error is (L+3) Alternations will always occur at and All points with zero slop inside the passband and all points with zero slop inside stopband will correspond to alternations; i.e., the filter will be equiripple, except possibly at and
138
137 7.4.2 Optimal Type II Lowpass Filters For Type II causal FIR filter: The filter length (M+1) is even, ie, M is odd Impulse response is symmetric The frequency response is
139
138 7.4.2 Optimal Type II Lowpass Filters
140
139 7.4.2 Optimal Type II Lowpass Filters For Type II lowpass filter,
141
140 7.4.3 The Park-McClellan Algorithm From the alternation theorem, the optimum filter will satisfy the set of equation
142
141 7.4.3 The Park-McClellan Algorithm Guessing a set of alternation frequencies and
143
142 7.4.3 The Park-McClellan Algorithm
144
143 7.4.3 The Park-McClellan Algorithm For equiripple lowpass approximation Filter length: (M+1)
145
144 7.5 Examples of FIR Equiripple Approximation 7.5.1 Lowpass Filter
146
145 Comments M=26, Type I filter The minimum number of alternations is (L+2)=(M/2+2)=15 7 alternations in passband and 8 alternations in stopband The maximum error in passband and stopband are 0.0116 and 0.0016, which exceed the specifications.
147
146 7.5.1 Lowpass Filter M=27,, Type II filter, zero at z=-1 The maximum error in passband and stopband are 0.0092 and 0.00092, which exceed the specifications. The minimum number of alternations is (L+2)=(M-1)/2+2=15 7 alternations in passband and 8 alternations in stopband
148
147 Comparison Kaiser window method require M=38 to meet or exceed the specifications. Park-McClellan method require M=27 Window method produce approximately equal maximum error in passband and stopband. Park-McClellan method can weight the error differently.
149
148 7.6 Comments on IIR and FIR Discrete-Time Filters What type of system is best, IIR or FIR? Why give so many different design methods? Which method yields the best result?
150
149 7.6 Comments on IIR and FIR Discrete-Time Filters Closed- Form Formulas Generalized Linear Phase Order IIRYesNoLow FIRNoYesHigh
151
150 7.2.1 Properties of Commonly Used Windows Their Fourier transforms are concentrated around They have a simple functional form that allows them to be computed easily. The Fourier transform of the Bartlett window can be expressed as a product of Fourier transforms of rectangular windows. The Fourier transforms of the other windows can be expressed as sums of frequency-shifted Fourier transforms of rectangular windows.(Problem7.34)
152
151 Homework Simulate the frequency response (magnitude and phase) for Rectangular, Bartlett, Hanning, Hamming, and Blackman window with M=21 and M=51
153
152 2015-9-17 152 Zhongguo Liu_Biomedical Engineering_Shandong Univ. Chapter 5 HW 7.2, 7.4, 7.15, 上一页下一页 返 回
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.