Motion control
SimpleFOClibrary gives you the choice of using 3 different closed-loop motion control strategies:
You set it by changing the motor.controller
variable. If you want to control the motor angle you will set the controller
to MotionControlType::angle
, if you seek the torque of the BLDC motor either through voltage or the current use MotionControlType::torque
, if you wish to control motor angular velocity MotionControlType::velocity
.
// set FOC loop to be used
// MotionControlType::torque
// MotionControlType::velocity
// MotionControlType::angle
motor.controller = MotionControlType::angle;
For more information about the source code implementation of the motion control strategies check the library source code documentation