Lecture 20

  • Uploaded by: asdsd
  • 0
  • 0
  • February 2021
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Lecture 20 as PDF for free.

More details

  • Words: 3,888
  • Pages: 58
Loading documents preview...
Digital Signal Processing

Analog Filter Design

Analog Lowpass Filter Specifications • Typical magnitude response H a ( jΩ) of an analog lowpass filter may be given as indicated below

1 1

Copyright © 2010, S. K. Mitra

Analog Lowpass Filter Specifications • In the passband, defined by 0 ≤ Ω ≤ Ω p , we require 1 − δ p ≤ H a ( jΩ ) ≤ 1 + δ p , Ω ≤ Ω p i.e., H a ( jΩ) approximates unity within an error of ± δ p • In the stopband, defined by Ω s ≤ Ω ≤ ∞ , we require H a ( jΩ ) ≤ δ s , Ω s ≤ Ω ≤ ∞ 2 2

i.e., H a ( jΩ) approximates zero within an error of δ s Copyright © 2010, S. K. Mitra

Analog Lowpass Filter Specifications

• • • • •

Ω p - passband edge frequency Ω s - stopband edge frequency δ p - peak ripple value in the passband δ s - peak ripple value in the stopband Peak passband ripple α p = − 20 log10 (1 − δ p ) dB

• Minimum stopband attenuation α s = − 20 log10 (δ s ) dB 3 3

Copyright © 2010, S. K. Mitra

Analog Lowpass Filter Specifications • Magnitude specifications may alternately be given in a normalized form as indicated below

4 4

Copyright © 2010, S. K. Mitra

Analog Lowpass Filter Specifications • Here, the maximum value of the magnitude in the passband assumed to be unity •

1 / 1 + ε - Maximum passband deviation, given by the minimum value of the magnitude in the passband 2

• 1 - Maximum stopband magnitude A 5 5

Copyright © 2010, S. K. Mitra

Analog Lowpass Filter Design • Two additional parameters are defined -

Ωp (1) Transition ratio k = Ωs For a lowpass filter k < 1 (2) Discrimination parameter k1 = Usually k1 << 1

ε A −1 2

6 6

Copyright © 2010, S. K. Mitra

Butterworth Approximation

7 7

• The magnitude-square response of an N-th order analog lowpass Butterworth filter is given by 1 2 H a ( jΩ ) = 1 + (Ω / Ω c ) 2 N 2 • First 2 N − 1 derivatives of H a ( jΩ) at Ω = 0 are equal to zero • The Butterworth lowpass filter thus is said to have a maximally-flat magnitude at Ω = 0 Copyright © 2010, S. K. Mitra

Butterworth Approximation • Gain in dB is G (Ω) = 10 log10 H a ( jΩ)

2

• As G (0) = 0 and G (Ω c ) = 10 log10 (0.5) = −3.0103 ≅ −3 dB Ωc is called the 3-dB cutoff frequency 8 8

Copyright © 2010, S. K. Mitra

Butterworth Approximation • Typical magnitude responses with Ω c = 1 Butterworth Filter N=2 N=4 N = 10

Magnitude

1 0.8 0.6 0.4 0.2 0

0

1

2

3

Ω

9 9

Copyright © 2010, S. K. Mitra

Butterworth Approximation • Two parameters completely characterizing a Butterworth lowpass filter are Ωc and N • These are determined from the specified bandedges Ω p and Ω s , and minimum passband magnitude 1 / 1 + ε 2, and maximum stopband ripple 1 / A

10 10

Copyright © 2010, S. K. Mitra

Butterworth Approximation • Ωc and N are thus determined from 2 1 1 = H a ( jΩ p ) = 2N 1 + (Ω p / Ω c ) 1+ ε 2 2 1 1 H a ( jΩ s ) = = 2 2N A 1 + (Ω s / Ω c ) • Solving the above we get log10 [( A − 1) / ε ] log10 (1 / k1 ) 1 N= ⋅ = 2 log10 (Ω s / Ω p ) log10 (1 / k ) 2

