3 LEVEL FULL BRIDGE INVERTER SIMULATION IN MATLAB

Photo of author

By Jackson Taylor

Home » Hardware » 3 LEVEL FULL BRIDGE INVERTER SIMULATION IN MATLAB

A 3 level full bridge inverter turns a DC source into an AC output that can take three voltage values: positive DC, zero and negative DC. Compared with a basic two-level inverter, the extra zero level gives a smoother waveform, lower harmonic content and a smaller output filter. This article walks through how to build and check a 3 level full bridge inverter simulation in MATLAB Simulink before you move to hardware.

The video below shows the simulation running. The sections after it explain the circuit, the switching logic and what to look at in the results.

How a 3 level full bridge inverter works

The power stage is a single-phase full bridge, also called an H-bridge. It has two legs, and each leg has two switches (MOSFETs or IGBTs with anti-parallel diodes). The load sits between the midpoints of the two legs.

The output voltage depends on which switches are on:

Hardware Hack

Stop Buying New Batteries for Your Tech

Electronics are expensive, but their power sources don't have to be. Discover the simple engineering trick to recondition dead batteries and bring your gadgets back to 100% capacity.

Watch the Free Video
  • +Vdc: the top switch of leg A and the bottom switch of leg B are on.
  • -Vdc: the bottom switch of leg A and the top switch of leg B are on.
  • 0 V: both top switches or both bottom switches are on, so the load is shorted through the bridge and sees no voltage.

The two switches in the same leg must never be on together, or the DC source is shorted. In a real design a dead time is added between their gate signals. In a simulation with ideal switches it is still good practice to include it.

Why use three levels instead of two

A two-level (bipolar) scheme switches the output between +Vdc and -Vdc only. The 3 level (unipolar) scheme adds the zero state, which brings a few practical benefits:

  • The voltage step at each switching event is half as large, which reduces voltage stress and EMI.
  • The effective switching frequency seen by the load is twice the carrier frequency, so a smaller filter does the same job.
  • The current ripple in the inductor is lower for the same carrier frequency.
See also
CUK CONVERTER SIMULATION AND HARDWARE USING ARDUINO AND MATLAB SIMULINK

What you need in Simulink

You can build the model from standard Simulink and Simscape Electrical (Specialized Power Systems) blocks. A typical list looks like this:

  • A DC voltage source for the input.
  • A Universal Bridge block set to two arms, or four separate switch blocks, as the H-bridge.
  • A sine wave block as the reference signal and a triangular carrier (repeating sequence or a PWM generator).
  • Comparators and logic blocks to generate the gate signals.
  • An LC output filter and a resistive or RL load.
  • Voltage and current measurement blocks, scopes and a powergui block set for discrete simulation.

Generating the gate signals (unipolar PWM)

The most common way to get three levels from a full bridge is unipolar sinusoidal PWM. You compare a sine reference with the triangular carrier, and you compare the inverted reference (shifted by 180 degrees) with the same carrier.

  1. Create the reference sine wave at the output frequency, for example 50 Hz or 60 Hz.
  2. Create a second reference that is the negative of the first.
  3. Compare each reference with the same triangular carrier. Each comparison drives one leg of the bridge.
  4. Use a NOT block to produce the complementary gate signal for the other switch in each leg, and add dead time if your model uses non-ideal switches.

The carrier frequency should be much higher than the reference frequency. The ratio between the two is called the frequency modulation index, and a higher ratio moves the harmonics further away from the fundamental, so they are easier to filter.

The amplitude of the reference divided by the carrier amplitude is the modulation index. Keep it at or below 1 to stay in the linear range. At 1 the peak of the fundamental output equals the DC input voltage.

Adding the output filter and load

Before the filter, the output is a train of pulses at three levels. An LC low-pass filter turns it into a sine wave. Choose the cutoff frequency well above the fundamental and well below the effective switching frequency. A common rule of thumb is to place it roughly between those two, then adjust by looking at the filtered waveform.

See also
A Cascaded Multilevel Inverter (9 level )Based on Switched-Capacitor -SIMULATION MATLAB

Start with a resistive load to confirm the basic behavior, then try an RL load to see how the current lags the voltage. Make sure the filter inductor does not saturate in your design by checking the peak current, even though an ideal inductor block will not show this on its own.

Simulation settings that avoid problems

  • Use a fixed-step solver with a step size small enough to resolve the carrier, a fraction of the carrier period.
  • Set the powergui to discrete mode if the model has many switching elements, as it simulates faster and more predictably.
  • Run the simulation for several output cycles so that start-up transients settle before you measure anything.

What to check in the results

Look at the waveforms in this order:

  1. Gate signals: confirm that the two switches in one leg are complementary and never overlap.
  2. Unfiltered output voltage: you should see only three levels, +Vdc, 0 and -Vdc, with pulse widths that follow the sine reference.
  3. Filtered output voltage and current: they should look like clean sine waves at the intended frequency and amplitude.
  4. Harmonic content: use the FFT Analysis tool in the powergui to measure total harmonic distortion (THD) of the output voltage. The main harmonics should cluster around the carrier frequency and its multiples.

If the output amplitude is lower than expected, check the modulation index and the voltage drop across the filter and switches. If the waveform is distorted, check the carrier-to-reference ratio, the dead time and the filter values.

Sustainable Tech

Keep Toxic E-Waste Out of Landfills

Don't throw away your failing laptop, phone, or car batteries. Learn how to recondition them at home in just a few hours. It's better for the planet—and your wallet.

Learn How It Works

Where to go next

Once the single-phase model works, you can extend it in several directions. For a simpler starting point, compare it with a basic H-bridge square wave inverter to see how much the PWM and the zero level improve the waveform. To go beyond three levels, look at a cascaded 7 level inverter simulation or a 9 level cascaded multilevel inverter, which stack several H-bridges. If you need a three-phase output, there is a separate 3 phase 3 level inverter simulation. For a grid-connected use case, see how a full bridge micro inverter is modeled for solar systems.

See also
TPS75933- 3.3-V Fixed-Output Voltage Regulator

FAQ

What are the three levels in a 3 level full bridge inverter?

The three levels are +Vdc, 0 and -Vdc. The zero level is created by turning on both top switches or both bottom switches, so the load is bypassed.

Is a 3 level full bridge inverter the same as a multilevel inverter?

It is the simplest case. Multilevel inverters usually have more levels, such as 5, 7 or 9, and use several DC sources or capacitors. A single H-bridge with unipolar switching gives three levels.

Do I need Simscape Electrical to run this simulation?

Most models of this type use the Simscape Electrical (Specialized Power Systems) library for the bridge, filter and measurement blocks. You can also build a simplified version with basic Simulink blocks, but power electronics blocks make the model easier to build and more realistic.

Why does my filtered output look distorted?

Common causes are a carrier frequency that is too low, a modulation index above 1, missing dead time, or a filter cutoff that is too close to the fundamental or to the switching frequency. Check each of these one at a time.

Revive Your Dead Electronics

Got a drawer full of dead gadgets or a failing car battery? Instead of paying a premium for replacements, use this simple trick to easily recondition them right from home.

See How It Works