Quick viewing(Text Mode)

Visvesvarayatechnologic

Visvesvarayatechnologic

P a g e | 1

VISVESVARAYA TECHNOLOGICAL UNIVERSITY Belgaum, Karnataka-590014

A Project Report On “IMPLEMENTATION OF SPACE VECTOR PULSE WIDTH FOR INVERTERS USING MATLAB AND SIMULINK”

Submitted in partial fulfilment for the award of degree of Bachelor of Engineering In Electronics and Communication Engineering 2018-2019

Submitted by

AKHIL CHOWDARY M 1NH15EC005 BUJJA AJAY 1NH15EC012 T S HIMAKEERTHI 1NH15EC121

Under the Guidance of Dr. K C R NISHA Professor Department of Electronics and Communication Engineering, NHCE

P a g e | 2

DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING

CERTIFICATE

Certified that the project work “IMPLEMENTATION OF SPACE VECTOR PULSE WIDTH MODULATION FOR INVERTERS USING MATLAB AND SIMULINK” carried out by the following Bonafide students of New Horizon College of Engineering in partial fulfilment for the award of Bachelor of Engineering In Electronics and Communication branch , of Visvesvaraya TechnologicalUniversity , Belgaum during the academic year 2018-2019. It is certified that all corrections /suggestions indicated for internal assessment have been approved as it satisfies the academic requirements with respect of project work prescribed for said degree.

1. AKHIL CHOWDARY M 1NH15EC005 2. BUJJA AJAY 1NH15EC012 3. T.S. HIMAKEERTHI 1NH15EC121

Internal Guide HOD Principal Dr. K C R NISHA Dr. SANJEEV SHARMA Dr. MANJUNATHA

External Viva Name of the Examiners: Signature with date:

1.

2.

P a g e | 3

ACKNOWLEDGEMENT

The satisfaction that accompanies the successful completion of task would be incomplete without mention of the people who made it possible, whose constant guidance and encouragement crown all efforts with success.

We express my sincere gratitude to Dr. Sanjeev Sharma, Head of Department of Electronics and Communication Engineering, New Horizon College of Engineering, for providing guidance and encouragement.

We would also like to thank our project guide Dr. K C R Nisha Professor, Department of Electronics and Communication Engineering for her constant support and guidance without which this project would not have seen the light of the day. Gracious gratitude to all the faculty members of the department of ECE for their valuable advice and encouragement.

Akhil Chowdary M Bujja Ajay T.S.Himakeerthi

P a g e | 4

ABSTRACT

Inverters produce an AC output waveform from a DC source. Three-phase Voltage Source Inverters (VSIs) are used in applications that require sinusoidal voltage waveforms of variable magnitude as well as variable frequency. These inverters are controlled using control techniques like Sinusoidal PWM (SPWM) and Space Vector PWM (SVPWM). SVPWM is a sophisticated control technique for generating a fundamental sine wave that provides a higher voltage to the motor and lower total harmonic distortion (THD). Such sophisticated control algorithms become easier to be implement with Field Programmable Gate Arrays (FPGAs) as one of the fundamental advantage is the freedom of parallelism as different parts of FPGA can be configured to perform independent functions simultaneously.

The objective of the project is to design and implement a three phase voltage source inverter using SVPWM control algorithm. The two level inverter topology is implemented on Field Programmable Gate Array(FPGA) is used for implementing SVPWM control algorithm. The control circuit is designed using an innovative methodology which significantly reduces the complexity of SVPWM implementation. The designed system is tested on a three phase induction motor.

The designed system is simulated using MATLAB Simulink software and obtained results are tested against expected output and verified to be consistent. Future scope of the project is discussed as well.

P a g e | 5

CONTENTS

CERTIFICATE ACKNOWLEDGEMENT

ABSTRACT

Chapter 1: Modulation Techniques 1.1 Introduction 8 1.2 Pulse Width Modulation techniques 8 1.3 Classification of Modulation techniques 9 1.3.1 Sinusoidal Pulse Width Modulation (SPWM) 9 1.3.2 Modified Pulse Width Modulation ( MPWM) 10 1.3.3 Third Harmonic Injection PMW 10 1.3.4 Space Vector Modulation (SVM) 11 1.3.5 Delta Modulation (DM) 11 1.3.6 Specific Harmonic Elimination (SHE) 12 1.3.7 ( WM) 12

Chapter 2 :SELECTION OF MODULATION TECHNIQUE FOR THREE PHASE INVERTERS 2.1 Three phase Inverter 13 2.2 Motivation 16 2.3 PWM Techniques 16 2.4 Sinusoidal Pulse Width Modulation 17 2.5 Space Vector PWM 20 2.6 SVPWM Principle 22

Chapter 3 : Analysis of SVPWM Technique

3.1 Switching States and Voltage Vectors 24 3.2 Time Calculation 26 P a g e | 6

3.3 Superior Performance of SVPWM 30 3.4 Total Harmonic Distortion 31 3.5 Conclusion 32

Chapter 4: MATLAB SIMULINK OF SPACE VECTOR PULSE WIDTH MODULATION 4.1 Angle Locating 33 4.2 Sector Locating 35 4.3 Time Calculation 37 4.4 Time taken by each switch in each sector 39

Chapter 5: OUTPUTS 40

References Appendix

P a g e | 7

List of figures

2.1 Three Phase Inverter 14

2.2 Pulse Width Modulation 15

2.3 Reference Signals of the three phase sinusoidal PWM technique 18

2.4 Carrier signal of the three phase sinusoidal PWM technique 18

2.5 Generation of gating pulses through SPWM 19

2.6 Motor phase 21

2.7 Three phase voltage source inverter 23

3.1 Phase 24

3.2 Revolving of voltage reference vector across the sectors 25

3.3 Volt-Second balance 27

3.4 Dwell times method 1 28

3.5 Dwell Time method 2 29

3.6 Swithching pattern of sector 1 30

3.7 Forward and reverse sequences in sectors 31

3.8 Additional DC utilization by SVPWM 31

3.9 Current Ripple vector over a sub-cycle 32

4.1 Sector Identification 36

4.2 Time Calculation 38

P a g e | 8

CHAPTER 1

MODULATION TECHNIQUES

1.1 INTRODUCTION

The various pulse width modulation techniques are explained in this chapter and list out their merits and demerits. After this discussion, the simple and well established motor friendly sinusoidal modulation, delta modulation and improved delta modulation techniques are explained. Their operation, the circuit design procedure and their inherent characteristics are discussed. The requirement of the V/F speed control method of induction motor drives is highlighted. Also the reasons for selection of these modulation techniques used to control the proposed soft switched PWM inverter fed induction motor drives are highlighted in this chapter.

1.2 PULSE WIDTH MODULATION (PWM) TECHNIQUES

The output voltage of a voltage source inverter, can be adjusted by various methods such as external control of AC voltage on the output side of VSI, external control of DC voltage on the input side of VSI and internal control within the VSI. The most efficient method of internal control of VSI is by a PWM control technique used within the inverter itself. In the PWM method, a constant input DC voltage is applied to the inverter and a controlled AC output voltage with frequency is obtained. It is accomplished by adjusting the turn on and turn off periods of the inverter switching devices.

