14bit position sensor version.
Dependencies: mbed-dev-f303 FastPWM3
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.15f // 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 // Max Current 00017 #define I_MAX_FW 10.0f // Max field weakening current 00018 #define I_MAX_CONT 15.0f // Max continuous current, for thermal limiting 00019 00020 //Observer// 00021 #define DT 0.000025f 00022 #define K_O 0.02f 00023 00024 00025 00026 00027 #endif
Generated on Fri Jul 15 2022 09:32:51 by 1.7.2