...
...
Tip |
---|
Static Optimization is a method for estimating muscle activations and muscle forces that satisfy the positions, velocities, accelerations, and external forces (e.g., ground reaction forces) of a motion. The technique is called "static" since calculations are performed at each time frame, without integrating the equations of motion between time steps. Because there is no integration, Static Optimization can be very fast and efficient, but it does ignore activation dynamics and tendon compliance. (See Hicks et al., (2015) for more details regarding this and similar modeling and simulation choices and their pros and cons.)
...
(1) Before completing the tutorial, make sure you have reviewed the following readings from the User's Guide and completed the prerequisite tutorials.
User Guide Readings | Prerequisite Tutorials | Helpful Readings |
---|---|---|
(2) Install OpenSim version 4.0.
...
In Study 1, you will load a model, create a setup file, and run Static Optimization. Then you will learn how to troubleshoot an under-actuated model.
| |
You must specify the three inputs to Static Optimization: (i) the model, (ii) the motion of interest, and (iii) any external forces (e.g., ground reaction forces). The tool is using the current model in the GUI (subject01), so you just need to input motion and any external forces.
The tool will now step through each time frame of the input motion. At each time, updating the model coordinates, external loads, and calculating the muscle forces and activations needed to generate the model's accelerations. |
| |||
Once the Static Optimization tool has finished, the results are saved to your ResultsSO folder:
|
What exactly is happening? This error message, "Optimizer Failed..." is informing you that the optimizer could not find an adequate solution at the time indicated. Remember that Static Optimization is trying to calculate activations and muscle forces that satisfy the model's coordinate accelerations calculated from the specified kinematics file. If the model's actuators cannot generate sufficient forces to match these accelerations, this "Optimizer Failed..." error will appear. The Static Optimization tool has produced a set of results to help with troubleshooting, but these outputs are not valid.
...
- Re-open the Static Optimization tool (if you have already closed it), and load your saved setup file.
- You can add additional actuation by going to the Actuators input box in the Actuators and External Loads tab, clicking Edit... > Add and selecting the gait10dof18musc_Strong_actuators.xml from your working folder. The actuator file is a pre-made file that contains specifications for actuators for each coordinate in the model (i.e., reserves and residuals plus an actuator to control the lumbar extension degree of freedom).
- We want to append these actuators to the existing set of muscles, rather than replacing the muscles, so select the button Append to model's force set
- Go to Main Settings, change the output directory to /ResultsSO_StrongActuators, so you don't print over your previous results.
- Save this new version of the setup file and rerun the analysis. Looking into the GUI message window you will see that the last error message is now gone, meaning that the model can generate sufficient forces.
Firstly, plot the Lumbar actuator reserves from the output file Scaled_Model_StaticOptimization_force.sto. | |
Now add the new Gastrocnemius muscle activation curve to your plot from before. This figure shows that the Gastrocnemius activation was significantly reduced. The reduction is due to the additional torques generated by the actuators added to the model. |
Plot the moments produced by the right ankle reserve actuator from the output file Scaled_Model_StaticOptimization_force.sto. On a separate figure, plot the Fx, Fy, and Mz residual actuator forces. |
We now have a working Static Optimization analysis. A functioning analysis does not mean that the results are valid; rather, we have a place to start iterating from to improve the output. In the following studies, we will gradually improve the quality of the inputs to get a better result. Review the questions below to better understand the problems with the current set of results.
...
The aim of Study 2 is to assess how improving the input kinematics affects muscle activations and forces that Static Optimization outputs. Static Optimization is trying to compute muscle forces that generate the accelerations seen in the input kinematics. If these accelerations are noisy, there will be noise in the muscle activations and forces. In Study 1, we saw noisy activations and forces that are most likely the result of noisy motion data. We will investigate two methods for improving the motion data: (i) filtering the input kinematics and (ii) using the the Residual Reduction Algorithm (RRA) to smooth the kinematics.
...
- ResultsSO: Static Optimization, no actuation, unfiltered IK motion. (from Study 1)
- ResultsSO_StrongActuators: Static Optimization, with actuation, unfiltered IK motion. (from Study 1)
- ResultsSO_StrongActuators_filtered: Static Optimization, with actuation, filtered IK motion.
- ResultsSO_StrongActuators_RRA: Static Optimization, with actuation, RRA motion.
Generate figures that compare the Gastrocnemius activations for the three different kinematics inputs (2. unfiltered, 3. filtered, and 4. RRA) where reserve and residual actuators were included (i.e., skip case 1). You can rename the curves by right clicking on the curve name in Curves List. | |
Plot the Fx residual for the three kinematics inputs (2. unfiltered, 3. filtered, and 4. RRA). Explore some of the other forces and activation results from the analysis. |
Questions
- Describe the changes in muscle activation for the three different motion inputs.
- Why did the residual forces decrease from the Unfiltered to Filtered condition? Why did the residual forces decrease further when using the motion from RRA?
- Which kinematic input should be used for the Static Optimization analysis? Explain your reason(s).
...
The current actuators file has optimal forces of 100 N for each force actuator (i.e., residuals FX and FY) and optimal torques of 100 N-m for each torque actuator (i.e., residual MZ, and reserve coordinate actuators). When trying to minimize the sum of activations squared, the optimizer can use small activation values to these force and torque actuators generate large forces or torques. For example, with an optimal torque of 100 N-m, an activation of 0.5 will generate a torque of 50 N-m. If, instead, the optimal torque were 1 N-m, the optimizer must now use very high activations to produce any meaningful torques. In this latter case (optimal torque = 1) , an activation of 0.5 would only generate 0.5 N-m, and an activation of 50 is necessary to generate 50 N-m of torque. Thus, when the optimal force is very low (~1 N or 1 N-m) the optimizer can still choose to use the reserve actuators when needed, but the cost is so high relative to the muscles that the optimizer will preferentially use muscles to generate joint torques and only use the reserve actuators when the muscles cannot generate sufficient torque.
| Edit the actuators file and change each actuator's optimal force from 100 to 1. The easiest way to change this is by editing the file directly in a text editor like Notepad++ (download Notepad++). However, you can use any text editor.
|
Perform another Static Optimization analysis using the RRA adjusted kinematics.
Once the analysis finished plot the Gastrocnemius activation when using the strong actuators (optimal force at 100) vs the normal actuators (optimal force at 1). |
Plot and compare the lumbar actuator moment, ankle reserve actuator force and the Fx residual force when using the strong actuators (optimal force at 100) and normal actuators (optimal force at 1) |
Questions:
- How do the Gastrocnemius muscle force change between the analysis using strong actuators (optimal force at 100) and the normal (optimal force at 1) actuators? What about the moment generated by the ankle actuators? If there are differences, explain why.
- How does the lumbar actuator reserve moment change between using the large vs. small optimal_force? Why might this be the case? (Hint: observe whether or not there are muscles that control the lumbar extension degree of freedom.)
- What is the peak Fx residual force? Why does the value stay the same between the strong and normal actuator case? (Hint: refer to the section earlier in the tutorial where we discuss why we need residual forces and moments. Are there other actuators in the model that could generate these forces?)
...
In this Study, you will add an ankle spring to the model and observe the effect on Gastrocnemius activation. Make sure you're using OpenSim 4.0 or a more recent version of the software.
...
The first step is to add a coordinate spring to the model. You will do this by running a GUI script that loads the current model, adds a coordinate spring to the right ankle, and saves it as a new model.
A new model will appear in the GUI. In the navigator pane, notice the name of the model now has 'ankle_spring' appended. Expand the model hierarchy to find the spring under Forces>Other Forces. From the Property Editor, you can observe and edit the spring's properties. For example, You will be able to see that the spring name is 'AnkleLimitSpringDamper'. Also, observe that a new model has been saved to your WorkingWithStaticOptimization folder called 'subject01_spring.osim'. |
Now that you have a new model with an ankle spring, you will re-run the Static Optimization analysis using the same setup from Study 3 (with normal reserve actuators). Rename the output folder to \ResultsSO_NormalActuators_RRA_Spring
Plot the AnkleLimitSpringDamper moment from the file Scaled_Model_StaticOptimization_force.sto | |
Plot the Gastrocnemius activation from the analyzes with and without the Spring (the results should be in the folder ResultsSO_NormalActuators from Study 4 and the latest folder, ResultsSO_Spring) |
Questions:
- Why did the Gastrocnemius activation decrease when the ankle spring was added?
- Optional: try increasing or decreasing the spring stiffness. How does this affect the Gastrocnemius activation?
- Optional: are any other muscle affected by adding the ankle spring?
References
- Hicks J.L., Uchida T.K., Seth A, Delp S.L. (2015). Is My Model Good Enough? Best Practices for Verification and Validation of Musculoskeletal Models and Simulations of Movement. Journal of Biomechanical Engineering, 137(2)