sahil-kale / basilisk-actuator-control-lib

Hardware-agnostic library enabling field oriented control of of PMSM and BLDC Motors
https://sahil-kale.github.io/basilisk-actuator-control-lib/
1 stars 0 forks source link

Split FOC and Trap Commutation #57

Closed sahil-kale closed 8 months ago

sahil-kale commented 8 months ago

I had originally made the decision to split up the commutation strategy of the motor into 2 separate classes, FOC and TRAP. At some point I wanted to harmonize the control loops and ended up putting all the logic back together.

At some other indeterminate time, I started splitting it back up to provide better regression coverage. The advantages of run time parameterization of the commutation strategy can still be achieved in other ways (or just giving the user the option to control), but mixing these 2 together is, in retrospect, a mistake due to the bloat introduced and the paradigms introduced by forcing the control loop to care about a commutation strategy it might not employ.

TLDR split up 6 step and FOC control loops.

Reflecting on it, there really isn't much in common, except perhaps the open loop control law, which is negligible...