How a Solar Inverter Makes AC: H-Bridges, PWM, Harmonics and Grid Synchronisation

Follow the mathematics from a 325 V sine peak to a switching bridge, a filter and a grid connection, with every formula derived and every number worked through.

Wall-mounted solar inverter with AC and DC cabling on a plant-room wall at an Indian industrial site
A grid-tied inverter builds its output from a DC link with fast switches, then filters it into a clean 50 Hz sine wave.

Four numbers to remember

  • A 230 V rms supply peaks at 325 V, so a single-phase inverter needs a DC link of roughly 360 to 400 V. A 415 V three-phase inverter needs about 590 V with third-harmonic injection, or 680 V with plain sinusoidal PWM.
  • Single-phase power pulses at 100 Hz between zero and twice the average. A 5 kW inverter on a 400 V DC link with 5% peak-to-peak ripple needs about 2 mF. Balanced three-phase power is constant.
  • A square wave has a THD of 48.3%. PWM at 16 kHz moves the harmonics to around 16 or 32 kHz, where a small LC filter attenuates them by about 40 dB or more.
  • Power into the grid follows P = (V1 × V2 / X) sin δ. In the 5 kW example here, the inverter voltage leads the grid by only about 3.4 degrees, and a phase-locked loop keeps it in step.

A solar string gives you direct current at a few hundred volts. Your fans, pumps and the DISCOM line expect a 50 Hz sine wave at 230 V, or 415 V between phases. The inverter closes that gap with switches that turn on and off thousands of times a second, and the mathematics turns those blunt pulses into a clean sine wave.

We build the idea from first principles, from the grid as a mathematical target to the H-bridge, sinusoidal pulse-width modulation (PWM), harmonics, the output filter, grid synchronisation and the DC-link capacitor. Every symbol is defined before use and every number was checked by calculation. For the DC side of the same machine, see how MPPT and DC-DC converters work.

Equipment values are illustrative typical datasheet figures, not any product's specification; use your own inverter's datasheet. PV strings are live whenever light falls on them, and work inside an inverter belongs to qualified, licensed electricians.

The grid as a target: voltage and power

First define the waveform we are aiming for. The symbols are:

  • v(t)v(t): instantaneous voltage (V); V^\hat V: its peak (V)
  • ff: grid frequency (Hz), 50 Hz in India; T=1/fT = 1/f: period (s)
  • ω=2πf\omega = 2\pi f: angular frequency (rad/s); φ\varphi: phase angle (rad)
  • VrmsV_{\mathrm{rms}}: root-mean-square (effective) voltage (V)

The grid voltage is a sinusoid:

v(t)=V^sin⁡(ωt+φ),ω=2πfv(t) = \hat V\,\sin(\omega t + \varphi), \qquad \omega = 2\pi f

At 50 Hz, ω=314.16rad/s\omega = 314.16\,\mathrm{rad/s}. The rms value is the steady DC voltage that heats a resistor equally, found from the mean of v2v^2 over one period:

Vrms2=1T∫0Tv(t)2dtV_{\mathrm{rms}}^2 = \frac{1}{T}\int_0^T v(t)^2\,dt

Set φ=0\varphi = 0 and use sin2⁡x=12(1−cos⁡2x)\sin^2 x = \tfrac12(1-\cos 2x):

v2=V^2sin2⁡ωt=V^22(1−cos⁡2ωt)v^2 = \hat V^2\sin^2\omega t = \frac{\hat V^2}{2}\left(1-\cos 2\omega t\right)

The cosine completes two whole cycles per period, so its average is zero and only the constant half survives:

Vrms2=V^22⇒Vrms=V^2V_{\mathrm{rms}}^2 = \frac{\hat V^2}{2} \quad\Rightarrow\quad V_{\mathrm{rms}} = \frac{\hat V}{\sqrt 2}

For 230 V, V^=2×230V=325.3V\hat V = \sqrt2 \times 230\,\mathrm{V} = 325.3\,\mathrm{V}. That peak, not 230 V, is what the inverter must be able to create.

Three phases and the factor of root three

A three-phase supply has three sinusoids displaced by 120 degrees. With VphV_{\mathrm{ph}} the rms phase-to-neutral voltage, take phase a as reference and phase b lagging by 120 degrees. The line-to-line voltage is the phasor difference:

𝐕ab=𝐕a−𝐕b=Vph(1−e−j120∘)=Vph(32+j32)\begin{aligned} \mathbf V_{ab} &= \mathbf V_a - \mathbf V_b = V_{\mathrm{ph}}\left(1 - e^{-j120^\circ}\right)\\ &= V_{\mathrm{ph}}\left(\tfrac32 + j\tfrac{\sqrt3}{2}\right) \end{aligned}

Here e−j120∘=−12−j32e^{-j120^\circ} = -\tfrac12 - j\tfrac{\sqrt3}{2}. Pythagoras gives the magnitude:

