Appearance
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
. - Diode — whenever it is reverse-biased, carrying current the other way, with a forward drop
. No gate is needed.
Both paths share the on-resistance
Carrier and modulation
One triangle carrier
The phase leg therefore switches between
Adding a third harmonic to the modulation (or using space-vector modulation built on the canvas) extends the linear range by about 15%. Above
Choose a time step much shorter than the switching period, for example 2 µs for a 2 kHz carrier (250 steps per period). If
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
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
from the current controller (for example the dq → abc transform of the voltage reference divided by ). - 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
| Port | Kind | Signal | Notes |
|---|---|---|---|
ac | Three-phase terminal | — | |
dc_pos | Electrical terminal | — | |
dc_neg | Electrical terminal | — | |
ma | Control input | Real | |
mb | Control input | Real | |
mc | Control input | Real | |
block | Control input | Real |
Parameters
Config
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| f_sw | Number | 2000 | Hz (also kHz) | Frequency of the internal triangle carrier. Keep the time step at least ~50× shorter than the switching period. | switching_frequency |
| Dead time | Number | 4 | µ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_sat | Number | 0 | V (also mV) | IGBT on-state voltage drop, applied to all six IGBTs. | v_ce_sat |
| Vf | Number | 0 | V (also mV) | Anti-parallel diode forward voltage drop, applied to all six diodes. | v_forward |
| R_on | Number | 1 | mΩ (also Ω) | Conducting resistance of each IGBT and diode. | resistance_on |
| R_off | Number | 1 | MΩ (also kΩ, Ω) | Blocking resistance of each valve. | resistance_off |
| Measure DC current | Choice: Off / On | Off | — | Emit the DC-side current at dc_pos as an observable. | measure_dc_current |
| DC positive direction | Choice: +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 currents | Choice: Off / On | Off | — | Emit the three AC phase currents as observables. | measure_ac_current |
| AC positive direction | Choice: +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 signals | Choice: Off / On | Off | — | Emit the six gate signals (0 / 1, after dead time and block) as observables. | measure_gates |
DC Current Monitoring
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| DC current name | Text | I_dc | — | Signal name for the DC current (A). Blank = skip emission. | dc_current_name |
AC Current Monitoring
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| Phase A current name | Text | I_inv_a | — | Signal name for the phase A current (A). Blank = skip emission. | ac_current_name_a |
| Phase B current name | Text | I_inv_b | — | Signal name for the phase B current (A). Blank = skip emission. | ac_current_name_b |
| Phase C current name | Text | I_inv_c | — | Signal name for the phase C current (A). Blank = skip emission. | ac_current_name_c |
Gate Monitoring
| Parameter | Type | Default | Units | Description | ID |
|---|---|---|---|---|---|
| Upper A gate name | Text | g_ua | — | Signal name for the phase A upper gate. Blank = skip emission. | gate_name_ua |
| Upper B gate name | Text | g_ub | — | Signal name for the phase B upper gate. Blank = skip emission. | gate_name_ub |
| Upper C gate name | Text | g_uc | — | Signal name for the phase C upper gate. Blank = skip emission. | gate_name_uc |
| Lower A gate name | Text | g_la | — | Signal name for the phase A lower gate. Blank = skip emission. | gate_name_la |
| Lower B gate name | Text | g_lb | — | Signal name for the phase B lower gate. Blank = skip emission. | gate_name_lb |
| Lower C gate name | Text | g_lc | — | Signal name for the phase C lower gate. Blank = skip emission. | gate_name_lc |
Observables
| Default name | Kind | Recorded when | Description | ID |
|---|---|---|---|---|
| set by DC current name | Signal | Measure DC current is on | DC 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 name | Signal | Measure AC currents is on | Phase 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 name | Signal | Measure AC currents is on | Phase 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 name | Signal | Measure AC currents is on | Phase 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 name | Signal | Measure gate signals is on | Phase A upper gate (0 / 1). | gate_0 |
| set by Upper B gate name | Signal | Measure gate signals is on | Phase B upper gate (0 / 1). | gate_1 |
| set by Upper C gate name | Signal | Measure gate signals is on | Phase C upper gate (0 / 1). | gate_2 |
| set by Lower A gate name | Signal | Measure gate signals is on | Phase A lower gate (0 / 1). | gate_3 |
| set by Lower B gate name | Signal | Measure gate signals is on | Phase B lower gate (0 / 1). | gate_4 |
| set by Lower C gate name | Signal | Measure gate signals is on | Phase C lower gate (0 / 1). | gate_5 |