High Z Ground Torques in Moco Tracking Solutions

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Garrett Tuer
Posts: 5
Joined: Tue Jul 20, 2021 8:38 am

High Z Ground Torques in Moco Tracking Solutions

Post by Garrett Tuer » Fri Nov 18, 2022 4:16 pm

Hello, I am having an issue while trying to use Moco to generate a tracking solution with GRF data (using createExternalLoadsTableForGait()) for a set of experimental data that includes only the subject's joint kinematics. I've been able to generate simulations with realistic looking kinematics and GRFs, but the z-direction ground torques in the produced GRF file are very high (over 200 Nm) when they should be much closer to zero, if not zero. Consequently, this causes extraordinarily high joint moments when running ID with the results.

After reading up on the SmoothSphereHalfSpaceForce and HuntCrossleyForce models, I concluded that these high GRF torques are likely being generated because the simulation results exceed the limitations of the SmoothSphereHalfSpaceForce model. In Hunt and Crossley's referenced paper, they note that the model is valid only when the zone of contact is small in comparison to the radii of curvature of the impacting bodies. In my Moco results, the ContactSpheres tend to have considerable penetration into the ContactHalfSpace representing the floor, and I'm not sure why.

I think the reason for the high level of sphere-ground penetration could be that it is necessary to produce the necessary GRFs to balance the model's weight. Following that train of thought, I added additional contact spheres to my model's feet to try to spread out the force and reduce the necessary pressure/indentation at each contact sphere. Unfortunately, this did not work as intended. It seemed to cause the model to somewhat rapidly shift weight on each foot throughout stance, seemingly to avoid putting pressure on too many spheres.

This has led me to a few questions:

1) Am I on the right track in terms of what is causing the high z-direction ground torques? If so, what could be done to reduce the sphere-ground penetration depth I'm seeing?

2) If the penetration depth of the spheres into the ground is not the issue, what else could be causing the high z-direction ground torques? Has anyone else seen this before when using Moco to generate GRFs?

3) Why would Moco seemingly prioritize having high penetration depth between fewer spheres and the ground over having low penetration depth with more spheres and the ground? The former makes the kinematics deviate more from the reference data, worsening the tracking objective, while also seemingly violating the restrictions of the force model being used.

UPDATE:
The reference data for the mtp joints had no variation, and so the moco bounds for the joints also were set to zero with no variation. Applying custom bounds to the joints and lowering their tracking weights to zero to allow for variation in the joints throughout the simulation resolved the issue with weight distribution seeming to rapidly shift around a foot throughout stance. Still, the increase in the number of contact spheres does not seem to have much effect on the net z-direction ground torques experienced by each foot, so I'm still not sure if adding more contact spheres will really help with my issue.

UPDATE 2:
I tried a run with very high stiffness in the ContactSphereHalfSpaceForce objects to see if that would achieve the intended minimal sphere-ground penetration. While that did limit the sphere-ground penetration, it also caused an unintended effect where, for most of the time that a foot is in contact with the ground, there is no actual contact between the contact spheres and the contact half space representing the floor. Instead, the feet and their contacts hover slightly above the floor, at least when viewing the motion in the GUI. Despite this lack of contact/penetration, the GRFs are still reported, with the values matching what would be expected for the normal gait cycle. I would have thought that there would be some kind of limiting factor in these calculation to ensure the contact bodies are actually in contact, but that does not see to be the case. Additionally, the distance between the contact spheres and the ground contact half space seems to result in similar issues with the ground torque calculations as in my initial trials, i.e. it produces a large moment arm for the torque calculations, resulting in unrealistically high z-direction ground torques.
Combining these results with those from previous trials seems to indicate that in order to get proper ground torques, a couple things are required:
1.) The ContactHalfSpaceForce objects need to be calibrated properly such that they do not produce significant force when the contact bodies are not in contact. The high stiffness I used in my recent trial seems to violate this.
2.) The contact spheres must have very minimal penetration into the contact half space when they are producing force. Too much penetration will cause a large moment arm that results in unrealistically high calculated ground torques in the z-direction. Violating this condition also violates the assumptions of the Hunt-Crossley force model. This seems like the trickiest aspect to get right since the contact sphere locations are stationary on the given parent body and the amount of penetration they will have with the ground will vary based on both their position on the parent body and the parent body's position relative to the ground.

There are probably more requirements that would need to be fulfilled, but I think those are the key takeaways from my trials so far. As I said, the second point seems to be the trickier one to fulfill, and I'm not sure how it would even be done with the current tools and force models available.
Attachments
GroundTorques.PNG
GroundTorques.PNG (29.18 KiB) Viewed 312 times

Tags:

User avatar
Garrett Tuer
Posts: 5
Joined: Tue Jul 20, 2021 8:38 am

Re: High Z Ground Torques in Moco Tracking Solutions

Post by Garrett Tuer » Mon Dec 05, 2022 12:32 pm

I believe I've found the causes of my issues. The ground torques appearing abnormally high was caused by a misunderstanding of how the forces and torques in MocoUtilities::createExternalLoadsForGait() are expressed, rather than an issue with the contact spheres themselves.

The documentation for createExternalLoadsForGait() state that "Forces and torques are expressed in the ground frame with respect to the ground origin. Hence, the centers of pressure are at the origin." I interpreted this as the centers of pressure being at the ground origin. That is, when running inverse dynamics, I set the "point_expressed_in_body" property to "ground" rather than "calcn_r" or "calcn_l". However, based on my understanding of the code, I believe the forces and torques should actually be located at the origin of the contact spheres' parent body - the calcaneus in my case. The documentation seems misleading here, and it may need clarification.

I also misunderstood how the forces and torques are calculated within createExternalLoadsForGait(). I thought the forces and torques were being reported as those applied to the surface of the foot, similar to how experimental GRFs and CoP are typically expressed. As a result, I thought I needed to adjust the CoP values from (0, 0, 0) to the "correct" location on the foot and in the ground frame. However, the forces and torques are applied directly to the origin of the foot frame.

To test whether these realizations resolved my issues, I altered my ID external loads file such that the "point_expressed_in_body" variable would be the corresponding calcaneus body for the right and left GRF forces, rather than the ground. Additionally, I reverted my GRF file to use the original (0, 0, 0) values for CoP rather than those calculated for the surface of the foot. This change resulted in the joint moments calculated via ID matching what I'd expect given the controls and GRFs calculated through Moco.

POST REPLY