Hello Everyone. Thank you in advance for taking the time to read my question and helping me out.
I am designing a closed loop position control with steppers. I use DRV8834 motor driver in 32 microsteps integrated with an stm32l462re microprocessor. I use linear potentiometer as my position sensors. Right now I have a trapezoidal velocity profile implemented where upon receiving a new desire position the motors start at Vstart and accelerate to Vmax and then decelerate back to Vstart. If there isn't enough steps for them to complete their acceleration to Vmax then they start slowing down before hitting Vmax. The problem is that the velocity profile resets and starts again from Vstart every time a new position is received. I want it to work in a way such that if the motor is accelerating and the new position is in the same direction as the old one, it should keep accelerating, and if it is in a different direction then it should decelerate and then change direction and etc. I am hoping this would reduce some jitter. I am looking for some general ideas for implementation or if anyone could point me towards an article or another forum post that might address a similar issue.
Thank you!
I am designing a closed loop position control with steppers. I use DRV8834 motor driver in 32 microsteps integrated with an stm32l462re microprocessor. I use linear potentiometer as my position sensors. Right now I have a trapezoidal velocity profile implemented where upon receiving a new desire position the motors start at Vstart and accelerate to Vmax and then decelerate back to Vstart. If there isn't enough steps for them to complete their acceleration to Vmax then they start slowing down before hitting Vmax. The problem is that the velocity profile resets and starts again from Vstart every time a new position is received. I want it to work in a way such that if the motor is accelerating and the new position is in the same direction as the old one, it should keep accelerating, and if it is in a different direction then it should decelerate and then change direction and etc. I am hoping this would reduce some jitter. I am looking for some general ideas for implementation or if anyone could point me towards an article or another forum post that might address a similar issue.
Thank you!