Generation of Space Vector PWM Signals Based on ...

3 downloads 0 Views 753KB Size Report
3School of Civil Aviation, Firat University, Elazig, Turkey. *Corresponding ..... are widely used in many areas such as defense industry, engine control systems,.
International Journal of Natural and Engineering Sciences 9 (3): 54-59, 2015 ISSN: 1307-1149, E-ISSN: 2146-0086, www.nobel.gen.tr

Generation of Space Vector PWM Signals Based on the FPGA in Real Time Hakan ÇELIK1* Mahmut Temel ÖZDEMIR2 Eyyüp ÖKSÜZTEPE3 1 Department of Mechatronics Engineering, Faculty of Engineering, Firat University, Elazig, Turkey 2 Department of Electrical and Electronics Engineering, Faculty of Engineering, Firat University, Elazig, Turkey 3 School of Civil Aviation, Firat University, Elazig, Turkey

*Corresponding author:

Received: September 12, 2015 Accepted: October 26, 2015

Email: [email protected]

Abstract In recent years, along with developing Field Programmable Gate Array (FPGA) technology, FPGA has been used in many areas such as motor control application, robotic systems, and space technology. FPGAs have parallel program construction with the difference of microprocessors having serial program construction. Thus, FPGAs are widely used in control systems required for simultaneously calculation and processing. Space vector PWM method is commonly used in motor control application, UPS and solar energy systems because of having many advantages. The generated Space vector PWM signal with help of serial program construction has a slip at output frequency and so it affects system performance negatively. In this study, the real time Space vector PWM signal was generated by FPGA to solve this problem. Prototype circuit of voltage source inverter (VSI) was controlled by PWM signals. The time domain simulations of the system were carried out in Matlab/Simulink to verify the results. The obtained results were compared for output voltage, current and their harmonics. Finally, it is shown that the obtained experimental results from VSI prototype circuit and the time domain simulation results are consistent. Keywords: Field Programmable Gate Array (FPGA), Voltage source inverter, Space vector PWM, Motor control systems.

INTRODUCTION Inverters transform DC voltage in their input into AC voltage. Inverters are widely used in motor control applications, uninterruptible power supplies and renewable energy sources. Pulse width modulation methods are used to regulate output voltage and frequency in inverters. Space vector PWM method is widely used in the control of inverters since it has a low harmonic content and it can be applied digitally and it can obtain maximum voltage from inverter [1-4]. Although it has some advantages, one of the biggest drawbacks of the method is containing complex time calculations[2]. Therefore, advanced and expensive microprocessors are needed to produce PWM signals. In addition, shifts may occur in the output frequency of space vector PWM signals produced with conventional microprocessors. These shifts occur due to the serial processing structure of conventional microprocessors. As a result, the output frequency obtained is different than the desired frequency. This leads to many problems such as failure to obtain the desired speed in motor control applications, unwanted harmonics and inability to operate in parallel with the network in renewable energy sources. In this study, FPGA is used instead of conventional microprocessors in the production of space vector PWM signals in real time to solve these problems. Unlike conventional microprocessors, FPGAs have parallel processing structure rather than serial processing. It provides a great convenience especially in the calculation of simultaneously changing parameters with these features[5-7]. In addition, the costs of FPGAs is less than cost of a microprocessor or DSP system that can perform the same process. Therefore, FPGAs are widely used in

many areas such as motor control applications, robotic systems and image processing method etc. MATLAB/Simulink simulation of the system is also performed in order to compare the results obtained from FPGA-based experimental system.

MATERIALS AND METHODS Space Vector PWM Space vector PWM method, unlike other PWM methods, is a digital PWM method[3]. In addition, space vector PWM method has a better harmonic content compared to commonly used sinusoidal PWM method and the basic voltage value obtained from inverter is higher compared to sinusoidal PWM[8]. Space vector PWM method is widely used in inverter control methods due to these superior features. Complex time calculations required to use space vector PWM method is the biggest drawback of this method[9]. However, this drawback has been eliminated by recently developed microprocessor technology. In the space vector PWM method, 𝑉𝑟𝑒𝑓 voltage vector representing the fundamental behavior of the inverter can be defined as 2

