You are on page 1of 15

Solution of First-Order Linear Dierential Equation

The solution to a rst-order linear dierential equation with constant coecients,


a1

dX
+ a0 X = f (t) ,
dt

is X = Xn + Xf , where Xn and Xf are, respectively, natural and forced responses of the


system.
The natural response, Xn , is the solution to the homogeneous equation (RHS=0):
a1

dX
+ a0 X = 0
dt

The functional form of Xn is Xn = Kest (K and s are constants). Value of s can be found
by substituting the functional form in the homogeneous dierential equation:
a1

dKest
+ a0 Kest = 0
dt

a1 Ksest + a0 Kest = 0

a1 s + a0 = 0

s=

a0
a1

Constant K is found from initial conditions. As the initial condition applies to X not Xn ,
K should be found after Xf is calculated.
Some functional forms of the forced solution, Xf , are given in the table below. To nd
Xf , the functional form is substituted in the original dierential equation and the constant
coecients of the functional form are found.
Trial Functions for Forced Response
f (t)
a
at + b
n
at + btn1 + ...
aet
a cos(t) + b sin(t)

Trial Function
A
At + B
n
At + Btn1 + ...
Aet
A cos(t) + B sin(t)

Constants a and b are used to dene the general form of f (t).


Constants A and B in trial functions are found from substitution in
the dierential equation.

MAE140 Notes, Winter 2001

70

Example: Solve the dierential equation below with the initial condition of v(t=0)=1.
dv
+ 5v = 10
dt
The solution is v = vn + vf . vn is the solution to the homogeneous equation:
dv
+ 5v = 0
dt
Using the trial function vn = Kest , we nd:
d  st 
Ke + 5Kest = 0
dt
Ksest + 5Kest = 0

s = 5

vn = Ke5t
K will be found later from the initial condition.
To nd vf , we note that f (t) = 10 = constant. From the table of the trial functions, we
nd that the functional form of vf = A = constant. Substituting for vf in the dierential
equation, we get:
dA
dv
+ 5v = 10
+ 5A = 10
dt
dt
0 + 5A = 10 vf = A = 2
v = vn + vf = Ke5t + 2
We now use the initial condition, v(t = 0) = 1, to nd K:


v(t = 0) = Ke5t + 2


t=0

=1

K +2=1

K = 1

v = e5t + 2

MAE140 Notes, Winter 2001

71

First-Order Circuits
First order circuits include only one capacitor or inductor (after using series/parallel reduction). The solution of these circuits results in a rst-order linear dierential equation with
constant coecients. It requires one initial condition.
First-order RL Circuits
Consider a rst-order circuit containing only one inductor. The rest of the circuit contains
only resistors and voltage and current sources. Therefore, the rest of the circuit is a twoterminal resistive subcircuit and can be reduced to a Thevenin or Norton form as shown.
Note that it is possible that the rest of circuit reduced to only a resistor, i.e., vT = 0.
iL

RT

+
Rest of
the circuit

vL

iL

iL

+
L

+
-

vT

vL

iN

vL

OR

Solving the Thevenin equivalent circuit, we get:


KVL:
i-v Eq.:

RT iL + vL vT = 0
diL
vL = L
dt

Substituting for vL in KVL, we arrive at the general form of dierential equation that
describes rst-order RL circuits:
L

diL
+ RT iL = vT
dt

If we use the Norton form for the resistive subcircuit, we will arrive at
L diL
+ iL = iN
RN dt
which is exactly identical to the Thevenin form (RN = RT and vT = RT iN ).

MAE140 Notes, Winter 2001

72

First-order RC Circuits
Consider a rst-order circuit containing only one capacitor. Similar to a rst-order RL
circuit, we can reduce the rest of the circuit to a Thevenin or Norton form as shown.
iC

RT

+
Rest of
the circuit

vC

iC

iC

+
C

+
-

vT

vC

iN

vC

OR

Solving the Thevenin equivalent circuit, we get:


KVL:
i-v Eq.:

RT iC + vC vT = 0
dvC
iC = C
dt

Substituting for iC in KVL, we arrive at the general form of dierential equation that describes rst-order RC circuits:
RT C

dvC
+ vC = vT
dt

The Norton form will also lead to an equation similar to above.

MAE140 Notes, Winter 2001

73

Natural Response of First-Order Circuits


As the natural response of a circuit is generic to the circuit and is independent of the driving sources, we consider the natural response (no sources) rst.

t = t0

RT
+
-

In these circuits, the inductor or the capacitor is


charged with a voltage or current source, a switch
opens or closes removing the source from the circuit, and
letting the capacitor or inductor discharge in a resistor.

vT

iL

Natural Response of RL Circuits


A generic RL circuit with an initial condition of iL (t = t+
0 ) = i0
is shown. For t > t0 , we have:
KVL:

