Filter Approximation Concepts
Total Page:16
File Type:pdf, Size:1020Kb
622 (ESS) 1 Filter Approximation Concepts How do you translate filter specifications into a mathematical expression which can be synthesized ? • Approximation Techniques Why an ideal Brick Wall Filter can not be implemented ? • Causality: Ideal filter is non-causal • Rationality: No rational transfer function of finite degree (n) can have such abrupt transition |H(jω)| h(t) Passband Stopband ω t -ωc ωc -Tc Tc 2 Filter Approximation Concepts Practical Implementations are given via window specs. |H(jω)| 1 Amax Amin ω ωc ωs Amax = Ap is the maximum attenuation in the passband Amin = As is the minimum attenuation in the stopband ωs-ωc is the Transition Width 3 Approximation Types of Lowpass Filter 1 Definitions Ap As Ripple = 1-Ap wc ws Stopband attenuation =As Filter specs Maximally flat (Butterworth) Passband (cutoff frequency) = wc Stopband frequency = ws Equal-ripple (Chebyshev) Elliptic 4 Approximation of the Ideal Lowpass Filter Since the ideal LPF is unrealizable, we will accept a small error in the passband, a non-zero transition band, and a finite stopband attenuation 1 퐻 푗휔 2 = 1 + 퐾 푗휔 2 |H(jω)| • 퐻 푗휔 : filter’s transfer function • 퐾 푗휔 : Characteristic function (deviation of 푇 푗휔 from unity) For 0 ≤ 휔 ≤ 휔푐 → 0 ≤ 퐾 푗휔 ≤ 1 For 휔 > 휔푐 → 퐾 푗휔 increases very fast Passband Stopband ω ωc 5 Maximally Flat Approximation (Butterworth) Stephen Butterworth showed in 1930 that the gain of an nth order maximally flat magnitude filter is given by 1 퐻 푗휔 2 = 퐻 푗휔 퐻 −푗휔 = 1 + 휀2휔2푛 퐾 푗휔 ≅ 0 in the passband in a maximally flat sense 푑푘 퐾 푗휔 2 2 푘 = 0 for 푘 = 1,2, … , 2푛 − 1 푑 휔 휔=0 The corresponding pole locations (for 휀 = 1) can be determined as follows 1 1 2푛 퐻 푠 2 = = → 푠 = − −1 −푛 = 푒푗휋 2푘−1+푛 푠 2푛 푛 2푛 푝 1+ 1+ −1 푠 푗 휋 2푘−1+푛 푗 푠푝 = 푒 2 푛 푘 = 1, … , 2푛 6 Pole Locations: Maximally flat (ε=1) The poles are located on the unity circle at equispaced angles 휋 2푘−1+푛 푠 = 푒푗휃푘 where 휃 = 푘 = 1,2, … , 2푛 푝 푘 2 푛 The real and imaginary parts are 2푘−1 휋 2푘−1 휋 푅푒 푆 = − sin Im 푆 = cos 푝 푛 2 푝 푛 2 Poles in the LHP are associated with 퐻 푠 and poles in the RHP are associated with 퐻 −s 휽풌 ퟎ° ±ퟏퟑퟓ° ±ퟏퟐퟎ°, ퟏퟖퟎ° ±ퟏퟏퟐ. ퟓ°, ±ퟏퟓퟕ. ퟓ° ±ퟏퟎퟖ°, ±ퟏퟒퟒ°, ퟏퟖퟎ° Magnitude Response of Butterworth Filter 8 Design Example Design a 1-KHz maximally flat lowpass filter with: • Attenuation at 10 kHz ≥2000 Normalized prototype: 휔푐 = 1 푟푎푑 푠 , 휔푠 = 10 푟푎푑 푠 2 2 1 1 2푛 6 퐻 푗휔푠 = 2푛 ≤ → 10 ≥ 4 × 10 or 푛 ≥ 3.3 1+휔푠 2000 Choose 푛 = 4 Pole locations 푗휃푘 푠푝 = 푒 where 휃푘 = ±112.5° , ±157.5° 푠푝1,2 = −0.383 ± 푗0.924 푠푝3,4 = −0.924 ± 푗0.383 Normalized transfer function 1 퐻 푠 = 푠2 + 0.765푠 + 1 푠2 + 1.848푠 + 1 퐻1 퐻2 푄 = 1.306, 휔푐 = 1 푄 = 0.541, 휔푐 = 1 9 Design Example 푠 Denormalized transfer function 푠 = 휔푐 1.5585 × 1015 퐻 푠 = 푠2 + 4.8 × 103 푠 + 3.95 × 107 푠2 + 1.16 × 104 푠 + 3.95 × 107 퐻1 퐻2 3 3 푄 = 1.306 , 휔푐 = 2휋10 푄 = 0.541 , 휔푐 = 2휋10 10 Design Example -Discussion We can sharpen the transition in the previous example by increasing the quality factor of one of the two cascaded filters (Q1=3.5 instead of 1.3) To alleviate the peaking problem in the previous ′ response, we can reduce 휔푐2 휔푐2 = 0.6휔푐1 Passband ripples are now existing • They can be tolerated in some applications The resulting response has steeper transition than Butterworth response 11 Equiripple Filter Approximation (Chebyshev I) This type has a steeper transition than Butterworth filters of the same order but at the expense of higher passband ripples |H(jω)|2 Magnitude response of this type is given by 1 1/(1+ε2) 2 1 퐻 푗휔 = 1+ 퐾 푗휔 2 ω -1 1 퐾 푗휔 = 휀퐶푛 휔 |K(jω)|2 −1 퐶푛 휔 = cos 푛 cos 휔 휔 ≤ 1 ε2 ω Going back and forth in ±1 range for -1 1 휔 ≤ 1 -1 ε |K(jω)| 푪풏 is called Chebyshev’s polynomial 1 ω -1 -1 0 1 Defining the passband area of 푲 풋흎 Equiripple Filter Approximation (Chebyshev I) Chebyshev’s Polynomial e푗푛휙+e−푗푛휙 퐶 휔 = cos 푛 cos−1 휔 = 푛 2 풏 푪풏 For the stopband (휔 > 1) 0 1 1 휔 −1 휙 = cos 휔 is complex 2 2휔2 − 1 Thus, 퐶 > 1 푛 3 3 4휔 − 3휔 Since 4 8휔4 − 8휔2 + 1 cos 푛휙 = cosh 푛푗휙 푛 2휔퐶 − 퐶 and 푛−1 푛−2 푗휙 = cosh 휔 Then −1 퐶푛 휔 = cosh 푛 cosh 휔 for 휔 > 1 13 Properties of the Chebyshev polynomials 1 Cn cos(ncos (w))1 w1 Faster response in the stopband In the passband, w<1, Cn is For n>3 and w>1 limited to 1, then, the ripple is determined by e Butterwort h Chebyshev 2 1 n1 N( jw) C 2 2nw2 n1 23 w2 n1 2 2 n 1e C n w 2 2 The -3 dB frequency can be found as: e C n w3dB 1 w1 1 1 1 w3dB cosh cosh w1 n e 14 Pole Locations (Chebyshev Type I) 15 Magnitude Response (Chebyshev Type I) 16 Comparison of Design Steps for Maximally Flat and Chebyshev Cases Step Maximally Flat Chebyshev Find n log 100.1훼푚푖푛 − 1 / 100.1훼푚푎푥 − 1 cosh−1 100.1훼푚푖푛 − 1 100.1훼푚푎푥 − 1 0.5 푛 = 푛 = −1 2 log 휔푠 2 cosh 휔푠 Round up to an integer Round up to an integer Find ε 100.1훼푚푎푥 − 1 1 2 100.1훼푚푎푥 − 1 1 2 180° Find pole If 푛 is odd 휃 = 0°, ±푘 Find 휃푘 as in Butterworth case 푘 푛 180° Find locations If 푛 is even 휃 = ±푘 푘 2푛 1 1 훼 = sinh−1 푛 휀 −1 푛 Radius = Ω0 = 휀 휔푝 Then, −휎 = Ω cos 휃 푘 0 푘 −휎푘 = sin 휃푘 sinh 훼 ±휔 = Ω sin 휃 푘 0 푘 ±휔푘 = cos 휃푘 cosh(훼) 17 Inverse Chebyshev Approximation (Chebyshev Type II) This type has • Steeper transition compared to Butterworth filters (but not as steep as type I) • No passband ripples |H(jω)|2 • Equal ripples in the stopband 1 Magnitude response of this type is given by 2 1 1/(1+ε-2) 퐻 푗휔 = ω 1+ 퐾 푗휔 2 -1 1 |K(jω)|2 1 ∞ 퐾 푗휔 = 1 휀퐶푛 휔 ε-2 ω -1 1 1 −1 1 1 퐶 = cos 푛 cos ≤ 1 ε|K(jω)| 푛 휔 휔 휔 ∞ 휔 ≥ 1 1 Going back and forth in ±1 range for ω 0 휔 ≥ 1 -1 1 -1 푪 is Chebyshev’s polynomial 풏 ∞ Defining the stopband area of 푲 풋흎 Inverse Chebyshev Approximation (Chebyshev Type II) For the passband (휔 < 1) 1 1 퐶 = cosh 푛 cosh−1 for 휔 < 1 푛 휔 휔 1 1 푛 퐶 ≅ 2푛−1 for 휔 ≪ 1 푛 휔 휔 Attenuation 훼 1 훼 = 10 log 1 + 1 푑퐵 휀2퐶2 푛 휔 1 1 훼 = 10 log 1 + 훼 = 10 log 1 + 푚푎푥 2 2 1 푚푖푛 휀2 휀 퐶푛 휔푝 To find the required order for a certain filtering template 훼 10 1 2 2 1 −1 1 10 푚푖푛 −1 퐶푛 = cosh 푛 cosh = 훼 10 휔푝 휔푝 10 푚푎푥 −1 1 2 cosh−1 10훼푚푖푛 10 − 1 10훼푚푎푥 10 − 1 푛 = 1 cosh−1 19 휔푝 Pole/zero Locations (Inverse Chebyshev) Pole/zero locations 2 2 1 1 휀 퐶푛 휔 퐻 푗휔 2 = = 1 2 2 1 1 + 휀−2퐶−2 1 + 휀 퐶푛 휔 푛 휔 We have imaginary zeros at ±휔푧,푘 where 2 1 퐶푛 = 0 휔푧,푘 푘휋 휔 = sec , 푘 = 1,3,5, … , 푛 푧,푘 2푛 If 푠푘 = 휎푘 + 푗휔푘 are the poles of Chebyshev filter Then, 1 푝푘 = 훼푘 + 푗훽푘 = are the poles of inverse Chebyshev filter 푠푘 Magnitude and quality factor of imaginary poles 1 푝푘 = 푄푖퐶ℎ푒푏 = 푄퐶ℎ푒푏 푠푘 20 Pole/zero Locations (Inverse Chebyshev) Poles of Chebyshev and inverse Chebyshev filters are reciprocal Since the poles are on the radial line, they have the same pole Q Imaginary zeros creates nulls in the stopband n=2 n=3 n=4 n=5 21 Magnitude Response (Inverse Chebyshev) 22 Elliptic Filter Approximation Elliptic filter Hjw • Equal ripple passband and stopband • Nulls in the stopband w • Sharpest transition band compared I to same-order Butterworth and m Chebyshev (Type I and II) Re Ellipse Pole/zero Locations (Elliptic) Imaginary zeros creates nulls in the stopband n=2 n=3 n=4 n=5 24 Magnitude Response (Elliptic) 25 Design Example Design a lowpass filter with: • 휔푝 = 1 푅푝 = 1 푑퐵 • 휔푠 = 1.5 푅푠 = 40 푑퐵 Matlab function buttord, cheb1ord, cheb2ord, and ellipord are used to find the least order filters that meet the given specs. 26 Design Example Magnitude response Filter approximation meeting the same specification yield Order (Butterworth)> Order (Chebyshev)> Order (Elliptic) 27 Design Example Pole/zero locations Note that Chebyshev and Eliptic approximations needs high-Q poles 28 Design example Filter order for 푅푝 = 1 and 푅푠 = 40 Eliptic filter always yields the least order. Is it always the best choice ? 29 Step response of the design example • Inverse Chebyshev filter has the least overshoot and ringing • Ringing and overshoots can be problematic in some applications • The pulse deformation is due to the fact that the filter introduces different time delay to the different frequency components (Phase distortion) 30 Phase Distortion • Consider a filter with a transfer function 퐻 푗휔 = 퐻 푗휔 푒푗휙 휔 • Let us apply two sine waves at different frequencies 푣푖푛 푡 = 퐴1 sin 휔1푡 + 퐴2 sin 휔2푡 • The filter output is 휙1 휙2 푣표푢푡 푡 = 퐴1 퐻 푗휔1 sin 휔1 푡 + + 퐴2 퐻 푗휔2 sin 휔2 푡 + 휔1 휔2 • Assuming that the difference between 퐻 푗휔1 and 퐻 푗휔2 is small, the shape of the time domain output signal will be preserved if the two signals are delays by the same amount of time 휙 휔 휙 휔 1 = 2 휔1 휔2 • This condition is satisfied for 휙 휔 = 푡0휔 푡0 = 푐표푛푠푡푎푛푡 • A filter with this characteristic is called “linear phase” 31 Linear Phase Filters • For this type of filters: The magnitude of the signals is scaled equally, and they are delayed by the same amount of time v (t) Kv (t t ) out in 0 Vin Filter Vout jw(t0 ) Vout(s) Vin (s)Ke • The filter transfer function is 퐻 푠 = 퐾푒−푗휔푡0 퐻 푗휔 = 퐾 휙 푗휔 = 푡0휔 휙 푗휔 • In this types of filters the phase delay 휏 = − , and the group delay 휏 = 푃퐷 휔 퐺퐷 푑휙 푗휔 − are constant and equal 휔 32 Linear Phase Filter Approximation • For a typical lowpass filter 퐾 퐾 퐻 푠 = 2 = 2 3 1 + 푎1푠 + 푎2푠 + ⋯ 1 − 푎2휔 + ⋯ + 푗휔 푎1 − 푎3휔 + ⋯ Thus the phase shift is given by 3 −1 푎1 − 푎3휔 + ⋯ 휙 휔 = arg 퐻 푗휔 = − tan 2 1 − 푎2휔 + ⋯ 푥3 푥5 • Using power-series expansion tan−1 푥 = 푥 − + − ⋯ 3 5 The condition for linear phase is satisfied if 휕 휕 푥3 푥5 tan−1 푥 = 푥 − + − ⋯ = 푐표푛푠푡푎푛푡 휕휔 휕휔 3 5 These are called Bessel polynomials, and the resulting networks are called Thomson filters 33 Linear Phase Filter Approximation • Typically the phase behavior of these filters shows some deviation 휏퐺퐷 Ideal response • Errors are measured in time t 0 • 휏퐺퐷 is the Group Delay 휕휙 휏 = − Actual response 퐺퐷 휕휔 w 34 Bessel (Thomson) Filter Approximation • All poles • Poles are relatively low Q • Maximally flat group delay (Maximally linear phase response) • Poor stopband attenuation http://www.rfcafe.com/references/electrical/bessel-poles.htm 35 Bessel Filter Approximation 36 Comparison of various LPF Group delay Ref: A.