Sie sind auf Seite 1von 52

Second Order Filters Overview

Whats different about second order filters


Resonance
Standard forms
Frequency response and Bode plots
Sallen-Key filters
General transfer function synthesis

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 1
Prerequisites and New Knowledge
Prerequisite knowledge
Ability to perform Laplace transform circuit analysis
Ability to solve for the transfer function of a circuit
Ability to generate and interpret Bode plots
New knowledge
Ability to design second-order filters
Knowledge of the advantages of transfer functions with complex
poles and zeros
Understanding of resonance
Familiarity with second-order filter properties

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 2
Motivation
PM !
k
k=0 bk s
Y (s) = PN X(s) = H(s)X(s)
k
k=0 ak s

Second order filters are filters with a denominator polynomial that


is of second order
Usually the roots (poles) are complex
p
p1,2 = n jn 1 2

In many applications, second order filters may be sufficient


Are also the building blocks for higher-order filters

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 3
Standard Form
N (s)
H(s) = s2 s
2
n + Q n
+1
Second order filters can be designed as lowpass, highpass,
bandpass, or notch filters
All four types can be expressed in standard form shown above
N (s) is a polynomial in s of degree m 2
If N (s) = k, the system is a lowpass filter with a DC gain of k
s2
If N (s) = k 2 ,the system is a highpass filter with a high
n
frequency gain of k
s
If N (s) = k Q n
, the system is a bandpass filter with a
maximum gain of k
 2

If N (s) = k 1 s 2 , the system is a notch filter with a gain
n
of k

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 4
Unity Gain Lowpass
A unity-gain lowpass second-order transfer function is of the form
n2 1
H(s) = 2 2
= 2
s + 2n s + n

1+ 2 sn + s
n

n is called the undamped natural frequency


(zeta) is called the damping ratio
p
The poles are p1,2 = ( 2 1) n
If 1, the poles are real
If 0 < < 1, the poles are complex
If = 0, the poles are imaginary: p1,2 = jn
If < 0, the poles are in the right half plane (Re{p} > 0) and the
system is unstable

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 5
Unity Gain Lowpass Continued
The transfer function H(s) can also be expressed in the following form
1 1
H(s) =  2 =  2
1 + 2 sn + s
n 1+ s
Qn + s
n

where
1
Q,
2
The meaning of Q, the Quality factor, will become clear in the
following slides.
1
H(j) =  2
j
1 n + Q n

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 6
Unity Gain Lowpass Magnitude Response
 2 1
j
20 log10 |H(j)| = 20 log10 1 +

n Qn


s 2  2
2
= 20 log10 1 2 +
n Qn

For n ,
20 log10 |H(j)| 20 log10 |1| = 0 dB

For n ,
2
20 log10 |H(j)| 20 log10 = 40 log10 dB
n2 n

At these extremes, the behavior is identical to two real poles.

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 7
Lowpass Magnitude Continued
s 2  2
2
20 log10 |H(j)| = 20 log10 1 2 +
n Qn

For = n ,
1
20 log10 |H(jn )| = 20 log10 = 20 log10 Q = QdB
Q

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 8
Lowpass Magnitude

Complex Poles
40 Q=0.100
Q=0.500
Q=0.707
20 Q=1.000
Q=2.000
Q=10.000
Mag (dB)

0 Q=100.000

20

40

60
2 1 0 1 2
10 10 10 10 10
Frequency (rad/sec)

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 9
Matlab Code

function [] = B o d e C o m p l ex Po les ();

N = 1000;
wn = 1;
Q = [0 .1 0 .5 sqrt (1/2) 1 2 10 100];

w = logspace ( -2 ,2 , N );

nQ = length ( Q );
mag = [];
phs = [];

legendLabels = cell ( nQ ,1);


for c1 = 1: nQ
sys = tf ([ wn ^2] ,[1 wn / Q( c1 ) wn ^2]);
[m , p ] = bode ( sys , w );
mag = [ mag reshape (m ,N ,1)];
phs = [ phs reshape (p ,N ,1)];
legendLabels { c1 } = sprintf ( Q =%5 .3f ,Q ( c1 ));
end

figure (1);
FigureSet (1 , Slides );
h = semilogx (w ,20* log10 ( mag ));
set (h , LineWidth ,1 .5 );
grid on ;
xlabel ( Frequency ( rad / sec ) );

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 10
ylabel ( Mag ( dB ) );
title ( Complex Poles );
xlim ([ w (1) w ( end )]);
ylim ([ -60 45]);
box off ;
AxisSet (8);
legend ( legendLabels );
print ( B o d e M a g C o m p lex Po le s , - depsc );

