Vous êtes sur la page 1sur 5

designfeature By Michael Copeland, Infineon

ON-CHIP TIMERS AND REGISTERS ENABLE 8-BIT CS TO GENERATE SYMMETRIC SPACE-VECTOR PWM SIGNALS FOR THREE-PHASE MOTORS.

Generate advanced PWM signals using 8-bit Cs


he use of variable-speed drives (VSDs) has increased remarkably in recent years. This trend will probably continue and even accelerate as VSDs continue to penetrate the industrial, automotive, and consumer markets. Paramount to the success of VSDs is the ability to increase system performance and decrease price. Space-vector modulation, or SVM, is one way to increase the performance of many types of VSDs. Implementing the complicated equations for SVM with a low-cost, 8bit C, instead of a DSP, also decreases the system cost. In fact, an optimized SVM algorithm can often allow a low-cost, 8-bit C to perform all of the control requirements for the system (Reference 1).

WHAT IS SVM?

SVM is one of many methods that you can use to create sinusoidal voltages from a three-phase inverter. Figure 1 THREE-PHASE INVERTER shows a typical inverterPOSITIVE RAIL F i g u r e 1 fed VSD system. The load is typically an induction, relucLOAD (MOTOR) tance, or sinusoidal brushless dc motor. The control unit in Figure A B C 1 applies the appropriate PWM RECTIFIER signal to the six transistors that NEUTRAL make up the inverter. CONTROL UNIT You can contrast the operation A B C of SVM with sinusoidally weighted PWM (SWPWM), which is a popular method for creating sinusoidal voltages. SWPWM applies sinusoidally weighted PWM signals, at a constant frequency, to NEGATIVE RAIL each transistor. The PWM signals for each high-side transistor should be 120 out of phase. Each In a typical inverter-fed variable-speed-drive (VSD) system, the load is an induction, reluctance, or sinuPWM signal for each low-side soidal brushless dc motor. The control unit applies the appropriate PWM to the six transistors that make up transistor should be the comple- the inverter.
www.ednmag.com February 3, 2000 | edn 63

ment of the signal for the corresponding high-side transistor, and these PWM signals must include some dead time to prevent shoot-through current. A C usually implements SWPWM using a sine table that you store in ROM. You can scale the values in the sine table to generate sinusoids of variable magnitude. The C controls the frequency by reading the same sine-table value more than once, which produces a low frequency, or by skipping sine-table values, which produces a high frequency. Figure 2a shows ideal maximum-magnitude output voltages, after filtering, of SWPWM. These plots show the measured phase voltage in percent with respect to the negative rail of the inverter. As the figure shows, the amplitude of the line-to-line voltages is only about 86% of the inverter rail voltage. Intuitively, you would expect the line-to-line voltage VAB

designfeature Generating advanced PWM signals


