You are on page 1of 28

Application Note

Space Vector Modulation of a 3-


Phase AC Induction Motor with the
MultiMotor Z16FMC ZNEO Microcontroller
Series AN037602-0116

Abstract
Space Vector Modulation (SVM) techniques can be applied to AC induction motors
(ACIM), permanent magnet synchronous motors, and BLDC motors. A 3-phase ACIM is
controlled by creating a rotating voltage reference vector within a hexagon. The speed of
rotation of this voltage reference vector determines the frequency of motor rotation. The
Space Vector Modulation application discussed in this application note uses the Voltage
per Hertz (V/F) control principle with or without a Hall sensor functioning as a tachometer
for speed feedback to control an ACIM motor.
Continual cost pressures and increased consumer expectations have driven design engi-
neers 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 an efficient and cost-conscious V/F vector modulation of an AC induction
motor.

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

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 multi-phase variable-speed motors. Target applications include con-
sumer appliances, HVAC systems, factory automation, refrigeration, and automotive
applications.
To rotate a 3-phase motor, three AC voltage signals must be supplied and phase-shifted
120° from each other. 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 insertion and fault protection trip input. These features provide multiphase con-
trol capability for multiple motor types and ensure that the motor operates safely by effect-
ing an immediate shutdown of the PWM during a fault condition.

AN037602-0116 Page 1 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor 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 ACIM motor, the stator is
laced with three sets of inductor windings energized by three AC voltage inputs that are
phase-offset 120° from each other to produce a rotating field of magnetic flux. This stator
flux field induces a voltage onto the rotor which also generates a rotor flux field which
then interacts with the stator 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 consisting of six switching devices. This inverter bridge forms three legs,
each operating in complementary PWM. Each leg or MOSFET pair connects to either the
ground voltage or the bus voltage depending on the ON/OFF state of the MOSFETS,
which are controlled by the PWM signals from the ZNEO microcontroller. The microcon-
troller applies sinusoidal changing PWM signals to this inverter bridge to generate three
approximately-sinusoidal AC waveforms on the bridge outputs to which the ACIM motor
is connected, with the required 120° phase offset.
The duty cycle of each microcontroller’s 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
When a constant ratio of applied frequency and voltage is maintained, a constant flux
throughout a wide operating range is created in the air gap between the rotor and the sta-
tor. This control method is referred to as Voltage per Frequency, or V/F control.
In this application, using the V/F method, space vector modulation is the means by which
a rotating magnetic field is created in the stator, and via induction, ultimately in the rotor.
Space vector modulation techniques utilize an additional fifteen percent of the available
bus voltage, thereby increasing the efficiency of the motor. The space vector modulation
scheme applied here is referred to as alternate-reverse switching. This technique mini-
mizes inverter switching and therefore, linear switching power losses. Intrinsic to ACIM
motors is the slip frequency, which is the difference between the synchronous speed of the
stator and rotor flux fields. This slip frequency must be controlled with a V/F profiler as
discussed later in this document.
Using ordinary sinusoidal PWM techniques, the neutral point of the phase voltages are
confined to Vbus/2, as shown in Figure 1.

Figure 1. Neutral Point Confinement of Sinusoidal PWM Phase Voltages

AN037602-0116 Page 2 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

The advantage of space vector modulation is that the neutral point of the phase voltages is
not constrained to one-half of the bus voltage, as illustrated in Figure 2.

Figure 2. Space Vector Modulated Phase Voltages not Confined to a Neutral Point

Additionally, unlike sinusoidal PWM, which generates sinusoidal currents separately in


each push/pull stage of the inverter, the Volt per Hertz (V/F) space vector modulation
technique operates the entire inverter as a single unit to produce sinusoidal currents. In
doing so, the inverter is operated in eight different states within the hexagon. Two of these
states are referred to as zero vectors because they produce no voltages. The remaining six
states produce non-zero voltages. The rotating reference voltage VS within this hexagon,
shown in Figure 3, is represented by a space vector VS in Equation 1, which follows.

V3 (010) V2 (110)
120 degree 60 degree

Vs
r2
V4 (011) Θ V1 (100)
180 degree V0 (000) r1 0 degree
V7 (111)

V5 (001) V6 (101)
240 degree 300 degree

Figure 3. The Rotating Reference Vector VREF Within The Hexagon

Equation 1
Vmag jθ
V S = ---------------- × e
Vbus

AN037602-0116 Page 3 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

The ejθ part of Equation 1 can be represented by Euler’s identity in Equation 2, which
states that the VS vector is comprised of a real component and an imaginary component.

Equation 2

e = cos ( θ ) + j sin ( θ )

This VS vector is formed, as shown in Equation 3, in which sinusoidal voltage changes


present at each motor phase winding produce sinusoidal currents in each phase to generate
magnetic flux fields, as shown in Equation 4.

Equation 3
j0 j120 j240
VS( t ) = Va × ( t ) × e + Vb × ( t ) × e + Vc( t ) × e

