EE40 Summer 2010
EE40
Lecture 11
Josh Hug
7/19/2010
Hug 1
Logistical Things
• Lab 4 tomorrow
• Lab 5 (active filter lab) on Wednesday
– Prototype for future lab for EE40
– Prelab is very short, sorry.
– Please give us our feedback
– Google docs for labs and general class comments now available (link shared via email)
– Bring a music player if you have one (if not, you can use the signal generator in the lab)
• HW5 due tomorrow at 2PM
• HW6 due Friday at 5PM (also short)
• Midterm next Wednesday 7/28
– Focus is heavily on HW4, 5, 6, and Labs P1, 4, 5
– Will reuse concepts from HW 1,2,3
Hug EE40 Summer 2010
2
Logistics
• No lunch today
• Slightly shorter lecture today
• Midterm regrade requests due today
• Office hours Cory 240 2:30-4PM or so
EE40 Summer 2010 Hug 3
iClicker Question #1
• Consider a capacitor with a capacitance of
1ππΉ . Total resistance of circuit is small ~1Ω .
• If we compile an I-V table in lab with a voltage source and multimeter by:
– Applying a set of test voltages
– Measuring current through the capacitor for each source
• What I-V characteristic will we get?
– A. Horizontal line at I=0
– B. Vertical line at I=0
– C. Line of slope 1/RC
– D. Horizontal line at I=V/1Ω
– E. Something else
Hug 4
EE40 Summer 2010
iClicker Question #2
• Consider an inductor with an inductance of
1μ H. Total resistance of circuit is small ~1Ω .
• If we compile an I-V table in lab with a voltage source and multimeter by:
– Applying a set of test voltages
– Measuring current through the inductor for each source
• What I-V characteristic will we get?
– A. Horizontal line at I=0
– B. Vertical line at I=0
– C. Line of slope R/L
– D. Line at I=V/1Ω
– E. Something else
Hug 5
EE40 Summer 2010
Easy Method for AC Circuits
• We want to find the voltage across the capacitor for the following circuit
• Homogenous solution is easy, since source is irrelevant
• Finding particular solution the usual way
(plugging in a guess, finding coefficients that cancel) is painful
Hug 6
EE40 Summer 2010
Easy Method for AC Circuits π£ π
= π π π ππ€π‘
Guess π£ ππ
= π΄πππ π
1 π‘ + π
Plug into ODE
Solve for A and π (hard) π£ ππ
= π΄πππ π
1 π‘ + π
EE40 Summer 2010
Guess π ππ
= π
1 π πππ‘
Plug into ODE
Divide by π πππ‘
. Now π‘ is gone
Solve for π
1
(easy) π£ ππ
= π πππ[π
1 π πππ‘ ]
Hug 7
Memory Circuits with Exponential Source
π π£
πΌ
′
π
= π π π ππ€π‘
= −
π
π
π πΆ π‘ > 0
+ π π π πππ‘
π πΆ
• Homogeneous solution is just π΄π −π‘/π πΆ
• Pick particular solution π
π πππ‘
π,π π
1 πππ πππ‘ = −π
1
+ π π
π πΆ
= π π πππ‘
1
π πΆ π ππ€π‘
, plug in:
• Divide by π ππ€π‘
, and solve for k
1 π
1
1
= π π
1 + πππ πΆ
EE40 Summer 2010
π
π,π π‘ = π π
1
1 + πππ πΆ π ππ€π‘
Real part of π
π,π gives solution for cosine source
Hug 8
Inverse Superposition
• Superposition tells us that our output π
π,π π‘ be the sum of the effect of these two sources will just
π
π,π
1 π‘ = π π
1 + πππ πΆ π ππ€π‘
• Luckily for us, all complex numbers are the sum of their real and imaginary parts x = π + ππ
• Just find real part and we’re done!
Hug 9
EE40 Summer 2010
Real Part of Expression
• Finding the real part of the expression is easy, it just involves some old school math that you’ve probably forgotten (HW5 has complex number exercises)
π
π,π π‘ =
1
1 + πππ πΆ
π π π ππ€π‘
• Key thing to remember is that complex numbers have two representations
– Rectangular form: π + ππ
– Polar form: ππ ππ π = π 2 + π 2 π π = arctan π
EE40 Summer 2010 Hug 10
Real Part of Expression
• What we have is basically the product of two complex numbers
• Let’s convert the left one to polar form
π
π,π π‘ =
1
1 + πππ πΆ
π π π ππ€π‘
– Rectangular form: π + ππ
– Polar form: ππ ππ
π
π,π π‘ =
1
π π ππ
π π π ππ€π‘ = π π π = π 2 + π 2 π π = arctan π
1
1 + π€π πΆ 2 π ππ π ππ€π‘ π = arctan(ππ πΆ)
Hug EE40 Summer 2010
11
Real Part of Expression
π π
π π
π π
1
1 + π€π πΆ 2 π ππ π ππ€π‘
1
1 + π€π πΆ 2 π π(π+ππ‘)
1
1 + π€π πΆ 2
(cos ππ‘ + π + ππ ππ(ππ‘ + π))
EE40 Summer 2010 Hug 12
Real Part of Expression
1
π π
1 + π€π πΆ 2 π ππ π ππ€π‘
• Superposition tells us that our output π
π,π π‘ be the sum of the effect of these two sources will just
π
π,π π‘ =
π π
1 + π€π πΆ 2
(cos ππ‘ + π + ππ ππ(ππ‘ + π))
• Thus, particular solution (forced response) of
π original cosine source is just the real part
π,π
EE40 Summer 2010 π‘ =
π π
1 + ππ πΆ 2 cos ππ‘ + π π = arctan(ππ πΆ)
Hug 13
π£ π
= π π π ππ€π‘
Easy Method for AC Circuits
Just as actually writing the ODE isn’t necessary for DC sources, we can avoid the ODE again in
AC circuits:
Impedance Analysis
Write ODE
Guess π ππ
= π
1 π πππ‘
Plug into ODE
Divide by π πππ‘
. Now π‘ is gone
Solve for π
1
(easy) π£ ππ
= π πππ[π
1 π πππ‘ ]
Hug 14
EE40 Summer 2010
Impedance π£
πΌ
= π π π πππ‘ π‘ > 0
For a complex exponential source:
1
π
πΆ,π π‘ =
1 + πππ πΆ π£
πΌ
(π‘)
Rewrite as:
π
πΆ,π π‘ =
1/ππ€πΆ
1/ππ€πΆ + π π£
πΌ
(π‘)
Let π π
= 1/ππ€πΆ
π
πΆ,π π‘ =
π π
π π
+ π π£
πΌ
(π‘)
Looks a lot like… voltage divider
Real part gives solution for π£
πΌ
= π π cos(ππ‘)
15
EE40 Summer 2010 Hug
Method of Impedance Analysis (without Phasors)
• Replace passive components with equivalent impedance, π π
=
1 πππΆ
, π
πΏ
= πππΏ , π
π
= π
• Replace all sources with complex exponentials
• e.g. π£ π‘ = π΄ cos ππ‘ + π βΉ π(π€π‘+π)
• Solve using Ohm’s Law of Impedances for complex exponential sources
– Just like normal node voltage, but with complex numbers
– Real part of node voltage π π π‘ gives true output
π π π‘
Lugging these complex exponential functions is algebraically annoying
Hug EE40 Summer 2010
16
Phasors (not in the book!)
• Definition: A phasor is a complex number which represents a sinusoid
• π π‘ = π΄πππ ππ‘ + π
• Three parameters
– A: Magnitude
– π : Frequency
– π: Phase
• The phasor representation of the sinusoid above is π΄π ππ
• In shorthand we write phasor as π΄∠π
Hug EE40 Summer 2010
17
Phasors
• If we have a voltage π π‘ = π΄πππ ππ‘ + π
• The phasor version of the voltage is
π = π΄∠π
• If we have a phasor πΌ
= πΌ∠π , the time function this phasor represents is π π‘ = πΌcos(ππ‘ + π)
EE40 Summer 2010 Hug 18
Why are phasors useful?
• Sources that look like π΄π π‘(ππ+π) result in lots of π΄π π‘(ππ€+π) terms in our algebra
• When you apply a sinusoidal source to a circuit, the amplitude and phase will vary across components, but it will always still be πΌπ π‘(ππ+π)
– Important: π doesn’t change!
• Otherwise we’d need REALLY complex numbers
• Thus, we’ll just replace our sources with a complex number π΄∠π and just keep in mind that this number represents a function throughout
Hug 19
EE40 Summer 2010
Why are phasors useful?
• We know that for complex exponential sources, we have that:
– ππππ = ππππ[ π π‘ π]
• Phasors are complex numbers π and
πΌ which represent cosine functions π£ π‘ and π(π‘)
• Cosine functions are just the real parts of complex exponentials
• Thus, in the world of phasors, we can just rewrite Ohm’s Law of Impedances as:
– = πΌπ
EE40 Summer 2010 Hug 20
Method of Impedance Analysis (with Phasors)
• Replace passive components with equivalent
1 impedance, π π
= πππΆ
, π
πΏ
= πππΏ , π
π
= π
• Replace all sources with phasor representation: e.g. π£ π‘ = π΄ cos ππ‘ + π βΉ
• Solve using Ohm’s Law of Impedances:
– Just like normal node voltage, but with complex numbers, attaining voltage phasors π π
, π π
, …
– Output π π
(π‘) is just | π
π π
)
• Original sources are implicitly represented by phasors
– Time is gone completely from our problem
Hug EE40 Summer 2010
21
Example π£
πΌ
= π π πππ ππ‘ ,
π = 10,000Ω
πΆ = 1ππΉ
π π
= 5π π = 100
• π
π
= 10000 , π
πΆ
1
= πππΆ
= −10000π
π = π π
∠0 = 5∠0
• π ππ
= 10000 − 10000π
5∠0
• πΌ =
10000−10000π π‘ > 0
Find π(π‘) in steady state
Hug EE40 Summer 2010
22
Example π£
πΌ
= π π πππ ππ‘ ,
π = 10,000Ω
πΆ = 1ππΉ
π π
= 5π π = 100 π‘ > 0
Find π(π‘) in steady state
5∠0
• πΌ =
10000−10000π
• Polar divided by non polar, so convert bottom to polar
• 10000 − 10000π = 10000 2∠
−π
4
Hug 23
EE40 Summer 2010
Example π£
πΌ
= π π πππ ππ‘ ,
π = 10,000Ω
πΆ = 1ππΉ
π π
= 5π π = 100
5∠0
• πΌ =
10000−10000π
• 10000 − 10000π = 10000 2∠
−π
4
• So πΌ = 5∠0
10000 2∠
−π
4
=
1
2000 2
∠ π
4 π‘ > 0
Find π(π‘) in steady state
Hug 24
EE40 Summer 2010
Example π£
πΌ
= π π πππ ππ‘ ,
π = 10,000Ω
πΆ = 1ππΉ
π π
= 5π π = 100 π‘ > 0
Find π(π‘) in steady state
• πΌ =
1
2000 2
∠ π
4
• π π‘ =
1
2000 2 cos(100π‘ + π
) [in steady state]
4
Hug 25
EE40 Summer 2010
EE40 Summer 2010
Example π£
πΌ
= π π πππ ππ‘ , π‘ > 0 π π‘ =
1
2000 2 cos(100π‘ + π
)
4
• Current has same shape as voltage
• Current is 10000 2 times smaller than source voltage
• Current leads source voltage by π
4 radians or π seconds
400
Hug 26 Not to scale
• On board
Harder Example
EE40 Summer 2010 Hug 27
Filters
• Often, we’ll want to build circuits which react differently based on different signal frequencies, e.g.
– Splitting audio signals into low and high portions (for delivery to tweeter and subwoofer)
– Removing noise of a particular frequency (e.g.
60 Hz noise or vuvuzela sound)
– Removing signals except those at a certain frequency
Hug 28
EE40 Summer 2010
Example Filter π£
πΌ
= π π πππ ππ‘ ,
π = 10,000Ω
πΆ = 1ππΉ
π π
= 5π π‘ > 0
Find v c
(π‘) in steady state
π
πΆ
π
πΆ
=
π
πΆ
π
πΆ
+π
π
π
πΌ
=
−10
6 π/π
−10 6 π/π€+10 5
π
πΌ
π
πΆ
= −10 6 π/π
π
π
= 10 5
π
πΆ
=
1
1+0.1ππ€
π
πΌ
- Transfer Function π―(ππ)
EE40 Summer 2010 Hug 29
Transfer Functions
π
πΆ
=
1
1+0.1ππ€
π
πΌ
= π»(ππ) π
πΌ
• Maps system input signal to system output signal
– Plug an input voltage A cos ππ‘ + π into π
πΌ
– Get an output voltage π΄ π» ππ cos ππ‘ + π +
Hug 30
EE40 Summer 2010
Using a Transfer Function
π
πΆ
=
1
1+0.1ππ€
π
πΌ
= π»(ππ) π
πΌ
• Suppose π£ π
π
πΌ
= 3∠ π
4
(π‘) is 3 cos(50π‘ + π
)
4
|π» π50 | = 1/ 26
∠π» π50 = −π΄πππππ[5/1]
– π» π50 =
1
1+5π
= −1.37
• Output phasor π
πΆ
π
πΆ
= is just π
πΌ
3
26
∠( π
4
− 1.37
)
× π» π50
– π£ π π‘ =
3
26 cos(50π‘ + π
4
− 1.37
)
Hug 31
EE40 Summer 2010
Using a Transfer Function (general)
π
πΆ
=
1
1+0.1ππ€
π
πΌ
= π»(ππ) π
πΌ
• Suppose π£ π
π
πΌ
= 3∠ π
4
(π‘) is 3 cos(ππ‘ + π
)
4
|π» ππ€ | = 1/ 1 + 0.01π 2
∠π» ππ = −π΄πππππ[0.1π/1]
– π» ππ€ =
1
1+0.1ππ
• Output phasor π
πΆ is just π
πΌ
× π» π50
π
πΆ
– π£ π
=
3
1+0.01π 2
∠( π
4
− π΄πππππ π‘ =
0.1π
1
)
3
1+0.01π 2 cos(50π‘ + π
4
− π΄πππππ[
0.1π
1
] )
Hug 32
EE40 Summer 2010
Bode Magnitude Plot
π
πΆ
=
1
1+0.1ππ€
π
πΌ
= π»(ππ) π
πΌ
|π» ππ | = 1/ 1 + 0.01π 2
• Magnitude plot is just a plot of |π» ππ | as a function of π
EE40 Summer 2010
Linear Scale Log Scale
Hug 33
Bode Magnitude Plot in Context of Circuit π£
πΌ
= π π πππ ππ‘ ,
π
πΆ
=
π = 10,000Ω
πΆ = 1ππΉ
π π
= 5π
1
1 + 0.1ππ€
π
πΌ
= π»(ππ) π
πΌ π‘ > 0
|π» ππ | = 1/ 1 + 0.01π 2
All frequencies below π€ π
= 10 through pretty well. Above, that get increasingly attenuated
Hug 34
EE40 Summer 2010
Bode Phase Plot
π
πΆ
=
1
1+0.1ππ€
π
πΌ
= π»(ππ) π
πΌ
∠π» ππ = −π΄πππππ[0.1π/1]
• Phase plot is just a plot of ∠π» ππ as a function of π
EE40 Summer 2010
Linear Scale Semilog Scale
Hug 35
Bode Phase Plot in Context of Circuit π£
πΌ
= π π πππ ππ‘ ,
π
πΆ
=
π = 10,000Ω
πΆ = 1ππΉ
π π
= 5π
1
1 + 0.1ππ€
π
πΌ
= π»(ππ) π
πΌ π‘ > 0
∠π» ππ = −π΄πππππ[0.1π/1]
All frequencies below π€ π
= 10 move in time with the source, above that, π£ π gets out of phase
Hug 36
EE40 Summer 2010
Frequency vs. Time Domain
• Almost always, our signals consist of multiple frequencies
• Examples:
– Sound made when you press a buttons on a phone is two pure sine waves added together
(DTMF)
– Antennas on radio theoretically pick up ALL frequencies of ALL transmissions
• Using a technique known as the Fourier
Transform, we can convert any signal into a sum of sinusoids
– See EE20 for more details
Hug EE40 Summer 2010
37
Fourier Transform Example
• If someone whistles a signal that is approximately sin(3000π‘) , and we apply the Fourier Transform, then:
EE40 Summer 2010 Hug 38
Fourier Transform Example
• The 1 button on a phone is just π£ π‘ = sin
697
2π π‘ + sin(
1209
2π π‘)
EE40 Summer 2010 Hug 39
Fourier Transform Example
• If we apply a filter with the frequency response on the left to the signal on the right
Then we’ll get:
EE40 Summer 2010 Hug 40
Types of Filters
• Passive Filters
– Filters with no sources (i.e. just R, L, and C)
– Don’t require power source
– Scale to larger signals (no op-amp saturation)
– Cheap
• Active Filters
– Filters with active elements, e.g. op-amps
– More complex transfer function
• No need for inductors (can be large and expensive, hard to make in integrated circuits)
• More easily tunable
– Response more independent of load (buffering)
Hug EE40 Summer 2010
41
• On board
Filter Examples
EE40 Summer 2010 Hug 42
Manually Plotting
• In this day and age, it is rarely necessary to make our Bode plots manually
• However, learning how to do this will build your intuition for what a transfer function means
• Manual plotting of bode plots is essentially a set of tricks for manually plotting curves on a loglog axis
• We will only teach a subset of the full method (see EE20 for a more thorough treatment)
Hug 43
EE40 Summer 2010
Example Filter π£
πΌ
= π π πππ ππ‘ ,
π = 10,000Ω
πΆ = 1ππΉ
π π
= 5π
π
πΆ
=
1
1+0.1ππ€
π
πΌ
1
π
πΆ
=
1+0.01π 2 ∠π΄πππππ[0.1π]
π
πΌ
π
πΆ
1
=
1+0.01π 2
• Intuitive plot on board
π
πΌ
• More thorough algorithm next time π‘ > 0
Find v c
(π‘) in steady state
Hug 44
EE40 Summer 2010
Extra Slides
EE40 Summer 2010 Hug 45
Why do equivalent Impedances work?
• Components with memory just integrate or take the derivative of π π
1 π‘
, giving scaled versions of the same function
– This is unlike forcing functions like π‘ 3 or cos(ππ‘)
– This allows us to divide by the source, eliminating π‘ from the problem completely
– Left with an algebra problem
– [For those of you who have done integral transforms, this whole process can be thought of as just using Laplace/Fourier transforms]
Hug 46
EE40 Summer 2010