Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN2388 Datasheet(PDF) 46 Page - STMicroelectronics

Part # AN2388
Description  Sensor field oriented control
PDF  54 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2388 Datasheet(HTML) 46 Page - STMicroelectronics

Back Button AN2388 Datasheet HTML 42Page - STMicroelectronics AN2388 Datasheet HTML 43Page - STMicroelectronics AN2388 Datasheet HTML 44Page - STMicroelectronics AN2388 Datasheet HTML 45Page - STMicroelectronics AN2388 Datasheet HTML 46Page - STMicroelectronics AN2388 Datasheet HTML 47Page - STMicroelectronics AN2388 Datasheet HTML 48Page - STMicroelectronics AN2388 Datasheet HTML 49Page - STMicroelectronics AN2388 Datasheet HTML 50Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 46 / 54 page
background image
Software design
AN2388
46/54
The theoretical background explanations have already been handled and assuming that
the current model equations can be discretized as follows:
Take into consideration that all variables are in q1.15 format.
In the above equations, appear two constants:
where
= sampling time=PWM period
In the following code the constants are converted in the new numerical form:
void Calc_theta(void)
{
mul_q15_q15_q31(K_incr, q_Flux_Speed,&Theta_cm_tmp);
Teta_cm_new = (short)(Teta_cm_tmp>>16);
Theta_cm = Theta_cm+Theta_cm_new;
Theta_cm=Theta_cm+q_Mechanical_Rotor_Angle; //Rotor Flux Angle
Theta_cm=Theta_cm+q_Mechanical_Rotor_Position
}
************************************************************************************
**************************End Calc Teta calculation*
************************************************************************************
************************
4.6.4
Generation of sine and cosine values
In order to generate sine and cosine values, a sine table and indirect addressing mode have
been implemented. In order to have the best performance in term of position accuracy and
the used memory minimization, this table contains 28=256 values to represent the [0;2π]
range. The above computed position (16-bit integer value) therefore needs to be shifted 8
positions to the right. This new position (8-bit integer value) is used as a pointer (Index_Sin
or Index_Cos) to access this table. The outputs of the table are the Sin_Teta_cm and
Cos_Teta_cm value represented in Q1.15 format.
The following figure below shows how the sine value calculation is handled:
K
K
qS
qS
i
i
≈
+1
3
.
2
.
1
1
.
)
(
1
1
1
1
1
1
eq
T
f
eq
i
i
T
n
f
eq
i
i
T
T
i
i
k
k
K
k
K
k
K
K
s
b
r
r
mR
qs
b
r
k
s
mR
ds
r
k
mR
k
mR
⋅
⋅
+
=
+
=
−
+
=
+
+
+
+
+
+
ω
θ
θ
ω
λ
λ
r
T
T ,
T
3
10
*
89
.
4
671
.
21
176
.
106
−
=
Ω
=
=
mH
R
L
T
r
r
r
f
e
x
T
qK
f
F
x
mS
S
T
T
qK
PU
b
r
t
PU
r
r
15
.
1
529
0
5
.
314
*
10
89
.
4
1
1
15
.
1
019
0
89
.
4
4
.
62
3
⎯→
⎯
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
⋅
=
=
⎯→
⎯
⎟⎟
⎠
⎞
⎜⎜
⎝
⎛
=
=
−
ω
µ



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com