Optimization with different datasets

OpenSim Moco is a software toolkit to solve optimal control problems with musculoskeletal models defined in OpenSim using the direct collocation method.
POST REPLY
User avatar
Sepehr Ramezani
Posts: 35
Joined: Tue Nov 05, 2019 2:02 pm

Optimization with different datasets

Post by Sepehr Ramezani » Thu Oct 28, 2021 9:28 pm

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

User avatar
Ton van den Bogert
Posts: 164
Joined: Thu Apr 27, 2006 11:37 am

Re: Optimization with different datasets

Post by Ton van den Bogert » Fri Oct 29, 2021 8:59 am

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

User avatar
Nicholas Bianco
Posts: 963
Joined: Thu Oct 04, 2012 8:09 pm

Re: Optimization with different datasets

Post by Nicholas Bianco » Fri Oct 29, 2021 3:29 pm

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

User avatar
Sepehr Ramezani
Posts: 35
Joined: Tue Nov 05, 2019 2:02 pm

Re: Optimization with different datasets

Post by Sepehr Ramezani » Wed Nov 10, 2021 12:32 pm

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,

User avatar
Nicholas Bianco
Posts: 963
Joined: Thu Oct 04, 2012 8:09 pm

Re: Optimization with different datasets

Post by Nicholas Bianco » Wed Nov 10, 2021 9:34 pm

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.

POST REPLY