Mathcad - 4 Freq Domain.mcd

advertisement
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 1 of 25
Reference:W:\Lib\MathCAD\Default\defaults.mcd
1. Objective
a. Motivation
. Finite circuit speed, e.g. amplifier - effect on signals
. E.g. how "fast" an amp do we need for audio? For video? For RF?
. How do we characterize "fast"?
. Check response for "every possible" input is not practical
. Solution: check response for "representative signals"
that stand in for "every possible" signal
b. What is Frequency domain analysis?
. Analysis technique
. Not a new circuit element, it's applies to the circuit we already know
. Widely used in engineering (not just circuits)
- e.g. EE 20 ++
- Underlying math: Laplace & Fourier transform, (phasors)
2. Analysis with sinusoids
. cascadable (shape retained)
. efficient: phasor analysis
. universal: Fourier analysis
. Demo: http://www.falstad.com/fourier (live!)
3. Phasor / Laplace
0. Motivation: time domain diff eqs, trigonometry: math problem
a. Represent sinusoids with complex numbers
b. Signals are not complex
c. RC LPF example steady state analysis
d. Impedance, Admittance
. RLC
. generalized
4. Bode plot
a. Ratios, dB (why logarithmic)
b. Bode plot
c. Techniques
5. Power (NR Ch 10)
. instantaneous, average
. rms
. complex
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 2 of 25
Lecture 25: Sinusoidal Steady State (see also ppt)
Motivation
•
•
•
•
•
•
circuits 'deform' changing signals
e.g. digital signals do not retain their "square" shape
amps also cannot keep up with rapidly changing signals (capacitors inside!)
how determine e.g. if amplifier is fast enough?
how do we even characterize how "fast" an amplifier is?
what's a good metric? We don't want to deal at the component (schematic) level
(not very hierarchical)
Problem
Example: RC LPF, (ideal) amp, RC HPF
square wave input (for simplicity)
"exponentials" after LPF
even more complicated waveform after HPF
How to analyze this???
Demo
Conclusion: sinusoids retain shape --> modular!!!
Sinusoidal Response (AC analysis)
Sinusoids:
• sin or cos
• amplitude
• frequency (f or omega)
• phase
Initial transient
Example: RL HPF (see NR text), calculate VR
Vm := 1V
f := 1MHz
ω := 2π ⋅ f
R := 5kΩ
L := 1mH
τ :=
L
R
τ = 200 ns
T :=
input:
v s( t) := Vm ⋅ cos( ω ⋅ t)
KVL:
L⋅
solution:
di( t)
dt
for t>=0, 0 otherwise
+ R ⋅ i( t) = vs( t)
⎛ ω ⋅ L⎞
⎟
⎝ R ⎠
φ := atan⎜
v R_steady( t) :=
φ = 51.488 deg
Vm ⋅ R
2
2
R +ω ⋅L
⋅ cos( ω ⋅ t − φ)
2
R
2
= 0.623
2
R + ω ⋅L
2
1
f
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 3 of 25
−t
−Vm ⋅ R
v R_trans( t) :=
2
2
⋅ cos( φ) ⋅ e
R +ω ⋅L
τ
2
v R( t) := v R_trans( t) + v R_steady( t)
1
0.5
vs( t)
vR_steady( t)
vR_trans( t)
0
vR( t)
0.5
1
0
5 .10
7
1 .10
6
1.5 .10
6
t
2 .10
6
2.5 .10
6
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 4 of 25
Lecture 26: Phasors
Analysis technique:
. efficiently analyze sinusoidal steady state response
. linear differential equations --> linear algebraic equations
. uses complex numbers (signals are real)
Sinusoidal signal:
v ( t) = Vm ⋅ cos( ω ⋅ t + φ)
v ( t) = Re⎡⎣ Vm ⋅ e
(
j⋅( ω⋅t+ φ ) ⎤
)
j⋅φ j⋅ω⋅t⎞
j⋅ω⋅t
⎛
⎦ = Re⎝ Vm ⋅ e ⋅ e ⎠ = Re V( j ⋅ ω ) ⋅ e
Phasor
V( j ⋅ ω ) = Vm ⋅ e
j⋅φ
abbreviation
s := j ⋅ ω
- more compact equations without j
- complex numbers show up in numeric result
- phasor analysis is special case of Laplace transform,
--> consistency with other texts on subject
Example: inductor
diff eq analysis
phasor analysis
iL( t) = ILm ⋅ cos( ω ⋅ t)
iL( t) = Re⎛⎝ IL( s) ⋅ e
⎛d
⎞
v L( t) = L ⋅ ⎜ iL( t) ⎟ = −L ⋅ ILm ⋅ sin( ω ⋅ t)
⎝ dt
⎠
v L( t) = L ⋅
s⋅t⎞
⎠
s⋅t
s⋅t
d
Re⎛⎝ IL( s) ⋅ e ⎞⎠ = Re⎛⎝ L ⋅ IL( s) ⋅ s ⋅ e ⎞⎠
dt
v L( t) = Re⎛⎝ VL( s) ⋅ e
with
e.g.
L := 1mH
ILm := 1mA
IL( s) := ILm
Impedance:
ZL( s) =
Admittance:
YL( s) =
f := 1MHz
VL( s) := s ⋅ L ⋅ IL( s)
VL( s)
IL( s)
IL( s)
VL( s)
= s⋅L
=
1
s⋅L
Let class derive admittance of a capacitor.
s⋅t⎞
⎠
VL( s) = s ⋅ L ⋅ IL( s)
ω := 2 ⋅ π ⋅ f
s := j ⋅ ω
VL( s) = 6.283i V
- universal! Treat L, C like ''resistors"
- complex number
- units: ohm!
e.g.
s ⋅ L = 6.283i kΩ
1
s⋅L
= −159.155i μS
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 5 of 25
Lecture 27: Network analysis with phasors
-
KVL and KLC still hold (with phasors)
represent signals with phasors (complex numbers)
Restance becomes Impedance, generalizable to L, C!
Ditto Admittance
Generalized ohm-meters exist also: LCR meters, impedance / network analyzers
ZL = s ⋅ L
ZR = R
ZC =
1
s⋅C
Example: calculate magnitude and phase of ic, vc
Ztot( s) = ZR1( s) + ZC1( s)
Ztot( s) = R1 +
Ic( s) =
with
Vsm := 1V
Vs( s) := Vsm
R1 := 10kΩ
C1 := 1pF
Ic( s) := Vs( s) ⋅
Ic1 := Ic( 2j ⋅ π ⋅ 10MHz)
Vs( s)
Ztot( s)
1
s ⋅ C1
=
= Vs( s) ⋅
1 + s ⋅ R1 ⋅ C1
s ⋅ C1
s ⋅ C1
1 + s ⋅ R1 ⋅ C1
R1 ⋅ C1 = 10 ns
τ 1 := R1 ⋅ C1
s ⋅ C1
1 + s ⋅ R1 ⋅ C1
Ic1 = 28.304 + 45.048i μA
Ic1 = 0.053 mA
arg ( Ic1) = 57.858 deg
KVL, KCL, node voltage, divider - whatever, we get:
Vc( s) =
Vs( s)
1 + s ⋅ R1 ⋅ C1
H1( s) =
Vc( s)
Vs( s)
=
1
1 + s ⋅ R1 ⋅ C1
H1( s) :=
Ha := H1( 2j ⋅ π ⋅ 0 MHz)
Ha = 1
arg ( Ha) = 0 deg
Ha := H1( 2j ⋅ π ⋅ 1 MHz)
Ha = 0.998
arg ( Ha) = −3.595 deg
Ha := H1( 2j ⋅ π ⋅ 10MHz)
Ha = 0.847
arg ( Ha) = −32.142 deg
Ha := H1( 2j ⋅ π ⋅ 100 MHz)
Ha = 0.157
arg ( Ha) = −80.957 deg
Ha := H1( 2j ⋅ π ⋅ 1 GHz )
Ha = 0.016
arg ( Ha) = −89.088 deg
1
1 + s ⋅ R1 ⋅ C1
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 6 of 25
Lecture 28: Frequency Response
N := 100
i := 0 .. N − 1
f := linrange( 0Hz , 100MHz , N)
1
H 1( 2j⋅π⋅f i)
0.5
0
0
2 .10
4 .10
7
6 .10
7
7
8 .10
6 .10
8 .10
7
1 .10
8
fi
0
(
arg H1( 2j⋅π⋅f i)
)
deg
50
0
2 .10
4 .10
7
7
7
7
1 .10
8
fi
N := 100
i := 0 .. N − 1
f := logrange ( 100kHz , 1GHz , N)
1
H 1( 2j⋅π⋅f i)
0.1
0.01
5
1 .10
1 .10
6
1 .10
fi
7
1 .10
8
1 .10
9
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 7 of 25
0
(
arg H1( 2j⋅π⋅f i)
)
deg
50
1 .10
1 .10
5
6
1 .10
fi
7
1 .10
1 .10
8
9
Logarithmic axis:
- more informative:
. 1Hz resolution at low frequencies, but not at 1GHz!
. many processes are logarithmic (cf. octave)
- for frequency - beware of label log f; usually the freq and not the log is specified
- amplitude
- phase scale is always linear
Interpretation
H1abs( ω ) :=
phi 1( ω ) := −atan( ω ⋅ τ )
1
(
)
1 + ω ⋅ τ1
2
Vin := 1V
v in( ω , t) := Vin ⋅ cos( ω ⋅ t)
Vout( ω ) := Vin ⋅ H1abs( ω )
v out( ω , t) := Vout( ω ) ⋅ cos ω ⋅ t + phi1( ω )
(
)
7
1.5 .10
ω 1 :=
1
0.5
(
)
vin ω 1 , t
(
)
vout ω 1 , t
0
0.5
1
0
5 .10
8
1 .10
t
7
25
τ
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 8 of 25
deci-Bel
dB( r) := 10 ⋅ log( r
- for power ratios
e.g. Pantenna := 1μW
⎛ Pantenna ⎞
⎟ = −30 dB (dBm)
⎝ Pref ⎠
⎛ Vantenna2 ⎞
⎛ Pantenna ⎞
⎟ = 20 ⋅ log⎛⎜ Vantenna ⎟⎞
dB⎜
= dB⎜
⎟
⎜ V 2 ⎟
⎝ Pref ⎠
⎝ Vref ⎠
⎝ ref ⎠
dB⎜
Pref := 1mW
2
Pantenna =
)
Vantenna
Pref =
Rantenna
Vref
2
Rantenna
dB( r) := 20 ⋅ log( r
- for voltage ratios
)
H1( 2j ⋅ π ⋅ 100 MHz) = 0.025 − 0.155i
e.g.
(
)
dB H1( 2j ⋅ π ⋅ 100 MHz) = −16.072 dB
⎞ = −20
⎟
dB( 1 ) = 0
dB( 10) = 20
dB⎛⎜
dB( 2 ) = 6.021
dB( 0.5) = −6.021
dB( 20) = 26.021
N := 100
i := 0 .. N − 1
1
⎝ 10 ⎠
f := logrange ( 100kHz , 1GHz , N)
0
(
dB H 1( 2j⋅π⋅f i)
)
20
40
5
1 .10
1 .10
1 .10
fi
1 .10
8
1 .10
1 .10
1 .10
fi
1 .10
8
1 .10
6
7
9
0
(
arg H1( 2j⋅π⋅f i)
deg
)
50
1 .10
5
6
7
Construct Bode-plot (single pole) from equation. Pole. 3dB Bandwidth.
Filters
LPF, HPF, BPF, BNF
ideal, practical (approximate shapes)
9
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 9 of 25
Example: PWM DAC
Vdac = Ddac ⋅ Vref
Ddac =
worst case ripple for
v out( t) :=
v 1( t) :=
Vref
2
+
2 ⋅ Vref
π
t1 =
2 ⋅ Vref
π
20
T
(50% duty cycle)
(
Vref := 1V
2
ω 1 := 2 ⋅ π ⋅ 1 MHz
2⋅n+ 1
n=0
⋅ sin ω 1 ⋅ t
(time when Vout = Vref)
t1 = Ddac ⋅ T
256
sin⎡⎣( 2 ⋅ n + 1 ) ⋅ ω 1 ⋅ t⎤⎦
∑
⋅
0 .. 255
)
v 3( t) :=
2 ⋅ Vref
⋅
π
(
sin 3 ⋅ ω 1 ⋅ t
)
3
1
Vref t
⋅
2 t 0.5
vout( t)
v1( t)
0
v3( t)
0.5
2 .10
0
4 .10
7
6 .10
7
8 .10
7
1 .10
7
1.2 .10
6
6
1.4 .10
6
t
Goal: amplitude of ripple < r*Vref
Ripple dominated by v1
r := 10%
A1 :=
Attenuation required
a :=
2 ⋅ Vref
A1
π
Vref
A1
Vref
⋅
= 0.637
< r
dB
1
a = 6.366
r
dB( a) = 16.078
a) graphical solution (from Bode diagram, determine wp = 1/RC from w1 and a)
b) algebraic
(
H j ⋅ ω1
)
=
2
1
(
1 + ω1 ⋅ R ⋅ C
)
=a
RC :=
a −1
2
C := 1nF
ω
R :=
RC = 1.001 μs
RC
C
R = 1.001 kΩ
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
Pole of RC LPF: ω p :=
4/29/2009
1
ωp
RC
2π
uC output:
⎡ 2 ⋅ Vref
v s( t) :=
+ Im⎢
2
⎢ π
⎣
RC LPF:
Hf ( s , f ) :=
Vref
Page 10 of 25
= 159.054 kHz
f :=
ωp
f = 0.159
ω1
⎡ ej⋅( 2⋅n+1)⋅ω 1⋅t⎤ ⎤ ⎤
⎢
⎥⎥⎥
2
⋅
n
+
1
⎣
⎦⎥⎥
⎦⎦
⎡ 20
⋅⎢
⎢
⎣n = 0
∑
1
s
1+
ω1 ⋅ f
j⋅( 2⋅n+ 1)⋅ω 1⋅t ⎤ ⎤
⎡ 2 ⋅ Vref 20 ⎡
e
⎢
⎢
⎥⎥
⋅
v o( t , f ) :=
+ Im
Hf ⎡j ⋅ ( 2 ⋅ n + 1 ) ⋅ ω 1 , f⎤⎦ ⋅
2
⎢ π
2 ⋅ n + 1 ⎦⎥
⎣ ⎣
n=0
⎣
⎦
j⋅( 2⋅n+ 1)⋅ω 1⋅t ⎤ ⎤
⎡⎢ 2Vref ⎡
e
⎢
⎥⎥
v n( t , n ) := Im⎢
⋅ Hf ⎡⎣j ⋅ ( 2 ⋅ n + 1 ) ⋅ ω 1 , f⎤⎦ ⋅
2 ⋅ n + 1 ⎦ ⎥⎦
⎣ π ⎣
Vref
Filter output:
∑
1
vs( t)
vo( t , 1)
vo( t , 0.5)
vo( t , f )
0.5
vn( t , 0)
vn( t , 1)
0
0
2 .10
7
4 .10
7
6 .10
7
8 .10
7
t
1 .10
6
1.2 .10
6
1.4 .10
6
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 11 of 25
Lecture 29: Bode Plot
C1
R2
Vx
+
+
R1
Vin
C2
Vout
-
-
Given
( Vx − Vin) ⋅ s ⋅ C1. +
Vout − Vx
R2
Vx
R1.
+
Vx − Vout
R2
=0
+ Vout ⋅ s ⋅ C2 = 0
(1 + s ⋅ C2 ⋅ R2)
⎡
⎢ s ⋅ C1. ⋅ R1. ⋅ volt ⋅
⎛ s ⋅ C1. ⋅ R1. + s 2 ⋅ C1. ⋅ R1. ⋅ R2 ⋅ C2 + 1 + s ⋅ C2 ⋅ R2 + R1. ⋅ s ⋅ C2⎞
⎢
⎝
⎠
Find( Vx , Vout) → ⎢
volt
⎢ s ⋅ C1. ⋅ R1. ⋅
2
⎢
⎛ s ⋅ C1. ⋅ R1. + s ⋅ C1. ⋅ R1. ⋅ R2 ⋅ C2 + 1 + s ⋅ C2 ⋅ R2 + R1. ⋅ s ⋅ C2⎞
⎣
⎝
⎠
e.g.
f1 := 100Hz
f2 := 10MHz
R1 := 100kΩ
C1 :=
R2 := 1kΩ
C2 :=
ω p1 := 2π ⋅ f1
1
2 ⋅ π ⋅ f1 ⋅ R1
1
2 ⋅ π ⋅ f2 ⋅ R2
C1 = 15.915 nF
C2 = 0.016 nF
Given
1 + s ⋅ ( R1 ⋅ C1 + R1 ⋅ C2 + R2 ⋅ C2) + s ⋅ R1 ⋅ R2 ⋅ C1 ⋅ C2 = 1 +
2
(
)
Find ω p1 , ω p2 =
H( s) =
H( s) :=
⎛ 99.899 + 2.583i × 10− 6 ⎞
⎜
⎟ Hz ⋅ 2π
⎜
⎟
7
1.001 × 10
⎝
⎠
s ⋅ R1 ⋅ C1
⎛1 + s ⎞ ⋅ ⎛1 + s ⎞
⎜
⎟ ⎜
⎟
ω p1 ⎠ ⎝
ω p2 ⎠
⎝
ω p2 := 2π ⋅ f2
s
ω p1
2
+
s
ω p1 ⋅ ω p2
s ⋅ R1 ⋅ C1
=
1+
s
ω p1
2
+
Pole splitting: wp1 << wp2
s
ω p1 ⋅ ω p2
s ⋅ R1 ⋅ C1
1 + s ⋅ ( R1 ⋅ C1 + R1 ⋅ C2 + R2 ⋅ C2) + s ⋅ R1 ⋅ R2 ⋅ C1 ⋅ C2
2
H( s) :=
s ⋅ R1 ⋅ C1
⎛1 + s ⎞ ⋅ ⎛1 + s ⎞
⎜
⎟ ⎜
⎟
ω p1 ⎠ ⎝
ω p2 ⎠
⎝
⎤
⎥
⎥
⎥
⎥
⎥
⎦
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 12 of 25
Bode Plot
N := 200
⎛ f1
⎞
, 100 ⋅ f2 , N⎟
100
⎝
⎠
f := logrange ⎜
i := 1 .. N
3dB bandwidth
0
dB( H ( 2i⋅π⋅f i) ) 20
40
1
10
100
1 .10
1 .10
3
1 .10
4
1 .10
5
6
1 .10
7
1 .10
1 .10
8
9
fi
90
45
arg( H( 2i⋅π⋅f i) )
deg
0
45
90
1
10
100
1 .10
3
1 .10
1 .10
4
5
1 .10
6
1 .10
7
1 .10
fi
Bandpass characteristic:
rejects low and high frequency, passes mid-band
Bode plots capture significant information about behavior of circuit.
Need efficient way to construct and draw them.
Application: Phone
Basspand from 300Hz ... 3kHz
8
1 .10
9
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 13 of 25
Lecture 30: Constructing Bode Plots
Transfer functions:
H( s) =
N( s)
D( s)
Need roots of N (zeros of H) and roots of D (poles of H) for Bode Plot.
Zeros and poles capture many important characteristics of systems
(see other courses).
Then rewrite H(s) with poles and zeros explicitly:
∏
⎛1 − s ⎞
⎜
⎟
zm ⎠
⎝
1. Standard form
m
r
H( s) = K ⋅ s ⋅
zm zeros of H(s)
∏ ⎛⎜⎝ 1 − pn ⎞⎟⎠
s
pn poles of H(s)
n
2. Magnitude response
⎡
⎢
⎢
r
Hm( ω ) = dB( H( j ⋅ ω ) ) = 20 ⋅ log ⎢ K ⋅ s ⋅
⎢
⎢
⎣
Hm( ω ) = 20 ⋅ log( K
∏
m
∏
n
⎛1 − s ⎞ ⎤
⎜
⎟ ⎥
zm ⎠
⎝
⎥
⎥
⎛1 − s ⎞ ⎥
⎜
⎟
pn ⎠ ⎥
⎝
⎦
s=j⋅ω
)
+ 20 ⋅ r ⋅ log( ω )
+ 20 ⋅
m
− 20 ⋅
⎛
ω
⎞
⎛
ω
⎞
⎟
⎠
∑ log⎜⎝ 1 + j ⋅ zm ⎟⎠
∑ log⎜⎝ 1 + j ⋅ zn
n
sum individual terms
(thanks to log!)
3. Phase response
φ( ω ) = 0 + ( r ⋅ 90deg) +
⎛
ω
⎞
⎛
ω
∑ φ⎜⎝ 1 − j ⋅ zm ⎟⎠ − ∑ φ⎜⎝ 1 − j ⋅ pn
m
n
⎞
⎟
⎠
sum individual terms
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
Example 1:
H( s) =
4/29/2009
R := 10kΩ
1
1 + s⋅R⋅C
C := 1pF
K
=
1−
Page 14 of 25
p 1 := −
K=1
s
1
f1 :=
R⋅C
p1
2⋅π
4
f1 = 1.592 × 10 kHz
p1
⎛
⎝
Hm( ω ) := −20 log⎜ 1 − j ⋅
Magnitude response:
for ω<<p1:
Hm_low( ω ) := 0
for ω>>p1:
Hm_high( ω ) := −20 log⎜
at ω=p1:
Hm( p 1) = −3.01
⎡⎢
⎢⎣
⎞
⎟
p1 ⎠
ω
Hm( ω ) := −10 ⋅ log 1 +
⎛ω⎞
⎜p ⎟
⎝ 1⎠
2⎤
⎥
⎥⎦
⎛ω⎞
⎟
⎝ p1 ⎠
N := 200
⎛ f1
⎞
, 1000 ⋅ f1 , N⎟
1000
⎝
⎠
f := logrange ⎜
i := 1 .. N
20
3-dB frequency f 3dB
0
Hm_low( 2⋅π⋅f i)
20
Hm_high ( 2⋅π⋅f i)
Hm( 2⋅π⋅f i)
40
20dB per decade rolloff
60
80
4
1 .10
1 .10
5
1 .10
6
1 .10
1 .10
7
8
1 .10
9
1 .10
fi
Straight line approximation: lines intersect at p1/2π
10
1 .10
11
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
⎛
⎝
φ( ω ) := −arg⎜ 1 −
Phase response:
Page 15 of 25
j ⋅ω⎞
⎛ω⎞
⎟
⎝ p1 ⎠
φ( ω ) := atan⎜
⎟
p1 ⎠
0
15
30
φ ( 2⋅π⋅f i)
45
deg
60
75
90
4
1 .10
1 .10
1 .10
5
6
1 .10
1 .10
7
1 .10
8
1 .10
9
1 .10
10
11
fi
Straight line approximation: 90 deg over 2 decades, -45 deg @ f 1
Example 2:
H( s) :=
K
K := 2 ⋅ π ⋅ 100 Hz
s
Hm( ω ) :=
K
ω
N := 200
i := 1 .. N
f := logrange ( 1Hz , 100kHz , N)
40
20
)
0
arg( H( 2i⋅π⋅f i) )
20
(
dB H m( 2⋅π⋅f i)
deg
40
60
80
100
1
10
1 .10
3
100
fi
1 .10
4
1 .10
5
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
Example 3:
4/29/2009
Page 16 of 25
s ⋅ R1 ⋅ C1
H( s) :=
1 + s ⋅ ( R1 ⋅ C1 + R1 ⋅ C2 + R2 ⋅ C2) + s ⋅ R1 ⋅ R2 ⋅ C1 ⋅ C2
2
Find roots of denominator:
C1
1 + s ⋅ ( R1 ⋅ C1 + R1 ⋅ C2 + R2 ⋅ C2) + s ⋅ R1 ⋅ R2 ⋅ C1 ⋅ C2 = 0
2
R2
Vx
+
+
Vin
R1
C2
-
a = 2.533 × 10
b := R1 ⋅ C1 + R1 ⋅ C2 + R2 ⋅ C2
b = 1.593 × 10
p 1 :=
p 2 :=
−b +
2
b − 4⋅a
f1 :=
2⋅a
−b −
-
− 11 2
a := R1 ⋅ R2 ⋅ C1 ⋅ C2
2
b − 4⋅a
f2 :=
2⋅a
s
−3
p1
s
f1 = 99.9 Hz
2⋅π
p2
f2 = 10.01 MHz
2⋅π
check roots:
D( s) := 1 + s ⋅ ( R1 ⋅ C1 + R1 ⋅ C2 + R2 ⋅ C2) + s ⋅ R1 ⋅ R2 ⋅ C1 ⋅ C2
2
− 12
D( p 1) = 1.694 × 10
should be (nearly) zero
− 11
D( p 2) = −2.91 × 10
standard form:
H( s) := R1 ⋅ C1 ⋅ s ⋅
1
⋅
2 ⋅ π ⋅ R1 ⋅ C1
r=1
⎛1 − s ⎞ ⎛1 − s ⎞
⎜
⎟ ⎜
⎟
p1 ⎠ ⎝
p2 ⎠
⎝
H1( s) := s ⋅ R1 ⋅ C1
1
1
K = R1 ⋅ C1
H2( s) :=
= 100 Hz
N := 3000
1
H3( s) :=
⎛1 − s ⎞
⎜
⎟
p1 ⎠
⎝
i := 1 .. N
Vout
1
⎛1 − s ⎞
⎜
⎟
p2 ⎠
⎝
⎛ f1
⎞
, 900 ⋅ f2 , N⎟
⎝ 100
⎠
f := logrange ⎜
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 17 of 25
40
20
(
)
dB( H 2( 2i⋅π⋅f i) )
dB( H 3( 2i⋅π⋅f i) )
dB H 1( 2i⋅π⋅f i)
0
20
dB( H ( 2i⋅π⋅f i) )
40
60
80
1
10
100
1 .10
1 .10
4
1 .10
fi
1 .10
6
1 .10
1 .10
1 .10
9
1 .10
1
10
100
1 .10
1 .10
4
1 .10
fi
1 .10
6
1 .10
1 .10
1 .10
9
1 .10
3
5
7
8
10
180
120
(
arg H1( 2i⋅π⋅f i)
)
deg
(
arg H2( 2i⋅π⋅f i)
)
60
)
0
deg
(
arg H3( 2i⋅π⋅f i)
deg
arg( H( 2i⋅π⋅f i) )
60
deg
120
180
3
5
7
8
10
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 18 of 25
Lecture 31: Power
Resistive load
V1 := 1V
f1 := 60Hz
(
v 1( t) := V1 ⋅ cos ω 1 ⋅ t
ω 1 := 2π ⋅ f1
)
v 1( t )
p 1( t) :=
R1 := 1Ω
T1 :=
2
1
f1
R1
1
v1( t)
0
p1( t)
1
0
0.01
0.02
0.03
t
⌠
Prms =
⋅⎮
T1 ⌡
1
T1
0
⌠
1 ⎮
⋅⎮
p 1( t) dt =
T1 ⎮
⌡
T1
( v 1( t ) ) 2
R1
2
dt =
Vrms
R1
0
Vrms =
⌠
⋅⎮
T ⌡
T
1
(V1 ⋅ cos(ω ⋅ t))2 dt =
0
V1
Vrms :=
2
V1
2
2
Prms :=
farad
ω1
i1( t) := C1 ⋅
d
v 1( t )
dt
p 1( t) := v 1( t) ⋅ i1( t)
2
v1( t)
i1( t)
1
0
p1( t)
1
2
0
0.005
R1
Prms = 0.5 W
Capacitive Load
C1 :=
Vrms
0.01
0.015
0.02
t
0.025
0.03
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 19 of 25
Power Analysis
V1 := 1V
I1 := 0.7A
(
v 1( t) := V1 ⋅ cos ω 1 ⋅ t
Phase:
φ1 := 70deg
)
(
φ1 = Δφ = φv − φi
)
i1( t) := I1 ⋅ cos ω 1 ⋅ t − φ1
(
)
(
p 1a( t) := V1 ⋅ I1 ⋅ cos ω 1 ⋅ t − φ1 ⋅ cos ω 1 ⋅ t
)
after some work ...
p 1b( t) :=
V1 ⋅ I1
2
( ) (
(
⋅ ⎡⎣cos φ1 ⋅ 1 + cos 2 ⋅ ω 1 ⋅ t
)) + sin(φ1) ⋅ sin(2ω 1 ⋅ t)⎤⎦
1
0.5
v1( t)
i1( t)
0
p1b( t)
0.5
1
0
0.005
0.01
0.015
0.02
0.025
0.03
t
Nomenclature
Average (real) power:
Reactive power:
(
P1 :=
Q1 :=
(
p 1( t) := P1 ⋅ 1 + cos 2 ⋅ ω 1 ⋅ t
V1 ⋅ I1
2
V1 ⋅ I1
2
( )
power factor
⋅ cos φ1
( )
( )
pf := cos φ1
( )
⋅ sin φ1
rf := sin φ1
pf
)) + Q1 ⋅ sin(2 ⋅ ω 1 ⋅ t)
2
+ rf
2
=1
a) Purely resistive circuits
φ1 := 0deg
P1 :=
V1 ⋅ I1
2
[W]
Q1 = 0
P1 = 350 mW
Actually dissipated in load (has a 2w1 ripple on top of average).
b) Purely reactive circuits
φ1 := 90deg
P1 = 0
Q1 :=
V1 ⋅ I1
2
[VAR]
Q1 = 350 mW
Average is zero. Only heats wires (which add a resistive component).
pf = 0.342
rf = 0.94
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 20 of 25
Complex Power
Efficient way to calculate P & Q.
Complex power:
[VA]
S=P+ j⋅Q
Apparent power:
2
2
[VA]
P +Q
S =
Power handling capacity of distribution network (e.g. power cord).
... some math ...
S( s) =
1
2
⎯
⋅ V( s) ⋅ I( s)
(complex conjugate of current)
Example 1: computer supply R // C
V1 := 110V ⋅ 2
V1 = 155.563 V
f1 := 60Hz
R1 := 1kΩ
C1 := 20μF
Z1( s) :=
V1( s) := V1
I1( s) :=
V1( s)
ω 1 := 2 ⋅ π ⋅ f1
R1
1 + s ⋅ R1 ⋅ C1
drops at high freq!!!
increases at high frequency!
Z1( s)
⎯
1
S1( s) := ⋅ V1( s) ⋅ I1( s)
2
S1( 0Hz) = 12.1 W
(
only resistive part matters
(
)
( (
Re S1 j ⋅ ω 1
(
V1 j ⋅ ω 1
)
= 92.031 VA
)) = 12.1 W
= 155.563 V
mVA := mW
kVA := kW
)
S1 j ⋅ ω 1 = 12.1 − 91.232i VA
S1 j ⋅ ω 1
VA := W
VAR := W
(!!!)
( (
Im S1 j ⋅ ω 1
(
I1 j ⋅ ω 1
Current dominated by reactive part
)
)) = −91.232 VAR
= 1.183 A
(!!!)
V1( 0Hz)
R1
= 155.563 mA
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 21 of 25
Example 2: loudspeaker with(out) series capacitor
Vdc := 5V
L1 :=
V1 := 2V
8Ω
L1 = 2.894 mH
ω1
Z1( s) := R1 + s ⋅ L1
I1( s) :=
ω 1 := 2π ⋅ f1
R1 := 1Ω
V1
S1( s) :=
Z1( s)
1
2
⎯
⋅ V1 ⋅ I1( s)
just heats speaker! (nobody can hear DC)
S1( 0Hz) = 2 VA
(
f1 := 440Hz
)
S1 j ⋅ ω 1 = 30.769 + 246.154i mVA audio power is much smaller (than heat)
with series capacitor:
Z1c( s) := R1 + s ⋅ L1 +
(
− 20
(
)
S1c j ⋅ 10
)
1
s ⋅ C1
⋅ Hz = 0 VA
C1 := 5mF
I1c( s) :=
V1
S1c( s) :=
Z1c( s)
1
2
⎯
⋅ V1 ⋅ I1c( s)
no heat (DC term)
S1c j ⋅ ω 1 = 31.325 + 248.33i mVA same as w/o C1!
N := 300
i := 1 .. N
f := logrange ( 10Hz , 1kHz , N)
100
Z1( 2j⋅π⋅f i)
Z1c( 2j⋅π⋅f i)
10
1
10
100
1 .10
3
fi
10
S 1( 2j⋅π⋅f i)
S 1c( 2j⋅π⋅f i)
1
0.1
10
100
fi
1 .10
3
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 22 of 25
Example 3: correcting the power factor (zero reactive power)
V1 :=
2 ⋅ 110 V
Inductive load
ω 1 := 2π ⋅ 60Hz
ZL := 40Ω + j ⋅ 20Ω
2
without correction:
V1
Sa := ⎯
ZL
Ia :=
with correction:
Sa = 484 + 242i VA
V1
Ia = 3.111 − 1.556i A Ia = 3.479 A
ZL
Yc := −Im⎛⎜
1
⎞
⎟
⎝ ZL ⎠
Ztot :=
ZL ⋅ Zc
ZL + Zc
2
V1
Sb := ⎯
Ztot
Zc :=
1
Yc ⋅ j
Ztot = 50 Ω
Sb = 484 VA
Example 4:
voltage drop in inductive power supply wiring
(model current as sinusoid at fs)
Zc = −100i Ω
capacitor!
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 23 of 25
Lecture 32: Finite Opamp Bandwidth
Model:
ωb
a( s) =
(
a j ⋅ ωb
s
)
=1
like ideal opamp
Note: can model finite gain and bw simultaneously
- more complicated math
- rather use superposition for small errors (system linear)
a( 0 ) = ∞
Given
Vx − V1.
R1.
V2 = −
A( s) =
V2( s)
V1( s)
A( s) = −
R2
R1
=
s ⋅ ( R 1 + R 2) + R 1 ⋅ ω b
1
A( s , Ao , fp) :=
1+
s
ωb
R1 + R2
1
= −Ao ⋅
R1
−Ao
1 + s⋅
N := 300
⋅
s
Vx − V2
R2.
=0
⋅ Vx
V1.
⎡
⎤
⎢ −ω b ⋅ R2. ⋅ R ⋅ s + s ⋅ R + ω ⋅ R ⎥
( 2.
1.
b
1.) ⎥
Find( V2 , Vx) → ⎢
⎢
⎥
s
⎢ R2. ⋅ V1. ⋅
(R2. ⋅ s + s ⋅ R1. + ω b ⋅ R1.) ⎥⎦
⎣
−ω b ⋅ R2
⋅
ωb
+
1+
s
ωb
⋅ ( 1 + Ao)
−Ao
=
s
1+
ωb
ωp =
1 + Ao
ωp
dB( A( 2j ⋅ π ⋅ 100 kHz , 10 , 1MHz) ) = 16.556
Ao + 1
dB
2 ⋅ π ⋅ fp
i := 1 .. N
f := logrange ( 10Hz , 10MHz , N)
40
dB( A ( 2j⋅π⋅f i , 10 , 1MHz ) )
20
dB( A ( 2j⋅π⋅f i , 1 , 1MHz ) )
dB( A ( 2j⋅π⋅f i , 100 , 1MHz ) )
0
20
3
1 .10
1 .10
4
1 .10
fi
5
1 .10
6
1 .10
7
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
Page 24 of 25
Lecture 33: Electronic Noise
Digital: finite # bits limits resolution
Analog: many errors, interference etc --> shield or use other methods to reduce
ultimate: finite charge of electrons
Lecture 34: Filters
Example: Sampling
1
0.8
0.6
Amplitude [V]
0.4
0.2
0
-0.2
-0.4
-0.6
-0.8
-1
0
1
2
3
4
Time [s]
5
6
7
8
-4
x 10
Show spectrum of input signal and alias.
Sampling theorem: frequencies > fs/2 alias --> filter out!
fs := 44.1kHz
H( s) :=
B := 20kHz
1
1+
s
ωp
⎛
⎝
H⎜ 2j ⋅ π ⋅
ω p := 2 ⋅ π ⋅ B
fs ⎞
⎟ = 0.672
2⎠
3dB bandwidth
⎛ ⎛
⎝ ⎝
dB⎜ H⎜ 2j ⋅ π ⋅
fs ⎞ ⎞
⎟ ⎟ = −3.455
2 ⎠⎠
C:\Users\Bernhard Boser\Documents
\Files\Class\40\lecture\4 Freq
4/29/2009
http://www.maxim-ic.com/appnotes.cfm/an_pk/1762
Sallen Key:
H( s) =
1
1 + s ⋅ τ + (s ⋅ τ )
2
Given
(
1 + s⋅τ + s⋅τ
)2 = 0
⎡ ⎛ −1 + 1 ⋅ i ⋅ 3⎞ ⎛ −1 − 1 ⋅ i ⋅ 3⎞ ⎤
⎟ ⎜
⎟⎥
⎢ ⎜⎝ 2
2
2
⎠ ⎝2
⎠
Find( s) → ⎢
⎥
τ
τ
⎣
⎦
Page 25 of 25
see also MAX 274/5
Download