Overview of OpenSim Workflows

Overview of OpenSim Workflows

OpenSim has a broad range of capabilities for generating and analyzing musculoskeletal models and dynamic simulations. This chapter provides an overview of these capabilities and a list of resources to find more information about each component of the OpenSim workflow. Contents include:

The OpenSim Model

One of the major goals of the OpenSim project is to provide a common platform for creating and sharing models of the musculoskeletal system. Thus, the first component of any analysis is an OpenSim model. An OpenSim model represents the dynamics of a system of rigid bodies and joints that are acted upon by forces to produce motion. The OpenSim model file is made up of components corresponding to parts of the physical system. These parts include bodies, joints, forces, constraints, and controllers.

Additional information is also available in the section on OpenSim Models. A large repository of existing models is available (see curated list or do a search on SimTK ). These include models of the lower extremity, head and neck, spine, wrist, and many other musculoskeletal regions for both humans and other animals. We encourage you to contribute your own models to SimTK to enable other researchers to build on your work and further advance the field.

A model consists of different components. For example, in a model used for the simulation of human walking, the bodies represent the geometry and inertial properties of the body segments. The joints specify the articulations at the pelvis, hip, knee, and ankle joints, while a constraint could be used, for example, to couple the motion of the patella with the model’s knee flexion angle. The forces in the model include both internal forces from muscles and ligaments and external forces from interaction with the ground. Finally, the model’s controller determines the activation of muscles (e.g., computed muscle control).

Simulation Pipelines (Workflows)

Different simulation pipelines have been developed to answer different questions. Our webinar on “Which Simulation Pipeline Should I Use? An Overview of Common Workflows” can help you select a suitable simulation pipeline. Our paper on Best practices for verification and validation of musculoskeletal models and simulations of movement also has valuable information about how to design a study. 

You can also use the questions below to guide you in selecting a suitable simulation pipeline.  The section below on Examples of Choosing a Simulation Pipeline also provides useful tips.

 1.  Do you:

a.  Have data about movement (e.g., from optical motion capture or inertial measurement units) you have collected from subjects AND

b.  Want to estimate joint angles and coordinates, joint moments, joint torques, muscle forces, muscle activity, musculotendon dynamics, metabolic cost or other values that are a function of the states of the model?

     If you answered “yes” to (a) and (b), you may have an Inverse Problem. See the Inverse Problem simulation options below. 

2.  Do you want to generate new movement given a set of prescribed controls, such as muscle excitations or joint torques? Or do you want to generate a movement to achieve a specific objective function (e.g., maximizing jump height)?

     If yes, you may have a Forward Problem. See the Forward Problem simulation options below.

3.  Do you want to estimate some change in kinematics that occurs due to a perturbation (e.g., changing segments masses or simulating the effects of a surgery)?

     If yes, you may have a Forward Problem. See the Forward Problem simulation options below.

4.  Do you have a problem that does not fit any of the previously mentioned scenarios?

     If yes, you can take advantage of OpenSim's extensibility to develop a novel pipeline.  Some examples include:

-  A MATLAB pipeline to perform static optimization with muscle synergies (publication, webinar)

-  Combining OpenSim with finite element analysis

  -  Combine OpenSim and FEBio (finite element analysis software) to study contact loads during walking (publication)

  - Interfacing musculoskeletal and finite element models to study bone structure and adaptation (webinar + links to publications)

  - Combining multi-scale data and finite element modeling of the knee (webinar + links to publications)

- Probabilistic analyses of simulations

  - A probabilistic tool to quantify the effects of population variability and model uncertainty (webinar + links to publication and tool)

  - Enabling stochastic simulations of movement with high throughput computing on the Open Science Grid (webinar + links to publications and sample files)

Common Pre-Processing Steps

For several of the simulation pipelines discussed above, the first steps are to import your experimental data and scale your model. For cases where the simulation pipeline relies on experimental data, you can read about importing various types of data below. For cases where you are simulating and analyzing the movement of a specific subject, you can read more about scaling a model below.

