You are on page 1of 15

AN706-00032-1v0-E

32-BIT MICROCONTROLLER
MB9B100A/MB9B300A/MB9B400A/MB9B500A Series

Coordinate transform
TM
ARM and Cortex-M3 are the trademarks of ARM Limited in the EU and other countries.
AN706-00032-1v0-E
All Rights Reserved.
The contents of this document are subject to change without notice. Customers are advised to consult with
FUJITSU sales representatives before ordering.
The information, such as descriptions of function and application circuit examples, in this document are
presented solely for the purpose of reference to show examples of operations and uses of Fujitsu
semiconductor device; Fujitsu does not warrant proper operation of the device with respect to use based on
such information. When you develop equipment incorporating the device based on such information, you
must assume any responsibility arising out of such use of the information. Fujitsu assumes no liability for
any damages whatsoever arising out of the use of the information.
Any information in this document, including descriptions of function and schematic diagrams, shall not be
construed as license of the use or exercise of any intellectual property right, such as patent right or
copyright, or any other right of Fujitsu or any third party or does Fujitsu warrant non-infringement of any
third-partys intellectual property right or other right by using such information. Fujitsu assumes no liability
for any infringement of the intellectual property rights or other rights of third parties which would result from
the use of information contained herein.
The products described in this document are designed, developed and manufactured as contemplated for
general use, including without limitation, ordinary industrial use, general office use, personal use, and
household use, but are not designed, developed and manufactured as contemplated (1) for use
accompanying fatal risks or dangers that, unless extremely high safety is secured, could have a serious
effect to the public, and could lead directly to death, personal injury, severe physical damage or other loss
(i.e., nuclear reaction control in nuclear facility, aircraft flight control, air traffic control, mass transport
control, medical life support system, missile launch control in weapon system), or (2) for use requiring
extremely high reliability (i.e., submersible repeater and artificial satellite).
Please note that Fujitsu will not be liable against you and/or any third party for any claims or damages
arising in connection with above-mentioned uses of the products.
Any semiconductor devices have an inherent chance of failure. You must protect against injury, damage or
loss from such failures by incorporating safety design measures into your facility and equipment such as
redundancy, fire protection, and prevention of over-current levels and other abnormal operating conditions.
If any products described in this document represent goods or technologies subject to certain restrictions on
export under the Foreign Exchange and Foreign Trade Law of Japan, the prior authorization by Japanese
government will be required for export of those products from Japan.
The company names and brand names herein are the trademarks or registered trademarks of their
respective owners.
Copyright 2011 FUJITSU SEMICONDUCTOR LIMITED all rights reserved
1
AN706-00032-1v0-E
Revision History
Rev Date Remark
1.0 Jul. 04, 2011 First Edition

2
AN706-00032-1v0-E
Table of Contents

Revision History.................................................................................................................... 2
Table of Contents.................................................................................................................. 3
1 Introduction.................................................................................................................... 4
2 Technical Background ................................................................................................... 4
2.1 Overview ................................................................................................................ 4
3 Clarke transform............................................................................................................ 5
3.1 Theory .................................................................................................................... 5
3.1.1 Clarke transform theory................................................................................... 5
3.1.2 Inverted Clarke transform theory..................................................................... 8
3.2 Application.............................................................................................................. 9
4 Park transform............................................................................................................. 10
4.1 Theory .................................................................................................................. 10
4.1.1 Park Transform theory................................................................................... 10
4.1.2 Inverted Park Transform theory..................................................................... 13
4.2 Application............................................................................................................ 14

3
AN706-00032-1v0-E
1 Introduction
This application note describes the coordinate transform which with the Clarke, Park,
Inverse Clarke and Inverse Park transformation.
This application note describes the coordinate transforms Theory, Block, Function, Flow,
Sample and Parameter in the ARM Inverter Platform.
.

2 Technical Background
Why need use coordinate transform?
2.1 Overview
In motor control, the motors start, stop, and speed and so on, all of them need to change
the motor magnetic torque, the motor torque with armature current is described in the
formulae:

DC motor: (1)
I
c
= C
I
I

AC motor: (2)
I
c
= C
I
I cos