Equation 4
NS × μ0
-  ia ( t ) × e + ib ( t ) × e
j0 j120 j240
B S ( t ) = -------------------- + ic ( t ) × e
2 × Lg  

In Equation 4, NS is the number of inductor turns, μ0 is the permeability of space, and Lg is


the air gap.
The reference vector VS must be converted to the appropriate switching signals and
applied to the inverter bridge using Equation 5.

Equation 5

V S = ( r1 × v1 ) + ( r2 × v2 )

As indicated in Equation 5, to generate this rotating vector VS, the angular position within
any two base vectors, the base vectors themselves, and the scalar coefficients r1 and r2
must be known, as shown in Figure 3.
After learning the angle theta 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 to generate the rotating voltage reference vector VS
within the hexagon. This space vector can be located anywhere between any of the base
vectors V1 to V6. This commutation scheme is different from the six-step commutation
scheme which has six distinct commutation steps per electrical revolution.
Figure 4 shows the location of the reference vector VS, which is located between base vec-
tors V1 and V2.

AN037602-0116 Page 4 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

V2

60 degree
Vs

r2V2

Θ
V1
r1V1
Figure 4. The Location of Reference Vector VS Between Base Vectors V1 and V2

After the angular information is obtained, the scalar quantities r1 and r2 are calculated by
equations 6 and 7.

Equation 6

r2 = m 3 × sin ( Δθ )

Equation 7

r1 = m 3 × sin ( 60 – Δθ )

In the above equations, m is the magnitude of the rotating space vector VS within the hexa-
gon and θ is the angle of the reference vector VS with respect to the base vectors V1 and
V2.
The time duration for which the adjacent base vectors are modulated to obtain the refer-
ence vector is calculated by using equations 1, 2, and 3 to compute equations 8 through 10.

Equation 8

T0 = ( 1 – r1 – r2 ) × T

Equation 9

T1 = r1 × T

AN037602-0116 Page 5 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Equation 10

T2 = r2 × T

In these 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 vec-
tors are applied in combination with T1 and T2, as shown in Figure 5.

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

To find the time values T0, T1, and T2, the angles are determined by using V1 as the refer-
ence axis going counterclockwise to find the base vector angle to be subtracted from the
angle of the reference vector.
For example, using Equation 1, if the bus voltage is 24 V and the desired reference vector
magnitude is 12 V, then the reference vector VS is calculated using Equation 11.

Equation 11
V mag j190
V S = --------------- × e
V bus

In Equation 11, the angle is 190° and the adjacent base vector is V4, which is 180°. There-
fore, r1 and r2 are calculated by using equations 6, 7, and 8 to compute equations 12 and
13.

Equation 12
12
r1 = 3 × ------ × sin [ 60 – ( 190 – 180 ) ] = 0.663
24

Equation 13
12
r2 = 3 × ------ × sin ( 190 – 180 ) = 0.15
24

If the PWM period is T = 50 μs, then the time duration for either zero vector V0, V7 is
shown in equations 14 through 16.

AN037602-0116 Page 6 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Equation 14

T0 = ( 1 – r1 + r2 ) × T = 9.3μs

The time duration for T1 is calculated using Equation 15.

Equation 15

T2 = r1 × T = 33.2μs

The time duration for T2 is obtained from Equation 16.

Equation 16

T2 = r2 × T = 7.5μs

Space vector modulation has an advantage over ordinary sinusoidal modulation because it
allows for different switching combinations. For example, using T1 and T2 based on the
choice of the null vectors which are applied for duration of time T0 and applying the zero
vectors V0, V7, or both, results in different switching patterns to generate either less total
harmonic distortion or to reduce linear switching power losses in the switching devices.
V0, V7 zero vectors may be used to obtain the regenerative braking effect, especially when
using ACIM.
For example, to reduce linear switching losses, either of the V0 or V7 zero vectors can be
applied in sequence. V0 is applied as the zero vector in the sequence T1–T2–T0; the V7
zero vector is used in the same sequence. In either case, each of the three phases in the
inverter does not switch for one third of the duration of a cycle.
Different combinations of switching sequences can be applied, but may have different,
and perhaps undesirable effects on the inverter circuit, depending on the size of the boot-
strap capacitors used for the high- and low-side drivers. However, space vector modula-
tion allows for a variety of switching schemes to obtain the desirable effect and meet
customer-specific requirements. This application note uses the alternate reverse switching
mode, in which each column corresponds to vectors one through six, as shown in Figure 6.

Figure 6. Example of PWM Timings Using an Alternate-Reverse Switching Mode

In the reverse switching mode, only one inverter leg at a time switches to reduce linear
power-switching losses. The null vectors are alternated upon each space vector modula-
tion sequence in reversed order after each zero vector, as shown in Figure 7.

AN037602-0116 Page 7 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Figure 7. space Vector Modulation Sequence

