View Full Version : Theoretical Motion Profiling
Turing'sEgo
01-01-2017, 11:09
What is the theoretical best time and space complexity of the respective motion profiling techniques?
I'm curious if anyone has worked it out after seeing Jaci's recent post on the matter.
You can generate 1 dimensional profiles in O(1).
For example sinusoidal motion profiling does not need any iterations what so ever; the position, the velocity and the acceleration can be all described with trigonometric functions.
We tried those on our drive system and it worked pretty well, but there might be other methods as well.
For further reading: https://www.chiefdelphi.com/media/papers/3107
credit to Ether of course :)
Jared Russell
01-01-2017, 17:47
You can obtain the equations and switching times necessary to compute any arbitrary trajectory point in constant time (per degree of freedom). (EDIT: Assuming your constraints (min/max velocity and acceleration) are constant throughout the entire trajectory.)
What Jaci accelerated was the arc-length parameterization of splines, which is a necessary first step to obtain a uniformly-spaced trajectory that can then be time-parameterized with a motion profile. Parameterizing a spline by arc length involves evaluating an integral that generally cannot be evaluated analytically, so there is a tradeoff between accuracy and speed that must be made in coming up with a numerical solution.
Difficult integrals arise all the time in real-world engineering, and depending on the context one may use any of a number of techniques to evaluate them. Riemann sums (what Jaci was using) are a simple technique, though it may require very fine sampling to work well. Other techniques include Euler Method (https://en.wikipedia.org/wiki/Euler_method) or higher-order Runge-Kutta methods (https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods).
Other techniques include Euler Method (https://en.wikipedia.org/wiki/Euler_method) or higher-order Runge-Kutta methods (https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods).
For students who may be interested: There's a recent thread here (https://www.chiefdelphi.com/forums/showthread.php?t=152790) which has a discussion and some simple examples of solving Initial Value Problems using Euler vs Midpoint (Midpoint is a 2nd-order Runge-Kutta method which is easily implemented in a spreadsheet).
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.