Ferroresonance in a nonlinear RLC circuit

series R–L feeding a parallel node: C ∥ saturable L(λ) ∥ Rp · real-time RK4
V node pk
0.00 pu
Flux pk
0.00 λ
Mode
—
nominal

Circuit current flow · node glow · core saturation

Oscilloscope time → cycles

Vsrc Vnode λ iL

Saturation characteristic iL = aλ + bλq

Phase portrait v vs λ · ○ = once-per-cycle sample

Ignition curve — Vnode,pk vs Vsource the ferroresonance jump & hysteresis (uses current C, L, Rp, core)

XC = 0.63
XLs = 0.10
Xm(unsat) = 11.1
iL pk = 0.0
V node rms = 0.00
Export
The model

State equations

Three coupled first-order ODEs carry the circuit state [is, v, λ] — series current, node voltage, and core flux linkage. Colours match the oscilloscope traces.

Ls · dis/dt = Vm sin ωt − Rs is − v  series loop: source drives Rs–Ls against the node
C · dv/dt = is − iL(λ) − v/Rp  KCL at node A: capacitor, magnetizing branch, loss
dλ/dt = v  flux linkage is the integral of coil voltage

Integrated with fixed-step RK4 at Δt = 0.004 (≈1570 steps per cycle), verified step-size-robust so the jumps and chaos are real features of the equations, not numerical artifacts.

The nonlinearity (the whole event)

The magnetizing branch is a saturable inductor. Below the knee the linear term dominates and it looks like a large fixed inductance; past the knee the power term explodes and it draws huge current for tiny extra flux — the core has saturated.

iL(λ) = a·λ + b·sign(λ)·|λ|q
b = a / λk(q−1)  pins the knee at λ = λk

Pinning b this way makes the two terms equal exactly at the knee flux, so slope a and knee λk move independently and the knee is a real physical location.

Why it resonates

The parallel C sees a magnetizing reactance that changes with voltage amplitude. Below the knee Xm is enormous and nowhere near XC — no resonance. Drive the node hard enough to saturate the core and Xm collapses toward XC; the parallel tank crosses resonance and sustains overvoltage.

Because the reactance depends on the very state it controls, you get the jump, the hysteresis, and the subharmonic and chaotic orbits. Normalized to ω = 1 pu, so one source cycle = 2π time units and the scope's x-axis is t/2π.

The plots

Circuit schematic

Wire dashes move at a rate set by instantaneous is, so current visibly stalls and surges. Node A glows with |v|; the iron core glows once |λ| passes the knee — that glow is the saturation event that triggers everything.

Oscilloscope

Time domain, x-axis in cycles. Source and node voltage always plot; flux λ and current iL are toggle-on. Watch iL: near-zero most of the cycle, then a sharp saturation spike — the classic pulsed magnetizing-current signature.

Saturation characteristic

The iL(λ) curve with the live operating point riding on it. It sits on the gentle linear stretch near the origin in normal operation and swings out onto the steep saturated tails during ferroresonance — a direct picture of the nonlinearity above.

Phase portrait

v vs λ — the circuit's own state space, time implicit in the fading trail. Amber dots are a once-per-cycle (Poincaré) strobe: one dot = period-1, n dots = 1:n subharmonic, a scattered cloud = chaos. The cleanest read of the operating mode.

Ignition curve & header metrics

Vnode,pk vs Vsource, swept up then back down with the current circuit. The gap between the ascending and descending branches is the hysteresis loop — the band of source voltages where a nominal and a ferroresonant state both stably exist, and history decides which one you're in. This is the single plot that says "ferroresonance" rather than plain resonance. Up top, V node pk is overvoltage severity, Flux pk is saturation depth, Mode is the live phase-portrait classification, and the badge flips nominal → ferroresonant → chaotic off those.

The options

The four presets

Each button loads a complete, numerically verified parameter set — a known operating point on the map from calm to chaos. The screenshot shows them across the top of the control panel.

Normal
Low drive (0.7 pu) on a stiff core. The operating point stays on the linear part of the saturation curve, the node sits near 1 pu, and the phase portrait collapses to a single Poincaré dot. Your healthy reference state.
Fundamental
Strong drive (2 pu) into a soft core (a = 0.09, q = 7) with C tuned near resonance. Period-1 but ~5 pu: the node locks onto one large odd-harmonic-rich orbit, iL spikes ~20×, and the operating point slams onto the saturated tails every cycle. One Poincaré dot, far from the origin.
Subharmonic
Sharp core (q = 11), moderate drive. The orbit needs several source cycles to close, so the node rings at a submultiple of source frequency — a lower-frequency envelope on the scope and a small finite cluster of Poincaré dots. Stable, not chaotic (IC-divergence ≈ 0).
Chaotic
Sharp core with very low loss (Rp = 1000). Aperiodic and broadband: the Poincaré dots never repeat and smear into a cloud — a slice of the strange attractor — confirmed by initial-condition divergence ≈ 1.65. Bounded but never repeating.

Sliders

V source
Drive amplitude Vm (0.2–3 pu). Push through ~1.8 pu on a saturable core to trip the jump.
Parallel C
Tank capacitance (0.2–3 pu). Sets XC = 1/ωC — the saturated Xm the core must reach for resonance.
Series L
Source-side Ls (0.03–0.5 pu). Series reactance feeding the node; larger softens and detunes.
Loss Rp
Parallel damping, log-scaled 0.4–1200 pu. High Rp (low loss) lets subharmonics and chaos persist; drop it low and the loss current v/Rp heavily damps the tank — the same effect as loading a VT secondary with a resistor, the classic ferroresonance mitigation. On the Fundamental preset, sliding Rp down from 40 toward ~1 watches the ~5 pu overvoltage give way.
Sharpness q
Saturation exponent (3–13). Soft cores give clean fundamental mode; sharp cores unlock stable subharmonics and chaos.
Knee λk
Flux at which saturation sets in (0.7–1.6). Lower knee = easier to tip into ferroresonance.

Buttons, toggles & readouts

Pause / Run
Space bar also toggles. Reset returns to rest so you can re-approach a regime cleanly.
⚡ Switching event
Injects a flux/voltage surge — the realistic field trigger (breaker or pole operation). Fire it on a "normal" case and watch it latch into sustained overvoltage with parameters unchanged: ferroresonance is state-history dependent, not just a parameter condition.
Sweep
Runs the up/down sweep that draws the ignition/hysteresis curve for the current circuit.
λ · iL · speed
Toggle flux and magnetizing-current traces on the scope. The speed slider (0.1–4×) sets how fast simulation time advances per real second — slow it to watch the saturation transition frame by frame, or speed it up to reach steady state quickly. Integration step size is unchanged, so accuracy stays the same; only the playback rate changes.
Readouts
XC = 1/ωC, XLs = ωLs, Xm(unsat) = 1/a, iL pk, and V node rms. Watch XC against Xm: the unsaturated gap is the distance the saturating core has to close to reach resonance.
Export
Record any single plot, the animated circuit schematic, or a composite — circuit + scope, scope + saturation + phase, or all four (circuit, oscilloscope, saturation, phase) tiled 2×2 — to an animated GIF or a video clip (1–8 s), at a selectable output width (480 / 720 / 1080 px). GIF is a self-contained encoder that autoplays and loops inline on social; video uses the browser's native recorder (MP4 where supported, otherwise WebM) for smaller, higher-quality files. Capture follows what's on screen, so the current mode and speed are what get recorded.