I want some pic code for svpwm. Is it can give me some advice?
Posts: 6,843
Threads: 4
Joined: Mar 2015
pic code for svpwm
Abstract
There is an increasing trend of using space vector pulse-width modulation (SVPWM) schemes for driving voltage source inverters because of their easier digital realization and better DC bus utilization. This paper introduces an SVPWM technique based on a reduced computation method, which is much simpler and more executable than conventional means without lookup tables or complex logical judgments. The SVPWM scheme is modeled and simulated using MATLAB SIMULINK and experimentally implemented and verified on microchip PIC microcontroller 18F4431 platform. The experimental results are presented for three-phase two-level inverter followed by three-phase LC filter.
Introduction
Voltage source inverters (VSIs) are increasingly applied in many industrial applications such as motor drives, uninterruptible power supplies (UPSs), frequency converters, and active filters. The main job of voltage source inverters is to synthesize AC output voltage and frequency from a constant DC voltage via pulse-width modulation technique. Pulse-width modulation (PWM) techniques have been studied extensively during the last few decades. A large variety of methods, differing in concept and performance, have been developed to achieve the following aims: wide linear modulation range, fewer switching losses, less total harmonic distortion (THD), easy implementation, and less computation time.
Driving voltage source inverter is made by one of two popular PWM approaches, namely the sinusoidal PWM approach (SPWM) or space vector PWM approach (SVPWM). In SPWM technique, the reference modulation wave is compared with a triangular carrier wave, and the intersections define the switching instants. Within every carrier cycle, the average value of the output voltage becomes equal to the reference value. In SVPWM scheme, the reference voltage space vector is realized by switching between the nearest three inverter voltage space vectors which form the sector in which the reference vector resides. Each of the combined inverter voltage space vector is realized by switching a combination of the individual inverter voltage space vectors .
Many methods have been developed to implement the SVPWM for driving VSI’s. Generally, the SVPWM implementation involves sector identification, switching time calculation, switching vector determination, and optimum-switching-sequence selection for the inverter voltage vectors . Sector identification can be done by coordinate transformation . or by repeated comparison of the three-phase reference voltages as introduced in .The lookup tables can be used for determining the switching vectors in best switching sequence . Calculating the duration of the switching vectors can be simplified by mapping the sector of the multilevel inverter to a corresponding sector of the two-level inverter .
The objective of this paper is to introduce a simplified SVPWM technique in which the inverter leg switching times are directly obtained from the instantaneous sampled reference phase voltages, and the inverter switching vectors are generated automatically. This method is much simpler and more executable than conventional means without lookup tables or complex logical judgments. In addition, an objective of this paper is to introduce a practical SVPWM inverter design based on a low cost microcontroller. The practical design is modeled using the MATLAB SIMULINK software package and experimentally implemented on the low cost microchip PIC microcontroller 18F4431 platform.
2. Two-level voltage source inverter
Voltage source inverter (VSI) is the most widely utilized device with power ratings ranging from fractions of a kilowatt to megawatt level. The major purpose of the PWM inverter is to generate a variable-voltage variable-frequency (VVVF) three-phase voltage from a DC voltage.
The circuit model of a typical two-level inverter is as shown in Fig. 1. S1–S6 are the six power switches that shape the output, and these are controlled by the signal to terminals a, , b, , c, and . It is assumed that S1, S2, S3, and S4 as well as S5 and S6 are switched in a complementary way. There are only eight possible switching vectors. Six out of these eight vectors produce a non-zero voltage and are known as non-zero switching states. The remaining two vectors produce zero output voltage and known as zero switching states. The inverter output voltage is composed of these eight switching states. The six active vectors divide the space vector plane into six equal sized sectors of 60° with equal magnitude which forms an origin centered hexagon, and two zero space vectors found at the origin as shown in Fig. 2. The hexagon is the maximum boundary of the space vector, and the circle is the trajectory of the regular sinusoidal outputs in linear modulation. Table 1 lists all of the possible switching vectors and the respective line to line/line to neutral voltages.