motor controller

Dependencies:   mbed plotter

Revision:
3:08746709f023
Parent:
2:7312ac02785d
Child:
4:4e00b310811d
--- a/config.h	Sun Oct 30 19:37:46 2016 +0000
+++ b/config.h	Sun Oct 30 19:55:58 2016 +0000
@@ -8,8 +8,8 @@
 #define K_SERIAL_BAUD 115200 //serial over USB baud rate
 
 #define K_V_BUS             40.8f   //HV battery voltage
-#define K_Q_CURRENT_MAX     20      //max torque 
-#define K_Q_CURRENT_MIN     -1      //max regen torque
+#define K_Q_CURRENT_MAX     20.0f   //max torque 
+#define K_Q_CURRENT_MIN     -5.0f   //max regen torque
 #define K_P_CURRENT         1.0f    //current loop kp
 #define K_I_CURRENT         0.1f    //current loop ki
 #define K_CURRENT_INT_MAX  20.0f    //current loop integral max
@@ -18,6 +18,10 @@
 
 #define K_POS_OFFSET       (- 5.78f + M_PI + 0.03f) //electrical position offset
 
+#define K_VOLTAGE_KP  0.1f
+#define K_SERVO_KP    0.1f
+#define K_SERVO_KI    0.001f
+
 
 //from bayley
 #define POLE_PAIRS 3.0f