Firmware/Linear Acceleration

From RepRap
Revision as of 19:45, 6 December 2013 by Phord (talk | contribs) (Created page with "Linear acceleration (as opposed to [http://reprap.org/wiki/Firmware/Constant_Acceleration Constant_Acceleration]) is possible using slightly more complicated math to calculate...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Linear acceleration (as opposed to Constant_Acceleration) is possible using slightly more complicated math to calculate the stepper positions. But as it the precise answer can be attained only analytically, there are small errors which accumulate greatly over time.

Another way to achieve linear acceleration, however, is to bend time to our will. Rather than calculating the precise time of the next step during each timer interrupt, we can scale real time and perform the analytical calculus needed to determine how much scaled time has passed during the current move. If we do this often enough (Teacup Firmware uses a 2ms "background" timer for such tasks) we can adjust our velocity in near-real time to match a planned velocity path.

The velocity path can be calculated on the fly as the integration of some linear acceleration value, or it can simply be a linear velocity ramp, the integral of some constant acceleration value. But it can also be a linear approximation to some complex curve.

I am using it to approximate the velocity curve discussed in this paper (PDF) on exponential velocity planning.