I.C.:

+
vL
-

vL + RiL = 0
diL
L
+ RiL = 0
dt
iL (t = t+
0 ) = i0

It is a good idea to write down the initial conditions (again) next to the dierential equation.
Since the RHS of the equation is zero, there is no forced solution. The functional form of the
natural solution is iL = Kest . Substituting this functional form in the dierential equation
(to nd s), we get:
iL = Kest

diL
= Ksest
dt

LKsest + RKest = 0

Ls + R = 0

s=

R
L

iL = Ke(R/L)t
Dene time constant, , as

L
1
=
=
s
R

iL = Ke

Constant K is found from the initial condition, iL (t = t+


0 ) = i0 :

iL (t =

t+
0)

t0

= i0 = Ke

MAE140 Notes, Winter 2001

t0
+
K = i0 e

74

iL

Thus:
t t0

iL = i0 e

and

io

t t0

vL = Ri0 e

< 1% io
t
t0

Current and voltage waveforms are plotted in the


gure. After several time constants (5 is adequate), the current and voltage decay away and
the circuit reaches its steady condition.

t0+5

t0

Natural Response of RC Circuits


A generic RC circuit with an initial condition of vC (t =
t+
0 ) = v0 is shown. For t > t0 , we have:
KVL:

I.C.:

iC

Ric + vC = 0
dvC
RC
+ vC = 0
dt
vC (t = t+
0 ) = v0

+
vC

Substituting this functional form for vC in the dierential equation we nd s = 1/(RC).

Dene time constant, , as

1
= RC
=
s

vC = Ke

Constant K is found from the initial condition, vC (t = t+


0 ) = v0 and we arrive at:

vC = v0 e

t t0

and

v0
iC = e
R

t t0

vC

t0

vo

< 1% vo
t
t0

t0+5

MAE140 Notes, Winter 2001

75

First-Order Circuits with DC sources (Step Response)


u(t)

Unit Step function is dened as:




for t 0
for t 0+

u(t) = 0
u(t) = 1

Dening t = t t0 , one can see that u(t ) = u(t t0 ) is:




u(t-t 0)
1

for t t
0
for t t+
0

u(t t0 ) = 0
u(t t0 ) = 1

t
t0

Step functions are one way to illustrate switched circuit as is shown in the example below.
t = t0

vs
C

+
-

vs u(t-t )
0

Step response of an RC circuit


Consider the RC circuit above. The switch closes at time t = 0 and the capacitor has an
initial voltage of v0 . For t > 0, KVL results in Ric + vC = vs , or:
dvC
+ vC = vs
dt
vC (t = 0+ ) = v0

RC
I.C.:

We have found the natural solution to RC circuit to be:


vC,n

= Ke

and

= RC

To nd the forced response, vC,f , we note that the RHS of the dierential equation is a
constant. Table of trial force functions on page 70 indicates that the forced response should
also be a constant, vC,f = A. Substituting for vC,f in the dierential equation, we get:
RC

dA
+ A = vs
dt

vC = vC,n + vC,f

vC,f = A = vs

= Ke + vs

MAE140 Notes, Winter 2001

76

Constant of K is found from the initial condition: vC (t = 0+ ) = v0 :


0

vC (t = 0 ) = v0 = Ke + vs = K + vs
+

K = v0 vs

Thus, the capacitor voltage waveform is:


t

vC (t) = (v0 vs )e + vs
If we wait long enough, (mathematically: t , practically: 5 ) the circuit will reach DC
steady condition again, current in the capacitor becomes zero and its voltage reaches vs as
can be see either from the circuit or from the expression for vC (t).
iC

vC

t0

vs

t0+5

v0
t
t0

-v s /R

t0+5

If the switch was closed at time t = t0 instead of time zero, the capacitor voltage waveform
would be (let t = t t0 and switch closing at t = 0):

vC (t) = (v0 vs )e

t t0
+ vs

Since v0 is the initial value of vC and vs is its nal value , the above equation can be re-written
as:
vC
=
at Time t

Final Value of
Initial Value of

vC
vC

t t0
Final Value of
+
vC

In fact, all voltages and currents in the circuit (also called state variables) will have the
same waveform:
State Variable
=
at Time t

Initial Value of
Final Value of

State Variable
State Variable

MAE140 Notes, Winter 2001

t t0
Final Value of
+
State Variable

77

Step response of an RL circuit


t = t0

Consider the RL circuit shown. The switch closes at time t = t0


and the inductor has an initial current of i0 . We can nd the
inductor current waveform following the procedure similar to
one used for step response of RC circuits.

iL

is
R

+
vL