|𝐕ab|=Vph94+34=3Vph|\mathbf V_{ab}| = V_{\mathrm{ph}}\sqrt{\tfrac94 + \tfrac34} = \sqrt3\,V_{\mathrm{ph}}

The line voltage is 3\sqrt3 times the phase voltage and leads phase a by 30 degrees. A 415 V line corresponds to a phase voltage of 239.6 V. The harmonised nominal is 230/400 V; the arithmetic is the same, so check which value your DISCOM declares.

Phase voltage (rms)Phase peakLine-to-line (rms)
230 V325.3 V398.4 V
240 V339.4 V415.7 V
253 V (230 V plus 10%)357.8 V438.2 V

Why single-phase power pulses and three-phase power does not

Let the inverter push current i=I^sin⁡ωti = \hat I\sin\omega t in phase with the voltage (unity power factor). Instantaneous power is their product:

p(t)=vi=V^I^sin2⁡ωt=VrmsIrms(1−cos⁡2ωt)p(t) = v\,i = \hat V\hat I\sin^2\omega t = V_{\mathrm{rms}}I_{\mathrm{rms}}\left(1-\cos 2\omega t\right)

Since P=VrmsIrmsP = V_{\mathrm{rms}}I_{\mathrm{rms}} is the average power, this is:

p(t)=P(1−cos⁡2ωt)p(t) = P\left(1-\cos 2\omega t\right)

Power swings between 0 and 2P2P at 100 Hz. A 5 kW inverter on 230 V carries 21.7 A rms (30.7 A peak), yet its power goes from 0 to 10 kW a hundred times a second. The array supplies nearly constant power, so the DC-link capacitor absorbs the difference; we size it later.

For three balanced phases, with θ=ωt\theta = \omega t, the power is the sum of three such terms:

p=V^I^[sin2⁡θ+sin2⁡(θ−120∘)+sin2⁡(θ+120∘)]p = \hat V\hat I\left[\sin^2\theta + \sin^2(\theta - 120^\circ) + \sin^2(\theta + 120^\circ)\right]

Apply sin2⁡x=12(1−cos⁡2x)\sin^2x = \tfrac12(1-\cos2x) to each. The three cosines are 120 degrees apart, so they sum to zero:

∑sin2⁡=32−12[cos⁡2θ+cos⁡(2θ−240∘)+cos⁡(2θ+240∘)]=32\sum\sin^2 = \tfrac32 - \tfrac12\left[\cos2\theta + \cos(2\theta - 240^\circ) + \cos(2\theta + 240^\circ)\right] = \tfrac32
p=32V^I^=3VphIphp = \tfrac32\hat V\hat I = 3\,V_{\mathrm{ph}}I_{\mathrm{ph}}

Balanced three-phase power is constant, with no 100 Hz ripple, so a three-phase inverter needs far less DC-link capacitance than a single-phase one.

The H-bridge: building AC from four switches

A single-phase bridge has four switches (IGBTs or MOSFETs, each with a diode across it) in two legs between the DC-link rails. Let VdcV_{dc} be the DC-link voltage. Leg A has S1 above S2, and leg B has S3 above S4. The filter and grid sit between the two mid-points. Each mid-point, measured from the negative rail, is either 0 or VdcV_{dc}:

vAB=vAN−vBN,vAN,vBN∈{0,Vdc}v_{AB} = v_{AN} - v_{BN}, \qquad v_{AN},\,v_{BN} \in \{0,\; V_{dc}\}
Switches onOutput vABComment
S1 and S4+VdcPositive half
S2 and S3−VdcNegative half
S1 and S3, or S2 and S40Freewheeling
S1 and S2, or S3 and S4Not allowedShoot-through: DC link shorted

Shoot-through and dead-time

If both switches of a leg conduct, only the loop inductance LloopL_{\mathrm{loop}} (H) and device resistance limit the current:

didt=VdcLloop=40050×10−9=8×109A/s\frac{di}{dt} = \frac{V_{dc}}{L_{\mathrm{loop}}} = \frac{400}{50\times10^{-9}} = 8\times10^{9}\,\mathrm{A/s}

For an assumed 50 nH loop, that is 8 kA per microsecond, and the device fails within microseconds unless protection acts. Because switches turn off more slowly than they turn on, gate drivers insert a dead-time tdt_d when both are off, and the load current flows through a diode.

Dead-time costs voltage. With fsf_s the switching frequency, each leg's average output falls by about:

ΔVleg≈Vdctdfs\Delta V_{\mathrm{leg}} \approx V_{dc}\,t_d\,f_s

For Vdc=400VV_{dc} = 400\,\mathrm{V}, td=1μst_d = 1\,\mu\mathrm{s} and fs=16kHzf_s = 16\,\mathrm{kHz}, this is 6.4 V per leg and up to 12.8 V across the bridge, 3.9% of the 325 V peak. Its sign follows the current direction, so firmware compensates for it.

Sinusoidal PWM and the volt-second argument

