27
AN035404-1015 Page 1 of 27 Abstract Space vector modulation techniques can be applied for AC induction motors, permanent magnet synchronous motors, and BLDC motor types. PMSM motors can be more efficient at smaller motor frame sizes compared with an ACIM machine of the same size. A 3-phase BLDC motor can be controlled by creating a rotating voltage reference vector within a hexagon; the speed of rotation of this voltage reference vector determines the fre- quency of motor rotation. The space vector modulation application discussed in this appli- cation note uses a BLDC type motor with three Hall sensors for angular position feedback. Constant cost pressure and increased consumer expectations have driven design engineers to seek minimal hardware solutions that extract maximum performance from motors used in consumer goods. This application note demonstrates how Zilog’s Z16FMC MCU can implement efficient, cost-conscious vector modulation of a BLDC motor. The source code file associated with this application note, AN035 4- SC01 , is available free for download from the Zilog website. This source code has been tested with ZDS II – ZNEO version 5.0.1. Subsequent releases of ZDS II may require you to modify the code supplied with this application note. Z16FMC Series Flash Microcontrollers The Z16FMC Series of Flash MCUs is based on Zilog’s advanced 16-bit ZNEO CPU core. The MCUs in this series are optimized for motor control applications and support control of single- and multiphase variable-speed motors. Target applications are consumer appliances, HVAC, factory automation, refrigeration, and automotive applications, among others. To rotate a 3-phase motor, three AC voltage signals must be supplied and phase-shifted 120 degrees from each other and the MCU must provide six Pulse Width Modulation (PWM) outputs. To control a 3-phase motor, the MCU must provide six Pulse Width Modulation (PWM) outputs. The Z16FMC Series Flash MCU features a flexible PWM module with three complementary pairs – or six independent PWM outputs – supporting deadband operation and fault protection trip input. These features provide multiphase con- trol capability for various motor types, and ensure safe operation of the motor by provid- ing immediate shutdown of the PWM pins during a fault condition. Note: Application Note Space Vector Modulation of a 3- Phase BLDC Motor with the Z16FMC MCU AN035404-1015 MultiMotor Series MultiMotor Series

Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

  • Upload
    vudan

  • View
    216

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

AN035404-1015MultiMotor

SeriesMultiMotor

Series

Abstract

Space vector modulation techniques can be applied for AC induction motors, permanent magnet synchronous motors, and BLDC motor types. PMSM motors can be more efficient at smaller motor frame sizes compared with an ACIM machine of the same size.

A 3-phase BLDC motor can be controlled by creating a rotating voltage reference vector within a hexagon; the speed of rotation of this voltage reference vector determines the fre-quency of motor rotation. The space vector modulation application discussed in this appli-cation note uses a BLDC type motor with three Hall sensors for angular position feedback.

Constant cost pressure and increased consumer expectations have driven design engineers to seek minimal hardware solutions that extract maximum performance from motors used in consumer goods. This application note demonstrates how Zilog’s Z16FMC MCU can implement efficient, cost-conscious vector modulation of a BLDC motor.

The source code file associated with this application note, AN0354-SC01, is available free for download from the Zilog website. This source code has been tested with ZDS II – ZNEO version 5.0.1. Subsequent releases of ZDS II may require you to modify the code supplied with this application note.

Z16FMC Series Flash MicrocontrollersThe Z16FMC Series of Flash MCUs is based on Zilog’s advanced 16-bit ZNEO CPU core. The MCUs in this series are optimized for motor control applications and support control of single- and multiphase variable-speed motors. Target applications are consumer appliances, HVAC, factory automation, refrigeration, and automotive applications, among others.

To rotate a 3-phase motor, three AC voltage signals must be supplied and phase-shifted 120 degrees from each other and the MCU must provide six Pulse Width Modulation (PWM) outputs. To control a 3-phase motor, the MCU must provide six Pulse Width Modulation (PWM) outputs. The Z16FMC Series Flash MCU features a flexible PWM module with three complementary pairs – or six independent PWM outputs – supporting deadband operation and fault protection trip input. These features provide multiphase con-trol capability for various motor types, and ensure safe operation of the motor by provid-ing immediate shutdown of the PWM pins during a fault condition.

Note:

AN035404-1015

Application Note

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCU

Page 1 of 27

Page 2: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Discussion

An electric motor consists of a stator and a stationary frame in which a rotating compo-nent, or rotor, is mounted on a shaft and bearings. In a 3-phase BLDC motor, the stator is laced with three sets of inductor windings energized by three AC voltage inputs that are phase-offset 120 degrees from each other to produce a rotating field of magnetic flux. This stator flux field exerts a magnetic force on a rotor’s permanent magnet flux field, resulting in torque on the output shaft.

