mjbots / moteus

Brushless servo and quadrupedal robot
Apache License 2.0
828 stars 261 forks source link

Preventing Motor Stalling #71

Open kylevernyi opened 2 weeks ago

kylevernyi commented 2 weeks ago

Greetings. I am using a Moteus C1 to control some BLDC motors (as one does). I have noticed that the motor will sometimes stall at higher speeds (there is no load on the motor shaft). Is there some settings which I can tune to reduce this stalling? The motor sounds and looks as though it is getting caught over and over on the same spot. It is smooth at lower RPMs. The only settings I have changed are max current (10A) and max velocity (NaN) but I believe I am not close to max speed of the moteus.

I am experiencing stalling around 50-60 rad/sec. Also, stalling is more command when accelerating from a very low speed to a high speed.

Thanks, Kyle

jpieper commented 2 weeks ago

The most likely problem is an insufficient encoder bandwidth, but other problems are possible. What motor are you controlling and what encoder are you using for commutation and output sensing?

jpieper commented 2 weeks ago

Also, given that moteus reports all velocities in revolutions per second, do you mean Hz, or actually rad/s?

kylevernyi commented 2 weeks ago

I am using the magnetic encoder built into the board with a diametric magnet.

Interesting, I did not know that about the units. In the documentation under the velocity command, when it says

"When in Position mode, advance the desired position at the given velocity in Hz."

does that mean that the velocity command should have units of Hz?

jpieper commented 2 weeks ago

Yes all positions are reported and commanded in revolutions and all velocities are reported and commanded in revolutions per second, or Hz.

What motor are you controlling?

Can you try recalibrating with --cal-bw-hz 200 ?

jpieper commented 22 hours ago

Were you able to get this to work?