Using Computed Muscle Control
- Load the Upper Extremity Model. The model (arm26.osim) can be found in the Models folder in the directory where you installed OpenSim.
- Open Computed Muscle Control Tool. To open the tool, select Compute Muscle Control… from the Tools menu.
- Specify Filtered Input Motion. Browse to the inverse kinematics directory and select the Desired kinematics file
(e.g. ..\InverseKinematics\arm26_InverseKinematics.mot), check the Filter kinematics option, and enter a cutoff frequency of 6 Hz. Note that if you are starting with the Computed Muscle Control example, you will find the desired kinematics file in the Output Reference folder (e.g. ..\OutputReference\InverseKinematics\arm26_InverseKinematics.mot).
- Specify Tracking Tasks. Browse to select the tasks file (e.g., arm26_ComputedMuscleControl_Tasks.xml) specifying the joint coordinates for CMC to track and their relative weightings as well as the Kp and Kv gains on the errors.
- Specify Actuator Constraints. Browse to select the constraints file (e.g., arm26_ComputedMuscleControl_ControlConstraints.xml) specifying the maximum (or minimum) value used to constrain the allowed values of the actuator controls.
- Specify Time Range. The time range for the forward simulation is specified and these should be set from 0 to 1 sec to correspond to the interval upon which the motion was found from inverse kinematics.
- Set CMC look-ahead window. A time window of 0.01 is generally sufficient for muscle activations to change enough to produce the desired accelerations.
- Specify Output Directory. Set the output Directory (e.g., ..\ComputedMuscleControl\Results), so that you are able to compare the results of a CMC simulation with Forward Dynamics simulations using Nonphysiological and Physiological controls generated earlier by Static Optimization.
- Specify Additional Model Actuators. Under the Actuators and External Loads tab, set the actuator settings to Append (rather than replace) and edit the Additional force set files field by adding an actuator set file (e.g., arm26_Reserve_Actuators.xml) containing reserve torques.
- Save Settings. Use the Settings > button to save your settings to a setup file (e.g., arm26_Setup_ComputedMuscleControl.xml).
- Run CMC Tool. You will see the model begin to move as muscles contract and accelerate the model. When the simulation has completed by reaching the end of the specified time range, the specified output directory will be populated by states files (e.g., arm26_states_degrees.mot) and the corresponding motion file (e.g., arm26_states) will be associated with the model in the GUI.
Changing the Desired Kinematics
- Create New Desired Kinematics. Edit the original Desired kinematics file (e.g., ..\InverseKinematics\arm26_InverseKinematics.mot) by specifying different shoulder elevation angle versus time (e.g., copy and paste elbow flexion values to shoulder elevation). Save the new file (e.g., arm26_SpecifiedShoulder.mot)
- Specify New Input Motion. Browse and select the newly created Desired kinematics file (e.g., arm26_SpecifiedShoulder.mot), check the Filter kinematics option, and enter a cutoff frequency of 6 Hz.
- Run CMC Tool. You will see the model begin to move to match the new kinematics.
Changing the Tracking Tasks
- Change Tracking Weight. Edit the tasks file (e.g., arm26_ComputedMuscleControl_Tasks.xml) or use the Property Editor to reduce the r_shoulder_elev weight from 1.0 to 0.0.
- Specify New Tracking Tasks. Browse and select the new tasks file (e.g., arm26_ComputedMuscleControl_Tasks.xml) or save new task from the Property Editor.
- Run CMC Tool. You will see the model begin to move while tracking the elbow flexion well but not the shoulder elevation.
Changing the Actuator Constraints
- Change Actuator Constraint. Edit the constraints file (e.g., arm26_ControlConstraints.xml) or use the Excitation Editor to limit BIClong control to a maximum of 0.05.
- Specify Actuator Constraints. Browse and select the new constraints file (e.g., arm26_ControlConstraints.xml) or save new constraint from the Excitation Editor.
- Run CMC Tool. You will see the model begin to move by using other actuators in lieu of BIClong.
Changing the CMC Look-Ahead Window
- Change CMC Look-Ahead Window. Set the look-ahead time to 0.5 rather than 0.01.
- Run CMC Tool. You will see the model begin to move, but the control will be too coarse to allow for good tracking.