2𝜋

4𝜋

𝑉𝑟𝑒𝑓 = 𝑉𝛼 + 𝑗𝑉𝛽 = (𝑉𝑎0 + 𝑉𝑏0 . 𝑒 𝑗 3 + 𝑉𝑐0 . 𝑒 𝑗 3 ) 3

(1)

in the stationary reference frame. Here, Va0, Vb0, Vc0 are inverter pole voltages; Vα, Vβ and𝑉𝑟𝑒𝑓 are real and imaginary components of the voltage vector in the stationary reference frame[6].

55

H. Çelik et al / IJNES, 9 (3): 54-59, 2015

In Figure 1.a, voltage vectors possible for voltage based inverter is presented in a hexagonal form. In Figure 1b, reference voltage vector is given for the 1st sector.

In the space vector PWM method, switching is done by calculating the active voltage durations Tk, Tk+1 and zero voltage duration T0. 𝑉𝑟𝑒𝑓 reference voltage vector becomes

PWM a

𝑉𝑟𝑒𝑓 = 𝑉𝑘

β

PWM b PWM c

V3(0,1,0)

V2(1,1,0) 2

PWM a

PWM c

PWM c

3

PWM a

PWM b

Vref

V7(1,1,1)

𝑇𝑘

+ 𝑉𝑘+1

𝑇𝑠 /2

𝑇𝑘+1 𝑇𝑠 /2

𝑇0

+ 𝑉𝑧

(3)

𝑇𝑠 /2

PWM a PWM b

PWM b

V4(0,1,1)

V2(1,1,0)

Vref

(T2/Ts)*V2

1

θ

V1(1,0,0)

V0(0,0,0)

α

V7(1,1,1)

θ

V0(0,0,0)

(T1/Ts)*V1

V1(1,0,0)

for any k sector. Where, 𝑉𝑘 , 𝑉𝑘+1 are active voltage vectors, 𝑉𝑧 is zero voltage vectors[5,10]. As it can be seen in Figure 2,

6

4

PWM a

PWM c

𝑇𝑠

PWM b

5

V5(0,0,1)

PWM c

2

PWM a PWM b

= 𝑇𝑘 + 𝑇𝑘+1 + 𝑇0

(4)

V6(1,0,1)

PWM c

(a)

The relationship between switching frequency fs and switching period Ts can be written as follows:

(b)

Figure 1.(a) Space vectors in the form of hexagonal. (b) Reference voltage vector

For each Ts switching period, the average space vector is defined as 𝑉𝑟𝑒𝑓 . θ represents the angle of this reference voltage vector. If Ts is selected small enough, 𝑉𝑟𝑒𝑓 is considered to be constant during Ts[8]. In each of the six sectors shown in Figure 1.a, 𝑉𝑟𝑒𝑓 can be defined as voltage and 𝑉0 and𝑉7 can be defined as zero voltage vectors and a combination of the weighted average two adjacent active voltage vectors[8]. As it is shown in Fig. 1.a., the direction of switching is counter-clockwise in single sectors; whereas it is clockwise in double sectors. Six non-zero voltage vectors, 2

𝑉𝑘 = 𝑉𝑑𝑐 . 𝑒 3

𝜋 𝑗 (𝑘−1) 3

𝑇𝑠 =

1

(5)

𝑓𝑠

Modulation index for Space Vector PWM can be defined as [2], 𝑚=

𝜋 𝑉𝑟𝑒𝑓

6)

2 𝑉𝑑𝑐

Equation (1), equation (2) and equation (4) and equation (6) are put in Equation (3) and if necessary simplification are made, then Tk and Tk+1 durations become [1,5], 𝑇𝑘 = 𝑚. 𝑇𝑘+1

𝑘𝜋

3 𝜋

sin(

𝑇𝑠

− 𝜔𝑡)

