Go to the documentation of this file.
27 #ifndef MCCONF_OUTRUNNER2_H_
28 #define MCCONF_OUTRUNNER2_H_
33 #define MCPWM_CURRENT_MAX 60.0 // Current limit in Amperes (Upper)
34 #define MCPWM_CURRENT_MIN -60.0 // Current limit in Amperes (Lower)
35 #define MCPWM_IN_CURRENT_MAX 60.0 // Input current limit in Amperes (Upper)
36 #define MCPWM_IN_CURRENT_MIN -20.0 // Input current limit in Amperes (Lower)
37 #define MCPWM_MAX_ABS_CURRENT 130.0 // The maximum absolute current above which a fault is generated
38 #define MCPWM_SLOW_ABS_OVERCURRENT 1 // Use the filtered (and hence slower) current for the overcurrent fault detection
41 #define MCPWM_SENSOR_MODE SENSOR_MODE_SENSORLESS // Sensor mode
42 #define MCPWM_MIN_RPM 150 // Auto-commutate below this RPM
43 #define MCPWM_CYCLE_INT_LIMIT_MIN_RPM 1100.0 // Minimum RPM to calculate the BEMF coupling from
44 #define MCPWM_CYCLE_INT_LIMIT 62.0 // Flux integrator limit 0 ERPM
45 #define MCPWM_CYCLE_INT_LIMIT_HIGH_FAC 0.8 // Flux integrator limit percentage at MCPWM_CYCLE_INT_START_RPM_BR ERPM
46 #define MCPWM_BEMF_INPUT_COUPLING_K 600.0 // Input voltage to bemf coupling constant
49 #define MCPWM_PID_KP 0.0001 // Proportional gain
50 #define MCPWM_PID_KI 0.002 // Integral gain
51 #define MCPWM_PID_KD 0.0 // Derivative gain
52 #define MCPWM_PID_MIN_RPM 900.0 // Minimum allowed RPM
55 #define MCPWM_P_PID_KP 0.0001 // Proportional gain
56 #define MCPWM_P_PID_KI 0.002 // Integral gain
57 #define MCPWM_P_PID_KD 0.0 // Derivative gain
60 #define MCPWM_CURRENT_CONTROL_GAIN 0.0046 // Current controller error gain
61 #define MCPWM_CURRENT_CONTROL_MIN 1.0 // Minimum allowed current