17
1 EE 215 Fundamentals of Electrical Engineering Lecture Notes First Order Circuits 8/8/01 Rich Christie Overview: Circuits with one capacitor or one inductor are called first order circuits, because they give rise to first order linear differential equations. Engineers have a love/hate relationship with differential equations. They describe the things we do engineering with, like circuits, so we need to understand them and obtain solutions. But we are not math majors! All we want is a solution! We don't care whether a solution exists if we can't figure out what it is! We don't care that there are eight different ways to solve a differential equation, we just want one way that works! On the other hand, we DO care about what is going on in the physical object that the equation describes. Math majors could care less about the real world. (OK, OK, this is harsh on math majors…) So what we'll do with first order circuits is first write the circuit equations from the circuit. Then we'll solve them formally, just once to prove we can do it. Then we'll develop a short cut so that all we have to do is write the form of the solution and fill in some numbers from looking at the circuit. And that's the method you really use to solve first order circuits. Formal Solution: Here's a circuit with a capacitor and a resistor. The typical problem here is a switch closure problem. The circuit sits for a long time before t = 0. At t = 0, a switch is closed. The voltages and currents in the circuit change over time. We want to know what the voltage v(t) and current i(t) look like from time t = 0 to t = . Note that there are actually two different circuits here: The one with the switch open, which is around before t = 0, and the one with the switch closed. Let's start by considering the circuit before t = 0. There is clearly no current, but what about capacitor voltage? Well, it could be anything, really, in this case, so the problem + - v R t=0 C v s + - i

EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

Embed Size (px)

Citation preview

Page 1: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

1

EE 215 Fundamentals of Electrical Engineering Lecture Notes

First Order Circuits 8/8/01

Rich Christie

Overview: Circuits with one capacitor or one inductor are called first order circuits, because they give rise to first order linear differential equations. Engineers have a love/hate relationship with differential equations. They describe the things we do engineering with, like circuits, so we need to understand them and obtain solutions. But we are not math majors! All we want is a solution! We don't care whether a solution exists if we can't figure out what it is! We don't care that there are eight different ways to solve a differential equation, we just want one way that works! On the other hand, we DO care about what is going on in the physical object that the equation describes. Math majors could care less about the real world. (OK, OK, this is harsh on math majors…) So what we'll do with first order circuits is first write the circuit equations from the circuit. Then we'll solve them formally, just once to prove we can do it. Then we'll develop a short cut so that all we have to do is write the form of the solution and fill in some numbers from looking at the circuit. And that's the method you really use to solve first order circuits. Formal Solution: Here's a circuit with a capacitor and a resistor. The typical problem here is a switch closure problem. The circuit sits for a long time before t = 0. At t = 0, a switch is closed. The voltages and currents in the circuit change over time. We want to know what the voltage v(t) and current i(t) look like from time t = 0 to t = ∞. Note that there are actually two different circuits here: The one with the switch open, which is around before t = 0, and the one with the switch closed. Let's start by considering the circuit before t = 0. There is clearly no current, but what about capacitor voltage? Well, it could be anything, really, in this case, so the problem

+

-

v

Rt=0

Cvs

+

-

i

Page 2: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

2

has to specify this initial condition. Let v(0-) = 0. t = 0- means the time just before t = 0. Now consider the circuit an instant after the switch closes. (This would be t = 0+.) Recall that

dt

dvCi =

No time goes by from 0- to 0+, so any change in voltage across the capacitor would require infinite current, which is not possible. Therefore, capacitors cannot change voltage instantaneously. ( ) ( )!+ = 00 vv That means all the source voltage appears across the resistor, by KVL. Then the current is

( ) ( )R

v

R

vvi

ss =!

=+

+ 00

So the current did change instantaneously through the capacitor. We could calculate the rate of change of capacitor voltage as

( ) ( )RC

v

C

i

dt

dvs==

++ 00

but let's try for the circuit equation instead. KCL at the capacitor is

0=+!

dt

dvC

R

vvs

svv

dt

dvRC =+ and recall that ( ) 00 =+

v

