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,


a
1
dX
dt
+ a
0
X = f(t) ,
is X = X
n
+ X
f
, where X
n
and X
f
are, respectively, natural and forced responses of the
system.
The natural response, X
n
, is the solution to the homogeneous equation (RHS=0):
a
1
dX
dt
+ a
0
X = 0
The functional form of X
n
is X
n
= Ke
st
(K and s are constants). Value of s can be found
by substituting the functional form in the homogeneous dierential equation:
a
1
dKe
st
dt
+ a
0
Ke
st
= 0
a
1
Kse
st
+ a
0
Ke
st
= 0 a
1
s + a
0
= 0 s =
a
0
a
1
Constant K is found from initial conditions. As the initial condition applies to X not X
n
,
K should be found after X
f
is calculated.
Some functional forms of the forced solution, X
f
, are given in the table below. To nd
X
f
, 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)

Trial Function

a A
at + b At + B
at
n
+ bt
n1
+ ... At
n
+ Bt
n1
+ ...
ae
t
Ae
t
a cos(t) + b sin(t) Acos(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
dt
+ 5v = 10
The solution is v = v
n
+ v
f
. v
n
is the solution to the homogeneous equation:
dv
dt
+ 5v = 0
Using the trial function v
n
= Ke
st
, we nd:
d
dt
_
Ke
st
_
+ 5Ke
st
= 0
Kse
st
+ 5Ke
st
= 0 s = 5
v
n
= Ke
5t
K will be found later from the initial condition.
To nd v
f
, we note that f(t) = 10 = constant. From the table of the trial functions, we
nd that the functional form of v
f
= A = constant. Substituting for v
f
in the dierential
equation, we get:
dv
dt
+ 5v = 10
dA
dt
+ 5A = 10
0 + 5A = 10 v
f
= A = 2
v = v
n
+ v
f
= Ke
5t
+ 2
We now use the initial condition, v(t = 0) = 1, to nd K:
v(t = 0) =
_
Ke
5t
+ 2
_
t=0
= 1 K + 2 = 1 K = 1
v = e
5t
+ 2
MAE140 Notes, Winter 2001 71
First-Order Circuits
First order circuits include only one capacitor or inductor (after using series/parallel reduc-
tion). 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 two-
terminal 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., v
T
= 0.
the circuit
Rest of
OR
L
R
-
+
L
-
+
v L
L
L
+
-
v
L
L
i
L
i R
L
i
v T
v
T
N N
i
-
+
Solving the Thevenin equivalent circuit, we get:
KVL: R
T
i
L
+ v
L
v
T
= 0
i-v Eq.: v
L
= L
di
L
dt
Substituting for v
L
in KVL, we arrive at the general form of dierential equation that
describes rst-order RL circuits:
L
di
L
dt
+ R
T
i
L
= v
T
If we use the Norton form for the resistive subcircuit, we will arrive at
L
R
N
di
L
dt
+ i
L
= i
N
which is exactly identical to the Thevenin form (R
N
= R
T
and v
T
= R
T
i
N
).
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.
C the circuit
C
Rest of
OR
R C
C
C
-
+
v
+
-
v C
C
C R i
i
+
-
v
i
C
T
v
T
N N
i
+
-
Solving the Thevenin equivalent circuit, we get:
KVL: R
T
i
C
+ v
C
v
T
= 0
i-v Eq.: i
C
= C
dv
C
dt
Substituting for i
C
in KVL, we arrive at the general form of dierential equation that de-
scribes rst-order RC circuits:
R
T
C
dv
C
dt
+ v
C
= v
T
The Norton form will also lead to an equation similar to above.
MAE140 Notes, Winter 2001 73
Natural Response of First-Order Circuits
t = t
0
L R
R
T
T
v
+
-
As the natural response of a circuit is generic to the cir-
cuit and is independent of the driving sources, we con-
sider the natural response (no sources) rst.
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.
i
R L
+
-
v
L
L Natural Response of RL Circuits
A generic RL circuit with an initial condition of i
L
(t = t
+
0
) = i
0
is shown. For t > t
0
, we have:
KVL: v
L
+ Ri
L
= 0
L
di
L
dt
+ Ri
L
= 0
I.C.: i
L
(t = t
+
0
) = i
0
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 i
L
= Ke
st
. Substituting this functional form in the dierential equation
(to nd s), we get:
i
L
= Ke
st
di
L
dt
= Kse
st
LKse
st
+ RKe
st
= 0 Ls + R = 0 s =
R
L
i
L
= Ke
(R/L)t
Dene time constant, , as =
1
s
=
L
R
i
L
= Ke

Constant K is found from the initial condition, i


L
(t = t
+
0
) = i
0
:
i
L
(t = t
+
0
) = i
0
= Ke

t
0

K = i
0
e
+
t
0

MAE140 Notes, Winter 2001 74


t +5 t
0
o
t
0
L
L
o
0
t
t
< 1% i
v
i
i
Thus:
i
L
= i
0
e

t t
0

and v
L
= Ri
0
e

t t
0

Current and voltage waveforms are plotted in the


gure. After several time constants (5 is ade-
quate), the current and voltage decay away and
the circuit reaches its steady condition.
+
-
v
C
C
i
C
R
Natural Response of RC Circuits
A generic RC circuit with an initial condition of v
C
(t =
t
+
0
) = v
0
is shown. For t > t
0
, we have:
KVL: Ri
c
+ v
C
= 0
RC
dv
C
dt
+ v
C
= 0
I.C.: v
C
(t = t
+
0
) = v
0
Substituting this functional form for v
C
in the dierential equation we nd s = 1/(RC).
Dene time constant, , as =
1
s
= RC v
C
= Ke

Constant K is found from the initial condition, v


C
(t = t
+
0
) = v
0
and we arrive at:
v
C
= v
0
e

t t
0

and i
C
=
v
0
R
e

t t
0

t +5 t
0
t
0
0
t
C
o
t
C
o
v
< 1% v
v
i
MAE140 Notes, Winter 2001 75
First-Order Circuits with DC sources (Step Response)
t
u(t-t )
t
0
u(t)
0
1
1
t
Unit Step function is dened as:
_
u(t) = 0 for t 0

u(t) = 1 for t 0
+
Dening t

= t t
0
, one can see that u(t

) = u(t t
0
) is:
_
u(t t
0
) = 0 for t t

0
u(t t
0
) = 1 for t t
+
0
Step functions are one way to illustrate switched circuit as is shown in the example below.
0
t = t
0
u(t-t )
C
R R
C
s
v
s
v
+
-
+
-
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 v
0
. For t > 0, KVL results in Ri
c
+ v
C
= v
s
, or:
RC
dv
C
dt
+ v
C
= v
s
I.C.: v
C
(t = 0
+
) = v
0
We have found the natural solution to RC circuit to be:
v
C,n
= Ke

and = RC
To nd the forced response, v
C,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, v
C,f
= A. Substituting for v
C,f
in the dierential equation, we get:
RC
dA
dt
+ A = v
s
v
C,f
= A = v
s
v
C
= v
C,n
+ v
C,f
= Ke

+ v
s
MAE140 Notes, Winter 2001 76
Constant of K is found from the initial condition: v
C
(t = 0
+
) = v
0
:
v
C
(t = 0
+
) = v
0
= Ke

+ v
s
= K + v
s
K = v
0
v
s
Thus, the capacitor voltage waveform is:
v
C
(t) = (v
0
v
s
)e

+ v
s
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 v
s
as
can be see either from the circuit or from the expression for v
C
(t).
0
0
t +5
t
0 0
t +5
t
t
s
t
C
s
C
0
-v /R
i v
v
v
If the switch was closed at time t = t
0
instead of time zero, the capacitor voltage waveform
would be (let t

= t t
0
and switch closing at t

= 0):
v
C
(t) = (v
0
v
s
)e

t t
0

+ v
s
Since v
0
is the initial value of v
C
and v
s
is its nal value , the above equation can be re-written
as:
v
C
at Time t
=
_
Initial Value of
v
C

Final Value of
v
C
_
e

t t
0

+
Final Value of
v
C
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
State Variable

Final Value of
State Variable
_
e

t t
0

+
Final Value of
State Variable
MAE140 Notes, Winter 2001 77
Step response of an RL circuit
t = t
0
i
R L
+
-
v
L
L
i
s
Consider the RL circuit shown. The switch closes at time t = t
0
and the inductor has an initial current of i
0
. We can nd the
inductor current waveform following the procedure similar to
one used for step response of RC circuits.
Alternatively, we can use the state variable formula identied above. Here the state
variable of interest is i
L
. The time constant of the circuit is = L/R. The nal value of
the state variable is i
L
(t ) when the switch is closed and circuit has reached a DC
steady state condition. Replacing the inductor with a short circuit, we nd i
L
(t ) = i
s
.
Substituting in the state variable formula above, we get
i
L
(t) = (i
0
i
s
)e

t t
0

+ i
s
Procedure for Solving First-Order Circuits
1. If the initial conditions are not given, use DC steady-state analysis to nd the initial
conditions (v
c
and i
L
)
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.
12
2
6

18 V
1
F
+
c
i
v
-
t = 0 12
12
+
-

2
6

c
v
+
-
18 V
18 V
A
i
c
v =v
12
12
+
-
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 node-
voltage method. As the 2 resistor does not carry
any current, v
A
= v
C
. Then:
KCL at v
A
:
v
C
18
12
+
v
c
6
+
v
C
12
= 0
v
C
= 4.5 V for t < 0
No-jump condition leads to the initial condition for t > 0: v
C
(0
+
) = v
C
(0

) = 4.5 V. Note
that although we like to nd i, the initial condition is obtained for v
C
as no-jump condition
only applies to v
C
and i may have a discontinuity at the switching time.
MAE140 Notes, Winter 2001 78
-
12
12
12
2
6

v
c
v
c
18 V
1
F
+
A
i
v
+
-
We now proceed to solve t > 0 circuit:
Method 1: Direct solution:
Both node-voltage and mesh-current methods
lead to 2 equations. As we are interested in v
C
,
we proceed with node-voltage method:
KCL at v
A
:
v
A
6
+
v
A
v
C
2
+
v
A
12
= 0
2v
A
+ 6v
A
6v
C
+ v
A
= 0 v
A
=
2
3
v
C
KCL at v
C
:
v
C
v
A
2
+ i
C
= 0
v
C
v
A
2
+
1
12
dv
C
dt
= 0
where we substituted for i
C
from the capacitor i-v equation. The above are two equations
in our two node-voltages v
A
and v
C
. Substituting for v
A
from rst into the second, we get:
6v
C
6
_
2
3
v
C
_
+
dv
C
dt
= 0
dv
C
dt
+ 2v
C
= 0 and v
C
(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 Ke
st
, we nd:
sKe
st
+ 2Ke
st
= 0 s = 2
v
C
(t) = Ke
2t
and K is found from the initial condition:
v
C
(0
+
) = 4.5 = Ke
20
K = 4.5 v
C
(t) = 4.5e
2t
(V)
We can now calculate i from our node voltage equations:
v
A
(t) =
2
3
v
C
(t) = 3e
2t
(V)
i(t) =
v
A
(t)
12
= 0.25e
2t
(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:
12
1
F
i
2
6 12
12
1
F
12
1
F
6
2
6 || 12 =
4
We have solved this circuit before and the solution is:
v
C
(t) = v
C
(t = t
+
0
) e

t t
0

with = RC
t
0
= 0 and v
C
(t = t
+
0
) = v
C
(0
+
) = 4.5 and = RC =
6
12
= 0.5
v
C
(t) = 4.5e
2t
(V)
We now need to go back to the original circuit to calculate i, for example, by writing the
node-voltage equations and use v
C
to nd the other parameters as was done above.
i
t = 1 s
10 V 10 V
25 150 mH
50 50
L
+

i
i
10 V

50
L
L i=0
75 +

Example 2: The circuit is in DC steady-state


for t < 1 s. Find i
L
for t > 1
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 i
L
. Then,
KVL: 10 + 50i
L
= 0 i
L
= 0.2 A
No-jump condition leads to the initial condition for t > 1: i
L
(t = 1
+
) = i
L
(t = 1

) = 0.2 A.
We now proceed to solve t > 0 circuit:
MAE140 Notes, Winter 2001 80
i

50
L 10 V
75
10 V
150 mH
+

v
L
v
L
+

Method 1: Direct solution:


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:
KCL at v
L
:
v
L
75
+ i
L
+
v
L
(10)
50
= 0
2v
L
+ 150i
L
+ 3v
L
+ 30 = 0 5v
L
+ 150i
L
= 30
i-v Eq.: v
L
= 150 10
3
di
L
dt
5 150 10
3
di
L
dt
+ 150i
L
= 30
5 10
3
di
L
dt
+ i
L
= 0.2 and i
L
(t = 1
+
) = 0.2 A.
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 i
L,n
= Ke
st
:
5 10
3
sKe
st
+ Ke
st
= 0 s = 200
i
L,n
(t) = Ke
200t
To nd i
L,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 i
L,f
= A. Substituting in the
dierential equation, we get:
5 10
3
dA
dt
+ A = 0.2 i
L,f
= A = 0.2
i
L
(t) = i
L,n
+ i
L,f
= Ke
200t
0.2
Constant K is found from the initial conditions:
i
L
(t = 1
+
) = 0.2 = Ke
200
0.2 K = 0.4e
+200
i
L
(t) = 0.4e
200(t1)
0.2 (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
i
i
i
50
L
L
0.2
50 || 75= 150 mH
30

50
L 10 V
75 150 mH 75 150 mH
= 0.2
10
50
+

We have solve this circuit before and the solution is:


i
L
(t) = (i
0
i
s
)e

t t
0

+ i
s
t
0
= 1
i
0
= i
L
(t = t
+
0
) = +0.2 and i
s
= 0.2
=
L
R
=
150 10
3
30
= 5 10
3
i
L
(t) = [0.2 (0.2)]e
200(t1)
+ (0.2)
i
L
(t) = 0.4e
200(t1)
0.2 (A)
o
v
1
C
i
v
c
c
i
c
i=0
u(t)
+

v
+

R
+

+
Example 3: Integrator Find v
o
if v
C
(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 i
C
. We also
note the connection between output and inverting
input terminal so negative feedback exists:
Negative Feedback: v
n
= v
p
= 0
Ohms Law: Ri
C
= v
1
v
n
= v
1
Capacitor i-v: i
c
= C
dv
C
dt
= C
d(v
n
v
o
)
dt
= C
dv
o
dt
Substituting for i
C
from Ohms law into capacitor i-v equation, and integrating the resulting
equation we get:
v
1
R
= C
dv
o
dt

_
t
0
dv
o
dt

dt

=
1
RC
_
t
0
v
1
(t

)dt

v
o
(t) =
1
RC
_
t
0
v
1
(t

)dt

since v
C
(t = 0) = v
o
(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
o
v
1
i
c
i
c
i=0
u(t)
C
v
c
+

v
+

R
+

+
Example 4: Dierentiator: Find v
o
if v
C
(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 i
C
. We also
note the connection between output and inverting
input terminal so negative feedback exists:
Negative Feedback: v
n
= v
p
= 0
Ohms Law: Ri
C
= v
n
v
o
= v
o
Capacitor i-v: i
c
= C
dv
C
dt
= C
d(v
1
v
n
)
dt
= C
dv
1
dt
Substituting for i
C
from Ohms law into capacitor i-v equation, we get:

v
o
R
= C
dv
1
dt
v
o
(t) = RC
dv
1
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 v
o
(t) = 10v
s
(t) +
_
t
0
v
s
(t

)dt

.
o s
B
A
c
C= 1/R
+

R
v
+

R
R
v
R
R
+

R
v
v
v
A
=
_
t
0
v
s
(t

)dt

v
o
= v
A
v
B
= 10v
s
(t)+
_
t
0
v
s
(t

)dt

v
B
= 10v
s
(t)
MAE140 Notes, Winter 2001 83
Example: Design an OpAmp circuit which solves the dierential equation:
d
2
v
o
dt
2
+ 2
dv
o
dt
+ v
o
= v
s
(t).
Rewrite the equation in the form:
d
2
v
o
dt
2
= 2
dv
o
dt
v
o
+ v
s
(t)
The block diagram of the circuit is:
Inverting
Amp.
Inverting
Summer
dt
0
dv
v
0
dt
0
dv
v
0
v
s
v
s
0
dv
2
dt
2
Integrator Integrator
and the circuit itself is:
s
o
C= 1/R
C= 1/R
+

R
R
v
v
+

R R
R
0.5 R
+

R
+

R
MAE140 Notes, Winter 2001 84

You might also like