### Second-order Filter

```Lecture 23
Filters
Hung-yi Lee
Filter Types
Lowpass filter
Bandpass filter
wco : cutoff frequency
Bandwidth B = wu - wl
Highpass filter
Notch filter
Real World
Ideal filter
Transfer Function – Rules
• Filter is characterized by its transfer function
H s  =
N s 
D s 
=K
 s  z1  s  z 2   s  z m 
 s  p1  s  p 2   s  p n 
The poles should be at the
left half of the s-plane.
We only consider
stable filter.
Given a complex pole or zero, its complex
conjugate is also pole or zero.
Transfer Function – Rules
• Filter is characterized by its transfer function
H s  =
N s 
D s 
=K
 s  z1  s  z 2   s  z m 
 s  p1  s  p 2   s  p n 
n  m :improper filter
As the frequency increase,
the output will become
infinity.
n  m :proper filter
We only consider proper
filer.
The filters consider have more poles than zeros.
Filter Order
H s  =
N s 
D s 
=K
 s  z1  s  z 2   s  z m 
 s  p1  s  p 2   s  p n 
Order = n
The order of the denominator is the order of the filter.
order=1
order=4
order=4
Outline
• Textbook: Chapter 11.2
Second-order Filter
First-order Filters
Lowpass
Filter
Highpass
Filter
Lowpass
Filter
Highpass
Filter
Bandpss
Filter
Notch
Filter
First-order Filters
Firsr-order Filters
H s  =
N s 
zero or first order
first order
D s 
0 or 1 zero
1 pole
Case 1:
Case 2:
1 pole, 0 zero
1 pole, 1 zero
H s  = K
1
s p
H s  = K
sz
s p
Firsr-order Filters - Case 1
Lowpass filter
H s  = K
w
1
s p
As ω increases
Magnitude decrease
Phase decrease

Pole p is on the
negative real axis
Firsr-order Filters - Case 1
• Amplitude of the transfer function of the first-order
low pass filter
Ideal
Lowpass
filter
First-order
Lowpass
filter
Firsr-order Filters - Case 1
• Find cut-off frequency ωco of the first-order low
pass filter
w
At DC
Lowpass filter
H s  = K
 0  = K
1
s p
1
| p|
Find cut-off frequency ωco
such that
| p|

 w co  = K
1
| p|
1
2
w co = | p |
Firsr-order Filters - Case 2
H s  = K
sz
s p
w
Zero can be
positive or
negative
|z|
| p|
Case 2-1: Absolute value of zero is
smaller than pole
 Magnitude is proportional to the
length of green line divided by the
length of the blue line
 Low frequency ≈ |z|/|p|
Because |z|<|p|
The low frequency signal will
be attenuated
If z=0, the low frequency can

be completely block
Not a low pass
Firsr-order Filters - Case 2
H s  = K
sz
s p
w
Case 2-1: Absolute value of zero is
smaller than pole
 Magnitude is proportional to the
length of green line divided by the
length of the blue line
 High frequency
The high frequency signal
will pass
|z|
| p|

If z=0 (completely block low
frequency)
H s  = K
s
s p
High pass
First-order Filters - Case 2
H s  = K
s
s p
• Find cut-off frequency ωco of the first-order high
pass filter
 w  = K
| jw |
w co
| jw  p |
w |p|
2
2
co
   = K
 w co  = K
2
=
1
2
w co = | p |
| j w co |
| j w co - p |
=
K
2
(the same as low
pass filter)
First-order Filters - Case 2
H s  = K
sz
s p
w
Case 2-2: Absolute value of zero is
larger than pole
 Low frequency ≈ |z|/|p|
Because |z|>|p|
The low frequency signal will
be enhanced.
 High frequency: magnitude is 1

The high frequency signal
will pass.
Neither high pass
nor low pass
First-order Filters

vh
1
H lp  s  =

1
sC
R
=
1
1
sRC  1
sC
1
vl
1
H lp  j w  =
 w  =
RC
jw 
1
Lowpass filter
If vh is output
Highpass filter
 0  = 1
   = 0
RC
 1 
2
w 

RC


RC
If vl is output
RC
1
s
RC
1
sC
Consider vin as input
=
w co =
1
2
(pole)
RC
s
H hp  s  = 1  H lp  s  =
s
1
RC
 0  = 0
   = 1
w co =
1
RC
(pole)
First-order Filters
H lp  s  =

vh
R
R
sL  R
=
L
s

R
L
R
R
H lp  j w  =
vl
L
jw 
R
 w  =
L
R 
w  
L
2
L
 0  = 1    = 0 w co =
H hp  s  = 1  H lp  s  =
2
s
s
R
L
R
L
(pole)

V out
Vx
V in

H lp 1  s  =
H lp  s  =
Vx
V in
H lp 2  s  =
H lp 1  s 

V out
Vx
H lp 2  s 

V out
Vx
V in

1
1
H lp  s  =
=
sC 1
R1 
1
sC 1

sC 2
R2 
=
1
1
sC 1 R1  1
sC 2
1
1  s C 1 R 1  C 2 R 2   s C 1 C 2 R 1 R 2
2

1
sC 2 R 2  1

V out
Vx
V in

Z eq  s 
The first low pass filter is influenced by the
second low pass filter!
H lp 1  s  =
Vx
V in
=
Z eq  s 
Z eq  s   R1

V out
Vx
V in


1 


Z eq  s  =
||  R 2 
sC 1 
sC 2 
1 
1 
 R2 


sC 1 
sC 2  
=

1
1  

  R 2 
sC 1 
sC 2 
Z eq  s 
1
2
s C 1C 2
2
s C 1C 2
=
sC 2 R 2  1
s C 1  C 2   s C 1 C 2 R 2
2

V out
Vx
V in

Z eq  s 
H lp  s  = H lp 1  s   H lp 2  s  =
=
1
Z eq  s 
Z eq  s   R1
sC 2
1
sC 2
1
1  s  R 1C 1  C 2 R 2  R 1C 2   s C 1C 2 R 1 R 2
2
 R2
Second-order Filters
Second-order Filter
H s  =
N s 
0, 1 or 2 zeros
D s 
Second order
Must having
two poles
2 poles
Case 1:
No zeros
Case 2:
One zeros
Case 3:
Two zeros
Second-order Filter – Case 1
Case 1-1
Case 1-2
w
w

p1
p1
p2
p2

Second-order Filter – Case 1
Case 1-1
Real Poles
w
The magnitude is
l1
The magnitude
monotonically decreases.
l1
p1
p2
l1l 2
As ω increases
l2
l2
K

Decrease faster than first
order low pass
Second-order Filter – Case 1
Case 1-2
Complex Poles
w
The magnitude is
l1
As ω increases,
l2
p1
l1
l2
p2
K
l1l 2
l1 decrease first and then increase.

l2 always decrease
What will happen to magnitude?
1. Increase
2. Decrease
3. Increase, then decrease
4. Decrease, then increase
Second-order Filter – Case 1
Case 1-2
Complex Poles
w
If ω > ωd
l1
l2
p1
wd
wd
p2
l1 and l2 both increase.

The magnitude must decrease.

What will happen to magnitude?
1. Increase
2. Decrease
3. Increase, then decrease
4. Decrease, then increase
Second-order Filter – Case 1
Case 1-2
Complex Poles
l1
p1
wd
wd
p2

When ω < ωd
w
w

l2
l1 =
  w d  w 
l2 =
  w d  w 
2
2
2
2
Maximize the magnitude
K
l1l 2
Minimize
l1l 2 =

2

 wd  w

2

2

 wd  w

2

Second-order Filter – Case 1
Minimize l l =   w  w    w  w  
Minimize f w  =   w  w    w  w  
df w 
= 2 w  w   1   w  w    2 w  w   w
dw
w  w  1  w  w    w  w   w  w   = 0
2
2
1 2
2
2
d
d
2
2
2
2
d
d
2
2
d
2

2
 2 w   w d
  w d  w
2

2

w
d
= 0
 
 w  wd  w


2
= wd  w
2


=0
d
 w w d  w  2w  = 0
2
w
2
2
d
 w wd  w
d
2
d
 2 w   w d
d
2
d

2
d
2
w  wd
2
 = 0
  w d  w w d  w  = 0
2
w =
wd  
2
2
(maximize)
Second-order Filter – Case 1
w =
wd  
2
2
The maxima exists when w d  
w
Peaking
w
p1
p1
wd
wd

wd
wd
p2
  wd


p2
No Peaking
wd  
Peaking

Second-order Filter – Case 1
w =
wd  
2
2
The maxima exists when w d  
wd
l1
w

wd
p2
 w  =
w
p1
=K

l2
Peaking
K
l1l 2
1
  w d  w 
2
2
  w d  w 
2
2
Assume w = w d2   2
 w  = K
1
2w
 0  = K
d
1
  wd
2
2
Second-order Filter – Case 1
K
H s  =
s 
2
w0
Q
sw
2
0

w0

Q
p1 , p 2 =
 w0

 Q
2

  4 w 02

2
For complex poles
p1
w0
wd
wd


  4 w 02  0


 =
w0
  wd = w0
2
Q 
wd = w0 1
2Q
w0
p2
 w0

 Q

2
2
1
2
1
4Q
2
Second-order Filter – Case 1
H s  =
s 
2
w0
Q
sw
 jw 
2
0
w = w0
=
Q times
p1
K
H  jw  =
K
w
w0
wd
wd
w0

Q
K
w
2

jw  w 0
2
j
w0
w
Q
K
H  jw 0  =
w = w0
w0
2
j

w0
p2
2
0
2
Q
 w 0  =
K
w
2
0
Q
 0  =
K
w0
2
Q times of DC gain
Second-order Filter – Case 1
w =
w 
2
d
2
K
H s  =
s 
2
w0
 w  = K

sw
Q
For complex poles
2
0
 w0

 Q

 =
p1 , p 2 =
w0
Q

 w0

 Q
2
2
w0
2Q
wd = w0 1
2w

  4 w 02

2

  4 w 02  0


1
1
Q 
2
1
4Q
2
d
Second-order Filter – Case 1
w =
w 
2
d
2
H s  =
s 
2
w0
 =
s  w0
2
Q
w = w0 1
 w  = K
K
1
2Q
2
w0
wd = w0 1
2Q
1
2w
d
1
4Q
2
The maximum value is K
The maximum exist when Q 
1
2
1
2w
= 0 . 707
= K
d
1
Q
w0
2
1
1
4Q
2
Second-order Filter – Case 1
Case 1-1
Real Poles
Case 1-2
Complex Poles
w
w
p1
p1
p2

wd
wd
Q  0 .5

(No Peaking)
p2
0 . 707  Q  0 . 5
Which one is considered as closer
to ideal low pass filter?

K
H s  =
s 
2
w0
Q
Q  0 .5
s  w0
2
Q =
1
Complex
poles
= 0 . 707
2 (Butterworth filter)
Q  0 . 707
Peaking
Butterworth – Cut-off Frequency
K
H s  =
s 
2
w0
s  w0
H  jw  =
=
 0  =
K
s 
2
= 0 . 707
2
2
Q
=
Q =
1
2w 0 s  w 0
2
K
w0
2
 w co  =
K
 j w 2 
w
2w 0  jw   w 0
2
K
2
0
w
2

j 2w 0 w
1
K
2 w0
2
w co = w 0
ω0 is the cut-off frequency
for the second-order
lowpass butterworth filter
(Go to the next lecture first)
Second-order Filter – Case 2
Case 2: 2 poles and 1 zero
Case 2-1: 2 real poles and 1 zero
w
z1
p 2 p1
w

p2
z1 p1

w
p 2 p1
z1

Second-order Filter – Case 2
Case 2: 2 poles and 1 zero
Case 2-1: 2 real poles and 1 zero
w
p 2 p1
z1
flat

Bandpass Filter
Second-order Filter – Case 2
Case 2-2: 2 complex poles and 1 zero
w
Two
Complex
Poles
p1
-40dB
w0
w0
+

z1
Zero
+20dB
p2
| z1 |
Second-order Filter – Case 2
Case 2-2: 2 complex poles and 1 zero
| z 1 | w 0
-40dB
-20dB
Two
Complex
Poles
w 0 | z1 |
-40dB
w0
+
+20dB
-20dB
Zero
+20dB
| z 1 | w 0
| z1 |
w0
| z1 |
Second-order Filter – Case 2
Case 2-2: 2 complex poles and 1 zero
Highly Selective
-20dB
+20dB
| z 1 |= 0
Two
Complex
Poles
-40dB
w0
+
w0
Zero
+20dB
Bandpass Filter
| z1 |
Bandpass Filter
• Bandpass filter: 2 poles and zero at original point
H bp ( s ) = K
 w 
w 0
2
s  w 0
Q s
Q s  w 0
2
bandpass filter
K
K/
2
B
wl
w0
Bandwidth B
= ωr - ωl
wr
Bandpass Filter
• Bandpass filter: 2 poles and zero at original point
H bp ( s ) = K
H bp ( j w ) =
=
w 0
2
s  w 0
Q s
Q s  w 0
2
K w 0 Q  j w
 jw 
2
 w 0 Q  j w  w
K
jw Q
w0
1
Find the frequency for the
maximum amplitude
w0Q
jw
=
2
0
=
K
 j w 2
w 0 Q  j w
K
jw Q
w0
1
jw 0 Q
w
=
w0
2
1
w 0
Q  jw
K
 w
w 
1  jQ 
 0 
w 
 w0
Bandpass Filter
• Transfer function of bandpass filter
H bp ( j w ) =
a bp (w ) =
K
 w
w0 

1  jQ 


w
w
 0

a bp (  ) = 0
a bp (w ) is maximized
K
w0 
2 w

1  Q 


w
w
 0

a bp ( 0 ) = 0
2
when w = w 0
ω0 is center frequency
Bandpass Filter - Bandwidth B
K
a bp (w ) =
=
K
2
2


w
w
2
1  Q 
 0 
w 
 w0
2
2
 w
w0 
1
 w
w0 
2


 =2
1  Q 

w  w  = Q2

w 
 0

 w0
w0
1
w
1
2
2
w  w 0w  w 0 = 0

=
Q
w0 w
Q
2

w =
1
Q
w0 
 1

2
 w 0   4 w 0
Q

2
Pick the two positive
ones as ωl or ωr
Bandpass Filter - Bandwidth B
2

w =
1
Q
w0 
 1

2
 w 0   4 w 0
Q

2
2
1
wu =
Q
w0 
 1

2
 w 0   4 w 0
Q

2
B = wu  wl =
2

wl =
1
Q
w0 
 1

2
 w 0   4 w 0
Q

2
w0
Q measure the narrowness
of the pass band
Q
Q is called quality factor
Second-order Filter – Case 3
w
p1

p2
Second-order Filter – Case 3
w
p1

p2
Second-order Filter – Case 3
w
p1

p2
Second-order Filter – Case 3
w
p1

p2
Thank you!
• Higher order filter
• Buttorworth
• Notch filter for humming
• Different kinds of filter: active, passive ……
• P1562
Suppose this band-stop filter were to
suddenly start acting as a high-pass
filter. Identify a single component
failure that could cause this problem
to occur:
If resistor R3 failed open, it would cause
this problem. However, this is not
the only failure that could cause the same
type of problem!
• Giutar capacitor
9k
Algorithmic implementation
• wiki
High pass
• They are used as part of an audio crossover to
direct high frequencies to a tweeter while
attenuating bass signals which could interfere with,
or damage, the speaker. When such a filter is built
into a loudspeaker cabinet it is normally a passive
filter that also includes a low-pass filter for
the woofer and so often employs both a capacitor
and inductor (although very simple high-pass filters
for tweeters can consist of a series capacitor and
nothing else).
Any second-order bandpass filter may be described by
K w 0 Q s
H bp ( s ) =
s  w 0 Q s  w 0
2
2
Q =
Where quality factor:
w0
2
: damping coefficient
the network is underdamped when  < w0 or Q > ½
p1 , p 2 =
 w0
 jw 0
2Q
2
p1 = p 2 =
4Q
2
1
 w0 
1
2

  w 0  1 
2
4Q
 2Q 

1
 p 2 = 180  cos
1


 = w 0

 1 


 2Q 
 p 1 = 180  cos

1
 1 


2
Q


64
The transfer function of a second-order notch filter is
H no ( s ) =

2

s  w 0 Q s  w
2
0
K s  2s  w0
2
2
 
w0
2
The notch effect comes from the quadratic numerator
z1 , z 2 =    j w 0  
2
2
    jw 0
The notch width is B = wO / Q
65
Table 11.3 Simple Filter
Type
Lowpass
Highpass
Bandpass
Notch
Transfer Function
H (s) =
H (s) =
H (s) =
H (s) =
Properties
a (0 ) = K
K w co
s  w co
a (w co ) = K
a ( ) = K
Ks
s  w co
a (w co ) = K
K w 0 Q s
2
K s  2s  w0
2
2
2
B = w0 Q

a (w 0 ) = KQ  w 0
s  w 0 Q s  w 0
2
2
a (w 0 ) = K
s  w 0 Q s  w 0

2
2
B = w0 Q
66
Example 11.6 Design of a Bandpass Filter
bandpass filter: L = 1 mH, Rw = 1.2 W, C = ?, R = ?
frequency: 20kHz ± 250Hz
 Q par = w 0 C  R // R par  =
B = 2   2  250 Hz
w 0 = 2   20 kHz
Q =
w0
=
C =
w0 L
R par =
= 40
= 5 . 03 k
500
1
2
=
L
CR w
1
2
=
w0L
  R // R par  = Q  w 0 L = 40  2   20 k  10
20 k
B
R // R par
 20 k   1  10
2
10
3
= 63 . 3 nF
3
63 . 3  10
9
 1 .2
= 13 . 2 k W
R // R par =
R =
R  R par
R  R par
13.2k  5.03k
13 . 2 k  5 . 03 k
 R =
3
R par  R // R par

R par   R // R par
= 8 . 13 k W
67

From Wiki
• Butterworth filter – maximally flat in passband and
stopband for the given order
• Chebyshev filter (Type I) – maximally flat in stopband,
sharper cutoff than Butterworth of same order
• Chebyshev filter (Type II) – maximally flat in passband,
sharper cutoff than Butterworth of same order
• Bessel filter – best pulse response for a given order
because it has no group delay ripple
• Elliptic filter – sharpest cutoff (narrowest transition
between pass band and stop band) for the given order
• Gaussian filter – minimum group delay; gives no
overshoot to a step function.
Filter
• A filter is a circuit that is designed to pass signals
with desired frequencies and reject the others.
X
Filter
Y
H s 
Magnitude
ratio
Only input signal at these
frequencies can pass
Loudspeaker for home usage with three
types of dynamic drivers
1. Mid-range driver
2. Tweeter
Second Order Lowpass Filter
H lp  s  =
H lp  j w  =
1
1  s  R 1C 1  C 2 R 2  R 1C 2   s C 1C 2 R 1 R 2
2
1
1  j w  R 1C 1  C 2 R 2  R 1C 2   w C 1C 2 R 1 R 2
2
Compare with 1st order low pass filter
H lp  j w  =
w co
j w  w co
As the frequency increases,
the amplitude ratio drops
faster than 1st order low
pass filter
Firsr-order Filters - Case 1
w
Lowpass filter
H s  = K
1
s p
|p| is the cut-off frequency
w

Larger cut-off
frequency

Smaller cut-off
frequency
Firsr-order Transfer Function
- Case 2
H s  = K
sz
s p
Highpass? Lowpass?
Both possible?
Absolute value
of pole is equal
to zero
Magnitude is the length
of green line divided by
the length of the blue
line
Positive zero can cause
phase shift Phase is the angle of
the green minus the
negative one
w

All pass
filter
First Order Lowpass Filter
K
 lp w  =
w K
2
2
Maximum:
 lp 0  = 1
1
H  jw  =
R
RC
jw 
1
H  jw  =
jw 
RC
H lp  j w  =
K
jw  K
Cut-off Frequency ωco:
L
R
L
K =
H lp  j w  =
1
,
RC
K
R
L
w co
j w  w co
1
 lp w co  =
w
2
co
K
2
1
=
2
w co = K =
2
1
RC
,
R
L
Cut off frequency
 0  = K
1
K
  w d  w co 
  2 w  w
4
2
2
d
2
co
2
2
  w
2
d
w
2
co
  wd
2
1
=
  w d  w co 
2
2
1
2
K
2
1
  wd
2
2

2
  2 w d  2 w co  w d  w co  2 w d w co = 2 4  4 2 w d2  2 w d4
4
2
2
2
2
4
4
2
2
2 w co  w co  2 w d w co =   2 w d  w d
2
w
4
co
w
2
4

2

 2  w w
2
co
2
= w 
2
d
2
d
2
co
2
4

2
  w
2

2 2
d
2
4
w co =
2
=0
w
2
w
2
co
=

  w
2
2
d
  
2
co
2
=
w


2
2
4  w
2
2


 2   wd 
2
d

 2   wd 

2
2

4   wd
2
2
2
w co  2   w d w co
4
2
2
2

60Hz Hum
First-order Filters

vh

vl
The highpass and lowpass
filters have the same cutoff frequency.
w co =
Are there anything wrong?
1
RC
```