# SPWM modulation technique for multilevel inverter

By | December 12, 2015

Recently the multilevel inverter and converter have drawn tremendous interest for high voltage and high power application .The general structure of multilevel inverter and converter is to synthesize sinusoidal voltage waveform from several levels of voltages typically obtained from capacitor voltage source.

Low ratio of carrier frequency to modulation frequency is the best form of modulation for high power application, which is operating domain for multilevel inverter. For this purpose digital control of multilevel inverter using DSP/Microntroller is preferred due to their dynamic controlling property. However DSP/Microntroller based system uses symmetrical regular sampling, asymmetrical regular sampling or re-sampling technique. These sampling techniques either introduces delay in switching or requires dedicated controller. In this work a novel mathematical model of SPWM modulation technique for multilevel inverter is presented which approaches the performance of traditional natural Sinusoidal Pulse Width Modulation (SPWM).

### Introduction

The sinusoidal pulse width modulation (SPWM) is one of the most popular modulation technique used in wide range of industrial application where power switching converter are employed. Low ratio of carrier frequency (fc) to modulation frequency (fm) is the best from of modulation for high power application. However DSP/Microcontroller based system uses symmetrical regular sampling or re-sampling. These sampling techniques either introduces the delay in switching or requires dedicated processor. This paper presents a simple mathematical model for SPWM technique. This technique is further extended and implemented on Artificial Neural Network (ANN).

### Digital implementation of SPWM technique

Digital implementation of SPWM technique is based on classical SPWM technique with carriers and reference sine waveform. Only difference between them is, in digital SPWM a sine table consisting of values of sine waveform sampled at certain frequency is used. As result reference wave form in digital SPWM represents a sample and hold wave form of sine wave form.

This sampling of sine waveform comes in two variants;

1)      Symmetrical sampling.
2)      Asymmetrical sampling.

In symmetrical sampling, reference sine waveform is sampled at only positive peak of the carrier waveform and sample is held constant for the complete carrier period. This introduces the distortion in modulating signal and phase shift between modulating signal and fundamental component of output voltage as shown in Fig 1. Here sampling frequency is equal to carrier frequency. The phase shift is given by , where

Fc = Carrier frequency.

Fm = Reference Sine wave frequency.

Fig.1 Natural sampling verses symmetrical sampling

In asymmetrical sampling, the reference signal is sampled at positive as well as negative peak of carrier frequency and held constant for half the carrier period. Here sampling frequency is twice the carrier frequency. Asymmetrical sampling is the preferred method, since each switching edge is the result of new sample and gives better performance as shown in Fig 2. The phase shift is by.

Fig.2 Natural sampling verses asymmetrical sampling.

### Analog SPWM

Naturally sampled PWM is traditionally an analog technique where the input signal is naturally sampled by the carrier triangle waveform at the instant of the switching edge. Naturally sampled PWM can react instantly to changes in input signal and produces no attenuation or distortion of the synthesized waveform. However as the ratio f1/fc rises for a given modulation depth M, the slew rate of f1 will exceed that of the carrier triangle and an extra pulse will be generated. If these additional pulses can be tolerated, the integrity of the synthesized waveform is preserved.

So for a multilevel, low switch frequency converter, a naturally sampled PWM modulator offers the most promise for wide bandwidth, low delay and low distortion. Many multilevel converter implementations published in the literature demonstrate their modulation technique using natural sampled carrier based diagrams.

However natural sampled PWM is invariably implemented as an analog technique. An analog technique does not lend itself to a high power multilevel implementation.

A digital implementation of analog SPWM is required which incorporate all desire features of analog and digital SPWM. A first step toward this is Re-sampling method.

Re-sampling technique

Re-sampled uniform PWM is a digital implementation which approaches the frequency and transient response of natural PWM. Instead of sampling only once per switching edge at the beginning of the PWM switch period, further samples are taken during the switch period as shown in Fig 3. The position of the switch edge is determined by the most recent sample. This achieves the desired result, but some complications such as the possibilities of missed or multiple edges must be considered.

The Re-Sampling Ratio, rsr = fs/2fc is a measure of the rate of re-sampling (fs = Higher sampling frequency, fc = carrier frequency); only integer values ensure a sample is taken at the beginning of each switch period. Moderate values of the re-sampling ratio make a significant improvement in the frequency response, delay and distortion of the modulator, particularly for high modulation depth.

