Power Electronics

Grid-Tie Inverter

Syncing solar DC to the AC grid's heartbeat

A grid-tie inverter is a power-electronic converter that turns the variable DC from solar panels into AC current locked to the utility grid in voltage, frequency and phase, then injects that current at near-unity power factor. It does not set the voltage — the grid does — so it behaves as a precisely controlled current source. A phase-locked loop tracks the grid's voltage angle to within a degree, a current loop shapes a sinusoidal output in phase with it, maximum-power-point tracking holds the panels at their peak, and an anti-islanding scheme disconnects within two seconds if the grid drops. The whole design hinges on one identity: real power exported is P = V·I·cos(φ), and it is maximized only when the current is exactly in phase with the voltage.

  • Real power exportedP = V·I·cos(φ)
  • Grid frequency window59.3–60.5 Hz (US)
  • Steady-state phase error< 1°
  • Anti-islanding trip≤ 2 s (IEEE 1547)
  • Switching frequency8–20 kHz PWM
  • Peak efficiency97–99%

Interactive visualization

Press play, or step through manually. The visualization is yours to drive — try it before reading on.

Open visualization fullscreen ↗

Watch the 60-second explainer

A condensed visual walkthrough — narrated, captioned, under a minute.

From DC to a grid-locked sine wave

Solar panels make DC. The grid runs on AC. A grid-tie inverter bridges the two, but the hard part is not making AC — any cheap inverter can do that. The hard part is making AC that is so perfectly aligned to the grid's existing voltage waveform that current flows out smoothly, carrying power one way, without fighting the grid. Get the alignment wrong by a few degrees and you waste capacity on reactive current; get it wrong by tens of degrees and you draw destructive circulating currents.

The core of the machine is an H-bridge (single-phase) or a six-switch bridge (three-phase) of IGBTs or MOSFETs, chopping the DC bus at 8–20 kHz with pulse-width modulation. An LCL output filter smooths those chopped pulses into a clean sinusoid. The control problem reduces to one statement of intent:

Grid voltage:   v_grid(t) = V·sin(θ_grid)
Injected current: i_inv(t) = I·sin(θ_grid − φ)

Instantaneous power: p(t) = v_grid · i_inv
Average real power:  P = V·I·cos(φ)          (W)
Reactive power:      Q = V·I·sin(φ)          (var)

φ = 0  →  all power is real, exported cleanly
φ ≠ 0  →  some current is reactive — heats wires, exports nothing

So the inverter's job is to manufacture θ_grid internally (it cannot measure the future of the waveform, it must predict the phase), then command its current to follow I·sin(θ_grid). The device that predicts the phase is the phase-locked loop.

The phase-locked loop: tracking the grid's heartbeat

A phase-locked loop (PLL) is a feedback loop that synthesizes an internal angle θ and continuously drives it to match the grid's voltage angle. It has three parts:

  • Phase detector. Compares the grid voltage to the internal estimate and outputs an error proportional to their phase difference. In a three-phase inverter this is a Park (dq) transform: align the rotating frame so the q-axis voltage v_q becomes the phase error and driving it to zero locks the angle.
  • Loop filter. A PI controller that integrates the error, setting the loop's bandwidth (typically 10–50 Hz). Too fast and it chases harmonics and noise; too slow and it can't follow a frequency ramp during a disturbance.
  • Numerically controlled oscillator. Integrates the corrected frequency into the running angle θ, which feeds back to the phase detector and out to the current controller.

In steady state the loop holds the q-axis voltage at zero, meaning the internal angle is exactly aligned with the grid voltage vector — phase error under a degree, even as the grid frequency wanders across the allowed 59.3–60.5 Hz window. Single-phase inverters have only one voltage to measure, so they synthesize the missing 90°-shifted "quadrature" signal with a second-order generalized integrator (SOGI) before feeding the same dq machinery.

Three-phase SRF-PLL:

  v_abc ──► Clarke ──► Park(θ) ──► v_q ──► PI ──► Δω
                                            │       │
                                          ω_ff ────►(+)──► ω ──► ∫ ──► θ
                                                                    │
                                                  └─────── feedback ─┘

Lock condition: v_q → 0  ⇔  θ aligned with grid voltage angle

Why a current source, not a voltage source

This is the conceptual hinge of the whole topic. The grid is an enormous, stiff voltage source: a continent of spinning generators that will not let a single rooftop inverter budge its voltage. If the inverter tried to also impose a voltage, then the tiny mismatch ΔV between its voltage and the grid's, divided by the very small line-plus-filter impedance Z, would create an uncontrolled current I = ΔV / Z — easily hundreds of amps from a fraction of a volt. That is a recipe for tripping breakers or destroying switches.

