Forums Anyscript.org  

Go Back   Forums Anyscript.org > Professional Forum > Debug model

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 09-06-2018, 05:47 PM
John John is offline
Junior Member
 
Join Date: Sep 2018
Posts: 7
Default Integrate an amputation into a MoCap Model with MechObjectExclude

Hello,
I am working on a MoCap Model for the lower extremity and try to integrate a unilateral transfemoral amputation into it. The idea is to do it with the object "MechObjectExclude" in the LegExchange.any file. So if the amputation is activated in the LabSpecificData.any file and the inverse dynamic study is started, on the left side a lot of muscles should be excluded together with the segments "Shank" and "Thigh" and also the Joint "Knee". In the LegExchange.any file, after the exclude methods, are also new muscles, segments and joints defined which represent the amputated case.
The problem now is, that if I am loading the model, I get the warning that the Leg Calibration Studies contain too few kinematic constraints. So if I am running the InverseDynamics it starts but of course fails because the model is kinematically indeterminate. But I mentioned in the model view, that the segments, joints and muscles that should be excluded when the inverse dynamic study is started are still present and not excluded. So know I am not sure, whether there is a mistake in the LegExchange.any file I created with the exclusion of these objects and if this could get fixed anyhow or if it generally does not work that way I am trying to integrate an amputation to the model.
Many thanks in advance,
John
Attached Files
File Type: any LowerExtremity.main.any (459 Bytes, 3 views)
File Type: any LabSpecificData.any (1.9 KB, 2 views)
File Type: any LegExchange.any (90.8 KB, 3 views)
Reply With Quote
  #2  
Old 09-11-2018, 10:21 AM
toerholm's Avatar
toerholm toerholm is offline
AnyBody Support
 
Join Date: Feb 2009
Posts: 943
Default

Hi John,


I have looked at bit at your files and i think i have found the reason for the problem.


You exclude segments, joint and muscles from the inverse dynamic study, so only this study is affected by this.

Then you open up the folder " Main.HumanModel.BodyModel.Left.Leg" and start adding muscles, segs etc.

So the added items are going into the normal body model and all studies using this body model will have these new items which has been defined.

This leeds to problems in the calibration study.

The solution depends on what you want to do:

1: if you would like to run the calibration on a non-amputee model then, you have to add the these new body parts to a folder which is not part of the human model and thus included by all other studies.

2: If you like to run all studies on an amputee model you need to do the exclusion in all studies. Instead of doing this for each study one by one you can use the object AnyMechObjectExcluder for this it .

Hope it helps.

Best regards
Søren





but you insert the new body parts into t
__________________
TIP: How to save and load results.
http://wiki.anyscript.org/index.php/All_about_AnyBody_Modeling_System#Save_Load_and_Re play_Results

Subscribe to the forums, click the 'Forum Tools' link above the list of threads then select 'Subscribe to Forum'. You will then have the option to choose the subscription mode for this forum and get an email automatically.
Reply With Quote
  #3  
Old 09-11-2018, 04:56 PM
John John is offline
Junior Member
 
Join Date: Sep 2018
Posts: 7
Default

Hey Søren,

thank you for your ideas!
I tried to do it with the second way and put the exclusion in all studies. I don't know if i really got it right with what you mean, that I don't have to do it for each study one by one. The only way I managed to do it, is by doing it with the MechObjectExclude object for each LegCalibrationStudy. You can see it in the modified LabSpecificData.any file I attach to this post.
But when I load the model now, it still gives me the same warnings, that the LegCalibrationStudies contain too few kinematic constraints. Despite the warnings, I started the InverseDynamics within the folder "RunAnalysis" and this runs further now than before, but also fails. The error now is: "Unknown error: No Class Information".

My whole model is too large to attach it to my post, but I made a Dropbox-folder and with the following link you have access to it, if you maybe would like to run the model by yourself.
https://www.dropbox.com/sh/n51vjcyti...qTXioe-Na?dl=0

Thanks again and best regards
John
Attached Files
File Type: any LabSpecificData.any (3.3 KB, 1 views)
Reply With Quote
  #4  
Old 09-11-2018, 05:28 PM
toerholm's Avatar
toerholm toerholm is offline
AnyBody Support
 
Join Date: Feb 2009
Posts: 943
Default

Hi John,

I will try to explain in some more detail.

Concerning the calibration there are two ways as i listed.

1: you do the calibration as if it was the non-amputee model
2: you do the calibration on the amputee model

This is not a modeling question but more fundamental, i think that option 1 is more correct since this will calibrate the model as it was intact. Option 2 will adapt muscle to the changes done by the amputation... Which situation is correct i am not sure it depends on the surgical procedure.


To check which object you have in the studies you can in the ModelTree click on the study in question e.g. the calibration study then you can in the object description get a complete list of segments, joint and drivers... please review this list carefully to see if you have excluded things correctly and if you have added things correctly.

I looked again on the legExchange.any file it seems you are removing both thigh and shank but not the foot and talus? this i did not understand.


Best regards
Søren
__________________
TIP: How to save and load results.
http://wiki.anyscript.org/index.php/All_about_AnyBody_Modeling_System#Save_Load_and_Re play_Results

Subscribe to the forums, click the 'Forum Tools' link above the list of threads then select 'Subscribe to Forum'. You will then have the option to choose the subscription mode for this forum and get an email automatically.
Reply With Quote
  #5  