Application
To apply the space vector theory, the Z16FMC microcontroller’s PWM module is config-
ured to operate in three complementary output pairs. Each output pair controls one com-
plementary 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 pro-
duces 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 input to the space vector modulation software function
is the angle and the magnitude.
The period of each PWM cycle is configured to be 50 μs and generates an interrupt request
at the end of each cycle to process the speed integration to form the angle, the vector
decomposition based on the angle, and the space vector modulation voltages based on the
magnitude. This data is then loaded into the three PWM registers for Phase A, Phase B,
and Phase C.
The simplest way to control an ACIM is via the V/F method without any sensing feedback
of the rotor. The speed demand comes from a potentiometer to calculate the frequency
demand with a constant proportional frequency to voltage ratio. However, if the Hall sens-
ing feedback option is desired, then a single Hall sensor is used as a tachometer to deter-
mine the speed of the motor. Additionally, the motor can be operated in either open loop
or PI closed loop control. With the PI closed loop method, the Timer 0 ticks are captured
at every rising edge of the Hall and compared to the requested speed received through a
UART terminal or potentiometer, when in Standalone Mode. The frequency of the rotat-
ing vector is calculated as shown in Equation 17.

Equation 17
Look-Up Table offset
Frequency = -------------------------------------------------------------------------------------------
PWM period × Look-UpTable size

In the above equation, the Look-Up Table (LUT) offset value is a 16-bit integer index of
which only the upper byte is used to select the LUT entries. The synchronous speed of the
rotor is calculated as shown in Equation 18.

Equation 18
Frequency
RPM = 120 × -------------------------------
Poles

The Timer 0 ticks captured for the PI loop are calculated as shown in Equation 19.

AN037602-0116 Page 8 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Equation 19
MCU clock
------------------------------------------------
Timer0 prescaler
TimerTicks = ----------------------------------------------------------------
LUToffset
----------------------------------------------------------------
PWM period × LUTsize

To change the frequency of the motor, the upper byte of a 16-bit interpolating sine table
index is used to fetch the next PWM sine value from the LUT. Assuming the sine fre-
quency is 60 Hz, the offset value for the sine table pointer is calculated as shown in Equa-
tion 20.

Equation 20
60 × 65536
SineIndexOffset = ----------------------------- = 196
20000

In the above equation, 20000 is the PWM frequency.


The (rounded) offset value represents the frequency demand, which is integrated to form
the (theta) angle of the rotor. The upper byte of the theta value then becomes the index to
the 256 sine value table.
Depending on the frequency demand, the values of the upper byte of the sine index can
change with higher granularity, hitting each sine array value more or fewer times while the
sine index continuously rolls over. Using this method, the lowest period using a16-bit
pointer to a 256-element sine table is represented by Equation 21.

Equation 21
65535 × 50μs = 3.277 sec onds

Because of the interpolating index method, the increment values in the upper byte of the
sine table index will be small, changing only in fractions to achieve higher frequencies.

Speed Calculations
The angular time periods of the rotor are represented by elapsed timer ticks and are cap-
tured upon each rising edge of the Hall interrupt as described in the previous section.
These timer ticks are then compared with the demand speed coming from a potentiometer
in Standalone Mode, or from the UART when in Terminal Mode. The captured timer ticks
period represents the actual speed of the motor and is compared with the demand value for
closed-loop operation.
The angular speed is represented by Equation 22.

Equation 22
d
ω = ----- × θ
dt

AN037602-0116 Page 9 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

In the above equation, θ is 2 × π × f


The RPM of the motor in this application is calculated using Equation 23.

Equation 23
120 × F
RPM = -------------------
N

In the above equation, N is the number of poles and F is the frequency. By substitution,
use Equation 24 to obtain the RPM.

Equation 24
tableIndexValue
120 × -----------------------------------------------------------------------------------
PWMperiod × SineTableSize
RPM = ----------------------------------------------------------------------------------------------------
N

Voltage per Hertz Control


As shown in Figure 8, the base frequency is at the maximum flux field with the speed at
full armature current and voltage.

Figure 8. Voltage Per Hertz Control

The software algorithm ensures that the ratio of voltage and frequency remains constant
over the full speed range to maintain a constant flux field in the air gap of the motor. A
boost voltage, or minimum voltage and frequency limit, is implemented to avoid high cur-
rents through the motor windings at very low speeds in which the complex reactance of
the motor windings is very low. In this application note, the total reactance of the motor is
represented by Equation 25.

AN037602-0116 Page 10 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Equation 25

2 2
Z = R + (X – X )
L C

In the above equation, R is the real resistance and XL and XC are the inductor reactance
and capacitive reactance, respectively.

V/F Profiler and Slip Frequency


