You are on page 1of 12

23.10.22, 20:04 5.

Application of ODEs: Series RL Circuit

5. Application of Ordinary Differential Equations: Series RL Circuit

RL circuit diagram

The RL circuit shown above has a resistor and an inductor connected in series. A constant voltage V is applied when
the switch is closed.

The (variable) voltage across the resistor is given by:

V R = iR ​

The (variable) voltage across the inductor is given by:

di
VL =L
dt
​ ​

Kirchhoff's voltage law says that the directed sum of the voltages around a circuit must be zero. This results in the
following differential equation:

di
Ri + L =V
dt

Once the switch is closed, the current in the circuit is not constant. Instead, it will build up from zero to some steady
state.

Solving the DE for a Series RL Circuit


di
The solution of the differential equation Ri + L = V  is:
dt

V
i= (1 − e−(R/L)t )
R

Proof

We start with:

di
Ri + L =V
dt

https://www.intmath.com/differential-equations/5-rl-circuits.php 1/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit

Subtracting Ri from both sides:

di
L = V − Ri
dt

Divide both sides by L:

di V − Ri
=
dt L

Multiply both sides by dt and divide both by (V - Ri):

di dt
=
V − Ri L

Integrate (see Integration: Basic Logarithm Form):

di dt
∫ =∫
V − Ri L
​ ​

ln (V − Ri) 1
− = t+K
R L
​ ​

Now, since i = 0 when t = 0, we have:

ln  V
K=−
R

Substituting K back into our expression:

ln (V − Ri) 1 ln V
− = t−
R L R
​ ​ ​

Rearranging:

ln  V ln (V − Ri) 1
− = t
R R L
​ ​ ​

Multiplying throughout by -R:

R
− ln  V + ln (V − Ri) = − t
L

Collecting the logarithm parts together:

V − Ri R
ln ( )=− t
V L
​ ​

Taking "e to both sides":

V − Ri
= e−(R/L)t
V

R
1− i = e−(R/L)t
V

Subtracting 1 from both sides:

R
− i = −1 + e−(R/L)t
V

V
Multiplying both sides by −( ):
R

V
i= (1 − e−(R/L)t )
R

https://www.intmath.com/differential-equations/5-rl-circuits.php 2/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit

[We did the same problem but with particular values back in section 2. Separation of Variables]

Here is the graph of this equation:

V
R

t
τ 2τ 3τ 4τ 5τ 6τ
V −(R/L)t
Graph of i = (1 − e ).
R

V
The plot shows the transition period during which the current adjusts from its initial value of zero to the final value  ,
R

which is the steady state.

The Time Constant


The time constant (TC), known as τ, of the function

V
i= (1 − e−(R/L)t )
R

R L
is the time at which   is unity ( = 1). Thus for the RL transient, the time constant is τ =  seconds.
L R
​ ​

NOTE: τ is the Greek letter "tau" and is not the same as T or the time variable t, even though it looks very similar.

At 1 τ

1 − e−(R/L)t

= 1 − e−1

= 1 − 0.368

= 0.632
At this time the current is 63.2% of its final value.

Similarly at 2 τ,

1 − e−2 = 1 − 0.135 = 0.865


The current is 86.5% of its final value.

After 5 τ the transient is generally regarded as terminated. For convenience, the time constant τ is the unit used to plot
the current of the equation

V
i= (1 − e−(R/L)t )
R

https://www.intmath.com/differential-equations/5-rl-circuits.php 3/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit
L
That is, since τ = , we think of it as:
R

V
i= (1 − e−t/τ )
R

Let's now look at some examples of RL circuits.

Example 1

An RL circuit has an emf of 5 V, a resistance of 50 Ω, an inductance of 1 H, and no initial current.

Find the current in the circuit at any time t. Distinguish between the transient and steady-state current.

Answer

Method 1 - Solving the DE

di
The formula is: Ri + L =V
dt

di
After substituting: 50i + =5
dt

We re-arrange to obtain:

di
+ 50i = 5
dt

This is a first order linear differential equation.

We'll need to apply the formula for solving a first-order DE (see Linear DEs of Order 1), which for these variables will
be:

ie∫ P dt = ∫ (Qe∫ P dt ) dt

We have P = 50 and Q = 5.

We find the integrating factor:

I.F. = e∫ 50 dt = e50t
So after substituting into the formula, we have:
5 50t 1 50t
(i)(e50t ) = ∫ (5)e50t dt  = e + K  = e +K
50 10
​ ​

1
When t = 0, i = 0, so K = − = −0.1.
10

This gives us: i = 0.1(1 − e−50t )


−50t
The transient current is: i = 0.1(1 − e ) A.

The steady state current is: i = 0.1 A.

Method 2: Using the Formula

