Bayley Wang
/
foc-ed_in_the_bot_compact
robot
config_motor.h
- Committer:
- bwang
- Date:
- 2017-04-09
- Revision:
- 97:785be556c06d
- Parent:
- 96:cd62376260d1
- Child:
- 108:ac6db1b94b59
- Child:
- 114:095a77fcf53b
File content as of revision 97:785be556c06d:
#ifndef __CONFIG_MOTOR_H #define __CONFIG_MOTOR_H /*# of pole pairs*/ #define POLE_PAIRS 3.0f /*electrical position offset, measured as +a, -b, -c (radians)*/ #define POS_OFFSET 5.65f//5.88f /*# of resolver lobes*/ #define RESOLVER_LOBES 3.0f /*CPR of encoder or encoder emulator*/ #define CPR 4096 /*d and q axis inductances, henries*/ #define Ld 0.000876f #define Lq 0.002068f /*PM flux linkage, volt-seconds*/ #define FLUX_LINKAGE 0.06f /*torque/phase amp for approximate models*/ #define KT 0.3f /*a safe speed below which you never need to field weaken*/ #define W_SAFE 100.0f /*maximum sane mechanical speed, used to filter velocity (rad/s)*/ #define W_CRAZY 1500.0f #define PI 3.141593f #endif