figure (2);
FigureSet (2 , Slides );
h = semilogx (w , phs );
set (h , LineWidth ,1 .5 );
grid on ;
xlabel ( Frequency ( rad / sec ) );
ylabel ( Phase ( deg ) );
title ( Complex Poles );
xlim ([ w (1) w ( end )]);
ylim ([ -190 10]);
box off ;
AxisSet (8);
legend ( legendLabels );

print ( B o d e P h a s e C o m pl exP ol es , - depsc );

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 11
Lowpass Phase

1
H(j) =  2
j
1 n + Qn

For n ,
H(j) 1 = 0
For n ,
1 Qn
H(j) = = 1 = 180
Q n

For = n ,
1 1
H(j) = = j = 90
Qj j

At the extremes, the behavior is identical to two real poles. At other


values of near n , the behavior is more complicated.

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 12
Unity Gain Lowpass Phase

Complex Poles
0 Q=0.100
20 Q=0.500
Q=0.707
40 Q=1.000
Q=2.000
60
Q=10.000
Phase (deg)

80 Q=100.000

100
120
140
160
180
2 1 0 1 2
10 10 10 10 10
Frequency (rad/sec)

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 13
Lowpass Comments

1
H(j) =    2
j j
1+ Qn + n

The second-order response attenuates twice as fast as a first-order


response (40 dB/decade)
Generally better than the cascade of two first-order filters
Offers additional degree of freedom (Q), which is the gain near
= n
Q may range from 0.5 to 100
Is usually near Q = 1

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 14
Lowpass Maximum Magnitude
What is the frequency at which |H(j)| is maximized?
1 1
H(j) =    2 |H(j)| = r 2 2
j j

1+ Qn + n 1 2
2 +
n Qn

For high values of Q, the maximum of |H(j)| > 1


This is called peaking
The largest Q before the onset of peaking is Q = 1 0.707
2
Said to be maximally flat
Also called a Butterworth response
In this case, |H(jn )| = 3 dB and n is the cutoff frequency

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 15
Lowpass Maximum Continued
If Q > 0.707, the maximum magnitude and frequency are as follows:
r
1 Q
r = n 1 |H(j r )| = 1
2Q2 1 4Q 2

r is called the resonant frequency or the damped natural


frequency
As Q , r n
For sufficiently large Q (say Q > 5)
r n
|H(jr )| Q
Peaked responses are useful in the synthesis of high-order filters

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 16
Example 1: Passive Lowpass

50 mH R

+
vs(t) 200 nF vo(t)
-

Generate the bode plot for the circuit shown above.

1
LC n2 n2
H(s) = R 1
= 2 = 2 n
s2 + L s + LC
s + 2n s + n2 s + Q s + n2

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 17
Example 1:Passive Lowpass Continued
r
1
n = = 10 k rad/s
LC
R R
= LC = CL = R 0.001
2L r2
1 L L 1 500
Q = = =
LC R CR R

R=5 = 0.005 Q = 100 Very Light Damping


R = 50 = 0.05 Q = 10 Light Damping
R = 707 = 1.41 Q = 0.707 Strong Damping
R = 1 k =1 Q = 0.5 Critical Damping
R = 5 k =5 Q = 0.1 Over Damping

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 18
Example 1: Lowpass Magnitude Response

Resonance Example
40

20

20
Mag (dB)

40
R=5
60 R = 50
R = 707
80 R = 1 k
R = 5 k
100
R = 50 k
120
2 3 4 5 6
10 10 10 10 10
Frequency (rad/sec)

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 19
Example 1: Lowpass Phase Response

Resonance Example
0
20
40
60
Phase (deg)

80
100 R=5
120 R = 50
R = 707
140
R = 1 k
160 R = 5 k
R = 50 k
180
2 3 4 5 6
10 10 10 10 10
Frequency (rad/sec)

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 20
Practical Second-Order Filter Tradeoffs
There are many standard designs for second-order filters
A library of first and second-order filters is all you need to
synthesize any transfer function
The ideal transfer functions are identical
Engineering design tradeoffs are practical
Cost (number of op amps)
Complexity
Sensitivity to component value variation
Ease of tuning
Ability to vary cutoff frequencies and/or gains

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 21
Practical Second-Order Filters
Popular practical second-order filters include
KRC/Sallen-key filters
Multiple-feedback filters: more than one feedback path
State-variable filters
Biquad/Tow-Thomas filters filters

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 22
Example 2: Lowpass Sallen-Key Filter

C1

R1 R2

+
vs(t) Rb
C2 vo(t)
-
Ra

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 23
Example 2: Questions
Is the input impedance finite?
What is the output impedance?
How many capacitors are in the circuit?
What is the DC gain?
What is the high frequency gain?
What is the probable order of the transfer function?
Solve for the transfer function

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 24
Example 2: Work Space

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 25
Example 2: Work Space

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 26
Example 2: Tuning

Ra + Rb
|H(0)| = =k
Ra
1
n =
R1 C1 R2 C2
1
Q= q q q
R2 C2 R1 C2 R1 C1
R1 C1 + R2 C1 + (1 k) R2 C2