NOTE: We can use this formula here only because the voltage is constant. This formula will not work with a variable
voltage source.

We have the following general formula:

V
i= (1 − e−(R/L)t )
R

https://www.intmath.com/differential-equations/5-rl-circuits.php 4/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit

So in this case:
5
i= (1 − e−50t ) = 0.1(1 − e−50t )
50

i
0.1

0.08

0.06

0.04

0.02
t

0.05 0.1 0.15 0.2


Graph of the current at time t, given by i = 0.1(1 − e−50t ).

In this example, the time constant, TC, is

L 1
τ= = = 0.02
R 50
​ ​

So we see that the current has reached steady state by t = 0.02 × 5 = 0.1 s.

Method 3: Using Scientific Notebook's Solve ODE

If you have Scientific Notebook, proceed as follows:

This DE has an initial condition i(0) = 0. We set up a matrix with 1 column, 2 rows.

For the answer: Compute → Solve ODE... → Exact

Example 2

A series RL circuit with R = 50 Ω and L = 10 H has a constant voltage V = 100 V applied at t = 0 by the closing of a
switch.

Find

(a) the equation for i (you may use the formula rather than DE),

(b) the current at t = 0.5 s

(c) the expressions for VR and VL

(d) the time at which VR = VL

Answer

(a) We solve it using the formula:

V
i= (1 − e−(R/L)t )
R

We have:
100
i= (1 − e−5t )
50

= 2(1 − e−5t )

https://www.intmath.com/differential-equations/5-rl-circuits.php 5/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit
i
2

1.5

0.5
t

0.2 0.4 0.6 0.8 1 1.2

Graph of the current at time t, given by i = 2(1 − e−5t ).

(b) At t = 0.5,

i = [2(1 − e−5t )]t=0.5 = 1.8358 ​

(c) VR and VL are given by:

V R = iR ​

= 2(1 − e−5t ) × 50

= 100(1 − e−5t )
di
VL =L
dt
​ ​

d
= 10 2(1 − e−5t )
dt

= 100e−5t

(d) To find the required time, we need to solve when V R = V L . ​ ​

V R = V L  when
​ ​

100(1 − e−5t ) = 100e−5t

1 − e−5t = e−5t

2e−5t = 1

e−5t = 0.5

−5t = ln  0.5 = −0.69315


So
−0.69315
t= = 0.13863s
−5

Substituting this value into VR gives:

V R = V L  = [100e−5t ]t=0.13863  = 50.000 V


​ ​ ​

The graph of VR and VL is as follows:

https://www.intmath.com/differential-equations/5-rl-circuits.php 6/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit

V
100

80

60

40

20
t
0.2 0.4 0.6 0.8 1 1.2
Graph of the voltages V R = 100(1 − e−5t ) (in green), and V L = 100e−5t  (in gray).
​ ​

The time constant, TC, for this example is:

L 10
τ= = = 0.2
R 50
​ ​

NOTE (just for interest and comparison): If we could not use the formula in (a), and we did not use separation of
variables, we could recognise that the DE is 1st order linear and so we could solve it using an integrating factor.

We use the formula:

di
Ri + L =V
dt

The required DE is:

di
10 + 50i = 100
dt

di
+ 5i = 10
dt

I.F. = e∫ 5 dt = e5t
10 5t
ie5t = 10 ∫ e5t dt =  e + K = 2e5t + K
5

Since i(0) = 0, we have K = −2.


−5t
So i = 2(1 − e )
It works :-)

Two-mesh Circuits
The next two examples are "two-mesh" types where the differential equations become more sophisticated. We will
use Scientific Notebook to do the grunt work once we have set up the correct equations.

Example 3

In the two-mesh network shown below, the switch is closed at t = 0 and the voltage source is given by V = 150 sin
1000t V. Find the mesh currents i1 and i2 as given in the diagram.

https://www.intmath.com/differential-equations/5-rl-circuits.php 7/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit

Answer

We have not seen how to solve "2 mesh" networks before. We consider the total voltage of the inner loop and the
total voltage of the outer loop. We then solve the resulting two equations simultaneously.

di
We use the basic formula: Ri + L =V
dt

Considering the inner loop:

di1
10(i1 + i2 ) + 5i1 + 0.01 = 150 sin 1000t

dt
​ ​ ​ ​

di1
15 i1 + 10 i2 + 0.01 = 150 sin 1000t

dt
​ ​ ​

di1
3i1 + 2i2 + 0.002 = 30 sin 1000t    … (1)

dt
​ ​ ​

Now, considering the outer loop:

10(i1 + i2 ) + 5i2 = 150 sin 1000t


​ ​ ​

10i1 + 15i2 = 150 sin 1000t


2i1 + 3i2 = 30 sin 1000t    … (2)


