Moco Track and external stimulation

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
Kostas Risvas
Posts: 14
Joined: Thu Oct 03, 2019 10:24 pm

Moco Track and external stimulation

Post by Kostas Risvas » Wed Sep 04, 2024 3:25 am

Greetings everyone,

I have some kinematic data of post-stroke patients and i would like to investigate possible rehabilitation strategies. I would like to know if i can use Moco Track and somehow model external stimulation effect (mimicking FES for example) to study how this affects (improves or not) the recorded pathological gait pattern.

Thanks in advance,
Kind Regards,

Kostas

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

Re: Moco Track and external stimulation

Post by Nicholas Bianco » Wed Sep 04, 2024 9:31 am

Hi Kostas,

In OpenSim 4.5, you can use MocoControlBoundConstraint to bound muscle excitations to a specified range, or use MocoControlTrackingGoal to track a desired signal.

If you're able to upgrade to OpenSim 4.5.1 via the latest Conda packages, then you can prescribe a desired muscle excitation signal directly via a PrescribedController.

Best,
Nick

User avatar
Kostas Risvas
Posts: 14
Joined: Thu Oct 03, 2019 10:24 pm

Re: Moco Track and external stimulation

Post by Kostas Risvas » Thu Sep 05, 2024 1:25 am

Hi Nick,

thanks a lot for your prompt and detailed reply. I will give it a try and see how things go.

Best,
Kostas

User avatar
Kostas Risvas
Posts: 14
Joined: Thu Oct 03, 2019 10:24 pm

Re: Moco Track and external stimulation

Post by Kostas Risvas » Tue Feb 11, 2025 7:22 am

Greetings again,

I have managed to model external excitations for certain muscles using the moco control tracking goal and the prescribed controller method. Therefore, i track a reference motion of a patient and observe how different signals change the kinematics.

I would like to ask the following. Could I somehow "close the loop" so the signals change based on the difference between the simulation output and a desired trajectory (e.g. healthy kinematics)? Can this be done by adjusting the cost function or by imposing a control strategy at the end of each simulation and change the input? I imagine that this could be performed by using forward dynamics and then having a controller to adjust the input excitation for each muscle group.

Kind regards,
Kostas

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

Re: Moco Track and external stimulation

Post by Nicholas Bianco » Wed Feb 12, 2025 2:46 pm

Hi Kostas,

There is currently no way to include feedback control in Moco simulations. Even if you could, direct collocation would likely not give you the results you are looking for, since it solves for the entire trajectory simultaneously (unless you model the states as a stochastic process).

Like you suggest, it would be better to have an outer-loop optimization or controller that adjusts the input excitations based on the kinematic differences. The only question is whether that is computationally tractable.

Best,
Nick

User avatar
Kostas Risvas
Posts: 14
Joined: Thu Oct 03, 2019 10:24 pm

Re: Moco Track and external stimulation

Post by Kostas Risvas » Thu Feb 13, 2025 12:43 am

Hi Nicholas.

This is what I was afraid of. Even with a simple model the outer-loop optimization direction seems intimidating to me. Maybe I will stick to the solution I currently have and try to track down the problem adopting a sensitivity analysis approach.

Kind regards and thanks a lot for your suggestions,
Kostas

POST REPLY