Virtual lab : Space vector PWM for two-and three-level inverters

Özet Computer-aided design tools have become popular in the engineering education field due to their flexible and user-friendly properties. In this study, an educational tool was developed for an induction motor (IM), fed by a two-or three-level inverters. The space vector Pulse Width Modulation technique is used for controlling inverters. The training set was written in the C# programming language, by using the Microsoft Visual Studio 2010 environment. The set has a flexible structure and graphic interfaces. Circuit responses in different operating conditions are monitored with the aid of graphs and all parameters of the set can be modified easily. Bilgisayar destekli eğitim araçları esnek bir yapıya sahip ve kullanıcı dostu olmalarından dolayı mühendislik alanı eğitiminde popüler hale gelmiştir. Bu çalışmada iki veya üç seviyeli inverterler tarafından beslenen asenkron motora (ASM) ait bir eğitim aracı geliştirilmiştir. İnverterlerin kontrolü için uzay vektör Darbe Genişlik Modülasyonu tekniği kullanılmıştır. Eğitim seti Microsoft Visual Studio 2010 ortamında C# programlama dili kullanılarak yazılmıştır. Set esnek bir yapıya ve grafiksel bir ara yüze sahiptir. Sete ait tüm parametreler kolaylıkla değiştirilerek farklı çalışma durumlarında devre tepkileri grafikler yardımıyla izlenebilmektedir.


Introduction
There has been a rapid increase in the number of computerassisted learning tools that coincides with today's technology advances [1].Computer-aided teaching tools have begun to play an increasingly important role in educating students, in traditional engineering fields such as electrical, electronic, mechanical, and civil and chemical engineering [2]- [4].In teaching traditional of engineering subjects, an appropriate combination of theory, exercises, and laboratory experiments must be provided [3].In order to gain practical experience training, electrical engineering students must be provided with an intensive laboratory education, as well as theoretical knowledge [5].
There are many negative risk factors in the practical training (laboratory-workplace) of power electronics courses taught in the electrical engineering department.These factors include potential risks to the students in the laboratory, including electrical accidents, and the deterioration of circuit elements and instruments because of misuse, high prices of materials and the supplying them to be so difficult [1], [6].These disadvantages in the laboratory education of power electronics circuits can be overcome by using computer simulation programs [6].The design and development of power electronics circuits can be performed more easily, more quickly, and have a lower cost with the appropriate computer simulation program [7].Graphical user interfaces (GUIs) provide users with a visual approach in computer simulations [8].The latest technological trends in engineering education have developed around the use of computers and software tools.The use of software simulation tools in the classroom has become an integral part of the modern curriculum [9].Package programs developed for educational purposes may not be flexible and interactive enough for power electronics and electric drives courses.Therefore, some educators prefer to develop their specific simulation package programs with graphical user interface, which allows for greater flexibility [10]- [16].
Electric motors are used in industrial applications such as household appliances, automotive, transport vehicles, aerospace, and aviation.One of the varieties of electric motors, direct current (DC) motors, have been widely used in industrial applications for many years, as they can be controlled easily.With the development of power electronics and semiconductor technology, DC motors are replaced by alternating current (AC) powered induction motors [17].Induction motors are more widely used than other electric motors in the industry due to their robust and reliable structure, low cost, a high moment of inertia that can be controlled more easily, less maintenance requirements, and the ability to run in dirty and dangerous environments [18], [19].
The operation of AC motors at different speeds is carried out with the aid of inverters.Inverters are converters that convert the DC voltage on their input into AC voltage on their output.Inverters produce output voltages that are not sinusoidal.For this reason, the unwanted harmonics in asynchronous motors fed by inverters decrease engine efficiency and cause a formation of oscillations on moment and electromagnetic interference, along with decreasing motor losses [20], [21].Harmonics can be minimized by using different Pulse Width Modulation (PWM) techniques on higher switching frequencies or by ensuring the waveform of the inverter output voltage to occur at several voltage levels [22].
In recent years, many changes occurred in the static power converter and industrial motor drive systems, due to continuous advances in power electronics technology, along with rapid advances in switching frequencies and capacities of semiconductor components [23].As a result of these changes, multi-level voltage-fed PWM inverters have emerged.There are three different topologies of multi-level voltage fed inverters [24].The first topology, a diode-clamped three-level inverter, was proposed by Nabae et al. in 1981.In diodeclamped multi-level inverters, the input voltage is divided into various levels with nodes between capacitors connected in series [20].The second topology, a flying capacitor clamped inverter, was proposed by Meynard and Foch in 1992 [25].The structure of the flying capacitor clamped inverter is similar to the structure of the diode-clamped inverter.The only difference is the usage of retention capacitors instead of retention diodes.The final topology, a cascade full bridge inverter connected in series, was suggested by Marchesoni et al.To obtain the desired voltage on the inverter output, independent multiple full phase bridge inverters are required [26].
The advantage of multi-level inverters [27]- [29] is that they can be used in applications requiring high power and high voltage.Due to the fact that the amplitude of harmonic components of a multi-level inverter is better compared to the two-level inverter at the same switching frequency, it can work on lower switching frequencies.The ratio dv/dt of the voltage across the motor windings is low.
In recent years, extensive studies have been carried out on the PWM technique.In order to extend the range of linear modulation, to reduce switching losses, to reduce harmonics in the waveform from the inverter output, to provide easy applicability features, and to reduce computation time, many different PWM techniques have been developed [30].The two most common multi-level inverter PWM techniques are used.These are the carrier-based sinusoidal PWM (SPWM) and the space vector PWM (SVPWM) techniques.In the SVPWM technique, a sampling reference space vector is sampled on a sampling range at regular intervals to determine the switching vectors and time periods of the inverters [31].
In this study, a training set for an induction motor fed by twoor three-level inverters was developed.The indirect fieldoriented control technique was used to provide induction motor speed control.The motor can be fed by two-or threelevel inverters.The two-and three-level SVPWM technique is used for switching inverters.The set is readily available as teaching material for undergraduate and graduate students.It can also help course instructors develop course curricula.The training set was written in C# programming language in the Microsoft Visual Studio 2010 environment.The set has a flexible structure and graphical user interface.The inverter circuit responses to different operating conditions can be monitored with the help of graphs by easily modifying motor, PI, and PID controller parameters.

