Hello,
Having seen the tutorial problem of a person walking, I was wondering if it was possible to simulate the recordings that could be made by an accelerometer? In particular, I was thinking of someone carrying a mobile phone, perhaps in their pocket, and using the various accelerometers and gyroscopes contained therein.
Our research goal would be to model these observations for "normal" people and then change some of the muscle and joint characteristics to match people suffering from degenerative neurological diseases and create other possible accelerometer time traces.
Any thoughts or insights would be much appreciated.
Thank you,
Peter.
Simulating an accelerometer
- Peter Johnston
- Posts: 2
- Joined: Sun Aug 25, 2019 10:30 pm
- Ton van den Bogert
- Posts: 168
- Joined: Thu Apr 27, 2006 11:37 am
Re: Simulating an accelerometer
Yes, that is quite straightforward. I have done this (though not with Opensim), and the steps are:
References:
[1] van den Bogert AJ, Read L, Nigg BM (1996) A method for inverse dynamic analysis using accelerometry. J. Biomech. 29: 949-954. https://doi.org/10.1016/0021-9290(95)00155-7
[2] Dorschky E, Nitschke M, Seifer AK, van den Bogert AJ, Eskofier BM (2019) Estimation of gait kinematics and kinetics from inertial sensor data using optimal control of musculoskeletal models. Journal of Biomechanics, in press. https://doi.org/10.1016/j.jbiomech.2019.07.022
- For a 3-axis accelerometer, you need to know where it is placed (position p in local body segment coordinates) and how it is oriented (rotation matrix Rs of the sensor axes relative to the local coordinate axes. These are all constants.
- At any time point in the movement, use the Opensim API to obtain the following motion variables: global acceleration a of the body segment origin, global orientation R of the body segment axes, body segment angular velocity w and angular acceleration w'. Angular velocity and acceleration vectors should be expressed in (or transformed to) the local segment coordinate system.
- The 3x1 matrix simulating the 3-axis accelerometer signals is then: s = Rs * [ Rinv * (a - g) + w' x p + w x (w x p) ], where g is the global acceleration of gravity vector.
References:
[1] van den Bogert AJ, Read L, Nigg BM (1996) A method for inverse dynamic analysis using accelerometry. J. Biomech. 29: 949-954. https://doi.org/10.1016/0021-9290(95)00155-7
[2] Dorschky E, Nitschke M, Seifer AK, van den Bogert AJ, Eskofier BM (2019) Estimation of gait kinematics and kinetics from inertial sensor data using optimal control of musculoskeletal models. Journal of Biomechanics, in press. https://doi.org/10.1016/j.jbiomech.2019.07.022
Last edited by Ton van den Bogert on Wed Sep 25, 2019 5:22 pm, edited 2 times in total.
- Peter Johnston
- Posts: 2
- Joined: Sun Aug 25, 2019 10:30 pm
Re: Simulating an accelerometer
Dear Ton,
Thanks very much for your reply and the attached references.
I will investigate this further in the OpenSim API, along with the information in your references.
Thanks again,
Peter.
Thanks very much for your reply and the attached references.
I will investigate this further in the OpenSim API, along with the information in your references.
Thanks again,
Peter.
- Ton van den Bogert
- Posts: 168
- Joined: Thu Apr 27, 2006 11:37 am
Re: Simulating an accelerometer
One additional thought. If Opensim can give you the global acceleration of the point p where the accelerometer is attached (rather than acceleration of the origin of the local coordinate system), you can use that acceleration in the first term of the equation and remove the other two terms. In effect, angular acceleration and centrifugal effects have already been taken into account.
And maybe one more. The above mathematical model based on kinematics is needed if you only do kinematic analysis.
If you are doing forward dynamics, you have another (though less elegant) option which is to simulate an actual accelerometer mechanism. It would be a small mass, attached to the body with a stiff and critically damped spring-damper that has a resting lengh of zero. The 3D force in the spring/damper, divided by the accelerometer mass, is the signal that the accelerometer will send out. That is how an accelerometer actually works. Be careful that you don't make the natural frequency of that mass-spring-damper system too high because that will slow down the forward dynamics. 100 Hz would be high enough.
And maybe one more. The above mathematical model based on kinematics is needed if you only do kinematic analysis.
If you are doing forward dynamics, you have another (though less elegant) option which is to simulate an actual accelerometer mechanism. It would be a small mass, attached to the body with a stiff and critically damped spring-damper that has a resting lengh of zero. The 3D force in the spring/damper, divided by the accelerometer mass, is the signal that the accelerometer will send out. That is how an accelerometer actually works. Be careful that you don't make the natural frequency of that mass-spring-damper system too high because that will slow down the forward dynamics. 100 Hz would be high enough.