Marlin's Bézier vs sinusoidal speed profile

Bugfix-1.1 branch of Marlin firmware does include a fifth-degree (quintic) Bézier polynomial for the speed profile. If you want to use it enable S_CURVE_ACCELERATION define. You can have a look at the source code, luckily well commented so we can understand where it is coming from.

I was curious to check how different that curve was from the sinusoidal speed profile I mentioned in a previous entry. Although the source code comments are very thorough on how they reach their expression, in layman's terms is something the speed along a move is

s(t)= (6*t5-15*t4+10*t3)*|v1-v0|+v0

where v1 is the final speed, v0 is the initial speed and t varies from 0 to 1 to trace the motion.

I was surprised on how it looked quite similar to the sinusoidal case, so I went on and did a comparison with the sinusoidal s-curve:

And the result is that there is not much of a difference so I don't expect much different behavior when using one or the other. 


Popular posts from this blog

VFD control with Arduino using RS485 link

4xiDraw: Another pen plotter

Arduino mood light