Switching between +Vdc and −Vdc is not yet a sine wave. Sinusoidal PWM (SPWM) compares a slow reference with a fast carrier. The symbols are:

  • vrefv_{\mathrm{ref}}: sinusoidal reference at grid frequency (V); vtriv_{\mathrm{tri}}: triangular carrier of peak V^tri\hat V_{\mathrm{tri}} at frequency fsf_s
  • ma=V^ref/V^trim_a = \hat V_{\mathrm{ref}}/\hat V_{\mathrm{tri}}: amplitude modulation index; mf=fs/fm_f = f_s/f: frequency ratio (both dimensionless)
  • dd: duty ratio, the fraction of a carrier period Ts=1/fsT_s = 1/f_s that S1 and S4 are on

In bipolar switching, S1 and S4 are on when vref>vtriv_{\mathrm{ref}} \gt v_{\mathrm{tri}}, and S2 and S3 otherwise. Assume fs≫ff_s \gg f, so the reference barely moves in one carrier period. The triangle ramps linearly from −V^tri-\hat V_{\mathrm{tri}} to +V^tri+\hat V_{\mathrm{tri}} and sits below the reference for the fraction:

d=vref+V^tri2V^trid = \frac{v_{\mathrm{ref}} + \hat V_{\mathrm{tri}}}{2\hat V_{\mathrm{tri}}}

The bridge gives +Vdc for a fraction dd and −Vdc for the rest. Volt-seconds per period divided by TsT_s is the local average:

⟨vAB⟩=Vdcd−Vdc(1−d)=Vdc(2d−1)=VdcvrefV^tri\langle v_{AB}\rangle = V_{dc}\,d - V_{dc}(1-d) = V_{dc}(2d-1) = V_{dc}\,\frac{v_{\mathrm{ref}}}{\hat V_{\mathrm{tri}}}

Substituting vref=maV^trisin⁡ωtv_{\mathrm{ref}} = m_a\hat V_{\mathrm{tri}}\sin\omega t:

⟨vAB⟩=maVdcsin⁡ωt\langle v_{AB}\rangle = m_a\,V_{dc}\,\sin\omega t

The filter inductor responds to the integral of voltage, so after filtering what remains is this local average, a sine of peak maVdcm_aV_{dc}. It holds in the linear region ma≤1m_a \le 1. Beyond 1, low-order harmonics appear; the extreme is a square wave with fundamental 4Vdc/π=1.273Vdc4V_{dc}/\pi = 1.273\,V_{dc}.

Worked example. A 230 V grid peaks at 325.3 V. On a 400 V link, ma=325.3/400=0.813m_a = 325.3/400 = 0.813. At the 253 V upper case, 357.8/400=0.894357.8/400 = 0.894, still linear, which is a sensible 10% headroom.

Where the approximation enters: The argument treats the reference as constant within one carrier period. At fs=16kHzf_s = 16\,\mathrm{kHz} it moves by at most 2πf/fs=0.01962\pi f/f_s = 0.0196 of its peak per period, about 2%, and the error shrinks as mfm_f grows.

Bipolar versus unipolar, and where the harmonics land

In unipolar switching, leg A follows +vref+v_{\mathrm{ref}} and leg B follows −vref-v_{\mathrm{ref}}. The average is the same, maVdcsin⁡ωtm_aV_{dc}\sin\omega t, but the output steps between +Vdc, 0 and −Vdc in steps of Vdc and not 2Vdc, and the filter sees pulses at twice the carrier frequency.

BipolarUnipolar
Output levels+Vdc, −Vdc+Vdc, 0, −Vdc
Harmonic clusters (textbook)Around mf and its multiplesAround 2mf and its multiples
Sidebandsmf ± 2, ± 4 ...2mf ± 1, ± 3 ...
At fs = 16 kHz (mf = 320)Near 16, 32, 48 kHzNear 32, 64 kHz

These positions are the standard textbook result for a synchronised carrier with integer mfm_f. Real inverters often free-run the carrier, so sidebands shift slightly, but the clusters stay near fsf_s or 2fs2f_s. For ma≤1m_a \le 1 there are no significant harmonics below the carrier frequency. A numerical simulation at ma=0.9m_a = 0.9 and Vdc=400VV_{dc} = 400\,\mathrm{V} gave a fundamental of 359.8 V against 360 V predicted.

The output peak is at most maVdcm_aV_{dc}, so the linear region sets a floor:

Vdc≥V^maV_{dc} \ge \frac{\hat V}{m_a}

At ma=1m_a = 1 and 230 V this is 325.3 V. Real designs add margin. Take a 10% high grid (253 V) and mam_a limited to 0.95:

Vdc≥2×253V0.95=376.6VV_{dc} \ge \frac{\sqrt2 \times 253\,\mathrm{V}}{0.95} = 376.6\,\mathrm{V}