2

11 11

Copyright © 2010, S. K. Mitra

Butterworth Approximation

12 12

• Since order N must be an integer, value obtained is rounded up to the next highest integer • This value of N is used next to determine Ωc by satisfying either the stopband edge or the passband edge specification exactly • If the stopband edge specification is satisfied, then the passband edge specification is exceeded providing a safety margin Copyright © 2010, S. K. Mitra

Butterworth Approximation • Transfer function of an analog Butterworth lowpass filter is given by N N Ωc Ωc C = N = H a ( s) = l DN ( s ) s + ∑lN=−01d s ∏lN=1 ( s − pl ) l where j[π ( N + 2 l −1) / 2 N ]

pl = Ωc e , 1≤ l ≤ N • Denominator DN ( s ) is known as the Butterworth polynomial of order N 13 13

Copyright © 2010, S. K. Mitra

Butterworth Approximation • Example - Determine the lowest order of a Butterworth lowpass filter with a 1-dB cutoff frequency at 1 kHz and a minimum attenuation of 40 dB at 5 kHz

• Now

⎛ ⎞ 1 10 log10 ⎜ 2 ⎟ = −1 ⎝1 + ε ⎠ which yields ε 2 = 0.25895 and ⎛ ⎞ 1 10 log10 ⎜ 2 ⎟ = − 40 ⎝A ⎠ 2 A = 10,000 which yields

14 14

Copyright © 2010, S. K. Mitra

Butterworth Approximation • Therefore and

1= k1

A − 1 = 196.51334 ε 2

1 = Ωs = 5 k Ωp

• Hence

log10 (1 / k1 ) N= = 3.2811 log10 (1 / k ) • We choose N = 4 15 15

Copyright © 2010, S. K. Mitra

Chebyshev Approximation • The magnitude-square response of an N-th order analog lowpass Type 1 Chebyshev filter is given by 1 2 H a (s) = 1 + ε 2TN2 (Ω / Ω p ) where TN (Ω) is the Chebyshev polynomial of order N: ⎧ cos( N cos −1 Ω), TN (Ω) = ⎨ −1 ⎩cosh( N cosh Ω),

Ω ≤1 Ω >1

16 16

Copyright © 2010, S. K. Mitra

Chebyshev Approximation • Typical magnitude response plots of the analog lowpass Type 1 Chebyshev filter are shown below Type 1 Chebyshev Filter N=2 N=3 N=8

Magnitude

1 0.8 0.6 0.4 0.2 0

0

1

2

3

Ω

17 17

Copyright © 2010, S. K. Mitra

Chebyshev Approximation • If at Ω = Ω s the magnitude is equal to 1/A, then 2 1 1 = 2 H a ( jΩ s ) = 2 2 1 + ε TN (Ω s / Ω p ) A • Solving the above we get cosh −1 ( A2 − 1 / ε ) cosh −1 (1 / k1 ) = N= −1 cosh (Ω s / Ω p ) cosh −1 (1 / k ) • Order N is chosen as the nearest integer greater than or equal to the above value 18 18

Copyright © 2010, S. K. Mitra

Chebyshev Approximation • The magnitude-square response of an N-th order analog lowpass Type 2 Chebyshev (also called inverse Chebyshev) filter is given by 1 2 H a ( jΩ ) = 2 2 ⎡TN (Ω s / Ω p ) ⎤ 1+ ε ⎢ ⎥ T ( / ) Ω Ω ⎦ ⎣ N s where TN (Ω) is the Chebyshev polynomial of order N 19 19

Copyright © 2010, S. K. Mitra

Chebyshev Approximation • Typical magnitude response plots of the analog lowpass Type 2 Chebyshev filter are shown below Type 2 Chebyshev Filter N=3 N=5 N=7

Magnitude

1 0.8 0.6 0.4 0.2 0

0

1

2

3

Ω

20 20

Copyright © 2010, S. K. Mitra