Alternatively, we can use the state variable formula identied above. Here the state
variable of interest is iL . The time constant of the circuit is = L/R. The nal value of
the state variable is iL (t ) when the switch is closed and circuit has reached a DC
steady state condition. Replacing the inductor with a short circuit, we nd iL (t ) = is .
Substituting in the state variable formula above, we get

iL (t) = (i0 is )e

t t0
+ is

Procedure for Solving First-Order Circuits


1. If the initial conditions are not given, use DC steady-state analysis to nd the initial
conditions (vc and iL )
2. Solve the time dependent circuit:
a) Direct solution using KVL and KCL, node-voltage and mesh current methods, etc.
b) Reduce the circuit to simple RC or RL circuits above and use the formulas.
Example 1: The circuit is in DC steady-state for
t < 0. Find i for t > 0
As the initial conditions are not given, we need to
solve the DC steady-state circuit for t < 0 rst.
We redraw the circuit at t < 0 (switch is closed)
and replace the capacitor with an open circuit.
We proceed with solving the circuit with nodevoltage method. As the 2 resistor does not carry
any current, vA = vC . Then:
KCL at vA :

vC 18 vc vC
+ +
=0
12
6
12
vC = 4.5 V
for t < 0

t=0

12

i
2
12

18 V

+
vc
-

+
-

1F
12
12

vA =vc

18 V

i
2
12

6
+

18 V

+
-

vc
-

No-jump condition leads to the initial condition for t > 0: vC (0+ ) = vC (0 ) = 4.5 V. Note
that although we like to nd i, the initial condition is obtained for vC as no-jump condition
only applies to vC and i may have a discontinuity at the switching time.
MAE140 Notes, Winter 2001

78

12

vA
i

We now proceed to solve t > 0 circuit:

Method 1: Direct solution:

12

6
+

Both node-voltage and mesh-current methods


lead to 2 equations. As we are interested in vC ,
we proceed with node-voltage method:

vc
-

vc

18 V

+
-

1F
12

vA vA vC vA
+
+
=0
6
2
12

KCL at vA :

2vA + 6vA 6vC + vA = 0


vC vA
+ iC = 0
2

KCL at vC :

2
vC
3
1 dvC
vC vA
+
=0
2
12 dt

vA =

where we substituted for iC from the capacitor i-v equation. The above are two equations
in our two node-voltages vA and vC . Substituting for vA from rst into the second, we get:


dvC
2
6vC 6
vC +
=0
3
dt
dvC
+ 2vC = 0
and
dt

vC (0+ ) = 4.5 V

As the RHS of the dierential equation is zero, solution consists only of the natural solution.
Using the trial function of Kest , we nd:
sKest + 2Kest = 0

s = 2

vC (t) = Ke2t
and K is found from the initial condition:
vC (0+ ) = 4.5 = Ke20

K = 4.5

vC (t) = 4.5e2t

(V)

We can now calculate i from our node voltage equations:


2
vC (t) = 3e2t
3
vA (t)
= 0.25e2t
i(t) =
12

vA (t) =

(V)
(A)

MAE140 Notes, Winter 2001

79

Method 2: Reduction to Thevenin form:


In this method, we reduce the circuit into a simple RC circuit by separating the capacitor
from the circuit and nding Thevenin equivalent of the remaining two-terminal subcircuit:
i
2

2
6 || 12 =
4

12

1F
12

1F
12

1F
12

We have solved this circuit before and the solution is:

vC (t) = vC (t =
t0 = 0

and

vC (t) = 4.5e2t

t+
0 )e

t t0

with

= RC

+
vC (t = t+
0 ) = vC (0 ) = 4.5

and

= RC =

6
= 0.5
12

(V)

We now need to go back to the original circuit to calculate i, for example, by writing the
node-voltage equations and use vC to nd the other parameters as was done above.
Example 2: The circuit is in DC steady-state
for t < 1 s. Find iL for t > 1

KVL:

10 + 50iL = 0

10 V
+

10 V

We redraw the circuit at t < 1 (switch is in the


upper position) and replace the inductor with
a short circuit. We also replace the 50 and
25 resistors in series with a 75 resistor.
As the 75 resistor is in parallel with a short
circuit, it will carry a current of zero. Then,
by KCL, the current in the 50 resistor will
be iL . Then,

t=1s

50
iL

50

150 mH

25

50
10 V
+

iL

i=0
75

iL = 0.2 A

No-jump condition leads to the initial condition for t > 1: iL (t = 1+ ) = iL (t = 1 ) = 0.2 A.


We now proceed to solve t > 0 circuit:

MAE140 Notes, Winter 2001

80

10 V 50

KCL at vL :

i-v Eq.:

10 V

iL
150 mH

Node-voltage method leads to one equation as


opposed to mesh-current method that leads to
2 equations. So, we proceed with node-voltage
method:

Method 1: Direct solution:

vL
+
v

75

