Selective Harmonic Elimination Explained: From the Equations to a Deterministic Solver
For forty years, Selective Harmonic Elimination has worked exactly the same way: pick a target harmonic set, write the SHE equations, hand them to a Newton-Raphson solver, and ship whatever the first converged solution happens to be. That workflow is about to change.
What is Selective Harmonic Elimination?
Selective Harmonic Elimination (SHE) is a power-converter modulation technique that drives a target set of low-order harmonics to exactly zero — not "very small," not "below a threshold," but mathematically zero — by carefully choosing the switching angles of the inverter waveform. The technique is used in high-power applications where the cost of a passive harmonic filter is prohibitive: hyperscale UPS systems, traction inverters, motor drives in heavy industry, megawatt-class renewable inverters, and military power systems.
Compared to PWM modulation, SHE typically operates the inverter at a much lower switching frequency (often 250–750 Hz on a 60 Hz fundamental, vs. 5–20 kHz for PWM). That lower switching frequency means lower switching losses, lower EMI, and the ability to use cheaper, more rugged switches. The trade-off is computational: instead of a fixed carrier, the modulator must solve a system of nonlinear equations every time the modulation index or operating point changes.
Those equations are what this article is about.
The math: a Fourier coefficient game
Take a quarter-wave-symmetric square waveform with N switching transitions per quarter-cycle, each at angle αi. The amplitude of the k-th harmonic in the Fourier expansion of that waveform is:
for i = 1, 2, ..., N
SHE writes one equation per harmonic you care about. The fundamental gets pinned to your desired modulation index M:
Each unwanted low-order harmonic gets pinned to zero:
h7 = 0
h11 = 0
h13 = 0
... (so on, depending on how many angles you have)
With N switching angles and N equations (1 fundamental + N−1 harmonics zeroed), this is a square nonlinear system. Solve it for the αi values that make every equation hold simultaneously.
The classical approach — and where it falls apart
The textbook method has been stable since the 1970s: pick an initial guess for the angles, run Newton-Raphson, and accept whatever it converges to. Modern implementations use fsolve in MATLAB or scipy.optimize.fsolve in Python — both are essentially Newton-Raphson with line search.
This works. But it has three structural problems that have been understood and tolerated for decades:
1. Multiple solutions exist, but you only get one
For any meaningful SHE problem with N ≥ 5, there are typically multiple valid switching-angle sets that satisfy the equations. They have different physical properties: different sideband content, different DC-link RMS stress, different torque ripple in motor applications, different flux-trajectory shapes. Newton-Raphson finds one solution — whichever one your initial guess was closest to. The other valid solutions exist but are simply never returned. The engineer never sees them. Years of engineering optimization is invisibly bounded by which initial guess the previous engineer happened to use.
2. Convergence is fragile near the modulation-index boundaries
For M values approaching the practical limit (typically M > 0.9 or so), Newton-Raphson convergence becomes unreliable. The solver chases a moving target as the system's nonlinearity intensifies. Engineers cope with this by hand-tuning initial guesses for problem regions, often as lookup tables of "known-good" starting points — an entire sub-discipline of practitioner knowledge built around the solver's instability rather than the physics.
3. There's no certification of the solution
Newton-Raphson returns a vector of angles and a residual. If the residual is below tolerance, the solver declares victory. But "below tolerance" is not the same as "physically realizable on the hardware." A converged angle set can still violate quarter-wave symmetry by floating-point noise, fall outside the modulator's representable angular grid, produce a switching pattern that's too fast for the gate driver, or cause unnecessary commutation losses through suboptimal ordering. None of this is checked; certification has historically been done by simulation after the fact, in a separate workflow.
What "deterministic" actually means here
A deterministic SHE solver is one that, for any given problem specification, returns:
- Every viable solution, not just the first one your initial guess happened to find
- A certified set of switching angles, hardware-viable on a specified modulator and gate driver
- Bit-for-bit reproducible output from a fixed master seed — same problem in, same solutions out, every time
- An external verification path, so the engineer can confirm independently that the solution is correct (typically by computing the Fourier coefficients of the resulting waveform and checking they match the target)
The first property is the one that changes the engineering workflow. When the solver returns ten valid solutions instead of one, the engineer's job changes from "solve the equations" (which the computer now handles deterministically) to "choose the optimization target." Total harmonic distortion? Weighted THD? Torque ripple? DC-link RMS stress? Flux-trajectory circularity? Each of those is a different post-processing scoring function applied to the menu of valid solutions, and the engineer can re-prioritize without re-solving.
This is the practical difference: instead of running the solver from scratch every time the optimization criterion changes, the engineer enumerates all valid solutions once, then ranks them by whichever physical property matters for the application. The expensive math is amortized across every objective the engineer might want to evaluate.
The five physical optimization objectives
Once you have every viable solution in hand, ranking them is the engineer's choice. The five objectives that matter in practice:
Total Harmonic Distortion (THD)
The classical metric: the RSS of all non-fundamental harmonics, expressed as a percentage of the fundamental. Required for IEEE 519 compliance in grid-tied inverters and for most utility interconnection standards.
Weighted THD
Not all harmonics are equally damaging. The 5th and 7th cause torque ripple in induction motors. The 11th and 13th cause heating in transformers. Weighted THD applies harmonic-specific weights to capture the actual physical damage rather than just the RSS magnitude. Industry-standard weights are well-established for motor drive (NEMA), transformer (IEEE), and grid applications.
Torque ripple
Specific to motor-drive applications. Time-domain analysis of the voltage waveform's effect on motor air-gap flux yields a direct estimate of mechanical torque ripple. Two solutions with identical THD can produce wildly different torque ripple depending on harmonic phase relationships.
DC-link RMS stress
The DC-bus capacitor in a voltage-source inverter sees a current waveform shaped by the modulation. RMS of that current determines capacitor heating, which sets thermal lifetime. SHE solutions vary by 15–25% in DC-link RMS for the same fundamental output — a direct lever on capacitor cost and reliability.
Flux-trajectory circularity
For motor drives, the integral of the line-to-neutral voltage produces the stator flux trajectory in the d-q plane. A perfectly sinusoidal output gives a circular flux trajectory; harmonic content distorts it. Circularity error correlates with iron loss and with audible noise. The most "audibly clean" solution is rarely the lowest-THD one.
Verification: the textbook check
The verification protocol for any SHE solver is straightforward:
- Take the returned switching angles
αi - Reconstruct the waveform numerically (a piecewise-constant time-domain signal)
- Compute the Fourier coefficients via numerical FFT or direct integration
- Compare each target harmonic to its claimed value: fundamental should equal
M; eliminated harmonics should be at machine epsilon
Anyone with MATLAB and ten lines of code can run this check. A solution that survives this check is real. A solution that doesn't isn't — regardless of how confident the solver was when it returned. This is the verification standard SHE Designer adheres to, and the protocol is published, not proprietary.
Real-world applications
Hyperscale UPS systems
Online double-conversion UPS units in megawatt-class data centers run inverter stages that must meet IEEE 519 grid-injection limits while passing through the highest-quality voltage to the load. SHE at the inverter output stage gives compliance at low switching frequency — critical when the inverter is rated for continuous 1+ MW operation and switching losses dominate thermal budget.
For UPS designers, the right SHE workflow is: a precomputed lookup table of certified switching-angle sets, indexed by operating point, that the modulator can read in real time. A turnkey UPS SHE Lookup Table is available with 80 operating points and 16 harmonics eliminated per row.
Variable Frequency Drives (VFDs)
Industrial VFDs face a wider operating envelope than UPS systems — the modulation index changes constantly as the motor accelerates, decelerates, or holds steady-state. A VFD lookup table needs many more operating points to span the envelope smoothly without re-solving in real time. A universal VFD SHE table covering 951 modulation points from M=0.050 to 1.000 is available, with FOC, V/f, and sensorless operation supported.
Motor drives in defense applications
For traction inverters in vehicles, SHE's low switching frequency means lower EMI — a hard requirement when the inverter is colocated with sensitive sensor electronics. The physical optimization objectives (especially torque ripple and flux-trajectory circularity) drive perceived ride quality and stealth signature.
SHE Designer
The SHE Designer engine implements the workflow described in this article: enumerate every viable solution to the SHE equations, certify each through a five-stage hardware-viability check, and present the engineer a ranked menu of certified solutions to choose from. Verification is against MATLAB fsolve on the textbook SHE equations — a published protocol, externally reproducible, no NDA required.
Further reading
- Patel, H. S., & Hoft, R. G. (1973). "Generalized techniques of harmonic elimination and voltage control in thyristor inverters: Part I — Harmonic elimination." The original paper formulating the SHE equations.
- Sun, J., & Beineke, S. (1996). "Optimal PWM based on real-time solution of harmonic elimination equations." An early treatment of the multiple-solutions problem.
- Yang, K., et al. (2015). "A groebner bases theory based method for selective harmonic elimination." Algebraic-geometry approach to the same enumeration problem.
- Wells, J. R., et al. (2004). "Selective Harmonic Control: A General Problem Formulation and Selected Solutions." A modern survey of the field.
- IEEE Std 519-2014, "Recommended Practices and Requirements for Harmonic Control in Electric Power Systems." The grid-injection standard that drives most industrial SHE deployments.
Bottom line
Selective Harmonic Elimination has been a deterministic mathematical problem since 1973. The reason every published method only returns one solution at a time is computational, not theoretical — and that constraint has now been removed. A deterministic SHE solver returns the complete viable solution set, certifies each through hardware-viability checks, and lets the engineer optimize for whichever physical objective matters for the application. The expensive math runs once. The choice runs every time.
For UPS, VFD, and motor-drive applications, this changes the engineering workflow from "solve and accept" to "enumerate and choose." That's a different category of problem, and a different category of answer.