Indirect field-oriented control of IM
In the indirect-oriented control of IM method, three-phase variables belonging to the motor are transferred on two planes having a phase difference of 90 0 .Voltage equations of IM are given below with respect to the (  −   ) reference axis rotating on synchronous () speed [24], [32].The voltage equation of the motor is given in equation ( 1), electromagnetic torque is given in equation ( 2), slip speed is given in equation (3), and the position of the rotor is given in equation ( 4).(1) Where,   ,   are stator voltages on the  and  axes,   ,   are stator and rotor winding resistances,   ,   are stator currents on the  and  axes,   ,   are stator magnetic flux on the  and  axes,   ,   are magnetic flux of the rotor on the  and  axes,   is mutual inductance,   is rotor inductance, and  derivative operator.
The basic structure of indirect field-oriented control of IM supplied by two-or three-level inverters is given in Figure 1.
Three-level SV PWM

Two-level Inverter
Three-level Inverter

Space vector PWM
Three-phase systems can be transferred into a two-phase plane ( − ) of a 90 0 phase difference by using the space vector method.SVPWM modulation is based on space vector representation of voltages in the plane of ( − ) [33].This method can also be used in the control of three-phase voltagesource inverters.Three-phase voltages produced by the inverter are shown as space vector reference voltage (  ) on the ( − ) plane.This case is expressed mathematically on equation (5). (5)

