robot

Dependencies:   FastPWM3 mbed

Revision:
22:72840d3db788
Parent:
15:b583cd30b063
Child:
24:5e18a87a0e95
--- a/config_loop.h	Sat Nov 05 09:12:10 2016 +0000
+++ b/config_loop.h	Sat Nov 05 10:50:25 2016 +0000
@@ -1,14 +1,17 @@
 #ifndef __CONFIG_LOOP_H
 #define __CONFIG_LOOP_H
 
+#include "config_inverter.h"
+
 #define K_LOOP 1.0f
 #define KI_BASE 0.01f
 
-#define KP (K_LOOP / BUS_VOLTAGE)
-#define KI (KI_BASE * K_LOOP / BUS_VOLTAGE)
+#define KP (K_LOOP / BUS_VOLTAGE * 5000.0f / F_SW)
+#define KI (KI_BASE * K_LOOP / BUS_VOLTAGE * 5000.0f / F_SW)
 
 #define INTEGRAL_MAX 1.0f
 
 #define W_FILTER_STRENGTH 0.9f
+#define DQ_FILTER_STRENGTH 0.0f
 
 #endif
\ No newline at end of file