Types of practical filters Filter specifications Tradeoffs...

Post on 05-Jul-2018

213 views 0 download

Transcript of Types of practical filters Filter specifications Tradeoffs...

Practical Analog Filters Overview

• Types of practical filters

• Filter specifications

• Tradeoffs

• Many examples

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 1

Ideal Filters

1Lowpass

1Highpass

1Bandpass

1Bandstop

1Notch

ω

ω

ω

ω

ω ωcωcωc

ωc1ωc1 ωc2ωc2

• There are five ideal filters

• Lowpass filters pass low frequencies: ω < ωc

• Highpass filters pass high frequencies: ω > ωc

• Bandpass filters pass a range of frequencies: ωc1 < ω < ωc2

• Bandstop filters pass two ranges: ω < ωc1 and ω > ωc2

• Notch filters pass all frequencies except ω ∼= ωc

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 2

Ideal Filters Comments

1Lowpass

1Highpass

1Bandpass

1Bandstop

1Notch

ω

ω

ω

ω

ω ωcωcωc

ωc1ωc1 ωc2ωc2

• Phase is not shown

• ωc is called the cutoff frequency

• Generally, the ideal phase is 0◦ for all frequencies

• Can not build ideal filters in practice

• Real filters appear as rounded versions of ideal filters

• Most LTI systems can be thought of as non-ideal filters

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 3

Practical Filters

• Practical filters are usually designed to meet a set of specifications

• Lowpass and highpass filters usually have the followingrequirements

– Passband range

– Stopband range

– Maximum ripple in the passband

– Minimum attenuation in the stopband

• If we know the specifications, we can ask MATLAB to generatethe filter for us

• There are four popular types of standard filters

– Butterworth

– Chebyshev Type I

– Chebyshev Type II

– Elliptic

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 4

Practical Filter Tradeoffs

• Butterworth

- Highest order H(s)+ No passband or stopband ripple

• Chebyshev Type I

+ No stopband ripple

• Chebyshev Type II

+ No passband ripple

• Elliptic

+ Lowest order H(s)- Passband and stopband ripple

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 5

Example 1: Lowpass Filter Specifications

Design a lowpass filter that meets the following specifications:

• The passband ripple is no more than 0.4455 dB(0.95 ≤ |H(jω)| ≤ 1)

• The stopband attenuation is at least 26.02 dB (|H(jω)| ≤ 0.05)

• The passband ranges from 0–450 rad/s

• The stopband ranges from 550–∞ rad/s

Plot the magnitude of the resulting transfer function on a linear-linearplot, the Bode magnitude plot, the pole-zero plot, the impulseresponse, and the step response. Try the Butterworth, Chebyshev I,Chebyshev II, and elliptic filters.

The MATLAB code is posted on the course web site.

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 6

Example 2: Butterworth Lowpass

0 100 200 300 400 500 600 700 800 900 10000

0.2

0.4

0.6

0.8

1

|H(j

ω)|

Butterworth Lowpass Filter Transfer Function Order: 21

Frequency (rad/sec)

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 7

Example 2: Butterworth Lowpass

102

103

−30

−25

−20

−15

−10

−5

0

|H(j

ω)|

(dB

)

Butterworth Lowpass Filter Transfer Function Order:21

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 8

Example 2: Butterworth Lowpass

−1000 −500 0 500

−400

−300

−200

−100

0

100

200

300

400

Imag

inar

y A

xis

Real Axis

Butterworth Lowpass Filter Pole−Zero Plot Order:21

Poles

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 9

Example 2: Butterworth Lowpass

0 0.05 0.1 0.15 0.2 0.25−100

−50

0

50

100

150

h(t)

Time (s)

Butterworth Lowpass Filter Impulse Response Order:21

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 10

Example 2: Butterworth Lowpass

0 0.05 0.1 0.15 0.2 0.250

0.2

0.4

0.6

0.8

1

1.2

1.4

h(t)

Time (s)

Butterworth Lowpass Filter Step Response Order:21

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 11

Example 2: Chebyshev-I Lowpass

0 100 200 300 400 500 600 700 800 900 10000

0.2

0.4

0.6

0.8

1

|H(j

ω)|

Chebyshev−I Lowpass Filter Transfer Function Order: 8

Frequency (rad/sec)

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 12

Example 2: Chebyshev-I Lowpass

102

103

−30

−25

−20

−15

−10

−5

0

|H(j

ω)|

(dB

)

Chebyshev−I Lowpass Filter Transfer Function Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 13

Example 2: Chebyshev-I Lowpass

−800 −600 −400 −200 0 200 400 600

−400

−300

−200

−100

0

100

200

300

400

Imag

inar

y A

xis

Real Axis

Chebyshev−I Lowpass Filter Pole−Zero Plot Order:8

Poles

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 14

Example 2: Chebyshev-I Lowpass

0 0.05 0.1 0.15 0.2 0.25−100

−50

0

50

100

150

h(t)

Time (s)

Chebyshev−I Lowpass Filter Impulse Response Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 15

Example 2: Chebyshev-I Lowpass

