diff --git a/Inc/config.h b/Inc/config.h index 862eeb7e..726dcf91 100644 --- a/Inc/config.h +++ b/Inc/config.h @@ -93,7 +93,7 @@ //--------------------------------------------------------------------- //power settings #define PH_CURRENT_MAX 1200 -#define BATTERYCURRENT_MAX 18000 +#define BATTERYCURRENT_MAX 12000 #define REVERSE 1 //1 for normal direction, -1 for reverse #define PUSHASSIST_CURRENT 300 #define VOLTAGE_MIN 1320 //33V diff --git a/Src/main.c b/Src/main.c index fbd0e100..a390b399 100644 --- a/Src/main.c +++ b/Src/main.c @@ -357,7 +357,7 @@ if(MP.com_mode==Sensorless_openloop||MP.com_mode==Sensorless_startkick)MS.Obs_fl PI_id.setpoint = 0; PI_id.limit_output = _U_MAX; PI_id.max_step=5000; - PI_id.shift=10; + PI_id.shift=9; PI_id.limit_i=1800; PI_iq.gain_i=I_FACTOR_I_Q; @@ -365,7 +365,7 @@ if(MP.com_mode==Sensorless_openloop||MP.com_mode==Sensorless_startkick)MS.Obs_fl PI_iq.setpoint = 0; PI_iq.limit_output = _U_MAX; PI_iq.max_step=5000; - PI_iq.shift=10; + PI_iq.shift=9; PI_iq.limit_i=_U_MAX; #ifdef SPEEDTHROTTLE @@ -1014,7 +1014,7 @@ if(MP.com_mode==Sensorless_openloop||MP.com_mode==Sensorless_startkick)MS.Obs_fl MS.i_q_setpoint, MS.Speed, ui_8_PLL_counter, - MS.Obs_flag, + MS.Battery_Current, int32_temp_current_target , MS.i_q, q31_angle_per_tic>>12,