Skip to content

Two-Level Inverter (switched) ​

Switched two-level three-phase voltage-source converter: three legs, each an upper and a lower IGBT with an anti-parallel diode, between the DC rails dc_pos / dc_neg and the 3-phase AC bus. One internal triangle carrier in [−1, 1] at the switching frequency is compared with the per-phase modulation inputs ma / mb / mc (clamped to [−1, 1]): m above the carrier gates the upper IGBT of that leg, otherwise the lower one. Every gate turns on only after its leg command has been steady for the dead time, so the two IGBTs of a leg are never gated together; during the dead time the diodes carry the current. With sine modulation of index m the fundamental line-to-line voltage is m·Vdc·√6/4 RMS. block > 0.5 turns every gate off (the bridge then acts as a diode rectifier). The gate and modulation inputs are read one step delayed. The power stage only: build the current, DC-voltage and Q controls on the canvas (PLL, abc–dq, PID) and drive ma / mb / mc. Use it for detailed EMT studies of full-converter wind turbines, PV and drives at a time step well below the switching period; use the average Grid-Following Inverter for load flow and long runs.

Category: Power Electronics / Inverters

Overview ​

The Two-Level Inverter is a switched three-phase voltage-source converter. It has three legs, each an upper and a lower IGBT with an anti-parallel diode, connected between the DC rails and the three-phase AC bus. Every switching event is simulated, so the AC voltage is the real two-level PWM waveform with its carrier harmonics, and the DC bus sees the real pulsed current.

It is the power stage only. Build the controls on the canvas (a PLL, abc–dq transforms, and PI current, DC-voltage and reactive-power loops) and drive the three modulation inputs. For load flow or long runs, use the average Grid-Following Inverter instead.

Legs ​

Each leg connects one AC phase to both DC rails:

  • the upper valve runs from DC+ to the phase;
  • the lower valve runs from the phase to DC−.

A valve conducts in one of two ways:

  • IGBT — only while its gate is high, carrying current from the DC+ side toward DC− (collector to emitter), with an on-state drop Vce,sat.
  • Diode — whenever it is reverse-biased, carrying current the other way, with a forward drop Vf. No gate is needed.

Both paths share the on-resistance Ron. Otherwise the valve blocks through Roff. The solver re-checks every valve within the time step, so a commutation from an IGBT to the opposite diode settles in the same step.

Carrier and modulation ​

One triangle carrier c(t) in [−1,1] at the switching frequency fsw is shared by the three legs. Each modulation input mx is clamped to [−1,1] and compared with it:

mx>c(t)⇒upper valve commanded,mx≤c(t)⇒lower valve commanded.

The phase leg therefore switches between VDC+ and VDC− with a local average of 12(1+mx)Vdc above DC−. With balanced sine modulation of peak m≤1, the fundamental line-to-line voltage is

VLL,rms=mVdc64≈0.612mVdc.

Adding a third harmonic to the modulation (or using space-vector modulation built on the canvas) extends the linear range by about 15%. Above m=1 the inverter over-modulates.

Choose a time step much shorter than the switching period, for example 2 µs for a 2 kHz carrier (250 steps per period). If fsw is a whole multiple of the grid frequency, the carrier harmonics sit on clean sidebands.

Dead time ​

A real leg must never turn both IGBTs on together: that shorts the DC bus (a shoot-through). Each leg therefore waits for the dead time after its command changes before gating the incoming IGBT. During that interval both gates are low, and the load current freewheels through one of the diodes. The dead time is rounded up to whole time steps. Set it to 0 for ideal complementary gating.

Dead time costs a little output voltage: roughly Vdctdeadfsw on average, against the current direction. At 600 V, 4 µs and 2 kHz that is about 5 V.

Block ​

While blk is above 0.5, every gate is held low. The bridge then acts as a three-phase diode rectifier from the AC side. Use a time table on blk to keep the inverter blocked while the DC bus charges, then release it.

Timing ​

The modulation and block inputs are read one step late, as for every control signal that drives an electrical component. A change on ma / mb / mc or blk acts on the following step.

Wiring ​

  • DC+ / DC− — the DC bus (capacitor, chopper, or DC source).
  • AC 3φ — the grid side, normally through a filter choke and a transformer.
  • ma, mb, mc — per-phase modulation in [−1,1] from the current controller (for example the dq → abc transform of the voltage reference divided by Vdc/2).
  • blk — optional block input.

Enable the monitors on the Config tab to record the DC current, the three AC phase currents, and the six gate signals.

Ports ​

