Page 1 of 1

How to improve simulation results

Posted: Mon Nov 21, 2022 12:17 am
by hoonkim
Hello,

I collected a walking trial using OpenCap.
I ran kinetic.py file after some changes (e.g., session name, trial name, etc.). After 540 iterations, I got kinetic data (e.g., GRF, muscle forces, joint reaction forces, etc.) from one stance phase of walking.

I checked the resultant ground reaction forces. However, the data was not what I expected. It was not vertical GRF with dual peaks.
And, I checkded the soleus muscle forces during walking. It was also not what I expected.

I attached what I got from the simulation.
Please give me some advice to improve the results.
Thank you very much.

(The right leg was on the ground during this stance of walking.)

Sincerely,

Hoon Kim

Re: How to improve simulation results

Posted: Tue Nov 22, 2022 12:04 pm
by antoinefalisse
Hi,

Running muscle-driven simulations is challenging, and you will often have to play with the problem settings to obtain good results. It is already great that your problem converged, congrats!

I would recommend two things:

- Simulate for a longer duration by adding a buffer (~0.3s) before and after your interval of interest. For instance, if you care about stance, make sure that your time interval starts before heel contact and after toe off. We often see that simulations at the beginning and at the end of the time interval are not so great. Alternatively, you can use periodic constraints, which will also likely make your problem converge faster (see this example: https://github.com/stanfordnmbl/opencap ... AD.py#L443). We recommend using periodic constraints whenever possible.

- Verify how well your simulations tracked the experimental data. If you had a poor tracking or poor experimental data, then you cannot expect the kinetics to be great. If the tracking is not great, consider playing with the tracking weights. You can adjust both the weight of the position, velocity, and acceleration tracking terms (https://github.com/stanfordnmbl/opencap ... AD.py#L148) and the weight for each individual coordinate (https://github.com/stanfordnmbl/opencap ... AD.py#L158). Both weights get multiplied.

For more tips and tricks, visit https://github.com/stanfordnmbl/opencap ... ps--tricks

Hope it helps,
Antoine