Slip frequency is intrinsic to AC induction motors. In an AC induction motor, the stator
flux field is rotating at synchronous speed according to the sinusoidal frequencies of the
currents that produce this stator flux field. The resulting induced flux field in the rotor
interacts with the stator flux field and causes a torque to rotate the motor at the synchro-
nous speed minus a frequency that is referred to as slip frequency. In effect, the rotor fre-
quency is always less than the stator field frequency, which is necessary because only an
alternating current field can induce a voltage in the rotor. If the rotor frequency and stator
frequency were the same (from the perspective of either stator or rotor), there is no alter-
nating field and therefore no voltage is induced to cause a torque from the interacting rotor
and stator force field. This electromagnetic behavior is depicted in Equation 26.

Equation 26
d
V S = L S × ----- × I S
dt

In the above equation, the subscript S refers to the stator. This equation states that the rate
of change of current through an inductor induces a voltage. This alternating stator voltage
induces a voltage onto the rotor to cause an alternating current in the rotor, with a resulting
rotating flux field in the rotor.
The interaction of rotor and stator flux fields must be controlled with a V/F profiler. If the
Hall sensor option with closed loop feedback is enabled in the firmware, it is possible that
the closed loop will adjust the stator frequency faster than the rotor frequency can respond,
so that the stator frequency will run off, causing the slip frequency to become too large
and subsequently stall the motor. Additionally, if the rate of deceleration is too high, the
slip frequency becomes too large while the potentially damaging excessive Back-Electro-
motive Force (BEMF) voltage is fed back to the supply, unless the generated BEMF volt-
age is desired during deceleration for regenerative braking or battery-charging purposes.
To control the slip frequency and its associated effects, a V/F profiler is implemented to
control the rate of frequency changes.
If the option to operate the ACIM with Hall sensing feedback and no closed loop speed
control is enabled, the slip frequency is dynamically calculated and optimized, based on
the rotor frequency information which is provided by the Hall sensor.

Note: The ACIM motor used for this application is a BOSCH 250 V, 2 A motor (500 W) shown in
Figure 10 on page 14. However, for development purposes with Zilog’s MultiMotor Con-
trol Development Kit, this software was designed to operate the motor at 30 V. Therefore,

AN037602-0116 Page 11 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

the V/F profiler may require adjusting for acceleration and deceleration rates when operat-
ing a customer ACIM at higher voltages.

Equipment Used
The following equipment is used for the setup to demonstrate the V/F space vector modu-
lation technique. The first four items are contained 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
• BOSCH ACIM 2A/250V
• 30V AC/DC external power supply
• Yokogawa DL9140L and Tektronix DPO 2014B digital oscilloscopes

Hardware Setup
Figure 9 shows the application hardware connections required to operate the motor with
the space vector modulation method.

AN037602-0116 Page 12 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Figure 9. MultiMotor Demo Kit and Linix BLDC Motor

Figure 10 displays the BOSCH AC induction motor used for the development of the code
for this application note.

AN037602-0116 Page 13 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Figure 10. BOSCH AC Induction Motor

Testing Procedure
Observe the following procedure to test the 3-phase Sensorless BLDC Motor Control
demo program on the Z16FMC MultiMotor MCU Module.
1. Install the ZDSII–ZNEO version 5.0.1 (or newer) software on your PC.
2. Connect the Opto-Isolated USB SmartCable to the PC.
– To install the driver of the Opto-Isolated USB SmartCable, refer to the Opto-
Isolated USB Smart Cable User Manual (UM0195).
3. Connect the hardware as shown in Figure 9. To learn more, refer to the MultiMotor
Series Development Kit Quick Start Guide (QS0091); however, disregard instructions
regarding the BLDC motor connection.
4. Instead of connecting the included BLDC motor as shown in Figure 9, connect your
ACIM motor phase wires to terminal J1 and the tachometer wires to J5. Then set
jumper J4 to AC, as shown in Figure 11.

AN037602-0116 Page 14 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

J4 J5 J1

Figure 11. Motor Phase Wire Connections

Note: The order of the phase wire connectivity affects the spin direction of the motor but is oth-
erwise irrelevant. The 24 V power supply that is included in the kit may not suffice.

5. Power up the MultiMotor Series Development Board by connecting the 24 V DC


adapter included in the kit to P1 on the Development Board.
6. Open the AN0376-SC01 project in ZDS II for ZNEO.
7. Download the code to the Z16FMC MultiMotor MCU Module.
8. In ZDS II, stop the Debug Mode. Unplug the power supply from the MultiMotor
Series Development Board, then disconnect the Opto-Isolated USB SmartCable.
9. Ensure that the RUN/STOP switch on the MultiMotor MCU Module is in the STOP
position.
10. Set Jumper J9 to the EXT position.
11. Reconnect the 24 V DC adapter to connector P1on the Development Board. This will
provide power to the control circuits.
12. Connect a 30 V supply source to the MultiMotor Series Development Board at J7 with
ground (GND) and VDD (EXT) respectively. This will provide power to VBus.

AN037602-0116 Page 15 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

