Muscle Analysis
- Kathleen Lewicki
- Posts: 21
- Joined: Wed Jun 24, 2015 6:48 am
Muscle Analysis
Hi all,
I think this will probably be a pretty simple solution here, but I can't get it to work and I can't find much documentation on the Muscle Analysis protocol in the OpenSim user guide (maybe you could direct me to where that is if it exists).
But all I want to do is find my moment arms of a handful of muscles (deltoid fibers and rotator cuff) at the glenohumeral joint so that I can compare to literature values and determine if those are what are causing some problems elsewhere in my work.
I have tried to do the basic command in plotter where I just look at what the moment arm would be for say, shoulder elevation. When I've done this before in other models, it plots after a few seconds. When I try and do it in the model I am currently using (the scapulothoracic model + muscles from the MoBL model that have been adjusted slightly) it never plots anything. If I try and perform a muscle analysis using results from IK as my input (no external forces since it is upper extremity and we are just looking at a simple abduction motion) and select "compute moments", it says "executing analysis" but then never gets anywhere and essentially crashes OpenSim. If I don't compute moments, then the analysis will run but then obviously I do not get any information out about the moments or moment arms.
Any thoughts?
Thanks!
Kathleen
I think this will probably be a pretty simple solution here, but I can't get it to work and I can't find much documentation on the Muscle Analysis protocol in the OpenSim user guide (maybe you could direct me to where that is if it exists).
But all I want to do is find my moment arms of a handful of muscles (deltoid fibers and rotator cuff) at the glenohumeral joint so that I can compare to literature values and determine if those are what are causing some problems elsewhere in my work.
I have tried to do the basic command in plotter where I just look at what the moment arm would be for say, shoulder elevation. When I've done this before in other models, it plots after a few seconds. When I try and do it in the model I am currently using (the scapulothoracic model + muscles from the MoBL model that have been adjusted slightly) it never plots anything. If I try and perform a muscle analysis using results from IK as my input (no external forces since it is upper extremity and we are just looking at a simple abduction motion) and select "compute moments", it says "executing analysis" but then never gets anywhere and essentially crashes OpenSim. If I don't compute moments, then the analysis will run but then obviously I do not get any information out about the moments or moment arms.
Any thoughts?
Thanks!
Kathleen
- Thomas Uchida
- Posts: 1800
- Joined: Wed May 16, 2012 11:40 am
Re: Muscle Analysis
As you've pointed out, this is likely an issue with either the scapulothoracic model, the muscles from the MoBL model, the slight adjustments, or some combination of these. I'm not familiar with either of these models, but muscle paths (wrapping surfaces in particular) are potential culprits. To isolate the issue, you might try removing muscles one-by-one until the analysis runs (or perform a binary search if there are many muscles). You might also try running short analyses starting from different places in your IK data; if some of those work, then you might be able to narrow down any issues with the muscle paths. I would start by removing all but the single most innocent-looking muscle; if the analysis still doesn't run, then there's some deeper issue.When I've done this before in other models, it plots after a few seconds. When I try and do it in the model I am currently using (the scapulothoracic model + muscles from the MoBL model that have been adjusted slightly) it never plots anything.
By the way, the plotter runs an analysis behind the scenes, so there's no need to test using the plotter as well.
- Kathleen Lewicki
- Posts: 21
- Joined: Wed Jun 24, 2015 6:48 am
Re: Muscle Analysis
Hi Tom,
Thanks for that troubleshooting advice. I'll try those methods and see if I can get it to run at any point for any muscles. I do have another question though about this... aren't the moment arms necessary for completing static optimization? What is it using for static optimization if it can't compute moment arms?
Thanks!
Kathleen
Thanks for that troubleshooting advice. I'll try those methods and see if I can get it to run at any point for any muscles. I do have another question though about this... aren't the moment arms necessary for completing static optimization? What is it using for static optimization if it can't compute moment arms?
Thanks!
Kathleen
- Kathleen Lewicki
- Posts: 21
- Joined: Wed Jun 24, 2015 6:48 am
Re: Muscle Analysis
I haven't had any luck getting any muscles or any point in the simulation to work (I've looked at all of the muscles over very short time lengths and only at the single coordinate (shoulder elevation) which I'm most interested in), especially at time lengths in which wrapping is not being used and it is more of a point to point scenario). I've also tried with just a simple movement that is purely shoulder elevation (no other coordinates change) with no luck.
I tried performing the analysis in the MoBL model (with similar type muscles and wrapping elements) and everything runs okay. I've been trying to avoid using the MoBL model just because of all of the constraints and personally, for me the constraints makes the results unclear and confusing for validation/analysis purposes.
I'll keep digging and see if there's anything else I can unearth as to why this won't run..
Do you think it's an issue with the scapulothoracic model ? What would cause it to not be able to solve for moment arms, and if it can't solve for moment arms, what is it using during static optimization?
Thanks for any insight you may have (and for all that you have already provided!)
I tried performing the analysis in the MoBL model (with similar type muscles and wrapping elements) and everything runs okay. I've been trying to avoid using the MoBL model just because of all of the constraints and personally, for me the constraints makes the results unclear and confusing for validation/analysis purposes.
I'll keep digging and see if there's anything else I can unearth as to why this won't run..
Do you think it's an issue with the scapulothoracic model ? What would cause it to not be able to solve for moment arms, and if it can't solve for moment arms, what is it using during static optimization?
Thanks for any insight you may have (and for all that you have already provided!)
- Thomas Uchida
- Posts: 1800
- Joined: Wed May 16, 2012 11:40 am
Re: Muscle Analysis
I'm unfamiliar with these models and can think of several possible explanations. Someone else on the Forum may have more insight into this issue, but I would need to inspect the model. If you like, you can upload the simplest analysis that fails (e.g., only one muscle over a short time period) so that I can reproduce the issue on my end. I'm assuming you're using OpenSim 3.3.
- Kathleen Lewicki
- Posts: 21
- Joined: Wed Jun 24, 2015 6:48 am
Re: Muscle Analysis
Hi Tom,
I am indeed using 3.3... I've attached a zip file that has the model, the IK results (essentially the same as in the download file) and my setup file. I've been using 8-8.5 seconds because the lateral deltoid in that region is not wrapping around anything. The lateral deltoid is the muscle I've left in for this case since I haven't had luck with any of the muscles and its one of the most important muscles for what I am trying to model.
Like I said, I was only trying to get the moment arms for the coordinate of shoulder_elv since that is what I'm most interested for now.
Again, any insight or troubleshooting is appreciated. Looking forward to any suggestions.
I am indeed using 3.3... I've attached a zip file that has the model, the IK results (essentially the same as in the download file) and my setup file. I've been using 8-8.5 seconds because the lateral deltoid in that region is not wrapping around anything. The lateral deltoid is the muscle I've left in for this case since I haven't had luck with any of the muscles and its one of the most important muscles for what I am trying to model.
Like I said, I was only trying to get the moment arms for the coordinate of shoulder_elv since that is what I'm most interested for now.
Again, any insight or troubleshooting is appreciated. Looking forward to any suggestions.
- Attachments
-
- subject1_abdbonepin_IK.mot
- (597.02 KiB) Downloaded 33 times
-
- MuscleAnalysis_Setup.xml
- (4.61 KiB) Downloaded 101 times
-
- Native 2kg Weighted V4 Stripped.osim
- (149.1 KiB) Downloaded 100 times
- Thomas Uchida
- Posts: 1800
- Joined: Wed May 16, 2012 11:40 am
Re: Muscle Analysis
Hi, Kathleen.
I'm assuming you're using the scapulothoracic joint from this SimTK Project: https://simtk.org/projects/scapulothoracic. I downloaded the plugin (under "2. Software") to get your model to load. The GUI throws the following exception when attempting to run the analysis (you can see the exception by clicking the red icon that appears in the bottom-right corner of the GUI):
SimTK Exception thrown at SimbodyMatterSubsystem.cpp:1090: Error detected by Simbody method SimbodyMatterSubsystem::multiplyBySystemJacobianTranspose(): The supplied spatial forces vector had length 8; expected 10. (Required condition 'F_G.size() == nb' was not met.)
I suspect that the plugin may not provide the information OpenSim requests when computing moment arms. I have two suggestions:
1. The authors of the ScapulothoracicJoint plugin wrote a paper (http://nmbl.stanford.edu/wp-content/upl ... th2016.pdf) and gave an OpenSim webinar (https://www.youtube.com/watch?v=zPsfavRsxbc) about their model, which might provide more information about the capabilities of the model. You could also try contacting the authors directly.
2. If you're interested only in moment arms for shoulder_elv, the complexity of the ScapulothoracicJoint doesn't appear to be necessary; you could try replacing it with the equivalent weld joints that hold the scapula, etc. bodies in the desired pose.
Regards,
Tom
I'm assuming you're using the scapulothoracic joint from this SimTK Project: https://simtk.org/projects/scapulothoracic. I downloaded the plugin (under "2. Software") to get your model to load. The GUI throws the following exception when attempting to run the analysis (you can see the exception by clicking the red icon that appears in the bottom-right corner of the GUI):
SimTK Exception thrown at SimbodyMatterSubsystem.cpp:1090: Error detected by Simbody method SimbodyMatterSubsystem::multiplyBySystemJacobianTranspose(): The supplied spatial forces vector had length 8; expected 10. (Required condition 'F_G.size() == nb' was not met.)
I suspect that the plugin may not provide the information OpenSim requests when computing moment arms. I have two suggestions:
1. The authors of the ScapulothoracicJoint plugin wrote a paper (http://nmbl.stanford.edu/wp-content/upl ... th2016.pdf) and gave an OpenSim webinar (https://www.youtube.com/watch?v=zPsfavRsxbc) about their model, which might provide more information about the capabilities of the model. You could also try contacting the authors directly.
2. If you're interested only in moment arms for shoulder_elv, the complexity of the ScapulothoracicJoint doesn't appear to be necessary; you could try replacing it with the equivalent weld joints that hold the scapula, etc. bodies in the desired pose.
Regards,
Tom
- Kathleen Lewicki
- Posts: 21
- Joined: Wed Jun 24, 2015 6:48 am
Re: Muscle Analysis
Good morning Tom,
Thanks so much for your insight. I am familiar with their paper and the webinar, and will go back through to see if there is any insight, but since they were not concerned with muscles when they were creating their model, I don't think there will be any additional information there, so I will see if I can contact them and get any insight or make adjustments as necessary.
Do you know what static optimization is then using to obtain activations and muscle forces if moment arms cannot be outputted in the muscle analysis protocol? Because I am getting reasonable activations and muscle forces with static optimization so it seems as though at least something is processing properly. (I'll also bring this up when I contact the authors of the scapulothoracic joint model.
Thanks!
Kathleen
Thanks so much for your insight. I am familiar with their paper and the webinar, and will go back through to see if there is any insight, but since they were not concerned with muscles when they were creating their model, I don't think there will be any additional information there, so I will see if I can contact them and get any insight or make adjustments as necessary.
Do you know what static optimization is then using to obtain activations and muscle forces if moment arms cannot be outputted in the muscle analysis protocol? Because I am getting reasonable activations and muscle forces with static optimization so it seems as though at least something is processing properly. (I'll also bring this up when I contact the authors of the scapulothoracic joint model.
Thanks!
Kathleen
- Thomas Uchida
- Posts: 1800
- Joined: Wed May 16, 2012 11:40 am
Re: Muscle Analysis
Perhaps the authors mentioned something at the end of their paper as future work, or perhaps someone asked a relevant question in the Q&A session at the end of the webinar? Regardless, if these resources explain exactly what the plugin does, you might be able to determine what's going on and devise a fix or workaround.I am familiar with their paper and the webinar, and will go back through to see if there is any insight, but since they were not concerned with muscles when they were creating their model, I don't think there will be any additional information there
As far as I can tell, Static Optimization doesn't compute moment arms explicitly, but instead uses central differencing to explore the objective function landscape. The code can be found here: https://github.com/opensim-org/opensim- ... Target.cpp.Do you know what static optimization is then using to obtain activations and muscle forces if moment arms cannot be outputted in the muscle analysis protocol? Because I am getting reasonable activations and muscle forces with static optimization so it seems as though at least something is processing properly. (I'll also bring this up when I contact the authors of the scapulothoracic joint model.
- Kathleen Lewicki
- Posts: 21
- Joined: Wed Jun 24, 2015 6:48 am
Re: Muscle Analysis
Thanks Tom. I will take a look at those references again and see if there's any insight on what exactly that plugin does and take a look at the code you provided. Again, I really appreciate your help and insight on all of these questions I've had.
Kathleen
Kathleen