0 0.05 0.1 0.15 0.2 0.250

0.2

0.4

0.6

0.8

1

1.2

1.4

h(t)

Time (s)

Chebyshev−I Lowpass Filter Step Response Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 16

Example 2: Chebyshev-II Lowpass

0 100 200 300 400 500 600 700 800 900 10000

0.2

0.4

0.6

0.8

1

|H(j

ω)|

Chebyshev−II Lowpass Filter Transfer Function Order: 8

Frequency (rad/sec)

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 17

Example 2: Chebyshev-II Lowpass

102

103

−30

−25

−20

−15

−10

−5

0

|H(j

ω)|

(dB

)

Chebyshev−II Lowpass Filter Transfer Function Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 18

Example 2: Chebyshev-II Lowpass

−4000 −3000 −2000 −1000 0 1000 2000 3000 4000

−2000

−1000

0

1000

2000

Imag

inar

y A

xis

Real Axis

Chebyshev−II Lowpass Filter Pole−Zero Plot Order:8

PolesZeros

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 19

Example 2: Chebyshev-II Lowpass

0 0.05 0.1 0.15 0.2 0.25−200

−150

−100

−50

0

50

100

150

h(t)

Time (s)

Chebyshev−II Lowpass Filter Impulse Response Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 20

Example 2: Chebyshev-II Lowpass

0 0.05 0.1 0.15 0.2 0.250

0.2

0.4

0.6

0.8

1

1.2

1.4

h(t)

Time (s)

Chebyshev−II Lowpass Filter Step Response Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 21

Example 2: Elliptic Lowpass

0 100 200 300 400 500 600 700 800 900 10000

0.2

0.4

0.6

0.8

1

|H(j

ω)|

Elliptic Lowpass Filter Transfer Function Order: 5

Frequency (rad/sec)

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 22

Example 2: Elliptic Lowpass

102

103

−30

−25

−20

−15

−10

−5

0

|H(j

ω)|

(dB

)

Elliptic Lowpass Filter Transfer Function Order:5

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 23

Example 2: Elliptic Lowpass

−1200 −1000 −800 −600 −400 −200 0 200 400 600 800

−600

−400

−200

0

200

400

600

Imag

inar

y A

xis

Real Axis

Elliptic Lowpass Filter Pole−Zero Plot Order:5

PolesZeros

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 24

Example 2: Elliptic Lowpass

0 0.05 0.1 0.15 0.2 0.25−100

−50

0

50

100

150

h(t)

Time (s)

Elliptic Lowpass Filter Impulse Response Order:5

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 25

Example 2: Elliptic Lowpass

0 0.05 0.1 0.15 0.2 0.250

0.2

0.4

0.6

0.8

1

1.2

1.4

h(t)

Time (s)

Elliptic Lowpass Filter Step Response Order:5

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 26

Example 3: Highpass Filter Specifications

Design an elliptic highpass filter that meets the followingspecifications:

• The passband ripple is no more than 0.4455 dB(0.95 ≤ |H(jω)| ≤ 1)

• The stopband attenuation is at least 26.02 dB (|H(jω)| ≤ 0.05)

• The passband ranges from 550–∞ rad/s

• The stopband ranges from 0–450 rad/s

Plot the magnitude of the resulting transfer function on a linear-linearplot, the Bode magnitude plot, the pole-zero plot, the impulseresponse, and the step response.

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 27

Example 3: Elliptic Highpass

0 100 200 300 400 500 600 700 800 900 10000

0.2

0.4

0.6

0.8

1

|H(j

ω)|

Elliptic Highpass Filter Transfer Function Order: 5

Frequency (rad/sec)

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 28

Example 3: Elliptic Highpass

102

103

−30

−25

−20

−15

−10

−5

0

|H(j

ω)|

(dB

)

Elliptic Highpass Filter Transfer Function Order:5

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 29

Example 3: Elliptic Highpass

−1400 −1200 −1000 −800 −600 −400 −200 0 200 400

−500

0

500

Imag

inar

y A

xis

Real Axis

Elliptic Highpass Filter Pole−Zero Plot Order:5

PolesZeros

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 30

Example 3: Elliptic Highpass

0 0.05 0.1 0.15−1400

−1200

−1000

−800

−600

−400

−200

0

200

h(t)

Time (s)

Elliptic Highpass Filter Impulse Response Order:5

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 31

Example 3: Elliptic Highpass

0 0.05 0.1 0.15−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

h(t)

Time (s)

Elliptic Highpass Filter Step Response Order:5

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 32

Example 3: Relevant MATLAB Code

Wp = 550; % Passband endsWs = 450; % Stopband beginsRp = -20*log10(0.95); % Maximum deviation from 1 in the passband (dB)Rs = -20*log10(0.05); % Minimum attenuation in the stopband (dB)[n,wn] = ellipord(Wp,Ws,Rp,Rs,’s’);[B,A] = ellip(n,Rp,Rs,wn,’high’,’s’);

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 33

Example 4: Bandpass Filter Specifications

