Go to the documentation of this file.
25 #ifndef MCCONF_STEN_H_
26 #define MCCONF_STEN_H_
31 #define MCPWM_CURRENT_MAX 35.0 // Current limit in Amperes (Upper)
32 #define MCPWM_CURRENT_MIN -30.0 // Current limit in Amperes (Lower)
33 #define MCPWM_MAX_ABS_CURRENT 100.0 // The maximum absolute current above which a fault is generated
34 #define MCPWM_SLOW_ABS_OVERCURRENT 1 // Use the filtered (and hence slower) current for the overcurrent fault detection
35 #define MCPWM_IN_CURRENT_MAX 25.0 // Input current limit in Amperes (Upper)
36 #define MCPWM_IN_CURRENT_MIN -20.0 // Input current limit in Amperes (Lower)
37 #define MCPWM_RPM_MAX 80000.0 // The motor speed limit (Upper)
38 #define MCPWM_RPM_MIN -80000.0 // The motor speed limit (Lower)
39 #define MCPWM_MIN_VOLTAGE 20.0 // Minimum input voltage
40 #define MCPWM_MAX_VOLTAGE 50.0 // Maximum input voltage
41 #define MCPWM_CURRENT_STARTUP_BOOST 0.02 // The lowest duty cycle to use in current control mode (has to be > MCPWM_MIN_DUTY_CYCLE)
42 #define MCPWM_RPM_LIMIT_NEG_TORQUE 0 // Use negative torque to limit the RPM
43 #define MCPWM_CURR_MAX_RPM_FBRAKE 1500 // Maximum electrical RPM to use full brake at
46 #define MCPWM_SENSOR_MODE SENSOR_MODE_SENSORLESS // Sensor mode
47 #define MCPWM_MIN_RPM 250 // Auto-commutate below this RPM
48 #define MCPWM_CYCLE_INT_LIMIT_MIN_RPM 500.0 // Minimum RPM to calculate the BEMF coupling from
49 #define MCPWM_CYCLE_INT_LIMIT 80.0 // Flux integrator limit 0 ERPM
50 #define MCPWM_CYCLE_INT_LIMIT_HIGH_FAC 0.8 // Flux integrator limit percentage at MCPWM_CYCLE_INT_START_RPM_BR ERPM
51 #define MCPWM_BEMF_INPUT_COUPLING_K 750.0 // Input voltage to bemf coupling constant
54 #define MCPWM_PID_KP 0.0001 // Proportional gain
55 #define MCPWM_PID_KI 0.002 // Integral gain
56 #define MCPWM_PID_KD 0.0 // Derivative gain
57 #define MCPWM_PID_MIN_RPM 1200.0 // Minimum allowed RPM
60 #define MCPWM_P_PID_KP 0.0001 // Proportional gain
61 #define MCPWM_P_PID_KI 0.002 // Integral gain
62 #define MCPWM_P_PID_KD 0.0 // Derivative gain
65 #define MCPWM_CURRENT_CONTROL_GAIN 0.0046 // Current controller error gain
66 #define MCPWM_CURRENT_CONTROL_MIN 0.05 // Minimum allowed current