Hence the common 380 to 400 V DC link. A string below that is lifted by a boost stage, covered in the MPPT and DC-DC converter guide.

Three-phase: deriving 0.612

In a three-phase bridge, each leg voltage relative to the DC mid-point swings between ±Vdc/2\pm V_{dc}/2. The same SPWM argument gives:

⟨vaN⟩=12maVdcsin⁡ωt,⟨vbN⟩=12maVdcsin⁡(ωt−120∘)\langle v_{aN}\rangle = \tfrac12 m_aV_{dc}\sin\omega t, \qquad \langle v_{bN}\rangle = \tfrac12 m_aV_{dc}\sin(\omega t - 120^\circ)

The line voltage is their difference. Using sin⁡A−sin⁡B=2cos⁡A+B2sin⁡A−B2\sin A - \sin B = 2\cos\tfrac{A+B}{2}\sin\tfrac{A-B}{2}, the bracket becomes 3sin⁡(ωt+30∘)\sqrt3\sin(\omega t + 30^\circ):

⟨vab⟩=12maVdc[sin⁡ωt−sin⁡(ωt−120∘)]=32maVdcsin⁡(ωt+30∘)\langle v_{ab}\rangle = \tfrac12 m_aV_{dc}\left[\sin\omega t - \sin(\omega t - 120^\circ)\right] = \tfrac{\sqrt3}{2}\,m_aV_{dc}\sin(\omega t + 30^\circ)

Dividing the peak by 2\sqrt2 gives the rms line voltage:

VLL,rms=322maVdc≈0.612maVdcV_{LL,\mathrm{rms}} = \frac{\sqrt3}{2\sqrt2}\,m_aV_{dc} \approx 0.612\,m_aV_{dc}

Plain SPWM cannot use the last 13% of the available line voltage. Third-harmonic injection adds the same 16sin⁡3θ\tfrac16\sin3\theta term to all three references. It is common-mode, so it cancels in the line-to-line voltages of a three-wire system, and it flattens the reference peak to 3/2\sqrt3/2 of the fundamental. Space-vector PWM (SVPWM) reaches the same limit by another route:

ma,max⁡=23=1.155,VLL,rms=322⋅23Vdc=Vdc2m_{a,\max} = \frac{2}{\sqrt3} = 1.155, \qquad V_{LL,\mathrm{rms}} = \frac{\sqrt3}{2\sqrt2}\cdot\frac{2}{\sqrt3}\,V_{dc} = \frac{V_{dc}}{\sqrt2}

The table gives the minimum DC link, with and without a 10% high-grid margin.

Line voltageSPWM, ma = 1SVPWM, ma = 1.155SPWM, grid +10%SVPWM, grid +10%
400 V653 V566 V719 V622 V
415 V678 V587 V745 V646 V

For 415 V, SPWM needs 415/0.612=677.7V415/0.612 = 677.7\,\mathrm{V} and SVPWM needs 415×2=586.9V415\times\sqrt2 = 586.9\,\mathrm{V}, a saving of 13.4%. Sanity check: with SVPWM the line-to-line peak reaches the full DC link, the limit for any modulation. This is why three-phase string inverters use DC links of several hundred volts. Injection relies on the neutral not being used; a four-wire inverter needs care, because the common-mode term can then drive current.

Harmonics, Fourier series and THD

Any periodic voltage is a sum of sinusoids at multiples of the fundamental frequency. The symbols are:

  • hh, nn: harmonic order, an integer (h=1h = 1 is the fundamental)
  • ana_n, bnb_n: Fourier coefficients of the cosine and sine terms (V)
  • Vh=ah2+bh2V_h = \sqrt{a_h^2 + b_h^2}: amplitude of harmonic hh (V); V1V_1: the fundamental
v(t)=a02+∑n=1∞[ancos⁡nωt+bnsin⁡nωt]v(t) = \frac{a_0}{2} + \sum_{n=1}^{\infty}\left[a_n\cos n\omega t + b_n\sin n\omega t\right]
an=2T∫0Tvcos⁡nωtdt,bn=2T∫0Tvsin⁡nωtdta_n = \frac{2}{T}\int_0^T v\cos n\omega t\,dt, \qquad b_n = \frac{2}{T}\int_0^T v\sin n\omega t\,dt

Total harmonic distortion compares everything above the fundamental with the fundamental (peak or rms amplitudes give the same ratio):

THD=∑h≥2Vh2V1\mathrm{THD} = \frac{\sqrt{\sum_{h\ge2}V_h^2}}{V_1}

Worked example: the square wave

Take a square wave of amplitude VV, positive for the first half period and negative for the second. It is odd-symmetric, so every an=0a_n = 0, and the two half periods contribute equally to bnb_n:

bn=4VT∫0T/2sin⁡nωtdt=2Vnπ(1−cos⁡nπ)=4Vnπ(n odd)b_n = \frac{4V}{T}\int_0^{T/2}\sin n\omega t\,dt = \frac{2V}{n\pi}\left(1 - \cos n\pi\right) = \frac{4V}{n\pi}\;\;(n\ \text{odd})

