ACTIVE RC FILTERS By Edgar Sánchez-Sinencio 1 1. Basic Building Blocks • First-Order Filters • Second-Order Filters, using multiple VCVS • Second-Order Filter, using one VCVS ( Op Amp) • State-Variable Biquad 2. Non-Ideal Active – RC Filters • Using VCVS ( Op Amp) vs. VCCS ( transconductance Amp) • Second-Order Non-idealities • Fully Differential Versions • Fully Balanced, Fully Symmetric Balance Circuits 3. Introduction to Matlab and Simulink for filter Design and filter approximation techniques ECEN 622 TAMU
86
Embed
ECEN 622 TAMU ACTIVE RC FILTERSece.tamu.edu/~s-sanchez/622 Lecture 2 Active RC Filters 2017.pdf · • State-Variable Biquad 2. Non-Ideal Active –RC Filters • Using VCVS ( Op
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
ACTIVE RC FILTERS
By Edgar Sánchez-Sinencio 1
1. Basic Building Blocks
• First-Order Filters
• Second-Order Filters, using multiple VCVS
• Second-Order Filter, using one VCVS ( Op Amp)
• State-Variable Biquad
2. Non-Ideal Active – RC Filters
• Using VCVS ( Op Amp) vs. VCCS ( transconductance Amp)
3. Introduction to Matlab and Simulink for filter Design and
filter approximation techniques
ECEN 622 TAMU
ELEN 622 (ESS)
Op Amp Non-Idealities
A
iV1Z
2Z
A
V0
oV
21
1
1
2
1
2
1
2
where
11
11
ZZ
Z
A
Z
Z
A
Z
Z
A
Z
Z
sH
Integrator
Case 1 sAs
GB;
sCZ;RZ
2
211
1
11
1
1
1
GBRC;
GBssRCGB
RCs
GB
sRCsH
o
GBtanjH;
RCjGB
RCjH
90
2
1 1
2
Non-Ideal Active-RC Integrators
By Edgar Sánchez-Sinencio 20
o.
GB;
jAtan
GBtan
75
10
1i.e.
1 o11
M
o
o
oo
o
GB
j
GB
jH
1
1
11
2
2
error 5
10 i.e.
1
11
2
2
2
2
0
%~
.GB
GB
GB
M
o
o
M
By Edgar Sánchez-Sinencio 21
It follows that the ideal -6 dB/octave roll-off expected from an ideal integrator
changes to -12 dB/octave at the frequency of the parasitic pole given by
CRs tp
1
which may be approximated by,
CRs tt
1 for
dB
A
o
0
-6 dB/octave
1/AoC
R
1/CR
-12 dB/octave
t
22By Edgar Sánchez-Sinencio
In general
jXR
jT
1
then we define the integrator Q-factor by
jAQ
R
XQ
tI
I
GBQ t
L
23By Edgar Sánchez-Sinencio
Making an analogy of QL of an inductor
L
oL
R
LQ
RLL
Lossy Part
For an integrator one can obtain
jAGB
GBGB
RC
RCQI
112
Miller Integrator
C
Rvi
voS
GB
By Edgar Sánchez-Sinencio 24
How can we compensate this degradation of performance?
a)
CGBRC
1
jAQI
C
R
RC
vi vo
s
GBsA
If we make
Ideally we obtain
RCsV
sV
i
o 1
This integrator yields a positiveC
R
R1
R2
A1
A2
vivo
By Edgar Sánchez-Sinencio 25
ACTIVE – RC INTEGRATOR: Pole Shift and Predistortion
622 (ESS)
26
(1b)
1sRCsA
1sRC
1
V
V
(1a) sRC
1
sRC
11
sA
11
sRC
1
V
V
i
o
i
o
)s(A
+
-Vo
Vi
R C
A(s)
; where Ao is the DC gain and 3dB the dominant pole in
open loop.
Then (1b) becomes
(2)
RCsAs
RC
A
RCRC
1Ass
RC
A
V
V
dB3dB3o
2
dB3o
dB3dB3dB3o
2
dB3o
i
o
Let GB=Ao3dB
G. Daryanani, “Principles of Active Network Synthesis and Design,” John Wiley and Sons, 1976.
dB3
dB3o
s
A)s(ALet
By Edgar Sánchez-Sinencio
27
The roots of the denominator are
(3a)
RCGB
41
2
GB
2
GBP
2/1
2dB3
2,1
Using the approximation 1–X)1/2≅ 1 −X/2 for X<<1, then
)b3(
RCGB
21
2
GB
2
GBP
2dB3
2,1
Thus the roots yield
GBRCA
1GBP
RCA
1P
o2
o1
By Edgar Sánchez-Sinencio
28
The Bode Plot Looks Like
By Edgar Sánchez-Sinencio
29
PREDISTORTION; FREQUENCY COMPENSATION
In order to relax the bandwidth op amp requirement one can use a RC or CC on
the Miller Integrator. That is
B. Wu and Y. Chiu, “A 40nm CMOS Derivative-Free IF Active-RC BPF with Programmable Bandwidth and Center Frequency Achieving Over 30dBm IIP3”,
IEEE JSSC, Vol. 50, No. 8, pp 1772-1784, August 2015.
GB
1R Cor
GB
1C R Use CC
Equivalent
Vi
RC
R
C
VoA(s)
Vi
R RCC
Vo
Vi
R
C
Vo
Vi R
C
Vo
CC
CC
By Edgar Sánchez-Sinencio
30
Vi
Vi
Z1
Z1 Z2
ZF
A
Zo ZL
ZL
Vo
Vo
Gm
Using VCVS vs. VCIS in Active-RC Filters
The motivation is to use OTA (VCIS) instead of more power hungry Op Amp (VCVS)
1
2
i
o
L1
21
1m
2m
m
L1
21
1
2m
1
2
i
o
1
F
i
o
1
F
1
F
i
o
oo
Z
Z
V
V
ZZ
ZZ
Z
1g
Z
1g
g
ZZ
ZZ
Z
1
1
Zg
11
Z
Z
V
V
Z
Z
V
V
then,A If
Z
Z1
A
11
Z
Z
V
V
0ZRFor
By Edgar Sánchez-Sinencio
Using VCVS
𝑉𝑖 − 𝑉𝑥𝑍1
+𝑉𝑜 − 𝑉𝑥𝑍𝐹
= 0
𝑉𝑜 = −𝐴𝑉𝑥
Vx
Signal flow graph:
VxVi Vo−𝐴
𝑉𝑥 = 𝑉𝑖𝑍𝐹
𝑍1 + 𝑍𝐹+ 𝑉𝑜
𝑍1𝑍1 + 𝑍𝐹
β
𝑍𝐹𝑍1 + 𝑍𝐹
𝑍1𝑍1 + 𝑍𝐹
Using Mason’s rule:
𝑉𝑜𝑉𝑖=
−𝐴𝑍𝐹
𝑍1 + 𝑍𝐹
1 + 𝐴𝑍1
𝑍1 + 𝑍𝐹
=−𝑍𝐹/𝑍1
1 +1𝐴
1 +𝑍𝐹𝑍1
Thus as 𝐴 → ∞ the gain becomes −𝑍𝐹/𝑍1
By Edgar Sánchez-Sinencio 31
Using VCCS
𝑉𝑖 − 𝑉𝑥𝑍1
+𝑉𝑜 − 𝑉𝑥𝑍2
= 0
𝑉𝑜 − 𝑉𝑥𝑍2
+𝑉𝑜𝑍𝐿
= −𝐺𝑚𝑉𝑥
Vx
Signal flow graph:
VxVi Vo
1 − 𝐺𝑚𝑍21 + 𝑍2/𝑍𝐿
𝑉𝑥 = 𝑉𝑖𝑍2
𝑍1 + 𝑍2+ 𝑉𝑜
𝑍1𝑍1 + 𝑍2
β
𝑍2𝑍1 + 𝑍2
𝑍1𝑍1 + 𝑍2
Using Mason’s rule:
𝑉𝑜𝑉𝑖=
𝑍2𝑍1 + 𝑍2
1 − 𝐺𝑚𝑍21 + 𝑍2/𝑍𝐿
1 −1 − 𝐺𝑚𝑍21 + 𝑍2/𝑍𝐿
𝑍1𝑍1 + 𝑍2
=−𝑍2/𝑍1
1 +1
𝐺𝑚𝑍2 − 11 +
𝑍2𝑍1
1 +𝑍2𝑍𝐿
What conditions do we need to impose on𝐺𝑚 for proper operation?
𝑉𝑜 =1 − 𝐺𝑚𝑍21 + 𝑍2/𝑍𝐿
𝑉𝑥
By Edgar Sánchez-Sinencio 32
Using VCCS: Acceptable 𝐺𝑚 Range
Vx
Signal flow graph:
VxVi Vo
1 − 𝐺𝑚𝑍21 + 𝑍2/𝑍𝐿
𝑍2𝑍1 + 𝑍2
𝑍1𝑍1 + 𝑍2
𝑉𝑜𝑉𝑖=
−𝑍2/𝑍1
1 +1
𝐺𝑚𝑍2 − 11 +
𝑍2𝑍1
1 +𝑍2𝑍𝐿
Note from the signal flow graph that having a negative feedback loop requires 𝐺𝑚𝑍2 > 1
For the gain to approach the ideal gain of −𝑍2/𝑍1, we need
𝐺𝑚𝑍2 − 1 ≫ 1 +𝑍2
𝑍11 +
𝑍2
𝑍𝐿𝐺𝑚𝑍2 ≫ 1 + 1 +
𝑍2
𝑍11 +
𝑍2
𝑍𝐿
Thus, guaranteeing this second condition automatically guarantees the negative feedback condition
By Edgar Sánchez-Sinencio 33
Using VCCS: Practical Considerations
Vx
In practice, 𝑍𝐿 = 𝑅𝑜|| 𝑍𝐿𝑜𝑎𝑑 where 𝑅𝑜 is the OTA’s output resistance and 𝑍𝐿𝑜𝑎𝑑 is the external load impedance
𝐺𝑚𝑍2 ≫ 1 + 1 +𝑍2𝑍1
1 +𝑍2𝑍𝐿
One should note that 𝐺𝑚 and 𝑅𝑜 are not independent since increasing current to increase 𝐺𝑚 will reduce 𝑅𝑜.To a first order, one can consider 𝐴 = 𝐺𝑚𝑅𝑜 to be constant.
Finally, in cascaded filter designs, the load of one stage is the input resistor of the next one. We can thus assume 𝑍𝐿𝑜𝑎𝑑 = 𝑍1 as a realistic condition (𝑍𝐿𝑜𝑎𝑑 = ∞ places a looser constraint on 𝐺𝑚)
Substituting for 𝑍𝐿 as described above yields the following constraint on 𝐺𝑚:
𝐺𝑚 ≫1
𝑍1
2 1 + 𝑍1/𝑍2 + 𝑍2/𝑍1
1 −1𝐴1 + 𝑍2/𝑍1
By Edgar Sánchez-Sinencio 34
Numerical Example
• Ideal VCVS and VCCS components from Cadence were used to simulate the above circuits.
• Two configurations were tested:1. Unity gain inverting amplifier (𝑍2 = 𝑍1 = 𝑅)2. Lossy integrator with corner frequency 1 MHz (𝑍2 = 𝑅||𝐶)
• To have a fair comparison, the value of 𝐴 was fixed to 30 for both the VCVS and VCCS implementations (thus the VCCS had 𝑅𝑜 = 30/𝐺𝑚). This is a typical value for the voltage gain of a single stage amplifier.
• In all tests, 𝑅 = 100𝑘Ω, the output resistance of the VCVS is set to 1 𝑘Ω and a load capacitance is added to the output of the amplifier to give an output pole at 10 MHz.
• With these numbers, the constraint on 𝐺𝑚 is 𝐺𝑚 ≫ 54 𝜇𝑆
• The value of 𝐺𝑚was swept from 30 𝜇𝑆 to 600 𝜇𝑆 and the simulation results are shown in the following slides.
By Edgar Sánchez-Sinencio 35
Simulation Results: Inverting Amplifier
VCVS Response
Increasing 𝐺𝑚
VCVS Response
Increasing 𝐺𝑚
By Edgar Sánchez-Sinencio 36
Simulation Results: Lossy Integrator
VCVS Response
Increasing 𝐺𝑚
VCVS Response
Increasing 𝐺𝑚
By Edgar Sánchez-Sinencio 37
Conclusions
• It is possible to use VCCS (OTA) instead of VCVS (Opamp) in active-RC filters in order to avoid using costly buffer stages.
• Proper performance requirements place a lower limit on the transconductance of the OTA used.
• Using a transconductance of 10-15x the minimum requirement yields a comparable performance to a design employing an Opampimplementation.
By Edgar Sánchez-Sinencio 38
It can be shown that for equal s
GBsA , the Tow-Thomas filter has the following
deviations
GB
k
GBQ;GB
Q
GBQQQ
o
o
o
oooo
oo
oa
2
2
and
414
or
41
1
Vi
QR R
R/k
A1A2
A3R
VBP
CCC1
C2
VL
r
r
-VL
C
rr
VBP -VL
Improved integrator version with positive QI
2
2
1
22
11
GB
kQ
GB
GBkQQ
ooo
o
oa
Improved version by replacing noninverting integrator:
By Edgar Sánchez-Sinencio 39
Single Ended
Fully-Differential Version
How to generate Fully-Differential Filters based on Single-Ended
Version?
CRsV
V
i
o 1
+
-
iVR
oV
C
+
-iV
oV
R C
+
-
iV R
oV
C
+
-
-
+R
C
R
iV
iV
oVoV
C
By Edgar Sánchez-Sinencio 40
Particular Case. Assume no is Available.vi-
Symmetric conditions
Read fully balanced - fully
symmetric circuits from 607.
XQ RRRRR
11111
2303
+
-
-
++
-
C
C
R
R R
RoV
iV
oV
iV
-
++
--
+
R2
R3
R01
RQ
RX
R03
R02
C1 C
2
VBPV
HPV
LP
iV
State -Variable
Filter
+
-
iV
oV
R
R-
iV
C
C
oV
iV
-+
By Edgar Sánchez-Sinencio 41
KHN State Variable Two-Integrator Filter
Use Mason’s Rule:
Next we consider the fully-differential version of the KHN filter.
,1
20202
CRK
,03
303
R
RK
QQ
R
RK 3
101
01
1
CRK
2
332
R
RK
030201012
020132
2
03020101
2020132
1KKKsKKs
KKK
s
KKK
s
KK
sKKK
V
V
QQi
LP
03K
32K
QK
01K+
BPViV s
1
02K
LPV
s1
HPV
By Edgar Sánchez-Sinencio 42
KHN Fully-Differential Version
-+-+ +
--+
+
-+-
XR 03R
3R QR
01R
1C
1C3R
2R
2R
QR
03R
XR
02R
02R
2C
2C
iV
iV
LPV
LPV
By Edgar Sánchez-Sinencio 43
How can we take advantage of improved combination of ± QI in fully differential versions?
QRR
R/k
A1
C1
+
-A2
+
-
C2R
RR/k C1
QRR
C2
inV
inV
oV
oV
QRR
R/k
A1
C1
+
-A2
+
-
C2R
RR/k C1
QRR
C2
inV
inV
oV
oV
SAME!
By Edgar Sánchez-Sinencio 44
622 (ESS)
Effects of Non-Ideal Op Amps on the Tow-Thomas Biquad
)3,2,1i(A When i
2121
21221
32o
2121
2121o2
AA
1
A
1
A
11
AQA
1
QA
1
AA
2
A
21
1
AA
1
A
1
A
11
AA
1Q3
A
Q1
A
1Q21
QsssD
are finite, the denominator becomes of the transfer function yields:
R
( )
( )
( )
( )
( )
( )A1=∞
A2=∞A3=∞
Vi
R/K
QR
C
R
VBPVLP
-VLP
C r
r
45By Edgar Sánchez-Sinencio
3,2,1i,s
GBALet i
i
Furthermore assume the range of interest .1Q,1GB
and A
GB
i
o
oi
i
Then D(s) becomes:
3
o
2
o
1
o
o
2oa
a
oa2
2o
2
oo2
2
o
1
o3
3
o
2
o
1
o
o
GB2
GBGB
ss
QssD
sGB
1Q
sGBGB
21sGB
2GBGB
1)s(D
Thus
GB2
3
GB2
1
GB
then,1 Q and 1for
or
1
o
2
o
1
o
a
o
ooa
ooa
GB2GB1GB
46By Edgar Sánchez-Sinencio
o
o
ooa
oa
321
3
o
2
o
1
o
a
4
GBQ
or
1GBQ4
filter stablea for that Note
1GB
Q4for ,GB
Q41QQ
GBQ41
QQ
GBGBGB equalFor
GB2
GBGBQ1
1
Q
Q
47By Edgar Sánchez-Sinencio
ECEN 622 (ESS)
TAMUKEY FILTER PARAMETERS IN ACTIVE-RC FILTERS
• Dynamic Range
• Signal-To-Noise Ratio
• Total Output Noise
• Noise Power Spectral Density
• Total Area
Resistor and Capacitors can be expressed as:
resistor R of terminals theinput to thefrom function transfer theis fH Where
1 r
fH
R2
V
R2
HVfP
dsinput yiel sinusoidala for ndissipatiopower resistor The
ues.filter val normalized theare c and r where
CcC,RrR
i
2i
2i
2ii
R
Reference. L. oth et all, “General Results for Resistive Noise in Active RC and MOSFET-C Filters”, IEEE Trans on Circuits
and Systems II, Vol. 42, No. 12, pp. 785-793, December 1995.
48By Edgar Sánchez-Sinencio
Focusing on the noise resistor, the power spectral density is given by
(2) fHrkTR4fHkTR4fS2
o2
oR
The definition of fH o is pictorially shown below:
Thus, the total output noise (mean squared value) due to the resistors become
In practice the upper limit of the integration is limited to a useful practical value.
o RR dffSN
+
-Vi
VR
+
-
fHV o
49By Edgar Sánchez-Sinencio
The signal-to-ratio for a given Vi and frequency f is given by
2cc
12c
1
BP
BP
2c
c2
c
BP
2
R
f2
maxi
max,R
max,RRf
R
2i
fjffQjf
jffQfH
yieldssH above thenotation following theUsing
sQ
s
sQ
sH
examplefiler order BP-seconda consider usLet
(4) N2
fHmaxVDR
Then resistors. thein ndissipatiopower specified maximum theis P where
PfPmax
and
(3) N2
fHVSNR
50By Edgar Sánchez-Sinencio
12
icR Qaa
R
VfP
For the biquad shown below
and
a
a/Q1
C
kT2NR
OBPR VaNa limited by linearity and by resistor power dissipation which is
proportional to (a)2.
R
CC
RQR/a
QR/a 1/a
VOBP
-1Vi
51By Edgar Sánchez-Sinencio
Fully Differential Fully Balanced Circuits
What is the problem with single-input / single-output?
A
o
o
FZ1Z
iVnV
oVo
A
0
A
VVV
ZZ
ZVV
on1
F1
1on
)VV(Z
Z1V
VVVFor
icmid1
Fo
icmidi
No elimination of
common-mode signal.
How to solve this problem?
o
FZ1Z
oVo
1Z
o
2V
1V
FZ
)VV(Z
ZV 21
1
Fo
No common-mode output.
2
)VV()VV(VVVFor 21
21icmidi
52By Edgar Sánchez-Sinencio
How to obtain a fully differential circuit?
We will discuss two potential approaches
Approach 1
2PV
FR
o2V o
1R
1R 1oV
FR
o1V o
1R
1R 2oV
FR
2nV
2P1P VV
1PV1nV
Remark:More robust to reject
common-mode signals
Approach 2
FR
o
1V o
1R
)VV(R
R
)VV(R
RV
211
F
121
F1o
1PV
1nV
FR
o
o
2V o
o
)VV(R
RV 12
1
F2o
2PV
2nV
FR
o
o
)VVVV(R
RVV 1221
1
F2o1o
)VV(R
R2V 21
1
FoD
conditions 1P1n2P2n VV;VV
Remark: sensitive to CM signals
FR
53By Edgar Sánchez-Sinencio
First-Order FB Low Pass with Op Amp
*
.subckt opamp non inv out
rin non inv 100K
egain 1 0 (non, inv) 200K
ropen 1 2 2K
copen 2 0 15.9155u
eout 3 0 (2, 0) 1
rout 3 out 50
.ends
*vin 3 31 ac 1.0
vin 31 0 ac 1.0
x1 4 1 2 opamp
x2 4 11 22 opamp
R1 3 1 1K
R11 3 4 1K
R1B 31 4 1K
R1BB 31 11 1K
RF1 2 1 1K
RF1B 22 11 1K
RF11 4 0 1K
RF11B 4 0 1K
C1 2 1 0.159155u
C1B 22 11 0.159155u
C1A 4 0 0.159155u
C11B 4 0 0.159155u
rdummy 3 31 1
.ac dec 10 10Hz 10KHz
.probe
.end
1C
1FR
oiV o
1R
11R11FR
A1C
B11C
o
iV o
B1R
BB1R
B1C
B1FR
oV
B11FR
oV
22
1131
4
23 1
54By Edgar Sánchez-Sinencio
Fully Balanced T-T Active-RC Implementation
1C
2C
1oRR
R
2oR
o oV
QR
o
iV
o
R
KR
KR1oR
QR
2oR
1C
QR
2oR
1C
R
R
2C
2C
1oR
R
o
o
iV
o R
KR
KR
oV
1oR1C
QR
R
2C
2oR
55By Edgar Sánchez-Sinencio
Introduction to Matlab and
Simulink For Filter Design
622 Active Filters
By Edgar Sánchez-Sinencio
Texas A&M University
56By Edgar Sánchez-Sinencio
Example 1: Ideal Integrator
57
R = 1K C = 0.159mF
By Edgar Sánchez-Sinencio
Bode Plot: Ideal Integrator (Matlab)
s=tf(‘s’);
R=1e3; %Resistor Value
C=0.159e-3; %Capacitor Value
hs=1/(R*C*s); %hs= Vo(s)/Vi(s)
figure(1)
bode(hs) %Create Bode Plot
grid minor %Add grid to plot
H= gcr; %change X-axis
units
h.AxesGrid.Xunits = ‘Hz’; %Set units to
Hz
pole(hs); %calculates hs poles
zero(hs); %calculates hs zeros
58
-20
-10
0
10
20
30
Magnitu
de (
dB
)
10-1
100
101
-91
-90.5
-90
-89.5
-89
Phase (
deg)
Bode Diagram
Frequency (Hz)
By Edgar Sánchez-Sinencio
59
2) Go to: Tools => Control Design=> Linear Analysis 3) Then press: Linearize model
1) Create Model using Gain, Integrator, and In/Out blocks
Bode Plot: Ideal Integrator (Simulink)
By Edgar Sánchez-Sinencio
Tow-Thomas Biquad (Simulink)
60By Edgar Sánchez-Sinencio
Output Waveform (Scope)
61By Edgar Sánchez-Sinencio
Integrator Non-ideal amplifier
62
clear clcs=tf('s'); R=1; %Resistor ValueC=0.159e-3; %Capacitor Valuehs1=-1/(R*C*s); %hs= Vo(s)/Vi(s)figure(1) bodemag(hs1)hold onf=1e3;for i=1:5;GBW=2*pi*f;A=GBW/s;Beta=R/(R+1/(s*C));hs2=-1/(R*C*s)*1/(1+1/(A*Beta));hold onbodemag(hs2,{2*pi*1,2*pi*1e5}) f=10*f;endgrid minor %Add grid to ploth= gcr; %change X-axis unitsh.AxesGrid.Xunits = 'Hz'; %Set units to Hzlegend('ideal', 'GBW=1kHz','GBW=10kHz', 'GBW=100kHz','GBW=1MHz', 'GBW=10MHz',1)
100
101
102
103
104
105
-80
-60
-40
-20
0
20
40
60
80
Magnitu
de (
dB
)
Bode Diagram
Frequency (Hz)
ideal
GBW=1kHz
GBW=10kHz
GBW=100kHz
GBW=1MHz
GBW=10MHz
By Edgar Sánchez-Sinencio
Filter Approximation: Low-Pass Butterworth
63
The squared magnitude of a low-pass butterworth filter is given by:
• Use the Matlab cheb1ap function to design a second order
Type I Chebyshev low-pass filter with 3dB ripple in the pass
band
w=0:0.05:400; % Define range to plot
[z,p,k]=cheb1ap(2,3);
[b,a]=zp2tf(z,p,k); % Convert zeros and poles of G(s) to polynomial form
bode(b,a)
grid minor;
66By Edgar Sánchez-Sinencio
Low-pass Chebyshev Filter
67
-80
-60
-40
-20
0
Magnitu
de (
dB
)
10-2
10-1
100
101
102
-180
-135
-90
-45
0
Phase (
deg)
Bode Diagram
Frequency (rad/sec)
By Edgar Sánchez-Sinencio
Low-pass Chebyshev Filter
w=0:0.01:10;
[z,p,k]=cheb1ap(2,3);
[b,a]=zp2tf(z,p,k);
Gs=freqs(b,a,w);
xlabel('Frequency in rad/s');
ylabel('Magnitude of G(s)');
semilogx(w,abs(Gs));
title('Type 1 Chebyshev Low-Pass Filter');
Grid;
68
% Another way to write the code!
By Edgar Sánchez-Sinencio
Low-pass Chebyshev Filter
69
10-2
10-1
100
101
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1Type 1 Chebyshev Low-Pass Filter
By Edgar Sánchez-Sinencio
Inverse Chebyshev• Using the Matlab cheb2ap function, design a third order
Type II Chebyshev analog filter with 3dB ripple in the stop band.
w=0:0.01:1000;
[z,p,k]=cheb2ap(3,3);
[b,a]=zp2tf(z,p,k); Gs=freqs(b,a,w);
semilogx(w,abs(Gs));
xlabel('Frequency in rad/sec');
ylabel('Magnitude of G(s)');
title('Type 2 Chebyshev Low-Pass Filter, k=3, 3 dB ripple in stop band');
grid
70By Edgar Sánchez-Sinencio
Inverse Chebyshev
71
10-2
10-1
100
101
102
103
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Frequency in rad/sec
Magnitude o
f G
(s)
Type 2 Chebyshev Low-Pass Filter, k=3, 3 dB ripple in stop band
By Edgar Sánchez-Sinencio
Elliptic Low-Pass Filter
• Use Matlab to design a four pole elliptic analog low-pass filterwith 0.5dB maximum ripple in the pass-band and 20dBminimum attenuation in the stop-band with cutoff frequency at200 rad/s.
w=0: 0.05: 500;
[z,p,k]=ellip(4, 0.5, 20, 200, 's');
[b,a]=zp2tf(z,p,k);
Gs=freqs(b,a,w);
plot(w,abs(Gs))
title('4-pole Elliptic Low Pass Filter');
grid
72By Edgar Sánchez-Sinencio
Elliptic Low-Pass Filter
73
0 50 100 150 200 250 300 350 400 450 5000
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
14-pole Elliptic Low Pass Filter
By Edgar Sánchez-Sinencio
Transformation Methods
• Transformation methods have been developed where a low
pass filter can be converted to another type of filter by simply
transforming the complex variable s.
• Matlab lp2lp, lp2hp, lp2bp, and lp2bs functions can be used to
transform a low pass filter with normalized cutoff frequency,
to another low-pass filter with any other specified frequency,
or to a high pass filter, or to a band-pass filter, or to a band
elimination filter, respectively.
74By Edgar Sánchez-Sinencio
LPF with normalized cutoff frequency, to
another LPF with any other specified frequency
• Use the MATLAB buttap and lp2lp functions to find the transfer function of a third-order Butterworth low-pass filter with cutoff frequency fc=2kHz.
% Design 3 pole Butterworth low-pass filter (wcn=1 rad/s)
[z,p,k]=buttap(3);
[b,a]=zp2tf(z,p,k); % Compute num, den coefficients of this filter (wcn=1rad/s)
f=1000:1500/50:10000; % Define frequency range to plot
w=2*pi*f; % Convert to rads/sec
fc=2000; % Define actual cutoff frequency at 2 KHz
wc=2*pi*fc; % Convert desired cutoff frequency to rads/sec
[bn,an]=lp2lp(b,a,wc); % Compute num, den of filter with fc = 2 kHz
Gsn=freqs(bn,an,w); % Compute transfer function of filter with fc = 2 kHz
semilogx(w,abs(Gsn));
grid;
xlabel('Radian Frequency w (rad/sec)')
ylabel('Magnitude of Transfer Function')
title('3-pole Butterworth low-pass filter with fc=2 kHz or wc = 12.57 kr/s')
75By Edgar Sánchez-Sinencio
LPF with normalized cutoff frequency, to
another LPF with any other specified frequency
76
103
104
105
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Radian Frequency w (rad/sec)
Magnitude o
f T
ransfe
r F
unction
3-pole Butterworth low-pass filter with fc=2 kHz or wc = 12.57 kr/s
By Edgar Sánchez-Sinencio
• Use the MATLAB commands cheb1ap and lp2hp to find the transfer function ofa 3-pole Chebyshev high-pass analog filter with cutoff frequency fc = 5KHz.
% Design 3 pole Type 1 Chebyshev low-pass filter, wcn=1 rad/s
[z,p,k]=cheb1ap(3,3);
[b,a]=zp2tf(z,p,k); % Compute num, den coef. with wcn=1 rad/s
f=1000:100:100000; % Define frequency range to plot
fc=5000; % Define actual cutoff frequency at 5 KHz
wc=2*pi*fc; % Convert desired cutoff frequency to rads/sec
[bn,an]=lp2hp(b,a,wc); % Compute num, den of high-pass filter with fc =5KHz
Gsn=freqs(bn,an,2*pi*f); % Compute and plot transfer function of filter with fc = 5 KHz
semilogx(f,abs(Gsn));
grid;
xlabel('Frequency (Hz)');
ylabel('Magnitude of Transfer Function')
title('3-pole Type 1 Chebyshev high-pass filter with fc=5 KHz ')
77
High-Pass Filter
By Edgar Sánchez-Sinencio
High-Pass Filter
78
103
104
105
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
Frequency (Hz)
Magnitude o
f T
ransfe
r F
unction
3-pole Chebyshev high-pass filter with fc=5 KHz
By Edgar Sánchez-Sinencio
Band-Pass Filter
• Use the MATLAB functions buttap and lp2bp to find the transfer function of a 3-pole Butterworth analog band-pass filter with the pass band frequency centered at fo = 4kHz , and bandwidth BW =2KHz.
[z,p,k]=buttap(3); % Design 3 pole Butterworth low-pass filter with wcn=1 rad/s
[b,a]=zp2tf(z,p,k); % Compute numerator and denominator coefficients for wcn=1 rad/s
f=100:100:100000; % Define frequency range to plot
f0=4000; % Define centered frequency at 4 KHz
W0=2*pi*f0; % Convert desired centered frequency to rads/s
fbw=2000; % Define bandwidth
Bw=2*pi*fbw; % Convert desired bandwidth to rads/s
[bn,an]=lp2bp(b,a,W0,Bw); % Compute num, den of band-pass filter
% Compute and plot the magnitude of the transfer function of the band-pass filter
• Use the MATLAB functions buttap and lp2bs to find the transfer function of a 3-pole Butterworth band-elimination (band-stop) filter with the stop band frequency centered at fo = 5 kHz , and bandwidth BW = 2kHz.