Design an Chebyshev type I bandpass filter that meets the followingspecifications:

• The passband ripple is no more than 0.4455 dB(0.95 ≤ |H(jω)| ≤ 1)

• The stopband attenuation is at least 26.02 dB (|H(jω)| ≤ 0.05)

• The passband ranges from 450–550 rad/s

• The stopband ranges from 0–400 rad/s and 500–∞ rad/s

Plot the magnitude of the resulting transfer function on a linear-linearplot, the Bode magnitude plot, the pole-zero plot, the impulseresponse, and the step response.

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 34

Example 4: Chebyshev-I Bandpass

0 100 200 300 400 500 600 700 800 900 10000

0.2

0.4

0.6

0.8

1

|H(j

ω)|

Chebyshev−I Bandpass Filter Transfer Function Order: 8

Frequency (rad/sec)

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 35

Example 4: Chebyshev-I Bandpass

102

103

−30

−25

−20

−15

−10

−5

0

|H(j

ω)|

(dB

)

Chebyshev−I Bandpass Filter Transfer Function Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 36

Example 4: Chebyshev-I Bandpass

−800 −600 −400 −200 0 200 400 600 800

−500

0

500

Imag

inar

y A

xis

Real Axis

Chebyshev−I Bandpass Filter Pole−Zero Plot Order:8

PolesZeros

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 37

Example 4: Chebyshev-I Bandpass

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5−40

−30

−20

−10

0

10

20

30

40

h(t)

Time (s)

Chebyshev−I Bandpass Filter Impulse Response Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 38

Example 4: Chebyshev-I Bandpass

0 0.05 0.1 0.15 0.2 0.25 0.3 0.35 0.4 0.45 0.5−0.08

−0.06

−0.04

−0.02

0

0.02

0.04

0.06

0.08

h(t)

Time (s)

Chebyshev−I Bandpass Filter Step Response Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 39

Example 4: Relevant MATLAB Code

Wp = [450 550]; % Passband endsWs = [400 600]; % Stopband beginsRp = -20*log10(0.95); % Maximum deviation from 1 in the passband (dB)Rs = -20*log10(0.05); % Minimum attenuation in the stopband (dB)[n,wn] = cheb1ord(Wp,Ws,Rp,Rs,’s’);[B,A] = cheby1(n,Rp,wn,’s’);

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 40

Example 5: Bandstop Filter Specifications

Design an Chebyshev type II bandstop filter that meets the followingspecifications:

• The passband ripple is no more than 0.4455 dB(0.95 ≤ |H(jω)| ≤ 1)

• The stopband attenuation is at least 26.02 dB (|H(jω)| ≤ 0.05)

• The passband ranges from 0–400 rad/s and 500–∞ rad/s

• The stopband ranges from 450–550 rad/s

Plot the magnitude of the resulting transfer function on a linear-linearplot, the Bode magnitude plot, the pole-zero plot, the impulseresponse, and the step response.

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 41

Example 5: Chebyshev-II Bandstop

0 100 200 300 400 500 600 700 800 900 10000

0.2

0.4

0.6

0.8

1

|H(j

ω)|

Chebyshev−II Bandstop Filter Transfer Function Order: 8

Frequency (rad/sec)

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 42

Example 5: Chebyshev-II Bandstop

102

103

−30

−25

−20

−15

−10

−5

0

|H(j

ω)|

(dB

)

Chebyshev−II Bandstop Filter Transfer Function Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 43

Example 5: Chebyshev-II Bandstop

−800 −600 −400 −200 0 200 400 600 800

−500

0

500

Imag

inar

y A

xis

Real Axis

Chebyshev−II Bandstop Filter Pole−Zero Plot Order:8

PolesZeros

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 44

Example 5: Chebyshev-II Bandstop

0 0.05 0.1 0.15 0.2 0.25−300

−200

−100

0

100

200

h(t)

Time (s)

Chebyshev−II Bandstop Filter Impulse Response Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 45

Example 5: Chebyshev-II Bandstop

0 0.05 0.1 0.15 0.2 0.250.5

0.6

0.7

0.8

0.9

1

1.1

1.2

1.3

h(t)

Time (s)

Chebyshev−II Bandstop Filter Step Response Order:8

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 46

Example 5: Relevant MATLAB Code

Wp = [400 600]; % Passband endsWs = [450 550]; % Stopband beginsRp = -20*log10(0.95); % Maximum deviation from 1 in the passband (dB)Rs = -20*log10(0.05); % Minimum attenuation in the stopband (dB)[n,wn] = cheb2ord(Wp,Ws,Rp,Rs,’s’);[B,A] = cheby2(n,Rs,wn,’stop’,’s’);

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 47

Practical Filters Summary

• In most applications, filter design begins with a set ofspecifications

• We can use design tools like MATLAB to solve for the H(s) thatmeets a set of frequency specifications

• We can then use the cascade-form of transfer function synthesis

• However, there are standard circuits for these types of filters thatare less expensive and more tolerant of errors in component values

J. McNames Portland State University ECE 222 Practical Analog Filters Ver. 1.04 48