Page 1 of 1

CMC runtime issue

Posted: Thu Oct 15, 2020 1:11 pm
by keatonscherp
I am trying to run a simulation in which I use a bayesian optimizer in matlab to search for optimal control parameters for a knee exoskeleton (modeled in OpenSim). As part of this process, each selected set of control parameters is used to create a torque profile which is given to OpenSim in order to run the CMC algorithm and find muscle forces. That result is then fed into the Joint Reaction Analysis tool to find the joint contact force for the knee. Based on this result, the optimizer sets another set of parameters in order to find control parameters that minimize joint load.

My problem is that the CMC algorithm takes a very long time to run even a short amount of data. This means that with so many loops, the time to run a simulation is prohibitive. I've considered using static optimization and the new direct collocation methods, but from my preliminary examinations they seem to still require a similar time frame. Do you have any suggestions on how I could increase the efficiency of this process or alternative ways to accomplish a similar goal?

(Before running this, my pipeline is that I have a scaled gait-2392 model of the subject and use IK and RRA to find the kinematics.)

Re: CMC runtime issue

Posted: Fri Oct 23, 2020 11:06 am
by ongcf
Static optimization should run faster than computed muscle control. The drawback is that it does a "frame-by-frame" analysis, so there's no forward simulation done, which could make simulating some motions less reliable than in CMC. The positive, is that the "frame-by-frame" analysis should be much faster. Overall, this is still an optimization over many muscles, so it's still a somewhat costly problem to solve regardless.

Some resources to consider:
Overview of different workflows in OpenSim: https://simtk-confluence.stanford.edu/d ... rseProblem
If you're interested in creating your own custom static optimization for your needs: https://simtk-confluence.stanford.edu/d ... +in+MATLAB