RL Circuit Current Calculator (Transient Simulator)
TL;DR: This calculator simulates the transient current i(t) of a series RL circuit driven by a constant (step) voltage. It reports the key summary values (τ = L/R, ifinal = V/R) and numerically integrates the differential equation so you can plot the full curve and export samples to CSV.
What this simulator calculates
A series resistor–inductor (RL) circuit appears in motor windings, solenoids/actuators, relays, and power electronics. When a DC source is applied, the inductor resists abrupt changes in current, so the current rises (or falls) smoothly toward a steady value rather than stepping instantly.
This page models an ideal series RL connected to a constant voltage source at t = 0 with an optional initial current I₀. You choose the simulation time step Δt and total duration T to control the plotted timeline and numerical resolution.
Variables (inputs)
- V (V): applied (step) voltage, assumed constant during the simulation.
- R (Ω): series resistance (winding resistance + any explicit series resistor).
- L (H): inductance.
- I₀ (A): initial current at t = 0.
- Δt (s): numerical integration time step (smaller usually means higher accuracy, more points).
- T (s): total simulated time window.
Governing equation (RL step response)
Applying Kirchhoff’s Voltage Law (KVL) around the loop for a series RL driven by a constant voltage V gives:
Rearrange to the standard first-order ODE:
di/dt = (V − R·i) / L
Analytical solution (useful checkpoints)
For constant V, the closed-form solution is:
i(t) = ifinal + (I₀ − ifinal)·e−t/τ
where:
- ifinal = V/R (steady-state current as t → ∞, for R > 0)
- τ = L/R (time constant, for R > 0)
Interpretation of τ: after one time constant, the current has moved about 63.2% of the way from I₀ to ifinal. After about 5τ, it is very close to steady state (~99.3%).
How to use the simulator
- Enter V, R, L, and an optional I₀.
- Choose Δt small enough to capture the curve shape (a common rule is Δt ≲ τ/100 for smooth plots).
- Set T to the horizon you care about (often 3τ to 5τ to see settling).
- Press Play to animate; Pause to inspect; Reset to restart.
- Use CSV export to download time/current samples for spreadsheets or lab comparison.
Interpreting results
- Final current (V/R): the plateau the curve approaches for a DC step (assuming R is not zero).
- Rise speed (set by τ = L/R): larger L slows the change; larger R speeds the settling but lowers the final current.
- Energy in the inductor: the magnetic energy stored is E = ½·L·i². If the UI shows an energy indicator, it should track this relationship (quadratic with current).
- Effect of I₀: if I₀ is not zero, the waveform starts from that value and exponentially moves toward V/R.
Worked example (using the defaults)
Inputs: V = 5 V, R = 2 Ω, L = 0.5 H, I₀ = 0 A.
- Final current: ifinal = V/R = 5/2 = 2.5 A
- Time constant: τ = L/R = 0.5/2 = 0.25 s
Analytical checkpoints:
- At t = τ = 0.25 s: i(t) = 2.5·(1 − e−1) ≈ 1.58 A
- At t = 3τ = 0.75 s: i(t) = 2.5·(1 − e−3) ≈ 2.38 A
- At t = 5τ = 1.25 s: i(t) ≈ 2.5·(1 − e−5) ≈ 2.48 A
If you set T to at least ~1.25 s, you’ll see the curve nearly reach steady state. If you set T = 0.5 s (the default), you’ll still see a substantial rise (about 86.5% of final by 2τ).
Quick comparisons
| Change | What happens to τ = L/R? | What happens to ifinal = V/R? | What you see on the plot |
|---|---|---|---|
| Increase L | Increases (slower) | No change | Slower rise/decay, same final level |
| Increase R | Decreases (faster) | Decreases | Settles faster but to a lower plateau |
| Increase V | No change | Increases | Same shape vs time, higher plateau |
| Nonzero I₀ | No change | No change | Curve starts at I₀ and moves toward V/R |
Assumptions & limitations (important)
- Ideal inductor (constant L): real inductors can saturate; L can drop at high current.
- No parasitics: ignores winding capacitance and leakage, so it will not show ringing/oscillation.
- Constant step voltage: source impedance, PWM drives, and supply droop are not modeled unless you fold them into an effective R or adjust V.
- Resistance is constant: temperature rise can increase R and reduce ifinal over time.
- R > 0 required for τ and ifinal: as R → 0, τ → ∞ and ifinal becomes unbounded in the ideal model; real circuits are always limited by supply and parasitics.
- Numerical accuracy depends on Δt: too-large steps can distort the curve and energy estimate. Reduce Δt if the plot looks jagged or overshoots.
FAQ
What does the time constant mean in plain terms?
τ = L/R sets how quickly current changes. Roughly: 1τ gets you 63% of the way to the final value; 5τ is “basically settled.”
Why does Δt matter?
The simulator integrates di/dt in discrete steps. Smaller Δt tracks the continuous solution more closely, especially when τ is small or you want accurate energy values.
Can I use this for AC?
Not directly. This tool is for a DC step (transient) with constant V. AC steady-state RL analysis uses impedance and phase, which is a different model.
Flux Finesse Mini-Game
Practice throttling an RL stage to stay inside the current window. Drag or tap the canvas (or use arrow keys) to steer the switch duty and keep the inductor hugging its target band as load pulses and resistance shifts roll in.
