Bayley Wang
/
flash_configuration
flash based config testing
Defaults/config_motor.h@3:82c00c8e2cb4, 2017-03-07 (annotated)
- Committer:
- bwang
- Date:
- Tue Mar 07 08:06:39 2017 +0000
- Revision:
- 3:82c00c8e2cb4
- Parent:
- 1:df6bbacb7bb9
lot's more commands
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bwang | 0:941e150e78b6 | 1 | #ifndef __CONFIG_MOTOR_H |
bwang | 0:941e150e78b6 | 2 | #define __CONFIG_MOTOR_H |
bwang | 0:941e150e78b6 | 3 | |
bwang | 0:941e150e78b6 | 4 | /*# of pole pairs*/ |
bwang | 0:941e150e78b6 | 5 | #define POLE_PAIRS 3.0f |
bwang | 0:941e150e78b6 | 6 | |
bwang | 0:941e150e78b6 | 7 | /*mechanical position offset, |
bwang | 0:941e150e78b6 | 8 | measured as +a, -b, -c (radians)*/ |
bwang | 0:941e150e78b6 | 9 | #define POS_OFFSET 5.88f |
bwang | 0:941e150e78b6 | 10 | |
bwang | 0:941e150e78b6 | 11 | /*# of resolver lobes*/ |
bwang | 0:941e150e78b6 | 12 | #define RESOLVER_LOBES 3.0f |
bwang | 0:941e150e78b6 | 13 | |
bwang | 0:941e150e78b6 | 14 | /*CPR of encoder or encoder emulator*/ |
bwang | 0:941e150e78b6 | 15 | #define CPR 4096 |
bwang | 0:941e150e78b6 | 16 | |
bwang | 0:941e150e78b6 | 17 | /*d and q axis inductances, henries*/ |
bwang | 0:941e150e78b6 | 18 | #define Ld 0.000876f |
bwang | 0:941e150e78b6 | 19 | #define Lq 0.002068f |
bwang | 0:941e150e78b6 | 20 | |
bwang | 0:941e150e78b6 | 21 | /*PM flux linkage, volt-seconds*/ |
bwang | 0:941e150e78b6 | 22 | #define FLUX_LINKAGE 0.06f |
bwang | 0:941e150e78b6 | 23 | |
bwang | 0:941e150e78b6 | 24 | /*single phase resistance, ohms*/ |
bwang | 0:941e150e78b6 | 25 | #define Rs 0.05f |
bwang | 0:941e150e78b6 | 26 | |
bwang | 0:941e150e78b6 | 27 | /*torque/phase amp for approximate models*/ |
bwang | 0:941e150e78b6 | 28 | #define KT 0.3f |
bwang | 0:941e150e78b6 | 29 | |
bwang | 0:941e150e78b6 | 30 | /*a safe speed below which you |
bwang | 0:941e150e78b6 | 31 | never need to field weaken*/ |
bwang | 0:941e150e78b6 | 32 | #define W_SAFE 100.0f |
bwang | 0:941e150e78b6 | 33 | |
bwang | 0:941e150e78b6 | 34 | /*maximum sane mechanical speed, |
bwang | 0:941e150e78b6 | 35 | used to filter velocity (rad/s)*/ |
bwang | 0:941e150e78b6 | 36 | #define W_CRAZY 1500.0f |
bwang | 0:941e150e78b6 | 37 | |
bwang | 0:941e150e78b6 | 38 | #define PI 3.141593f |
bwang | 0:941e150e78b6 | 39 | |
bwang | 0:941e150e78b6 | 40 | #endif |