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.
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.
Predict, run, explain
- Predict whether the capacitor voltage changes instantly when the source falls.
- Run the baseline, then double capacitance. Compare both the lowest voltage and recovery peak.
- Lower series resistance. Explain how reduced damping changes the waveforms.
- 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.
| Quantity | Value (J) |
|---|---|
| Net source energy | 8865.58248 |
| Series resistor loss | 1867.21570 |
| Resistive load energy | 6989.86041 |
| Change in stored energy | 8.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
- Reference Python solver and independent closed-form, energy and step-refinement tests.
- PSCAD: introduction to time-domain electromagnetic transients (background; not validation of this model).
- PSCAD: solution timestep versus channel plot step.
- MathWorks: circuit differential equations and analytic solutions.