You are viewing the documentation for OpenSim 3.x. Are you looking for the latest OpenSim 4.0 Documentation?

Tutorial 1 - Intro to Musculoskeletal Modeling


The tutorial below is designed for use with OpenSim version 3.2 and later. If you're using an earlier version (3.0 or 3.1), please use this pdf.

I. Objectives

Introduction to OpenSim

Models of the musculoskeletal system enable one to study neuromuscular coordination, analyze athletic performance, and estimate musculoskeletal loads. OpenSim is open-source software that allows users to develop, analyze, and visualize models of the musculoskeletal system, and to generate dynamic simulations of movement [1]. In OpenSim, a musculoskeletal model consists of rigid body segments connected by joints. Muscles span these joints and generate forces and movement. Once a musculoskeletal model is created, OpenSim enables users to study the effects of musculoskeletal geometry, joint kinematics, and muscle-tendon properties on the forces and joint moments that the muscles can produce. With OpenSim, our goal is to provide a framework that allows the biomechanics community to create, share, and extend a library of models and dynamic simulation tools.  

Purpose

The purpose of this tutorial is to introduce users to OpenSim by demonstrating the utility of graphics-based musculoskeletal modeling and illustrating how muscle-tendon lengths and moment arms depend upon limb configuration. In this tutorial, you will:

  • Become familiar with OpenSim's graphical user interface (GUI)
  • Discover some limitations of musculoskeletal models
  • Explore differences between "1-joint" (uni-articular) and "2-joint" (bi-articular) muscles
  • Use OpenSim to address an important clinical problem

Format

Each section of the tutorial guides you through certain tools within OpenSim's GUI 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 bold face. The questions can be answered based on information from OpenSim and basic knowledge of the human musculoskeletal system. As you complete each section of the tutorial, feel free to explore OpenSim and the lower extremity model further on your own. Depending on the amount of exploration you do, this tutorial will take about 1-2 hours to complete.

Introduction to the OpenSim GUI

There are several key components of the OpenSim GUI that will be referred to throughout the tutorial. The table below will introduce you to these GUI components.

GUI Components
TitleScreenshot
Toolbar
Motion Text box
Motion Slider/ Video Controls
View Window
Navigator Window
Coordinate Window
Properties Window

II. Musculoskeletal Model of the Lower Extremity

In this section, you will load a model of the lower extremity [2] into OpenSim and make the model "walk." The model represents an adult subject with an approximate height of 1.8 m and an approximate mass of 75 kg. The model consists of 13 rigid body segments and includes the lines of action of 92 muscles (43 per leg and 6 at the torso).

Loading a Model

The first model you will analyze is entitled 3DGaitModel2392. To load this musculoskeletal model into OpenSim:

    • Click the File menu and select Open Model.
    • Find the Models folder, which is located under your OpenSim installation directory, e.g., C:\OpenSim 3.2.

Note: There are several different example models and motions in the Models folder. All of the model and motion files used in the remainder of the tutorial will be located in this Models folder.

    • Open the Gait2392_Simbody folder, select the file gait2392_simbody.osim, and click Open.


After loading a model, its name will appear in the model drop-down menu, located in the toolbar, and in the Navigator window. To see the Navigator window, which also provides specific information about the bodies, muscles, and joints in the model, click the Window menu and select Navigator. To expand a Navigator heading, click the plus icon to its left.  Note: If already opened, you can also view the Navigator window by clicking its title bar.  

Viewing & Animating a Model

OpenSim allows you to orient the model using your mouse.

Rotate   To rotate the view, click and hold the left mouse button and drag the mouse.
TranslateTo translate the view, click and hold the center mouse button and drag the mouse.
Zoom

To zoom, click and hold the right mouse button.

To zoom in, drag the mouse down. To zoom out, drag the mouse up.

  In addition to your mouse, there are six orienting icons located along the right side of the View window. To view the model in the –X direction, click the  icon. Similarly, click on the other icons to view along the other principal directions. To see the axes of the world reference frame, click the axes icon  located on the right side of the View window. 

Coordinates

The Coordinates window contains sliders that correspond to joint coordinates in the model. To see the Coordinates window, click the Window menu and select Coordinates. For the current model, the orientation of the pelvis corresponds to the orientation of the model. 