### Proposed Sinusoidal Pulse Width Modulation

Fig.4 Scheme for proposed SPWM method

Proposed SPWM for Multilevel Inverter

The allocation of proposed mathematical model can be extended to multilevel inverter. The only difference in above procedure and procedure for determination ÃŽtk in case of multilevel inverter is that, as numbers of carriers are used in multilevel inverter, exact region of interaction of reference and carrier is to be known. In other word region of operation and transition from one region to other region should be determine.

Figure 5 shows the reference and carrier waveform arrangements necessary to achieve PD SPWM for a five level inverter. Each shifted carrier is consider as one region

For example for five level inverter region are r = 1, 0 ,-1, -2. Signals from region r = 1 are use to drive switch S1 and complementary signal are use to drive S1, similarly signal from region r = 0 are use to drive switch S2 and complementary signal are use to drive S2, Signal from region r = -1 are use to drive switch S3 and complementary signal are use to drive S3, signal from region r = -2 are use to drive switch S4 and complementary signal are use to drive S4.

Formula for finding time delay ‘ÃŽtk for positive and negative slop for different shifted carrier can be found by extending case for two level inverter.

Transition from one region of operation to the other can be decided on the basis of calculated vale of ‘ÃŽtk. To decide the transition from one region to other the criterion of transition for positive slop carrier cross-over is

(1)   If  ÃŽtk > 1/2fc

Then transition is form lower region to upper region, so r new = r old + 1 (where r = region)

(2)  If   ÃŽtk< 0

Then transition is from upper region to lower region, so r new = r old – 1

Similarly, to decide the transition from one region to other the criterion for negative slop carrier cross-over is

(1)   If ÃŽtk > 1/2fc

Then transition is form upper region to lower region, so r new = r old 1 (where r = region)

(2)  If ÃŽtk < 0

Then transition is from lower region to upper region, so r new = r old + 1

Above procedure of calculating value of ÃŽtk can be surmised in flow-chart explain in Fig.6,

### SPWM for Multilevel inverter using Artificial Neural Networks (ANN)

Artificial Neural Networks (ANN)

The science of artificial neural networks is based on the biological neuron. In order to understand the structure of artificial networks, the basic elements of the neuron should be understood. Neurons are the fundamental elements in the central nervous system.

1)      The main advantage of neural networks is that it is possible to train a neural network to perform a particular function by adjusting the values of connections (weights) between elements.

2)      Neural networks are composed of elements operating in parallel. Parallel processing allows increased speed of calculation compared to slower sequential processing.

3)      Artificial neural networks (ANN) have memory. In our case, a neural network controller could be trained to generate SPWM signal for multilevel inverter offline say in the Matlab (simulink) environment. After training, the network weights are set. The ANN is placed in a feedback loop with the natural SPWM generator. The network will adapt the weights to improve performance as it generate SPWM signal.

Features of ANN

1)      Type of learning:

Neural networks have 3 main modes of operation supervised, reinforced and unsupervised learning.

2)      Neural Network Structures:

There are 3 main types of ANN structures -single layer feed-forward network, multi-layer feed-forward network and recurrent networks.

3)      Type of activation function (F):

There are 3 main types of activation function -tan-sigmoid, log-sigmoid and linear as shown in Fig .8 Different activation functions affect the performance of an ANN.

### Proposed SPWM technique for Multilevel Inverter using ANN

In proposed method neural network is used to determine the exact instant of crossing of reference sine wave with carrier i.e. (tk+ÃŽtk), when input given to neural network is time instant tk as shown in Fig 4. Supervised learning method is used to train the neural network. In supervised learning we have to specify the input-output target pair for training neural network. Here input is given as time instants tk at which carrier waveform achieve their peaks (both positive and negative) and corresponding target is specified by exact instant of crossing of carrier and reference i.e. (tk+ÃŽtk) for corresponding value of tk.

Multilayer neural network having 3 layers is build. First two layers have 35 neurons with transfer function as tan-sigmoid and last layer has 1 neuron with transfer function as liner. Matlab package provides many power full tools for building and training neural network.

Author: Ravi Bandakkanavar

A Techie, Blogger, Web Designer, Programmer by passion who aspires to learn new Technologies every day. It has been 6 years since I have been publishing articles and enjoying every bit of it. I want to share knowledge and build a great community with people like you.