Planning an OpenSim Simulation
Presented by Adam Galloy1, Kayt Frisch PhD1, and Dylan Schmitz2
1Dordt College, 2University of Wisconsin-Madison
Contact: kayt.frisch@dordt.edu
OpenSim is a powerful tool for combining accurate musculoskeletal simulations with noninvasive motion capture techniques. However, knowing where to start can be difficult for users new to OpenSim and even ones that have some experience with OpenSim.
Identifying the Type of Simulation Required
Before OpenSim can give any meaningful information, you need to know what research question you are trying to answer with OpenSim. OpenSim has a variety of tools for analyzing musculoskeletal data, so choosing the best tool to answer a specific question can be difficult. Here are some of the tools available in OpenSim and the information they are and are not capable of giving.
Inverse Kinematics (IK)
IK finds the joint positions, velocities, and accelerations for each degree of freedom (DOF) in the model from marker tracking data. This makes IK the simplest tool available in OpenSim for describing and comparing different motions. However, the tool does not give any direct information about what causes the body to move. IK cannot be used to find forces or torques throughout the body or provide direct information about what muscles are being used in the body.
Inverse Dynamics (ID)
ID finds the generalized forces and torques for each DOF in the model from the body kinematics calculated from IK and external force data. The generalized forces/torques of a joint are not the same thing as the joint reaction forces/torques. Joint reactions generally act in directions where the joint is not free to move to prevent the bones from dislocating. The generalized forces/torques of a joint are the net forces/torques acting in the direction of the joint’s motion. The generalized forces/torques of a joint are the net effect of all muscles and actuators affecting the joint’s motion. ID is not able to find the individual contributions of the different muscles and actuators affecting the joint. The advantages of ID over more detailed analyses like Static Optimization are that ID has a faster computing time and that computation requires no muscle parameters since only the net effect is considered.
Static Optimization
Static Optimization provides a more detailed look at the forces and torques throughout the body than ID. After calculating the generalized forces/torques produced by each DOF, Static Optimization calculates the individual contribution of each muscle and actuator affecting a joint. Static Optimization also returns the muscle activations required to produce those forces.
Forward Dynamics
All of the previous simulations considered to this point solved an “inverse problem”. They took information from markers and external forces to determine the forces and muscle activations inside of the body. Forward Dynamics uses muscle activation information (obtained from analyses such as Static Optimization) to reproduce a motion. At first it may not seem very useful to reproduce a motion that was already tracked, but the Forward Dynamics tool is capable of running many specific analyses during the forward simulation. These analyses include tracking of muscle parameters, energy consumption of muscles, joint reaction forces/torques, and more. Users can even create their own analyses to be run with the Forward Dynamics tool. This makes the Forward Dynamics tool the most powerful tool for analysis but it is also the most complicated.
And More
These are only some of the most general simulation tools available in OpenSim for analyzing biomechanics data. More specific tools exist, but the ones above should at least get you started with answering your questions. When planning a simulation, you should take note that many of the simulations listed require the outputs of another simulation. In addition, the simulations listed increase in complexity and require more data from the top to bottom of the list. You should try to find the simplest simulation capable of answering your research question.
Selecting an Appropriate OpenSim Model for a Simulation
Once you know what kind of simulation you need to perform, a model must be picked to perform the simulation with. OpenSim models are physically accurate representations of musculoskeletal systems that can often be scaled to match individual subjects. Different simulations have different model requirements and considerations. Here are some of the things to consider for each simulation when selecting a model (keep in mind that each simulation requires everything the simulation before it also requires):
Inverse Kinematics
The most important aspect of a model to consider for IK is the geometry of the model’s anatomical features and the model’s DOFs. Make sure that all of the parts of the body necessary to answer your questions are available in the model and that their motion is described appropriately. Read through the literature associated with the model and note any conditions where the model may be less accurate or fail to supply the information you need. For example, a leg model that represents the knee as a simple hinge joint will not be useful for studies that look at larger knee angles where patellar motion is more significant. Even though you want your model to be as accurate enough to give you the information you need avoid using a model that is more complicated than necessary. Try to find models that do not have too many unnecessary body parts or degrees of freedom. In Preparing a Model for Analysisa guide to simplifying the motion of models will be given if you are unable to find a model that immediately meets your simulation requirements. For IK simulations the inertial properties and muscle geometry/properties do not need to be considered.
Inverse Dynamics
In addition to accurate skeletal geometry and DOFs ID requires inertial parameters. Inertial parameters include the mass and moments of inertia of each body in the model. When selecting a model check to see that each body have all of their inertial properties defined. If a model can’t be found that has inertial parameters and all the other requirements needed for your simulation, then see the Preparing a Model for Analysis page for instructions on how to add inertial parameters yourself.
An important thing to note is that accurate ID simulation may require more bodies in the model than a model intended only for IK. For example, let’s say you are trying to simulate a subject’s knee during a gait trial. The subject’s foot will not affect the tracking of the knee’s motion (simulated by IK) very much. However, in order to accurately obtain the generalized torques about the knee (simulated by ID), the forces on the foot and the motion of the foot must be accurately tracked since those forces propagate up to the knee. Make sure the full dynamic chain is considered when selecting a model.
Static Optimization and Forward Dynamics
In addition to the requirements for IK and ID, Static Optimization and Forward Dynamics require information about the muscles and actuators in order to calculate their contributions to the net forces in the subject. Make sure the model you select has all of the muscles and actuators that you need for accurate answering of your question. Check the literature on the model to verify that the geometry and properties of the muscles are accurate. In general, the muscle and actuator contributions for one body on the model are calculated independently from the contributions of another body. This means that not every body on the model needs to have muscle information if you are only interested in specific bodies.
Planning Data Collection for Simulation
Different simulations require different experimental data from the lab. This section goes through some of the different OpenSim tools and provides an explanation of what kind of data needs to be measured or approximated in order to use them.
Inverse Kinematics
IK requires motion capture data in the form of 3D marker coordinates. Here are some tips for collecting marker data:
- Make sure each body segment has at least enough markers to fully define the segments position on the OpenSim model
- Have additional markers in case one or more of the markers gets occluded
- Place some markers on bony landmarks near joints to help with scaling but also place markers away from the joints for more accurate motion tracking
- Take pictures of subjects with the full marker set on and record video of motion trials to help evaluate marker placement on the model and IK motion tracking results
- Record data of subjects in a static pose to help with scaling
In addition to collecting marker data, measuring subjects’ segment lengths and height can be useful for the scaling process.
Inverse Dynamics
In addition to marker data, for an ID simulation the subject’s mass and external force data is required. The mass is used to scale the model’s inertial parameters to the subjects. External force data must either be measured or approximated for every external force acting on the subject (except gravity which OpenSim accounts for automatically). This includes ground reactions and other contact forces. The location where the force is applied is required as well as the magnitude of the force.
Static Optimization and Forward Dynamics
If available, strength tests and imaging tools can be used to provide more accurate subject-specific muscle parameters. Additionally, electromyography can be used to confirm the muscle activations returned from Static Optimization and drive a Forward Dynamics simulation.
Summary
The table below summarizes the model and data requirements for some of OpenSim’s different simulation tools.
Simulation: | Model Requirements: | Data Requirements: |
Inverse Kinematics | Accurate Skeletal Anatomy | 3D Marker Coordinate Data |
Inverse Dynamics | Accurate Skeletal Anatomy, Inertial Parameters | 3D Marker Coordinate Data, External Force Data, Subject Mass |
Static Optimization/Forward Dynamics | Accurate Skeletal Anatomy, Inertial Parameters, Accurate Muscle Anatomy/Parameters | 3D Marker Coordinate Data, External Force Data, Subject Mass, EMG*, Imaging*, Strength Test Results* |
*Recommended but not required
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.