In a 3-phase motor control application, the input to the motor is produced by a 3-phase inverter bridge. A bridge contains three complementary source/drain transistor pairs which connect either ground or high-voltage DC to each of its three outputs in response to digital control signals from the microcontroller. The microcontroller uses PWM on the bridge control signals to generate three approximately-sinusoidal AC waveforms on the bridge outputs, with the required 120-degree phase offset.

The duty cycle of each microcontroller PWM output is varied to control the period and amplitude of the generated AC signal which, in turn, determines the speed and torque of the motor.

Theory of Operation

Similarly to third harmonic-injected sinusoidal PWM, the Space Vector Modulation method utilizes about fifteen percent more of the available bus voltage, therefore increas-ing the efficiency of motor operation.

Unlike a non-third harmonic-injected sinusoidal PWM, the neutral point of the phase volt-ages is constrained to one-half of the bus voltage, as illustrated in Figure 1.

Space vector modulation is not confined to the limits of the VBUS and the center voltages, and can float in space as illustrated in Figure 2.

Figure 1. The Rotating Vectors are Constrained by ± VBUS and the Center of the VBUS Voltage

Vbus

Vbus/2

-Vbus

AN035404-1015 Page 2 of 27

Page 3: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Unlike sinusoidal PWM which generates sinusoidal currents separately in each push/pull stage of the inverter, space vector modulation operates the entire inverter as a single unit to produce the sinusoidal currents. In doing so, the inverter is operated in eight different states within the hexagon, two of which are referred to as zero vectors because they pro-duce no voltages, and six states which produce non-zero voltages.

The rotating reference voltage Vs within this hexagon, seen in Figure 3, is represented by a space vector using the following equation:

With vector addition, the resulting reference space vector is:

Figure 2. Center Voltage of the Space Vector Floats in Space

Figure 3. The Rotating Reference Vector VREF within the Hexagon

U V W

T1 T2 T3 Time 1 Time 2 Time 3

Vbus

Vbus/2

-Vbus

Vs Vsej

=

V3(010) V2(110)

V4(011) � Vs

V0(000)V7(111)

V1(100)

V5(001) V6(101)

Vs r1 V1 r2 V2 +=

AN035404-1015 Page 3 of 27

Page 4: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

To produce this rotating vector, the angular position within any two base vectors must be known, as shown in Figure 4.

Knowing the angle of rotation and the adjacent base vectors within the hexagon, the scalar coefficients for the adjacent base vector r1 and r2 must be calculated to time-modulate the base vectors V1 and V2 toward generating the resulting voltage reference vector, VS.

After the angular information is obtained, the scalar quantities r1 and r2 can be calculated using the following equations:

In the above equations, m is the magnitude of the rotating space vector, VS.

The time periods for which the adjacent base vectors are modulated to obtain the reference vector can be calculated using equations 1, 2, and 3:

Equation 1

Equation 2

Equation 3

In these three equations, T is the sum of t0, t1, and t2, and cannot be greater than the time period of the PWM. Next, t0 becomes the time period for which either or both zero vectors are applied in combination with t1 and t2, as illustrated in Figure 5.

Figure 4. The Location of the Reference Vector in between any of Two Base Vectors

r1 m 3 60 – sin=

r2 m 3 sin=

t0 1 t1– t2– T=

t1 r1 T=

t2 r2 T=

AN035404-1015 Page 4 of 27

Page 5: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

To find the time periods t0, t1, and t2, the angles are determined by using V1 as the refer-ence axis in a counterclockwise direction to determine the base vector angle to be sub-tracted from the angle of the reference vector.

Example 1

Using equations 1, 2, and 3 above, if the bus voltage is 24 V and the desired reference vec-tor magnitude is 12 V, then the following equation can be calculated:

In the above equation, the angle is 190 degrees and the adjacent base vector is V4, which is 180 degrees. Therefore, r1 and r2 can be calculated using the following equations:

If the PWM period is T = 50 µs, then the time duration for either zero vector V0, V7 is:

The time duration for t1 is:

And the time duration for t2 is:

Space vector control allows for different switching combinations using t1 and t2 based on the choice of the null vectors which are applied for duration of time t0. Applying the zero vectors V0, V7, or both V0 and V7 results in different switching patterns to generate either less total harmonic distortion or to reduce linear switching power losses in the switching devices. Using these V0, V7 zero vectors can serve to obtain a regenerative braking effect, especially when using ACIM.

Figure 5. The Switching Times for Base Vectors V1, V2, and Zero Vectors

VsMagVbus------------ e

j 190=

r1 312V24V----------- 60 190 180– – sin 0.663= =

r2 312V24V----------- 190 180– sin 0.15= =

