Sub topic 8
Finding current from voltage
This chapter assumes you know the law v = L di/dt, basic integrals, and the passive sign convention. It shows how to run the law backwards: given the voltage across an inductor, find the current through it.
From derivative to integral
The inductor law says the voltage is proportional to the rate of change of current:
v(t) = L di/dt
Rearrange it to di = (1/L) v dt. Integrate from a starting time t₀ to time t:
i(t) = i(t₀) + (1/L) ∫ v(τ) dτ, integrated from t₀ to t
The integration variable is written τ so it does not clash with the upper limit t. The term i(t₀) is the initial current. It is the constant of integration, and you must know it. Voltage alone cannot tell you the current, because many currents have the same derivative.
The integral is the area under the voltage curve. Positive voltage area raises the current, and negative voltage area lowers it. This is why inductor current is a memory of all past voltage, not a function of the present voltage.
Worked example: a voltage pulse
A 10 mH inductor has i(0) = 0. A voltage of 5 V is applied from t = 0 to t = 2 ms, then 0 V afterward.
For 0 ≤ t ≤ 2 ms:
i(t) = 0 + (1/0.01) × 5t = 500t
At t = 2 ms, i = 500 × 0.002 = 1 A. After 2 ms, the voltage is zero, so the area stops growing. The current stays at 1 A.
The same result in code:
L = 10e-3 # henries
v = 5.0 # volts, constant during the pulse
t = 2e-3 # seconds
i0 = 0.0 # initial current in amperes
i = i0 + (v / L) * t
print(i) # 1.0 ampereThe current held at 1 A with no voltage across the inductor. An ideal inductor keeps its current when the voltage is zero. This matches the DC behavior from the earlier chapter, where a steady current gives zero voltage.
Piecewise voltage waveforms
Real problems often give a voltage made of straight segments. Treat each segment separately. The final current of one segment becomes the initial current of the next.
L = 10e-3
# (voltage in volts, duration in seconds)
segments = [(5.0, 2e-3), (0.0, 1e-3), (-5.0, 1e-3)]
i = 0.0
t = 0.0
for v, dur in segments:
i += (v / L) * dur # area of this segment divided by L
t += dur
print(f"t = {t*1000:.0f} ms: i = {i:.2f} A")The output is 1.00 A, 1.00 A, and 0.50 A. The last segment removes 0.5 A because its area is −5 V × 1 ms = −5 mV·s, and dividing by L gives −0.5 A.
Common errors
- Forgetting i(t₀). Without the initial current, the answer is off by a constant.
- Using the wrong units. Convert millihenries and milliseconds before dividing. A mistake here gives answers off by factors of 1000.
- Dropping the sign. Check the reference direction. With the passive sign convention, positive v means current increasing in the direction of the reference arrow.
- Resetting at each segment. Carry the end current forward. Do not restart from zero.
Exercise
A 40 mH inductor has an initial current of 0.2 A. A constant 3 V is applied for 8 ms, then the voltage changes to -2 V for 10 ms. What is the current at the end?
Show answer
First segment: Δi = (3 / 0.04) × 0.008 = 0.6 A, so i = 0.2 + 0.6 = 0.8 A. Second segment: Δi = (-2 / 0.04) × 0.010 = -0.5 A. Final current = 0.8 - 0.5 = 0.3 A.