So a grid-following inverter regulates current instead. It treats the grid voltage as a given, locks onto its phase, and commands a current of chosen amplitude and phase. Power export is then dialed in directly by choosing how much in-phase current to inject. The trade-off and the alternative are worth tabulating.

Grid-following (current source)Grid-forming (voltage source)Off-grid (standalone)
What it controlsOutput current (amplitude & phase)Output voltage & phase (droop / virtual inertia)Output voltage & frequency, fixed
Needs the grid present?Yes — must phase-lock to itCan run with or without a gridNo — it is the grid
SynchronizationPLL tracks grid angleSets its own angle, droops to share loadFree-running oscillator
Behavior on grid lossMust trip (anti-islanding)Can keep an island energized intentionallyKeeps running
Short-circuit responseCurrent-limited, weakCan supply fault current, stiffBattery/engine-limited
Typical useRooftop & utility solar todayMicrogrids, weak-grid & high-renewable systemsCabins, RVs, emergency backup

The vast majority of installed solar inverters are grid-following. The catch is that they need a strong grid to lean on; as grids approach 100% inverter-based generation there is no spinning mass to set the reference, which is why grid-forming inverters with synthetic inertia are now mandated in some markets.

Worked example: how much current to export 5 kW

A single-phase 240 V (RMS) residential inverter wants to export 5 kW at unity power factor. How much current does it inject, and what does a 3° phase error cost?

At unity power factor (φ = 0):
  P = V·I·cos(φ)
  5000 = 240 · I · cos(0)
  I = 5000 / 240 = 20.8 A  (RMS, in phase with voltage)

Now introduce a 3° phase error (φ = 3°):
  Real power for the same current:
    P = 240 · 20.8 · cos(3°) = 240 · 20.8 · 0.9986 = 4985 W
  Reactive power created:
    Q = 240 · 20.8 · sin(3°) = 240 · 20.8 · 0.0523 = 261 var

  Power factor drops to cos(3°) = 0.9986
  ≈ 7 W of export lost, plus 261 var of useless circulating current

Three degrees barely dents real power but conjures 261 var of reactive current that heats the wiring and consumes the inverter's current rating for nothing. Push the error to 30° and cos(30°) = 0.866 — you would lose 13% of your export and overload the inverter chasing the same 5 kW. This is exactly why the PLL must hold sub-degree accuracy, and why utilities sometimes command a deliberate offset (Volt-VAR support) rather than letting it drift uncontrolled.

MPPT: harvesting the most from the panels

On the DC side, the inverter must hold the panels at their maximum power point — the knee of the current-voltage curve where P = V·I peaks, roughly 0.8 of open-circuit voltage and drifting with sun and temperature. The classic algorithm is perturb-and-observe: nudge the operating voltage, see whether power went up or down, and keep climbing the hill.

Perturb & Observe:
  measure P(now)
  if P(now) > P(last):  keep stepping the same direction
  else:                 reverse the step direction
  loop every few ms

Harvested DC power then sets the AC current command:
  I_ac_ref ≈ (η · P_dc) / V_grid_rms      (η ≈ 0.97–0.99)

A 10 kW string inverter typically runs one or two MPPT channels across long panel strings; microinverters run one MPPT per panel, so a leaf shading one module no longer drags an entire string's voltage down — at the cost of one converter per panel. Power optimizers split the difference, doing per-panel MPPT at DC while a single central inverter does the grid-tie.

Anti-islanding: the safety reflex

Because a grid-following inverter mimics whatever phase it sees, it has a dangerous failure mode. If the utility feed is cut — a fault, or a lineworker opening a switch to repair the line — but local loads happen to balance the inverter's output, the inverter can keep a dead section of grid energized. That is an island, and it can electrocute a lineworker who believes the line is dead, or destroy equipment when the utility recloses out of phase. Detecting and killing this within seconds is mandatory.

  • Passive detection. Watch for over/under voltage and over/under frequency. Cheap, but blind in the "non-detection zone" where local generation and load almost match.
  • Active detection. Inject a tiny destabilizing perturbation — a small frequency bias (Sandia Frequency Shift) or a periodic real/reactive power wiggle. While the stiff grid is present it absorbs the perturbation invisibly; the instant the grid is gone the perturbation runs away, voltage or frequency drifts out of bounds, and the inverter trips.
  • Communication-based. Transfer-trip signals or power-line carrier from the utility directly command disconnection — the most reliable, the most expensive.

IEEE 1547 and UL 1741 require the inverter to cease energizing within 2 seconds of an island forming, and in practice it is usually a fraction of a second. After the grid returns and is verified stable for typically 5 minutes, the inverter resynchronizes and reconnects.