Because of the advances in power electronics devices and modern digital control systems, the PWM inverters are used in various industrial applications to convert DC to AC and deliver AC power with various voltage and frequency levels to the load or motors. The energy that a PWM inverter delivers to a motor is controlled by the train of PWM control signal to the gates or the control terminal of the power electronics devices.

1.3 CLASSIFICATION OF MODULATION TECHNIQUES

There are many types, of modulation techniques available, to achieve simple implementation and improved overall inverter efficiency in the practical applications. Basically, they are classified into two major types, namely carrier based modulation and carrier less modulation techniques. P a g e | 9

The carrier based modulation technique is further classified as

Sinusoidal Pulse Width Modulation (SPWM)

Modified Pulse Width Modulation (MPWM)

Random Pulse Width Modulation (RPWM)

Third harmonic injection PWM

Space Vector Modulation (SVM)

Carrier less modulation technique is further classified as

Delta Modulation (DM)

Specific Harmonic Elimination (SHE)

Wavelet Modulation (WM)

The main aim of these modulation techniques is to enhance, the output of the inverters. Various techniques are designed to control the PWM inverter switches in order to shape up the PWM inverter output AC voltage or current to be very close to sine waveform. The quality of these, PWM techniques, depends on the amplitude of the fundamental component, the harmonic content in the inverter output, the effect of harmonics on the source, the switching losses, controllability and implementation.

1.3.1 Sinusoidal Pulse Width Modulation (SPWM)

The classical sinusoidal pulse width modulation technique is the very simple and commonly used technique in most of the industrial applications. In the sinusoidal pulse width modulator for three-phase PWM inverter, the gate control signals are generated by comparing a three phase balanced sinusoidal reference voltage signal with a high-frequency common triangular carrier voltage signal. The intersection points of the sinusoidal reference voltage signal and the triangular carrier voltage signal determine the turn on and turn off instants of the switching devices.

The sinusoidal reference voltage signal determines the amplitude and frequency of the PWM inverter output voltage. The main advantages of sinusoidal pulse width modulation technique are easy to P a g e | 10 implement and control. It has compatibility with most of the modern digital systems. In sinusoidal pulse width modulation technique, the fundamental frequency, amplitude and its total harmonic distortion are reduced by increasing the switching frequency. This will lead to the increase of switching losses and stress on the switching devices.

1.3.2 Modified Pulse Width Modulation (MPWM)

The principle of generating the gate control signal in MPWM technique is two low-frequency modulating signals were compared with a high-frequency triangular carrier signal. One of the modulating signals is a reference to the output voltage to be synthesized. The second modulating signal is 180-degree phase shift of the first modulating signal, but with the same frequency and amplitude. The advantages of the MPWM technique are easy to control and implement. The total harmonic distortion is less than the SPWM technique for the same switching frequency, but the fundamental component is not too high. Another advantage of this technique is reducing the energy of the harmonics and the total harmonic distortion of the inverter output voltage.

The disadvantages of this technique are that it affects the energy of the fundamental frequency component. MPWM reduced the amplitude of the fundamental frequency component. It increases the switching losses and stresses to the switching devices that in turn lead to increasing the harmonics in the input current.

1.3.3 Third Harmonic Injection PWM

The important task of this technique is to increase the PWM inverter fundamental frequency voltage without over modulation. The task is accomplished by injecting the third harmonic component into the three phase sinusoidal reference signals. So the modulating signal is composed of the reference signal of the desired output voltage and the third harmonic component. As a result of the third harmonic component injection, the peak of the fundamental component can be increased than the peak triangular carrier wave.

The advantage of this technique is that it increases the inverter fundamental frequency voltage. The main disadvantage is that there is no definite idea of the amount of the third harmonic component added to the modulating signal.

P a g e | 11

1.3.4 Space Vector Modulation (SVM)

Space Vector Pulse Width Modulation (SVPWM) is an improved modulation technique specifically used for three phase induction motor drives. It is used to overcome the drawbacks of sinusoidal PWM technique.

The drawback of sinusoidal PWM technique is the lower output AC voltage. The short pulses generated when the peak of the sinusoidal reference signal is as close as to the peak of the carrier triangle signal and increased the inverter losses.

The drawbacks mentioned above of the sinusoidal PWM are reduced by using SVPWM technique. SVPWM generates an output voltage and current with less harmonic distortion. It also provides a more output voltage in comparison with sinusoidal modulation techniques. The switching frequency provided by SVPWM is constant so that it can be easily adjustable. It is a more complicated control technique than sinusoidal modulation technique.

1.3.5 Delta Modulation (DM)

Ziogas et al 1981 introduces the delta modulation technique. It is one of the important alternatives to the traditional sinusoidal modulation technique. Now days it is used in commercial pulse width modulation three phase AC induction motor drives. It provides the required on and off time interval for the PWM inverter switching devices.

The operation of the delta modulation control circuit utilizes a required sine voltage as a reference signal (Vr) and a delta-shaped signal (Vf) as a carrier signal. The carrier signal is generated by integrating the output pulse (Vp). The reference signal (Vr) is compared with (Vf) in the comparator. The comparator output error signal is passed into the hysteresis comparator. The error signal is quantized into one of two possible limits (upper or lower) depends on its polarity. The window upper and lower limits determine the transition point of the switching pulses. The hysteresis comparator continuously generates the output pulses (Vp), it is used to control the PWM inverter.

The advantages of the delta modulation technique are, easy implementation, continuous inverter voltage control, direct control of the line harmonics and its inherent V/f feature. The DM is suitable for AC induction motor speed control. However, the inverter output waveform is not synchronized with the control signal because the duty ratio modulation depends on the slope of the control signal.

P a g e | 12

1.3.6 Specific Harmonic Elimination (SHE)

The specific harmonic elimination modulation control method is predefining a set of switching angles to determine the locations and the control pulse width of the switching devices. This type of control can eliminate certain harmonics in the PWM inverter output. The advantages of this technique are that it uses only 50% switching pulse leads to less stress on the switching devices and less switching loss. The quality of the inverter output voltage and current waveform are improved. Another key advantage of SHE controlled PWM inverter is the increased fundamental output voltage component. The main disadvantages of this method are implementation is complicated one and the switching angles are very difficult to find out.

1.3.7 Wavelet Modulation (WM)

Saleh & Rahman have experimentally developed and tested the new type of inverters in 2007 that is called as wavelet modulated control PWM inverter. It significantly improved the quality of outputs. The continuous time signal can be generated by using sets of the basic functions of wavelets. These signals are used to control the PWM inverter. The advantages of the wavelet modulated technique in PWM inverter are output voltages and currents of the fundamental component of higher magnitudes and lower harmonic contents with compare to other modulation techniques. The main disadvantage of this method is complex implementation.

P a g e | 13

CHAPTER 2

SELECTION OF MODULATION TECHNIQUE FOR THREE PHASE INVERTERS

INTRODUCTION

2.1 Three Phase Inverters

Because of advances in solid state power devices and microprocessors, variable speed AC Induction motors powered by switching power converters are becoming more and more popular. Switching power converters offer an easy way to regulate both the frequency and magnitude of the voltage and current applied to a motor. As a result much higher efficiency and performance can be achieved by these motor drives with less generated noises.