Where Te is magnetic torque, C
T
is torque modulus, I is armature current, is flux, is
rotor power factor.
As DC motor, indirectly determine and control and I to control motor torque. The flux and
the current have direct proportion with motor torque. Changes the current will change the
motor torque. Its very simply.
But as AC motor, the motor torque control not only need I and , the is also important.
The will change with the rotor current frequency. The come from stator current and
rotor current, it will change along with the motor load change, so AC motor in dynamic
running, its controlled more difficult than DC motor.
AC motor should have the parameter relation like the DC motor.
Transvector Control could simulate AC motor into DC motor, and simply the control.
The base theory: Use the 3-phase AC motor rotating magnetic field transform into like DC
motor 2-phase rotating magnetic field, then control the 2-phase current to control the torque.

4
AN706-00032-1v0-E



3 Clarke transform
Clarke transform s theory
3.1 Theory
3.1.1 Clarke transform theory
In motor theory, balanced 3-phase AC motor has 3 fixed windings. Through 3-phase
balanced AC current ia,ib,ic will bring a rotating magnetic field with the speed .
Figure 3-1
.

F
i
i
Figure 3-2









A
B
C
F
ia
ib
ic
Figure 3-1

Not only balanced 3-phase fixed windings could bring rotating magnetic field, 2-phase
symmetry windings (zphase=90) through 2-phase balance AC current i,i, also could
bring rotating magnetic field. Figure 3-2
When balanced 3-phase fixed windings and 2-phase symmetry windings bring rotating
magnetic field value and speed are equality, the 3-phase windings equivalent with
2-phase windings.
Clarke transform is converts balanced 3-phase (ia,ib,ic) into balanced 2-phase
(i,i).Figure3-3


Clarke

c
b
a



Figure 3-3

