Engineer-to-Enginee r Not e EE-396
Technical notes on using Analog Devices products
and development tools
Visit our Web resources http://www.analog.com/ee-notes and http://www.analog.com/processors
or
e-mail processor.support@analog.com or processor.tools.support
@analog.com for technical support.
Using the ADSP-CM41x MATH Unit for Clarke and Park Transforms
Contributed by Punarva Katte Rev 2 April 2, 2018
Copyright 2018, Analog Devices, Inc. All rights reserved. Analog Devices assumes no responsibility for customer product design or the use or application of customers’
products or for any infringements of patents or rights of others which may result from Analog Devices assistance. All trademarks and logos are property of their
respective holders. Information furnished by Analog Devices applications and development tools engineers is believed to be accurate and reliable, however no
responsibility is assumed by Analog Devices regarding technical accuracy and topicality of the content provided in Analog Devices Engineer-to-Engineer Notes.
Introduction
The ADSP-CM41x family of mixed-signal control processors provides an on-chip MATH accelerator unit,
which can be used to offload most of the common transcendental functions such as e
x
, sin(x), cos(x).
atan2( y/x), etc., from the Cortex-M4F core. Th e accele rator is tightly coupled to th e Cortex -M4F core and
is within the core clock domain. The unit is operated with a simple and flexible store-load mech anism b y
storing operands to registers and reading results from other registers.
Clarke and Park transformations are matrices of transformation to convert the current/voltage sy stem of any
ac-machine from one base to another. The Clarke transform converts a three-phase system into a two-phase
system in a stationary frame. The Park transform converts a two-phase system from a stationary frame to a
rotati ng frame. By changi ng the refer ence frame, it is possible to considerabl y simplify the comple xity of
the mathematical machine model. These techniques are invaluable tools in the digital control of ac-
machines.
The purpose of this EE-note is to introduce users to the MATH accelera tor unit and techniques that may be
used to reduce the computation time of mathematical calculations, such as the Clarke and Park transforms.
MATH Accelerato r Unit
The MATH unit provides accelerated functions such as reciprocal, square root, trigonometric functions,
exponential functions, and their inverses. It also provides accelerated functions to convert between
rectangular and polar coordinates. Most operations by this tightly-coupled accelerator complete in a
deterministic number of core clock cycles, faster than the Cortex-M4F core could accomplish the same task.
Table 1
provides the cycles taken to execute each of the functions using the MATH unit. The two columns,
Full Domain and Normal Domain, correspond to different ranges of input to the function. Refer to the
ADSP-CM41x Hardware Reference Manual
[1]
for more details.
The MATH unit provides an easy-to-use function calculator for general programming operations. Its
operands, results, and functions adhere to the IEEE 754-2008 Single-Precision Floating-Point Arithmetic
Standard
[2]
. I n general, results returne d are accurate to within a standard relative error of 23.5 bits compare d
to the infinitely precise mathematical result.