sin(𝜔𝑡 −

(2)

Here, Vdc represents the DC-link voltage of inverters, k refers to the sector where reference voltage vector is located. If we accept that reference voltage vector is in sector k, then adjacent vectors become 𝑉𝑘 and𝑉𝑘+1 . Only one leg of the inverter is switched while transmitting from one state to another for a better harmonic content and minimizing the switching losses[8]. In Figure 2, PWM signals are shown for the sector 1. These PWM signals are named as small, medium and large PWM signals depending on their waveforms.

3

(6)

(𝑘−1) 3

)

Space vector PWM signals are generated after calculating these durations for each Ts switching period. Simulations of Space Vector PWM in Matlab/Simulink Simulation of space vector PWM is performed in Matlab/Simulink in order to compare space vector PWM signals generated in FPGA. The block diagram of this simulation is given in Figure 3. Discrete, Ts = 1e-005 s. powergui

-CWtk1 sector

PWMa

Freq

000

100

110

111

111

110

100

000

Divide

Clock

Scope8

Scope1

sector Sector Wtk

sector Tk Tk+1

0.5

PWMb

Ma

Ma

Ts Ts

Ts1

sector

Tk+1

To

To

Ts

Ts

Times Calculation

pwma

PWMa

Va

Va

pwmb

PWMb

Vb

Vb

pwmc

PWMc

Vc

Vc

Tk

PWM

VSI_inv

R-L Load

Figure 3. Simulation of space vector PWM in Matlab/Simulink PWMc

T0/2

Tk

Tk+1

Ts/2

T0

Tk+1

Tk

T0/2

Ts/2

Figure 2. PWM output signals for reference vectors in the sector 1

Considering block diagram in Figure 3, rotation angle of reference vector θ is obtained by multiplying angular speed with time. Durations are calculated by putting sector value obtained, modulation index and switching frequency in Eq. (6). Space vector PWM signals are produced by using these durations. This process is repeated for each switching period Ts frequency and amplitude of the load voltage represents the performance of space vector PWM.

56

H. Çelik et al / IJNES, 9 (3): 54-59, 2015

Generation of FPGA-Based Space Vector PWM Signals FPGAs are programmable integrated circuit components and their internal structure can be changed by the user. FPGAs provide great convenience due to its parallel processing structure in processes that need to be done simultaneously [1,6,9]. Processing capacity of FPGAs is improving and their costs are reducing with today’s advancing technology. FPGAs are preferred in many applications in place of conventional microprocessors due to these features [1,2,6]. FPGAs are widely used in many areas such as defense industry, engine control systems, mechatronics systems, image processing and so on. FPGAs consist of programmable logic blocks (CLBs), input/output blocks (IOBs) and interconnections between these blocks[6]. The content of CLB is given in Figure 4.

As it can be seen in the block diagram given in Figure 6; large, medium and small PWM signals are obtained by using Tk, Tk+1 and T0 values calculated in accordance with constant values, modulation index and output frequency value. Comparison processes and logic VE connectors are used to generate these signals. The counter variable used in comparison process increases up to TS switching period in each cycle and resets itself when it reaches the value of TS. In the selector block, large, medium and small PWM signals are applied on phases based on the value of sector where reference vector is located. Thus, space vector PWM signals are generated in FPGA under the control of an inverter. comparator Counter

T0/2 3*T0/2+2*Tk+2*Tk+1

CLB A B C D

>

And




And PWMb

3*T0/2+Tk+2*Tk+1

LUT

FF

Out

Medium PWM

comparator T0/2+Tk+Tk+1

3*T0/2+2*Tk+2*Tk+1

Rst

< >

PWMc Small PWM And

< comparator Sector

Clk

Select or

Figure 4. The Structure of CLB

Figure 6. Generation of FPGA-based Space Vector PWM Signals

As it can be seen in Figure 4, there are Look-up Table (LUT) and Flip-Flop (FF) in the content of CLB. The complex functions can be generated by connecting CLBs with each other by interconnections. Input-output blocks provides connection of FPGA with external units. In this study, DE0-Nano board, which was produced in Altera Firm, is used (Figure 5).