t0 1 r1– r2– T 9.3s= =

t1 r1 T 33.2s==

t2 r2 T 7.5s==

AN035404-1015 Page 5 of 27

Page 6: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Example 2

To reduce linear switching losses with either V0 or V7, zero vectors can be applied in sequence; i.e, using V0 as the zero vector in the sequence t1 → t2 → t0 or using the V7 zero vector in the same sequence. In both cases, each of the three phases in the inverter does not switch for one-third of the time in a cycle.

However, different combinations of switching sequences have different effects on the inverter circuit, depending on the size of the bootstrap capacitors used for the high- and low-side drivers. If the V0 zero vector is used, the bootstrap will still work because the capacitors can discharge; however, such may not be the case when using the V7 vector as a zero vector.

The resulting phase waveforms are shown in Figures 6 through 10.

Figure 6. Using V7 as the Null Vectors in Sector 1, 3, 5 and V0 in Sector 2, 4, 6

Figure 7. Using V0 as the Null Vectors in Sectors 1, 3, and 5 and V7 in Sectors 2, 4, and 6

AN035404-1015 Page 6 of 27

Page 7: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Examples for PWM timings using null vectors V0, V7 across the six hexagon sectors are listed in Table 1.

Figure 8. Always Using V0 as Zero Vector

Figure 9. Always Using V7 as a Zero Vector

Figure 10. Using Alternate Reverse Switching Modes by Alternating Zeroes for Each Sequence and Reverse Sequence After Each Zero Vector

AN035404-1015 Page 7 of 27

Page 8: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Application

To apply space vector theory, the Z16FMC microcontroller’s PWM module is configured as three complementary output pairs. Each output pair controls one complementary source/drain transistor pair in the inverter bridge. The PWM module is configured to insert a deadband between ON states to prevent leakage that might occur if one transistor in a pair turns on before the other is fully off.

Each PWM output pair produces a stream of complementary on/off pulses to activate the corresponding source or drain transistor in the inverter bridge. The voltage of each bridge output varies with the source/drain pulse duty cycle.

The period of each PWM cycle is configured to be 50 µs; the PWM module generates an interrupt request at the end of each cycle to calculate the PWM timings for of the space vector modulation signals. These signals are loaded into the three PWM registers for Phase A, Phase B, and Phase C. Therefore, the primary goal of the ISR is to update the duty cycle value for each PWM channel, as required, to produce the appropriate AC wave-forms at the inverter bridge outputs.

The frequency of the rotating vector is calculated as:

In the above equation, the LUToffset value is a 16-bit integer index, of which only the upper byte is used to select the Look-Up Table (LUT) entries.

The synchronous speed of the rotor can then be calculated as:

Utilizing Timer 0, the time period of the rotor is measured in terms of timer ticks. This information is then used in the PI speed control loop.

Table 1. PWM Timings for Each of Six Sectors

Sector 1 Sector 2 Sector 3 Sector 4 Sector 5 Sector 6

PhsA = t1 + t2 PhsA = t0 + t1 PhsA = 0 PhsA = t0 PhsA = t2 PhsA = 100%

PhsB = t2 PhsB = 100% PhsB = t1 + t2 PhsB = t0 + t1 PhsB = 0 PhsB = t0PhsC = 0 PhsC = t0 PhsC = t2 PhsC = 100% PhsC = t1 + t2 PhsC = t0 + t1

Freq =LUToffset

PWMperiod x LUTsize

Speed = 120 xFreq

Poles

TimerTicks =

MCUclockFreq

TimerPrescaler

LUToffset

PWMperiod x LUTsize

AN035404-1015 Page 8 of 27

Page 9: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Equipment Used

The following equipment is used for the setup to demonstrate the space vector modulation technique. The first four items are included in the MultiMotor Development Kit (ZMULTIMC100ZCOG).

• MultiMotor Development Board (99C1358-0001G)

• 24V AC/DC power supply

• LINIX 3-phase 24VDC, 30W, 3200RPM BLDC motor (45ZWN24-30)

