Using .sto file to prescribe controls

SCONE is a software tool for predictive simulations of biomechanical movement. It uses OpenSim for modeling and simulation, and performs optimization using various control strategies, including feed-forward control, proprioceptic feedback control, and bal
POST REPLY
User avatar
Mark Price
Posts: 5
Joined: Tue May 31, 2016 11:02 am

Using .sto file to prescribe controls

Post by Mark Price » Fri Mar 27, 2020 3:27 pm

Hi Thomas,

I was wondering if there is a simple way to import all of the model controls from a .sto file in a ScriptController. I'm interested in optimizing muscle parameters with a given set of controls to track a motion. I imagine this would work similarly to how the model states are imported with the MimicMeasure, but I can't see how to do it with a Lua script offhand.

Thank you for the useful resource,
Mark

User avatar
Thomas Geijtenbeek
Posts: 457
Joined: Wed Mar 12, 2014 8:08 am

Re: Using .sto file to prescribe controls

Post by Thomas Geijtenbeek » Tue Mar 31, 2020 5:58 am

Hi Mark,

Do I understand correctly that you want to load a series of excitation values from a file to control the model? Even though this is technically possible, it is not recommended to do such an optimization, because the number of control parameters will be very high (e.g. >>1000). The CMA-ES optimization algorithm does not work well with such high-dimensional parameter spaces.

The prefered way would be to use a controller with less parameters and estimate the initial values based on the controls you have. If you can tell me a bit more about the model and task you wish to perform, I can give you a more detailed suggestion.

User avatar
Mark Price
Posts: 5
Joined: Tue May 31, 2016 11:02 am

Re: Using .sto file to prescribe controls

Post by Mark Price » Tue Mar 31, 2020 12:02 pm

Yes, that's more or less correct. The only difference is that I'm not intending for the muscle controls to be used as optimization parameters. I was hoping to load a series of excitations that play out the same way every time, based on some EMG data we've previously collected. The only optimization variables would be the muscle model parameters, attempting to minimize the tracking error between our experimental joint angles and the simulated joint angles.

The main reason I wanted to do it this way was so that I could use our recorded EMG data as model inputs, and solve a tracking problem by optimizing the muscle parameters. Maybe it's possible to simplify the EMG signal into an expression with fewer dimensions, however.

User avatar
Thomas Geijtenbeek
Posts: 457
Joined: Wed Mar 12, 2014 8:08 am

Re: Using .sto file to prescribe controls

Post by Thomas Geijtenbeek » Thu Apr 02, 2020 5:27 am

That might work, depending on the complexity of the model and the duration of the motion. If your motion has external contact forces (e.g. walking), then I would not recommend this approach. Also, you're likely to need at least some optimization of the control signal, if only to compensate for inaccuracies in the EMG signal.

POST REPLY