6 circuit parameters (four resistors, two capacitors)


3 constraints
DC gain, k
Natural frequency
Q
Prudent to pick K = 1, since gain is often added at in the first
and/or last stages

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 27
Example 2: Tuning Tips

RA + RB
|H(0)| =
RA
1
n =
R1 C1 R2 C2
1
Q= q q q
R2 C2 R1 C2 R1 C1
R1 C1 + R2 C1 + (1 K) R2 C2

1. If you select R1 = R2 = R and C1 = C2 = C, the equations


simplify considerably
Watch out for coarse tolerances on components
2. Helps guard against op amp limitations if you select k = 1
Gain is often used at end or beginning of filter stages
C1
3. Best to start of with two capacitances in a ratio C2 4Q2

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 28
Example 3: Design

Design a Sallen-Key lowpass filter with a Q = 1/ 2, corner
frequency of 1000 Hz, and DC gain of 1.
Redraw the circuit with a DC gain of 1
Arbitrarily pick C2 = 1 nF, a common capacitor value that is
cheaply and readily available

2 b b2 4ac
Hint: Recall that the solution to ax + bx + c = 0 is x = 2a

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 29
Example 3: DC Gain Solution

RA + RB RB
|H(0)| = =1+
RA RA

Pick RB = 0 and RA =

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 30
Example 3: Solution
Define R1 = mR2 and C1 = nC2

1
n =
R1 C1 R2 C2
1
=
R2 C2 nm
1
Q= q q q
R2 C2 R1 C2 R1 C1
R1 C1 + R2 C1 + (1 K) R2 C2

1 mn
= q
1
+
pm mn
mn n

mn
=
1+m

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 31
Example 3: Solution
mn
2
Q =
1 + 2m + m2
2 mn
m + 2m + 1 = 2
Q
1 2 1 mn
m +m+ =
2 2 2Q2
 
1 2 mn 1
m + 1 m+ =0
2 2Q2 2
n
, 2
1
2Q
1 2 1
m m + = 0
2 2
am2 + bm + c = 0

b b2 4ac p
m= = + 2 1
2a

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 32
Example 3: Solution
1. Arbitrarily pick C2 = 10 nF, a common capacitor value that is
cheaply and readily available
2. Select n such that C
C2
1
4Q 2
, to ensure solution to quadratic
equation for m = RR2 is real valued
1

Pick n = 8
Then C1 = 8Q2 C2 = 80 nF
p n
3. Solve for m = + 2 1, given = 2Q2 1
m=1
1
4. Solve for R2 = C2 n nm
R2 = 2.33 k
5. Solve for R1 = mR2 , given m and R2
R1 = 13.6 k

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 33
Example 3: Magnitude Response

Complex Poles
20

10

10
Mag (dB)

20

30

40

50

60
2 3 4 5
10 10 10 10
Frequency (rad/sec)

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 34
Example 3: Phase Response

Complex Poles
0
20
40
60
Phase (deg)

80
100
120
140
160
180
2 3 4 5
10 10 10 10
Frequency (rad/sec)

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 35
Example 3: MATLAB Code

function [] = S a l l e n K e y Lo wp ass ();

RA = inf ;
RB = 0;
C2 = 10e -9;
Q = 1;
fn = 1000;

% = = = = = = = = = = = = = = = = = = = = = = = == = = == = = == = == = = == = = == = = == = = = = = == = = =
% Preprocessing
% = = = = = = = = = = = = = = = = = = = = = = = == = = == = = == = == = = == = = == = = == = = = = = == = = =
dCGain = 1 + RB / RA ;
wn = 2* pi * fn ;
n = 8* Q ^2;
b = n /(2* Q ^2) -1;
m = b + sqrt ( b ^2 -1);
C1 = n* C2 ;
R2 = 1/( wn * C2 * sqrt ( n * m ));
R1 = m* R2 ;

fprintf ( C1 : %5 .3f nF \n , C1 *1 e9 );
fprintf ( C2 : %5 .3f nF \n , C2 *1 e9 );
fprintf ( R1 : %5 .3f kOhms \ n , R1 *1e -3);
fprintf ( R2 : %5 .3f kOhms \ n , R2 *1e -3);

N = 1000;
functionName = sprintf ( % s , mfilename ); % Get the function name

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 36
w = logspace (2 ,5 , N );

mag = [];
phs = [];

f i l e I d e n tif ier = fopen ([ functionName .tex ] , w );

sys = tf ([ dCGain ] ,[1/( wn ^2) 1/( wn * Q ) 1]);


[m , p ] = bode ( sys , w );
bodeMagnitude = reshape (m ,N ,1);
bodePhase = reshape (p ,N ,1);