Two-level SVPWM inverter
The basic circuit diagram of a classic three-phase two-level voltage-source inverter is shown in Figure 2.There are two power semiconductor switches (Sa1 -Sa2, Sb1 -Sb2 and Sc1 -Sc2) for each phase (leg) in the inverter.Only one switch for one phase must be on transmission.Three switching variables (a, b, and c) can be assigned to the inverter.There are a total of ( 3 = 2 3 = 8) switching states for each phase (leg) as each phase has two switching states in the inverter.Active and zero vectors formed according to these switching states are shown in Figure 3.
These switching states are shown in Table 1.The state "1" or "p" refers to transmission of switches and the state "0" or "n" refers to cutting of switches in the state of (  ,      ) switching variables.The voltage levels of output waveform for the two-level inverters are formed by two levels of (−  2,   2) ⁄ ⁄ . The space vector voltage representation of the three-phase two-level voltage source inverters on (  ) plane is given in Figure 3.
The expression of line-to-line output voltage of the two-level inverter is given in equation ( 6) and the expression of the phase-to-neutral voltage is given in equation ( 7), [34]. [ [ The SVPWM technique of a two-level voltage-source inverter consists of four basic steps.
1-Calculation of the reference voltage vector(  ): It is calculated by using equation ( 5), 2-Determination of the sector: It is determined by the conversion matrix of equation (8). Figure 4 shows this state [35], [36].By using the g − h plane, in which sector the reference voltage vector is given briefly in Table 2 [36].
Table 2: Finding the sector by using the g − h plane.

Three-level SVPWM inverter
The basic circuit diagram of the classic three-phase three-level voltage-source inverter is shown in Figure 6.In three-phase three-level inverter, there are two clamped diodes (D 11 , D 12 ), four power semiconductor switches ( 1 ,  2 ,  3 ,  4 ) and four bypass diodes ( 1 ,  2 ,  3 ,  4 ) belonging to each phase (leg).There should be only two switches on transmission at the same time for one phase.Three switching variables (a, b and c) can be assigned to the inverter.There are a total of ( 3 = 3 3 = 27) switching states in three-phase three-level inverter, as each phase (leg) has three switching states.
Switching states of a phase is shown in Table 3.As seen in Figure 7, voltage vectors are positioned at various points of two nested hexagons and divided into four groups according to their switching states.These are () and () group voltage vectors, which are high voltage vectors with amplitudes of 2  3 ⁄ , and positioned at the corners of the outer hexagon.The amplitude of group () voltage vector, being the middle voltage vector, is   √3 ⁄ and positioned in the mid-points of the outer hexagon.Small voltage vectors (ap, an) and (, ), being group voltage vectors, have amplitudes of   3 ⁄ , and are positioned at the corners of the inner hexagon.Amplitudes of (, , ) group voltage vectors, being zero voltage vectors, are zero, and positioned at the origin.In Figure 7, the hexagon has six sectors (A, B, C, D, E, F).In the same time, there are four regions (1, 2, 3, 4) in each sector.The total number of regions in the hexagon is 24 [28], [37].
The line-to-line output voltage expression of the three-level inverter is given by equation ( 9) and phase to neutral voltage expression is given by equation ( 10), [34]. [ [ The three-level voltage-source inverter SVPWM technique also consists of four steps as a two-level inverter.The difference from the two-level inverter is that it is necessary to find the region in the sector after finding the sector in the second step.Table 2 is used when finding the sector.After determining the sector, it passes to the process of determining region.Normalized voltage vectors belonging to sector A are shown in Figure 8.In Table 4, the determination of regions in sector A is given by comparing normalized quantities in the plane of   and  ℎ [35], [36].Determination of regions in other sectors is performed in similarly.
In the third step, switching times of switches are calculated for each sector, as seen in Figure 8.
Time intervals belonging to each sector are calculated and given briefly in Table 5. Where,   is sampling period, k is , and  ′ is the nearest angular value to voltage vector [37].
In the fourth step, switching sequences for all regions of the each sector are generated in a symmetrical manner.Sectors (A − D, B − E, C − F) are in the counter sectors [38].
In Figure 9, three-phase PWM waveforms for four regions belonging to sector A are shown.Here, symmetrical waveforms are used for waveforms [38].

Virtual laboratory
This set is run in Windows environment.Operations of the drive system can be observed from computer screen and can be adjusted by selecting the appropriate windows.
The main program image is shown in Figure 10.There are four sub-windows of the main window menu, and their contents vary according to the selected window.When one of the windows is selected, the previous window is replaced by the selected window.These are "IM and Simulation Setup", "Space Vector PWM", "Simulation Window" and "Block Diagram" windows.
The upper side of the "IM and Simulation Setup" window is divided into two parts.These are the inverter selection window on the left side and the menu windows on the right side of the screen.
In the inverter selection window, it is required select one of the two-or three-level inverters.In menu window, five parts consisting of the "IM Parameters", "Speed Controller", "Inverters Parameters", "IM Load Setup", and "Reference Speed Setup" must be defined.In the IM parameters section, there are electrical parameters of the motor.If the user desires to do so, self-controlled motor label values may be entered by making changes to the parameters.The user may save selfentered motor parameters into a file through the export section in the "File" menu.In addition, the user may transfer motor parameters into the program by selecting a saved file, either by using the "Import From File" button in this screen or using "Import" from the file menu.In this way, the user has no need to enter the motor parameters when closing and reopening the program.In the Speed Controller section, the PI and PID controllers are presented for the user's selection for controlling motor parameters.In the Inverters Parameters section, the values of the inverter must be entered.The IM Load Setup section determines whether the motor is run on load or without load (Load/Unload).If the user desires to run the motor on load in a defined time interval, desired load values can be adjusted by entering start and stop times, and load values.In the Reference Speed Setup, the value of the fixed speed signal as the reference speed of the motor (Fixed Reference Signal) or variable speed signal in a specified time interval is selected and related parameters are adjusted.The bottom of the window is divided into two parts.On the left side, there are control buttons by which the simulation is started, paused and stopped.On the right side are Simulation Time, Sample Time, Time Remaining, and Instantaneous Time information.In addition, the remaining time to complete the simulation is shown to the user via the progress bar in this section.
When the user clicks the Space Vector PWM tab, the window showing the values corresponding SVPWM is opened.The window of the SVPWM for the two-level inverter is shown in Figure 11a, and the window of SVPWM for the three-level inverter is shown in Figure 11b.
When the simulation is started, the region of the reference vector of SVPWM for the two-level inverter, and the region and sector for the three-level inverter are shown in Figure 11 a and Figure 11b, respectively.The movement of the reference vector can be seen with the help of red arrows.In addition, the PWM wave signal applied to the inverter can also be seen on this screen, depending on the position reference vector.Red for positive voltage and blue for negative voltage is used in PWM signals and inverter for two-level inverter.In the threelevel inverter, the red color represents positive, the blue color represents negative, and purple represents zero voltage level.In addition, instantaneous values of Valfa, Vbeta, Vref, position information and graph of their values along the simulation and are also given.When the simulation is completed or terminated, the simulation data can be transferred to Excel by selecting "Export" in the "File" menu.The prepared simulation program can be used in the Turkish or English languages.For this, the language selection must be made in the language menu.

Evaluation of the training set
The preparation of the training tool was applied to a group of 60 individuals who are 3 rd year students at Suleyman Demirel University, Faculty of Technical Education, Department of Computer and Control Education had taken a power electronics course.
The questions and answers of the questionnaire administered to students are given in Table 6.According to the results, students were determined to have sufficient prior knowledge about two-and three-level inverters and SVPWM technique included in the applied power electronics subject.Experiments conducted with the new training tool were determined to be consistent with the results of experiments in a classic laboratory environment.When evaluated in terms of ease of use and being user-friendly, student opinions seem to be very positive.The educational tool was concluded to provide great convenience in consolidating theoretical knowledge compared to classic laboratory systems.With the applied method, the disappearance of the negative risks encountered in classical experiments is evaluated to be positive in terms of the possibility of finding a more secure training environment for the students.In order to determine benefits and limitations of the program, a student-based assessment was conducted.

Figure 1 :
Figure 1: Indirect field-oriented control of IM.

Figure 4 :
Figure 4: α − β plane and g − h plane.4-Generation of the switching sequences: Switching sequences for each sector are generated symmetrically.Symmetrical three-phase PWM waveforms belonging to sector A are shown in Figure 5.

Figure 5 :
Figure 5: PWM waveforms of three-phase, belonging to A sector

Figure 7 :
Figure 7: Switching states of three-level PWM inverter.

Figure 8 :
Figure 8: Normalized voltage vectors belonging to sector A.

4 Figure 9 :
Figure 9: Three-phase PWM waveforms for four regions belonging to sector A.

Figure 11 :
Figure 11: SVPWM windows.(a): Two level inverter, (b): Three level inverter.When the user clicks on the Simulation Window tab, the window that pops up in the simulation graphs shown in the screen.The simulator window screen of the two-level inverter is shown in Figure 12a, while the simulator window screen of the three-level inverter is shown in Figure 12b.During the simulation, motor phase voltages, phase-to-phase voltages, currents, torque, reference, and actual speed values can be seen in the graphs.In addition, a graph showing the inverter voltage values was added to this screen.Voltages or currents selected from selection parts on the right side of the graphs are shown in graphs.If required, graphs can be saved to a selected section on the computer as an image, or a may be printed out.Finally, when the user clicks on the Block Diagram tab, a block diagram window of the system appears on the screen.The block diagram of the two-level inverter is shown in Figure 13a, while the block diagram of the three-level inverter is shown in Figure 13b.The block diagram of the control system is given on this screen.During the simulation, values of the variables such as the reference speed, actual speed, speed error, the motor position, and current can be monitored.When double clicking on the values, a graph of the clicked value from  = 0 until the time at that moment can be seen in a separate window, and values of the variable are added to the graph
In this study, the training set was presented for two-or threelevel inverters, fed by the induction motor intended to ensure cost-effective training and experience.Space vector PWM technique is used for the control of inverters.This training kit assists students in understanding and developing inverters, as well as induction motors, effectively.The set has a flexible structure and graphical user interfaces.The user can easily modify inverter and motor parameters in different operating conditions.The set the can be easily installed on a computer running on Windows (XP and later).

Table 1 :
Switching states of the two-level voltage-source inverter

Table 4 :
Region determination states in sector A.

Table 5 :
Time intervals for three-level inverter voltage vectors in different regions.