Inverse Kinematics (IK) and Inverse Dynamics (ID) are two of the most common workflows used in biomechanics as joint angles and moments can provide insight into coordination of a movement. Measurement and modeling errors both contribute to errors during ID called residuals, which are additional forces and torques needed to account for inconsistencies in the dynamics of the simulation when fitting both marker and external force data. In this tutorial, you will use tools in OpenSim and AddBiomechanics to analyze the sources of these errors and ways to improve ID results.


After completing this example, you will be able to do the following:

  • Process experimental data to calculate joint kinematics (IK) and joint moments (ID) during walking
  • Quantify errors in IK and ID and understand acceptable errors
  • Improve IK and ID results by adjusting the data and model
  • Understand sources of IK and ID errors and characterize which changes improved results

You will accomplish this by working with walking data obtained from a gait laboratory. You will first use OpenSim tools to go through the individual steps of scaling a musculoskeletal model, estimating joint kinematics from marker data using IK, computing joint moments using ID, and adjusting the model and kinematics to reduce residuals and improve results. You will then use a tool called AddBiomechanics that optimizes these steps together.

Getting started

Downloading example files

For this tutorial, we will use files modified from the Rajagopal et al. 2016 model paper that can be downloaded here.

Note: Users looking for the files to replicate the original work should instead download the files from the related SimTK project.

Completing the example

Continue on to the next pages to complete the steps using OpenSim and AddBiomechanics. 

If you are completing this example as a laboratory exercise for a course on human movement, you will need to submit answers to the questions on the Questions: Computing Joint Moments with OpenSim page.