Note: If already opened, you can also view the Coordinates window by clicking its title bar.

  • The first three sliders correspond to rotations of the pelvis about the Z, X, and Y-axes of the "pelvis" reference frame. To rotate the pelvis about the Z-axis, drag the pelvis_tilt slider. Similarly, to rotate the pelvis about the other two axes, drag the corresponding slider. 
    Note: These rotations are different than rotating the model view.
  • The remaining sliders correspond to joint rotations and control a single degree of freedom. To rotate the joints, drag the sliders or type in a desired joint angle in the adjacent textbox.
  • To save a pose, or a specific set of joint coordinates, for later use in the tutorial:
    • Restore the default joint coordinates by clicking the Poses button and selecting Default.
    • Flex the right hip 45º by typing 45 into the hip_flexion_r textbox and pressing Enter.
    • Click the Poses button, select New, type r hip flex 45 in the textbox, and click OK. Now that saved pose will appear under Default when you click Poses.

Loading a Motion

To animate the model, you need to load an associated motion file into OpenSim.

    • Click the File menu and select Load Motion. Ensure you are in the Gait2392_Simbody\Tutorial1 directory, select the file normal.mot, and click Open. This motion file describes a normal gait.

 After loading a motion, its name will appear in the motion textbox, located on the toolbar. Additionally, a new branch will appear in the Navigator titled Motions. Expand it to see all motions loaded for a particular model, as shown. 

Motion Slider

The motion slider corresponds to the current motion file. To make the model "walk", drag the motion slider. To animate the model, use the video control buttons, e.g., click play . There are also buttons to loop , pause , and control the speed of the animation. 

Questions

1. Degrees of Freedom

a. Use the Coordinate slider to view the degrees of freedom of the model. How many degrees of freedom does the model have? List them.

b. All models are approximations. Compare the degrees of freedom in the model to the degrees of freedom in your lower limbs. Which motions have been simplified? Which motions have not been modeled at all?

2. Muscle Paths

a. Muscle-tendon paths are represented in OpenSim by a series of points connected by line segments. To see a list of all the muscles:

    • In the Navigator, expand the ForcesMuscles, and all headings.
    • To display a single muscle, right-click on a specific muscle name under the all group, e.g., glut_med1_r, and select Display > Show Only from the popup menu.
    • To toggle the display of all muscles, right-click on the Muscles or all heading, and select Display > Show or Display > Hide

How many muscles are in the model? Is this greater than the number of degrees of freedom? What is the minimum number of muscles required to fully actuate the model?
Hint: Full actuation of the knee, for example, means both knee flexion and knee extension.

In this model, the gluteus medius is represented by multiple lines of action (e.g., glut_med1_r, glut_med2_r, glut_med3_r). Name two other muscles in the model that are represented with multiple lines of action. Why do you think these muscles are represented in this way?
Hint: Other muscles with multiple lines of action use the same naming convention as the gluteus medius.

b. For some muscles, two points, the muscle origin and insertion, are sufficient to describe the muscle path. For other muscles that wrap over bones or are constrained by retinacula, intermediate wrapping or via points must be defined. To view these wrapping points:

    • Restore the default joint coordinates by clicking the Poses button and selecting Default. Then zoom in on the right knee joint. 
    • Hide all other muscles except the r knee extensors muscle group. 
    • Fully flex the right knee using the knee_angle_r Coordinates slider.

Notice that wrapping points are introduced in some of the knee extensors at certain knee angles, such that the muscles appear to wrap around the bones.
Which knee extensor muscles have wrapping points? At what knee angle does the wrapping point appear for each of those knee extensors? A muscle may have more than one wrapping point.

3. Modeling Limitations

Some muscles in the lower limb model pass through the bones or deeper muscles at extreme ranges of motion. Zoom in on the right hip, and display only the glut_med3_r muscle (r hip extensors group). Examine this muscle for the full range of hip flexion angles. Do you see any problems with glut_med3_r ? In what ways are point-to-point representations of muscle paths a simplification of musculoskeletal geometry?

III. Joint Angles, Muscle-tendon Lengths, & Moment Arms

In this section, you will investigate how muscle-tendon lengths and moment arms depend on limb configuration. Musculoskeletal geometry is very important to the function of muscles and to the development of quantitative musculoskeletal models. Muscle-tendon forces depend upon the muscle-tendon length, and joint moments depend upon both muscle-tendon forces and moment arms. Therefore, accurate specification of musculoskeletal geometry is essential in developing an accurate model for predicting muscle-tendon forces and joint moments.

Using the Plotter

