I am trying to integrate instantaneous linear and angular acceleration taken at discrete time intervals (1/100 seconds, 100hz). data is collected beforehand, and integration is done offline, I only have access to these measurements at these discretized intervals, I have been trying to integrate these accelerations to reconstruct the original trajectory (position .ie x, y, z coordinates), but even at 100hz(data logging rate) there is quite a bit of deviation from the original trajectory, I have been using SEMI-IMPLICIT Euler for doing the integration.

and so I was wondering if there is any way to improve the accuracy of the integrated trajectory WITHOUT going significantly higher than 100hz (logging rate)?

note: measurements are noiseless (simulator ground truth data), logging rate has a std. deviation of 5 Hz

dataset consist of inst. angular accelerations, and inst. linear accelerations in body frame. i have access to initial orientation, velocity, position.

current code:

def integratePosition(initialPosition, initialOrientation, initialLinearVelocityBody, initialAngularVelocity,
                                    linearAccelerationsBody, angularAccelerations, frequency):
initialLinearVelocityEarth = transformToEarthFrame(initialLinearVelocityBody, eulerToQuaternion(*initialOrientation))
for a, alpha, f in zip(linearAccelerationsBody, angularAccelerations, frequency):
    initialAngularVelocity = integrateAngularVelocity(initialAngularVelocity, alpha, f)
    initialOrientation = integrateOrientation(initialOrientation, initialAngularVelocity, f)

    initialLinearVelocityEarth += transformToEarthFrame(a, eulerToQuaternion(*initialOrientation)) / f
    initialPosition = integratePosition(initialPosition, initialLinearVelocityEarth, f)

    yield initialPosition

Thank you

  • 1
    $\begingroup$ I think you'll need to provide more details of the actual math begin used before anyone can give you a useful answer. $\endgroup$
    – ryan0270
    Nov 7, 2017 at 12:35
  • $\begingroup$ ''trying to integrate these accelerations to integrate the original trajectory'', is a bit obscure to me what do you want to do reconstruct the desired trajectory from the acceleration ? desired position, velocity and/or acceleration ? Also are you doing online integration or off-line ? $\endgroup$
    – N. Staub
    Nov 7, 2017 at 12:52
  • $\begingroup$ offline integration, the dataset consist of instantaneous accelerations (linear acceleration in body frame, angular accelerations) dataset is collected before hand, i will update the question to include these details $\endgroup$
    – User.t
    Nov 7, 2017 at 12:56
  • $\begingroup$ i am trying to reconstruct the trajectory ( position in ie x, y, z coordinates) $\endgroup$
    – User.t
    Nov 7, 2017 at 12:58
  • 1
    $\begingroup$ @ryan0270 i will add them ASAP $\endgroup$
    – User.t
    Nov 7, 2017 at 13:06


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.