Failure modes and trade-offs

  • PLL loss of lock under weak/distorted grids. High grid impedance or heavy harmonic distortion can push a fast PLL into oscillation or even instability — a known driver of sub-synchronous oscillations in wind/solar-heavy grids. Slowing the loop fixes stability but worsens transient tracking; the tuning is a genuine trade-off.
  • Anti-islanding non-detection zone. Passive-only schemes can miss a perfectly load-matched island. Active perturbation closes the gap but injects a little distortion and can interact badly when many inverters perturb at once on the same feeder.
  • DC-bus ripple and electrolytic capacitor aging. Single-phase inverters see a 120 Hz power pulsation that must be buffered; the buffer caps run hot and are the most common wear-out item, often setting the product's lifetime well below the panels' 25 years.
  • Harmonic injection. Imperfect current shaping pushes harmonics into the grid. Standards cap total harmonic distortion (THD) at about 5% of rated current; meeting it demands a good LCL filter and dead-time compensation in the PWM.
  • Over-voltage trip on long feeders. Many inverters at the end of a feeder can raise local voltage above limits, tripping themselves offline mid-afternoon and curtailing energy — a clustering problem solved with Volt-VAR/Volt-Watt droop modes.
  • Switch and thermal failures. IGBT/MOSFET failure, gate-driver faults, and inadequate cooling at high ambient temperature derate or shut down the inverter; thermal cycling drives bond-wire and solder fatigue over years.

Frequently asked questions

What is a grid-tie inverter?

A grid-tie inverter is a power-electronic converter that turns the DC output of solar panels (or a battery) into AC that is synchronized to the utility grid in voltage, frequency and phase, then pushes current back into the grid. Unlike an off-grid inverter, it does not set its own voltage — the grid does that. Instead it behaves as a controlled current source, injecting a sinusoidal current locked to the grid's voltage waveform so the exported power flows cleanly at near-unity power factor. If the grid disappears, it must stop within seconds (anti-islanding).

How does a grid-tie inverter synchronize with the grid?

It measures the grid voltage and runs it through a phase-locked loop (PLL). The PLL contains a phase detector, a PI loop filter, and a numerically controlled oscillator that outputs an estimated angle θ. The loop drives the error between its internal angle and the grid angle to zero, so θ tracks the grid even as frequency drifts between 59.3 and 60.5 Hz. The inverter then builds its reference current as i_ref = I·sin(θ), guaranteeing the injected current is in phase with grid voltage. A single-phase PLL typically uses an orthogonal-signal generator (SOGI) to synthesize the quadrature component the phase detector needs.

What is anti-islanding and why does it matter?

Islanding is when a section of grid loses its utility source but a local inverter keeps energizing it — for example during a fault or a lineworker's repair. That is a lethal hazard and can damage equipment when the grid reconnects out of phase. Anti-islanding is the inverter's duty to detect grid loss and disconnect fast. Passive methods watch for over/under voltage and frequency; active methods inject a small frequency perturbation (e.g. Sandia frequency shift) that runs away when the stiff grid is gone. IEEE 1547 / UL 1741 require clearing within 2 seconds, and typically much faster.

Why does a grid-tie inverter act as a current source instead of a voltage source?

The grid is an enormous stiff voltage source — a single residential inverter cannot move its voltage. If the inverter tried to also impose a voltage, the tiny difference between its voltage and the grid's, divided by the small line+filter impedance, would create huge uncontrolled circulating currents. So a grid-following inverter regulates current instead: it picks a target current amplitude and phase and lets the grid set the voltage. Power exported is then P = V·I·cos(φ), controlled simply by choosing how much in-phase current to inject. Grid-forming inverters, used to anchor weak or islanded grids, do impose voltage and phase and behave more like a synchronous machine.

What is MPPT and how does it relate to the inverter?

Maximum power point tracking holds the panels at the voltage where the product P = V·I is largest — roughly 0.8 of open-circuit voltage, drifting with irradiance and temperature. The inverter's DC-side controller perturbs the operating voltage and observes whether power rose or fell (perturb-and-observe), climbing the P-V curve. The AC current command is then scaled so that exported power equals the harvested DC power minus conversion losses. A 10 kW string inverter runs MPPT on each DC input, while microinverters run one MPPT per panel so shade on one module doesn't drag down the rest.

What happens if the inverter's phase is slightly off?

A phase error φ between injected current and grid voltage splits the apparent power into real power P = V·I·cos(φ) and reactive power Q = V·I·sin(φ). A few degrees of error wastes capacity as reactive current that heats wires without exporting energy, and degrades power factor. Modern inverters under IEEE 1547-2018 can deliberately run a controlled phase offset (Volt-VAR mode) to inject or absorb reactive power and help regulate local grid voltage, but uncommanded phase error is pure loss. The PLL keeps steady-state error near zero, typically under 1 degree.