vL
vL (10)
+ iL +
=0
75
50
2vL + 150iL + 3vL + 30 = 0 5vL + 150iL = 30
diL
vL = 150 103
dt
diL
+ 150iL = 30
5 150 103
dt
diL
+ iL = 0.2 and iL (t = 1+ ) = 0.2 A.
5 103
dt

As the RHS of the dierential equation is not zero, we need to nd both the natural and
forced solutions. The natural solution can be found by using trial function of iL,n = Kest :
5 103 sKest + Kest = 0

s = 200

iL,n (t) = Ke200t


To nd iL,f , we note that the RHS of the dierential equation is a constant. Using the
Table of trial functions for forced solution on page 70, we nd iL,f = A. Substituting in the
dierential equation, we get:
dA
+ A = 0.2 iL,f = A = 0.2
dt
iL (t) = iL,n + iL,f = Ke200t 0.2

5 103

Constant K is found from the initial conditions:


iL (t = 1+ ) = 0.2 = Ke200 0.2
iL (t) = 0.4e200(t1) 0.2

K = 0.4e+200

(A)

Method 2: Reduction to Thevenin form:


In this method, we reduce the circuit into a simple RL circuit by separating the capacitor
from the circuit and nding Thevenin equivalent of the remaining two-terminal subcircuit:
MAE140 Notes, Winter 2001

81

50

10 V

iL

150 mH

iL

10 = 0.2
50

75

50

150 mH

75

We have solve this circuit before and the solution is:


t t0

+ is
iL (t) = (i0 is )e

iL

0.2

50 || 75=
30

150 mH

t0 = 1
i0 = iL (t = t+
0 ) = +0.2

and

is = 0.2

L
150 103
=
= 5 103
R
30
iL (t) = [0.2 (0.2)]e200(t1) + (0.2)

iL (t) = 0.4e200(t1) 0.2

(A)
ic

Example 3: Integrator Find vo if vC (t = 0) = 0.


We replace the OpAmp with its circuit model. As
the current owing into the OpAmp is zero, the
current in the resistor is the same as iC . We also
note the connection between output and inverting
input terminal so negative feedback exists:
Negative Feedback:
Ohms Law:
Capacitor i-v:

C
+ vc

R
ic
+

v1u(t)

i=0

+
vo

vn = vp = 0
RiC = v1 vn = v1
d(vn vo )
dvo
dvC
=C
= C
ic = C
dt
dt
dt

Substituting for iC from Ohms law into capacitor i-v equation, and integrating the resulting
equation we get:

t dv
dvo
1
v1
o
= C

dt =

R
dt
RC
0 dt

t
1
vo (t) =
v1 (t )dt
RC 0

t
0

v1 (t )dt

since vC (t = 0) = vo (t = 0) = 0. As can be seen, this is an integrator circuitthe output


voltage is proportional to the integral of the input voltage waveform.
MAE140 Notes, Winter 2001

82

ic

Example 4: Dierentiator: Find vo if vC (t = 0) = 0.


We replace the OpAmp with its circuit model. As
the current owing into the OpAmp is zero, the
current in the resistor is the same as iC . We also
note the connection between output and inverting
input terminal so negative feedback exists:

ic

C
+ vc

i=0

v1u(t)

vo

Negative Feedback:

vn = vp = 0
RiC = vn vo = vo
dvC
d(v1 vn )
dv1
ic = C
=C
=C
dt
dt
dt

Ohms Law:
Capacitor i-v:

Substituting for iC from Ohms law into capacitor i-v equation, we get:

vo
dv1
=C
R
dt

vo (t) = RC

dv1
dt

As can be seen, this is a dierentiator circuitthe output voltage is proportional to the


derivative of the input voltage waveform.
The above two circuits, the integrator and the dierentiator, together with inverting and
non-inverting summers are the building block of analog computers.
Example: Design an OpAmp circuit to nd vo (t) = 10vs (t) +

t
0

vs (t )dt .

C= 1/R
c

vA =
vA

t
0

vs (t )dt
R

vs
R

vo

vo = vA vB
R

= 10vs (t)+

t
0

vs (t )dt

vB = 10vs (t)

MAE140 Notes, Winter 2001

83

Example: Design an OpAmp circuit which solves the dierential equation:


d2 vo
dvo
+ vo = vs (t).
+2
2
dt
dt
Rewrite the equation in the form:
d2 vo
dvo
vo + vs (t)
= 2
2
dt
dt
The block diagram of the circuit is:

vs

Inverting
Amp.

vs
2

dv0
Inverting
Summer

v0

dt2

Integrator

dv0
dt

v0
Integrator

dv0
dt

and the circuit itself is:


R
vs

R
R
0.5 R

MAE140 Notes, Winter 2001

C= 1/R
R

C= 1/R
R

vo

84

You might also like