Old 09-21-2018, 04:59 PM
John John is offline
Junior Member
 
Join Date: Sep 2018
Posts: 7
Default

Hi Søren,

after your last response I managed to do some changes to my model and now everything should be excluded and added correctly.
I do not remove the foot and talus because it was not necessary to make changes to them as it was necessary with the shank and thigh. So I could keep foot and talus an did not need to add new ones.
Right now the calibration study and also the kinematics are running, which is good progress.
But a new error appears when starting the inverse dynamics. The error says, that the muscle recruitment solver is aborted due to a singular KKT-matrix and I really cannot figure out where exactly the problem is and how I could fix this.
As last time I would also put my current model in the dropbox folder you can access through this link:
https://www.dropbox.com/sh/n51vjcyti...qTXioe-Na?dl=0
Maybe you again have an idea what could lead to this error.

Many thanks and best regards
John
Reply With Quote
  #6  
Old 11-19-2018, 04:40 PM
toerholm's Avatar
toerholm toerholm is offline
AnyBody Support
 
Join Date: Feb 2009
Posts: 943
Default

Hi John,

I came across this post, what is the status has it been resolved?
If not i will take a look at the files

Best regards
Søren
__________________
TIP: How to save and load results.
http://wiki.anyscript.org/index.php/All_about_AnyBody_Modeling_System#Save_Load_and_Re play_Results

Subscribe to the forums, click the 'Forum Tools' link above the list of threads then select 'Subscribe to Forum'. You will then have the option to choose the subscription mode for this forum and get an email automatically.
Reply With Quote
  #7  
Old 11-20-2018, 02:43 PM
John John is offline
Junior Member
 
Join Date: Sep 2018
Posts: 7
Default

Hey Søren,

thank you for responding to this older post.
The problem is not resolved by now, so it would be great if you could take a look at the model.

Best regards
John
Reply With Quote
  #8  
Old 11-21-2018, 02:15 PM
toerholm's Avatar
toerholm toerholm is offline
AnyBody Support
 
Join Date: Feb 2009
Posts: 943
Default

Hi John,

I have taken a look at your model, and i am bit confused sorry.

I was unsure which model to run ? i tried the lowerextremity model but it did not run inverse analysis due to a kin error not with a kkt like you write.
The LowerThigh segment looks strange at load time it is about 90 deg sideways.

I also tried the fullbody model and i also did not kinematically.

So i am in doubt if i have the same model as you?

In general i can say that the KKT error means that the solver did not find a way to activate the muscle that can create equilibrium.
One reason could the wrong calibration of muscles, please try to use simple muscles and see if the error change.

Secondly you could try to make a model with a simpler loading scenario than the gait model, but using the same legexchange model. This would allow you to better understand which DOF in the model is not possible to balance.

Hope it helps,

Best regards
Søren
__________________
TIP: How to save and load results.
http://wiki.anyscript.org/index.php/All_about_AnyBody_Modeling_System#Save_Load_and_Re play_Results

Subscribe to the forums, click the 'Forum Tools' link above the list of threads then select 'Subscribe to Forum'. You will then have the option to choose the subscription mode for this forum and get an email automatically.
Reply With Quote
  #9  
Old 11-23-2018, 05:26 PM
John John is offline
Junior Member
 
Join Date: Sep 2018
Posts: 7
Default

Hi Søren,

the LowerExtremity model is the correct one. I can tell you how I managed to make the kinematics work and then got the KKT error with the inverse dynamic analysis.
First I run the InitialConditions in Operations - Studies - InverseDynamicStudy. After that the LowerThigh is not 90 deg sideways anymore as it is at load time.
After that I run the MuscleCalibration in Operations - RunAnalysis - InverseDynamics.
When this is finished I can start the Kinematics in Operations - Studies - InverseDynamicStudy. There will be a lot of warnings but the kinematics will run till the end without an error.
If I then start the InverseDynamics in Operations - Studies- InverseDynamicStudy the error with the singular KKT matrix appears.

Right now, I am not working on this model myself anymore, because it was part of an internship I did. But I will pass on your ideas to the advisor of my internship, I guess that this could be helpful for him to finally make the model work.
Thanks a lot for your helpful hints and if you may have any other ideas, what could lead to the error, do let me know.

Best regards
John
Reply With Quote
  #10  
Old 11-26-2018, 10:58 AM
toerholm's Avatar
toerholm toerholm is offline
AnyBody Support
 
Join Date: Feb 2009
Posts: 943
Default

Hi John,

I have taken another look at the model and realized that the problem is that the muscle on the left leg are still attached to the original bones, not the new bones you have created.

So when the model is running the muscles are are "left behind" together with the old leg, this is why the model can not be be balanced and the returns a KKT error.

There can be tow ways to fix.


1. Attach the muscles to the new bones
2. Restructure the model so that you modify the original bones and avoided introducing the new bones, like you did.

Best regards
Søren
__________________
TIP: How to save and load results.
http://wiki.anyscript.org/index.php/All_about_AnyBody_Modeling_System#Save_Load_and_Re play_Results

Subscribe to the forums, click the 'Forum Tools' link above the list of threads then select 'Subscribe to Forum'. You will then have the option to choose the subscription mode for this forum and get an email automatically.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:05 PM.