Skip to content

Commit

Permalink
Use the correct ratio when limiting the current integrator
Browse files Browse the repository at this point in the history
This is a followup to d61fd21, where
we incorrectly limited ourselves to half of the maximum speed.
  • Loading branch information
jpieper committed May 4, 2021
1 parent 55c02fd commit 33ce490
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fw/bldc_servo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1512,7 +1512,7 @@ class BldcServo::Impl {
-max_V, max_V);

const float max_current_integral =
kMaxVoltageRatio * 0.25f * status_.filt_bus_V;
kMaxVoltageRatio * 0.5f * status_.filt_bus_V;
status_.pid_d.integral = Limit(
status_.pid_d.integral,
-max_current_integral, max_current_integral);
Expand Down

0 comments on commit 33ce490

Please sign in to comment.