Explorar el Código

母线功率环路PI max使用min(maxTrq, ctrl->dc_lim_iq_ff * 1.1f),防止功率过冲wq

Signed-off-by: kevin <huhui@sharkgulf.com>
kevin hace 2 años
padre
commit
6565f9bacb
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      Applications/foc/core/controller.c

+ 5 - 1
Applications/foc/core/controller.c

@@ -332,7 +332,11 @@ static __INLINE float mot_contrl_dc_curr_limiter(mot_contrl_t *ctrl, float maxTr
 	}else {
 		ctrl->dc_lim_iq_ff = iq_ff;
 	}
-	ctrl->pi_power.max = maxTrq;
+	/** 使用min(maxTrq, ctrl->dc_lim_iq_ff * 1.1f)带入max的原因是为了防止积分器饱和后有过冲现象
+	 *  1.1f的系数是为了保证ctrl->dc_lim_iq_ff计算偏小的情况下功率能达到上限,这个系数太大不能
+	 *  防止过冲
+	*/
+	ctrl->pi_power.max = min(maxTrq, ctrl->dc_lim_iq_ff * 1.1f);
 	float errRef = dc_lim - ctrl->dc_curr_filted;
 	return PI_Controller_Parallel(&ctrl->pi_power, errRef, ctrl->dc_lim_iq_ff);
 }