Skip to main content
Advertisement

< Back to Article

Fig 1.

Overview of Moco.

OpenSim Moco produces the optimal motion and muscle behavior for an OpenSim musculoskeletal model [54], given goals to achieve during the motion and reference data. Moco provides a library of goals, such as minimizing effort (illustrated with an indirect calorimetry mask), deviation from marker data (or generalized coordinate data), and joint loading. Reference data for the motion (markers or generalized coordinates), external forces (from force places), and muscle activity (from electromyography) are optional. Illustration credit: Kai Rasmussen.

More »

Fig 1 Expand

Fig 2.

Overview of MocoStudy.

Researchers can use Moco to solve custom optimal control problems via a library of cost, boundary constraint, and path constraint modules. Moco contains additional cost modules beyond what is shown here, and users can define their own custom modules.

More »

Fig 2 Expand

Fig 3.

Example code for a simple problem.

This MATLAB code uses Moco to find the force to apply to a point mass to move the mass by one meter (starting and ending at rest) in minimum time. Solving this problem requires only 9 lines of code.

More »

Fig 3 Expand

Fig 4.

Using trajectories to solve problems iteratively.

Guesses for the optimization are specified using MocoTrajectory, which holds the values of states, controls, and parameters at any iteration in the optimization. MocoSolution is a subclass of MocoTrajectory that holds the solution to a study and includes the success status of the optimization, the final objective value, and the number of solver iterations. Users can use the solution of one problem as the initial guess for a subsequent problem.

More »

Fig 4 Expand

Fig 5.

Solving prescribed motion, tracked motion, and predicted motion problems.

Moco provides the tools MocoTrack and MocoInverse for solving standard problems. Both require a Model and kinematic data as inputs and produce controls and actuator states as outputs, but these tools solve different optimal control problems. MocoTrack produces a new simulated motion, while MocoInverse does not permit deviations from the provided kinematic data. Predicting a motion is not easily standardized and requires a custom MocoStudy.

More »

Fig 5 Expand

Fig 6.

Verification of time-stepping and motion tracking.

Left: The trajectory of a point mass suspended by three muscles and moving under the influence of gravity (g) was simulated using Moco. Right: The activations of the “left,” “middle,” and “right” muscles are shown for different simulations. The original trajectory (gray band) was predicted by minimizing final time and the sum of squared muscle excitations. The time-stepping forward simulation driven with the predicted controls (blue) produced the motion we originally predicted. Tracking the predicted motion with MocoTrack (orange) produced the original activations.

More »

Fig 6 Expand

Fig 7.

Estimates of muscle activity during walking.

MocoInverse produced muscle activations (black) whose timing was similar to the timing from electromyography measurements (gray) for all muscles shown except iliacus. Electromyography for gluteus maximus and iliacus comes from Perry and Burnfield [68]; electromyography for all other muscles comes from Rajagopal et al. [59] and was normalized such that its peak matched the peak of the MocoInverse activations. Adding a cost term for knee joint loading reduced the activity of the biceps femoris short head and medial gastrocnemius, which span the knee (blue), and increased the activity of other muscles to ensure the original prescribed motion was achieved.

More »

Fig 7 Expand

Fig 8.

Tracking 3-D experimental motion data.

Top: MocoTrack produced kinematics (black) that tracked experimental data (gray). Left: MocoTrack produced sagittal plane ground reaction forces (black) whose timing matched that of experimentally-measured ground reaction forces (gray). However, the magnitude in the first peak of the vertical ground reaction force was overestimated. Right: Similar to MocoInverse, MocoTrack produced muscle activations (black) that matched the timing of electromyography measurements (gray). Electromyography for gluteus maximus and iliacus comes from Perry and Burnfield [68]; electromyography for all other muscles come from Rajagopal et al. [59] and signals were again normalized such that their peak matched the peak of the MocoInverse activations to be consistent with Fig 7.

More »

Fig 8 Expand

Fig 9.

Effect of weakened dorsiflexors and hip abductors on motion tracking.

Left: Weakening the ankle dorsiflexors caused ankle plantarflexion to increase during early stance and swing (orange) compared to the experimental ankle angle (gray) and the normal tracking solution (black curves, white skeleton). The tibialis anterior force is normalized by the normal max isometric force of the muscle, Fiso. Right: Weakening the hip abductors resulted in a reduced hip adduction angle (green) during stance compared to the experimental hip adduction angle (gray) and the normal tracking solution (black). As shown in the skeleton graphic, increased trunk sway was observed (green) compared to the normal tracking solution (white). The force in the gluteus medius, a primary hip abductor, was nearly reduced to zero across the gait cycle.

More »

Fig 9 Expand

Fig 10.

Predicting and assisting a squat-to-stand motion.

Left: We predicted a squat-to-stand motion with prescribed initial and final poses that minimized the sum of squared muscle excitations and final time, then added a torsional spring to the knee and solved for the optimal spring stiffness k. Right: The activations of key muscles throughout the motion without (black) and with (blue) the assistive spring show that the spring allowed gluteus maximus and vasti activity to decrease substantially.

More »

Fig 10 Expand

Table 1.

Durations and settings for optimization problems.

More »

Table 1 Expand