mirror of
https://github.com/odriverobotics/ODrive.git
synced 2026-08-23 08:48:12 +08:00
make maximum modulation even safer due to current sense errata
This commit is contained in:
@@ -662,7 +662,7 @@ static void FOC_current(Motor_t* motor, float Id_des, float Iq_des) {
|
||||
|
||||
//Vector modulation saturation, lock integrator if saturated
|
||||
//@TODO make maximum modulation configurable (currently 40%)
|
||||
float mod_scalefactor = 0.40f * sqrt3_by_2 * 1.0f/sqrtf(mod_d*mod_d + mod_q*mod_q);
|
||||
float mod_scalefactor = 0.20f * 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