PWM Simulator: SPWM, SVPWM and Discontinuous PWM
Compare SPWM, SVPWM, THIPWM and DPWM0–3. Animate the space-vector hexagon, inspect seven-segment switching and dwell times, and compare current ripple and relative switching loss.
This PWM Simulator compares SPWM, space vector PWM, one-sixth third-harmonic injection and DPWM0–3 for a two-level, three-phase voltage-source inverter. Engineers can compare modulation strategies for motor drives, students can follow the switching process, and designers can estimate the tradeoff between current ripple and switching loss.
Choose a modulation method, then enter the DC-link voltage, fundamental frequency, base carrier frequency and per-phase high-frequency inductance. Specify the fundamental phase current as an RMS value and its displacement angle relative to phase voltage. Positive angles mean lagging current; negative angles mean leading current. Power factor here means the cosine of that angle.
The modulation index follows Hava, Kerkman and Lipo: fundamental phase-voltage peak divided by the six-step fundamental peak, 2 Vdc/π. The familiar carrier amplitude ratio is also reported. SPWM stays linear to M_i = π/4, or 0.7854. SVPWM, THIPWM and the discontinuous methods extend that limit to π/(2√3), or 0.9069. SVPWM therefore raises the maximum phase-voltage peak from Vdc/2 to Vdc/√3: a 15.47% increase.
Use the play button beside electrical angle to rotate the reference vector through all six sectors. The hexagon shows the six active switching states, highlights the adjacent vectors, and reports their total dwell times. Both zero vectors lie at the origin. Conventional SVPWM shares the remaining time equally between 000 and 111. The solid circle marks the SVPWM linear limit; the dashed circle marks SPWM's limit.
The seven-segment view shows the switching order and each segment's duration. The three gate traces use the actual dwell-time proportions. In even sectors, the active-vector order reverses so only one inverter leg changes at each transition. At a sector boundary or the linear limit, zero-duration segments disappear from the physical waveform. These two space-vector views always illustrate conventional SVPWM at the specified voltage and actual carrier frequency; when another method is selected, they remain an explicitly labeled SVPWM comparison.
The duty table demonstrates that symmetric SVPWM and sinusoidal references with min-max zero-sequence injection give the same three duties. Their switching patterns agree up to the carrier time origin. The selected-method waveform charts and live comparator show how the other injection and clamping rules differ.
For an SVPWM calculator comparison, use the harmonic distortion factor chart across modulation index and the loss curves across signed current angle. HDF is a normalized squared ripple measure, not a percentage. The inductance and current convert it into RMS switching-ripple current and an estimated current THD. This estimate does not calculate an individual harmonic spectrum.
At equal carrier frequency, DPWM suppresses each leg's switching during one third of its cycle. At equal average switching frequency, its carrier rises by 50%, affecting both ripple and switching loss. The space vector PWM simulator assumes a balanced three-wire load and ideal switches. It excludes overmodulation, dead time, minimum pulses, conduction loss and device-specific switching energies. Beyond the linear limit, voltage gain becomes nonlinear and low-order harmonics appear; the tool withholds those operating points. Use measured device data for final thermal design.
How it is calculated
The reference phase commands are , and , with and carrier limits ±1. An identical zero sequence is added to all three phases, so it cancels from line-to-line voltage. Upper duty is .
SPWM uses zero injection. SVPWM uses . THIPWM here means one-sixth injection, . DPWM0, 1 and 2 select the largest absolute phase reference after rotating the selection signals by −30°, 0° and +30° respectively, then clamp the corresponding original phase to its rail. DPWM3 selects the intermediate absolute magnitude. See PESC author copy, pp. 3–4, magnitude rules, and APEC author copy, p. 3, equations (2)–(4).
The HDF polynomials are PESC p. 7, equations (26)–(35), evaluated first at the actual carrier frequency. from equation (36) gives each phase’s RMS switching ripple. . Both are high-frequency inductive estimates.
For a DPWM method, equal average switching frequency means . The plotted base-frequency HDF is , so . This is the correction in PESC equations (19), (32)–(35).
The loss function is the integral of absolute sinusoidal current over the intervals that actually switch, normalized to continuous PWM; PESC p. 9, equations (39)–(45). For DPWM0–2 the clamping center is −30°, 0°, +30°. At a fixed carrier, for , otherwise , where is load angle minus clamping-center angle. The separate DPWM3 expression follows equation (45). Relative loss on the selected basis is .
Source discrepancy: the APEC author manuscript p. 4 equations (5)–(7) display inside the HDF terms. Its modulation-index definition and plotted curves instead agree with , as explicitly printed in the later PESC equations. This tool uses PESC. A separate time integration of the actual three-phase switched voltage verifies all seven HDF polynomials; no polynomial was adjusted to fit a reference.
Gate commands explicitly hold the upper device OFF at the negative rail and ON at the positive rail, including equality at carrier extrema. A dimensionless tolerance of around ±1 absorbs floating-point roundoff; interior commands use the triangular-carrier comparison.
Space-vector synthesis and carrier equivalence
The amplitude-invariant Clarke convention makes the reference-vector magnitude equal to the phase-voltage peak. The six active states V1…V6 are 100, 110, 010, 011, 001, 101 at angles 0°, 60°, …, 300°, each with magnitude ; V0 = 000 and V7 = 111 both give zero load voltage. With wrapped angle , sector and local angle , volt-second balance gives
Here is the combined zero-state time, unlike sources that call the individual 000 share T0. Conventional SVPWM allocates half of this combined time to each zero vector. The displayed seven segments are , with durations . In odd sectors F is the lower active vector; in even sectors F is the upper one. This order changes one leg at each transition. Zero-duration segments are allowed at boundaries.
Integrating these states gives the three phase duties independently of the carrier implementation. The table compares them with . Equal zero-state sharing yields the same result: symmetric SVPWM is sinusoidal PWM plus min-max zero-sequence injection. The sequence starts at 000; the existing triangular carrier starts at its minimum, so the sequence cursor includes a half-period shift.
The largest circular reference that fits inside the hexagon is , versus for SPWM. The gain is . DUTH course notes, attached PDF pp. 16–23, give the state map, volt-second derivation and range comparison; Imperix TN146 explains min-max equivalence. Van der Broeck, Skudelny and Stanke (1988) is cited as the original journal reference, DOI 10.1109/28.87265; its paywalled text is not used. The state integration, residuals and original drawings are derived here from these equations.
For drawing the exact gate traces, segments shorter than are treated as floating-point zero and omitted from the plotted trace. This prevents a zero-duration 000 or 111 entry from drawing a false OFF/ON spike when a phase is continuously clamped at the maximum linear demand. The dwell table and voltage/duty integrations retain the unrounded fractions.
The frozen phase B gate chart uses exact triangular-carrier crossings rather than sampled gate values. For a carrier starting at −1 and peaking at half a period, the upper gate is ON over and in normalized time. At duty zero or one, the trace is constant. Its piecewise-constant area over one period equals ; checks verify this for every modulation method and near clamping. The displayed duties use the same reference-rail tolerance as the live comparator.
Assumptions
- Balanced three-phase voltage references and approximately sinusoidal fundamental currents; isolated load neutral with no zero-sequence current path.
- Ideal two-level inverter, symmetric triangular carrier, complementary gate commands, and no dead time or minimum pulse width.
- Load high-frequency impedance is represented by the specified per-phase transient/leakage inductance.
- The base carrier/fundamental frequency ratio exceeds 20 for every method in the comparison, following PESC p. 5. Carrier detail uses locally constant references.
- Switching energy is proportional to current magnitude; only relative commutation loss is modeled. The loss reduction is not a total efficiency gain.
- Voltage and current are independent specified operating-point quantities; no load resistance, back EMF or motor current-control loop is solved.
- The comparison covers THIPWM1/6; THIPWM1/4 and adaptive GDPWM are outside the selectable set.
- The reference angle is measured counterclockwise from the phase A / alpha axis (cosine convention). The vector magnitude is the phase-voltage peak.
- Both space-vector scenes and the duty-equivalence table always use conventional SVPWM at the current voltage and actual carrier frequency. Their equal 000/111 split and seven-segment pattern do not describe DPWM, SPWM or THIPWM when those methods are selected.
Where it applies
Use only the linear modulation region: for SPWM and for the other six methods. The HDF chart stops SPWM at its own limit. Signed current angle is limited to −90°…+90°; power factor is displacement factor, not true power factor including harmonics.
The ripple approximation is intended for high carrier ratios and predominantly inductive switching-frequency impedance. If estimated ripple exceeds 20% of fundamental current, a warning asks for better operating-point data or a more suitable inductance/frequency; the sinusoidal-current loss assumption becomes less reliable.
Playback is slowed for learning; the displayed frequency values remain the physical operating frequencies. Only the angle, local comparator, duties and drawing change each frame. No device loss in watts, individual harmonic spectrum, peak ripple, common-mode voltage, overmodulation, dead time, pulse suppression, semiconductor conduction loss or thermal model is included.
Above , a circular reference leaves the hexagon during part of the cycle. Dwell-time saturation and the transition toward six-step operation require an overmodulation algorithm; amplitude gain becomes nonlinear and low-order distortion grows. This tool rejects that region instead of silently clipping. At the linear limit or a sector boundary, some seven-segment durations are zero and the number of distinct physical transitions is reduced.
References
- Hava, Kerkman and Lipo, Simple Analytical and Graphical Tools for Carrier Based PWM Methods, PESC 1997, pp. 1462–1471. Author copy (11 PDF pages): https://users.metu.edu.tr/home101/hava/wwwhome/pesc97.pdf . DOI: 10.1109/PESC.1997.616959.
- Hava, Kerkman and Lipo, A High Performance Generalized Discontinuous PWM Algorithm, APEC 1997. Author copy includes expanded manuscript (13 PDF pages): https://users.metu.edu.tr/home101/hava/wwwhome/apec97.pdf . See pp. 3–6 for clamping rules and switching-loss normalization.
- Hava, Kerkman and Lipo, Simple Analytical and Graphical Methods for Carrier-Based PWM-VSI Drives, IEEE Transactions on Power Electronics 14(1), 1999, 49–61. DOI: https://doi.org/10.1109/63.737592 (journal citation; full text not used).
- DUTH open course notes, Space Vector Modulation, PDF pp. 9, 16–23: numerical three-phase example, switching-state hexagon, dwell-time derivation and linear range. https://eclass.duth.gr/modules/document/file.php/1031622/SVPWM.pdf .
- Imperix, TN146, SVPWM vs SPWM modulation techniques (2021), min/max injection and DC-bus utilization. https://imperix.com/doc/implementation/svpwm-vs-spwm-modulation-techniques ; DOI: https://doi.org/10.66800/0146 .
- Van der Broeck, H. W., Skudelny, H.-C., and Stanke, G. V., Analysis and realization of a pulsewidth modulator based on voltage space vectors, IEEE Transactions on Industry Applications 24(1), 142–150, 1988. DOI: https://doi.org/10.1109/28.87265 (journal citation; paywalled full text not used).
Inputs
| Input | Symbol | Unit | Default |
|---|---|---|---|
| Modulation method SVPWM opens the space-vector and seven-segment example. The two vector views remain an SVPWM comparison when selecting another method. DPWM0 leads, DPWM1 centers and DPWM2 lags the voltage peak; DPWM3 uses intermediate magnitude clamping. | method | SVPWM | |
| Modulation index, relative to six-step voltage M_i = phase-voltage peak / (2 Vdc/π); carrier ratio m_a = 4 M_i/π. SPWM limit π/4 = 0.785398. SVPWM limit π/(2√3) = 0.906900, corresponding to phase peak Vdc/√3 and 15.47% more linear voltage. | M_i | 0.75 | |
| Comparison basis The base frequency is always the CPWM carrier. Equal average switching uses a 1.5× carrier for DPWM, compensating for its one-third clamping time. | basis | Equal carrier frequency | |
| DC-link voltage | V_dc | V | 600 |
| Base frequency (CPWM carrier) | f_base | Hz | 8000 |
| Fundamental output frequency | f_e | Hz | 50 |
| Per-phase high-frequency inductance Use the load transient/leakage inductance at switching frequency, not necessarily its low-frequency inductance. | L_sigma | mH | 3 |
| Fundamental phase current, RMS Sets the estimated switching-ripple THD. Current is specified independently of voltage; no motor equivalent circuit is solved. | I_1 | A | 10 |
| Current displacement angle (+ lagging, − leading) Power factor here is displacement cos(angle). The switching-loss model assumes nearly sinusoidal current. | load_angle | deg | 30 |
| Electrical angle · ▶ animate PWM Rotate the reference vector, update sector and dwell times, and follow the carrier cursor. Angle zero is the phase A / alpha axis. Slow-motion playback leaves ripple and loss sweeps cached. | theta_e | deg | 20 |
Results
With the default inputs above, the calc gives:
| Result | Value |
|---|---|
| Fundamental line-to-line voltage, RMS | 350.86 V |
| Switching-ripple current, RMS | 0.542 A |
| Estimated current THD (switching ripple) | 5.42 % |
| Switching loss / CPWM at base frequency | 1 |
| Switching-loss reduction | 0 % |
| Actual carrier frequency | 8,000 Hz |
| Average switching frequency | 8,000 Hz |
| Displacement power factor | 0.866 |
| HDF at actual carrier | 0.2705 |
| HDF at base frequency | 0.2705 |
| Carrier amplitude ratio (4 M_i / π) | 0.9549 |
| Phase-voltage peak / DC-link voltage | 0.4775 |
| SPWM linear limit, phase peak | 300 V |
| SVPWM linear limit, phase peak | 346.41 V |
| SVPWM linear voltage gain over SPWM | 15.47 % |
Checked against sources
Each case below was calculated by this calc and agrees with the value from its source (within the tolerance where one is shown).
Published SPWM linear modulation limit
Source: Hava et al., PESC author copy, p. 9, section VII: SPWM linear range ends at approximately 0.785. The expected value is the paper’s rounded limit, not a result generated by this tool.
Inputs: Modulation method = SPWM; Modulation index, relative to six-step voltage = 0.7; the others as above.
| Result | Source | This calc |
|---|---|---|
| Linear modulation limit | 0.785 | 0.7854 |
Published maximum linear modulation limit
Source: Hava et al., PESC author copy, p. 9, section VII: theoretical linear modulation limit approximately 0.907 for the zero-sequence methods. Paper’s rounded value.
Inputs: the default inputs above.
| Result | Source | This calc |
|---|---|---|
| Linear modulation limit | 0.907 | 0.9069 |
DPWM1 unity-PF switching loss is one half
Source: Hava et al., APEC author copy, p. 3 identifies DPWM1’s minimum at unity PF; p. 6 states the minimum SLF is 0.5. This is a published limiting result, independent of the implementation.
Inputs: Modulation method = DPWM1; Current displacement angle (+ lagging, − leading) = 0 deg; the others as above.
| Result | Source | This calc |
|---|---|---|
| Switching-loss function, fixed carrier | 0.5 | 0.5 |
| Switching loss / CPWM at base frequency | 0.5 | 0.5 |
DPWM2 at 30° lag gives one-half fixed-carrier loss
Source: Hava et al., APEC author copy, p. 3 identifies DPWM2’s minimum at 30° lagging; p. 6 gives the minimum SLF of 0.5. Carrier frequency is held fixed.
Inputs: Modulation method = DPWM2; the others as above.
| Result | Source | This calc |
|---|---|---|
| Switching-loss function, fixed carrier | 0.5 | 0.5 |
| Switching loss / CPWM at base frequency | 0.5 | 0.5 |
DPWM carrier multiplier at equal average switching
Source: Hava et al., APEC author copy p. 5 Fig. 7 explicitly uses a DPWM carrier of 1.5 times the continuous-PWM carrier for equal average switching frequency. The reciprocal 2/3 is the active fraction from 120° clamping in 360°.
Inputs: Modulation method = DPWM2; Comparison basis = Equal average switching frequency; the others as above.
| Result | Source | This calc |
|---|---|---|
| Carrier multiplier for comparison basis | 1.5 | 1.5 |
| Fraction of time each leg modulates | 0.6667 | 0.6667 |
SVPWM HDF from published graph at M_i = 0.4
Source: Hava et al., PESC author copy p. 8, Fig. 13 curve 2. The plot at M_i = 0.4 reads approximately 0.165; tolerance 0.01 covers graphical reading. The APEC p. 4 manuscript prints π/4 instead of 4/π in the HDF argument; that is inconsistent with this plot and the six-step index definition, so the PESC normalization is retained.
Inputs: Modulation index, relative to six-step voltage = 0.4; the others as above.
| Result | Source | This calc |
|---|---|---|
| HDF at base frequency | 0.165 ± 0.01 | 0.1643 |
DPWM1 HDF from published graph at M_i = 0.9
Source: Hava et al., PESC author copy p. 8, Fig. 13 curve 6. At M_i = 0.9 the equal-average-switching-frequency graph (k_f = 2/3) reads approximately 0.18. Tolerance 0.01 covers reading the dashed curve. These are graph readings, not polynomial-generated expected values.
Inputs: Modulation method = DPWM1; Modulation index, relative to six-step voltage = 0.9; Comparison basis = Equal average switching frequency; the others as above.
| Result | Source | This calc |
|---|---|---|
| HDF at base frequency | 0.18 ± 0.01 | 0.18 |
Course numerical example reproduced from integrated SVPWM states
Source: DUTH course PDF p. 9 gives va/Vm=0.9511, vb/Vm=-0.208, vc/Vm=-0.743 at a sine phase of 108°. This tool uses cosine references, so theta_e=108°−90°=18°. Expected numbers are copied from the published example, rounded to its precision; calculated values come from integrating the seven switching states.
Inputs: Electrical angle · ▶ animate PWM = 18 deg; the others as above.
| Result | Source | This calc |
|---|---|---|
| Sequence-average phase voltages / reference peak [1] | 0.9511 | 0.9511 |
| Sequence-average phase voltages / reference peak [2] | -0.208 | -0.2079 |
| Sequence-average phase voltages / reference peak [3] | -0.743 | -0.7431 |
Published 15% extension of the linear voltage range
Source: DUTH course PDF p. 22 gives the SPWM phase-peak limit Vdc/2; pp. 16 and 23 give the SVPWM limit Vdc/√3 and a rounded increase of about 15%. At 600 V these published closed-form limits are 300 V and 346.41016 V. The 0.5 percentage-point tolerance checks the source's rounded 15% statement without replacing the exact 15.47005% physics.
Inputs: the default inputs above.
| Result | Source | This calc |
|---|---|---|
| SVPWM linear voltage gain over SPWM | 15 ± 0.5 % | 15.47 % |
| SPWM linear limit, phase peak | 300 V | 300 V |
| SVPWM linear limit, phase peak | 346.4 V | 346.4 V |
Related Resources
Related articles
-
Advanced Three-Level Grid-Connected Neutral Point Clamped Solar Inverter with LCL Filter and Active Damping for Real-Time Hardware-in-the-Loop Applications -
Analysis and Hardware Implementation of 3-Level and 5-Level CHB Multilevel Inverters Using SPWM -
Enhanced Seven-Level Single-Phase H-Bridge Multilevel Inverter with Nearest Level Control for Grid-Connected Photovoltaic Systems
Related courses
IEC Electrical Schematics and Industrial Control Panels
5
Original price was: 42 €.21 €Current price is: 21 €.
Basic Electrical Controls & Diagram Reading
7
Original price was: 32 €.18 €Current price is: 18 €.
Modeling Electrical Motor Faults with FEM Simulation using ANSYS MAXWELL
3
Original price was: 50 €.15 €Current price is: 15 €.







Responses