There are many, many ways to solve this equation. We'll do one formal solution before we find a faster way… Let's solve for the derivative, separate variables and integrate

RC

vv

dt

dvs!

=

dtRCvv

dv

s

1!=

!note sign change

DdtRC

dvvvs

+!=! ""

11 where D is a constant of integration

Page 3: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

3

( ) DRC

tvvs

+!=!ln and I had to look up the integral

RCt

sAevv

/!=! where D

eA = ( ) RCt

sAevtv

/!+= We can find the value of A from considering the initial condition, ( ) 00 =+

v so ( ) 00

0 =+=+=+AvAevv

ss

svA !=

We can check this by considering what happens as t goes to infinity. In steady state, with a constant source (one that does not change with time) we expect the capacitor current to go to zero. (Think about it - initially, current (water) flows in or out, causing voltage (pressure) to build up against the flow. Eventually the voltage (pressure) gets high or low enough to stop the flow, and then the voltage (pressure) also stops changing.

( ) 0=!dt

dv

Then from the circuit equation

svv

dt

dvRC =+

svv = and 0=i

Note that at t = infinity the capacitor looks like an open circuit. Replacing the capacitor with an open circuit is an easy way to obtain steady state values. Anyway, the complete solution is ( ) ( )RCt

s

RCt

ssevevvtv

//1

!!!=!=

and looks like

vs

t

Page 4: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

4

Solution by Form of Solution: Let's try a more complex problem. We'll take the same approach, at least until we have the circuit equation. Let's work on the initial condition, v(0+). First consider the circuit before the switch is closed, for t < 0. Generally we assume that the circuit has sat with the switch open for a loooonng time. That means:

( ) 00 =!

dt

dv so ( ) 00 =!i

The capacitor looks like an open circuit. (From the point of view of t = -∞, t = 0 looks like t = ∞ does from t = 0…) With the capacitor an open circuit, v(0-) is just a voltage divider.

( )321

30

RRR

Rvvs

++=!

We could also see this as the open circuit voltage of the Thevenin equivalent seen by the capacitor. Now consider t = 0+, immediately after switch closure.

( ) ( )321

300

RRR

Rvvvs

++== !+ is the initial condition we'll need for the solution.

Before writing the circuit equation, let's find the new Thevenin equivalent seen by the capacitor for t > 0.

32

3232 ||

RR

RRRRR

t

+==

32

3

RR

Rvvsoc

+= (note this has

gone up from v(0-).) So the equivalent circuit is:

+

-

v

R2

t=0

Cvs

+

-

i

R3

R1

+

-

v

Rt

Cvoc

+

-

i

Page 5: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

5

Well, this looks like the first circuit we solved, so it has the same equation!

octvv

dt

dvCR =+

and the same form of solution ( ) CRt

oc

tAevtv/!+=

but the value of A is different. At t = 0+, v = v(0+), NOT zero! Then ( ) 0

0 Aevvoc+=+

( )ocvvA != +

0 ( ) ( )( ) CRt

ococ

tevvvtv/

0!+

!+= Note that as t → ∞, ( )

ocvv =!

which matches with the differential equation with dv/dt = 0. The Real Fast Way to Solve RC Circuits (The Cookbook) If you think about it, ANY circuit with one capacitor can be reduced to the equivalent circuit with one resistor and one voltage source just by taking the Thevenin equivalent seen by the capacitor. Which means that ANY circuit with one capacitor has a solution of the form ( ) ( )( ) CRt

ococ

tevvvtv/

0!+

!+= Let's rewrite this slightly: ( ) CRt

tBeAtv/!+=

Of course A and B can be found from voc and v(0+), but you don't really need to remember that. It's easier to find A and B from v(0+) and v(∞), doing a little algebra instead of memorizing an equation. The cookbook way of solving first order RC circuits is then: 1. Find the initial condition, v(0+), from v(0-). 2. Find the steady state solution, v(∞), using the fact that the capacitor is an open circuit at t = ∞.

Page 6: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

6

3. Find the value of RtC. (This value is so useful it has a special name, time constant, and symbol, τ (lower case Greek tau)). 4. Write the solution, ( ) CRt

tBeAtv/!+=

5. Plug the two voltage values into the solution to find A and B. Use v(∞) first! 6. Make sure you answered the question being asked! Cookbook Example:

Given v(0-) = 0 V, find i(t) for 0 < t < ∞.

This problem has a twist, we are being asked for current! No fair! We know how to solve for voltage! - Oh wait, if we know the voltage we can then find the current. OK. 1. At t = 0- v = 0 so at t = 0+ v = 0.

2. At t = ∞, ( ) 0=!dt

dv , so i = 0, so v = vs = 5V.

3. RC = 50k⋅10µ = 500m = 0.5 s (recall k = 103, µ = 10-6, m = 10-3). 4. ( ) tt

BeABeAtv25.0/ !! +=+=

5. v(∞) = A = 5V. Then v(0+) = 5 + B = 0, B = -5. Solution ( ) V 55

2tetv!

!= 6. (Don't forget this step!)

( )( )

A 10050

555

50

2

2

µtt

se

K

e

k

tvvti

!!

=+!

=!

=

And we can sketch i(t) (a common request)

+

-

v

50k!t=0

10µF5V

+

-

i

i

t

100mA

Page 7: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

7

RL Circuits: Now let's look at a circuit with an inductor instead of a capacitor. We'll start with the simplest possible circuit:

And we want to find the current i as a function of time. (Voltage for capacitors, current for inductors…) Let's try writing the circuit equation and hoping for a miracle…

From KVL:

0=!!dt

diLiRv

s

sviR

dt

diL =+

Hmm, compare this to

svv

dt

dvRC =+

from the RC circuit. It's not quite the same - but we can make it closer…

R

vi

dt

di

R

Ls=+

NOW this is the same equation - which means it must have the same form of solution (that's our miracle). Astute observers will note that the right hand side (the forcing function in math-speak) is the Norton equivalent short circuit current, where the RC circuit had the Thevenin equivalent open circuit voltage. Anyway, the form of the solution is

( ) !/tBeAti

"+= where time constant R

L=!

Here's an interesting thing to know about the time constant, which is useful when plotting voltages or currents: If you take the voltage or current value at t = 0, (I'll use current, since we’re talking about RL circuits just now) and its value at t = ∞, and its slope at t =

+

-

v

Rt=0

Lvs

+

-

i

Page 8: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

8

0, ( )0dt

di , and plot the straight line passing through i(0) with that slope, it will intersect

i(∞) at t = τ!

Of course, this is NOT what the graph of current would look like for the simple example circuit. What would i(0) be for that circuit? What would the graph look like? And where would τ be on that graph? Inductor Example:

Find i(t) for 0 < t < ∞!

Since we have essentially the same differential equation, and same form of solution, we can use the same cookbook to find the solution. 1. Find the initial condition.

From dt

diLv = , the inductor current cannot change instantaneously. (It was voltage for

the capacitor, now current for the inductor.) So, i(0+) = i(0-) = 0. 2. Find the steady state solution.

In steady state (at t = ∞) with dc sources, dt

di is zero, and inductor voltage is zero. That

means the inductor is a short circuit in steady state. Then

i(0)

t

i(!)

( )0 slopedt

di

t=0 t="

+

-

v

10K!t=0

10mH10V

+

-

i

Page 9: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

9

( ) mA 110

10=

!=="

K

V

R

vi

s

3. Find the time constant

s 110

10µ! =

"==

K

mH

R

L

4. Write the solution, ( ) ttt

BeABeABeAti66

1010// !!! +=+=+=!"

5. Plug the two boundary values (the values at t = 0 and t = ∞) into the solution to find A and B. Use the steady state value first! ( ) mA 1==! Ai

( )mA 1

00

!=

=+=

B

BAi

( ) mA 16

10t

eti!

!= 6. Make sure you answered the question being asked! Nothing sneaky in this question. Let's draw the graph, though. (Usually, I would not put the time constant on the graph unless I was specifically asked for it.) Multiple switching events: Often we find that useful functions require switches that open and then close, possibly to repeat in a cycle. How can we deal with this? If the time between switching operations is "long", we can assume the circuit is in steady state just before each switch operation. How long is "long"? Well, it depends on the time constant τ. Usually we say the transient will settle out in 3-5 time constants.

i(t)

t

1 mA

t=0 t=1µs

Page 10: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

10

Of course, nothing is always that simple, and we would really like to solve circuits where the switch changes happen less that 3-5 time constants apart. This really just requires some attention to initial conditions and a simple modification of the form of solution. Consider this problem:

The switch has been open for a long time. At t = 0 the switch closes. At t = 0.1s the switch opens(!). Sketch v(t) for 0 < t < ∞

The switch closure is a problem we've done before. Cookbook! ( ) ( ) V 1000 == !+

vv With the switch closed, the Thevenin equivalent seen by the capacitor has

V 555

510 =

+=

ocv

!== K5.25||5tR

So ( ) V 5=!v sCR

t5.010500200K5.2

-3 =!="== µ# ( ) V

25.0/ ttBeABeAtv

!! +=+= ( ) 5==! Av ( ) 100 =+= BAv 5=B ( ) V 55

2tetv!+=

Now for the switch reopening. It happens at to = 0.1s. So the form of solution has to be modified to account for the new starting point. ( ) ( ) !/

ott

BeAtv""+=

Note that A, B and τ will have new values! We need the initial and steady state voltage. The initial voltage is the voltage at t = 0.1- and we can find it from the first solution. ( ) V 1.9551.0

1.02 =+= !""ev

With the switch open,

+

-

10V v

+

-

200µF

5K!

5K!

Page 11: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

11

( ) V 10=!v The new time constant is sKRC 12005 =!== µ" ( ) V 10==! Av ( ) 1.91.0 =+= BAv V 9.0101.9 !=!=B ( ) ( )1.0

9.010!!

!= tetv

The canonical way to express the solution is

( )( )

!"#

$<<%

<<+=

%%

%

te

tetv

ott

t

1.0V 9.010

1.00V 552

And let's sketch the graph…

Step Functions: A switching change (open or close) can also be thought of as a step change in a source. For example, in the previous problem the switch closure changes the source from 10V to 5V. A mathematical way of expressing step changes is the step function, u(t). The form of solution to switch closure problems is sometimes called the step response of the circuit. The step function has a magnitude of 1 (that is, the value changes from 0 to 1) and the change occurs when the argument equals zero. Thus

( )!"#

>

<=

01

00

t

ttu

v(t)

t

10

0 0.1

9

t

1

0

Page 12: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

12

An offset in the argument corresponds to a time offset in the change:

( )!"#

>

<=$

o

o

o

tt

ttttu

1

0

Steps up and down are expressed by summing step functions:

( ) ( ) ( )

ottututv !!=

Can you figure out the step function expression of this graph?

t

1

0 to

t

1

0 to

v

t

2

0

v

1 2 3 4

1

-1

Page 13: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

13

It's ( ) ( ) ( ) ( )43321 !+!!!+! tutututu Notice how the magnitude of each step function term is the magnitude of the corresponding change. When a source is given as a step function, e.g. ( ) ( )V 423 !!!= tutuv

s

Just divide the time up into segments when the source is constant, and treat each transition point as a switch closure. Here the source has value 0 V from 0 < t < 2, 3 V from 2 < t < 4, and 2 V for t > 4, and there are two "switch closures" to deal with, one at t = 2 s and one at t = 4 s. Non-Constant Sources: Exponentials: So far we have examined sources with constant values. What happens when they change? We need to review some math to handle this case. When we write a differential equation for voltage, say, we put the terms with voltage in them on the left side, and term(s) without voltage on the right. For example,

octvv

dt

dvCR =+

(Remember that voc is a constant, and the term does not contain the voltage variable v.) Math geeks (and EEs) call the term on the right side the forcing function. It's a function of time. The differential equation has a natural response, (also called the homogeneous solution in math-speak) which is the solution when the forcing function is zero, and a forced response, (inhomogeneous solution) which is the solution as t→∞. The complete solution is the sum of the natural response and the forced response. Recall the form of solution with a constant forcing function, ( ) !/t

BeAtv"+=

Here A is the forced response, and !/t

Be" is the natural response. From this we learn that

the form of the forced response to a constant is a constant.

Page 14: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

14

Now we are ready to deal with forcing functions of other forms. Basically, we'll write the form of solution for a couple of different forcing functions, and then evaluate the coefficients of the solution. The first forcing function we will examine is the exponential forcing function, at

sbev =

where a and b are constants. The form of the forced solution is ( ) at

f Aetv = There is a special case when the coefficients of the exponentials are equal in the forced and natural solution, i.e. when !/1"=a In this case, ( ) at

f Atetv = Example:

Given ( ) ( )V 10

4tuetv

t

s

!= and v(0) = 0, find v(t). Don't worry about the u(t), it's just there to keep the source equal to zero before t = 0. Form of solution

( ) !/tat

BeAetv"+=

Better check τ! sRC 21M2 =!== µ" Good, not equal, the form is OK. We find the coefficient of the forced solution by stuffing it in the differential equation. That means we need to write the differential equation! KCL at the top capacitor node is

0=+!

dt

dvC

R

vvs

+

-

v

2M!t=0

1µFvs

+

-

Page 15: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

15

or

svv

dt

dvRC =+

or

tev

dt

dv 4102

!=+

Now sub in t

Aev4!

=

ttteAeAe

dt

d 444102

!!!=+

( ) ttt

eAeAe444

1042!!! =+!"

The exponentials cancel, leaving 108 =+! AA

7

10!=A

Which is an ugly number, and therefore suspect, but in this case it seems to be correct. For those wondering what happened to the natural solution 2/t

Be! in this process, what

happens is that the natural solution, by definition, goes to zero as t→∞, and we are equating coefficients of the forced solution at or near t = ∞, where the natural solution is zero and can be left out. To evaluate coefficients in the natural solution, we have to use the initial condition at t = 0, and use the form of the complete solution (which is why we did the forced solution first). The form of the complete solution is

( ) 2/4

7

10 ttBeetv

!! +!=

Plugging in t = 0,

( ) 07

100 =+!= Bv

so

Page 16: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

16

7

10=B

and the complete solution is

( ) ( )V 7

10 2/4 tteetv!!

!!=

Non-Constant Sources: Sinusoids: Let's try a sinusoidal source. Sinusoidal steady state (essentially just the forced solution) is an important operating state for many circuits, so important it had its own name, alternating current. Here we'll look at the transient solution too. The generic sinusoidal forcing function is ( )!" +ta sin which can be rewritten tata !! sincos

21+

using trigonometric identities. This clues us in to the form of the forced solution for sinusoidal forcing functions, tAtA !! sincos

21+

For example, suppose that in the previous problem, the forcing function is ( ) ( )V 10sin10 tutv

s=

Again the u(t) just makes the forcing function zero for t < 0. The form of the complete solution is ( ) 2/

2110sin10cos

tBetAtAtv

!++= Let's plug the form of the forced solution into the differential equation, which is

tvdt

dv10sin102 =+

Plugging in

( ) ttAtAtAtAdt

d10sin1010sin10cos10sin10cos2

2121=+++

Page 17: EE 215 Fundamentals of Electrical Engineering Lecture ...facweb.northseattle.edu/.../engr204/lectnotes9-firstordercircuits.pdf · EE 215 Fundamentals of Electrical Engineering Lecture

17

Doing the derivative ( ) ( ) ttAtAtAtA 10sin10sincos1010cos21010sin2

2121=++!+!" ##

Now equate coefficients of sine and cosine.

020

1020

12

21

=+

=+!

AA

AA

Solve:

2120AA !=

( ) 10202022=+!! AA

401

10

2=A

401

200

1!=A

And now solve for the natural response coefficient at t = 0

( ) ( ) ( ) 00sin401

100cos

401

2000

2/0 =++!= !Bev

401

200=B

Complete solution

( ) ( )V 2010sin10cos20401

10 2/tetttv!

!!!=