PortKindSignalNotes
acThree-phase terminal—
dc_posElectrical terminal—
dc_negElectrical terminal—
maControl inputReal
mbControl inputReal
mcControl inputReal
blockControl inputReal

Parameters ​

Config ​

ParameterTypeDefaultUnitsDescriptionID
f_swNumber2000Hz (also kHz)Frequency of the internal triangle carrier. Keep the time step at least ~50× shorter than the switching period.switching_frequency
Dead timeNumber4µs (also ms, s)Blanking interval between turning one IGBT of a leg off and its complement on. Rounded up to whole time steps; 0 gives ideal complementary gating.dead_time
Vce_satNumber0V (also mV)IGBT on-state voltage drop, applied to all six IGBTs.v_ce_sat
VfNumber0V (also mV)Anti-parallel diode forward voltage drop, applied to all six diodes.v_forward
R_onNumber1mΩ (also Ω)Conducting resistance of each IGBT and diode.resistance_on
R_offNumber1MΩ (also kΩ, Ω)Blocking resistance of each valve.resistance_off
Measure DC currentChoice: Off / OnOff—Emit the DC-side current at dc_pos as an observable.measure_dc_current
DC positive directionChoice: +ve in / +ve out+ve in—Sign convention for the DC current. '+ve in' (default) is positive when current flows into dc_pos from the DC source (inverting). '+ve out' flips the sign.dc_current_dir
Measure AC currentsChoice: Off / OnOff—Emit the three AC phase currents as observables.measure_ac_current
AC positive directionChoice: +ve in / +ve out+ve out—Sign convention for the AC currents. '+ve out' (default) is positive when current flows out of the AC terminal into the grid. '+ve in' flips the sign.ac_current_dir
Measure gate signalsChoice: Off / OnOff—Emit the six gate signals (0 / 1, after dead time and block) as observables.measure_gates

DC Current Monitoring ​

ParameterTypeDefaultUnitsDescriptionID
DC current nameTextI_dc—Signal name for the DC current (A). Blank = skip emission.dc_current_name

AC Current Monitoring ​

ParameterTypeDefaultUnitsDescriptionID
Phase A current nameTextI_inv_a—Signal name for the phase A current (A). Blank = skip emission.ac_current_name_a
Phase B current nameTextI_inv_b—Signal name for the phase B current (A). Blank = skip emission.ac_current_name_b
Phase C current nameTextI_inv_c—Signal name for the phase C current (A). Blank = skip emission.ac_current_name_c

Gate Monitoring ​

ParameterTypeDefaultUnitsDescriptionID
Upper A gate nameTextg_ua—Signal name for the phase A upper gate. Blank = skip emission.gate_name_ua
Upper B gate nameTextg_ub—Signal name for the phase B upper gate. Blank = skip emission.gate_name_ub
Upper C gate nameTextg_uc—Signal name for the phase C upper gate. Blank = skip emission.gate_name_uc
Lower A gate nameTextg_la—Signal name for the phase A lower gate. Blank = skip emission.gate_name_la
Lower B gate nameTextg_lb—Signal name for the phase B lower gate. Blank = skip emission.gate_name_lb
Lower C gate nameTextg_lc—Signal name for the phase C lower gate. Blank = skip emission.gate_name_lc

Observables ​

Default nameKindRecorded whenDescriptionID
set by DC current nameSignalMeasure DC current is onDC current (A) at dc_pos. Positive into dc_pos from the DC source for '+ve in' (default); '+ve out' flips the sign.dcCurrent
set by Phase A current nameSignalMeasure AC currents is onPhase A current (A). Positive out of the AC terminal for '+ve out' (default); '+ve in' flips the sign.acCurrent_a
set by Phase B current nameSignalMeasure AC currents is onPhase B current (A). Positive out of the AC terminal for '+ve out' (default); '+ve in' flips the sign.acCurrent_b
set by Phase C current nameSignalMeasure AC currents is onPhase C current (A). Positive out of the AC terminal for '+ve out' (default); '+ve in' flips the sign.acCurrent_c
set by Upper A gate nameSignalMeasure gate signals is onPhase A upper gate (0 / 1).gate_0
set by Upper B gate nameSignalMeasure gate signals is onPhase B upper gate (0 / 1).gate_1
set by Upper C gate nameSignalMeasure gate signals is onPhase C upper gate (0 / 1).gate_2
set by Lower A gate nameSignalMeasure gate signals is onPhase A lower gate (0 / 1).gate_3
set by Lower B gate nameSignalMeasure gate signals is onPhase B lower gate (0 / 1).gate_4
set by Lower C gate nameSignalMeasure gate signals is onPhase C lower gate (0 / 1).gate_5