Report obtained as a result of the compilation with Quartus program of FPGA verilog codes written according to Fig. 6 is given in Fig. 7. When the report is examined, it is seen that space vector PWM signals are generated by using a minimal quantity of FPGA hardware.

Figure 5. DE0-Nano Board

In the content of this board, there are Altera Cyclone IV EP4CE22F17C6N FPGA, 32 MB SDRAM, 2 kB EEPROM, 64 Mb configurable serial memory and 72 I/O pins. In addition, there are 8 channel 12-bit A/D converter and 3-axis accelerometer [11]. The operating frequency of the board is 50 MHz. The voltage of I/O pins of the board is 3.3 V. It can be easily programmed by Board Quartus software through USB port. The block diagram given in Figure 6 is used to generate FPGA-based space vector PWM signs.

Figure 7. Compilation report

A prototype inverter circuit given in Figure 8 is used to examine the performance of FPGA-based space vector PWM signals and their accuracy.

57

H. Çelik et al / IJNES, 9 (3): 54-59, 2015 PWMa 1

0.5

0 0.025

0.03

0.035

0.04

0.045 0.05 Time(s) PWMb

0.055

0.06

0.065

0.07

0.03

0.035

0.04

0.045 0.05 Time(s) PWMc

0.055

0.06

0.065

0.07

0.03

0.035

0.04

0.045 0.05 Time(s)

0.055

0.06

0.065

0.07

0.055

0.06

0.065

0.055

0.06

0.065

1

0.5

0 0.025

1

0.5

Figure 8. Prototype Inverter Circuit

0 0.025

(a) Va Voltage

6

4

2

Phase Voltage(V)

In this prototype inverter circuit, first space vector PWM signals generated in FPGA are applied on isolation and dead time circuits. In these circuits, electrical isolation is done by inverter circuit to prevent any short circuit in FPGA outputs and dead time zones are created in order to prevent the short circuit of the inverter switches. Then, three phase voltage based inverter, in which DG411 analog switch is used as a power electronic switch and PWM signals are used, is controlled. Experimental setup prepared according to the prototype inverter circuit is shown in Fig. 9.

0

-2

-4

-6

0.025

0.03

0.035

0.04

0.045 0.05 Time(s)

0.07

(b) Vab Voltage

15

Phase to Phase Voltage(V)

10

5

0

-5

-10

-15 0.025

0.03

0.035

0.04

0.045 0.05 Time(s)

(c) Figure 10. Simulation results for f=50 Hz and m=0.75 (a) PWM signals, (b) Phase voltage, (c) Phase to phase voltage

Figure 9. Experimental setup

RESULTS AND DISCUSSION Simulation results are obtained from Matlab/Simulink block diagram given in Figure 3 for 1e-6 solution range. The experimental results are taken from the experimental setup given in figure 9. In both experimental results and simulation results, DC-Link voltage of the inverter is selected as 12 V and switching frequency fs is set to2 kHz. The simulation and experimental results are given together in order to make a comparison. Simulation and experimental results obtained for modulation index m=0.75 and output frequency f=50 Hz are shown in Fig. 10 and 11 respectively. Also, simulation and experimental results obtained for modulation index m=0.5 and output frequency f=20 Hz are shown in Fig. 12 and 13 respectively.

(a)

(b)

0.07

58

H. Çelik et al / IJNES, 9 (3): 54-59, 2015

(c) Figure 11. Experimental results for f=50 Hz and m=0.75 (a) PWM signals, (b) Phase voltage, (c) Phase to phase voltage

(a)

PWMa 1 0.5 0 0.04

0.06

0.08

0.1

0.08

0.1

0.08

0.1

Time(s) PWMb 1 0.5 0 0.04

0.06 Time(s) PWMc

1 0.5 0

(b) 0.04

0.06 Time(s)

(a) Va Voltage 6

Phase Voltage(V)

4 2 0 -2 -4 -6 0.04

0.06

0.08

0.1

Time(s)

(c) Figure 13. Simulation results for f=20 Hz and m=0. 5 (a) PWM signals, (b) Phase voltage, (c) Phase to phase voltage

(b) Vab Voltage

Phase to Phase Voltage(V)