​ ​

We now solve (1) and (2) simultaneously:

(1) × 3 − (2) × 2 gives:

di1
5i1 + 0.006 = 30 sin 1000t
dt
​ ​

Solving this using SNB with the boundary condition i1(0) = 0 gives:

i1 (t) = −2.95 cos 1000t+ 2.46 sin 1000t+ 2.95e−833t


https://www.intmath.com/differential-equations/5-rl-circuits.php 8/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit

The graph of our answer is:

i
4

0.01 0.02

-2

-4

Graph of current i1  at time t. It's in steady state by around t = 0.007.


Now, from equation (2), we have:


1
i2 = (30 sin 1000t − 2i1 )
3
​ ​ ​

1
= (30 sin 1000t−  2[−2.95 cos 1000t+  2.46 sin 1000t+  2.95e−833t ])
3

= 8.36 sin 1000t+ 1.97 cos 1000t− 1.97e−833t

The graph of i2 is:

i
8
6
4
2
t

0.01 0.02
-2
-4
-6
-8

Graph of current i2  at time t. It's also in steady state by around t = 0.007.

Example 4

The switch is closed at t = 0 in the two-mesh network shown below. The voltage source is given by V = 30 sin 100t V.
Find the mesh currents i1 and i2 as given in the diagram.

https://www.intmath.com/differential-equations/5-rl-circuits.php 9/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit

Answer

We solve this 2 ways:

1. Setting up the equations and getting SNB to help solve them.

2. Directly using SNB to solve the 2 equations simultaneously.

Solution 1

di
We use the basic formula: Ri + L =V
dt

Considering the left-hand loop, the flow of current through the 8 Ω resistor is opposite for i1  and i2 . We regard i1  as ​ ​ ​

having positive direction:

di1
0.2 + 8(i1 − i2 ) = 30 sin 100t    … (1)

dt
​ ​ ​

Now, we consider the right-hand loop and regard the direction of i2  as positive: ​

8(i2 − i1 ) + 4i2 = 0
​ ​ ​

12i2 − 8i1 = 0
​ ​

2
i2 = i1    … (2)
3
​ ​ ​

2
We now solve (1) and (2) simultaneously by substituting i2 = i1  into (1) so that we get a DE in i1  only:
3
​ ​ ​ ​

di1 2
0.2 + 8(i1 − i1 ) = 30 sin 100t

dt 3
​ ​ ​ ​

di1 8
0.2 + i1 = 30 sin 100t

dt 3
​ ​ ​

Solving using Scientific Notebook gives:

i1 (t) = −1.474 cos 100t+ 0.197 sin 100t + 1.474e−13.3t


The graph of our solution is:

https://www.intmath.com/differential-equations/5-rl-circuits.php 10/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit
i

0.1 0.2 0.3 0.4 0.5

-1

Graph of current i1  at time t. It's in steady state by around t = 0.25.


Now, from equation (2), we have:


2
i2 = i1
3
​ ​ ​

2
= (−1.474 cos 100t+  0.197 sin 100t+  1.474e−13.3t )
3

= −0.983 cos 100t+ 0.131 sin 100t+ 0.983e−13.3t


2
This is of course the same graph, only it's   of the amplitude:
3

0.1 0.2 0.3 0.4 0.5

-1

Graph of current i2  at time t. It's also in steady state by around t = 0.25.

Solution 2 - Using SNB directly

If we try to solve it using Scientific Notebook as follows, it fails because it can only solve 2 differential equations
simultaneously (the second line is not a differential equation):

di1
0.2 + 8(i1 − i2 ) = 30 sin 100t

dt
​ ​ ​

2
i2 = i1
3
​ ​ ​

i1 (0) = 0

i2 (0) = 0

But if we differentiate the second line as follows (making it into a differential equation so we have 2 DEs in 2
unknowns), SNB will happily solve it using Compute → Solve ODE... → Exact:
di1
0.2 + 8(i1 − i2 ) = 30 sin 100t

dt
​ ​ ​

https://www.intmath.com/differential-equations/5-rl-circuits.php 11/12
23.10.22, 20:04 5. Application of ODEs: Series RL Circuit
di2 2 di1
=
​ ​

dt 3 dt
​ ​

i1 (0) = 0

i2 (0) = 0

Exact solution is:

i1 (t) = −4.0 × 10−9  +1.4738e−13.333t  −1.4738 cos 100.0t +0.19651 sin 100.0t


i2 (t) = 0.98253e−13.333t  −3.0 × 10−9  −0.98253 cos 100.0t +0.131 sin 100.0t


−9 −9
Note the curious extra (small) constant terms −4.0 × 10  and −3.0 × 10 .

https://www.intmath.com/differential-equations/5-rl-circuits.php 12/12

You might also like