← Circuit Toolkit

Inverter

Toggle between square-wave and sinusoidal PWM switching, choose half-bridge or full-bridge topology, and adjust the DC bus voltage and modulation index. The widget plots the output waveform and computes fundamental voltage and THD in real time — no Fourier tables needed.

H-Bridge State

+Q1Q3Q2Q4LoadQ1+Q4 ON → +Vdc
Output Voltage+200V−200V0T = 20.0 ms (50 Hz)outputfund.Load Current (R = 50 Ω)+4.0A−4.0A
Harmonic Spectrum1st50Hz100%3th150Hz33%5th250Hz20%7th350Hz9th450Hz11th550Hz13th650Hz15th750HzVpeak

Fundamental RMS

V1,rms=4Vdcπ2=4 ⁣× ⁣200π2=180.1  V\small V_{1,rms} = \tfrac{4V_{dc}}{\pi\sqrt{2}} = \tfrac{4\!\times\!200}{\pi\sqrt{2}} = 180.1\;\text{V}

THD

THD=Vrms2V12V1=200.02180.12180.1=48.3%\small THD = \tfrac{\sqrt{V_{rms}^2 - V_1^2}}{V_1} = \tfrac{\sqrt{200.0^2 - 180.1^2}}{180.1} = 48.3\%

VrmsV_{rms}

200.0 V

PloadP_{load} (R = 50 Ω)

800.0 W

Quick experiments

  • Full-bridge square wave. Set Vdc = 200 V — the output swings ±200 V with THD around 48%.
  • PWM clean-up. Switch to PWM and lower the modulation index ma — watch THD drop as the output approaches a pure sine.
  • Half vs full-bridge. Compare the two topologies at the same Vdc — the full-bridge doubles the output swing.

DC-AC inverters

A DC-AC inverter converts a battery or DC bus voltage to AC using a bridge of power switches (MOSFETs or IGBTs). The switches are driven with PWM waveforms whose varying duty cycle shapes the output into an approximate or true sine wave.

H-bridge (single-phase) operation

Four switches arranged in an H: diagonal pairs switch alternately at high frequency. PWM duty cycle is varied sinusoidally so the LC output filter reconstructs the fundamental frequency. The switches never conduct simultaneously (dead-time prevents shoot-through).

Output quality — THD

Total Harmonic Distortion (THD) measures how closely the output resembles a pure sine wave. Modified-sine inverters (cheaper, square-wave steps) have THD of 40–45 % — acceptable for resistive loads but can damage motors and sensitive electronics. Pure-sine inverters achieve THD < 3 %.

Learn more → Inverters — Learn

Formula reference

Modulation index
m=VrefVcarrierm = \dfrac{V_{ref}}{V_{carrier}}

Below 1 keeps SPWM in the linear region.

Fundamental output amplitude
V1=mVdc2V_1 = m \, \dfrac{V_{dc}}{2}

For a half-bridge in the linear modulation region.

RMS of a sine output
Vrms=Vpeak2V_{rms} = \dfrac{V_{peak}}{\sqrt{2}}

325 V peak is the 230 V RMS mains.

Total harmonic distortion
THD=n>1Vn2V1THD = \dfrac{\sqrt{\sum_{n>1} V_n^{2}}}{V_1}

SPWM plus filtering pushes THD below a few percent.

SymbolMeaningUnit
mmModulation index
VdcV_{dc}DC bus voltageV
THDTHDTotal harmonic distortion%

Common mistakes

  • Omitting dead time in the H-bridge.

    Without it both switches in a leg conduct briefly together, shorting the DC bus. Shoot-through destroys the switches almost instantly.

  • Running a motor from a modified sine inverter.

    The harmonics cause extra heating and audible noise in motors and transformers. Inductive loads need a pure sine output.

  • Over-modulating to get more output.

    A modulation index above 1 clips the reference and injects low-order harmonics that the output filter cannot remove.

  • Switching in the audible band.

    Magnetostriction turns switching frequency into sound. Above roughly 20 kHz it is inaudible, at the cost of higher switching loss.

  • Sizing the DC bus capacitor for average current only.

    The bus supplies large pulsed currents at twice the output frequency. Ripple-current rating, not just capacitance, decides the part.

Frequently asked questions

What does a DC-AC inverter do?

It converts DC into AC by switching the DC through an H-bridge in alternating directions, then filtering the result to approximate a sine wave at the desired output frequency.

What is the difference between modified sine and pure sine inverters?

A modified sine inverter outputs a stepped square-like waveform that is cheap to produce but rich in harmonics. A pure sine inverter uses PWM and filtering to approximate a true sine wave, which motors, transformers and sensitive electronics require.

What is SPWM?

Sinusoidal pulse-width modulation varies the pulse width across the cycle so the average follows a sine. After low-pass filtering, the output closely approximates a sine wave with the harmonics pushed up near the switching frequency where they are easy to remove.

What is dead time and why does an H-bridge need it?

Dead time is a brief interval where both switches in a leg are off. Without it, one switch can turn on before the other has fully turned off, creating a direct short across the supply known as shoot-through.

Why does an inverter produce audible noise?

Switching frequency can fall inside or near the audible range, and magnetostriction in the transformer or inductor turns that into sound. Raising the switching frequency above about 20 kHz moves it out of hearing at the cost of higher switching losses.

Related tools

Browse the full circuit toolkit or start a guided lesson in topics.

Share