flash based config testing

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers config_motor.h Source File

config_motor.h

00001 #ifndef __CONFIG_MOTOR_H
00002 #define __CONFIG_MOTOR_H
00003 
00004 /*# of pole pairs*/
00005 #define POLE_PAIRS 3.0f
00006 
00007 /*mechanical position offset,
00008   measured as +a, -b, -c (radians)*/
00009 #define POS_OFFSET 5.88f
00010 
00011 /*# of resolver lobes*/
00012 #define RESOLVER_LOBES 3.0f
00013 
00014 /*CPR of encoder or encoder emulator*/
00015 #define CPR 4096
00016 
00017 /*d and q axis inductances, henries*/
00018 #define Ld 0.000876f
00019 #define Lq 0.002068f
00020 
00021 /*PM flux linkage, volt-seconds*/
00022 #define FLUX_LINKAGE 0.06f
00023 
00024 /*single phase resistance, ohms*/
00025 #define Rs 0.05f
00026 
00027 /*torque/phase amp for approximate models*/
00028 #define KT 0.3f
00029 
00030 /*a safe speed below which you 
00031   never need to field weaken*/
00032 #define W_SAFE 100.0f
00033 
00034 /*maximum sane mechanical speed,
00035   used to filter velocity (rad/s)*/
00036 #define W_CRAZY 1500.0f
00037 
00038 #define PI 3.141593f
00039 
00040 #endif