Even harmonics vanish, and harmonic hh is 1/h1/h of the fundamental. For a ±400V\pm400\,\mathrm{V} swing the fundamental peak is 509.3 V, the third 169.8 V and the fifth 101.9 V. Then:

THD2=∑h=3,5,7,…1h2=π28−1⇒THD=π28−1=48.3%\mathrm{THD}^2 = \sum_{h=3,5,7,\ldots}\frac{1}{h^2} = \frac{\pi^2}{8} - 1 \;\;\Rightarrow\;\; \mathrm{THD} = \sqrt{\frac{\pi^2}{8}-1} = 48.3\%

This uses ∑h odd1/h2=π2/8\sum_{h\ \mathrm{odd}}1/h^2 = \pi^2/8.

Harmonic hVh / V1Cumulative THD up to h
3 (150 Hz)33.3%33.3%
5 (250 Hz)20.0%38.9%
7 (350 Hz)14.3%41.4%
21 (1,050 Hz)4.8%45.9%
All odd harmonicsfalling as 1/h48.3%

A square wave plus a filter is not enough: the lowest harmonic is at 150 Hz, only three times the fundamental, and a filter that cut it hard would also distort 50 Hz. SPWM moves the energy to frequencies hundreds of times higher, where a small filter removes it. Grid codes such as IEEE 1547 and the CEA connectivity regulations limit the current distortion an inverter may inject, so check the current edition.

The output filter: LC and LCL

With harmonics near 16 or 32 kHz, a low-pass filter can pass 50 Hz and block them. Let LL be the series inductance (H), CC the shunt capacitance (F) and fcf_c the cutoff (Hz). For an unloaded LC divider:

VoVi=1/(jωC)jωL+1/(jωC)=11−ω2LC\frac{V_o}{V_i} = \frac{1/(j\omega C)}{j\omega L + 1/(j\omega C)} = \frac{1}{1 - \omega^2LC}

The denominator vanishes at resonance, which defines the cutoff:

fc=12πLCf_c = \frac{1}{2\pi\sqrt{LC}}

Well above fcf_c, the magnitude falls with the square of the frequency ratio, which is 40 dB per decade:

|H|=1(f/fc)2−1≈(fcf)2,AdB≈−40log10⁡ffc|H| = \frac{1}{(f/f_c)^2 - 1} \approx \left(\frac{f_c}{f}\right)^2, \qquad A_{\mathrm{dB}} \approx -40\log_{10}\frac{f}{f_c}

Worked example. Choose L=2mHL = 2\,\mathrm{mH} and C=4.7μFC = 4.7\,\mu\mathrm{F}:

fc=12π2×10−3×4.7×10−6=1.64kHzf_c = \frac{1}{2\pi\sqrt{2\times10^{-3}\times4.7\times10^{-6}}} = 1.64\,\mathrm{kHz}

This is 33 times the grid frequency, so 50 Hz passes almost untouched, and 9.7 times below fs=16kHzf_s = 16\,\mathrm{kHz}. At the switching frequency:

|H(16kHz)|=195.0−1=0.0106⇒−39.5dB|H(16\,\mathrm{kHz})| = \frac{1}{95.0 - 1} = 0.0106 \;\Rightarrow\; -39.5\,\mathrm{dB}

At 32 kHz (the unipolar cluster) it is 51.6 dB. The shortcut −40log10⁡(16000/1641.6)-40\log_{10}(16000/1641.6) gives 39.6 dB, within 0.1 dB. The capacitor draws 0.34 A at 50 Hz, about 78 var or 1.6% of 5 kVA.

On a real grid: L, then LCL

A grid-connected inverter drives a stiff source whose impedance is small at high frequency, so the series inductor does most of the work. In unipolar switching at an effective 2fs2f_s, the current ripple peaks when the instantaneous voltage is Vdc/2V_{dc}/2:

ΔIpp=Vdc4L(2fs)=4004×0.002×32000=1.56A\Delta I_{pp} = \frac{V_{dc}}{4L\,(2f_s)} = \frac{400}{4\times0.002\times32000} = 1.56\,\mathrm{A}

That is 5.1% of the 30.7 A peak current of a 5 kW unit. An LCL filter adds a second inductor and gives 60 dB per decade above its resonance, so smaller inductors reach the same attenuation:

fres=12πL1+L2L1L2Cff_{\mathrm{res}} = \frac{1}{2\pi}\sqrt{\frac{L_1 + L_2}{L_1L_2C_f}}

Here L1L_1 is the inverter-side inductor, L2L_2 the grid-side one and CfC_f the capacitor. Undamped, that resonance can destabilise the current controller, so designers place it between about ten times the grid frequency and half the switching frequency, and damp it with a resistor or in firmware. Fast edges also drive leakage current through the PV-to-earth capacitance, one reason earthing matters; see earthing and surge protection for solar plants.

