mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-22 08:00:36 +08:00
Expecting all current sense errors fixed, increasing max mod
This commit is contained in:
@@ -1114,8 +1114,8 @@ static bool FOC_current(Motor_t* motor, float Id_des, float Iq_des) {
|
||||
float mod_q = vfactor * Vq;
|
||||
|
||||
// Vector modulation saturation, lock integrator if saturated
|
||||
// TODO make maximum modulation configurable (currently 40%)
|
||||
float mod_scalefactor = 0.20f * sqrt3_by_2 * 1.0f/sqrtf(mod_d*mod_d + mod_q*mod_q);
|
||||
// TODO make maximum modulation configurable
|
||||
float mod_scalefactor = 0.80f * sqrt3_by_2 * 1.0f/sqrtf(mod_d*mod_d + mod_q*mod_q);
|
||||
if (mod_scalefactor < 1.0f)
|
||||
{
|
||||
mod_d *= mod_scalefactor;
|
||||
|
||||
Reference in New Issue
Block a user