DATACENTER TWIN LAB

Advanced study / EMT fundamentals

Inside a voltage sag

Explore a 200 ms DC-link transient. Change the circuit, replay the waveforms and check where the stored energy goes.

Original lesson by Mohammad Rezwan Khan · Circuit model dc-link-rlc-v1

Open the interactive EMT study →

The starting experiment

An ideal 800 V DC source feeds a 0.08 Ω resistor and 0.6 mH inductor, then a 12 mF capacitor in parallel with a 12.8 Ω load. At 40 ms the source drops to 400 V. At 120 ms it returns to 800 V.

The bus starts at 795.03 V, falls to 178.95 V and reaches a recovery peak of 1014.10 V. Stored energy delays the response and produces ringing in this underdamped circuit.

Calculated bus voltage during a DC source sag and recovery, volts versus milliseconds0400800120004080120160200Bus voltage (V)Time (ms)
Generated from the same browser solver; shaded interval marks the source sag. The ideal source can absorb reverse current. Animation and chart samples are separate from integration steps.

Predict, run, explain

  1. Predict whether the capacitor voltage changes instantly when the source falls.
  2. Run the baseline, then double capacitance. Compare both the lowest voltage and recovery peak.
  3. Lower series resistance. Explain how reduced damping changes the waveforms.
  4. Halve the integration step and compare every plotted voltage sample. A small difference checks numerical convergence, not equipment fidelity.

The equations

Use amperes, volts, seconds, ohms, henries and farads internally:

L di/dt = Vsource − R i − Vbus
C dVbus/dt = i − Vbus/Rload
E = ½ L i² + ½ C Vbus²
ΔE = ∫ Vsource i dt − ∫ R i² dt − ∫ Vbus²/Rload dt

The initial DC state is i = 800/(0.08 + 12.8) A and Vbus = 12.8 i V. RK4 advances the electrical states and energy integrals together at 20 μs. Source events align with step boundaries. Output sampling is 100 μs; reported extrema use integration endpoints.

Computed baseline energy ledger over 200 ms
QuantityValue (J)
Net source energy8865.58248
Series resistor loss1867.21570
Resistive load energy6989.86041
Change in stored energy8.50636415
Numerical balance residual-1.37879852e-7

Reproduce the study

From a checkout containing this lesson:

python -m datacenter_twin.emt --preset voltage-sag --output outputs/emt.json

Download the ten input fields · Download all 2,001 samples and the energy ledger · Read the model and command guide.

What this circuit represents

A deliberately small electromagnetic-transient teaching circuit with an ideal DC-equivalent source, linear R-L-C elements and a constant-resistance load. It does not simulate converter switching, an AC grid, UPS controls, protection or a facility. Reverse source current and even negative capacitor voltage are allowed by the ideal equations; no diode or voltage clamp is modeled. Parameters are authored examples, with no PSCAD equivalence or measured calibration claim.

The twelve power-continuity lessons answer different questions about outage durations, capacity and finite battery energy.

Sources and validation