13. Set the RUN/STOP switch on the MultiMotor MCU Module to RUN.
14. Set the direction of the rotation of the motor by changing the position of the direction
switch on the MultiMotor Series Development Board.
15. Connect Zilog’s Opto-Isolated UART-to-USB cable from J19 to the PC’s USB port.
16. Open any terminal emulation software program such as RealTerm or HyperTerminal
and select the USB port for communications to start the terminal mode. Figure 12
shows the console display in Hardware Control Mode.

Figure 12. Console Display in Hardware Control Mode

17. On the open terminal window, enter the letter U on your keyboard to enter UART
Control Mode to control the motor by entering commands on the computer keyboard.
Figure 13 shows the console display in UART Control Mode.

AN037602-0116 Page 16 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Figure 13. Console Display in UART Control Mode

18. In the window that appears, enter the letter S to start the motor operation, and enter
any of the available operation options.
19. A data logger is used to report vital motor control data, as shown in Figure 13. The
data displayed includes:
– Operating temperature
– Speed
– Operating current
– Total run time
– Spin direction
20. Upon entering D, recorded data is displayed in a continuous fashion. To stop this data
display from continuing, enter a Ctrl + C command, as shown in Figure 14.

AN037602-0116 Page 17 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Figure 14. Enter a Ctrl + C Command to Stop the Display of Recorded Data

You can now add your application software to the main program to experiment with addi-
tional functions.

Results
Three oscilloscope probes were connected to the MultiMotor Series Development Kit to
Phase A, Phase B, and Phase C to show three alternate reverse switching patterns. Scope
probes were connected to the BEMF voltage dividers to monitor the generated BEMF
voltages and to view the associated switching pattern waveforms.
Figures 15 through 17 show the alternate-reverse space vector modulation pattern on
Phase A, Phase B, and Phase C at three different time instances.

AN037602-0116 Page 18 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Figure 15. Alternate Switching Pattern at Time 1

Figure 16. Alternate Switching Pattern at Time 2

AN037602-0116 Page 19 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Figure 17. Alternate Switching Pattern at Time 3

Figure 18 shows the three phase voltages and one of the three current wave forms (shown
in green).

Figure 18. Three Phase Voltages and One Current Wave Form (Green)

Alternate-reverse voltage wave forms have been measured with the oscilloscope at the
BEMF voltage dividers consisting of R24, R29, C30 (BEMF_A), R25, R30, C31
(BEMF_B), and R26, R31, C32 (BEMF_C).

Code Execution Time of Relevant Functions


The time required for code execution of relevant functions is listed in this section. Execu-
tion times are based on the external 20 MHz clock frequency.
PWM interrupt service code: 6.5 µs

AN037602-0116 Page 20 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Tachometer interrupt service: 6 µs


SVM decomposition function call (SVM timing calculations): 2.5µs

Compiler Optimization Settings


Ensure that the following Compiler Optimization options are set:
• Limit optimizations for easier debugging box is not checked.
• Use register variables box is checked
• Generate printfs inline box is checked
• Default type of char is Unsigned

Code Size
The rounded-down code size is:
• Flash: 6 K of 128 K
• RAM: 2 K out of 4 K

Summary
The purpose of this application note is to demonstrate the operation of an ACIM-type
machine using the Space Vector Modulation technique with the Voltage per Hertz (V/F)
principle. To obtain a constant flux in the air gap, the ratio of voltage and frequency is held
constant throughout the speed range of the motor. To generate sinusoidal voltages and cur-
rents, a voltage reference vector is rotated 360° within a hexagon. Each of the six sectors
within this hexagon creates unique switching patterns for space vector modulation. Space
vector modulation has the advantage of utilizing about fifteen percent more of the avail-
able bus voltage and the freedom to implement multiple forms of SVM switching patterns
to meet design-specific requirements. The space vector modulation scheme discussed here
uses an alternate-reverse switching pattern.
Formulas are shown to calculate the space vector modulation timings and resulting motor
frequency. Because the frequency calculations include the PWM period, all space vector
sinusoidal wave constructions are executed in the PWM interrupt service routine. The exe-
cution time for the sine wave reconstruction in the PWM interrupt service routine is
approximately 6.5 μs. The execution time of the tachometer interrupt service routine is
approximately 6 μs. Both of these execution times are based on a 20 MHz external clock.
The tachometer interrupt service routine captures the Timer 0 ticks upon each rising edge
interrupt of the Hall for open- and closed-loop speed calculations. The calculated speed
value from the timer ticks is integrated in the PWM interrupt service routine to form the
interpolating 16-bit theta angle variable, of which only the high byte is used to fetch the
next value from the sine LUT.
In essence, all speed calculation values are offset to the interpolating 16-bit sine LUT
index. Depending on the demand speed, these values will increase or decrease the fre-
quency of rotation of the reference vector. Space vector modulation has the advantage of

AN037602-0116 Page 21 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