Chebyshev Approximation • The order N of the Type 2 Chebyshev filter is determined from given ε , Ω s , and A using cosh −1 ( A2 − 1 / ε ) cosh −1 (1 / k1 ) = N= −1 cosh (Ω s / Ω p ) cosh −1 (1 / k ) • Example - Determine the lowest order of a Chebyshev lowpass filter with a 1-dB cutoff frequency at 1 kHz and a minimum attenuation of 40 dB at 5 kHz −1

21 21

cosh (1 / k1 ) = 2.6059 N= −1 cosh (1 / k ) Copyright © 2010, S. K. Mitra

Elliptic Approximation • The square-magnitude response of an elliptic lowpass filter is given by 1 2 H a ( jΩ ) = 1 + ε 2 RN2 (Ω / Ω p ) where RN (Ω) is a rational function of order N satisfying RN (1 / Ω) = 1 / RN (Ω) , with the roots of its numerator lying in the interval 0 < Ω < 1 and the roots of its denominator lying in the interval 1 < Ω < ∞ 22 22

Copyright © 2010, S. K. Mitra

Elliptic Approximation • Typical magnitude response plots with Ω p = 1 are shown below Elliptic Filter N=3 N=4

Magnitude

1 0.8 0.6 0.4 0.2 0

0

1

2

3

Ω

25 23

Copyright © 2010, S. K. Mitra

Analog Lowpass Filter Design • Example - Design an elliptic lowpass filter of lowest order with a 1-dB cutoff frequency at 1 kHz and a minimum attenuation of 40 dB at 5 kHz • Code fragments used [N, Wn] = ellipord\(Wp, Ws, Rp, Rs, ‘s’\);

26 24

[b, a] = ellip\(N, Rp, Rs, Wn, ‘s’\); with Wp = 2*pi*1000; Ws = 2*pi*5000; Rp = 1; Rs = 40; Copyright © 2010, S. K. Mitra

Analog Lowpass Filter Design • Gain plot Lowpass Elliptic Filter

Gain, dB

0 -20 -40 -60

0

2000 4000 Frequency, Hz

6000

27 25

Copyright © 2010, S. K. Mitra

Design of Analog Highpass, Bandpass and Bandstop Filters • Steps involved in the design process: Step 1 - Develop of specifications of a prototype analog lowpass filter H LP (s ) from specifications of desired analog filter HD (s ) using a frequency transformation Step 2 - Design the prototype analog lowpass filter Step 3 - Determine the transfer function HD (s ) of desired analog filter by applying the inverse frequency transformation to H LP (s ) H

28 26

LP

(

s

)

Copyright © 2010, S. K. Mitra

Design of Analog Highpass, Bandpass and Bandstop Filters • Let s denote the Laplace transform variable of prototype analog lowpass filter H LP (s ) and sˆ denote the Laplace transform variable of desired analog filter HD (sˆ) • The mapping from s-domain to sˆ-domain is given by the invertible transformation s = F (sˆ) • Then HD ( sˆ) = H LP ( s ) s = F ( sˆ) H LP ( s ) = HD ( sˆ) sˆ = F −1 ( s )

29 27

Copyright © 2010, S. K. Mitra

Analog Highpass Filter Design • Spectral Transformation: ˆp Ω pΩ s= sˆ where Ω p is the passband edge frequency of ˆ p is the passband edge H LP ( s ) and Ω frequency of H HP ( sˆ) • On the imaginary axis the transformation is ˆp Ω pΩ Ω=− ˆ Ω 30 28

Copyright © 2010, S. K. Mitra

Analog Highpass Filter Design ˆp Ω pΩ Ω=− ˆ Ω Ω Ω p Ωs

Stopband − Ω s − Ω p

Stopband

0 Passband Stopband

Passband

ˆs ˆ p −Ω −Ω

0

Passband

ˆs Ω

ˆp Ω

Ω

Lowpass

ˆ Highpass Ω

31 29

Copyright © 2010, S. K. Mitra

Lowpass to Highpass spectral Transformation:

30

Analog Highpass Filter Design

