robot

Dependencies:   FastPWM3 mbed

Committer:
bwang
Date:
Tue Feb 28 03:32:21 2017 +0000
Revision:
79:d0b1bb3dcf68
Parent:
42:030e0ec4eac5
Child:
95:a86aea5c5ab2
added FlashWriter class

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bwang15:b583cd30b063 1#ifndef __CONFIG_MOTOR_H
bwang15:b583cd30b063 2#define __CONFIG_MOTOR_H
bwang15:b583cd30b063 3
bwang39:80b38a8e1787 4/*# of pole pairs*/
bwang15:b583cd30b063 5#define POLE_PAIRS 3.0f
bwang39:80b38a8e1787 6
bwang39:80b38a8e1787 7/*mechanical position offset,
bwang39:80b38a8e1787 8 measured as +a, -b, -c (radians)*/
bwang24:5e18a87a0e95 9#define POS_OFFSET 5.88f
bwang39:80b38a8e1787 10
bwang39:80b38a8e1787 11/*# of resolver lobes*/
bwang15:b583cd30b063 12#define RESOLVER_LOBES 3.0f
bwang39:80b38a8e1787 13
bwang39:80b38a8e1787 14/*CPR of encoder or encoder emulator*/
bwang15:b583cd30b063 15#define CPR 4096
bwang29:50e6e4e46580 16
bwang39:80b38a8e1787 17/*d and q axis inductances, henries*/
bwang39:80b38a8e1787 18#define Ld 0.000876f
bwang39:80b38a8e1787 19#define Lq 0.002068f
bwang30:c25c5bf0d951 20
bwang39:80b38a8e1787 21/*PM flux linkage, volt-seconds*/
bwang39:80b38a8e1787 22#define FLUX_LINKAGE 0.06f
bwang39:80b38a8e1787 23
bwang42:030e0ec4eac5 24/*torque/phase amp for approximate models*/
bwang42:030e0ec4eac5 25#define KT 0.3f
bwang42:030e0ec4eac5 26
bwang55:3568b78dc203 27/*a safe speed below which you
bwang55:3568b78dc203 28 never need to field weaken*/
bwang55:3568b78dc203 29#define W_SAFE 100.0f
bwang55:3568b78dc203 30
bwang39:80b38a8e1787 31/*maximum sane mechanical speed,
bwang39:80b38a8e1787 32 used to filter velocity (rad/s)*/
bwang40:22aede3d096f 33#define W_CRAZY 1500.0f
bwang29:50e6e4e46580 34
bwang15:b583cd30b063 35#define PI 3.141593f
bwang15:b583cd30b063 36
bwang15:b583cd30b063 37#endif