commutating the ACIM with less acoustical and electrical noise and, depending on the
switching scheme, fewer linear power switching losses. The effects of total harmonic dis-
tortions and linear switching power losses can be further manipulated by applying differ-
ent space vector modulation switching schemes. This technique allows for higher life
expectancy of ripple current capacitors and ball bearings because the sinusoidal commuta-
tion approach causes virtually no torque or current ripple in an ACIM motor.
A simple V/F profiler and slip frequency is also discussed, and a V/F profiler is imple-
mented to account for the rates of frequency increase and decrease to control the slip fre-
quency.
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 of microcontrollers.

References
To learn more about this topic and the Z16FMC Series of motor control products, refer to
the documents listed in Table 1.

Table 1. List of References

Topic Document
ZNEO CPU ZNEO CPU User Manual (UM0188)
Z16FMC MCU Z16FMC Series Motor Control Product Specification (PS0287)
Motor Control Motor Control Electronics Handbook; Richard Valentine, McGraw Hill
Short Course on Electric Drives: Understanding Basics to Advanced
Control & Encoderless Operation: a recording of the Internet-based short
course presented on May 12, 2005 by Professor Mohan and edited to fit
on a DVD; Ned Mohan, University of Minnesota, 2005.
Lehrstuhl fuer Elektrische Antriebssysteme und Leistungselectronik;
Ralph Kennel, Technische Universitaet Muenchen.
Electric Machinery; Peter F. Ryff.

AN037602-0116 Page 22 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Appendix A. Schematic Diagrams


Figures 19 and 20 show the schematic diagrams for the Z16FMC MCU Module.

PA1

MOSI
MISO
J1

PD3
PD4
PD5
FAULT0 1 PA4_RXD0

PA1

PA4_RXD0
PA5_TXD0

PA5_TXD0
J21
VCC_3v3 R2 10K J2
1 A_L PC7_PWML0
1 2 A_H PC6_PWMH0
FAULTY R1 3 4 BEMF_A ANA0
1 2 VCC_5VM 5 6 B_H PD0_PWMH1
7 8 B_L PD1_PWML1
SW1 U1 C26 C25 C24 9 10 BEMF_B ANA1

48
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
B3U-1000P 10K Z16F2810 ANA4 Vbus_M 11 12 C_H PD2_PWMH2
680pF 680pF 680pF 13 14
ENABLE C_L PD7_PWML2

PA3/CTS0/FAULT0

PD3/DE1
PD4/RXD1
PD5/TXD1

PA4/RXD0
VSS6
VDD5
PF7

VDD4
VSS5

PA5/TXD0
PA6/SCL
PA1/T0OUT

PC4/MOSI
PC5/MISO
PA2/DE0/FAULTY
15 16 BEMF_C ANA2
J22 HSA PD3 17 18 CS1+
HSB PD4 19 20 CS1-
1 HSC PD5 21 22 CS2+
PA0 49 32 23 24 CS2- VCC_3v3
PA0 PA0/T0IN/T0OUT PA7/SDA 25 26
PD2_PWMH2 50 31 PD6 TEMP
SS- 51 PD2/PWM2H PD6/CTS1 30 SCK 27 28
-RESET 52 PC2/SS PC3/SCK 29 PD7_PWML2 29 30
53 RESET PD7/PWM2L 28 GND HDR/PIN 2x15
54 VDD1 VSS4 27
55 PE4 PE5 26 VCC_3v3
PE3 PE6 R3 R4
GND 56 25 PE7 0 ohm
PE2 57 VSS3 PE7 24 CSZ+ CS2+
PE2 PE1 58 PE2 VDD3 23 U2 VCC_3v3
PE1 PE1 LQFP PG3
PE0 59 22 SS- 1 8 0 ohm
PE0 60 PE0 VDD2 21 PC7_PWML0 CS VCC R6
VSS1 PC7/T2OUT/PWM0L
PB6/ANA6/OPINP/CINN

PD1_PWML1 61 20 PC6_PWMH0 MISO 2 7 CSZ- R5 0 ohm CS2-


PD0_PWMH1 62 PD1/PWM1L PC6/T2IN/T2OUT/PWM0H 19 DBG SO HOLD
PD0/PWM1H DBG
PH3/ANA11/CPINP
PB3/ANA3/OPOUT

XOUT 63 18 PC1_TOUT_COMPOUT VCC_3v3 3 6 SCK 0 ohm


PB7/ANA7/OPINN

XOUT PC1/T1OUT/COMPOUT WP SCK


PB0/ANA0/T0IN0
PB1/ANA1/T0IN1

PB2/ANA2/T0IN2

XIN 64 17 PC0_T1IN_CINN
XIN PC0/T1IN/T1OUT/CINN 4 5 MOSI
GND SI
PH2/ANA10
PH0/ANA8
PH1/ANA9

PB4/ANA4
PB5/ANA5

J3
Y1 S25FL032P
ANA6 CS1+
AVDD

AVSS
VREF

CS1+
VSS2

1
20MHZ ANA7 CS1- J4
1 CS1-
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

CS2+ J5
1 CS2+
CS2- J6
VREF J7 1 CS2-
TEMP
ANA5
ANA6
ANA7

1 VREF PH2_ANA10 TEMP J8


