TKR Model Inverse Dynamics

Hello,

I am a new user and I’d like to use the TKA model from the AMMR V1.5 to investigate the forces during a knee bend.

However, whenever I run the inverse dynamic analysis on the model, it gives multiple “Overloaded Muscle Configuration” warnings before the analysis seems to freeze. I can’t figure out which muscles are overloaded and why.

Do you know what is causing this warning and how I can avoid it?

Thank you!
Jacob

Hi Jacob,

welcome to the AnyBody Forum!
The TKA model from the repository is an advanced model and it might be worth getting started with a simpler model at the beginning. However, the warnings that you see are not serious.

First, you should try to understand what is happening when you use force dependent kinematics. Did you go through the “FDK” tutorial?

Using fdk means that you basically free up some constraints and the model will try out several possible combinations between the involved components to find a force equilibrium. This will affect the computational time of the model. The TKA model has several fdk degree of freedom between tibial and femoral component (and also to the patella), therefore many possibilities are considered. This makes the model relatively slow compared to other models.

That means, your model does NOT freeze, it’s just trying to find the first step. Usually, the first step is the most difficult step to calculate, so it takes the longest.

While the model tries many different solutions (positions of femoral device compared to tibial device) it goes through some positions that will lead to these warnings you saw. That means this muscle overload warning is only happening on the way to the solution. Once the perfect solution is found, there should not be a warning anymore.

I hope this will help you …


1 Like

Jacob,

Please install the latest version of AnyBody if you have not already done so. The new version is 5.3.1 and it contains some improvements of the FDK algorithms that may increase robustness and efficiency.

Best regards,
John

Thanks!

Amir: Yes, I have been through most of the AnyBody tutorials, including the FDK tutorial. I was concerned since the model takes much longer to load than the others. However, it is working now.

John: We are running AnyBody version 5.3.1.3556. Is this the newest version?

I’m looking at the JointsAndDrivers file to understand how the forces in the model are developed.
Since the position and moment reactions for the trunk are all on, do all of the forces in the model come from the reaction force and moment .txt files for the feet?

Also, I’m sure I saw this in the tutorials before, but is there an easy way to save all of the data that is output from a study so we can look at different measurements in the future without having to re-run the study?

Thank you very much for your help!
Jacob

Hi Jacob,

Yes, that is so far the latest version.

Yes, you are absolutely correct about the .txt files.

To save/load the results you could use macro commands, something like that:


  AnyOperationMacro SaveResults = 
  { 
    MacroStr=
    {
    "classoperation Main.Study.Output" + " " + strquote("Save data") + " --file=" + strquote(FilePathCompleteOf(Main.DesiredOutputFileName )) + " --type=Deep"
    };
  };
  
  
  AnyOperationMacro LoadResults = 
  { 
   MacroStr=
   {
    "classoperation Main.Study.Output" + " " + strquote("Load data") + " --file=" + strquote(FilePathCompleteOf(Main.DesiredOutputFileName )) 
   };
  };

You just need to define : Main.DesiredOutputFileName. You could also call this macro automatically if you add as the last operation in the main sequence. Let us know if you run into some sort of problem.

Best regards,
Pavel

Hi Pavel,

Could you explain more how to use macros, or direct me to more information on them in AnyBody? Also, how would you define Main.DesiredOutputFileName?

I am investigating the ligament loads in the model and I was able to output the forces on all of the ligaments. I noticed that the forces on the ligaments were 0 for much of the knee bend. This does not seem biologically accurate.

Could you possibly give more information on how the attachment points and original lengths of the ligaments were determined?

Thanks!
Jacob

Hi Jacob,

Unfortunately we do not have a comprehensive document for macro commands. The only thing we have is the reference manual - there are a few small examples in Demos\Basic AnyScript\Macro Language. Please have a look and let me know if you have more questions. But here I will add a few more words:

AMS runs any analysis as a sequence of operations, for example: initial conditions->kinematics->inverse dynamics analysis.
Each of those has pre- and post- operation placeholders, which you can find in the Operations tab by expanding the operation trees. There are several classes that define various operations in AMS: AnyOperationDummy, AnyOperationMacro, AnyOperationSequence, AnyOperationSetValue, and AnyOperationShellExec. Mostly the names are self-explaining, but AnyOperationMacro is a special class that allows to execute either general operation or special “class operations”, which could otherwise be accessed through GUI. For example, you could save an STL surface using this operation or do something else. To find the list of possible operation you can right-click on objects in the model tree view or operation tree view, or to check the reference manual.

For you particular problem you need to perform the class operation “Save Data” of AnyBodyStudy\Output. If you find it in the model tree view - it would suggest several options including this one. If you want to do it just once - you could call this function from GUI, but it can also be added as a post-operation to InverseDynamics analysis. This way you always know that this result is from the last run. Inside the relevant study you need to add the block:


InverseDynamics.PostOperation={
AnyOperation &reference_to_my_operation = Main.SaveResults;
};

Or add it as the last operation to your RunApplication sequence in the similar manner.

To define the name you just write:


Main = {
...
AnyFileVar DesiredOutputFileName = "myfilenamehere.txt";
...
}

In the next message we will answer about the ligaments.

Regards,
Pavel

Hi Jacob,

The TKA kneebend model is only a Demo Model showing what is possible and how it can be done. Verification has been done, showing that AnyBody calculations are correct (the math behind everything), however, no validation has been made. This means that the results have not been compared to anatomical, or physiological in vivo data. Therefore, the model is only a “beta” model

When you look at the implant alignment, you can see that it is only roughly matching the knee axis, but it is not surgical correct.

Ligament attachment points and also ligament slack lengths have been roughly assumed.

A model with more anatomical input was developed by Michael Skipper Andersen, it might be worth talking to him about it.

Hi Pavel

 How to get the value "KneeForceDepDriverPos" ?

AnyVector KneeForceDepDriverPos = { 1.2985e-3,-3.4225e-3,-5.1812e-4,-6.3627e-2,-1.2035e-2};
AnyVector PatellaForceDepDriverPos = {-7.46e-3};

I don't know where can I get these values?  It is a problem for me when I establish a new model may like shoulder or ankle.

  Can you tell me how to determine these value?

thanks

Jensen

1 Like

Hi Jensen,

I guess you are asking to how to find an initial guess to the FDK problem for knee and patella joints?

It is a difficult question and it would depend on your particular task. The initial guess could be found through an educated guess or some more sophisticated calibration analysis. Please think what could be a stable configuration in your case.

Kind regards,
Pavel

1 Like

many thanks pavel