The energy that a switching power converter delivers to a motor is controlled by Pulse Width Modulated (PWM) signals applied to the gates of the power transistors. PWM signals are pulse trains with fixed frequency and magnitude and variable pulse width. There is one pulse of fixed magnitude in every PWM period. However, the width of the pulses changes from period to period according to a modulating signal. When a PWM signal is applied to the gate of a power transistor, it causes the turn on and turn off intervals of the transistor to change from one PWM period to another PWM period according to the same modulating signal.

The main aim in the selection of modulation technique is that it must have a circuit simplicity, rugged control scheme and easy implementation. The modulation technique must provide an easy way to control amplitude, frequency and harmonic contents of the output voltage required for three phase induction motor V/F speed control method. It must operate at a high switching frequency leads to more switching losses in PWM inverter to give space for soft switching technique. Based on the above said characters the modulation techniques were selected for implementing with proposed soft switched PWM inverter fed induction motor drives.

P a g e | 14

Fig 2.1 THREE PHASE INVERTER

Fig 2.2 PULSE WIDTH MODULATION

P a g e | 15

In adjustable speed applications the AC motors are powered by inverters. The inverter converts a DC power to AC power at required frequency and amplitude. The typical 3-phase inverter is illustrated in Fig. 1.1. The inverter consists of three half-bridge units where the upper and lower switch are

Controlled complementarily, meaning when the upper one is turned on, the lower one is turned off and vice versa. The output voltage is created by a Pulse Width Modulation (PWM) technique where an isosceles triangle carrier wave is compared with a fundamental frequency sine modulating wave, and the natural points of intersection determine the switching points of the power devices of a half bridge inverter. This technique is shown in Fig 1.2. The three phase voltage waves are shifted 120◦ to each other and thus a 3-phase motor can be supplied.

The most popular devices for motor control applications are Power MOSFETs and IGBTs. A Power MOSFET is a voltage controlled transistor designed for high frequency operation. It has low voltage drop and thus low power losses. However, the saturation and temperature sensitivity limit the MOSFETs application in high power circuits. An Insulated Gate Bipolar Transistor (IGBT) is a bipolar transistor controlled by a MOSFET on its base. The IGBT requires low drive current, has fast switching time and is suitable for high switching frequencies.

2.2 Motivation

In 1958, Solid state power devices known as SCRs were developed which led to the availability of DC drives. In the early 1960’s, the cost effectiveness of SCRs got improved which led to the better understanding of these applications. In late 1960’s, Analog control circuitry using digital control and firing circuitry were developed. Development of phase locked loops for synchronization improved line noise immunity allowing DC drives to operate better. During the 1970’s, large scale integrated circuit (LSI) technology was developed. Custom integrated circuitry improved the reliability and cost of current circuitry. Before 1985, SCR’s/GTO’s using six step technology led to the development of drives which are large, bulky and expensive. These were largely accepted in certain industries like petroleum/chemical and textile. During 1985-89 Bi-polar PWM technology, smaller and more economical drives evolved. There was a greater acceptance among users. From 1990-present IGBT technology was developed leading to smaller drive packages with micro drives for smaller hp motors. Switching frequency becomes ultrasonic. Micro drives have actually become commodities. In future, total motor drive compatibility will be achieved. Systems are sold as one. Energy is efficiently supplied across all industries and energy users. Motor development will parallel non-sinusoidal drive development.

P a g e | 16

For years, industrial motor control applications used general-purpose electronic devices such as microcontrollers (MCUs) and DSPs. These devices are designed with fixed hardware, leaving software as the only method for designers to update designs and limiting the development of application-specific functions. In comparison, FPGAs can integrate processor, Industrial Ethernet/fieldbus standards, custom motor interfaces, and DSP functions in one device. FPGAs give designers the freedom to create custom functions completely adapted to their specific application requirements by enabling both hardware and software customization. FPGAs provide the capability to implement functions in hardware, accelerating performance and simplifying the software porting effort. This additional freedom opens up new avenues of enhanced system performance, especially for motor control energy efficiency.

2.3 PWM Techniques

Because an inverter contains power switches, it is possible to control the output voltage as well as optimize the harmonics by performing multiple switching within the inverter with the constant DC input voltage VDC. The most common switching technique is called Pulse Width Modulation (PWM) which involves applying voltages to the gates of the power switches at different times for varying durations to produce the desired output waveform[13]. There are various PWM techniques used for the three-phase VSI, includes; following are some of them:

2.4 Sinusoidal Pulse Width Modulation

The sinusoidal PWM technique is very popular for industrial converters. The generation of gating signals with sinusoidal PWM is shown in Fig.(2.2). There are three reference sine waves (Vra, Vrb, and Vrc) each shifted by 120° at the desired output frequency (freference).

A triangular carrier wave (Vcr) is compared with the reference signal corresponding to a phase to generate the gating signals for that phase. Comparing the carrier signal (Vcr) with the reference phases (Vra, Vrb, and Vrc) produces (g1, g3, and g5) respectively. Where (g1, g3, and g5) are the gating signals applied to switches (S1, S3, and S5) respectively of the three-phase bridge inverter[12].

P a g e | 17

The principle of SPWM can be summarized as follows:

When Vra>Vcr ; S1 on & S4 off

When Vrb>Vcr ; S3 on & S6 off

When Vrc>Vcr ; S5 on & S2 off

Upper and lower switches of the same leg should not be switched on at the same time. This will prevent the DC bus supply from being shorted. A dead time is given between switching off the upper switch and switching on the lower switch and vice versa, as will be explained in next chapter.

The instantaneous line-to-line output voltages of the three-phase bridge inverter can be expressed as follows:

Vab = VDC (g1 – g3)

Vbc = VDC (g3 – g5)

Vca = VDC (g5 – g1)

Fig 2.3 Reference signals of the three phase sinusoidal PWM technique

P a g e | 18

Fig 2.4 Carrier signal of the three phase sinusoidal PWM technique P a g e | 19

Fig 2.5 Generation of gating pulses through SPWM P a g e | 20

Because the maximum amplitude of the fundamental phase voltage in the linear region (mi ≤ 1) is VDC/2, the maximum amplitude of the fundamental AC output line voltage is

Vab1 = √3 VDC/2

Therefore, one can write the peak amplitude as Vab1 = 푚푖 √3 VDC 2 for 0< mi ≤ 1

Where : mi is the modulation index ratio, defined as the ratio of the amplitude of the reference and carrier signals and is given by

mi = 퐴푟 Ac

Ar is the peak value of the three sine reference wave, and Ac is the peak value of the triangular carrier wave. Ideally, mi can be varied between 0 and 1 to give linear relation between the modulating and output wave . The ratio (mf) is defined as the ratio of the frequencies of the triangular carrier wave and the reference signals which is written as: 푚푓= 푓carrier/푓referenceWhere; 푓carrier = carrier waveform frequency, and freference= reference waveform frequency.

2.5 SPACE VECTOR PWM

An inverter is nowadays commonly used in variable speed AC motor drives to produce a variable, three-phase, AC output voltage from a constant DC voltage. Since AC voltage is

