simplefoc / Arduino-FOC

Arduino FOC for BLDC and Stepper motors - Arduino Based Field Oriented Control Algorithm Library
https://docs.simplefoc.com
MIT License
1.95k stars 511 forks source link

inital implementation of the velocity feed forward #267

Closed askuric closed 9 months ago

askuric commented 1 year ago

For example for trapezoidal velocity profile: https://community.simplefoc.com/t/3d-printed-robot-arm-acceleration-deceleration-planner-algorithm/958/39

dekutree64 commented 1 year ago

I was just looking through all the pull requests, and I think I spotted a typo in this one. BLDCMotor.cpp line 422 and StepperMotor.cpp line 311 constrain shaft_angle_sp to the velocity limit. Shouldn't it be shaft_velocity_sp that is constrained?

askuric commented 1 year ago

Hey @dekutree64, You're absolutely right! I'm so glad that it stayed in this PR, thanks for taking the time to go in such detail. I'll update it right away!

askuric commented 9 months ago

I am not sure how, but this is already inside the dev branch. :D I must have done some accidental pushes. So, there is no point in leaving this one open any more, I'm merging it.