Motor control for robots. More compact, less object-oriented revision.
Dependencies: FastPWM3 mbed-dev-f303
Fork of Hobbyking_Cheetah_V1 by
current_controller_config.h
00001 #ifndef CURRENT_CONTROLLER_CONFIG_H 00002 #define CURRENT_CONTROLLER_CONFIG_H 00003 00004 // Current controller/// 00005 #define K_D .05f // Loop gain, Volts/Amp 00006 #define K_Q .05f // Loop gain, Volts/Amp 00007 #define K_SCALE 0.0001f // K_loop/Loop BW (Hz) 0.0042 00008 #define KI_D 0.0255f // PI zero, in radians per sample 00009 #define KI_Q 0.0255f // PI zero, in radians per sample 00010 #define V_BUS 24.0f // Volts 00011 #define OVERMODULATION 1.2f // 1.0 = no overmodulation 00012 00013 #define D_INT_LIM V_BUS/(K_D*KI_D) // Amps*samples 00014 #define Q_INT_LIM V_BUS/(K_Q*KI_Q) // Amps*samples 00015 00016 #define I_MAX 40.0f 00017 00018 //Observer// 00019 #define DT 0.000025f 00020 #define K_O 0.02f 00021 00022 00023 00024 00025 #endif
Generated on Tue Jul 12 2022 13:17:46 by 1.7.2