Download Print this page

Texas Instruments TMS320C2000 User Manual page 15

Motor control primer
Hide thumbs Also See for TMS320C2000:

Advertisement

www.ti.com
Figure 12. Snapshot From the Theoretical Background Section (need equation)
Technical Background
2.3.7
DMC Library Optimization
There are several ways to optimize motor control systems for performance in terms of memory
consumption and CPU cycles required to achieve the given task. TI suggests the following options to
optimize the overall system performance:
Use of the optimization levels via the –o switch on the compiler
Use of inlining as a technique to increase speed of execution
Transforming functions in to inline code via macro expansion
When a function is called separately, the function call must call the code at the appropriate address,
followed by a return statement when the function execution is completed. In addition, there is some
overhead associated with setting up a stack frame. In the case of a small function, this call and return
overhead may be significant, compared to the size of the function itself. In addition, when a function is
inlined, the compiler can optimize the function in context of the calling code.
Another optimization is sometimes possible: to turn the function into a macro expansion. This allows the
compiler to optimize further under certain circumstances and produces less code, and consumes fewer
cycles to execute. The disadvantage of this method is the code size increase if multiple expanded macros
are implemented. However, for single motor control, both size and cycle wise macro modules have
superiority to earlier versions where the code size becomes comparable for dual motor operation. One
must note that the number of instruction cycles is much lower in any case.
Unlike the DMC Library version in Legacy, the modules in controlSUITE are written in the form of macros
for optimization purposes (refer to Optimizing Digital Motor Control Libraries, SPRAAK2, for more details
at TI website). It is reported that the macro versions of the DMC library let the system run 2-3 times more
efficient than non-optimized version in Legacy. The macros are defined in the header files. The user can
open the respective header file and change the macro definition, if needed. In the macro definitions, there
should be a backslash "\" at the end of each line as shown below which means that the code continues in
SPRUGI6 – September 2010
Submit Documentation Feedback
Implements the following equations:
=
×
ID
Id
cos
= −
×
IQ
Id
This transformation converts vectors in 2-phase orthogonal stationary system into the
rotating reference frame as shown in figure below:
q
Q
lq
ld sin
θ
lq cos
IQ
θ
The instantaneous input quantities are defined by the following equations:
= ×
id
I
sin
= ×
 
iq
I
sin
Copyright © 2010, Texas Instruments Incorporated
θ
+
×
θ
Iq
sin
θ
+
×
θ
Iq
sin
cos
θ
θ
θ
D
ID
θ
ld cos
θ
lq sin
θ
ld
d
( )
ω
t
(
)
ω
+
π
t
/ 2
Software Tools
TMS320C2000 Motor Control Primer
15

Advertisement

loading
Need help?

Need help?

Do you have a question about the TMS320C2000 and is the answer not in the manual?