# How can I determine position and (ideally) orientation and present a 3-dimensional trace of a discrete movement using raw IMU data?

6 views (last 30 days)
Thomas Swain on 16 Feb 2020
Commented: Thomas Swain on 17 Feb 2020
Hi all,
I have been supplied by a peer with IMU raw data in Excel format (attached) recorded using an ActiGraph GT9X Link device. The data was collected with the IMU worn on the right wrist.
The attached file consists of a timestamp column increasing in 0.01s increments (100Hz sampling rate), acceleration (g) in the x, y and z directions, and gyroscope data (deg/s) for the x, y and z axes.
My goal is to take this data and develop a fairly reliable 3D trace.
The data supplied is for 3 distinct demonstrations of the given movement, which can be seen clearly enough if you plot any of the acceleration or gyroscope columns against time. I am actually interested in looking at each of the three movements in isolation for comparative purposes.
I am aware of the approach of integrating the gyroscope data to get the anglular position and also twice integrating the accelerometer data to get linear position for each axis. However, I am also aware that this is unreliable, with the substantial increase in errors evident when you integrate.
I have done a significant amount of reading on the subject over the past few days and cannot seem to figure out just what I need to do to get from my current position with a quantity of raw data to a position where I can have a reliable 3D trace of each movement. Is it even possible fromthe data I have alone? One of the things I can't work out is how to use the gyroscope data to determine orientation without actually knowing the starting position, as the IMU data is actually a snapshot of an extended period of wearing the device.
Ordinarily I would take more time to work this out myself, but unfortunately I now have some rather significant time constraints, so any help people can offer, be that a process to follow, some MATLAB code to work with, references etc. then I would be extremely grateful!!
Kind regards

James Tursa on 17 Feb 2020
"... integrating the gyroscope data to get the anglular position and also twice integrating the accelerometer data to get linear position for each axis. However, I am also aware that this is unreliable ..."
Why do you think this is unreliable? That is what aircraft and spacecraft do.
"... how to use the gyroscope data to determine orientation without actually knowing the starting position ..."
You can't ... it is mathematically impossible.
What you are working is the general navigation problem with noisy sensors. You can certainly start by just integrating the data as you proposed and see how good that result is. But if the data is too noisy and you don't have any method of correcting the solution (i.e., updates, bias estimates, etc.) then you might be stuck.
Thomas Swain on 17 Feb 2020
Hi James,
Thanks for the response! I perhaps didn't use the best wording.... By unreliable, I wasn't questioning whether the integration was the correct thing to do as I know it is. It is more of a case of whether my data was too noisy to get accurate information out of it - my feeling is no.
I will have a think abut this some more......
Kind regards