All example files are included in the Model folder "ToyDropLanding" included with the OpenSim installation.
The purpose of this exercise is to use OpenSim to evaluate the risk of injury during landing and to design assistive devices to prevent injuries. You will examine how a passive ankle–foot orthosis (AFO), muscle reflexes, and muscle co-activation affect ankle inversion injury risk. In a short amount of time, you should be comfortable running forward dynamic simulations with varying conditions (such as orthosis stiffness) and plotting the results to compare their effects.
Note that the musculoskeletal model and controller used in this example are simplified for demonstration purposes. A more comprehensive musculoskeletal model would be needed to perform research. For example, the controller is a simplified (toy) version of the stretch reflex generated by muscle spindles that detect lengthening of muscle fibers. The toy reflex controller responds to whole muscle–tendon lengthening speed and is not isolated to lengthening speed of the muscle fiber. Additionally, there is no transmission delay between stretch detection and eliciting a muscle excitation, and the model does not include all the passive structures (e.g., ligaments) that resist motion of the ankle joint.
I. Explore the musculoskeletal model
A. Launch OpenSim
You can launch OpenSim from the Start menu. You will see multiple information panels with either a Welcome screen or the Model you were working with previously.
B. Explore the model
- In your favorite file browser, navigate to your OpenSim Resources directory (e.g. [Your Documents Directory]/OpenSim/4.1), then find the folder Models/ToyDropLanding.
- Copy the ToyDropLanding folder to a location of your choice. This well let you play with the models without fear of corrupting the example for future reference. From now on, we will refer to this location as [Example_Dir]/ToyDropLanding
- In the OpenSim GUI, select File>Open Model....
- In the dialog box that appears, navigate to [Example_Dir]/ToyDropLanding and select ToyLandingModel.osim.
The OpenSim GUI will now show a view window containing a model with a skeleton and a platform.
- The skeleton consists of a torso, a pelvis, and two legs with a total of 23 degrees of freedom and 70 muscle–tendon actuators.
- We can explore various components of the model using the Navigator panel. Expand the model by clicking the "+" icon next to the model's name. You should see groups including Bodies and Joints.
- Motion between the tibia and foot is described by two joints. Expanding the Joints group will reveal all joints in the model. Find the joints associated with the ankle of the right leg: ankle_r and subtalar_r. These represent the talocrural (or "true ankle") joint and the subtalar joint.
- Contact spheres are attached to the feet to produce foot–floor contact forces (see the Forces>Contact Forces group in the Navigator panel).
C. Explore the model's joint coordinates
The floor is modeled as a contact plane with four degrees of freedom. The model is posed so it will land on its right leg upon contact with the platform. The left hip and knee joints are locked to hold the pose and avoid interference from the left leg during landing. You can explore the degrees of freedom using the Coordinates panel:
- Select the Coordinates tab in the left panel.
- Use the sliders to change the ankle_angle_r and subtalar_angle_r coordinates. Zoom in on the ankle joint. Scroll to zoom in and out. Use the right mouse button to translate and the left mouse button to rotate the view.
- Unlock the platform_rx coordinate (by clicking on the lock icon).
- Enter values in the platform_rx text field or move the slider to change the angle of the platform in the frontal plane. Unlock the platform_ry and platform_rz coordinates, then rotate the platform around its other two (orthogonal) axes.
- Unlock platform_ty and change its value to move the platform up and down.
- Select Poses>Default from the Coordinates panel to return the model to its original pose.
- Lock all the platform coordinates.
- Which degrees of freedom enable ankle inversion/eversion?
- To tilt the platform in the sagittal plane (i.e. about the axis perpendicular to the sagittal plane), would you change platform_ry or platform_rz?
- Why do you think the mtp_angle_r coordinate in the model is locked?
II. Evaluate ankle inversion injury during a drop landing on a sloped surface
A. Simulate a drop landing
- Verify that the model is in its Default pose, with platform_rx set to 20 degrees, platform_ry to 0 degrees, platform_rz to 0 degrees, and platform_ty to 0.25 meters. All four platform coordinates should be locked. This will prevent the platform from falling or rotating on impact.
- Find the Simulate button (Green Runner) in the OpenSim Toolbar. This button is used to perform a forward simulation.
- Click the arrow next to the Simulate button, and select the End Time... drop down item.
- In the popup dialogue, set the simulation time to 0.4 seconds.
- Click the Simulate button to simulate for 0.4 seconds. OpenSim will use the current pose of the model in the GUI as the starting state for the simulation. The model will animate during the forward simulation.
- Once the simulation has completed, you can use the animation controls above the view window to play, pause, and scroll through the resulting motion and muscle activity. Zoom in on the ankle joint and replay the motion.
- Click on the Navigator panel and find the Motions list. The motion Results in bold corresponds to the simulation you just generated.
- Right click the bold "Results" motion and Rename... it to "Unassisted".
- To save the results, right click the "Unassisted" motion and select Save As... (e.g., Results_Unassisted.sto).
B. Plot and analyze the simulation results
- Open a new plot window by selecting Tools>Plot....
- Click the Y-Quantity... button and select Load file... near the bottom of the list and navigate to the file you saved in Part A.
WARNING: You must load you results as indicated in Step 2 to plot kinematic data in degrees. Loading the results by selected Unassisted(Deg.)... in the Y-Quantity... drop down menu will load the results in radians. This is a bug that will be addressed in a future OpenSim release.
- In the Filter by pattern text box, type "sub" to filter the results to just those containing the text string "sub".
- Select subtalar_angle_r/subtalar_angle_r/value and click OK.
- Select X-Quantity>time to choose time as the independent variable.
- Click Add to display the data as a curve.
- Click on "Figure 1" in the Curves List to highlight it. Click again to rename. Modify the title field (e.g., "Ankle inversion (subtalar angle) during drop landing"). Alternatively, right click and edit using in the Properties menu.
- Click on "subtalar_r/subtalar_angle_r/value" to highlight the curve label in the Curves List box and click again to rename. Since this simulation used a model with no assistive devices, change this curve name to "Unassisted".
- Answer the questions below, then minimize the plot window. Keep the plot window open so you can use it to compare these results to simulations with an AFO.
- What is the maximum subtalar angle during the drop landing?
- Would an ankle inversion injury have occurred during this landing? According to previous research (Siegler et al., 1990; Lapointe et al., 1997), angles larger than 25 degrees (0.436 radians) may cause injury.
- We simulated for 0.4 seconds in total, but is it valid to consider the simulation results for this entire duration? (hint: think about how you answered question two and the complexity of our model).
III. Analyze the effects of an ankle–foot orthosis (AFO) on ankle inversion
You will now repeat Part II using a model with a two-segment passive ankle foot orthosis (AFO):
- The AFO has a footplate that is rigidly attached to the foot and a cuff that is rigidly attached to the tibia.
- The footplate and cuff are connected at two hinge points by six dimensional springs, called bushings. The bushings resist the relative translation and rotation between the footplate and cuff.
A. Explore the AFO model
- Select File>Open Model... and select ToyLandingModel_AFO.osim. Once the model loads, you will see a similar drop-landing model, but with an ankle–foot orthosis (AFO) attached to the right foot. The model will also appear in the Navigator panel. Its name is in bold, indicating it is the current model.
- Explore the model using the Navigator panel. Which new bodies and joints define the AFO we've added?
- Find the Properties panel to see more details about these new components. If you don't see the Properties panel in the bottom-left corner of your screen, select Window>Properties to display it.
B. Simulate and analyze a drop landing with a "soft" AFO
Simulate the drop landing with the default "soft" AFO:
- Repeat the simulation steps from Part II.A above. The Simulate button acts on the current model, shown in bold in the Navigator panel. This should be the ToyLandingModel_AFO that you just loaded. Rename the new results as "SoftAFO" this time and save as "Results_SoftAFO.sto".
- Repeat the plotting steps from Part II.B above. This time, instead of opening a new plot window, re-open the plot from Part II to add a new curve. Rename the new data curve from "subtalar_angle_r/subtalar_angle_r/value" to "Soft AFO". Minimize the plot window. (Don't close, since we'll add another curve).
C. Simulate and analyze a drop landing with a "stiff" AFO
Now let's try making the AFO stiffer. You can edit the properties of the AFO using the OpenSim GUI's Properties panel.
- In the Navigator panel, go to Forces>Other Forces to find the AFO_med_bushing.
- Highlight the AFO_med_bushing by clicking on it once. You should now see the properties of the AFO_med_bushing in the Properties panel.
- Find the property in the list called translational_stiffness. This property controls the stiffness of the bushing that prevents the AFO cuff from translating with respect to the footplate on the medial side of the brace.
- Make the translational_stiffness 10 times stiffer in each direction (i.e., set the translational_stiffness property to 100000 100000 100000).
- Repeat steps 2–4 for AFO_lat_bushing.
- Repeat the simulation steps from Part II.A one more time. Rename the new results as "StiffAFO" and save the results as "Results_StiffAFO.sto".
- Repeat the plotting steps from Part II.B. Once again, instead of opening a new plot window, re-open the plot from Part II to add a new curve. Rename the new data curve from "subtalar_angle_r/subtalar_angle_r/value" to "Stiff AFO".
- You have now simulated three different drop-landing conditions: without an AFO, with a soft AFO, and with a stiffer AFO. What differences in peak ankle inversion do you observe between the simulations?
- Could this AFO mitigate ankle inversion injuries?
IV. Advanced Design Challenge: Create an active orthotic
Rehabilitation robotics are providing new active devices to help train and optimize movement. Orthotics for ankle injury prevention have traditionally been passive devices, but what if you could create an active mode for landing? We will add a torque motor at the ankle to model an active orthotic. Your challenge will be to optimize the timing and activation level of the active orthotic to prevent ankle inversion injury.
A. Explore the AFO model
- Select File>Open Model... navigate to the ToyDropLanding folder and select ToyLandingModel_activeAFO.osim.
- Explore the model using the Navigator panel. What new forces have been added?
- What degree of freedom does this motor control?
- What is the optimal force of this motor?
B. Modify the active AFO torque profile
The default setting for the active AFO is ‘off’ and you will need to define when the orthotic is active. To specify the torque produced by the active AFO and run a forward simulation, we will use the Forward Tool, which allows specification of additional settings:
- Select Tools>Forward Dynamics.... This launches the Forward Dynamics Tool.
- Under the Main Settings tab, find the Input subsection.
- Check the box for Solve for equilibrium for actuator states. This will initialize the tendon and muscle fibers before starting the integration.
- Set the Time range to process as 0 to 0.4.
- Change the output Directory by adding \ActiveAFO to the end of the displayed folder name; the resulting Directory should be [Example_Dir]\ToyDropLanding\ActiveAFO.
- In the Input Subsection, select the folder button next to Controls. Open the file ActiveAFO_Controls.xml.
- Select the small pencil button next to the Controls box to edit this controls file. Under Select Excitations, check the box next to ActiveAFO and hit OK. This will open the Excitation Editor which shows the excitation of a controller (in our case, the activeAFO) with respect to time.
- Change the excitation profile by moving the points in the Excitation Editor. To select a point, hold down CTRL and click on the point (similarly you can select multiple points by holding down CTRL and dragging the mouse over multiple points). To change the value of the points, you can either drag them on the screen, or enter a value in the “Set selected points to” box. You can also add or remove points. Click the “Help” button for more information.
- Once you are done editing the excitation profile, select Save As and save to an xml file called ActiveAFO_Edited.xml. Close the Excitation Editor.
- On the Forward Dynamics set-up screen, make sure your edited Controls file is selected: select the folder icon and choose your new controls file.
- You can save your Forward Dynamics settings to re-use later by clicking on the Save... button and saving your settings (e.g. setup_forward_activeAFO.xml).
- Click Run. This will use the default options for all other settings. Since you haven't specified an Initial State file, the tool will use the current pose of the model in the GUI as the starting state for the simulation.
- The model will animate during the forward simulation. You can Close the tool window after you've clicked Run.
- Once the simulation has completed, you can use the animation controls above the view window to replay the motion.
- Rename the new motion to "ActiveAFO". The results will be automatically saved by the forward tool in the directory you specified above ([Example_Dir]\ToyDropLanding\ActiveAFO).
C. Design optimal AFO for drop landing
Your challenge is to create the optimal AFO for drop landing. Edit the activation of the AFO and the stiffness to optimize your design. Your design will be judged on the following criteria:
- Minimal AFO stiffness (for maximum comfort and low material costs)
- Smallest torque required from the active AFO (for a small, compact motor)
- Minimal amount of time the AFO is active (to maximize battery life)
- Prevent ankle injury (inversion angle < 25°)
Note that you must start your simulation from the same initial conditions and posture used in the previous sections (no reducing the size of the drop or starting posture). Your final design will be "judged" using the following information: AFO stiffness, torque profile of active AFO, amount of time AFO is active, maximum torque of active AFO, and maximum ankle inversion angle.
- Note down the combination of parameters (i.e. AFO stiffness, active AFO torque and AFO timing) you determined to limit the maximum ankle inversion angle (report this value too).
V. Analyze the effects of muscle co-activation
Individuals can modulate the stiffness of the ankle by co-activating muscles in anticipation of landing. Thus, co-contraction of muscles, especially the inverter and everter muscles, might reduce ankle inversion during landing. The model comes equipped with two controllers that set the level of excitation (control) of the inverter and everter muscles. These controllers are initially disabled in the model. By enabling them, you can explore the effect of increased muscle co-activity on ankle inversion during the drop-landing. The co-activation controllers will operate in addition to the reflex controllers in the model. The reflex controllers, which you saw in action in the previous simulations, activate based on the stretch of the whole muscle–tendon unit. The level of excitation of the muscle is proportional (via a gain) to the rate that the whole muscle actuator is lengthening.
A. Explore the model's controllers and simulate with co-activation
- If the original unassisted ToyLandingModel.osim is still loaded, make it the current model by right-clicking on the model name in the Navigator panel and choosing Make Current. Make sure your model is in the Default pose (Coordinates>Poses>Default). If you closed the model, re-load it using File>Open Model....
- Go to the Navigator panel and find the list of the model's Controllers.
- Locate the Reflexes controller. What is the current value of the controller gain?
- Find the co-activation controllers, R-inverter controls and R-everter controls. These controllers are disabled by default (i.e., the "enabled" property is false).
- These controllers activate the specified muscles at a prescribed constant value throughout the simulation.To see the prescribed control values, highlight R-inverter controls or R-everter controls in the Navigator panel, then go to the Properties panel and click on the "..." button next to the "ControlFunctions" property. A tree view opens where you can navigate to the constants for each of the inverter or everter muscles in the model.
- Enable the R-inverter and R-everter controls by checking the "enabled" property in each of these model components.
- Run a forward simulation (remember to set the simulation time to 0.4 seconds) with the baseline pre-activation controllers. Rename the results as "LowCoactivation" and save as "Results_LowCoactivation.sto". Add the results to your plot.
- Now increase the level of baseline co-activation in the inverters and everters: Click on the R-inverter controls in the Navigator/Controllers menu. In the Properties window, click on the “...” next to the ControlFunctions. This will open a pop-up window. Expand FunctionSet/objects/Constant for each inverter muscle. Double-click on the “0.1”excitation and change this to “0.2.” Do this for all muscles in the inverters and then close the window.
- Repeat this for the R-everter controls. Change the excitations from “0.3” to “0.6” for all everter muscles.
- Click the Simulate button in the Toolbar to run a forward simulation with the new "doubled" pre-activation controllers.
- Rename the results as "HighCoactivation" and save as "Results_HighCoactivation.sto". Add the results to your plot.
- Why is the constant control different between the inverters and everters?
- What is the peak ankle inversion angle with the “baseline” low co-activation level? Does co-activity of the inverters and everters mitigate an ankle inversion injury?
- After doubling the “baseline” co-activation levels of the inverters and everters, what is the peak ankle inversion angle after landing? Would an ankle inversion injury have been sustained?
- Optional: plot the muscle activations for the ankle inverters. How does the addition of the co-activation controller affect muscle activity?
VI. Explore: Prevent injury with a device and training program
In the sections above, you've explored how an AFO and muscle activation affect ankle inversion during landing. With the OpenSim simulation platform, there are many other scenarios and model properties that you can explore. For example, you can:
- Add a backpack to the model (by adding a new body or increasing torso mass)
- Change the initial pose of the model (e.g., increasing the initial ankle plantarflexion angle)
- Explore different device designs by changing stiffnesses or creating a new device
- Increase/decrease muscle strength to simulate training/disuse
- Change control strategies by altering the reflex gains, changing the amount of co-contraction, or adding new controllers
- Explore kinematics and loading at the other joints in the model during landing
- Test different landing scenarios (e.g., height, platform slope, surface characteristics)
Apply what you've learned in the sections above to design an "optimal" device and training program to prevent ankle injury. You are free to modify any parameter of the model and the scenario, but keep in mind:
- Increasing the AFO's stiffness will increase manufacturing costs and decrease comfort and performance versatility.
- Training programs to increase muscle strength, improve co-activation strategy, improve landing position, etc. will also have costs.
- A device and training program that works in a variety of scenarios is ideal.
- Assume that a neutral ankle position (subtalar angle = 0) is ideal.
Develop a combined device and training program. Use simulation and your knowledge of biomechanics to demonstrate that your proposed solution is optimal.
- What choices and strategies did you make in designing an “optimal" AFO device and training program to prevent an ankle inversion injury? What are potential benefits and drawbacks of your design with respect to ankle injury prevention and user wearability?
Matt DeMers, Ajay Seth, Jen Hicks, Jeff Reinbolt, Ajay Seth, Scott Delp with input and testing help from many others
- DeMers, M.S., Hicks, J.L., Delp, S.L. (2017). Preparatory co-activation of the ankle muscles may prevent ankle inversion injuries. Journal of Biomechanics, 52:17-23.
- Lapointe, S.J., Siegler, S., Hillstrom, H., Nobilini, R.R., Mlodzienski, A., Techner, L. (1997). Changes in the flexibility characteristics of the ankle complex due to damage to the lateral collateral ligaments: an in vitro and in vivo study. Journal of Orthopaedic Research, 15(3):331–341.
- Siegler, S., Chen, J., Schneck, C.D. (1990). The effect of damage to the lateral collateral ligaments on the mechanical characteristics of the ankle joint—an in-vitro study. Journal of Biomechanical Engineering, 112(2):129–137.