robot

Dependencies:   FastPWM3 mbed

Committer:
bwang
Date:
Sun Nov 27 09:10:09 2016 +0000
Revision:
36:cac9785c91cb
Parent:
33:93a0d621a095
Child:
37:ba7ebf4f8a78
working gokart, stubs for maximum torque per amp based on torque, converting to mpta based on total phase current

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bwang 15:b583cd30b063 1 #ifndef __CONFIG_MOTOR_H
bwang 15:b583cd30b063 2 #define __CONFIG_MOTOR_H
bwang 15:b583cd30b063 3
bwang 15:b583cd30b063 4 #define POLE_PAIRS 3.0f
bwang 24:5e18a87a0e95 5 #define POS_OFFSET 5.88f
bwang 15:b583cd30b063 6 #define RESOLVER_LOBES 3.0f
bwang 15:b583cd30b063 7 #define CPR 4096
bwang 29:50e6e4e46580 8
bwang 32:b31423041c4e 9 #define Ld 0.000876f //Henries
bwang 32:b31423041c4e 10 #define Lq 0.002068f
bwang 33:93a0d621a095 11 #define FLUX_LINKAGE 0.1f //Vs
bwang 30:c25c5bf0d951 12
bwang 36:cac9785c91cb 13 #define KT 0.6f //Nm/A -- filler value until the LUT is made
bwang 30:c25c5bf0d951 14
bwang 29:50e6e4e46580 15 #define IPHASE_MOTOR_LIMIT 200.0f
bwang 29:50e6e4e46580 16 #define W_LIMIT 1000.0f
bwang 29:50e6e4e46580 17
bwang 15:b583cd30b063 18 #define PI 3.141593f
bwang 15:b583cd30b063 19
bwang 15:b583cd30b063 20 #endif