[Physics] Calculate kinematics of body movement from the set of spatial coordinates

computational physicshomework-and-exercisesjerkkinematicsnumerical method

Short intro

I have a set of 3D (x,y,z) spatial coordinates of arm movement obtained using motion capture system. The example set of such coordinates looks like this (rounded up):

 arm = c(-420.1, -419.8, -419.6, -419.4, -419.1, -418.8, -418.5, -418.2, 
-417.9, -417.5, -417.1, -416.8, -416.4, -416, -415.5, -415.2, 
-414.8, -414.3, -413.9, -413.5, -413.1, -412.6, -412.1, -411.6, 
-411.1, -410.6, -410.1, -409.5, -408.9, -408.3, -407.7, -407.1, 
-406.5, -405.8, -405.1, -404.5, -403.8, -403.1, -402.5, -401.9, 
-401.2, -400.5, -399.9, -399.2, -398.6, -397.8, -397.1, -396.3, 
-395.7, -395.2, -394.6, -394, -393.4, -392.9, -391.8, -391.7, 
-391.8, -391.6, -391.3, -390.8, -390.3, -389.6, -389.1, -389.7, 
-389.4, -387.9, -387.5, -387.9, -387, -386.7, -387.2, -387, -386.8, 
-386.6, -386.3, -386.1, -385.8, -385.8, -385.8, -385.8, -385.6, 
-385.5, -384.6, -384.5, -384.5, -384.5, -384.5, -384.5, -384.5, 
-384.6, -385.8, -386.2, -386.9, -387.2, -387.1, -387.5, -387.8, 
-388.1, -388.4, -388.9, -389.2)

where each number above stands for location of the arm on the $x$ axis, through time. I want to obtain the kinematic markers of average velocity, peak velocity, peak acceleration, peak deceleration and jerk index. Jerk index is defined as 'magnitude of the jerk averaged over the entire movement and relating to the smoothness of movement'.

How far did I get?

From what I read on kinematics in Wikipedia and this site I know that I can calculate average velocity using this equation:

$$
v = \frac {\Delta x}{\Delta t}
$$

I know the duration $t$ of the movement, but I am not certain how do I define displacement $x$ for this particular coordinate set. Could it be just subtracting minimal from maximal value $max(arm)-min(arm)$?

I don't know how to obtain peak velocity.

Calculating average acceleration seems easy using this equation:
$$
a = \frac {\Delta v}{\Delta t}
$$

but not sure how to get peak acceleration and peak deceleration.

No idea how I would approach calculating jerk index (magnitude of the jerk averaged over the entire movement and relating to the smoothness of movement).

If any more complex calculations would have to be involved, I work mainly in R, also in MATLAB regarding functions.

Best Answer

You need a tool to convert the data points into a) a polynomial fit, or b) a set of cubic splines which are easily differentiable. You might need to smooth the data first to get a nicer results. I have made an VBA script for Excel to do this because I used it with measured cam follower data.

Maybe if I convert the script into Matlab I can post it for you (maybe)

PS1. My reference for cubic splines is http://www.nrbook.com/c section 3.3. PS2. Do not use finite differences (Change over Change) as the results with be very unstable.

Related Question