OpenSim's Plotter allows you to plot muscle-tendon properties, such as length, moment arm, force, and joint moment. To generate a plot of fiber-length vs. knee angle for the rectus femoris and vastus intermedius muscles:

  • Return the model to its original pose by clicking Poses > Default in the Coordinates window.
    Note: Plots are created for the current configuration of the model. Your plots will be made for the default pose.
  • To open a new plot, click the Tools menu and select Plot. In the plotter window, click the Y-Quantity button and select fiber-length. This variable will appear on the y-axis.
  • After selecting an appropriate Y-Quantity, you must select the muscles for which you want to generate curves. Click on the Muscles button and a menu will appear.
  • To find muscles more quickly, you can filter the muscles by muscle group. Choose the model option and use the group drop down menu to select R_knee_ext. The muscles list should now only show the muscles in the right knee extensors group.
  • Select rectus femoris and vastus intermedius from the list by clicking the checkboxes labeled rect_fem_r and vas_int_r.
    Note: You do not have to close the muscles window as long as the plotter window is open, and your selections are immediately updated in the Muscles textbox. This can be helpful when creating multiple curves on the same plot, which you will do in a few more steps.
  • Click X-Quantity and select knee_angle_r. This variable will appear on the x-axis.
  • To add a title to the plot, click the Properties button and type Fiber-Length vs. Knee Angle into the textbox under the Title tab. Explore the plot properties, and then click OK.
  • To add the curves to the plot, click Add.
    Note: The plots use the following SI units: meters (length), Newtons (force), Newton-meters (moment).
  • Do not close the plot window, as you will be adding more curves in the next section.

Questions

4. Muscle Fiber Length vs. Joint Angle

a. Study the plot of muscle fiber length vs. knee angle. Do you think these curves would look different if, for example, the right hip was flexed?

b.You will now flex the right hip by recalling the pose you previously saved:

    • In the Coordinates window, click Poses and select your saved pose (r hip flex 45).
    • To add curves for 45º hip flexion using the same Quantities and Muscles, click Add.
      Note: To print or save a plot, right-click on the plot and select Print or Export Image. 

Compare the two sets of curves you have just plotted. How have the curves changed? Can you explain your findings? How can bi-articular muscles complicate analysis?


5. Muscle Moment Arm vs. Joint Angle

Now plot knee extension moment arm vs. knee angle for the same two muscles:

    • Return the model to its original position by clicking Poses > Default.
    • To delete the previous curves, select all the names from the Curves List and click Delete.
      Note: To select multiple curve names, hold down ctrl while selecting.
    • Click Y-Quantity, select moment arm, and knee_angle_r.
    • To add curves using the same Muscles and X-Quantity as previously selected, click Add.  
      Note: If you hover the cursor over a curve, a tool tip will give the coordinates at that particular point. 

Study the plot of knee extension moment arm vs. knee angle for rectus femoris and vastus intermedius. At what knee angles do the moment arms peak? What are the peak moment arms?
 

You may notice that the moment arm curves have a discontinuity. At what knee angle do the discontinuities occur? What do you think causes this? Hint: Look at Question 2.b

Once you have answered these questions, you can close the current plotter.


Feel free to make more plots for other limb positions, muscles, and/or joints. When you are ready to continue with the tutorial, close the plotter window and close the Gait2392_Simbody model by clicking the File menu and selecting Close Model. Do not save the model settings to file.

IV. Assessment of Hamstrings Length During Crouch Gait

In this final section of the tutorial, you will use OpenSim to investigate a possible cause of crouch gait, one of the most common walking abnormalities among individuals with cerebral palsy. It is characterized by excessive flexion of the knee during stance phase, which is often accompanied by exaggerated flexion and internal rotation of the hip. One hypothesized cause of crouch gait is short hamstrings, and orthopaedic surgeons will sometimes lengthen the hamstrings of such patients in an attempt to improve their posture and gait. However, other causes of excessive knee flexion are possible (e.g. weak ankle plantarflexors), and lengthening the hamstrings can compromise the strength of these muscles [3]. How can a surgeon determine whether a hamstring lengthening procedure is warranted? 

One possible way to judge whether a patient's hamstrings are shorter than "normal" is to develop a musculoskeletal model and compare the length of the hamstrings during the patient's crouch gait cycle to the length of the hamstrings during a normal gait cycle. Suppose that an orthopaedic surgeon has brought you some kinematic data for a patient who walks with a crouch gait. The surgeon is contemplating whether to operate, and wants your opinion.  

File Preparation