Grid synchronisation and power flow

To export power, the inverter must match the grid's frequency and phase. A phase-locked loop (PLL) estimates the grid phase. Let θ\theta be the true phase, θ^\hat\theta the estimate and vg=V^sin⁡θv_g = \hat V\sin\theta. Multiply the measurement by cos⁡θ^\cos\hat\theta:

vgcos⁡θ^=12V^[sin⁡(θ−θ^)+sin⁡(θ+θ^)]v_g\cos\hat\theta = \tfrac12\hat V\left[\sin(\theta - \hat\theta) + \sin(\theta + \hat\theta)\right]

A low-pass filter removes the second term, which sits near 100 Hz. The first is proportional to the phase error for small angles:

ε≈12V^(θ−θ^)\varepsilon \approx \tfrac12\hat V(\theta - \hat\theta)

A PI controller turns ε\varepsilon into a frequency correction, and an integrator turns frequency into phase:

ω^=ω0+Kpε+Ki∫εdt,θ^=∫ω^dt\hat\omega = \omega_0 + K_p\varepsilon + K_i\!\int\!\varepsilon\,dt, \qquad \hat\theta = \int\hat\omega\,dt

At zero error the estimate has locked onto the grid's phase and frequency.

Real and reactive power through a reactance

Model the inverter as a voltage phasor V1∠δV_1\angle\delta (rms) joined to the grid V2∠0∘V_2\angle0^\circ through a series reactance X=ωLX = \omega L (ohms). The current is:

𝐈=V1∠δ−V2jX\mathbf I = \frac{V_1\angle\delta - V_2}{jX}

The complex power from the inverter is 𝐒=𝐕1𝐈∗\mathbf S = \mathbf V_1\mathbf I^*, with ∗^* the complex conjugate:

𝐒=j(V12−V1V2ejδ)X=V1V2sin⁡δX+jV12−V1V2cos⁡δX\mathbf S = \frac{j\left(V_1^2 - V_1V_2e^{j\delta}\right)}{X} = \frac{V_1V_2\sin\delta}{X} + j\,\frac{V_1^2 - V_1V_2\cos\delta}{X}

The real part is real power PP and the imaginary part reactive power QQ:

P=V1V2Xsin⁡δ,Q=V1X(V1−V2cos⁡δ)P = \frac{V_1V_2}{X}\sin\delta, \qquad Q = \frac{V_1}{X}\left(V_1 - V_2\cos\delta\right)

For a purely reactive link these are exact; texts write Q≈Q \approx when lines also have resistance. For small δ\delta (radians), P≈V1V2δ/XP \approx V_1V_2\delta/X and Q≈V1(V1−V2)/XQ \approx V_1(V_1 - V_2)/X: the angle sets real power, and the voltage magnitude sets reactive power.

Worked example. A 5 kW inverter feeds a 230 V grid through L=2mHL = 2\,\mathrm{mH}, so X=2π×50×0.002=0.628ΩX = 2\pi\times50\times0.002 = 0.628\,\Omega. Unity power factor at the grid requires V1cos⁡δ=V2V_1\cos\delta = V_2, so P=V22tan⁡δ/XP = V_2^2\tan\delta/X:

tan⁡δ=PXV22=5000×0.6282302=0.0594⇒δ=3.40∘\tan\delta = \frac{PX}{V_2^2} = \frac{5000\times0.628}{230^2} = 0.0594 \;\Rightarrow\; \delta = 3.40^\circ

Then V1=230/cos⁡3.40∘=230.4VV_1 = 230/\cos3.40^\circ = 230.4\,\mathrm{V} at 21.7 A. The reactive power is Q=I2X=21.742×0.628=297varQ = I^2X = 21.74^2\times0.628 = 297\,\mathrm{var}, matching the QQ formula; the inductor consumes it. The table uses V1=V2=230VV_1 = V_2 = 230\,\mathrm{V} on the same link.

Angle δPQ at inverter
1°1.47 kW13 var
3.4°4.99 kW148 var
10°14.6 kW1,279 var
30°42.1 kW11,280 var

A few degrees move kilowatts, and the maximum at 90 degrees is 84.2 kW for this link. In practice the inverter regulates its output current, with the PLL supplying the reference phase. An outer loop holds the DC-link voltage steady: if the link rises, more power is coming in than going out, so the current amplitude rises. The tracker sets what the array delivers, and the grid side exports exactly that.

S, P, Q and power factor

Apparent power SS (VA) is rms voltage times rms current. Real power PP (W) does work, and reactive power QQ (var) shuttles back and forth. With φ\varphi the angle between voltage and current:

S=VrmsIrms,P=Scos⁡φ,Q=Ssin⁡φ,S2=P2+Q2S = V_{\mathrm{rms}}I_{\mathrm{rms}}, \quad P = S\cos\varphi, \quad Q = S\sin\varphi, \quad S^2 = P^2 + Q^2