Defined by two characteristics, amplitude and frequency, it is essential to work out a strategy that permits control over both these quantities. Pulse width modulation (PWM) controls the average output voltage by producing pulses of variable duty-cycle. It is known that a balanced three-phase set of voltages is represented in the stationary reference frame by a space vector of constant magnitude, equal to the amplitude of the voltages, and rotating with angular speed

w =2*pi*fref.

In SVPWM, as will be seen in the next section, the eight possible states of an inverter are represented as two null-vectors(Vo=000and V7=111) and six active-state vectors forming a hexagon. SVPWM now approximates the rotating reference vector in each switching cycle by switching between the two nearest active-state vectors and the null-vectors. The null vectors are used forfreewheeling purpose only. They produce zero voltage free wheeling path for the line currents in case of inductive loads. In order to P a g e | 21 maintain the effective switching frequency of the power devices at a minimum, the sequence of toggling between these vectors is organized such that only one leg is affected in every step.

Mathematical Model and Analysis:

A three-phase full bridge inverter is considered. The structure of a typical three phase VSI is shown in fig. 2.1. As shown in fig. I, Va, Vb and Vc are the output voltages of the inverter. QI through Q6 are six power transistors that shape the output, which are

Fig 2.6 Motor phase

Controlled by a, a', b, b', c and c', When an upper transistor is switched on (i.e., when a, b or c is I), the corresponding lower transistor is switched off (i.e., the corresponding a', b'or c' is 0), The upper switches of the inverter are labeled with odd numbers whereas thelower switches are labeled with even numbers. The switches QI. Q4 are assigned for phase A, Q3, Q6 for.phase Band Qs, Q2 for phase C respectively. The concept of space vectors is used to represent a set of three phase voltages. The reference voltage vector at the nth sampling instant v*(n) is defined by P a g e | 22

where Va*(n), Vb*(n) and Vc*(n) are the reference' voltages for phases A, B and C respectively. Taking Va*(n) as the reference, the voltage vector can be resolved in direct and quadrature axes components as follows: Three phase voltage source inverters(VSI) are widely used in applications such as AC motor drives,uninterruptable power supplies (UPS), line side converters with power factor compensation and active power filters. VSI is a three-phase bridge consisting of six active switches as shown .

2.6 SVPWM Principle

The stator windings of a three-phase ac machine (with cylindrical rotor), when fed with a three-phase balanced current produce a resultant flux space-vector that rotates at synchronous speed in the space. The flux vector due to an individual phase winding is oriented along the axis of that particular winding and its magnitude alternates as the current through it is alternating. The magnitude of the resultant flux due to all three windings is, however, fixed at 1.5 times the peak magnitude due to individual phase windings. The resultant flux is commonly known as the synchronously rotating flux vector.

Similarly, the space vector approach to PWM involves the use of a voltage space vector as reference vector has a constant magnitude (Vref) and revolves with a constant frequency (f1) in the anti- clockwise direction for phase sequence RYB. The line-side fundamental voltage is proportional to Vref. The fundamental frequency of the line-side voltage is same as f1.

P a g e | 23

Fig 2.7 THREE PHASE VOLTAGE SOURCE INVERTER

P a g e | 24

Chapter 3

Analysis of SVPWM Technique

Three phase voltages (or currents) can be trasformed into voltage space vectors (or current space vectors) using the space vector transformation, defined in equation (1). The axes three-phase axes and the two phase axes are (a-axis and b-axis) are illustrated

3.1 Switching States and Voltage Vectors Every leg of the VSI is a Single Pole Double Throw (SPDT) switch with the top and bottom devices switching in a complementary fashion. When the top device is ON, the pole voltage, measured with respect to the DC bus neutral, is +0.5VDC. When the bottom device is ON, the pole voltage is

Fig 3.1 Phases P a g e | 25

Fig 3.2 Revolving of voltage reference vector across the sectors

3.1.1 SWITCHING STATES AND VOLTAGE VECTORS

With three such legs there are 23 or eight possible switching states as shown in Fig. 3.3. For each switching states the three-phase pole voltages (vRO, vY O, vBO) are uniquely defined. Equation(2) gives the corresponding line-line voltages. Assuming a three-phase balanced star-connected load, the corresponding line-neutral voltages applied are as in equation(3). The space vector can now be expressed in terms of three- phase pole voltages as given in equation(4).

P a g e | 26

The eight inverter states and the corresponding three-phase voltages are tabulated in Table 3.1. The corresponding voltage vectors are also listed both in rectangular as well as polar co-ordinates.

When all the top devices are ON or all the bottom devices are ON, the three-phase load is shorted by the inverter. There is no transfer of power between the DC bus and the three-phase load. These two states are termed as the ’zero states’ of the inverter. The two zero states lead to a voltage vector of zero magnitude as shown

3.2 Time Calculation

The reference vector is sampled at equal intervals of time, termed as subcycle (Ts). Let VREF be the sampled value of reference vector in a given subcycle. Let Vx = 16 θx and Vy = 16 θy be the two active vectors closest to VREF. VREF can be expressed as the sum of a fraction of Vx and a fraction of Vy as shown

P a g e | 27

Fig 3.3 VOLT-SECOND BALANCE

If Vx is applied for a duration of Tx in the given subcycle, Vy is applied over another interval Ty, and the zero vector for the remaining duration Tz, the average vector applied over the subcycle is given by the RHS of equation(5a). If the durations Tx, Ty and Tz are appropriate, the average vector applied over the subcycle equals VREF as shown in equation (5). In other words, the applied volt-seconds equal the reference volt- seconds. This is referred to as volt-second balance.

P a g e | 28

To derive expressions for the dwell times Tx ,Ty and Tz ,the vectors Vx, Vy and VREF are akk resolved along the direction orthogonal to it as shown in Fig 3.5. The respective components can be equated as shown in equation(6).

Fig 3.4 DWELL TIMES METHOD 1 P a g e | 29

Fig 3.5 DWELL TIME METHOD 2

The zero vector can be applied either using the zero state 0 or the zero state 7. The switching instants of the three phases depend on the apportioning of Tz between 0 and 7, and the switching sequence employed. SVPWM applies both the zero states equally for 0.5Tz as shown in Fig 3.7. The sequence of inverter states is P a g e | 30

0-1-2-7 (forward sequence) and 7-2-1-0 (reverse sequence) in alternate subcycles in sector I. The forward and reverse sequences pertaining to different sectors are as shown in Table 3.2. Corresponding to every state sequence, the sequence in which the three phases switch is also given

Fig 3.6 SWITCHING PATTERN OF SECTOR 1

3.3 Superior Performance of SVPWM

The performance of SVPWM is considered superior to that of SPWM due to higher DC bus utilization and reduced Total Harmonic Distortion(THD).

3.3.1 DC Bus Utilization

For a given DC bus voltage, the highest line-side fundamental voltage is obtained with SVPWM when VREF = 0.866 i.e, when VREF equals the radius of the largest circle that can be inscribed inside the hexagon joining the tips of the six active vectors in the space vector plane as shown in Fig. 3.8. As far as the line-side fundamental voltage is considered, SPWM is equivalent to SVPWM with VREF = 0.75Vm/VP. When Vm = VP, the magnitude of equivalent reference vector is 0.75 P a g e | 31