J20 R26 10K 1
Y2 PH2
VREF
PH3_ANA11_CPINP

XOUT XIN ON VCC_3v3 PC1_TOUT_COMPOUT J9


1 ENABLE 1 PC1
VBUS CTRL
CSZ+

2
PB3_ANA3_OPOUT
CSZ-

PH2_ANA10

20MHZ PE7 PC0_T1IN_CINN J10


PB7_ANA7_OPINN
PB6_ANA6_OPINP

MCU
AGND
ANA0
ANA1
ANA4

ANA2

C28 3 1 PC0
C27 PH3_ANA11_CPINP J11
22pF 22pF C2 0.01uF PLACE J3 - J12 WHERE THE ROUTING ALLOWS. 1 PH3
PB5_ANA5

PB3_ANA3_OPOUT J12
1 PB3
R7 10K
1 2
+

VCC_3v3 PB6_ANA6_OPINP CS1+ VREF


J13
Do Not Install.
C4 0.01uF C3 10uF 100PF C5 PC7_PWML0
PC6_PWMH0 1
ANA0 BEMF A 2
R8 PD0_PWMH1 3
R9 12.4K PD1_PWML1 4
IF VCC_3v3 is used 0 ohm 5
remove R8 and PH3_ANA11_CPINP ANA1 BEMF B
install R10 = 3.3K R10 3.3K VBUS_M ANA4 6
C6 0.1uF PD2_PWMH2 7
ENABLE 8
9
3

PD7_PWML2
R11 R12 7.87K ANA2 BEMF C 10
R13 1K HSA PD3 11
5K 12
VCC_3v3 2 R14 49.9K R15 10K HSB PD4
R16 10K PB3_ANA3_OPOUT HSC PD5 13
PD6 14
C7 C8 12pF 15
16
1

R17 10K
1000pF/1nF PB7_ANA7_OPINN CS1- HDR/PIN 1x16
-RESET
VCC_3v3
DBG
J14 INTERFACE
1 2 1 2 C9 C10 C11 C12 C13 C14 C15 C16 C17 C18 C19
3 4 DBG
5 6 SW2 0.01uF 0.01uF 0.01uF 0.01uF 0.01uF 0.01uF 0.01uF 0.01uF 0.01uF 0.01uF 0.01uF
B3U-1000P GND
6-CKT R/A HOUSING
-RESET

Figure 19. Z16FMC MultiMotor MCU Module, #1 of 2

AN037602-0116 Page 23 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

J15

1
2
3
VCC_5V
J16 VCC_5V
VCC_5VM C21
C20
4.7uF
1
2
3

0.1uF VCC_3v3
R18
VCC_3v3 D2
VCC_5VL D1 J17 1 2
U3 PE0
1
3 1 5 VCC_3v3 1
RED
2 Vin Vout 2 330
3 R20
2 D3
PMEG3020 GND C22 R19 1 2
PE1
3 4 330 HDR/PIN 1x3
Enable NC C23 4.7uF YELL
330
NCP551SN33T1G
0.1uF, 50V
R21

2
D5
D4 1 2
PE2
GREEN
GREEN
330
3.3 OK R22 R23
1
100K 100K
SW3
R24 DIRECTION
1
2
PA0
3
1
2
3

HDR/PIN 1x3 100 ohm EG1218


J18
SW4
R25
VCC_5V 1
J19 2
PA1
3
1
2 100 ohm EG1218
3
PA4_RXD0 4
PA5_TXD0 5
6 STOP/RUN
1x6 RT-ANGL

Figure 20. Z16FMC MultiMotor MCU Module, #2 of 2

AN037602-0116 Page 24 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Figures 21 and 22 show the schematic diagrams for the MultiMotor Development Board.

VBUS_B
VCC_12V D1

2 1

C1 BAV19WS R1 2.2 ohm

2
4

2
4

2
4
C2 Q1 Q2 Q3
0.1uF U1
1 8 GA_H 0.1uF GA_H 1 GB_H 1 GC_H 1
VCC VBOOT
A_H 2 7 R2 22.1 ohm
IN_HI DRV_HI R6
IXTY64N055T IXTY64N055T IXTY64N055T

3
A_L 3 6 1 2 Phase_A R4 R5 150K
IN_LO BRIDGE 150K 150K
4 5 R34 10 ohm
GND DRV_LO
NCP5106B GA_L Phase_C
+ C3
D7 220uF, 50V
R3 22.1 ohm
2 1 Phase_B

BAV19WS Phase_A

D2
C5
2 1 C7 C8
R8 0.1uF, 50V
BAV19WS R7 2.2 ohm 150K 0.1uF, 50V 0.1uF, 50V
C4
U2 C6
0.1uF 1 8 GB_H
VCC VBOOT 0.1uF

2
4

2
4

