Mocap Model Parameter study

Hi this is Bokku from Yonsei Univ. South Korea.

I am beginner of ANYBODY.
I would like to perform a parameter study using a mocap model with exotendon. However, a kinematical error occurs when doing the inversedynamics. Can you tell me what went wrong?
I attach the file I created as an attachment.

Hi

I have been looking at the files you have uploaded.

From what i can see you have defined two new segments, and have created two AnyKinLinear measures.

So you have added 2x6 Dof to the model in terms of adding 2 new segments with 6 DOF each, but you have not added any kinematic constraints. When you add DOF to the model you need to add the same amount of constraints.

You have defined two AnyKinLinearMeasure’s these will each measure 3 linear positions, but they will not actually drive the position. This means you need still to add 2x6 kinematic constraints to the model.

The missing constraints can be added in numerus way it really depends on what the model is supposed to do.

Example:
[ol]
[li] a revolute joint between the segments, this will take 5 DOF away
[/li][li] a standard joint between one of the segments and the Thigh? this would take 6 dof away
[/li][li] add one linear constraint between the second segment and the shank.
[/li] [/ol]

This will add up to 12 DOF.

Please consider going though the first few tutorials available this will make these things much easier to understand.

I have not been able to debug the model but just looked at the files, please upload a complete model next time.

Best regards
Søren

Thank you for your kind reply

As you said, I changed joint to std joint and after my model is running well.

But another problem came after that.

After analysis, the results(MaxAct, Metab) didn’t show any differences according to the parameter.

I chose two parameters, one was force of exotendon, and another one was strain value.

I guess the place of parameter study code of my model was wrong.

Could you tell me what went wrong?

Best regards
Bokku

Hi Bokku,

I am not sure what goes wrong here.

I can think of these things:
[ol]
[li] Some of your code may not be inside the study or not referred to by the study
[/li][li] There is no motion in the tendon?
[/li][li] The MaxAct will display the max activity of any muscle in the model, there can be muscles which are not affected by this tendon and which are defining the max envelope… so no matter the force in the tendon they would remain the same … e.g. an arm muscle
[/li][/ol]

Best regards
Søren

Thank you for your reply!!

I uploaded the modified inversedynamic.any file and the main.any file.

I guess these files are the cause.

I honestly did not understand the code of inversedynamics.any file and main.any file correctly.

Please review what went wrong.

Best regards

Bokku

Hi Bokku,

You write in the code :


//  Main.Studies.InverseDynamicStudy = {
//
  #include "Model/ExoTendon.any"
  #include "Model/ExoParameter.any"
//  
//};

This means that the tendon is not part of the study you are running.

You have created the tendon outside the study you are running and you have made a reference from the study to the tendon either. So effectively the tendon is not part of the analysis.

Please change the lines to be :


  Main.Studies.InverseDynamicStudy = {

  #include "Model/ExoTendon.any"
  #include "Model/ExoParameter.any"
  
};

Best regards
Søren

Hi again~

As you said, I performed the parameter study and I did it. Thank you for your kind reply.

But I have another question about coordinate problem i guess.

When I run my modified Mocap model, it seems well. But once I tried to run inversedynamic analysis or even initialcondition, my atteched tendon goes woring position. I attached pictures and files so help you understand my situation.

What should I fix my code?

Hi Bokku,

I am not sure i understand the problem, please explain the issue you think you have in more detail.

I am guessing but maybe your are puzzeled about the two positions of the tendon? If the tendon is made as a shorthestpath this is normal… When the model starts running it will pull the muscle/tendon to one side as defined in a vector this could be what you see in pic1, then it releases the vector and it snaps onto the surface this is what you see in pic2. So this may not be a problem.

If you think i have misunderstood your email, then please write again.

Best regards
Søren

Actually, I didn’t use shortestpath function.

It seems the coordinate is changing between the loading of my Mocap model(picture1) and the running inversedynamic analysis(picture2).(as I attached the pictures in the previous post)

My guess is that the coordinate of my c3d data is different from the Mocap model. So I changed the z direction of Mocap model as vertical direction which is originally y direction.

So I just thought my analysis went wrong due to the coordinate change. But it is just my guess…

Hi Bokku,

It is normal to see differences between a loading position pic1 and the position found after analysis pic2?

These will only be exactly the same if all segments in the model has been created in a way so that .r0 and .Axes0 are well defined e.g. same position as after solving initpos.

If you think you still have problems, please write agian and describe in more detail what you think is the issue.

Best regards
Søren

In fact, I struggled for a week with this problem. I still don’t know despite your comments. Please let me know my problem.

thank you.

Hi Bokku,

I am sorry but please describe what you think is the problem i have not understood this.

It is normal to see a difference between a loading position and a running position, this is not a wrong and not a problem. The loading position only needs to be good enough so that the model is assembling correctly in the first time step, the loading position will not alter results, only if the model do not assemble correctly.

Please describe what is the problem?

Best regards
Søren

Originally, I tried to do the parameter study about exotendon according to the position. The exotendon is consists of two and connected from shoulder to the pelvis, right,left so total 4 tendon(AnyViaPointLigament) used to do the analysis. My plan was the position parameter study of the middle point of each exotendon. In other words, I wanted to find x,y position of middle point of exotendon according to the object function(which is the lowest value of sum of metabolic energy of some muscles etc.). So I set up the parameter like picture 1 as I attached, but once I ran the inversedynamicanalysis or parameterstudy, the middle point of exotendon placed wrong position(picture 2). I guess the coordinate is misplaced or used wrong.

Because I am beginner of this problem, so (I am pretty sure that) I misused something or misunderstood something about this program.

If you still don’t understand about my problem, I will explain more specifically.

Thank you :slight_smile:

Hi Bokku,

Thanks now i understand better

I have looked at the files you have uploaded.

Here are my findings:
[ol]
[li] In Exotendon.any you have tendons lig1 and lig2 which spans nodes on the same segment… so the length between these nodes will never change and the ligament will nto be stretched at any point.
[/li][li] You have only include the Exotendon and exoParamters into the InverseDynamicStuy, this means that if you runnig any other study such as the parameter study you will not see the exo model to be updated… it will stay in load position… i think this exoplains the difference between the images…
[/li][/ol]

Please note that the parameter study in the mocap model is not suited for for what you are trying to do here… it is designed to run a parameter optimization on the kinematics in the model.

As i understand your problem you woudl like to do a paramter study on the position of the connection point between the tensdons.

To do that please follwo these steps:

[ol]
[li] Follow the tutorial on parameter and optimization this will make things more clear
[/li][li] Define a new parameter study in the model next to the inverse study.
[/li][li] Make your positions of the connector segment a design variable
[/li][li] Create an AnyOutput function for your objective function the metabolic energy.
[/li][li] Run the parameter study and find the design var value with lowest energy
[/li][/ol]

Alternatively to this it could be done usign an FDK approach, so having a free segment sliding on back of the spine and four springs which would determine the position of the segment. Fundamentally both ways (if set up in a similar way) would give same results.

Sorry for any typos.

Best regards
Søren