figure (1);
FigureSet (1 , Slides );
h = semilogx (w ,20* log10 ( bodeMagnitude ) , r );
set (h , LineWidth ,1 .5 );
grid on ;
xlabel ( Frequency ( rad / sec ) );
ylabel ( Mag ( dB ) );
title ( Complex Poles );
xlim ([ w (1) w ( end )]);
ylim ([ -60 20]);
box off ;
AxisSet (8);
fileName = sprintf ( %s - Magnitude , functionName );
print ( fileName , - depsc );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ newslide \ n );
fprintf ( fileIdentifier , \\ slideheading { Example \\ arabic { exc }: Magnitude Respo nse }\ n );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 37
fprintf ( fileIdentifier , \\ i n c l u d e g ra phi cs[ scale =1]{ Matlab /% s }\ n , fileName );

figure (2);
FigureSet (2 , Slides );
h = semilogx (w , bodePhase , r );
set (h , LineWidth ,1 .5 );
grid on ;
xlabel ( Frequency ( rad / sec ) );
ylabel ( Phase ( deg ) );
title ( Complex Poles );
xlim ([ w (1) w ( end )]);
ylim ([ -190 10]);
box off ;
AxisSet (8);
fileName = sprintf ( %s - Phase , functionName );
print ( fileName , - depsc );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ newslide \ n );
fprintf ( fileIdentifier , \\ slideheading { Example \\ arabic { exc }: Phase Response }\ n );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ i n c l u d e g ra phi cs[ scale =1]{ Matlab /% s }\ n , fileName );

fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \\ newslide \ n );
fprintf ( fileIdentifier , \\ slideheading { Example \\ arabic { exc }: MATLAB Code }\ n );
fprintf ( fileIdentifier , % % = = = = = = = = = = = = = = = = = = = = = = = = = = = == = = = == = = == = = = == = = == = = = == = = == = = = == = = == = = == = = = == = = == \n
fprintf ( fileIdentifier , \ t \\ matlabcode { Matlab /% s.m }\ n , functionName );

fclose ( f i l e I d e n tif ier );

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 38
Example 4: Highpass Sallen-Key Filter
R1

C1 C2

+
vs(t) Rb
R2 vo(t)
-
Ra

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 39
Example 4: Questions
Is the input impedance finite?
What is the output impedance?
How many capacitors are in the circuit?
What is the DC gain?
What is the high frequency gain?
What is the probable order of the transfer function?
Solve for the transfer function

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 40
Example 4: Work Space

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 41
Example 4: Work Space

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 42
Example 4: Solution
 2
s
n
H(s) = K  2
s s
1+ Qn + n
RB
K =1+
RA
1
n =
R1 C1 R2 C2
1
Q= q q q
R1 C1 R1 C2 R2 C2
R2 C2 + R2 C1 + (1 K) R1 C1

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 43
Example 5: Bandpass Sallen-Key Filter
R3

R1 C2

+
Rb
vs(t) C1 R2 vo(t)
-
Ra

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 44
Example 5: Questions
Is the input impedance finite?
What is the output impedance?
How many capacitors are in the circuit?
What is the DC gain?
What is the high frequency gain?
What is the probable order of the transfer function?
Solve for the transfer function

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 45
Example 5: Work Space

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 46
Example 5: Work Space

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 47
Transfer Function Synthesis
You can build almost any transfer function with integrators, adders, &
subtractors
N (s) X(s)
Y (s) = H(s)X(s) = X(s) = N (s) = U (s)N (s)
D(s) D(s)
where
1
U (s) , X(s)
D(s)
D(s) , bn sn + bn1 sn1 + + b1 s + b0
X(s) = bn sn U (s) + bn1 sn1 U (s) + + b1 sU (s) + b0 U (s)
n 1 n1

s U (s) = X(s) bn1 s U (s) b1 sU (s) b0 U (s)
bn
Y (s) = U (s)N (s)
= an sn U (s) + an1 sn1 U (s) + + a1 sU (s) + a0 U (s)

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 48
Transfer Function Synthesis Diagram

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 49
Transfer Function Synthesis Clean Diagram

y(t)

an an1 a2 a1 a0

x(t)
+
1 1 1 1
bn s s s

-
bn1

b2

b1

b0

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 50
Example 6: Transfer Function Synthesis
Draw the block diagram for the following transfer function:
s3 + 5s2 + 2
H(s) = 4
s + 17s3 + 82s2 + 130s + 100

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 51
Analog Filters Summary
There are many types of filters
Second-order filters can implement the four basic types
Second-order
Lowpass & Highpass
Bandpass & Bandstop
Notch
For a given H(s), there are many implementations & tradeoffs
Second order filters are fundamentally different than first-order
filters because they can have complex poles
Causes a resonance

J. McNames Portland State University ECE 222 Second Order Filters Ver. 1.04 52

Das könnte Ihnen auch gefallen