mirror of https://github.com/rusefi/bldc.git
app_sten fix
This commit is contained in:
parent
2119242b43
commit
bc0ab63e21
|
@ -161,7 +161,7 @@ static void set_output(float output) {
|
||||||
|
|
||||||
const float rpm = mcpwm_get_rpm();
|
const float rpm = mcpwm_get_rpm();
|
||||||
|
|
||||||
if (output > 0.0 && rpm > -mcpwm_get_configuration()->l_min_erpm) {
|
if (output > 0.0 && rpm > -mcpwm_get_configuration()->l_max_erpm_fbrake) {
|
||||||
float current;
|
float current;
|
||||||
|
|
||||||
if (output > 0.0) {
|
if (output > 0.0) {
|
||||||
|
|
|
@ -30,12 +30,12 @@
|
||||||
*/
|
*/
|
||||||
#define MCPWM_CURRENT_MAX 35.0 // Current limit in Amperes (Upper)
|
#define MCPWM_CURRENT_MAX 35.0 // Current limit in Amperes (Upper)
|
||||||
#define MCPWM_CURRENT_MIN -30.0 // Current limit in Amperes (Lower)
|
#define MCPWM_CURRENT_MIN -30.0 // Current limit in Amperes (Lower)
|
||||||
#define MCPWM_MAX_ABS_CURRENT 80.0 // The maximum absolute current above which a fault is generated
|
#define MCPWM_MAX_ABS_CURRENT 90.0 // The maximum absolute current above which a fault is generated
|
||||||
#define MCPWM_SLOW_ABS_OVERCURRENT 1 // Use the filtered (and hence slower) current for the overcurrent fault detection
|
#define MCPWM_SLOW_ABS_OVERCURRENT 1 // Use the filtered (and hence slower) current for the overcurrent fault detection
|
||||||
#define MCPWM_IN_CURRENT_MAX 25.0 // Input current limit in Amperes (Upper)
|
#define MCPWM_IN_CURRENT_MAX 25.0 // Input current limit in Amperes (Upper)
|
||||||
#define MCPWM_IN_CURRENT_MIN -20.0 // Input current limit in Amperes (Lower)
|
#define MCPWM_IN_CURRENT_MIN -20.0 // Input current limit in Amperes (Lower)
|
||||||
#define MCPWM_RPM_MAX 50000.0 // The motor speed limit (Upper)
|
#define MCPWM_RPM_MAX 80000.0 // The motor speed limit (Upper)
|
||||||
#define MCPWM_RPM_MIN -50000.0 // The motor speed limit (Lower)
|
#define MCPWM_RPM_MIN -80000.0 // The motor speed limit (Lower)
|
||||||
#define MCPWM_MIN_VOLTAGE 20.0 // Minimum input voltage
|
#define MCPWM_MIN_VOLTAGE 20.0 // Minimum input voltage
|
||||||
#define MCPWM_MAX_VOLTAGE 50.0 // Maximum input voltage
|
#define MCPWM_MAX_VOLTAGE 50.0 // Maximum input voltage
|
||||||
#define MCPWM_CURRENT_STARTUP_BOOST 0.02 // The lowest duty cycle to use in current control mode (has to be > MCPWM_MIN_DUTY_CYCLE)
|
#define MCPWM_CURRENT_STARTUP_BOOST 0.02 // The lowest duty cycle to use in current control mode (has to be > MCPWM_MIN_DUTY_CYCLE)
|
||||||
|
@ -46,9 +46,9 @@
|
||||||
#define MCPWM_IS_SENSORLESS 1 // Use sensorless commutation
|
#define MCPWM_IS_SENSORLESS 1 // Use sensorless commutation
|
||||||
#define MCPWM_MIN_RPM 250 // Auto-commutate below this RPM
|
#define MCPWM_MIN_RPM 250 // Auto-commutate below this RPM
|
||||||
#define MCPWM_CYCLE_INT_LIMIT_MIN_RPM 500.0 // Minimum RPM to calculate the BEMF coupling from
|
#define MCPWM_CYCLE_INT_LIMIT_MIN_RPM 500.0 // Minimum RPM to calculate the BEMF coupling from
|
||||||
#define MCPWM_CYCLE_INT_LIMIT 90.0 // Flux integrator limit 0 ERPM
|
#define MCPWM_CYCLE_INT_LIMIT 80.0 // Flux integrator limit 0 ERPM
|
||||||
#define MCPWM_CYCLE_INT_LIMIT_HIGH_FAC 0.5 // Flux integrator limit percentage at MCPWM_CYCLE_INT_START_RPM_BR ERPM
|
#define MCPWM_CYCLE_INT_LIMIT_HIGH_FAC 0.8 // Flux integrator limit percentage at MCPWM_CYCLE_INT_START_RPM_BR ERPM
|
||||||
#define MCPWM_BEMF_INPUT_COUPLING_K 300.0 // Input voltage to bemf coupling constant
|
#define MCPWM_BEMF_INPUT_COUPLING_K 750.0 // Input voltage to bemf coupling constant
|
||||||
|
|
||||||
// Speed PID parameters
|
// Speed PID parameters
|
||||||
#define MCPWM_PID_KP 0.0001 // Proportional gain
|
#define MCPWM_PID_KP 0.0001 // Proportional gain
|
||||||
|
|
Loading…
Reference in New Issue