to reach both the positive and negative for easy calculations because no negative inverter switches are in a constant state. rail voltages. For example, if transistors numbers are involved. In addition to The (x, x, x) type of notation indicates A+ and B of Figure 1 are conducting, these advantages, SVM also lends itself the state of the inverter. For example, the then VAB should be equal to the inverter easily to overmodulation. Overmodula- inverter state (+, , +) indicates that rail voltage. This lower line-to-line volt- tion is a method of generating even larg- transistors A+, B, and C+ are conage is one of the major disadvantages to er voltages. However, as you can intu- ducting. SWPWM. Using the alternative SVM, itively guess, the line-to-neutral voltages One way to describe SVM is to say that however, you can apply a larger voltage produced by overmodulation are no it uses a sophisticated averaging techto the motor. longer sinusoidal. nique to smooth out the steps in sixFor motor control, the line-to-neutral step mode. For example, assume that a voltage VAN and the induced phase volt- SVM SMOOTHS OUT THE STEPS required voltage is between two steps. Asage determine the current in each phase. To describe the C algorithm for SVM sume that this required voltage is beThe phase currents determine the motor and overmodulation, first look at how tween the voltages that result from actitorque. Thus, its important that the line- SVM works by examining the popular vating the inverter state (+, , )and to-neutral voltages are sinusoidal, and as six-step method for generating sinu- (+, +, ). SVM will approximate the relong as they are, it doesnt matter what soidal line-to-neutral voltages. Figure 3 quired voltage inside of one PWM perithe phase voltages look like. With SVM, shows the voltages that the inverter gen- od (T0) by first applying the state (+,, the generated phase voltage is not sinu- erates with a resistive balanced load us- )for a time tAT0, and then the state (+, soidal, but the line-to-neutral and line- ing six-step mode. During each step, the +, )for a time tBT0. If there is any time left over in that PWM to-line voltages are sinuperiod, then SVM apsoidal (Figure 2b). FurPHASE VOLTAGE (X), LINE-TO-LINE VOLTAGE (*) plies zero voltage for the thermore, the magnitude LINE-TO-NEUTRAL VOLTAGE (+) leftover time t0 by using of the line-to-line Figure 2 the inverter state (+, +, voltage reaches +) or (, , ). This the full inverter rail volttype of SVM implemenage, which indicates that tation deals with the time SVM takes full advantage each inverter state is acof the inverters capability PERCENT OF tive. Taking advantage of to generate sinusoidal RAIL VOLTAGE the powerful PWM genvoltages. erators of a C requires To implement SVM, converting these state you can use the SWPWM times to output times algorithm and replace the or duty cycles for each ROM sine table by the output pin. Figure 4 phase-voltage waveform shows the switching sein Figure 2b. In fact, an inDEGREES (a) quence for symmetric finite number of phase PWM and how the sevoltages can produce the PHASE VOLTAGE (X), LINE-TO-LINE VOLTAGE (*) quence relates to the same line-to-neutral voltLINE-TO-NEUTRAL VOLTAGE (+) times T0, tA, tB, and t0. age as Figure 2b shows. So This type of symmetric why use SVM instead of PWM is advantageous some other homegrown because it has very few PWM method? The answitching events and swer is that SVM fits niceproduces low torque ly with vector-control PERCENT OF ripple. schemes. Another reason RAIL VOLTAGE The implementation why SVM is popular is bein Figure 4 is based on cause the derivation of the using the CAPCOM6 phase-voltage equations module in the C504, can lead to a simple imC508, and C164I Cs plementation. A good (www.infineon.com). SVM algorithm can calcu(b) The compare timer withlate the phase voltage onDEGREES in the CAPCOM6 modline and requires only a ule generates symmetric single small look-up table With sinusoidally weighted PWM (SWPWM), the line-to-line voltage reaches only PWM by toggling output that contains only 60 86% of the rail voltage (a). With SVM, however, the line-to-line voltage reaches pins when the compare worth of information. The 100% of the rail voltage (b), which means that SVM can apply a larger voltage to timer reaches a compare SVM formulas also allow the motor.

64 edn | February 3, 2000

www.ednmag.com

designfeature Generating advanced PWM signals


value. From Figure 4, you can see the following relationships between the compare values and the times tA, tB and t0: CC0(t0/2)T0 ; CC1((t0/2tA))T0; and CC2(1t0/2)T0. Calculating the values of tA and tB requires making use of a graphical representation of the six-step-mode voltages. Converting the line-to-neutral voltages of six-step mode to space vectors and plotting the vectors on the complex plane creates the vectors in Figure 5. The following equation can transform any three quantitiesin this case, the line-to-neutral voltagesthat sum to zero into space vectors: uSVAN(t)ej0VBN(t)ej2/3VCN(t)ej2/3 . As Figure 5 shows, there are six distinct space vectors, one for each inverter state, when using the six-step mode. The input to the SVM algorithm is a space-vector voltage uS that has a magnitude, U, and angle, . If you transform truly sinusoidal three-phase voltages into a space vector, the value of U remains constant for all time but increases at a constant rate. If you assume that increases slowly, the SVM algorithm can treat both U and as constants during each switching period. For any vector that does not lie exactly on one of the six base vectors that is, any voltage that is between two stepsthe algorithm must generate an approximation by applying the two adjacent base vectors for the appropriate
Figure 3
VAN 67% 33% 33% 67% VBN 67% 33% 33% 67% VCN 67% 33% 33% 67% (+, , ) (+, +, ) (, +, ) (, +, +) (, , +) (+, , +)

amount of time. The projections of uS. onto the two adjacent base vectors give the values of tA and tB. The following formulas determine tA and tB when uS is in sector 0: tB2U(31/2)sin(); tAU[cos()(31/2)sin()]; and t0T0tAtB. The equations for SVM show that when uS lies outside of the hexagon, t0 becomes negative, which is not physically possible. To generate sinusoidal voltages, the tip of uS must lie within the hexagon at all times. This means that the length U of uS must be no greater than the radius of the inner circle of Figure 5. Voltages between the inner circle and the hexagon are reachable but will not create a sinusoid because the vector will not be able to rotate 360 without crossing the hexagon boundary. The formulas for tA and tB are only valid when uS is in sector 0. If uS is outside of sector 0, then the results of the formula are still useful, but the algorithm should rotate the vector back in 60 increments until the vector is in sector 0. The C can then apply the times tA and tB to the appropriate switching states. IMPLEMENT SVM USING LOOK-UP TABLES The calculation of compare values requires the calculation of tA, tB, and t0. These variables require calculation of sine and cosine values and several multiplies, which all must be done on-line. Proper scaling of the variables so that they fit in an 8-bit C architecture can

