16 ms·
How are you creating your ramping? Most low end CNC controllers do constant-acceleration ramping. If you plot the velocity over time, it looks like a trapezoi
by tmuir 11y ago
How are you creating your ramping? Most low end CNC controllers do constant-acceleration ramping. If you plot the velocity over time, it looks like a trapezoid. This is obviously easier computation for a microcontroller, but at the points you change from constant acceleration to constant velocity, you have spike in jerk, which is the derivative of acceleration. It is these points which are creating the jolts in the system.
A better ramping scheme is to use constant-jerk acceleration. If you plot velocity over time, the acceleration and deceleration segments look like the letter 'S', which is why this is also referred to as S curve ramping.
The gist of it is that an axis has some maximum acceleration it can achieve, Amax. Accelerating faster than Amax in a stepper motor means that the motor cant execute all of the steps you send it. To achieve constant jerk acceleration, you increase the acceleration constantly until you've reached Amax. Then you accelerate at constant acceleration for some time. Finally, you decrease your acceleration constantly until it reaches 0. Obviously, you want this ceasing of acceleration to coincide with achieving the desired velocity. You first find the two constant-jerk sections times, and then deduce the constant-acceleration section's time. The amount of jerk used is determined by how much extra time you're willing to spend in comparison to constant-acceleration ramping.
The downside is increased computation. Constant-acceleration ramping only needs to solve for time in a 2nd order equation, which is just the quadratic formula. Constant-jerk ramping must solve for time in a 3rd order equation, a much more computationally intensive task. This explains why its normally a feature only found in high end CNC controllers.