5
AN706-00032-1v0-E
Clarke transform must keep the power fixedness, in Figure3-4,
`
1
1
1
1
i

= k
1
(i
a
-i
b
cos 6u

-i
c
cos 6u

) = k
1
_i
a
-
1
2
i
b
-
1
2
i
c
]
i

= k
1
(i
b
sin 6u

-i
c
sin6u

) = k
1
_
S
2
i
b
-
S
2
i
c
_
(3)

Where is the 3-phase current is 2-phase current, is the balanced
coefficient.
i
a
, i
b
, i
c

i

, i
k
1








Add a zero-axis value: (4)
i
u
= k
1
k
2
(i
a
+i
b
+i
c
)
Change the math formulae into motor ap , h e the matrix formulae plication av
_
i

i
u
_ = k
1
l
l
l
l
l 1 -
1
2
-
1
2
u
S
2
-
S
2
k
2
k
2
k
2
1
1
1
1
1
_
i
a
i
b
i
c
_ = C
T
_
i
a
i
b
i
c
_
(5)
Where
C
T
= k
1
l
l
l
l
l 1 -
1
2
-
1
2
u
S
2
-
S
2
k
2
k
2
k
2
1
1
1
1
1

(6)
If the power fixedness, the formulae transf r o m:

C
T
-1
= k
1
l
l
l
l
l
l
1 u k
2
-
1
2
S
2
k
2
-
1
2
-
S
2
k
2
1
1
1
1
1
1

(7)
C
T
-1
C
T
= k
1
2
l
l
l
l
l
l
1 u k
2
-
1
2
S
2
k
2
-
1
2
-
S
2
k
2
1
1
1
1
1
1
l
l
l
l
l 1 -
1
2
-
1
2
u
S
2
-
S
2
k
2
k
2
k
2
1
1
1
1
1
= _
1 u u
u 1 u
u u 1
_
(8)

I
Is
I
b
a
c
Figure 3-4
6
AN706-00032-1v0-E
Then
k
2
=
1
2
k
1
=
_
2
S


Take into the


k
2
, k
1
C
T
-1
,
C
T
=
_
2
S
l
l
l
l
l
l
l 1 -
1
2
-
1
2
u
S
2
-
S
2
1
2
1
2
1
2
1
1
1
1
1
1
1
(9)
This formula is the Clarke transform matrix.

If take into the
k
2
, k
1
C
T
-1

C
T
-1
=
_
2
S
l
l
l
l
l
l
l 1 u -
1
2
-
1
2
S
2
1
2
-
1
2
-
S
2
1
2
1
1
1
1
1
1
1

(10)
This formula is the Inverted Clarke transform matrix.
In motor theory, the balanced 3-phas r current have: e AC moto
_
i
o
= I sin(t)
i
b
= I sin(t + 2nS)
i
c
= I sin(t -2nS)

(11)
Take
k
2
=
1
2
k
1
=
_
2
S

and formula (11) into formula (5)
_
i

i
u
_ =
_
2
S
l
l
l
l
l
l
l 1 -
1
2
-
1
2
u
S
2
-
S
2
1
2
1
2
1
2
1
1
1
1
1
1
1
_
I sin(t)
I sin(t +2nS)
I sin(t -2nS)
_

Here, if defined ;
i

= i
a

The formula can transformed to
_
i

= i
a
= I sin(t)
i

=
Si
a
S
+
2Si
b
S
= I sin(t +n2)

(12)
This transformation course use wave shown in Figure 3-5 below:
7
AN706-00032-1v0-E
i i
ic ib ia

Clarke

b
c
a


Figure 3-5

3.1.2 Inverted Clarke transform theory
In motor theory, when have two current component vectors in the stationary - axis,
through complementary inverse transforms to get back to the 3-phase stationary A,B,C
axis. This transformation uses the Inverse Clarke transformation, Figure 3-6.

a





Through the Inverted Park matrix and the Figure 3-4, the Inverted Clarke transform
formula:
C
T
-1
_
i
o
= i

i
b
= (-i

+ Si

)2
i
c
= (-i

-Si

)2

(13)

b Inverted
c
Clarke
Figure 3-6
8
AN706-00032-1v0-E

3.2 Application
Function Name: ClarkAmplitude
C file name: ClarkAmplitude.C, ClarkAmplitude.H
<Function interface>
void ClarkAmplitude
( volatile _stDataInThreeAxis *stDataInThreeAxis, //Inputs: 3-axis system
volatile _stDataInFixAxis *stDataInFixAxis //Outputs: fixed 2-axis system )

typedef struct
{
Q15_VAL32 a_Q15;// phase-a variable
Q15_VAL32 b_Q15;// phase-b variable
Q15_VAL32 c_Q15;// phase-c variable
}_stDataInThreeAxis;
_stDataInThreeAxis *stDataInThreeAxis

typedef struct
{
Q15_VAL32 alpha_Q15;// stationary d-axis variable
Q15_VAL32 beta_Q15;// stationary d-axis variable
}_stDataInFixAxis;
_stDataInFixAxis *stDataInFixAxis

Table 1
Item Name Description Format
a phase-a of balanced 3- phase Q15_VAL32
b phase-b of balanced 3- phase Q15_VAL32 Inputs
c phase-c of balanced 3- phase Q15_VAL32
alpha alpha - alpha of fixed 2- phase Q15_VAL32
Outputs
beta alpha - beta of fixed 2- phase Q15_VAL32
Intput handle: stDataInThreeAxis, Output handle: stDataInFixAxis.

The following code is example for this module.
Main()
{
}
void example_Clarke()
{
stDataInThreeAxis.a_Q15=INa;//input phase-a
stDataInThreeAxis.b_Q15=INb;// input phase-b
ClarkAmplitude(&stDataInThreeAxis, pCurrentInFixAxis);// calculate clarke
OUTa=CurrentInFixAxis. alpha_Q15;//Output alpha
OUTb=CurrentInFixAxis. beta_Q15;//Output beta
}
9
AN706-00032-1v0-E

4 Park transform
Park transforms theory
4.1 Theory
4.1.1 Park Transform theory
2-phase symmetry windings (zphase=90) through 2-phase balance AC current i,i, and
keep the windings stop, will bring rotating magnetic EMF F1 with speed . Figure 4-1.
2-phase symmetry windings (zphase=90) through 2-phase balance DC current id,iq, and
rotate windings at speed , will bring rotating magnetic EMF F2, Figure 4-2.
If EMF F1=F2, stationary system 2-phase through AC current equivalent with rotating
system 2-phase through DC current.










The Park transformation convert the stationary 2-phase (i,i) system into rotating 2-phase
(id,iq) system. Figure 4-3





Where the i,i come from Clarke transform; and the come from the rotor is displaced
from the direct axis of the stator reference frame by the rotor angle . Because it can be

F
i
i

Figure 4-1

F
id
iq
q
d
Figure 4-2

Park q

Figure 4-3
10
AN706-00032-1v0-E
seen that the angle between the real axis (x) of the general reference frame and the real
axis of the reference frame rotating with the rotor is ,











Figure 4-4

_
i
u
= i

cos + i

sin
i
q
= -i

sin +i

cos
(14)
As shown in Figure 4-4,
Where is the rotating 2-phase current, is stationary 2-phase current, is
the angle between i and i.
i
u
, i
q
i

, i


Change the math f r t mo r l n, ve the matrix formulae: o mulae in o to app icatio ha
_
i
u
i
q
_ = j
cos sin
-sin cos
[ _
i

_ = C
P
_
i

_
(15)
C
P
= j
cos sin
-sin cos
[
(16)
Where:
This matrix convert the stationary 2-phase(, ) system into rotating 2-phase(d, q) system,
its called Park transform.
If the power fixedness, the formulae transform:
C
P
-1
= j
cos -sin
sin cos
[
(17)
This matrix convert rotating 2-phase(d, q) system into stationary 2-phase(, ) system, its
called Inverted Park transform. This transform course use wave shown in Figure 4-1 below:



11
AN706-00032-1v0-E











i i
id
iq

d
q
Park
Figure 4-5

4.1.2 Inverted Park Transform theory
In motor theory, these are two current component vectors in the rotating d-q axis, through
the complementary inverse transformation to get back to the 2-phase stationary - axis.
This transformation uses the Inverse Park Transform, Figure 4-5.





Through the Inverted Park matrix 4-2, the Inverted Park formula:
C
P
-1
and the Figure
(20)
_
i

= i
u
co
i

= i
u
sin
s - i
q
sin
+i
q
cos

Figure 4-6


d

Inverted
Park

1
AN706-00032-1v0-E

4.2 Application
Function Name: Park`
C file name: Park.C, Park.H
Function interface:
void Park(_stDataInFixAxis *stDataInFixAxis, //fixed 2-axis system
_stDataInRotAxis *stDataInRotAxis //rotational 2-axis system)
typedef struct
{
Q15_VAL32 alpha_Q15;
Q15_VAL32 beta_Q15;
}_stDataInFixAxis;
_stDataInFixAxis *stDataInFixAxis
typedef struct
{
Q15_VAL32 d_Q15;
Q15_VAL32 q_Q15;
Q15_VAL32 theta_Q15;
}_stDataInRotAxis;
_stDataInRotAxis *stDataInRotAxis

Table 2
Item Name Description Format
alpha phase- alpha of fixed 2- phase Q15_VAL32
beta phase- beta of fixed 2- phase Q15_VAL32
Inputs
Theta
Phase angle between stationary
and rotating frame
Q15_VAL32
d alpha - alpha of rotational 2-axis system Q15_VAL32
Outputs
q alpha - beta of rotational 2-axis system Q15_VAL32


The following code is example for this module.
Main()
{
}
void example_Park()
{
CurrentInFixAxis. alpha_Q15= INa;//Input alpha
CurrentInFixAxis. beta_Q15= INb;//Input beta
stDataInRotAxis. theta_Q15=Intheta;//input Phase angle
Park(&CurrentInFixAxis, stDataInRotAxis);
OUTa= stDataInRotAxis. d_Q15;
OUTb= stDataInRotAxis. q_Q15;
}
13
AN706-00032-1v0-E
14

Function Name: ParkInv
C file name: ParkInv.C, Park.H
Function interface:
void InvPark(_stDataInRotAxis *stDataInRotAxis, // rotating 2- phase system
_stDataInFixAxis *stDataInFixAxis // fixed 2- phase system)
typedef struct
{
Q15_VAL32 d_Q15;
Q15_VAL32 q_Q15;
Q15_VAL32 theta_Q15;
}_stDataInRotAxis;
_ stDataInRotAxis * stDataInRotAxis
typedef struct
{
Q15_VAL32 alpha_Q15;
Q15_VAL32 beta_Q15;
}_stDataInFixAxis;
_stDataInFixAxis *stDataInFixAxis

Table 3
Item Name Description Format
d alpha - d of rotating 2- phase Q15_VAL32
q alpha - q of rotating 2- phase Q15_VAL32
Inputs

Phase angle between
stationary
and rotating frame
Q15_VAL32
alpha alpha - alpha of fixed 2- phase Q15_VAL32
Outputs
beta alpha - beta of fixed 2- phase Q15_VAL32

Intput handle: stDataInRotAxis, Output handle: stDataInFixAxis.


The following code is example for this module.
Main()
{
}
void example_ParkInv()
{
stDataInRotAxis.d_Q15=INd;//input phase-d
stDataInRotAxis.q_Q15=INq;// input phase-q
stDataInRotAxis.theta_Q15=Intheta;//input Phase angle
InvPark (&stDataInRotAxis, pCurrentInFixAxis);// calculate Inverte Park
OUTa=CurrentInFixAxis. alpha_Q15;//Output alpha
OUTb=CurrentInFixAxis. beta_Q15;//Output beta
}



- End of File -

You might also like