make the task much simpler. For example, if you program the compare timer to count from 0 to 0xFF, then the C can store all of the compare values as 8-bit values. Because the CAPCOM6 module has multiple prescalers for the timer, this 8-bit value will not really limit the choices for the actual PWM frequency. If sector zero comprises 256 angles, the precision of will be approximately 0.235. This degree of precision is more than enough for nearly all VSD applications. Partitioning each sector into 256 angles means that must be 11 bits long. This length is convenient because the most significant 3 bits indicate the sector and the least significant 8 bits indicate the angle within the sector. The C can store these values in two bytes. The least significant byte will always work in the tA and tB equations because this byte will always be less than or equal to 60. A look-up table of 256 bytes can store the tB values for each , for the case when U1. The C can then scale each tB value by the real value of U, which is always less than or equal to 1 by performing just one multiply. By examining the formula for tB, you can see that the look-up table will contain sine values for angles between 0 and 60. Because these values are always greater than 0, the C doesnt need to represent any negative numbers. The C can perform this same procedure for tA. However, if you examine the table for tA, you will find that the table is exactly the same as the tB table, but in reverse. This result stems from the chosen scaling. The C can store the values for tA and tB in the same look-up table. Because the table is 256 bytes long, the same pointerthe variablecan retrieve both tA and tB. The C simply needs to complement the pointer. Thus, the C can determine tA and tB to a great degree of accuracy using only two table look-ups and two multiplies. FURTHER OPTIMIZATIONS You can make several other optimizations to the SVM algorithm. An 8051-type C can complete the entire SVM algorithm in as few as 55 instruction cycles, including
www.ednmag.com

During each step of the popular six-step method for generating sinusoidal line-to-neutral voltages, the inverter switches are in a constant state. In essence, SVM uses an averaging technique to smooth out the steps.

66 edn | February 3, 2000

designfeature Generating advanced PWM signals

Figure 4
CCO CC1 CC2

T0

COMPARE TIMER COMPARE VALUES

1 2 t0T0

tAT0 u1 (+, , )

tBT0 u2 (+, +, )

1 2 t0T0

1 2 t0T0

tBT0 u2 (+, +, )

tAT0 u1 (+, , )

1 2 t0T0

u0 (, , )

u7 (+, +, +)

u7 (+, +, +)

u0 (, , )

A A

B B

C C

To generate symmetric SVM signals, a compare timer within the CAPCOM6 module toggles output pins when the compare timer reaches a compare value, CCx (x0, 1, or 2), which is related to times tA, tB, t0, and T0.
SECTOR push and pop instructions. If the C 1 has a 300-nsec minimum inF i g u r e 5 struction cycle time, all of the (+, +, ) (, +, ) SVM calculations take just 16.5 sec. u2 u3 This short time leaves ample time, even when switching at 20 kHz, to perform open-loop or simple closed-loop conSECTOR SECTOR trol, such as slip frequency compensa2 0 tion. The cost of this type of C is easuS ily less than $5 and, in high volume, can tB be less than $2. For a high-end vector-control system, (+, , ) (, +, +) a two-chip solution is possible by using u1 u t 4 A a simple low-cost 32- or 16-bit processor, such as a C161, to perform the vector-control calculations. You can use the 8-bit C as a PWM unit, and this C can also perform all of the current and voltSECTOR SECTOR age measurements with the onboard 3 5 A/D converter. The cost of such a twochip solution can be much less than $10. You can also use a 16-bit C, the (, , +) (+, , +) C164CI, which contains the CAPCOM6 u5 u6 module. This single C can perform SECTOR 4 all of the vector-control and SVM calcuConverting the line-to-neutral voltages of six-step mode to space vectors and plotting the vectors lations. For an extra 20 instruction cycles, you on the complex plane creates six distinct space vectors, one for each inverter state.

68 edn | February 3, 2000

www.ednmag.com

designfeature Generating advanced PWM signals


Figure 6

(a)

(b)

SVM generates a sinusoidal line-to-neutral voltage and a nonsinusoidal phase voltage (a). When controlling a three-phase induction motor, SVM generates the phase currents in (b).

can add an overmodulation mode that allows the drive system to apply even higher nonsinusoidal voltages to the motor. This type of drive is often useful in automotive applications. Figure 6a shows the phase and line-toneutral voltage that SVM generates. Figure 6b shows the phase current when you

use the SVM algorithm to control a three-phase induction motor. Reference 1. A complete application note on SVM and overmodulation, including example code, is available at www. infineon.com/microcontrollers.

Authors biography Michael Copeland is senior applications specialist for Infineon Technologies Corp (San Jose, CA). He holds an MS and a BS from Michigan State University.

Circle 4 or visit www.ednmag.com/infoaccess.asp

70 edn | February 3, 2000

www.ednmag.com

Vous aimerez peut-être aussi