Transformer Inrush Current & Harmonic Generation

Interactive Demonstration of Non-Linear Magnetization and Harmonic Analysis

Voltage & Flux Waveforms

B-H Hysteresis Curve (Animated)

🎯 Drag the control points to reshape the B-H curve

Excitation Current

Harmonic Decay Over Time

Harmonic Spectrum (FFT) - Animated

Harmonic Phasors (Head-to-Tail)

Why Harmonics are Generated:

1. Non-Linear Saturation: The transformer core's B-H relationship is highly non-linear. When flux enters saturation, small changes in flux require enormous magnetizing current.

2. Asymmetric Operation: During inrush, if the transformer is switched on with residual flux in the core, the flux waveform becomes asymmetric, saturating heavily on one side.

3. DC Offset & 2nd Harmonic: The asymmetric current creates a DC offset component. In frequency domain, this asymmetry manifests as even harmonics, especially the 2nd harmonic. This is why it's called "quasi-DC" - it's a low-frequency component riding on the DC offset.

4. Current Pulses: The excitation current appears as sharp pulses each half-cycle when the core saturates, rich in harmonics extending to high orders.

Why Harmonics Decay:

5. Resistive Damping: The winding resistance causes the DC flux offset to decay exponentially with time constant τ = L/R. As the DC component decays, the flux becomes more symmetric.

6. Harmonic Decay: As flux symmetry is restored, even harmonics (especially 2nd) decay toward zero. The fundamental component remains as the transformer reaches steady-state normal magnetization.

7. Time Constant: Shorter τ means faster decay. Larger transformers have higher L/R ratios and thus longer decay times (can be several seconds in practice).

Real/Imaginary FFT Components: The real part represents in-phase components, imaginary represents quadrature. The 2nd harmonic typically has large real component indicating the DC-like offset behavior.

🎯 Interactive B-H Curve: Drag any of the 8 control points to reshape the magnetization curve! Try making it sharper (harder saturation), flatter (softer material), or asymmetric to see different inrush behaviors and harmonic content.

Mathematical Model & Calculations:

Voltage Waveform:

v(t) = Vexcitation × sin(ωt + θswitch)

Where θswitch is the switching angle in radians

Flux Calculation:

φ(t) = φAC(t) + φDC(t)

φAC(t) = -Vexcitation × cos(ωt + θswitch)

φDC(t) = φDC,initial × e-t/τ

φDC,initial = φresidual + Vexcitation × cos(θswitch)

Time constant: τ = L/R (in cycles, default 5.0)

B-H Magnetization Curve:

Default: B = tanh(H / ksat)

Where ksat is the saturation factor (controls curve sharpness)

Interactive: Piecewise linear interpolation between 8 control points

Inverse function H = f-1(B) computed via linear interpolation

Current Calculation:

i(t) = H(t) = f-1(φ(t))

Current is obtained by inverting the B-H curve at each flux value

FFT Analysis:

Recursive Cooley-Tukey FFT algorithm (radix-2)

DC Component: X[0] / N

Harmonic Magnitude: |X[k]| = √(Re[k]² + Im[k]²) × (2/N) for k ≥ 1

Analysis performed per cycle (500 samples/cycle)

Zero-padding applied for incomplete cycles

Phasor Representation:

Each harmonic: Hk = Re[k] + j·Im[k]

Head-to-tail addition shows vector sum of all components

Phase angle: θk = atan2(Im[k], Re[k])

Key Assumptions & Simplifications:

1. Single-Phase Model: This simulation represents a single-phase transformer. Three-phase effects (phase shifts, zero-sequence) are not modeled.

2. Ideal Voltage Source: The supply voltage is assumed constant and unaffected by the inrush current. In reality, source impedance would cause voltage dips.

3. Linear Resistance: Winding resistance R is constant. In reality, resistance increases with temperature and frequency (skin effect).

4. No Core Losses: Hysteresis and eddy current losses are neglected. The B-H curve is single-valued (no hysteresis loop width).

5. Uniform Core: The entire core is assumed to have identical magnetic properties. Air gaps and construction details are ignored.

6. No Load Conditions: The transformer is unloaded (no secondary current). Load would affect the inrush behavior.

7. Instantaneous Switching: The circuit breaker closes instantaneously at the specified angle. Real breakers have finite closing times.

8. No Remanence Variation: Residual flux is uniform. In practice, it varies with core geometry and previous operating history.

9. Frequency Domain Analysis: FFT assumes periodic signals. During transients, the signal is not truly periodic, so spectral leakage occurs.

10. Per-Unit System: All values are normalized (per-unit). Actual magnitudes depend on transformer rating, voltage level, and core design.

Typical Real-World Values:

• Inrush current: 8-12× rated current (can reach 20× for large transformers)

• 2nd harmonic content: 15-60% of fundamental during peak inrush

• Decay time constant: 0.1-10 seconds (larger for bigger transformers)

• Saturation flux: ~1.4-1.8 pu (varies by core material)