I see that one uses amps as the feed forward value, whereas the other uses voltage, but I’m unclear what the differences are between the two otherwise.
It also changes whether amps or volts are used for closed-loop control so you would have to tune that separately.
I would only use voltage control unless you really wanted to keep a constant force, since internally current control still relies on voltage control.
MotionMagicVoltage
is the traditional motion magic routine that closely follows the behavior of the v5 API. It’s similar to a Trapezoidal Motion Profile with Jerk and Acceleration constraints and some other optimizations.
MotionMagicTorqueCurrentFOC
(requires a Phoenix Pro license) utilizes the benefits of FOC (more efficient, easier to tune) to achieve the set point more efficiently (less power needed to achieve a given target).
As for which one you should use, that really depends on a few factors.
- If you already have licensed devices, then you should probably use
MotionMagicTorqueCurrentFOC
- If your mechanism scales well with torque applied (arms are a good example) then
MotionMagicTorqueCurrentFOC
will likely be easier to tune.
I also advise taking a look at Choosing Output Type in our documentation.
MotionMagicVoltage provides the option EnableFOC
. Is that not the same?
I see the confusion.
Both are FOC but Torque Current controls Torque. This can be useful when you want to fine tune your acceleration without a slew rate limiter.
It can also simplify the dynamics of the system so that there are fewer control gains to determine (and they can be determined more accurately). YMMV though - it’s still early and we don’t have many direct comparisons of the same system controlled different ways.
Thanks everyone for your repsonses!
Semi-related question, why does MotionMagicVoltage
have OverrideBrakeDurNeutral
whereas MotionMagicTorqueCurrentFOC
has OverrideCoastDurNeutral
? Why don’t both have both?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.