32 31

• Example - Design an analog Butterworth highpass filter with the specifications: Fˆ p = 4 kHz, Fˆs = 1 kHz, α p = 0.1 dB, α s = 40 dB • Choose Ω p = 1 • Then 2πFˆ p Fˆ p 4000 Ωs = = = =4 2πFˆs Fˆs 1000 • Analog lowpass filter specifications: Ω p = 1, Ω s = 4 , α p = 0.1 dB, α s = 40 dB Copyright © 2010, S. K. Mitra

Analog Highpass Filter Design • Code fragments used [N, Wn] = buttord\(1, 4, 0.1, 40, ‘s’\); [B, A] = butter\(N, Wn, ‘s’\); [num, den] = lp2hp(B, A, 2*pi*4000);

• Gain plots Highpass Filter

0

0

-20

-20

Gain, dB

Gain, dB

Prototype Lowpass Filter

-40 -60

33 32

-80 0

-40 -60

2

4

6 Ω

8

10

-80 0

2

4 6 8 10 Frequency, kHz Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design • Spectral Transformation ˆ o2 sˆ 2 + Ω s = Ωp ˆ p2 − Ω ˆ p1 ) sˆ(Ω where Ω p is the passband edge frequency ˆ p1 and Ω ˆ p 2 are the lower of H LP ( s ), and Ω and upper passband edge frequencies of desired bandpass filter H BP ( sˆ) 34 33

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design • On the imaginary axis the transformation is ˆ o2 − Ω ˆ2 Ω Ω = −Ω p ˆ Bw Ω ˆ p2 − Ω ˆ p1 is the width of where Bw = Ω ˆ o is the passband center passband and Ω frequency of the bandpass filter • Passband edge frequency ± Ω p is mapped ˆ p1 and ± Ω ˆ p 2, lower and upper into m Ω passband edge frequencies 35 34

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design 2 2 ˆ ˆ Ωo − Ω Ω = −Ω p ˆ Bw Ω Ω p Ωs

Stopband − Ω s − Ω p

Stopband

Ω

0 Passband

Stopband

Passband

Stopband

Passband

Stopband

ˆ o ↓ −Ω ˆ s1 0 Ω ˆo ↓ Ω ˆ s1 ↓ Ω ˆ s2 ˆ s2 ↓ − Ω −Ω ˆ p2 − Ω ˆ p1 −Ω ˆ p1 Ω ˆ p2 Ω

Lowpass

ˆ Bandpass Ω

36 35

Copyright © 2010, S. K. Mitra

Lowpass to Bandpass spectral Transformation:

36

Analog Bandpass Filter Design

• Stopband edge frequency ± Ω s is mapped ˆ s 2 , lower and upper ˆ s1 and ± Ω into m Ω stopband edge frequencies • Also, ˆ o2 = Ω ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s2 Ω • If bandedge frequencies do not satisfy the above condition, then one of the frequencies needs to be changed to a new value so that the condition is satisfied 37 37

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design ˆ p1Ω ˆ p2 > Ω ˆ s1Ω ˆ s2 • Case 1: Ω ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s 2 we can either To make Ω increase any one of the stopband edges or decrease any one of the passband edges as shown below ←

Passband



Stopband →

ˆ s1 Ω

→ Stopband ˆ p1 Ω

ˆ p2 Ω

ˆ s2 Ω

ˆ Ω

38 38

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design ˆ s1Ω ˆ s2 / Ω ˆ p2 ˆ p1 to Ω (1) Decrease Ω larger passband and shorter leftmost transition band ˆ p1Ω ˆ p2 / Ω ˆ s2 ˆ s1 to Ω (2) Increase Ω No change in passband and shorter leftmost transition band

39 39

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design ˆ o2 = Ω ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s2 • Note: The condition Ω ˆ p2 can also be satisfied by decreasing Ω which is not acceptable as the passband is reduced from the desired value • Alternately, the condition can be satisfied ˆ s 2 which is not acceptable by increasing Ω as the upper stop band is reduced from the desired value 40 40

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design ˆ p1Ω ˆ p2 < Ω ˆ s1Ω ˆ s2 • Case 2: Ω ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s 2 we can either To make Ω decrease any one of the stopband edges or increase any one of the passband edges as shown below → Passband







Stopband

ˆ s1 Ω

ˆ p1 Ω

ˆ p2 Ω

ˆ s2 Ω

Stopband

ˆ Ω

41 41

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design ˆ p 2 to Ω ˆ s1Ω ˆ s2 / Ω ˆ p1 (1) Increase Ω larger passband and shorter rightmost transition band ˆ p1Ω ˆ p2 / Ω ˆ s1 ˆ s 2 to Ω (2) Decrease Ω No change in passband and shorter rightmost transition band 42 42

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design ˆ o2 = Ω ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s2 • Note: The condition Ω ˆ p1 can also be satisfied by increasing Ω which is not acceptable as the passband is reduced from the desired value • Alternately, the condition can be satisfied ˆ s1 which is not acceptable by decreasing Ω as the lower stopband is reduced from the desired value 43 43

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design • Example - Design an analog elliptic bandpass filter with the specifications: Fˆ p1 = 4 kHz, Fˆ p 2 = 7 kHz, Fˆs1 = 3 kHz Fˆs 2 = 8 kHz, α p = 1 dB, α s = 22 dB

44 44

6 6 ˆ ˆ ˆ ˆ • Now Fp1Fp 2 = 28 × 10 and Fs1Fs 2 = 24 × 10 • Since Fˆ p1Fˆ p 2 > Fˆs1Fˆs 2 we choose ˆ s1Fˆs 2 24 F Fˆp1 = = = 3.42857 kHz Fˆp 2 7 Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design 24 25 • Bandwidth Bw = 7 − = kHz 7 7 • We choose Ω p = 1 ˆFs1Fˆs 2 − ( Fˆs1 ) 2 24 − 9 Ωs = = = 1.4 Fˆs1 ⋅ Bw ( 25 / 7 ) × 3 • Analog lowpass filter specifications: Ω p = 1 , Ω s = 1.4, α s = 22 dB, α p = 1 dB 45 45

Copyright © 2010, S. K. Mitra

Analog Bandpass Filter Design

• Code fragments used

[N, Wn] = ellipord\(1, 1.4, 1, 22, ‘s’\); [B, A] = ellip\(N, 1, 22, Wn, ‘s’\); [num, den] = lp2bp(B, A, 2*pi*4.8989795, 2*pi*25/7);

• Gain plot Prototype Lowpass Filter

Bandpass Filter

46 46

0 Gain, dB

Gain, dB

0 -20 -40 -60 0

-20 -40

2

4 Ω

6

8

-60 0

5 10 15 Frequency, kHz © 2010, S. K. Mitra Copyright

Analog Bandstop Filter Design • Spectral Transformation ˆ s2 − Ω ˆ s1 ) sˆ(Ω s = Ωs ˆ 2o sˆ 2 + Ω where Ω s is the stopband edge frequency ˆ s1 and Ω ˆ s 2 are the lower of H LP (s ) , and Ω and upper stopband edge frequencies of the desired bandstop filter H BS (sˆ) 47 47

Copyright © 2010, S. K. Mitra

Analog Bandstop Filter Design • On the imaginary axis the transformation is ˆ Bw Ω Ω = Ωs 2 ˆ o −Ω ˆ2 Ω ˆ s2 − Ω ˆ s1 is the width of where Bw = Ω ˆ o is the stopband center stopband and Ω frequency of the bandstop filter • Stopband edge frequency ± Ω s is mapped ˆ s1and ± Ω ˆ s 2 , lower and upper into m Ω stopband edge frequencies 48 48

Copyright © 2010, S. K. Mitra

Analog Bandstop Filter Design • Passband edge frequency ± Ω p is mapped ˆ p1 and ± Ω ˆ p 2 , lower and upper into m Ω passband edge frequencies Ω p Ωs

Stopband − Ω s − Ω p

Stopband

Ω

0 Passband Passband

Stopband

Passband

Stopband

Passband

ˆ o ↓ −Ω ˆ p1 ↓ Ω ˆo ↓ Ω ˆ p10 Ω ˆ p2 ˆ p2 ↓ − Ω −Ω ˆ s2 ˆ s1 ˆ s1 ˆ s2 −Ω Ω −Ω Ω

Lowpass

ˆ Bandpass Ω

49 49

Copyright © 2010, S. K. Mitra

Lowpass to Bandstop spectral Transformation:

50

Analog Bandstop Filter Design • Also,

2 ˆ ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s2 Ωo = Ω

• If bandedge frequencies do not satisfy the above condition, then one of the frequencies needs to be changed to a new value so that the condition is satisfied

50 51

Copyright © 2010, S. K. Mitra

Analog Bandstop Filter Design ˆ p1Ω ˆ p2 > Ω ˆ s1Ω ˆ s2 • Case 1: Ω ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s 2 we can either • To make Ω increase any one of the stopband edges or decrease any one of the passband edges as shown below →



Passband

Passband



51 52

ˆ p1 Ω

ˆ s1 Ω

Stopband

← ˆ s2 Ω

ˆ p2 Ω

ˆ Ω Copyright © 2010, S. K. Mitra

Analog Bandstop Filter Design ˆ p 2 to Ω ˆ s1Ω ˆ s2 / Ω ˆ p2 (1) Decrease Ω larger high-frequency passband and shorter rightmost transition band ˆ p1Ω ˆ p2 / Ω ˆ s2 ˆ s 2 to Ω (2) Increase Ω No change in passbands and shorter rightmost transition band 52 53

Copyright © 2010, S. K. Mitra

Analog Bandstop Filter Design 2 ˆ ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s2 • Note: The condition Ωo = Ω can also be satisfied by decreasing ˆ p1 which is not acceptable as the low- Ω frequency passband is reduced from the desired value • Alternately, the condition can be satisfied ˆ s1 which is not acceptable by increasing Ω as the stopband is reduced from the desired value 53 54

Copyright © 2010, S. K. Mitra

Analog Bandstop Filter Design ˆ p1Ω ˆ p2 < Ω ˆ s1Ω ˆ s2 • Case 2: Ω ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s 2 we can either • To make Ω decrease any one of the stopband edges or increase any one of the passband edges as shown below ←



Passband

Passband



54 55

ˆ p1 Ω

Stopband →

ˆ s1 Ω

ˆ s2 Ω

ˆ p2 Ω

ˆ Ω Copyright © 2010, S. K. Mitra

Analog Bandstop Filter Design ˆ p1 to Ω ˆ s1Ω ˆ s2 / Ω ˆ p1 (1) Increase Ω larger passband and shorter leftmost transition band ˆ s1 to Ω ˆ p1Ω ˆ p2 / Ω ˆ s1 (2) Decrease Ω No change in passbands and shorter leftmost transition band 55 56

Copyright © 2010, S. K. Mitra

Analog Bandstop Filter Design ˆ o2 = Ω ˆ p1Ω ˆ p2 = Ω ˆ s1Ω ˆ s2 • Note: The condition Ω ˆ p2 can also be satisfied by increasing Ω which is not acceptable as the highfrequency passband is decreased from the desired value • Alternately, the condition can be satisfied ˆ s 2 which is not acceptable by decreasing Ω as the stopband is decreased 56 57

Copyright © 2010, S. K. Mitra

Related Documents

Lecture 20
February 2021 2
Lecture
February 2021 3
20
January 2021 3
20
February 2021 3
Norma Ansi 20 - 20
March 2021 0

More Documents from "Cheo Garza"

Lecture 21
February 2021 1
Lecture 20
February 2021 2
Lecture 2-done.pdf
February 2021 1
Lecture22.pdf
February 2021 1
Lecture 19
February 2021 1
Lecture 14
February 2021 1