Fig 3.7 FORWARD AND REVERSE SEQUENCES IN SECTORS

Fig 3.8 ADDITIONAL DC UTILIZATION BY SVPWM

3.4 Total Harmonic Distortion In every half cycle or sub-cycle, there is an instantaneous error between the applied voltage vector and the average voltage vector or the reference vector. This voltage is responsible for the harmonics in the line current. The time integral of the error voltage vector is termed as static flux ripple vector. This quantity is the measure of the ripple in the line currents.The trajectory of the tip of the stator flux ripple vector corresponding to SVPWM in a given sub-cycle is shown in solid line in Fig. 3.9 and the trajectory corresponding to SPWM in the same sub-cycle is shown in dashed lines in the same figure.

P a g e | 32

Fig 3.9 CURRENT RIPPLE VECTOR OVER A SUB-CYCLE. 3.5 Conclusion

Of the existing real-time PWM techniques, sine-triangle PWM (SPWM) and Space Vector PWM (SVPWM) are very popular and important. Compared to SPWM, SVPWM yields 15% higher line-side voltage for a given DC bus voltage. Conversely, for a given maximum line-side voltage, SVPWM requires less DC bus voltage. Consequently, the voltage stress on the semiconductor devices is less. Further, CSVPWM results in reduced harmonic distortion in the line currents over SVPWM, particularly at higher modulation indices.

P a g e | 33

Chapter 4 MATLAB SIMULINK OF SPACE VECTOR PULSE WIDTH MODULATION

It is always a good practice to simulate a design before actually carrying it out. This allows designers to see the feasibilities and the performances of their would-be products preventing costly later alternation and time delay. The software package used for this project is Matlab Simulink.

4.1 ANGLE LOCATING

P a g e | 34

P a g e | 35

4.2 SECTOR LOCATING

P a g e | 36

Fig 4.1 Sector Identification

P a g e | 37

4.3 TIME CALCULATION

P a g e | 38

Fig 4.2 Time Calculation

P a g e | 39

4.4 Time taken by each switch in each sector:

P a g e | 40

Fig 4.3 Gating pulses

P a g e | 41

Chapter 5 OUTPUTS Harmonic Spectrum of phase voltage:

Time in seconds vs Van:

P a g e | 42

Sector identification:

Calculation for gating time period for each leg:

P a g e | 43

Time in seconds vs triangular voltage:

Time in seconds vs tgaVtri:

P a g e | 44

Time in seconds vs switching pulses for switches :

Sinusoidal pulse width modulation:

P a g e | 45

REFERENCES

1. Fang, Yu, Yan Xing, and Yuwen Hu. "A fast algorithm for SVPWM in three phase power factor correction application." Power Electronics Specialists Conference, 2004. PESC 04. 2004 IEEE 35th Annual. Vol. 2. IEEE, 2004.

2. Tzou, Ying-Yu, and Hau-Jean Hsu. "FPGA realization of space-vector PWM control IC for three-phase PWM inverters." Power Electronics, IEEE Transactions on 12.6 (1997): 953-963.

3. Sutikno, Tole, AuzaniJidin, and Nik Rumzi Nik Idris. "New approach FPGA-based implementation of discontinuous SVPWM}." Turkish Journal of Electrical Engineering & Computer Sciences 18.4 (2010): 499- 514.

4. Zhou, Zhaoyong, et al. "Design of a universal space vector PWM controller based on FPGA." Applied Power Electronics Conference and Exposition, 2004. APEC'04. Nineteenth Annual IEEE. Vol. 3. IEEE, 2004.

5. Shaobang, Xing, and Zhao Ke-You. "Research on a novel SVPWM algorithm." 2007 2nd IEEE Conference on Industrial Electronics and Applications. 2007.

6. Zhi-pu, Z. "Design and realization of space vector PWM based on SG." Drive and Control 7 (2005): 29-32.

[1] S. Nonaka and H. Okada, "Methods of control pulse width of three pulse inverter", Journal ofIEE Japan, vol. 86, pp. 71-79, July 1972.

[2] M. H. Rashid, "Power electronics, circuits, devices and applications", Prentice Hall International Editions, 1988.

[3] Schonug and H. Stennuler, "Static frequency changers with 'subharrnonic' control in conjunction with reversible variable speed ac drives", Brown Boveri Rev., pp. 55-57, Aug/Sept, 1964.

[4] K. Taniguchi and H. Irie, "Trapezoidal modulation signal for three phase PWM inverter", IEEE Trans. Ind. Electron., vol. IE-33, no. 2, pp. 193-200, May 1986. [5] G. N. Acharya, S. S. Shakhawat, W. Shephard, U. M. Rao and Y. M. Ng,

"Microprocessor based PWM inverter using modified regular sampling techniques", IEEE Trans. Ind. Applicat., vol. IA-22, no. 2, pp. 286-292, Marchi April 1986.

[6] J. Hannuan and L. P. Du Toit, "A new microcomputer controlled modulator for PWM inverters", IEEE Trans. Ind. Applicat., vol. IA-22, no. 2, pp. 281-285, MarchiApril1986. P a g e | 46

[7] Y. H. Kim and M. Ehsani, "An algebraic algorithm for microcomputer based (direct) inverter pulse width modulation", IEEE Trans. Ind. Applicat., vol. IA-23, no. 2, pp. 654-660, July/August 1987.

[8] K. Taniguchi, Y. Ogino and H. Irie, "PWM technique for power MOSFET inverter", IEEE Trans. Power Electron., vol. 3, pp. 328-334, July 1988.

[9] W. J. Tuten, "Microprocessor controller for integrated power module inverter", in IEEE/IAS In!. Semi. Power Conv. Conf., pp. 470-475, 1977.

[10] K. M. Rahman, M. A. Choudhury, M. R. Khan and M. A. Rahman, "

Microcomputer based naturally sampled PWM control of static power

converters", 32nd Universities power engineering conference (UPEC'97), UK, pp. 826-829, 1997.

[11] S. R. Bowes, "New sinusoidal pulse width modulated inverter", Proc. IEE, vol. 122, pp. 1279-1285, 1975.

[12] K. Mauch and M. R. Ito, "A mocroprocessor ac drive controller", in conf. Rec. IEEEIIAS 1980 Annu. Meeting, pp. 634-640, 1980.

[13] S. R. Bowes and M. J. Mount, "Microprocessor control ofPWM inverters", Proc. IEE Proc. B, pp. 293-305, 198!.

[14] G. S. Buja, P. Fiorini, "Microcomputer control of PWM inverters", IEEE Transactions on Industrial Electronics, vol. 29, pp. 212-216, August 1982.

[15] K. S. Rajashkara and J. Vithayathi1, "Microprocessor based sinusoidal PWM inverter by DMA transfer", IEEE Trans. Ind. Electron., vol. IE-29, pp. 46-51, 1982.

[16] A. Busse and J. Holtz, "Multiloop control of a unity power factor fast-switching ac to dc converter", IEEE/PESC, Cambridge, pp. 171-179,1982.

