File Exchange

image thumbnail

Space Vector Pulse Width Modulator For Three-Level Inverter

version 1.0.2 (88.8 KB) by Osama Arafa
An SVPWM for 3-level inverters (T-Type or NPC) that can be directly deployed to DSPs and microcontrollers


Updated 10 Sep 2019

View License

The SVPWM is the technique that is most suitable to direct implementation on DSPs and microcontrollers since it has a ready fit with the PWM resources available on these devices. SVPWM for three-level inverters (whether T-Type or Neutral point clamped) is complex compared to the 2-level counterpart. The detailed development is hard to find anywhere in the available literature. In the attached two files, there given a pdf file that moves gradually along the steps required to find the ON-time control laws of the main six switches of these inverters (the other six are complementary and are automatically generated with dead-time insertion by the DSP). Also, a SIMULINK model is given to test the performance of the implemented algorithm. Application engineers who wish to use this algorithm should take care that no voltage unbalance correction mechanism is provided in this algorithm.
(The error fixed in version 1.0.1 is T1B dwell time was Tb+T0/2 but it should be Ts-T0/2. Now, this error is fixed in this version!
In this version, one of two possible balancing methods for the neutral point voltage is implemented without principal change in the main algorithm structure. The method uses redundant space vectors that can result in the same average poles voltages but have an opposite impact on the neutral point voltage to achieve the balancing. The modifications are easy to follow and the technical reference used is mentioned in the SVPWM block. The testing Simulink model compares the performance of the previous version with the current version. You can try the testing at different modulation indexes.

Cite As

Osama Arafa (2020). Space Vector Pulse Width Modulator For Three-Level Inverter (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (9)

Ganesh Challa

Dear sir, How can we find V1, V2 in Sub-sector finder. Can you supply equations or reference for this.

Ganesh Challa

It is a Master Piece Work.

Osama Arafa

An update of this algorithm is given in a new contribution at this link
In that update, an additional method for suppressing neutral point voltage fluctuation is included

zeinab elkady

Osama Arafa

@ِِAmal Lazar the slx file is a Simulink model file, it is created with Matlab2015a. You can open it with any Matlab version equal to or higher than 2015a



how can i open this slx file?

Osama Arafa

Kindly who download the model, please rate it!. Your feedback regarding experimental validation is highly appreciated as well



One of two desired neutral point voltage balancing methods has been implemented in this revision. The method depends on swapping the redundant vectors in the overlapping sub-sectors between the six sub-hexagons.


In version 1.0.0 there was an error in the On-Time of the switch T1B in sub-hexagon 4 subsector 3 (this is serial sequence 21). This erorr was resulting in observable distortion of phase B voltage and current, Now this is fixed in version 1.0.1

MATLAB Release Compatibility
Created with R2015a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Tags Add Tags