The power factor is PF=P/S=cos⁡φ\mathrm{PF} = P/S = \cos\varphi for sinusoids. A 5 kVA inverter at PF 0.9 delivers 4.5 kW and 2.18 kvar. Because the inverter is limited in VA, reactive power reduces the real power it can export; confirm your DISCOM's settings.

Synchronisation also supports anti-islanding. If the grid fails while local load nearly matches the inverter output, the inverter could keep a local network live and endanger line workers. Inverters watch voltage, frequency and phase against set windows, and may inject a small disturbance so an island drifts out of limits and trips; IEEE 1547 and the CEA connectivity regulations cover this. The effect you notice is in what a solar inverter is: a plant stops in an outage unless it is backup-capable.

Return to the 100 Hz pulsation. Assume the DC side supplies constant power PP, which is what MPPT aims for, while the AC side takes p(t)=P(1−cos⁡2ωt)p(t) = P(1-\cos2\omega t). The symbols are:

  • pCp_C: power into the capacitor (W); EE: energy stored (J)
  • CC: DC-link capacitance (F); VdcV_{dc}: mean DC-link voltage (V)
  • ΔVpp\Delta V_{pp}: peak-to-peak ripple voltage (V)

The capacitor absorbs the difference:

pC(t)=P−p(t)=Pcos⁡2ωtp_C(t) = P - p(t) = P\cos2\omega t

Integrating gives an energy that oscillates about its mean:

E(t)=E0+P2ωsin⁡2ωt⇒ΔEpp=PωE(t) = E_0 + \frac{P}{2\omega}\sin2\omega t \quad\Rightarrow\quad \Delta E_{pp} = \frac{P}{\omega}

A capacitor stores 12CV2\tfrac12CV^2, so the same swing is:

ΔE=12C(Vmax⁡2−Vmin⁡2)=12C(Vmax⁡+Vmin⁡)(Vmax⁡−Vmin⁡)=CVdcΔVpp\Delta E = \tfrac12C\left(V_{\max}^2 - V_{\min}^2\right) = \tfrac12C\,(V_{\max}+V_{\min})(V_{\max}-V_{\min}) = C\,V_{dc}\,\Delta V_{pp}

This is exact when VdcV_{dc} is the midpoint of the swing. Equating the two energies gives the sizing rule:

C=PωVdcΔVppC = \frac{P}{\omega\,V_{dc}\,\Delta V_{pp}}

Worked example. A 5 kW inverter at Vdc=400VV_{dc} = 400\,\mathrm{V} with 5% peak-to-peak ripple has ΔVpp=20V\Delta V_{pp} = 20\,\mathrm{V}:

C=5000W314.16rad/s×400V×20V=1.99×10−3F≈2mFC = \frac{5000\,\mathrm{W}}{314.16\,\mathrm{rad/s}\times400\,\mathrm{V}\times20\,\mathrm{V}} = 1.99\times10^{-3}\,\mathrm{F} \approx 2\,\mathrm{mF}

The energy swing is 15.9 J and the voltage runs from 390 V to 410 V. Check: 12×1.99mF×(4102−3902)=15.9J\tfrac12\times1.99\,\mathrm{mF}\times(410^2 - 390^2) = 15.9\,\mathrm{J}. The 100 Hz capacitor current has amplitude P/VdcP/V_{dc}, so its rms value is:

IC,rms=P2Vdc=50002×400=8.84AI_{C,\mathrm{rms}} = \frac{P}{\sqrt2\,V_{dc}} = \frac{5000}{\sqrt2\times400} = 8.84\,\mathrm{A}

Ripple-current rating matters as much as capacitance, and electrolytic capacitors, the usual choice, are a typical wear item.

Ripple (peak to peak)ΔVC for 5 kW at 400 V
2%8 V4,974 µF
5%20 V1,989 µF
10%40 V995 µF

The capacitor sits on the high-voltage DC link after the boost stage, not across the panels, because 100 Hz ripple across the array would make the operating point wobble and cost energy, as MPPT theory shows. A three-phase inverter has no 100 Hz term, so its capacitor only handles switching ripple.

Stored energy is a hazard: The 2 mF capacitor above holds 12CV2=159J\tfrac12CV^2 = 159\,\mathrm{J} at 400 V. Do not open an inverter. Only a qualified, licensed electrician should work on one, after the manufacturer's discharge time has passed and de-energisation is verified. PV strings stay live whenever light falls on them.

Electrical equipment and monitoring hardware for a solar inverter installation
Around an inverter sit the switching bridge, DC-link capacitors, filter magnetics and the control board that runs the PLL and current loops.

Losses, efficiency and the switching-frequency trade-off

Conduction loss depends on current: for a MOSFET it is RonIrms2R_{\mathrm{on}}I_{\mathrm{rms}}^2, and for an IGBT VCE0Iavg+rCEIrms2V_{CE0}I_{\mathrm{avg}} + r_{CE}I_{\mathrm{rms}}^2. Switching loss occurs at each transition, when voltage and current overlap, and is proportional to switching frequency. Using E‾sw\bar E_{sw} for the average energy per switching event:

