Bayley Wang
/
foc-ed_in_the_bot_compact
robot
Diff: config_motor.h
- Revision:
- 39:80b38a8e1787
- Parent:
- 38:07cb4ae6c1bd
- Child:
- 40:22aede3d096f
diff -r 07cb4ae6c1bd -r 80b38a8e1787 config_motor.h --- a/config_motor.h Tue Nov 29 00:31:18 2016 +0000 +++ b/config_motor.h Sat Dec 03 17:49:02 2016 +0000 @@ -1,15 +1,28 @@ #ifndef __CONFIG_MOTOR_H #define __CONFIG_MOTOR_H +/*# of pole pairs*/ #define POLE_PAIRS 3.0f + +/*mechanical position offset, + measured as +a, -b, -c (radians)*/ #define POS_OFFSET 5.88f + +/*# of resolver lobes*/ #define RESOLVER_LOBES 3.0f + +/*CPR of encoder or encoder emulator*/ #define CPR 4096 -#define Ld 0.000876f //Henries -#define Lq 0.002068f -#define FLUX_LINKAGE 0.1f //Vs +/*d and q axis inductances, henries*/ +#define Ld 0.000876f +#define Lq 0.002068f +/*PM flux linkage, volt-seconds*/ +#define FLUX_LINKAGE 0.06f + +/*maximum sane mechanical speed, + used to filter velocity (rad/s)*/ #define W_LIMIT 1000.0f #define PI 3.141593f