Page 1 of 1

Optimization with different datasets

Posted: Thu Oct 28, 2021 9:28 pm
by s.ramezani
Hi all,
I'm working on optimizing some parameters of the musculoskeletal model using experimental data sets from different scenarios. Let's say we have data (marker, GRF) of walking on flat, incline, and decline surfaces and want to optimize some parameters in the model using all data set. Employing different scenarios helps to enrich the data and get a better solution.
I have tried to combine all data set and make a single large data set and feed it to MOCO however, I got discontinuous data between two different data set in the large file. Because different scenario has different gait pattern you can not find a moment in scenario1( e.g. incline) and scenario2(e.g. flat) with the same marker position and GRF, so you will get a jump in the data. This means the derivative of states will spike at that moment and causes a problem for optimization.
Do you have any idea how we can solve this problem and run optimization on all datasets?
Best,
Sepehr

Re: Optimization with different datasets

Posted: Fri Oct 29, 2021 8:59 am
by bogert
I would like to express my support for adding this capability to MOCO (if it does not already exist).

For optimal control problems, or system identification problems, we sometimes need to do this on several movement tasks at the same time. Or several instances (episodes) of the same movement task.

Ton van den Bogert

Re: Optimization with different datasets

Posted: Fri Oct 29, 2021 3:29 pm
by nbianco
Hi Sepehr and Ton,

What you're looking for is an option to solve an optimal control problem with multiple phases. Antoine Falisse used multiple phase problems to perform EMG-based calibration with GPOPS-II: https://ieeexplore.ieee.org/document/7748556.

Moco currently doesn't support multiple phase problems, but it's something we would definitely like to implement at some point in the future. However, it is a non-trivial add to Moco, and I'm currently trying to finish my PhD at the moment, so I won't have time for bigger development tasks like this for a little while.

But I am similarly excited to add this feature to allow users to perform model calibration problems in Moco. My goal is to create a new tool (similar to MocoInverse and MocoTrack) to easily pose calibration problems for creating subject-specific models, as it would be great to have a unified tool for model calibration.

Best,
-Nick

Re: Optimization with different datasets

Posted: Wed Nov 10, 2021 12:32 pm
by s.ramezani
Thanks Nick, It's a great paper.
So, I'll try to run multiple phases out side of MOCO.
If time allows I'll try add it to the my Opensim forked.
Best,

Re: Optimization with different datasets

Posted: Wed Nov 10, 2021 9:34 pm
by nbianco
You could try running an outer loop optimization that determines all the parameters you want to optimize, and in the inner loop you solve the data tracking problems with the current set of parameters. This could be pretty slow though.