• Opto-Isolated UART-to-USB adapter (99C1359-001G

• Z16FMC MultiMotor MCU Module (99C1357-001G) – Order separately

• Opto-Isolated USB SmartCable (99C0968) – Order separately

• Digital oscilloscope

• PC with Internet access and at least two open USB ports

Hardware Setup

Figure 11 illustrates the application hardware connections required to operate the motor with space vector modulation.

Figure 11. The MultiMotor Development Kit with Z16FMC MCU Module and SmartCable

AN035404-1015 Page 9 of 27

Page 10: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Testing Procedure

Observe the following procedure to test space vector modulation on the Z16FMC MCU Module.

1. Download and install ZDS II – ZNEO 5.0.1 (or newer) on your PC from the Zilog Store.

2. Download the AN0354-SC01.zip source code file from the Zilog website and unzip it to an appropriate location on your PC.

3. Connect the hardware as shown in Figure 11.

a. The cables from the Opto-Isolated USB SmartCable and the UART-to-USB adapter must be connected to two of the PC’s USB ports.

b. Download and install the drivers for the SmartCable and the UART-to-USB adapter, if required.

c. For additional assistance, refer to the MultiMotor Series Development Kit Quick Start Guide (QS0091).

4. Power up the MultiMotor Series Development Board using the 24 V DC adapter that is included in the Kit.

5. Using a serial terminal emulation program such as HyperTerminal, TeraTerm, or Real-Term, configure the serial port to 57600-8-N-1-N. A console screen should appear on the PC which will show the status of the motor and allow changes to the motor’s operation.

6. Launch ZDS II – ZNEO, select Open Project from the File menu, browse to the direc-tory on your PC in which the AN0354-SC01 source code was downloaded to, locate the AN0354_SC01.zdsproj file, highlight it, and select Open.

7. Ensure that the RUN/STOP switch on the Z16FMC MCU Module is in the STOP position.

8. In ZDS II, compile and flash the firmware to the Z16FMC MCU Module by selecting Rebuild All from the Build menu. Next, select Debug → Download code, followed by Debug → Go.

9. Set the RUN/STOP switch on the Z16FMC MCU Module to RUN. The motor should begin turning.

10. In the GUI terminal console, enter the letter U to switch to UART control; a menu sim-ilar to the example shown in Figure 12 should appear. As a result, commands can now be entered using the console to change the motor’s operation.

AN035404-1015 Page 10 of 27

Page 11: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

11. At the Input Command: prompt, enter the letter A to indicate an alternate-reverse switching pattern. There will be no apparent change in the motor’s operation; how-ever, the signals going to the motor will change and can be displayed as shown in Fig-ures 15 through 20, beginning on page 14.

12. While the motor is running, enter the B character at the HyperTerminal prompt to indi-cate the V0 Zero Only Vector switching pattern, as shown in Figure 13.

Figure 12. GUI Terminal Showing the Alternate-Reverse Switching Pattern

AN035404-1015 Page 11 of 27

Page 12: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

13. While the motor is running, enter the C character at the HyperTerminal prompt to indi-cate the V0, V7 Zero Vector switching pattern, as shown in Figure 14.

Figure 13. GUI Terminal Showing the V0 Zero Vector Only Switching Pattern

AN035404-1015 Page 12 of 27

Page 13: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

14. You can now add your own application software to the main program to experiment with additional functions.

Results

In this application, three oscilloscope probes are connected to the Phase A, Phase B, and Phase C offsets of the MultiMotor Series Development Board to show three different switching patterns. These scope probes were also connected to BEMF voltage dividers to monitor the generated BEMF voltages and, ultimately, to view the associated switching pattern waveforms.

Figure 15 illustrates the alternate-reverse space vector modulation pattern on Phase A, Phase B, and Phase C.

Figure 14. GUI Terminal Showing the "V0, V7 Zero Vector" Switching Pattern

AN035404-1015 Page 13 of 27

Page 14: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Figure 15. Alternate-reverse Space Vector Modulation Pattern

AN035404-1015 Page 14 of 27

Page 15: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Figure 16 illustrates the V0, V7 switching pattern on Phase A, Phase B, and Phase C.

Figure 16. V0, V7 Space Vector Modulation Pattern

AN035404-1015 Page 15 of 27

Page 16: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Figure 17 illustrates the V7 Zero Vector Only switching pattern on Phase A, Phase B, and Phase C.

Figure 17. V7 Zero Vector Only Switching Pattern

AN035404-1015 Page 16 of 27

Page 17: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Figure 18 illustrates the alternate-reverse waveform on Phase A, Phase B, and Phase C.

Figure 18. Alternate-Reverse Waveforms

AN035404-1015 Page 17 of 27

Page 18: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Figure 19 illustrates the V0, V7 Zero Vector Only Waveform on Phase A, Phase B, and Phase C.

Figure 19. V0, V7 Zero Vector Only Waveforms

AN035404-1015 Page 18 of 27

Page 19: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Figure 20 illustrates the V7 Zero Vector Only Waveform on Phase A, Phase B, and Phase C.

Closed-Loop Control PerformanceTo monitor closed-loop speed control performance, the motor speed was set to 2000 RPM at a nominal operating voltage of 24 V. As this operating voltage was increased and decreased by ± 4 V, motor speed was observed to remain constant. To test the PI loop under load, the motor load was increased, which caused the PI loop to quickly ramp up the current to maintain the set speed. The PI loop stability was verified by observing the volt-age sine wave while loading the running motor, a condition for which the sine wave period time must be maintained constant in both amplitude and frequency with no jitter. The closed-loop speed control essentially provides power operation of the motor which remains constant.

Figure 20. V7 Zero Vector Only Waveforms

AN035404-1015 Page 19 of 27

Page 20: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Open-Loop Control PerformanceTo monitor the performance of the speed control function while operating in an open loop, the motor speed was set to 2000 RPM at a nominal operating voltage of 24 V. As this oper-ating voltage was increased or decreased by ± 4 V, motor speed was observed to vary accordingly. The motor load was then increased, which caused the motor current to be increased while its speed dropped.

Summary

The purpose of this application is to demonstrate the operation of a BLDC- or PMSM-type machine using the Space Vector Modulation technique. To generate sinusoidal voltages and currents, a voltage reference vector is rotated 360 degrees within a hexagon. Each of the six sectors within this hexagon creates unique switching patterns for the space vector modulation.

Space vector modulation has the advantage of utilizing about fifteen percent more of the available bus voltage. Formulas discussed in this document have been shown to calculate the space vector modulation timings and resulting motor frequency. Because the fre-quency calculations include the PWM period, all space vector sinusoidal wave construc-tions are executed in the PWM interrupt service routine. The execution time for the sine wave reconstruction in the PWM service interrupt routine is approximately 6 µs. The exe-cution time of the Hall interrupt service routine is approximately 8 µs. Both execution times are based on a 20 MHz external clock.

To maintain synchronization and commutation angle between the reference vector fre-quency and rotor frequency, the Hall interrupt service routine captures the binary Hall state upon each interrupt and fetches the corresponding reference angle from a Look-Up Table (LUT). The High byte of the PWM sine Look-Up Table index is then used to fetch the next value from the Sine Look-Up Table (in which the LUT index is interpolating). Any positive or negative offset value to this high byte of the PWM sine look-up table will accordingly increment or decrement the frequency of rotation of the reference vector.

Space vector modulation has the advantage of commutating a BLDC or PMSM motor with less acoustical and electrical noise, because the sine current through the windings has no steep current transitions. The effects of total harmonic distortions and linear switching power losses can be further manipulated by applying different space vector modulation switching schemes. Such manipulations allow for higher life expectancy of ripple current capacitors and ball bearings because the sinusoidal commutation approach causes virtually no torque or current ripple in a PMSM or BLDC motor. In addition to electrical and acous-tical noise reduction, the PWM sine approach also increases the efficiency of a BLDC-/PMSM-type motor due to its fifteen percent higher bus voltage utilization. The program uses unsigned integer-type variables only, to avoid additional execution times.

The example application and techniques described in this document should prove helpful for anyone who intends to develop motor control applications based on the Z16FMC Series family of microcontrollers.

AN035404-1015 Page 20 of 27

Page 21: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Appendix D. References

Documents associated with the Z16FMC Series of products are listed below. Each of these documents can be obtained from the Zilog website by clicking the link associated with its document number where indicated.

• ZNEO CPU User Manual (UM0188)

• Z16FMC Series Motor Control Product Specification (PS0287)

• MultiMotor Series Development Kit Quick Start Guide (QS0091)

• MultiMotor Series Development Kit User Manual (UM0262)

• MultiMotor Control with Parameter Monitoring Using the Z16FMC MCU Application Note (AN0343)

• 3-Phase Sensorless Brushless DC Motor Control Application Note (AN0353)

• Hall Sensor Sinusoidal PWM Modulation Brushless DC Motor Control Application Note (AN0355)

• 3-Phase Hall-Sensor Brushless DC Motor Control Application Note (AN0356)

• Implementing a Data Logger with Spansion SPI Flash Application Note (AN0360)

The following external documents offer sound fundamentals for understanding motor con-trol concepts.

• Motor Control Electronics Handbook, Richard Valentine; McGraw Hill.

• Short Course on Electric Drives: Understanding Basics to Advanced Control & Encod-er-Less Operation, Ned Mohan, University of Minnesota, 2005: a recording of the In-ternet-based short course presented on May 12, 2005 by Professor Mohan and edited to fit on a DVD.

• Lehrstuhl fuer Electrische Antriebssysteme und Leistungselektronik, Prof. Dr. Ing. Ralph Kennel, Technische Universitaet Muenchen.

• Electric Machinery, Peter F. Ryff.

AN035404-1015 Page 21 of 27

Page 22: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

AN0354 Page 22 of 27

DC Motor with the Z16FMC MCUltiMotor Series Application Note

Appe

ROUTING ALLOWS.

PB3

PH3

PC0

PC1

PH2

CS2-

CS2+

CS1-

CS1+

PC7_PWML0PC6_PWMH0

PD0_PWMH1ANA0 BEMF A

ANA1 BEMF BPD1_PWML1

M ANA4PD2_PWMH2

E

HSB PD4HSC PD5

PD7_PWML2ANA2 BEMF C

HSA PD3

PD6

CSZ+

CSZ-

PC7_PWML0A_LPC6_PWMH0A_H

B_H PD0_PWMH1BEMF_A ANA0

BEMF_B ANA1PD1_PWML1B_L

PD2_PWMH2C_HC_L PD7_PWML2

CS1+BEMF_C ANA2

CS1-CS2+CS2-TEMP

CS2+

CS2-

PC0_T1IN_CINN

PC1_TOUT_COMPOUT

ANA6 CS1+

ANA7 CS1-

CS2+

CS2-

TEMPPH2_ANA10

PH3_ANA11_CPINP

PB3_ANA3_OPOUT

VCC_3v3

R3 0 ohm

J41

J2

HDR/PIN 2x15

1357911131517192123252729 30

28262422201816141210

8642

R5 0 ohm

J51

J61

J81

J13

HDR/PIN 1x16

12345678910111213141516

J111

J91

R4

0 ohm

J101

R6

0 ohm

J3

1

J121

04-1015

Space Vector Modulation of a 3-Phase BLMu

ndix E. Schematic Diagrams

Figures 21 and 22 present the schematic diagrams for the Z16FMC MCU Module.

Figure 21. Space Vector Modulation Schematics, #1 of 4

DBGINTERFACE

-RESET

IF VCC_3v3 is usedremove R8 andinstall R10 = 3.3K

PLACE J3 - J12 WHERE THE

VREF

FAULTY

FAULT0

ONVBUS CTRL

MCU

Do Not Install.

XOUT

PC7_PWML0

PC1_TOUT_COMPOUTDBG

PC6_PWMH0

PB

7_A

NA

7_O

PIN

NA

NA

7

PC0_T1IN_CINN

PB

6_A

NA

6_O

PIN

PA

NA

6P

B5_

AN

A5

AN

A5

PB

3_A

NA

3_O

PO

UT

PH

3_A

NA

11_C

PIN

P

PD2_PWMH2

-RESET

GND

VREF

GND

VR

EF

PB7_ANA7_OPINN CS1-

PD1_PWML1PD0_PWMH1

DBG

GND

AG

ND

PB6_ANA6_OPINP CS1+

PH3_ANA11_CPINP

VREF

PE0PE1PE2

PA

4_R

XD

0P

A5_

TXD

0

PB3_ANA3_OPOUT

PD7_PWML2

-RESET

AN

A0

AN

A1

AN

A4

AN

A2

PD

3P

D4

CS

Z+C

SZ-

PA

1

PD

5

VBUS_

ENABL

PD4HSBPD5HSC

Vbus_MANA4ENABLE

PD3HSA

PE7

PA0

PH

2_A

NA

10TE

MP

SCK

MOSI

VCC_3v3

MISO

SS-

SCK

MO

SI

MIS

OSS-

ENABLEPE7

VCC_3v3

XIN

XINXOUT

PD6

VCC_3v3

VCC_3v3

VCC_3v3

VCC_3v3

VCC_3v3

VCC_5VM

VCC_3v3

PE0PE1PE2

PA4_RXD0

PA5_TXD0

PA0

PA1

R2 10K

C5100PF

R10 3.3K

C14

0.01uF

C24680pF

C11

0.01uF

+

C3 10uF

1 2

Y2

20MHZ

R12 7.87KR115K

13

2R16 10K

C19

0.01uF

J14

6-CKT R/A HOUSING

1 23 45 6

J71

C16

0.01uF

C6 0.1uF

C4 0.01uF

R1

10K

R17 10K

C13

0.01uF

C2722pF

C10

0.01uF

R9 12.4K

C7

1000pF/1nF

R26 10K

C25680pF

J21

1

C2 0.01uF

R14 49.9K

C18

0.01uF

C28

22pF

R80 ohm

C8 12pF

J22

1

U2

S25FL032P

GND4

VCC8

CS1

WP3

SO2

HOLD7

SCK6

SI5

C15

0.01uF

C12

0.01uF

J20

123

SW2B3U-1000P

1 2

Y1

20MHZ

R7 10K

J11

C9

0.01uF

C26680pF

SW1B3U-1000P

1 2

R15 10KR13 1K

LQFP

U1Z16F2810

VS

S2

1

AV

DD

2

PH

0/A

NA

83

PH

1/A

NA

94

PB

0/A

NA

0/T0

IN0

5

PB

1/A

NA

1/T0

IN1

6

PB

4/A

NA

47

PB

5/A

NA

58

PB

6/A

NA

6/O

PIN

P/C

INN

9

PB

7/A

NA

7/O

PIN

N10

PB

3/A

NA

3/O

PO

UT

11

PB

2/A

NA

2/T0

IN2

12

PH

2/A

NA

1013

PH

3/A

NA

11/C

PIN

P14

VR

EF

15

AV

SS

16

PC0/T1IN/T1OUT/CINN17PC1/T1OUT/COMPOUT18DBG19PC6/T2IN/T2OUT/PWM0H20PC7/T2OUT/PWM0L21

PG323

PE725PE626PE527

PD7/PWM2L29PC3/SCK30PD6/CTS131PA7/SDA32

PA

6/S

CL

33P

A5/

TXD

034

PA

4/R

XD

035

PC

4/M

OS

I38

PD

5/TX

D1

39P

D4/

RX

D1

40P

D3/

DE

141

PC

5/M

ISO

42P

F743

PA

3/C

TS0/

FAU

LT0

46P

A2/

DE

0/FA

ULT

Y47

PA

1/T0

OU

T48

PA0/T0IN/T0OUT49

PD2/PWM2H50

PC2/SS51

RESET52

PE454

PE355

PE257

PE158

PE059

PD1/PWM1L61

PD0/PWM1H62

XOUT63

XIN64

VDD222

VDD324

VD

D4

37

VD

D5

44

VDD153

VSS356

VSS160

VSS428

VS

S5

36

VS

S6

45

C17

0.01uF

Page 23: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

AN0354 Page 23 of 27

DC Motor with the Z16FMC MCUltiMotor Series Application Note

STOP/RUN

DIRECTION

VCC_3v3

VC

J16

1 2 3

R22100K

SW3

EG1218

1

32

SW4

EG1218

1

32

R23100K

04-1015

Space Vector Modulation of a 3-Phase BLMu

Figure 22. Space Vector Modulation Schematics, #2 of 4

3.3 OK

VCC_5VVCC_5V

VCC_3v3

VCC_3v3

VCC_5V

VCC_5V

VCC_5VM

C_5VL PE0

PE1

PE2

PA0

PA1

PA4_RXD0PA5_TXD0

R19330

C22

4.7uF

U3

NCP551SN33T1G

Vin1

Enable3

GND2

NC4

Vout5

D4GREEN

21

R20

330

D2

RED

21

J15

1 2 3

R24

100 ohm

C23

0.1uF, 50V

D3

YELL

21

C20

0.1uF

J18HDR/PIN 1x3

1 2 3

R21

330

J19

1x6 RT-ANGL

123456

D1

PMEG3020

32

1

C21

4.7uF

R18

330

R25

100 ohm

J17

HDR/PIN 1x3

123

D5

GREEN

21

Page 24: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

AN0354 Page 24 of 27

DC Motor with the Z16FMC MCUltiMotor Series Application Note

FOR USE WITH AC MOTOR

Phase_C

HSAHSBHSC

Phase_APhase_BPhase_C

GC_L

GC_H

VCC_1

VCC_3v3

ENA

J3

5-POS

12345

C5

0.1uF, 50V

J5

2 POS

12

D4

BAS16V

4

1

3

5

6

2

R13150K

J1

3-POS

123

Q3

IXTY64N055T

1

23

4

R2110K

C110.1uf

Q6

IXTY64N055T

1

23

4

R2310K

R6150K

C8

0.1uF, 50V

04-1015

Space Vector Modulation of a 3-Phase BLMu

Figures 23 and 24 present the schematic diagrams for the MultiMotor Main Board.

Figure 23. Space Vector Modulation Schematics, #3 of 4

J16 SETTINGS:1-2 AC MOTOR2-3 BLDC MOTOR

GA_H

GA_L

Phase_B

Phase_A

GA_H

GA_L

GB_L

GB_H

GC_L

GC_H

Phase_B

A_L

B_H

B_L

C_L

CS1+

CS1-

Vbus_M

Phase_CPhase_BPhase_A

BEMF_A BEMF_B

PD4HSC PD5

Vbus_M ANA4ENABLE PE7

A_LPC7_PWML0A_HPC6_PWMH0

B_HPD0_PWMH1BEMF_A

BEMF_BB_LPD1_PWML1

C_HPD2_PWMH2C_LPD7_PWML2

CS1+BEMF_C

CS1-CS2+CS2-TEMP

HSA PD3

TEMP

GB_L

GB_HA_H

C_H

Phase_A

BEMF_C

PD4HSB

Phase_C

2V

VCC_3v3

VCC_5VM

VCC_3v3

VBUS_B

BLE

C10

0.1uF

R12150K

TR3210K

Q2

IXTY64N055T

1

23

4

J2

HDR/PIN 2x15

1357911131517192123252729 30

28262422201816141210

8642

R1710K

U1

MIC4101YM

VC

C1

HB2

HO3

HS4

HI5

LI6

GN

D7

LO8

D2

BAV19WS

2 1

R9 22.1 ohm

Q7MMBT3904

3

1

2

Q5

IXTY64N055T

1

23

4

C1

0.1uF

R3110K

R2210K

R2910K

D3

BAV19WS

2 1

R8150K

R1022.1 ohm

R2 22.1 ohm

R15 10K

C4

0.1uF

R26150K

R4150K

R7 2.2 ohm

+ C3220uF, 50V

R24150K

R28100 ohm

C9

0.1uF

R5150K

R2710K

C120.1uf

U3

MIC4101YM

VC

C1

HB2

HO3

HS4

HI5

LI6

GN

D7

LO8

Q1

IXTY64N055T

1

23

4

C2

0.1uF

R16 22.1 ohm

R3010K

J4

1 2 3

C7

0.1uF, 50V

R180.100 ohm, 2W

R14 2.2 ohm

R322.1 ohm

C6

0.1uF

R11150K

Q4

IXTY64N055T

1

23

4

U2

MIC4101YM

VC

C1

HB2

HO3

HS4

HI5

LI6

GN

D7

LO8

R1922.1 ohm R20 10K

R25150K

J6

12

SH1

shunt

R1 2.2 ohm

D1

BAV19WS

2 1

Page 25: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

AN0354 Page 25 of 27

DC Motor with the Z16FMC MCUltiMotor Series Application Note

5V

SH1-2-

USE HEATSINK

VCC_5VM

VBUS_B

C17

0.1uF

O-220

U5

MIC29150-5

OUT3

GN

D2

IN

+ C1510uF

12

J12

123

12V

3

04-1015

Space Vector Modulation of a 3-Phase BLMu

Figure 24. Space Vector Modulation Schematics, #4 of 4

24VDC

GND

GND

12V

EXTERNAL VBUSUP TO 48VDC

holderUNT POSITION2 EXTERNAL VBUS3 INTERNAL VBUS

NEED to change C25 to 50V Tantalum

50V

VBUS

VCC_24VVCC_12V

VCC_12V

VBUS

ENABLE

D51N4007-T

21

HS2

T

11

22

33

J13

123

J8

123

1

+ C1410uF

12

+ C1310uF

12

J11

123

SH2

shunt

R33

2K

F1

FUSE/250V/2A

U4

MIC29150-12

OUT3

GN

D2

IN1

J10

123

J7

2 POS

12

FH1

250V/5x20

1 2

Q8MMBT3904

3

1

2

P1

PJ-003A

1

23

RL1

JS1A-

1

52

D6BAS16

13

2

J14

123

HS1

TO-220

11

22

33

C16

0.1uF

J9

HDR/PIN 1x3

123

Page 26: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Appendix F. Flow Charts

Figure 25 presents the typical flow of the space vector control routine.

Figure 25. Space Vector Modulation Flow

AN035404-1015 Page 26 of 27

Page 27: Application Note: Space Vector Modulation of a 3-Phase ...s.eeweb.com/articles/2016/01/19/Space-Vector-Modulation-of-a-3... · AN035404-1015 Page 3 of 27. Space Vector Modulation

Space Vector Modulation of a 3-Phase BLDC Motor with the Z16FMC MCUMultiMotor Series Application Note

Customer Support

To share comments, get your technical questions answered, or report issues you may be experiencing with our products, please visit Zilog’s Technical Support page at http://support.zilog.com.

To learn more about this product, find additional documentation, or to discover other fac-ets about Zilog product offerings, please visit the Zilog Knowledge Base at http://zilog.com/kb or consider participating in the Zilog Forum at http://zilog.com/forum.

This publication is subject to replacement by a later edition. To determine whether a later edition exists, please visit the Zilog website at http://www.zilog.com.

DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS.

LIFE SUPPORT POLICY

ZILOG’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS PRIOR WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL COUNSEL OF ZILOG CORPORATION.

As used herein

Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b) support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling can be reasonably expected to result in a significant injury to the user. A critical component is any component in a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness.

Document Disclaimer

©2015 Zilog, Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. ZILOG, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. ZILOG ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL PROPERTY INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The information contained within this document has been verified according to the general principles of electrical and mechanical engineering.

ZNEO and Z16FMC are trademarks or registered trademarks of Zilog, Inc. All other product or service names are the property of their respective owners.

Warning:

AN035404-1015 Page 27 of 27