Tutorial 3 - Scaling, Inverse Kinematics, and Inverse Dynamics

Tutorial 3 - Scaling, Inverse Kinematics, and Inverse Dynamics

The tutorial below is designed for use with OpenSim version 4.0 and later. A version of the tutorial compatible with OpenSim version 3.3 is available here.

I. Objectives

Purpose

The purpose of this tutorial is to demonstrate how OpenSim solves an inverse kinematics and dynamics problem using experimental data. To diagnose movement disorders and study human movement, biomechanists frequently ask human subjects to perform movements in a motion capture laboratory and use computational tools to analyze these movements. A common step in analyzing a movement is to compute the joint angles and joint moments of the subject during movement. OpenSim has tools for computing these quantities:

  1. Inverse kinematics is used to compute joint angles.

  2. Inverse dynamics is used to compute net joint reaction forces and net joint moments.

Inverse kinematics computes the joint angles for a musculoskeletal model that best reproduce the motion of a subject. Inverse dynamics then use joint angles, angular velocities, and angular accelerations of the model, together with the experimental ground reaction forces and moments, to solve for the net reaction forces and net moments at each of the joints. The schematic below shows an overview of the inverse kinematics and inverse dynamics problems.


In this tutorial, you will:

  • Become familiar with OpenSim's Scale, Inverse Kinematics and Inverse Dynamics tools

  • Solve an inverse kinematics and inverse dynamics problem using experimental data

  • Interpret the results of the inverse dynamics solution

  • Investigate the dynamic inconsistencies that arise during inverse dynamics

Format

Each section of the tutorial guides you in using certain tools within and asks you to answer a few questions. The menu titles and option names you must select and any commands you must type to run OpenSim will appear in boldface. The questions can be answered based on information from OpenSim and basic knowledge of the human musculoskeletal system. After you complete the tutorial, feel free to explore OpenSim and the other analysis tools further on your own. Depending on the amount of exploration you do, this tutorial should take 1-2 hours to complete.

II. Generic Musculoskeletal Model



In this tutorial, you will be using a generic musculoskeletal model with 23 degrees of freedom and actuated by 54 muscles entitled 3DGaitModel2354.
Note: Detailed information about the model can found on the Gait2392 and 2354 Models page

To load the generic musculoskeletal model into OpenSim:

  • Click the File menu and select Open Model.

  • Find the Gait2354_Simbody folder in your default OpenSim resources directory— \Documents\OpenSim\Models for PC and Mac.  
    Note: When you first launch OpenSim, you are prompted to provide a path to install the resources folder, the default is in your systems Documents folders.

  • Open the Gait2354_Simbody folder, select the file gait2354_simbody.osim, and click Open.



III. Scaling A Musculoskeletal Model



Subject-specific modeling involves (i) scaling a generic musculoskeletal model to modify the anthropometry, or physical dimensions, of the generic model so that it matches the anthropometry of a particular subject and (ii) registering the markers placed on the model to match the locations on the subject. Scaling and Registration are the most important steps in solving inverse kinematics and inverse dynamics problems because IK and ID solutions are sensitive to the accuracy of the scaling and registration.

To scale the generic model and register the markers: 

  • Click the Tools menu and select Scale Model.


  • At the bottom of the Scale Tool dialog, click Load to input a settings file.


  • In the file browser, ensure that you are in the Gait2354 folder, select the file subject01_Setup_Scale.xml and click Open.


This Scale Setup file is an xml file that contains pre-configured settings to scale and register the generic gait2354 musculoskeletal model to the dimensions of a subject that we have experimental data for. A detailed explanation of the Scale Tool can be found on the Scaling page of the documentation.

Model Scaling

In OpenSim, the scaling step adjusts both the dimensions of the body segments, as well as the mass properties (mass and inertia tensor). Scaling can be performed using a combination of two methods:

(1) Manual Scaling: Scaling that allows the user to scale a segment based on some predetermined scale factor. Manual scaling is sometimes necessary when suitable data are not available, or if the scale factors were determined using an alternative algorithm.

(2) Measurement-based Scaling: Scaling that determines scale factors for a body segment by comparing distance measurements between specified landmarks on the model, known as model markers, and the corresponding experimental marker positions.



Marker Registration

In OpenSim, the registration step adjusts the location of model markers to match the location of markers on the subject. To do this, you must first estimate a pose for the model that closely resembles the pose of the subject during the experimental static trial.

To complete the scale step:

  • In the Scale Tool dialog, click Run.


  • When complete, a new, scaled and registered model entitled subject01 will appear in Visualizer window. Notice the pink model markers around the new model. 


  • To save the scaled model, either click File and select Save Model, or right-click on the model name, subject01, in the Navigator window, and select Save As.

  • Save the scaled model as gait2354_scaled.osim, and click Save.
    Note: ensure that you are in the Gait2354 folder.


  • Once you have answered Questions 1-5, below, close the Scale Tool Dialog by clicking Close. At this point, you may close the generic model (right-click the model name in the Navigator window, and select Close) or hide the model (right-click the model name, and select Display -> Hide).




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.