Pcond≈2RonIrms2,Psw≈4fsE‾sw,η=PP+Pcond+PswP_{\mathrm{cond}} \approx 2R_{\mathrm{on}}I_{\mathrm{rms}}^2, \qquad P_{sw} \approx 4f_s\bar E_{sw}, \qquad \eta = \frac{P}{P + P_{\mathrm{cond}} + P_{sw}}

These assume two devices conduct at any instant and four switch each period; inductor, gate-drive and boost-stage losses are extra.

Worked example. Assume Ron=50mΩR_{\mathrm{on}} = 50\,\mathrm{m}\Omega and a datasheet Eon+Eoff=0.4mJE_{on}+E_{off} = 0.4\,\mathrm{mJ} at 400 V and 30 A, scaled linearly with current. With Irms=21.74AI_{\mathrm{rms}} = 21.74\,\mathrm{A}, Pcond=2×0.05×21.742=47.3WP_{\mathrm{cond}} = 2\times0.05\times21.74^2 = 47.3\,\mathrm{W}. The cycle-average current magnitude is 2/π2/\pi of the 30.74 A peak, so E‾sw=0.4mJ×(30.74/30)×(2/π)=0.261mJ\bar E_{sw} = 0.4\,\mathrm{mJ}\times(30.74/30)\times(2/\pi) = 0.261\,\mathrm{mJ}, and at 16 kHz Psw=4×16000×0.261×10−3=16.7WP_{sw} = 4\times16000\times0.261\times10^{-3} = 16.7\,\mathrm{W}.

Switching frequencySwitching lossTotal bridge lossBridge efficiencyRipple, 2 mH unipolar
4 kHz4.2 W51.4 W98.98%6.25 A (20% of peak)
8 kHz8.4 W55.6 W98.90%3.13 A (10%)
16 kHz16.7 W64.0 W98.74%1.56 A (5.1%)
32 kHz33.4 W80.7 W98.41%0.78 A (2.5%)

The trade-off is plain. Doubling fsf_s doubles switching loss but halves the ripple for a given inductor, or lets you halve the inductor. Higher frequency gives a smaller, cheaper filter but more heat. When you compare datasheets, such as those in top solar inverter brands in India, look at weighted efficiency across load levels and at THD at rated power, not only the peak efficiency.

If you want this analysis for your own site, covering the DC-to-AC ratio, string voltage against the inverter window and power quality, Ray2Volt can work through it with you. Start with a free power audit or see our commercial and industrial solar service.

Frequently asked questions

Why does a 230 V single-phase inverter need a DC link of about 400 V?

Because 230 V is an rms value. The sine wave peaks at about 325 V, and the inverter can create a peak equal only to the modulation index times the DC-link voltage, with the index kept below 1. Allowing for a grid 10% high (peak about 358 V) and an index limit of 0.95, the DC link must be at least about 377 V, so 380 to 400 V is common.

Why does a single-phase inverter need a big DC-link capacitor but a three-phase inverter does not?

Single-phase power pulses at 100 Hz between zero and twice the average, while the PV array supplies nearly constant power, so a capacitor stores the difference. A 5 kW inverter at 400 V with 5% peak-to-peak ripple needs about 2 mF. In a balanced three-phase system the three phase powers add up to a constant, so no 100 Hz storage is needed.

What is THD and what value is acceptable?

Total harmonic distortion is the square root of the sum of squares of all harmonic amplitudes above the fundamental, divided by the fundamental. A plain square wave has a THD of 48.3%. The limits for injected current come from grid codes such as IEEE 1547 and the CEA connectivity regulations, so check the current edition and your DISCOM's requirements.

Why do inverters switch at kilohertz frequencies and not much higher?

A higher switching frequency shrinks the filter and the current ripple, but switching loss rises in direct proportion. In the worked 5 kW example, going from 4 kHz to 32 kHz cut the ripple eightfold but raised bridge losses from about 51 W to about 81 W.

How does an inverter stay in step with the grid?

A phase-locked loop compares an internal estimate of the grid phase with the measured voltage and adjusts its frequency until the error is zero. The inverter then drives a sinusoidal current in phase with that reference, with an amplitude set by the DC-link voltage controller so that exported power matches what the panels deliver.

Ray2Volt Solar

Ray2Volt Solar Private Limited

We design, install, and service rooftop solar for homes and businesses across Tirupati district and Andhra Pradesh — from PM Surya Ghar residential systems to commercial and industrial plants. Every enquiry starts with a free power audit.

Want this analysis for your own plant?

We can check your string voltages against the inverter window, the DC-to-AC ratio and the power quality of your site. Book a free power audit and bring your inverter datasheet.

Get a free quote Chat on WhatsApp