15

CONCLUDING COMMENTS

10 5 0 -5 -10 -15 0.04

0.06

0.08

0.1

Time(s)

(c) Figure 12. Simulation results for f=20 Hz and m=0.5 (a) PWM signals, (b) Phase voltage, (c) Phase to phase voltage

When the results are analyzed, it is seen that the simulation and experimental results obtained for same modulation index and output frequency are in accordance. It is suitable that PWM obtained in simulation and experimental set and voltage signals are suitable to space vector PWM method. Also, according to both the simulation and experimental results, it is seen that there is no shift in frequency of the output voltage and that the desired output frequency is acquired.

In this study, space vector PWM signals, which are widely used in the inverter controlling, are produced in real time using FPGA instead of conventional microprocessors. DE0-Nano board manufactured by Altera firm is used in experimental work. The prototype inverter circuit has been checked by using PWM signals generated by this board. Considering the results, it has been seen that the frequency value obtained very close to the desired frequency value. In this way, frequency shifts causing major problems in both motor control applications and renewable energy systems is prevented. Output voltage obtained for different modulation index and output frequency is consistent with space vector PWM performance. In addition, it is seen that results obtained from simulations of space vector PWM in Matlab/Simulink is consistent with experimental results. This shows the accuracy of FPGA-based space vector PWM signals.

H. Çelik et al / IJNES, 9 (3): 54-59, 2015

REFERENCES [1] Shu, Z.,Tang, J., Guo, Y., Lian, J., 2007, an Efficient SVPWM Algorithm with Low Computational Overhead for Three-Phase Inverters, IEEE Transactions on Power Electronics, vol. 22, no.5, pp. 1797-1805 [2] Nazzlee, A. M., Hamid, N. H., Ali. N. B. Z., 2010, Space Vector PWM for PMSM Simulation using Matlab Simulink, IEEE Asia Pacific Conference on Circuit and Systems (APCCAS), pp.1127-1130. [3] Reney, D.,2011, Modeling and Simulation of PWM Inverter, International Conference on Devices and Communications (ICDecom), pp. 1-4. [4] Maamoun, A., Alsayed, Y. M., Shaltout, A., 2010, Space-Vector PWM Inverter Feeding a PermanentMagnet Synchronous Motor, World Academy of Science, Engineering and Technology 65, pp. 627-631. [5] Sangchai, W., Wiangtong, T., Lumyong, P., 2000, FPGA-Based IC Design for 3-Phase PWM Inverter with Optimized Space Vector Modulation Schemes, Proceedings of the 43rd IEEE Midwest Symposium on Circuits and Systems, pp. 106-109. [6] Pongiannan, R. K., Yadaiah, N., 2006, FPGA Based Space Vector PWM control IC for Three Phase Induction Motor Drive, 2006, IEEE International Conference on Industrial Technology (ICIT 2006), pp. 2061-2066. [7] Wang, Y., Schaefer, U., 2010, Real Time Simulation of a FPGA Based Space Vector PWM Controller, International Symposium on Power Electronics, Electrical Drives, Automation and Motion (SPEEDAM 2010), pp. 833-838. [8] Boukaka S., Chaoui, H., 2013, FPGA Implementation of SVPWM, IEEE 11th International New Circuit and Systems Conference (NEWCAS), pp. 1-4. [9] Sutikno, T., Jidin, A., Idris, N. R. N., 2010, New Approach FPGA-Based Implementation of Discontinuous SVPWM, Turk J Elec Eng&Comp Sci., vol.18, no.4, pp. 499-514. [10] Chaurasiya, B. R., Patil, M.D. Shah, D., Kadam, A., 2014, FPGA Implementation of SVPWM Control Technique for Three Phase Induction Motor Drive Using Fixed Point Realization, International conference on Circuits, Systems, communication and Information Technology Applications (CSCITA), pp. 93-98. [11] https://www.altera.com/content/dam/alterawww/global/en_US/pdfs/literature/ug/de0_nano_user_man ual_v1.9.pdf (last access:02.09.2015)

59

Suggest Documents