Scaling Geometry, Weight and Inertia of a New added Body

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Ali Khalilianmotamed Bonab
Posts: 47
Joined: Mon Aug 13, 2018 6:28 am

Scaling Geometry, Weight and Inertia of a New added Body

Post by Ali Khalilianmotamed Bonab » Wed May 29, 2019 3:23 am

Dear Opensim experts,
Hi,
I am adding a new body to my musculoskeletal model which is a passive element with a predetermined weight, inertia, and geometry. I have some question according to modeling a new body on the musculoskeletal model :

1) First of all, since this body was already designed and all properties are set, when I am importing the center of mass, the shown COM place does not make any sense and it is shown out of body's geometry. Should I scale the center of mass place based on geometry's scaling? or I need to scale this according to PhysicalOffsetFrame scale?

2) Secondly, When we are adding the geometry to the system, it is designed for real human musculoskeletal geometry without any scaling and while I am scaling the added geometry, should I scale the weight and inertia? If I should, how should I modify the scaling tool?

3) While we know in real human what is the position of the body with respect to each limb, I am positioning the geometry of the body using GUI without any exact knowledge about the translation and orientation of the body. How we can find the correct position of the new body? To more clarify, For instance, I want to stick this body to the femur and I want it to be completely fitted to the femur, How can I perform this task?

4) The last question is about the effect of position and orientation of the added body on the results of RRA and CMC. Since it is a dynamic simulator, it is expected that the system should be affected by the position and orientation of the new body, I would appreciate if someone can confirm this. Another issue about OpenSim is about reflected inertias, Once I asked this question and none of the OpenSim developers answered me, Again, since it is a dynamic simulator, It is expected to perform all reflected inertia by simTK without manually adding them to each body. I would appreciate if someone can confirm this claim.

Many thanks for all your help,
Sincerely,
Ali.

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Scaling Geometry, Weight and Inertia of a New added Body

Post by Dimitar Stanev » Thu May 30, 2019 4:56 am

1) The CoM is positioned with respect to the reference frame of the body. The geometry that is being attached to the body for visualization purposes, having its own reference frame. Therefore, if the two frames are not aligned correctly you will be confused. Try showing the body's frame in order to figure out how to transform the geometry. We created a bicycle model recently. The approach that we followed was to use blender and other software to calculate the center of mass and then transforming the object correctly before importing to OpenSim.

2) You should figure out whether the geometry is in mm or in m. You should check the unit of inertia and make sure that you are using a consistent unit system (SI).

3) The geometry does not matter if you don't define the body and joint reference frames correctly and follow a consistent convention . Then a knowledge of anatomy and biomechanics is essential for this task. This might help:

https://simtk-confluence.stanford.edu:8 ... Model+2010

4) Each body has its own inertia and mass properties. The different bodies are connected through joints and constraints. The topological properties are accounted in the calculation of the system inertia mass matrix.

User avatar
Ali Khalilianmotamed Bonab
Posts: 47
Joined: Mon Aug 13, 2018 6:28 am

Re: Scaling Geometry, Weight and Inertia of a New added Body

Post by Ali Khalilianmotamed Bonab » Thu May 30, 2019 5:03 am

Dear Dimitar Sranev,
Thanks for your complete and helpful answer,
Sincerely,
Ali.

User avatar
Ali Khalilianmotamed Bonab
Posts: 47
Joined: Mon Aug 13, 2018 6:28 am

Re: Scaling Geometry, Weight and Inertia of a New added Body

Post by Ali Khalilianmotamed Bonab » Sun Oct 06, 2019 2:50 pm

Dear Dr. Stanev,
I have two other questions about the scaling tool confusing me.
In order to scale the added body I am performing the following procedure which I am not sure if it is correct or not:
1)I am adding the new body and attaching it with weldjoint to a proper body.
2) for instance, if the new body has been attached to the femur, the scaling factor of femur was chosen for scaling the new body in ScaleTool.
3) I am not adding new bodies mass to the subject mass in scaleTool.
If I do not scale new bodies, I am getting drift in FY or MZ which I could not find any solution for fixing it than scaling.
It would be great if you can confirm or correct this procedure.
Many Thanks,
Ali.

User avatar
Ali Khalilianmotamed Bonab
Posts: 47
Joined: Mon Aug 13, 2018 6:28 am

Re: Scaling Geometry, Weight and Inertia of a New added Body

Post by Ali Khalilianmotamed Bonab » Sun Oct 06, 2019 4:24 pm

