Hi,
I am using the osim model gait2392_AlteredPelvisFrame3DoFkneeNoTorso.osim to process retrospective clinical gait data (Vicon PiG) from our gait lab. Following scaling, I have run the Inverse Kinematic tool using converted marker data from a trial as an input. The intention is to output key muscles normalized muscle-tendon lengths and velocities. I can see sensible data in the plotter when I plot normalized fiber length v time, however if I try to use 'MuscleAnalysis' in the Analyze function, the data output in the .sto files is different to what is available in the plotter; the normalized fiber-length and velocities are not changing over time. Has anyone else come across this issue and could point me in the direction of where i'm going wrong?
Thanks,
Emma
Analyze MuscleAnalysis outputs different to plotter
- Emma Pratt
- Posts: 8
- Joined: Fri Sep 03, 2021 8:22 am
- Mohammadreza Rezaie
- Posts: 408
- Joined: Fri Nov 24, 2017 12:48 am
Re: Analyze MuscleAnalysis outputs different to plotter
Hi, Plotter basically plots muscle quantities with respect to coordinates range of motion not time, i.e., it doesn't take IK output into account; please see: https://simtk-confluence.stanford.edu:8 ... t-inCurves. Unless you load the outputs of MuscleAnalysis; then, you can plot the quantities vs time.
If you select the IK output as motion file in the Analyze tool with MuscleAnalysis [nothing else is required], you will be able to get muscle quantities at each time frame. Please see:
https://simtk-confluence.stanford.edu:8 ... he%20input
Hope this helps.
If you select the IK output as motion file in the Analyze tool with MuscleAnalysis [nothing else is required], you will be able to get muscle quantities at each time frame. Please see:
https://simtk-confluence.stanford.edu:8 ... he%20input
Hope this helps.
- Emma Pratt
- Posts: 8
- Joined: Fri Sep 03, 2021 8:22 am
Re: Analyze MuscleAnalysis outputs different to plotter
Thank you for your reply.
I have been plotting Normalized fiber length v IK results in the plotter - and this appears to show the outputs v time (the outputs from the IK e.g. pelvic tilt when plotted against time are exactly the same when plotted against IK results).
I have been using the same IK results as the motion file in the Analyze tool, and selecting the MuscleAnalysis, however the values in the resulting MuscleAnalysisNormalizedFiberLength.sto file do not vary with time. I can't understand this as there are clearly outputs in the plotter.
Could anyone advise what could be happening?
Many thanks!
Emma
I have been plotting Normalized fiber length v IK results in the plotter - and this appears to show the outputs v time (the outputs from the IK e.g. pelvic tilt when plotted against time are exactly the same when plotted against IK results).
I have been using the same IK results as the motion file in the Analyze tool, and selecting the MuscleAnalysis, however the values in the resulting MuscleAnalysisNormalizedFiberLength.sto file do not vary with time. I can't understand this as there are clearly outputs in the plotter.
Could anyone advise what could be happening?
Many thanks!
Emma
- Emma Pratt
- Posts: 8
- Joined: Fri Sep 03, 2021 8:22 am
Re: Analyze MuscleAnalysis outputs different to plotter
I've attached the files i'm using in-case this is any help!
- Attachments
-
- TD59_S5_114_IK_090224.mot
- (65.5 KiB) Downloaded 55 times
-
- TD5-9S5_060224_scaled.osim
- (579.52 KiB) Downloaded 64 times
- Mohammadreza Rezaie
- Posts: 408
- Joined: Fri Nov 24, 2017 12:48 am
Re: Analyze MuscleAnalysis outputs different to plotter
Make sure that "Solve for equilibrium for actuator states" is checked in Analyze tool and let me know how it works.
- Emma Pratt
- Posts: 8
- Joined: Fri Sep 03, 2021 8:22 am
Re: Analyze MuscleAnalysis outputs different to plotter
Thank you! With "Solve for equilibrium for actuator states" selected I get outputs that vary in time from in the output Normalizedfiberlength.sto file.
I note in the messages view there are some errors (see below), which I presume reduce the confidence I should have with the outputs produced. I'm unsure of the implications on the normalized muscle fiber length and velocity outputs however - as these are the only outputs i'm using.
In Object 'bifemlh_l' of type Thelen2003Muscle.
Thrown at Thelen2003Muscle.cpp:376 in computeInitialFiberEquilibrium()..
AnalyzeTool::run() unable to equilibrate muscles at time = 0.64. Reason: Model::equilibrateMuscles() Unable to compute equilibrium for this muscle.
Please verify that the initial activation is valid and that the length of the musculotendon actuator doesn't produce a pennation angle of 90 degrees or a negative fiber length.
Solution error 0.808376 exceeds tolerance of 5.12e-06
Newton iterations reached limit of 20
Activation is 0.05
Fiber length is nan
I note in the messages view there are some errors (see below), which I presume reduce the confidence I should have with the outputs produced. I'm unsure of the implications on the normalized muscle fiber length and velocity outputs however - as these are the only outputs i'm using.
In Object 'bifemlh_l' of type Thelen2003Muscle.
Thrown at Thelen2003Muscle.cpp:376 in computeInitialFiberEquilibrium()..
AnalyzeTool::run() unable to equilibrate muscles at time = 0.64. Reason: Model::equilibrateMuscles() Unable to compute equilibrium for this muscle.
Please verify that the initial activation is valid and that the length of the musculotendon actuator doesn't produce a pennation angle of 90 degrees or a negative fiber length.
Solution error 0.808376 exceeds tolerance of 5.12e-06
Newton iterations reached limit of 20
Activation is 0.05
Fiber length is nan
- Mohammadreza Rezaie
- Posts: 408
- Joined: Fri Nov 24, 2017 12:48 am
Re: Analyze MuscleAnalysis outputs different to plotter
One potential reason could be the muscle model, I suggest substituting Thelen2003Muscle with Millard2012EquilibriumMuscle. More info can be found here: https://simtk-confluence.stanford.edu:8 ... blications.
Simply open your generic model with a text editor, e.g. npp or vscode, and replace the texts; then update the model using either [Tools > Convert Files...] or [open and save].
This model in the OpenSim installation directory has better muscles paths [OpenSim-4.5-win64\Resources.zip\Models\Rajagopal\RajagopalLaiUhlrich2023.osim]
There is also a tool for optimizing muscle-tendon parameters: https://simtk.org/projects/opt_muscle_par
But, when getting muscle quantities with MuscleAnalysis tool with only motion data, the output is subject to the activation level and the default_activation of 0.05 is being used in your model. You may want to use full activation instead.
-Mohammadreza
Simply open your generic model with a text editor, e.g. npp or vscode, and replace the texts; then update the model using either [Tools > Convert Files...] or [open and save].
This model in the OpenSim installation directory has better muscles paths [OpenSim-4.5-win64\Resources.zip\Models\Rajagopal\RajagopalLaiUhlrich2023.osim]
There is also a tool for optimizing muscle-tendon parameters: https://simtk.org/projects/opt_muscle_par
But, when getting muscle quantities with MuscleAnalysis tool with only motion data, the output is subject to the activation level and the default_activation of 0.05 is being used in your model. You may want to use full activation instead.
-Mohammadreza
- Emma Pratt
- Posts: 8
- Joined: Fri Sep 03, 2021 8:22 am
Re: Analyze MuscleAnalysis outputs different to plotter
Thanks! I'll give your suggestions a go.