[17] B. K. Bose and Hunt A. Sutherland, "A high performance pulse width modulator for an inverter fed drive system using a microcomputer", IEEE Trans. Industry Applicat., vol. IA-19, no. 2, pp. 233-243, 1983.

[18] S. Bolognani, G. S. Buja, D. Longo, "Hardware and performance effective microcomputer control of a three phase PWM Inverter", International Power Electronic Conference Rec., Tokyo, pp. 360-371, 1983.

[19] M. Vamovitsky, "A Microcomputer-based Control Signal Generator for Three

Phase Switching PWM Inverter", IEEE Transactions on Industry Applications, vol. 1A-19, no. 2, pp. 187-194, March/April 1983. P a g e | 47

[20] J. M. D. Murphy and M. G. Egan, "A comparison ofPWM strategies for inverterfed induction motors", IEEE Trans. Industry Appl., pp.363-369, 1983.

[21] D. A. Grant and J. A. Houldsworth, "PWM ac motor drive employing ultrasonic carrier", IEE Conf. PEVSD, London, pp. 234-240, 1984.

[22J J. Holtz, P. Lammert and W. Lotzkat, "High-speed drive system with ultrasonic

MOSFET PWM inverter and single-chip microprocessor control", IEEE Trans. Industry Appl., vol. pp. 1010- 1015, 1987.

[23J Donato Vincenti, Phoivos D. Ziogas, Rajnikant V. Patel, "A PC-Based Pulse

Width Modulator for static Converters", IEEE Transactions on Industrial Electronics, vo1.37, no. I, pp. 57-69, February 1990.

[24J V. R. Stefanovic and R. M. Nelms, "Microprocessor control of motor drives and power converters", in Tutorial course Rec. IEEEIIAS Annu. Meet., Dearborn, MI, pp. 5/1-5/35, October 1991.

[25J S. Vadivel, G. Bhubaneswari, G. Sridhara Rao, "A Unified Approach to the realtime Implementation of Microprocessor-based PWM Waveforms", IEEE Transactions on Power Electronics, vol. 6, no. 4, pp. 565-575, October 1991.

[26J Julian Richardson and Osman T. Kukrer, "Implementation of a PWM regular sampling strategy for ac drives", IEEE Transactions on Power Electronics, vol. 6, no. 4, pp. 645-655, October 1991.

[27J T. G. Habetler and D. Divan, "Acoustic noise reduction in sinusoidal PWM drives using a randomly modulated carrier", IEEE Trans. Power Electron., pp. 356-363, 1991.

[28J J. Holtz, W. Lotzkat and A. Khambadkone, "On continious control of PWM inverters in the overmodulation range with transition to the six-step mode", IECON, 18th Annu. Conf. IEEE Ind. Electronics Soc., San Diego, CA, 1992. [29J H. Le-Huy, "Microprocessor and digital IC's for motion control", Proc. IEEE, vol. 82, pp. 1140-1163, August 1994.

[30J S. R. Bowes, "Novel real-time harmonic minimized PWM control for drives and static power converters", IEEE Transactions on Power Electronics, vol. 9, no. 3, pp. 256-261, May 1994.

[31J S. R. Bowes, "Advanced Regular Sampled PWM Control Techniques for drives P a g e | 48 and Static Power Converters", IEEE transactions on Industrial Electronics, vol. 42, no. 4, pp. 367-373, August 1995.

[32] H. S. Patel and R. G. Hoft, "Generalized techniques ofhannonic elimination and voltage control in thyristor inverters", IEEE Trans. Industry Applicat., pp. 310317,1973.

[33] G. S. Buja and G. B. Indri, "Optimal pulse width modulation for feeding ac motors", IEEE Trans. Industry Appl., vol. IA-B, pp. 38-44,1977.

[34] J. B. Castle and R. G. Hoft, "Optimum PWM waveforms of a microprocessor controlled inverter", Conf. Rec. PESC., pp. 243-250, 1978.

[35] J. M. D. Murphy, R. G. Hoft and L. S. Howard, "Controlled slip operation of an induction motor with optimum waveforms", IEEE Int. Conf. Rec. on Electrical Variable Speed Drives, pp. 1157-1160, 1979.

[36] P. D. Ziogas, "Optimum voltage and hannonic control PWM techniques for three phase static UPS system", in Conf. Rec. IEEE lAS 1979 Annu. Meeting, pp. 370374, 1979.

[37] S. R. Bowes, ~'Regular Sampled Harmonic Elimination PWM Control of Inverter

Drives", IEEE Transactions on Power Electronics, vol. 10, no. 5, pp. 521-531, September 1995.

[38] P. D. Ziogas, "The delta modulation technique in static PWM inverters", IEEE Trans. Ind. Applicat., vol. IA-17, no. 2, pp. 199-204, March/April 1981.

[39] M. A. Rahman, J. E. Quicoe, A. R. D. Esmail and M. A. Choudhury, "Delta modulation inverter for UPS", IEEE Intelec. Conf. Rec., pp. 445-450, 1986.

[40] K. M. Rahman, M. A. Choudhury, M. R. Khan and M. A. Rahman, "Dual slope integrator type delta modulator for high performance voltage source inverters", Power Conversion Conference (PCC) - Nagaoka'97, Japan, pp. 451-455, 1997.

[41] K. M. Rahman, M. A. Choudhury, M. R. Khan and M. A. Rahman, "Dual slope carrier injected wide band delta modulator for voltage source inverters", 32nd Universities Power Engineering Conference (UPEC'97), UK, pp. 814-817, 1997.

[42] F. Bernet, "Diminishing torque pulsation in induction motors powered by pulse/modulated inverters", in Conf. Rec. Ist IFAC Symp. Contr. Power Elec. Drives, pp. 615-634, 1974. P a g e | 49

[43] J. Holtz and S. Stadtfield, "A predictive controller for the stator current vector of ac machines fed from a switched voltage source", in Conf. Rec. IPEC- Tokyo'83, pp. 1665-1675,1983.

[44] M. P. Kazmierkowski and W. Sulkowski, "Transistor inverter-fed induction motor with vector control system", in IEEE/IAS Ann. Mtg. Conf. Rec., pp. 162168, 1986.

[45] M. P. Kazmierkowski and W. Sulkowski, "A novel vector control scheme for transistor PWM inverter-fed induction motor drive", IEEE Trans. Ind. Electron., vol. 38, no. I, pp. 41-47,1991.

[46] Nobuyuki Matsui and H. Ohashi, "DSP based adaptive control of brushless motor", IEEE Trans. Ind. Applicat., vol. 28, no. 2, pp. 448-454, 1992.

[47] Trzynadlowski, A. M., "The Field Orientation Principle in Control of Induction Motors", Kluwer Academic, 1994.

[48] Trzynadlowski, A. M. Kirlin, L, and Legowski, S.F., "Space Vector PWM

Technique With Minimum Switching losses and a variable pulse Rate", IEEE Transactions on Industrial Electronics, vol. 44, no. 2, April 1997.

[49] Trzynadlowski, A. M., "An Overview of PWM Techniques for Three Phase, Voltage-Controlled, Voltage-Source inverter", International Symposium on Industrial Electronics, 1996.

[50] Ogasawara, S., Akagi, H. Et aI, "A Novel PWM Scheme of Voltage Source Inverters Based on Space Ve~tor Theory", EPE, Aachen, 1989.

[51] Zhenyu Yu, Figoli, David, "AC Induction Motor Control Using Constant V/Hz

Principle and Space-Vector PWM Technique with TMS320c240", Texus Instruments Literature Number SPRA284.

[52] .Van der Broeck, F. G. Skudelny, H. C., Stanke, G., "Analysis and Realization ofa

Pulse Width Modulator Based on Voltage Space Vectors", IEEE Transactions on Industrial Applications, vol. IA-24, no. I, pp. 142-150,1988.

[53] K. M. Rahman, "Analysis and Implementation of PC Based Space Vector PWM

Controller for VSI Inverters and AC Drives", ICCIT 2000, 25-26 January, pp. 4954,2001.

[54] Stefanovic, V. R., "Space Vector PWM Voltage Control With Optimized Switching Strategy", IEEEIIAS Annual Meeting, pp. 1025-1033, 1992. [55] Boglietti A., Griva G., Pastorelli M., Portumo F., Adam T., "Different PWM P a g e | 50

Modulation Techniques Indexes Performance Evaluation", IEEE International Symposium on Industrial Electronics, June 1-3, '93, Budapest, Hungary, pp. 193199, 1993.

[56] Mallinson, N., "'Plug & Play' Single Chip Controllers for Variable Speed

Induction Motor Drives in White Goods and HVAC Systems", IEEE Applied Power Electron. Conference, 1998.

[57] Lai, Y-S, and Bowes, S. R., "A Novel High Frequency Universal Space-Vector

Modulation Control Technique", Proceedings of 1997 International Conference on Power Electronics and Drive Systems, pp. 510-517, 1997.

[58] Y. Murai and Y. Tsunehiro, "Improved PWM method for induction motor drive inverters", in Conf. Rec.IPEC- Tokyo '83, pp. 407-417, 1983.

[59] M. Morimoto, S. Sato, K. Sumito and K. Oshitani, "Single-chip microcomputer control of the inverter by magnetic flux control PWM method", IEEE Trans. Ind. Electron., vol. 36, no. I, pp. 42-47, 1989.

[60] H. W. Van der Broeck, H. CH. Skudelny and G. Stanke, " Analysis and realization of pulse width modulator based on voltage space vectors," in Proc. IEEE-lAS Ann. Mtg., pp. 244- 251,1986.

[61] Y. Iwaji and S. Fukuda, "PWM technique for sinusoidal inverters using a single chip microprocessor.," in Proc. PCIM'88 (Tokyo), vol. I, pp. 13-22, 1988.

[62] Soren J. Henriksen and Robert E. Betz, "Digital Hardware Implementation of a

Current Controller for 1M Variable-Speed Drives", IEEE Trans. on Ind. Applications, vol. 35, no. 5, pp. 1021- 1027, September/ October 1999.

[63] Ying-Yu Tzou and Hau-Jean Hsu, "FPGA Realization of Space Vector PWM

Control IC for Three Phase PWM Inverters", IEEE Trans. on Power Electronics, vol. 12, no. 6, pp. 953-963, November 1997.

[64] TheerayodWiangtong, WorranartSangchai and PichitLumyong, "FPGA Based

IC Design for Inverter with Vector Modulation Technique", Mahanakorn University of Technology and King Mongkut's Institute of Technology, Ladkrabang.

[65] Michael Copeland, "Generate Advanced PWM signals usmg 8-bit mICroprocessor", Issue ofEDN, pp. 63- 68, February 2000. P a g e | 51

APPENDIX

Matlab code for Sinusoidal Pulse Width Modulation

% A Program For Analysis of a Voltage-source inverter with Sinusoidal-Pulse-Width Modulated output.

% PART I (preparation)

% In this part the screen is cleared, any other functions, figures and

% variables are also cleared. The name of the programm is displayed. clc clear all disp('Voltage-source inverter with Sinusoidal-Pulse Width Modulated output') disp('')

%

% PART II

% In this part the already known variables are entered, the user is

% asked to enter the other variables.

% Vrin is the DC input voltage.

Vrin=1;

% f is the frequency of the output voltage waveform. f=input('The frequency of the output voltage, f = ');

% Z is the load impedance in per unit.

Z=1;

% ma is the modulation index ma=input('the modulation index,ma, (0

[alpha' beta' (beta-alpha)']

% PART VII

% Plotting the , the triangular carrier signal, Vt,

% the modulating signal and the output voltage waveform, Vout. a=0; subplot(2,1,1) plot(wt,Vt,wt,ma1,wt,a) axis([0,2*pi,-2,2]) ylabel('Vt, m(pu)'); subplot(2,1,2) plot(wt,Vout,wt,a) axis([0,2*pi,-2,2]) ylabel('Vo(pu)'); xlabel('Radian');

% PART VIII

% Analyzing the output voltage waveform

% Finding the rms value of the output voltage

Vo =sqrt(1/(length(Vout))*sum(Vout.^2)); disp('The rms Value of the output Voltage = ')

Vo

% finding the harmonic contents of the output voltage waveform y=fft(Vout); y(1)=[]; P a g e | 56 x=abs(y); x=(sqrt(2)/(length(Vout)))*x; disp('The rms Value of the output voltage fundamental component = ') x(1)

%

% Findint the THD of the output voltage

THDVo = sqrt(Vo^2 -x(1)^2)/x(1);

%

% PART IX

% calculating the output current waveform m=R/(2*pi*f*L);

DT=pi/(N*50);

C(1)=-10;

% i=100*N+1:2000*N;

Vout(i)=Vout(i-100*N*fix(i/(100*N))+1);

% for i=2:2000*N;

C(i)=C(i-1)*exp(-m*DT)+Vout(i-1)/R*(1-exp(-m*DT)); end

%

%

% PART X

% Analyzing the output current waveform

% finding the harmonic contents of the output current waveform P a g e | 57 for j4=1:100*N

CO(j4)=C(j4+1900*N);

CO2= fft(CO);

CO2(1)=[];

COX=abs(CO2);

COX=(sqrt(2)/(100*N))*COX; end

% Finding the RMS value of the output current.

CORMS = sqrt(sum(CO.^2)/(length(CO))); disp(' The RMS value of the load current =')

CORMS

%Finding the THD for the output current

THDIo = sqrt(CORMS^2-COX(1)^2)/COX(1);

% PART XI

% Finding the supply current waveform

% for j2=1900*N+1:2000*N

if Vout(j2)~=0

CS(j2)=abs(C(j2));

else

CS(j2)=0;

end P a g e | 58 end

% PART XII

% Analyzing the supply current waveform

%

% Supply current waveform and its average value for j3=1:100*N

CS1(j3)=abs(CS(j3+1900*N)); end

CSRMS= sqrt(sum(CS1.^2)/(length(CS1))); disp('The RMS value of the supply current is')

CSRMS

CSAV= (sum(CS1)/(length(CS1))); disp('The Average value of the supply current is')

CSAV

% Finding the Fourier analysis of the supply current waveform

%

CS2= fft(CS1);

CS2(1)=[];

CSX=abs(CS2);

CSX=(sqrt(2)/(100*N))*CSX;

% PART XIII

% Displaying the calculated parameters. disp(' Performance parameters are') P a g e | 59

THDVo

THDIo

a=0;

%

%PART XIV

% Openning a new figure window for plotting of

% the output voltage,output current, supply current and the harmonic

% contents of these values

% figure(2)

% subplot(3,2,1)

plot(wt,Vout(1:100*N),wt,a); title('');

axis([0,2*pi,-1.5,1.5]); ylabel('Vo(pu)');

%

% subplot(3,2,2)

plot(x(1:100)) title(''); axis([0,100,0,0.8]); ylabel('Von(pu)');

% subplot(3,2,3) P a g e | 60

plot(wt,C(1900*N+1:2000*N),wt,a); title('');

axis([0,2*pi,-1.5,1.5]); ylabel('Io(pu)');

% subplot(3,2,4) plot(COX(1:100)) title(''); axis([0,100,0,0.8]); ylabel('Ion(pu)');

% subplot(3,2,5)

plot(wt,CS(1900*N+1:2000*N),wt,a);

axis([0,2*pi,-1.5,1.5]); ylabel('Is(pu)'); xlabel('Radian');

% subplot(3,2,6) plot(CSX(1:100))

hold plot(CSAV,'*') text(5,CSAV,'Average valu') title(''); axis([0,100,0,0.8]); ylabel('Isn(pu)'); P a g e | 61 xlabel('Harmonic Order');

Matlab code for Space Vector Pulse Width Modulation clear all clc

%% Three phase space vector pulse width modulation using generalised multiphase space vector aproach ma0= sqrt(3)/2; %% maximum modulation index ma=ma0; %% desired ma value

Vdc=563; %% dc link voltage

Vsr=ma*Vdc; %% space vector variation with ma f0=50;

%% v/f stretegy for 3ph im if ma<=ma0 fmod=f0*ma/ma0; else fmod=f0; end no_sample=48; %% no of samples

Ts=(1/fmod)/no_sample; %% sampling time period

Vm=2/3*Vsr; %% peak of phase voltage alp=2*pi/3; %% phase diff 120 degree ts=0:Ts/100:2/fmod; %% step time

Va=Vm*sin(2*pi*fmod*ts);

Vb=Vm*sin(2*pi*fmod*ts-alp);

Vc=Vm*sin(2*pi*fmod*ts-2*alp); P a g e | 62

Vtri=Ts*(.5-2*asin(sin(2*pi*ts/Ts+pi/2))/(2*pi)); %% triangular wave generation

L=length(ts); for i=1:1:L

%% three phase to two phase transformation (clark transformation)

Vds(i)=(Va(i)+Vb(i)*cos(alp)+ Vc(i)*cos(2*alp) );

Vqs(i)=(Vb(i)*sin(alp)+ Vc(i)*sin(2*alp) );

%% sector indentification tht(i)=atan2(Vqs(i),Vds(i)); if tht(i) >= 0

theta(i)=tht(i); else

theta(i)=2*pi+tht(i); end if theta(i)>=0 && theta(i)

Sn(i)=1; elseif theta(i)>=alp/2 && theta(i)

Sn(i)=2; elseif theta(i)>=alp && theta(i)<3/2*alp

Sn(i)=3; elseif theta(i)>=3/2*alp && theta(i)<2*alp

Sn(i)=4; elseif theta(i)>=2*alp && theta(i)<5/2*alp

Sn(i)=5; else Sn(i)=6; end P a g e | 63

%% selection of swithing vector for each sector if Sn(i)==1

v1=[1 ;0 ;0]; %4;

v2=[1 ;1 ;0]; %6;

v0=[1 ;1 ;1]; elseif Sn(i)==2

v1=[1; 1; 0]; %6;

v2=[0; 1; 0]; %2;

v0=[1; 1; 1]; elseif Sn(i)==3

v1=[0; 1; 0]; %2;

v2=[0; 1; 1]; %3;

v0=[1; 1; 1]; elseif Sn(i)==4

v1=[0; 1; 1]; %3;

v2=[0; 0; 1]; %1

v0=[1; 1; 1]; elseif Sn(i)==5

v1=[0; 0; 1]; %1;

v2=[1; 0; 1]; %5;

v0=[1; 1; 1]; else

v1=[1; 0; 1]; %5;

v2=[1; 0; 0]; %4;

v0=[1; 1; 1]; %0; P a g e | 64 end u=Sn(i);

%% using volt sec balance calcution of active timing vector

An_inv=(Ts/(sin(pi/3)*Vdc))*[sin(u*pi/3) -cos(u*pi/3) ; -sin((u-1)*pi/3) cos((u-1)*pi/3) ];

Vref=[Vds(i); Vqs(i)]; tn=An_inv*Vref; t0by2=(Ts-tn(1)-tn(2))/2; t120=[tn(1);tn(2); t0by2];

V120=[v1 v2 v0];

%% calculation for tga gating time period for each leg tgx(:,i) = (V120)*(t120); tga(i)=tgx(1,i); tgb(i)=tgx(2,i); tgc(i)=tgx(3,i);

%% generation of switching function SA SB SC

if tgx(1,i)>= Vtri(i) sA(i)=1;

else sA(i)=-1;

end

if tgx(2,i)>= Vtri(i) sB(i)=1;

else sB(i)=-1;

end P a g e | 65

if tgx(3,i)>= Vtri(i) sC(i)=1;

else sC(i)=-1;

end

%% invertor modelign

Van(i)=1/3*(2*sA(i)-sB(i)-sC(i))*Vdc/2;

Vbn(i)=1/3*(2*sB(i)-sA(i)-sC(i))*Vdc/2;

Vcn(i)=1/3*(2*sC(i)-sB(i)-sA(i))*Vdc/2; end

%% fft analysis of output voltage k=0:L-1; f=k*fmod/4;

Vft=fft(Van);

Vmag=abs(Vft); m=1:1:L;

%% normalise harmonic spectrum h=stem(f(m),Vmag(m)/max(Vmag),'k'); set(get(h,'BaseLine'),'LineStyle','-.') axis([0 5000 0 1]) set(h,'MarkerFaceColor',[0 0 1],'Marker','.','Color',[0 0 0]) title('harmonics spectrum of phase voltage'); xlabel('frequecy'); ylabel('normalised harmonic voltage'); figure; P a g e | 66 plot(ts,Van) hold on title('ts vs Van'); xlabel('Time in seconds'); ylabel('Volts'); figure plot(ts,Sn); hold on title('ts vs Sn'); xlabel('Time in seconds'); ylabel('Sector no'); figure plot(ts,tga,ts,tgb,ts,tgc); hold on title('ts vs tgatgbtgc'); xlabel('Time in seconds'); ylabel('tga'); figure plot(ts,Vtri); hold on title('ts vs Vtri'); xlabel('Time in seconds'); ylabel('Vtri'); figure plot(ts,tga,ts,Vtri); P a g e | 67 hold on title('ts vs tgaVtri'); xlabel('Time in seconds'); ylabel('Volts'); figure plot(ts,sA); hold on title('ts vs SA'); xlabel('Time in seconds'); ylabel('SA');