Follow these steps to load the crouch gait and normal gait files:

  • Reopen the model file gait2392_simbody.osim (You closed and reopened the same file to ensure that any prior settings modifications as you explored don't affect the rest of the tutorial).
    Note: All of the tutorial models and motions are relative to your OpenSim installation directory, e.g., C:\Program Files\OpenSim 1.0.
  • To rename a loaded model, right-click on the model name in the Navigator and select Rename from the popup menu. Type Crouch into the textbox and click OK.
    Note: Renaming in this way does not affect the actual file name of the model.
  • Load the motion file crouch1.mot, which is in the Gait2392_Simbody\Tutorial1 folder. This motion contains crouch gait data.
  • OpenSim has the ability to load multiple models simultaneously. To open a second model, open the gait2392_simbody.osim file again.

    Note: If you do not see both models after loading, press the r key.
  • To rename the second model, right-click on the current model name and select Rename. Type Normal into the textbox and click OK.

    Note: Throughout the rest of the tutorial, these two models will be referred to as crouch and normal. 

The second model you loaded automatically becomes the current model. Notice that the non-current model becomes translucent. Any action, such as loading a motion, will be applied only to the current model.

  •  Making sure that the normal model is still current, load the second motion file normal.mot. This motion file contains normal gait data.
  • OpenSim can synchronize multiple motions, allowing you to animate multiple models simultaneously. To do this, expand the Motions branch of each model in the Navigator, hold down ctrl, and select both motions names such that each name is highlighted. Right-click on either motion name, then select Sync. Motions from the popup menu, as shown.

Questions

6. Range of Motion

To animate the models and visually compare the crouch gait data to the normal gait data, click play. Notice that both motions are synchronized, as shown. Be sure to loop the animation, adjust the play speed, and rotate the models. What differences do you observe between crouch gait and normal gait?
 
Now quantitatively compare knee flexion angles over the crouch and normal gait cycles.

  • In a new plot, click Y-Quantity, select normal_gait, and select knee_angle_r. Click OK.
  • Click X-Quantity and select normal_gait. Click OK.
  • Edit the text in the Curve Name textbox to read Normal Gait.
  • To add the curve of right knee angle vs. gait cycle, click Add.
  • Make the Crouch model current by selecting it (double-click) in the Navigator. It should become bold-faced.
  • In the same plotter window, click Y-Quantity, select crouch1_gait, and select knee_angle_r. Click OK.
  • Click X-Quantity and select crouch1_gait. Click OK.
  • In the Curve Name textbox edit the text to read Crouch Gait, then click Add.

Can you identify the intervals at which heel strike, stance, toe off, and swing phase occur for a "normal" gait cycle? Sketch a plot of the curve, and label the intervals. 
 

What is the "normal" range of knee flexion during stance phase? How does this knee flexion curve for crouch gait compare to the normal gait data?


7. Hamstrings Length

To address the surgeon's question, compare the hamstrings (semitendinosus) length over the crouch gait cycle to the hamstrings length over the "normal" gait cycle.

  • To delete the previous curves, select all the names from the Curves List and click Delete.
    Note: To select multiple curve names, hold down ctrl while selecting.
  • Make the normal model current by selecting it from the Model drop down menu.
  • Click Y-Quantity and select muscle-tendon length.
  • Click on Muscles and select semiten_r from the list. Click Close.
    Note: To quickly find the semiten_r, type semi into the pattern textbox.
  • Click X-Quantity and select normal_gait.
  • In the Curve Name textbox edit the text to read Normal Gait.
  • To add the curve of hamstrings length vs. gait cycle, click Add.
  • To make a similar curve for the crouch gait data, make the crouch model current. Then, click on Y-Quantity and re-select muscle-tendon length.
  • Click on Muscles and select semiten_r .
  • Click X-Quantity and select crouch1_gait.
  • In the Curve Name textbox, edit the name to read Crouch Gait, and then click Add.

Study the curves. Based on the plot, what recommendation would you give the surgeon? Can you think of any limitations of your analysis?


8. Additional Crouch Gait Files (optional)

The orthopaedic surgeon cares for three other patients who walk with a crouch gait. Repeat the above analysis for motion files crouch2.mot, crouch3.mot, and crouch4.mot. Note that you can associate more than one motion with a model. Would your recommendations to the surgeon be any different for these patients? If you would like to learn more about this type of analysis, please read reference [3].  

References

  1.  Delp, S.L., Anderson, F.C., Arnold, A.S., Loan, P., Habib, A., John, C.T., Guendelman, E., Thelen, D.G. OpenSim: Open-source software to create and analyze dynamic simulations of movement. IEEE Transactions on Biomedical Engineering, vol. 55, pp. 1940-1950, 2007.
  2. Delp, S.L., Loan, J.P., Hoy, M.G., Zajac, F.E., Topp E.L., Rosen, J.M. An interactive graphics-based model of the lower extremity to study orthopaedic surgical procedures. IEEE Transactions on Biomedical Engineering, vol. 37, pp. 757-767, 1990.
  3. Arnold, A.S., Liu, M., Ounpuu, S., Swartz, M., Delp, S.L., The role of estimating hamstrings lengths and velocities in planning treatments for crouch gait, Gait and Posture, vol. 23, pp. 273-281, 2006.

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.