WANG YUCHAO / Mbed 2 deprecated Motor_DRV8323RH_for_20190

Dependencies:   mbed FastPWM3

Files at this revision

API Documentation at this revision

Comitter:
benkatz
Date:
Mon Jun 12 17:41:00 2017 +0000
Parent:
28:8c7e29f719c5
Child:
30:db9081ac5658
Child:
31:61eb6ae28215
Commit message:
version on Joao's motors

Changed in this revision

Config/current_controller_config.h Show annotated file Show diff for this revision Revisions of this file
FOC/foc.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Config/current_controller_config.h	Sun Jun 04 19:00:22 2017 +0000
+++ b/Config/current_controller_config.h	Mon Jun 12 17:41:00 2017 +0000
@@ -6,7 +6,7 @@
 #define K_SCALE 0.0001f            // K_loop/Loop BW (Hz)
 #define KI_D 0.06f                  // 1/samples
 #define KI_Q 0.06f                  // 1/samples
-#define V_BUS 22.0f                 // Volts
+#define V_BUS 24.0f                 // Volts
 
 #define D_INT_LIM V_BUS/(K_D*KI_D)  // Amps*samples
 #define Q_INT_LIM V_BUS/(K_Q*KI_Q)  // Amps*samples
--- a/FOC/foc.cpp	Sun Jun 04 19:00:22 2017 +0000
+++ b/FOC/foc.cpp	Mon Jun 12 17:41:00 2017 +0000
@@ -115,7 +115,7 @@
        //controller->v_d = v_d_ff;
        //controller->v_q = v_q_ff; 
        
-       limit_norm(&controller->v_d, &controller->v_q, controller->v_bus);       // Normalize voltage vector to lie within curcle of radius v_bus
+       limit_norm(&controller->v_d, &controller->v_q, 1.2f*controller->v_bus);       // Normalize voltage vector to lie within curcle of radius v_bus
        //abc(controller->theta_elec, controller->v_d, controller->v_q, &controller->v_u, &controller->v_v, &controller->v_w); //inverse dq0 transform on voltages
     
         controller->v_u = c*controller->v_d - s*controller->v_q;                // Faster Inverse DQ0 transform