Importing Experimental Data

In many cases, you will use OpenSim to analyze experimental data that you have collected in your laboratory. This data typically includes:

  • Marker trajectories or joint angles from motion capture 

  • Force data, typically ground reaction forces and moments and/or centers of pressure

  • Electromyography (EMG) 

See Preparing Your Data for detailed information about preparing and importing this kind of experimental data.

As of OpenSim 4.1, we have also begun to add capabilities to analyze data from Inertial Measurement Units (IMUs). Read more about analyzing IMU Data here:

If you have imaging data, such as MRI,  which you would like to use to create subject-specific musculoskeletal models, you can try one of these tools, which are compatible with OpenSim, created by others in the community:

Scaling

If you are using a generic model from the existing library of models, the next step is to scale the model to match the experimental data collected for your subject—functionality provided by the Scale Tool in OpenSim. The purpose of scaling a generic musculoskeletal model is to modify the anthropometry, or physical dimensions, of the generic model so that it matches the anthropometry of a particular subject. Scaling is one of the most important steps in solving inverse kinematics and inverse dynamics problems because these solutions are sensitive to the accuracy of the scaling step. In OpenSim, the scaling step adjusts both the mass properties (mass and inertia tensor), as well as the dimensions of the body segments.

See the section on Scaling for more details. Tutorial 3 - Scaling, Inverse Kinematics, and Inverse Dynamics includes an example using the Scale Tool. This tutorial is also accessible from the OpenSim application Help menu.

The Inverse Problem

Inverse methods use data measured from observed moments to estimate joint angles and coordinates, joint moments, joint torques, muscle forces, muscle activity, musculotendon dynamics, and other values that are a function of the model's states. The states of the model generally include its coordinates, coordinate velocities, muscle activations, and muscle fiber lengths.

In the figure below, the black arrows show the relationship between different biological processes. The red arrows highlight how the inverse method can utilize data about observed moments to compute quantities involved in generating that movement.   



The table below compares and contrasts different inverse methods. Not all methods are available from within the OpenSim graphical user interface (GUI) (see the "Available Interfaces" column below). 

METHOD

GOAL

KEY CONSIDERATIONS

AVAILABLE INTERFACES

RESOURCES

GUI

Command Line*

C++  & Scripting**

Other

Inverse dynamics

Calculate joint torques from a measured motion

Straightforward; minimal assumptions

X

X

X



Overview

User Guide: Inverse Dynamics

Hands-on Example (Beginner): Scaling, Inverse Kinematics, and Inverse Dynamics

Static optimization

Estimate muscle force/activations from a measured motion

Fast estimation; assumes rigid tendons; minimizes activation squared at each time step

X

X

X



Overview

User Guide: Static Optimization

Hands-on Example (Intermediate): Working with Static Optimization

Hands-on Example (Intermediate): Estimating Leg Muscle Forces in Stance and Swing

Computed muscle control (CMC)

Estimate muscle excitations from a measured motion

Excitation-activation dynamics; accounts for tendon stretch;  minimizes activation squared at each time step

X

X





Overview

User Guide: Computed Muscle Control

Hands-on Example (Intermediate): Computed Muscle Control

Hands-on Example (Intermediate): Estimating Leg Muscle Forces in Stance and Swing

CMC Theory and Publications

EMG-informed methods

Estimate musculotendon parameters given a measured motion and muscle activity

Normalizing muscle activity is necessary







X

Overview

Calibrated EMG-Informed Neuromusculoskeletal Modeling (CEINMS) Toolbox

OpenSim is supported by the Mobilize Center , an NIH Biomedical Technology Resource Center (grant P41 EB027060); the Restore Center , an NIH-funded Medical Rehabilitation Research Resource Network Center (grant P2C HD101913); and the Wu Tsai Human Performance Alliance through the Joe and Clara Tsai Foundation. See the People page for a list of the many people who have contributed to the OpenSim project over the years. ©2010-2024 OpenSim. All rights reserved.