Skip to content

Commit

Permalink
Hmmm, don't know how this wasn't needed initially
Browse files Browse the repository at this point in the history
All tests now indicate that the factor of half is necessary here to
get reasonable results, which also makes sense since the voltage is
only the difference from the virtual center.
  • Loading branch information
jpieper committed May 9, 2022
1 parent 47756c5 commit a60aab4
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 @@ -1685,7 +1685,7 @@ class BldcServo::Impl {
// This is conservative... we could use std::hypot(d, q), however
// that would take more CPU cycles, and most of the time we'll
// only be seeing q != 0.
const float max_V = adjusted_max_power_W_ /
const float max_V = 0.5f * adjusted_max_power_W_ /
(std::abs(status_.d_A) + std::abs(status_.q_A));

if (!config_.voltage_mode_control) {
Expand Down

0 comments on commit a60aab4

Please sign in to comment.