vedderb / bldc

The VESC motor control firmware
2.08k stars 1.31k forks source link

Current control tuning #690

Open jschall opened 6 months ago

jschall commented 6 months ago

Would be nice to have a current control tuning tool. For me, the computed PI gains from the characterization cause overcurrent faults. There seems to be a fairly narrow middle ground where lower gains cause overcurrent faults due to poor disturbance rejection, and higher gains cause overcurrent faults due to overshoot.

A tuning tool would input steps to the current command, and then provide sampled Id and Iq data for a period after each step.

A simple way to do this would be to add Iq, Id, and a "trigger on setpoint change" to the "Sampled data" interface.

Gabrielerusso commented 4 months ago

During pid tuning I noticed that motor demeanor isn't very linear during real usage under load. So you may get good results during open loop testing or bench testing with a constant load, but then get inconsistent results in real world.

Until today the best way I found for ground vehicle was to connect the vehicle vi internet and doing tests on track with one person providing "current steps" and the other evaluating and tuning from remote.