I tried three different scenarios:
1) scaling the bodies without changing the original subject mass,
2) scaling the bodies with changing the overall subject mass,
3) adding bodies without performing any scale.
Results are:
- Joint Moment for 1st and 2nd scenarios are very similar, but the second scenario residual force FY and moment MZ is drifting. For the first scenario, residual moment MZ is getting larger, but it remains in the acceptable region.
- Joint Moment for the third scenario is quite different than 2 previous scenarios and changes of them in comparison with the original model (i.e. model without any additional bodies) moments are not changing that much which does not make any sense because I am adding about 8 kg to each limb and expecting to see considerable changes in the joint moments.
Original Model Residual Forces:
original_Residuals.png
original_Residuals.png (66.43 KiB) Viewed 857 times
Third Scenario Residual Forces:
noscaling_Residuals.png
noscaling_Residuals.png (41.8 KiB) Viewed 857 times
Second Scenario Residual Forces:
scaled_masschanged_Residuals.png
scaled_masschanged_Residuals.png (33.18 KiB) Viewed 857 times
First Scenario Residual Forces:
scaled_nochangemass_Residuals.png
scaled_nochangemass_Residuals.png (43.29 KiB) Viewed 857 times
P.S. my added bodies are mirror image and identical for each left and right sides.

User avatar
Ali Khalilianmotamed Bonab
Posts: 47
Joined: Mon Aug 13, 2018 6:28 am

Re: Scaling Geometry, Weight and Inertia of a New added Body

Post by Ali Khalilianmotamed Bonab » Mon Oct 07, 2019 9:24 am

Update:
According to the literature and discussions on the forum, I noticed that scaling is not needed for the new bodies, but I had a drift on the FY and Pelvis Y. To fix this issue, I performed the following steps:
1) I relaxed the weights of marker associating with the pelvis and performed new Inverse kinematics for the subject, which has a larger marker error than the original IK, but still, the error remained in the GOOD region.
2) I relaxed the weight of pelvis_y direction in the RRA task and decreased its optimal forces. It results in considerably lower residual force in the Y direction such that maximum and RMS FY dropped down in the OKAY region, and position error is in the GOOD region for all the joints.

The remaining problem is that although FY is decreased considerably, it still drifts, as shown in the figure. My questions are:
1) is this procedure valid for reducing the residual forces?
2) is drifting a problem even if the residual force RMS and MAX remain in the acceptable region?
3) I read and know about the Troubleshooting recommendation about this drift in the Y direction. But I do not know what does it means about:
"the pelvis is not centered around zero," and since the inertial properties of the added bodies are completely valid, I do not know how should I check that the body mass and force calibration are correct. especially the force calibration one which I have no idea about it.
pError.png
pError.png (9.84 KiB) Viewed 797 times
residuals.png
residuals.png (20.81 KiB) Viewed 797 times

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Scaling Geometry, Weight and Inertia of a New added Body

Post by Dimitar Stanev » Mon Oct 07, 2019 1:06 pm

I have the impression that the drifting in your results is due to adding additional bodies that were not present during the experimental recordings (marker positions and ground reaction forces). This means that the model is not representing the subject and a systematic error is introduced. Even if you scale the geometries and their masses linearly you have already introduced an error that will increase the residual forces. Then by applying RRA you do not solve the problem completely.

Please let me know if I understood correctly and if not, please indicate the procedure - from experimental measurements to analyses - that you are following step by step.

User avatar
Ali Khalilianmotamed Bonab
Posts: 47
Joined: Mon Aug 13, 2018 6:28 am

Re: Scaling Geometry, Weight and Inertia of a New added Body

Post by Ali Khalilianmotamed Bonab » Mon Oct 07, 2019 3:48 pm

Thanks for your reply Dr. Stanev,
I am trying to use the Loaded walking model and data https://simtk.org/projects/assistloadwalk.
My aim is to model some exoskeletons that we have designed on this model with all inertia and masses to perform the simulations.
1) I am adding bodies to the previously scaled model with all inertial properties using Matlab,
2) then I am using WeldJoint to couple each segment of the exoskeleton to the subject's related bodies.
2) then I am performing IK and RRA, where these results are showing up.

The point is I followed all the instructions that I got from literature, forum discussions, and tutorials to model and add the bodies and according to those instructions, my model seems correct. I really have no idea about how should I fix this issue.

I can share my codes and model with you via email.
Sincerely,
Ali.

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: Scaling Geometry, Weight and Inertia of a New added Body

Post by Dimitar Stanev » Tue Oct 08, 2019 6:12 am

In their experiment, the load is modeled by attaching a weld body on the torso:
For our simulations of the loaded condition, we modeled the load as a hollow cylindrical channel (height 40 cm, inner radius 13 cm, outer radius 15 cm) with uniform density, welded to the torso.
If you attach the bodies on different segments, then this will induce the bias. Also, the total weight of the exoskeleton should be 38 kg, but in any case, the interaction with the legs will be a problem, since the measurements originate from a subject that is bearing a weight on the torso (e.g., a bag).

User avatar
Ali Khalilianmotamed Bonab
Posts: 47
Joined: Mon Aug 13, 2018 6:28 am

Re: Scaling Geometry, Weight and Inertia of a New added Body

Post by Ali Khalilianmotamed Bonab » Tue Oct 08, 2019 6:32 am

Thanks again for your reply,
So, do you recommend to not model the bodies of exoskeleton with inertial properties and perform ideal exoskeleton cases similar to their work?

POST REPLY