Moment arms for tibia bending moment

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Lars van Rengs
Posts: 16
Joined: Sat Jan 08, 2022 7:21 am

Moment arms for tibia bending moment

Post by Lars van Rengs » Fri Mar 11, 2022 10:01 am

Hi OpenSim experts,

We want to calculate the tibia bending moment using the equations from Baggaley (2021) Internal Tibial Forces and Moments During Graded Running. However we are unsure how to derive some of the parameters needed for these equation from OpenSim or the Matlab interface.

Specifically, we need to calculate the moment produced by the ankle joint contact force and the moment due to gravity. We know the force of gravity and ankle contact force, but also need the moment arms of both forces at 1/3th of the tibia, but we don't know how to find these in the created files. We did the model scaling, inverse kinematics and inverse dynamics in OpenSim, afterwards we did an dynamic optimization in Matlab, and finally we did the joint reaction analysis and muscle analysis again in OpenSim. Is there an option in OpenSim to calculate these moment arms? Or is there any Matlab-code available to calculate moment arms that are not related to muscle forces?

The exact equation that we want to use are also provided in the attachments for completeness.

FJ is the ankle joint contact force, which we get from joint reaction analysis
Fmi is the force of the ith muscle that originates or inserts on the tibia distal to the cross section, which we get from the dynamic optimization
Fg is the force due to gravity acting on the portion of the tibia that is distal to the cross section, which we can rather easily estimate.

rFJ , rmi , and rg are the corresponding moments arms, respectively.
Attachments
M internal.png
M internal.png (5.84 KiB) Viewed 618 times
F internal.png
F internal.png (4.03 KiB) Viewed 618 times

Tags:

User avatar
John Davis
Posts: 56
Joined: Mon Aug 26, 2019 7:42 am

Re: Moment arms for tibia bending moment

Post by John Davis » Sat Mar 12, 2022 1:52 pm

One way to calculate the relevant moment arms would be to append a PointKinematics analysis to your Joint Reaction Analysis, and set the PointKinematics to report the location of the point of interest on the tibia (expressed relative to the tibia's origin, which in most models is at the proximal end of the tibia). The PointKinematics example here might be a good jumping-off point.

As long as the joint reaction forces and the point kinematics are reported in the same coordinate system it should be easy to calculate the moment arms manually in MATLAB. You would use the _px, _py, _pz columns in the JRA results as the location of the JRF vector, and the _vx, _vy, _vz columns as its direction. From there it would just be a little geometry to figure out the perpendicular distance from the JRF vector to the 1/3 point on the tibia. PointKinematics might not even be necessary if you report your JRA results in the tibia's coordinate system.

User avatar
Lars van Rengs
Posts: 16
Joined: Sat Jan 08, 2022 7:21 am

Re: Moment arms for tibia bending moment

Post by Lars van Rengs » Mon Mar 21, 2022 8:44 am

Hi John,

Thank you for your reply. We have been trying out the PointKinematics analysis last week, but have trouble understanding how to exactly use this tool and interpret the output. First we tried the double pendulum example, but we did not fully understand the output of the analysis with state_0, state_1 and state_2 for the position, velocity and acceleration. Nevertheless, we then tried different options with our own model and got results from that, but we are unsure how we should interpret them and whether we actually did it right.

We would greatly appreciate if you could give us some more information on how you would suggest to apply the PointKinematics analysis (i.e. body_name, relative_to_body_name, point_name, etc.) and how to interpret its output (state_0, state_1 and state_2) in our situation for the tibia.

User avatar
Jacob J. Banks
Posts: 88
Joined: Tue Jul 15, 2014 5:17 am

Re: Moment arms for tibia bending moment

Post by Jacob J. Banks » Mon Mar 21, 2022 1:43 pm

This code is very crude and under commented, but should provide you with the general idea of using a Matlab API to get moment arms about a specific joint. Note: I am using IK files for 'states' and just ignoring the velocity state and converting the degrees to radians, and also that instead of looking at a muscle moment arm, I am looking at an actuator moment arm (but same diff). The basic idea is to load coordinates/states into your model and then look at joint moment arms relative to a joint with those states applied frame-by-frame (so for loop). Otherwise, 50% of this code you can probably ignore as it is specific to some file stuff I was doing.

https://simtk.org/projects/emg_opt_tool
If that is a bit much, my older/other code for EMGopt method has the same general idea (but uses states files) and may be better commented.
Jake Banks
Attachments
StepX_Actuator_testMomArm.zip
(3.34 KiB) Downloaded 16 times

User avatar
Lars van Rengs
Posts: 16
Joined: Sat Jan 08, 2022 7:21 am

Re: Moment arms for tibia bending moment

Post by Lars van Rengs » Mon May 02, 2022 1:38 am

Hi,

We have now succeeded in understanding the point kinematics analysis and applying it to our situation. We were also able to correctly set up the joint reaction analysis in order to determine the desired forces in the frame of the tibia. Using the px, py and pz and the vx, vy and vz we were able to calculate the moment for the ankle contact force. For the gravitational force of the tibia, we have also been able to determine the px, py and pz (and so the moment arm) in the frame of the tibia by using the tibia mass center.

The only problem we have left, is that we have expressed all forces/moments in the frame of the tibia, while we have expressed the gravitational force of the tibia itself (9.81 * tibia mass) in the frame of the ground. Is there an option to convert this gravitational force to the frame of the tibia as well?

User avatar
Carmichael Ong
Posts: 375
Joined: Fri Feb 24, 2012 11:50 am

Re: Moment arms for tibia bending moment

Post by Carmichael Ong » Mon May 02, 2022 11:11 pm

It looks like you might be using 3.3 or an older version. Some methods in the SimbodyEngine might be useful here, and in particular, transform(): https://simtk.org/api_docs/opensim/api_ ... 7608937662

If you're in 4.0+, the Frame class has some useful functions, e.g.: https://simtk.org/api_docs/opensim/api_ ... 696dd48b02

User avatar
Lars van Rengs
Posts: 16
Joined: Sat Jan 08, 2022 7:21 am

Re: Moment arms for tibia bending moment

Post by Lars van Rengs » Tue May 03, 2022 2:20 am

Hi Carmichael Ong,

Thank you for your reply. It is true that we are using OpenSim 3.3.

It seems that we can use transfrom() to convert the vector of the gravitational force of the tibia, which is now expressed in ground (aBodyFrom = ground), to the coordinate system of the tibia (aBodyTo = tibia_r).

Unfortunately, I am unfamiliar with using the SimbodyEngine in OpenSim. I don't know what to do to make use of this SimBodyEngine? Furthermore, I don't know how we can apply the 'transform()' function to our model so that the gravitational force for each frame of the entire trial is expressed in the coordinate system of the tibia?

POST REPLY