Freescale Semiconductor, Inc.
Application Note
AN2531/D
Rev. 0, 5/2003
Standard Space Vector
Modulation with Dead-Time
Correction – XOR version
TPU Function Set
(svmStdDtXor)
By Milan Brejl, Ph.D.
Freescale Semiconductor, Inc...
Functional Overview
The Standard Space Vector Modulation with Dead-Time Correction – XOR
version (svmStdDtXor) is a version of the Standard Space Vector Modulation
with Dead-Time Correction (svmStdDt) function that uses two TPU channels to
generate one PWM output channel. The TPU channel outputs are connected
to an XOR gate whos output is the required PWM signal. See
Figure 1.
An
advantage of this solution is the full range 0% to 100% of PWM duty-cycle
ratios. There is no MPW (minimum pulse width) parameter to limit the edge
duty-cycle ratios in this version, unlike in the svmStdDt. A disadvantage is that
the number of assigned TPU channels is doubled.
AT1
XOR
Phase A - top
AT2
AB1
AB2
XOR
Phase A - bottom
BT1
XOR
Phase B - top
BT2
BB1
XOR
Phase B - bottom
BB2
CT1
XOR
Phase C - top
CT2
CB1
XOR
Phase C - bottom
CB2
Figure 1. Functionality of XOR version – illustration
© Motorola, Inc., 2003
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
AN2531/D
The dead-time correction technique requires knowledge of the instantaneous
direction of phase currents. In the case of positive phase current the top
channel high-time is equal to the calculated high-time and the bottom channel
has to control the dead-time. In case of negative phase current the bottom
channel low-time is equal to the calculated high-time and the top channel has
to control the dead-time. See
Figure 2.
calculated
high-time
Freescale Semiconductor, Inc...
In case of positive current:
top channel
bottom channel
DT
In case of negative current:
DT
top channel
bottom channel
DT
DT
Figure 2. Dead-Time Correction Technique
The function set consists of 5 TPU functions:
•
•
•
•
•
Standard Space Vector Modulation with Dead-Time Correction – XOR
version – R channels (svmStdDtXor_R)
Standard Space Vector Modulation with Dead-Time Correction – XOR
version – T channels (svmStdDtXor_T)
Synchronization Signal for Standard Space Vector Modulation with
Dead-Time Correction – XOR version (svmStdDtXor_sync)
Resolver Reference Signal for Standard Space Vector Modulation with
Dead-Time Correction – XOR version (svmStdDtXor_res)
Fault Input for Standard Space Vector Modulation with Dead-Time
Correction – XOR version (svmStdDtXor_fault)
The svmStdDtXor_R and svmStdDtXor_T TPU functions work together to
generate 6 pairs of XOR gate inputs. The XOR gate outputs then produce a 6-
channel 3-phase center-aligned PWM signal with dead-time between the top
and bottom channels. The Synchronization Signal for the svmStdDtXor
2
Standard SVM with Dead-Time Correction – XOR version (svmStdDtXor)
MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
AN2531/D
Function Set Configuration
function can be used to generate one or more adjustable signals for a wide
range of uses, that are synchronized to the PWM, and track changes in the
PWM period. The Resolver Reference Signal for the svmStdDtXor function can
be used to generate one or more 50% duty-cycle adjustable signals that are
also synchronized to the PWM. The Fault Input for the svmStdDtXor function is
a TPU input function that sets all XOR gate outputs low when the input signal
goes low.
Function Set Configuration
Freescale Semiconductor, Inc...
None of the TPU functions in the Standard Space Vector Modulation with
Dead-Time Correction – XOR version TPU function set can be used
separately. The svmStdDtXor_R and svmStdDtXor_T functions have to be
used together. The svmStdDtXor_R runs on pins AB1, BB1, CB1 – see
Figure
1.
The svmStdDtXor_T runs on the other pins. One or more channels running
Synchronization Signal for svmStdDtXor as well as Resolver Reference
Signals for svmStdDtXor functions can be added to the svmStdDtXor_R and
svmStdDtXor_T functions. They can run with different settings on each
channel. The function Fault Input for svmStdDtXor can also be added to the
svmStdDtXor_R and svmStdDtXor_T functions. It is recommended to use it on
channel 15, and to set the hardware option that disables all TPU output pins
when the channel 15 input signal is low (DTPU bit = 1). This ensures that the
hardware reacts quickly to a pin fault state. Note that it is not only the PWM
channels, but all TPU output channels, including the synchronization signals,
that are disabled in this configuration.
Table 1
shows the configuration options and restrictions.
Table 1. svmStdDtXor TPU function set configuration options and
restrictions
TPU function
svmStdDtXor_R
svmStdDtXor_T
svmStdDtXor_sync
svmStdDtXor_res
svmStdDtXor_fault
Optional/ How many
Mandatory channels
mandatory
3
mandatory
9
optional
1 or more
optional
1 or more
optional
1
Assignable channels
any 3 channels
any 9 channels
any channels
any channels
any, recommended is 15 and
DTPU bit set
MOTOROLA
Standard SVM with Dead-Time Correction – XOR version (svmStdDtXor)
3
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
AN2531/D
Table 2
shows an example of configuration.
Table 2. Example of configuration
Channel
0
1
2
3
4
5
6
7
8
9
10
11
13
14
15
TPU function
svmStdDtXor_T
svmStdDtXor_T
svmStdDtXor_R
svmStdDtXor_T
svmStdDtXor_T
svmStdDtXor_T
svmStdDtXor_R
svmStdDtXor_T
svmStdDtXor_T
svmStdDtXor_T
svmStdDtXor_R
svmStdDtXor_T
svmStdDtXor_sync
svmStdDtXor_res
svmStdDtXor_fault
Priority
middle
middle
middle
middle
middle
middle
middle
middle
middle
middle
middle
middle
low
low
high
Freescale Semiconductor, Inc...
Table 3
shows the TPU function code sizes.
Table 3. TPU function code sizes
TPU function
svmStdDtXor_R
svmStdDtXor_T
svmStdDtXor_sync
svmStdDtXor_res
svmStdDtXor_fault
Code size
300
µ
instructions + 8 entries = 308 long words
3
µ
instructions + 8 entries = 11 long words
26
µ
instructions + 8 entries = 34 long words
38
µ
instructions + 8 entries = 46 long words
9
µ
instructions + 8 entries = 17 long words
Configuration Order
The CPU configures the TPU as follows.
1. Disables the channels by clearing the two channel priority bits on each
channel used (not necessary after reset).
2. Selects the channel functions on all used channels by writing the
function numbers to the channel function select bits.
3. Initializes function parameters. The parameters
T, prescaler, DT,
SQRT3, CPU14
and
sync_presc_addr
must be set before initialization.
If an svmStdDtXor_sync channel or an svmStdDtXor_res channel is
used, then its parameters must also be set before initialization.
4. Issues an HSR (Host Service Request) type %10 to one of the
svmStdDtXor_R channels to initialize all svmStdDtXor_R and
svmStdDtXor_T channels. Issues an HSR type %10 to the
4
Standard SVM with Dead-Time Correction – XOR version (svmStdDtXor)
MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
AN2531/D
Detailed Function Description
svmStdDtXor_sync channels, svmStdDtXor_res channels and
svmStdDtXor_fault channel, if used.
5. Enables servicing by assigning a high, middle or low priority to the
channel priority bits. All svmStdDtXor_R and svmStdDtXor_T channels
must be assigned the same priority to ensure correct operation. The
CPU must ensure that the svmStdDtXor_sync or svmStdDtXor_res
channels are initialized after the initialization of the StdDtXor_R and
svmStdDtXor_T channels:
–
–
assign a priority to the StdDtXor_R and svmStdDtXor_T channels to
enable their initialization
if a Synchronization Signal or a Resolver Reference Signal channel
is used, wait until the HSR bits are cleared to indicate that
initialization of the StdDtXor_R and svmStdDtXor_T channels has
completed and
assign a priority to the svmStdDtXor_sync or svmStdDtXor_res
channels to enable their initialization
Freescale Semiconductor, Inc...
–
NOTE:
A CPU routine that configures the TPU can be generated automatically using
the MPC500_Quick_Start Graphical Configuration Tool.
Detailed Function Description
Standard Space
Vector Modulation
with Dead-Time
Correction – XOR
version – R channels
(svmStdDtXor_R)
and Standard Space
Vector Modulation
with Dead-Time
Correction – XOR
version – T channels
(svmStdDtXor_T)
The svmStdDtXor_R and svmStdDtXor_T TPU functions work together to
generate 6 pairs of XOR gate inputs. The XOR gate outputs then produce a 6-
channel 3-phase center-aligned PWM signal with dead-time between the top
and bottom channels. In order to charge the bootstrap transistors, the PWM
signals start to run 1.6ms after their initialization (at 20MHz TCR1 clock). The
functions generate signals corresponding to Reference Voltage Vector
Amplitude of 0 (50% duty-cycle) until the first reloaded values are processed.
The CPU controls the PWM output by setting the TPU parameters. The Stator
Reference Voltage Vector components
u
á
and
u
â
have to be adjusted during
run time. The PWM period
T
and the
prescaler
– the number of PWM periods
per reload of new values – are also read at each reload, so these parameters
can be changed during run time. Conversely, dead-time (DT) is not supposed
to be changed during run time. The phase currents
currentA, currentB
and
currentC
are read by the TPU asynchronously to PWM parameters reload.
They are read in the last part of the edge-time calculation to reflect the latest
state of the phase currents. The CPU notifies the TPU that the new reload
values are prepared by setting the LD_OK parameter. The TPU notifies the
CPU that the reload values have been read and new values can be written by
clearing the LD_OK parameter.
MOTOROLA
Standard SVM with Dead-Time Correction – XOR version (svmStdDtXor)
5
For More Information On This Product,
Go to: www.freescale.com