2
4
B_H 2 7 R9 22.1 ohm Q4 Q5 Q6
IN_HI DRV_HI
B_L 3 6 1 2 Phase_B GA_L 1 GB_L 1 GC_L 1
IN_LO BRIDGE
4 5 R35 10 ohm
GND DRV_LO R12
IXTY64N055T IXTY64N055T IXTY64N055T

3
NCP5106B GB_L R11 150K R13
150K 150K
D8
R10 22.1 ohm Vbus_M
2 1
R15 10K
CS1+ J1
BAV19WS
R17 Phase_A 1
D3 10K R18 Phase_B 2
0.100 ohm, 2W Phase_C 3
2 1
3-POS
BAV19WS R14 2.2 ohm CS1-
VCC_3v3
C9 U3 C10 R20 10K J3
1 8 GC_H SH2
0.1uF VCC VBOOT 0.1uF 1
C_H 2 7 R16 22.1 ohm J4 HSC 2
IN_HI DRV_HI J16 SETTINGS: HSB 3
C_L 3 6 1 2 Phase_C shunt HSA 4

1
2
3
1-2 AC MOTOR
IN_LO BRIDGE 2-3 BLDC MOTOR 5
4 5 R36 10 ohm
GND DRV_LO HSB 5-POS
NCP5106B GC_L PD4 R21
10K
D9
R19 22.1 ohm
2 1 BAS16V C11 J5
R22 0.1uf
10K 6 1 1
BAV19WS 2
5 2
J2 Phase_A VCC_3v3 2 POS
PC7_PWML0 A_L Phase_B 4 3
1 2 PC6_PWMH0 A_H Phase_C FOR USE
3 4

3
BEMF_A D4 10K R23 WITH AC MOTOR
VCC_5VM 5 6 PD0_PWMH1 B_H R27 Q7 1
7 8 PD1_PWML1 B_L R24 R25 R26 10K MMBT3904
9 10 BEMF_B 150K 150K 150K
11 12

2
Vbus_M ANA4 PD2_PWMH2 C_H C12
ENABLE PE7 13 14 PD7_PWML2 C_L TEMP
ENABLE 15 16 0.1uf
BEMF_C BEMF_A BEMF_B BEMF_C R28
HSA PD3 17 18 CS1+ 100 ohm
PD4 19 20 CS1- J6
21 22
HSC PD5
23 24
CS2+
1
C30 R29 C31 R30 C32 R31 R32 T
CS2- VCC_3v3 10K 10K 10K 10K
25 26 TEMP 2 0.01uF 0.01uF 0.01uF
27 28
29 30
HDR/PIN 2x15

Figure 21. MultiMotor Series Development Board, #1 of 2

AN037602-0116 Page 25 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

J7

1
EXTERNAL VBUS 2
UP TO 48VDC F1
2 POS

J9 FUSE/250V/2A
SH1 VBUS
FH1 J8
1 2 1
2 1 HS1
SHUNT POSITION shunt 3 2
3
1-2 EXTERNAL VBUS 250V/5x20
HDR/PIN 1x3 holder
2-3 INTERNAL VBUS

2
TO-220
J10

2
1
2 12V
J11 3

1 VCC_24V
24VDC 2 USE HEATSINK VCC_12V USE HEATSINK VCC_5VM J12
3
U4 U5 1
1 3 1 3 2 5V
P1 IN OUT IN OUT 3
1

GND

GND
1 D5
1N4007
3

2
1

2 MIC29150-12 MIC29150-5
2

1
+ C14 C17

1
10uF + C15
PJ-003A
50V + C13 C16 10uF 0.1uF
2

10uF

2
0.1uF

2
J13

1
2
3 GND
VCC_12V

VBUS
3 RL1

D6 1
J14 2 3
BAS16 VBUS_B
5
1 2
2 GND
3
1

JS1A-12V

R33
3

1 Q8
ENABLE MMBT3904
2K
2

Figure 22. MultiMotor Series Development Board, #2 of 2

AN037602-0116 Page 26 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor Series Application Note

Appendix B. Flow Charts


Figure 23 presents the flow of the space vector modulation routine.

No No
MAIN

Tacho Check Speed Yes


PWM
Interrupt? Demand interrupt?

Yes Calculate
Setspeed
Or
Open loop speed
Calculate rotor V/F profiler with Integrate Speed
period slip control to obtain rotor
calculations theta

Theta <
Decomposition Vector2?
Slip routine:
control Yes
Calculate T1
Calculate T2 No
Calculate T0

Theta <
Vector3?

No

Theta <
Vector4?

No

Theta <
Vector5?

Apply new No
reference vector
voltages to
phaseA Theta <
phaseB Vector6?
phaseC

SVM BLOCK

Figure 23. Space Vector Modulation Flow Chart

Note: The Hall sensor for Tacho feedback can be disabled for sensorless V/F control.

AN037602-0116 Page 27 of 28
Space Vector Modulation of a 3-Phase ACIM with the Z16FMC ZNEO MCU
MultiMotor 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.

Warning: 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 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
©2016 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.

AN037602-0116 Page 28 of 28

You might also like