Bilateral State Symmetry in an Asymmetric Model

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
Tyler Morrison
Posts: 9
Joined: Wed Nov 06, 2019 7:00 am

Bilateral State Symmetry in an Asymmetric Model

Post by Tyler Morrison » Fri Jan 08, 2021 10:46 am

I'm working on a predictive gait simulation problem for which I would like to use an asymmetric MSK model. The simplest example of this would be, for example, a model with a larger tibia body mass on the left side versus the right side. However, to keep the problem simpler, I would still like to enforce kinematic bilateral symmetry and assume that the left side and right side joint angles follow the same periodic trajectory with a phase offset.

Presently, the goto method for bilateral symmetry is simulating half of the gait cycle and imposing periodic boundary constraints that match right side states and controls to left side. Using this method where the states, controls, and model are all bilaterally symmetric and periodic, the effort function -- as a function of the state variables, and controls only -- is guaranteed to be periodic on the half-gait cycle. So if we generate a cost of walking for the half gait-cycle, given the model is symmetric, we can simply double the half-cycle cost to get the full gait-cycle cost.

However, if the model parameters are not symmetric, but we still want the kinematics to be symmetric this does not work. If, for example, the mass of the left tibia body is higher than the right, it follows that some muscle activations will have to be larger on the left leg than the right leg for the same joint angle trajectory on each leg. Given this, we cannot assume or specify bilateral symmetry for the muscle activations or excitations. If our effort is computed from the muscle activations or excitations, we cannot simulate a half gait cycle anymore because the effort integrand will not be periodic on a half gait cycle. For example, if the left tibia is more massive than the left, left swing will be more effortful than right swing. As a result, if we did just simulate the half gait cycle with periodic boundary constraints with state pairs to enforce kinematic bilateral symmetry, we would end up with an an underestimate of the cost of that gait as the simulation would favor only running over the half of the gait cycle which involves mostly right swing and left stance.

I am wondering if anyone is aware of a way to craft this problem correctly using the existing MoCo goals and constraints. Presently, looking through all the available options the only solutions I can think of require building a new goal or constraint.

For example, this could involve:
  • Implementing a 'stronger' bilateral symmetry MocoGoal which requires that two state trajectories be identical according to a prescribed or variable phase difference. For use in simulating a whole gait cycle.
  • Building an OpenSim model which contains two copies of the MSK system: an original and a duplicate, plus building a new MocoGoal or extending an existing MocoGoal that aims to keep two states identical (e.g.: model1_knee_ankle_r = model2_knee_angle_l). For use in simulating a half gait cycle on one model and the other half on the duplicate model concurrently.
  • Implementing multi-phase TO problems in MoCo. Phase 1 is the first half of the gait cycle. Phase 2 is the second half of the gait cycle. And implementing a MocoGoal that the matches state trajectories in pairs in the two phases (e.g.: phase1_knee_angle_r = phase2_knee_angle_l).
I'm interested in this symmetry goal both as a constraint and a cost term. It would be nice to have a solution for both cases.

If there is no precedent or known solution using the available MoCo goals, I would be interested in helping implement what is necessary for the best solution. I use MoCo from MATLAB mostly and I have recently succeeded in building MoCo from source including the Java bindings, but am totally knew to working on and building such a large project.

User avatar
Ross Miller
Posts: 375
Joined: Tue Sep 22, 2009 2:02 pm

Re: Bilateral State Symmetry in an Asymmetric Model

Post by Ross Miller » Sat Jan 09, 2021 5:29 am

Hi Tyler,

This can be done in theory and has been done before in biomechanics, e.g. one of Matt Handford's simulation studies on walking with a unilateral prosthesis tested conditions with constrained bilaterally symmetric kinematic states:

http://doi.org/10.1038/srep19983

In practice I don't think it can be done within the current capabilities of Moco. I think the closest you could get, similar to your third suggestion, would be (i) generate a one-step simulation then (ii) mirror that solution and use the kinematics and joint moments as inputs to MocoInverse to get the muscle states. The limitation there will be that the mirrored solution's kinematic states will not necessarily be feasible for the model to produce. You could possibly check this by allowing the controls in the MocoInverse problem to go above the usual limit of 1.0 and seeing if it still gets max controls below 1.0.

Ross

User avatar
Tyler Morrison
Posts: 9
Joined: Wed Nov 06, 2019 7:00 am

Re: Bilateral State Symmetry in an Asymmetric Model

Post by Tyler Morrison » Sun Jan 10, 2021 8:05 pm

Thank you for your comments Ross. Yes, the studies from Handford would be one example of such asymmetry. It looks like I will have to come up with custom goal and constraint solutions for this. I wanted to post to the forums to avoid getting too far into it only to find out that someone else was already working on it or had thought of a clever workaround.

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

Re: Bilateral State Symmetry in an Asymmetric Model

Post by Nicholas Bianco » Wed Jan 13, 2021 12:38 pm

I think Ross' suggestion is a good one (i.e., mirroring the states from a one-step solution), but I would consider using that for a tracking problem rather than MocoInverse so you don't have to worry about mirroring the external loads. You could also choose what coordinates to track; for example, only track lower-limb coordinates and let the pelvis coordinates be whatever they need to solve.

Multi-phase problems are on the back-burner for now, and your second suggestion would also require major changes to Moco. Hopefully a clever problem could work for you in the meantime.

POST REPLY