problems with inverse dynamic study

Hello,

I have a problem with my inverse dynamic study in the mocapmodel of a handcyclist. A lot of muscles are overload for much of the time just from the movement.
My approach is:
Run Motionandparameteroptimizationstudy with following settings in the environmet.any:
-)the contact driver between hand and handle that is called “Handfixierung” has constraint c.type hard
-)same for the driver of that joint
-)Interpoldriver “Kurbelrotation” is a comment in this study
-)crank force is also a comment in this study

Motionandparameteroptimizationstudy finsishes
I take the z-rotation of the measure “Kurbelrotation” save it as txt in the model folder, remove header and “;” to take it as data for the interpoldriver “Kurbelrotation”

Then I run the inverse dynamic analysis with following settings:
-) C.type of “handfixierung” and “handfixierungsdriver” is set to soft
-)Interpoldriver “Kurbelrotation” is active with the txt file I saved after the first study
-)crank force (calculated from literature) is applied

And then everything seems to go wrong. I tried to run without the crank moment and also this results look wrong. So I think it has something to do with the movement.
Please have a look at the model, I don’t know what to try next.

Best regards,
Max

Hi Max,

I have looked quickly at the model environment and may have spotted something.

The hands are connected to grifflinks using a spherical joint

grifflinks is connected to kurbel with a revolute joint

the spherical joint is located in almost same location as the revolute joint x axis is same for both joints.

On the driver for the spherical joint there are no reactions.

I think there is no reaction which is able to hold the grifflinks rotation it becomes undetermined this dof

I suggest to add reactions on the spherical joint driver between hand and grifflinks/right

Best regards
Søren

Hello Søren,

thank you, but that is something I tried. It was just a mistake that there was no reaction at the model i uploaded. The strange thing is that biceps is overload while streching the ellbow… that can’t be right.
And I have absolutely no clue where that comes from.

Best regards,
Max

Hello again,

I am really sorry, the model I uploaded has a mistake in it.
I changed the drivers from the interface to see if a different choice of drivers is better, but it did’nt work out. So I changed them back but only for the Motionandparameteroptimzation study and not for inverse dynamics. So the model could not work anyway…
So I tried it with the reaction of the sphericaljoint driver and it looks better.

But muscle activities still exceed the limit…
Do you think that it is legitimate to turn up the
“AnyVar SpecificMuscleTensionShoulderArm= 90; //N/cm^2”
of the humanmodel.any? I thought about this because the subject was an elite handcyclist and therefore maybe has different strength parameters.

Best regards,
Max

Hi Max,

Turning the strength up can be ok if the subject is very strong.

In principle the strength of a model can be adjust to correspond to the subject in different ways it is a matter of which data you have available.

Best regards
Søren

Hello again,

I have an idea what goes wrong with my model but I can’t really fix it. Many muscles are overload at strange times where they definitly should not be overload.
Now I had the idea that maybe the Interpoldriver of the crank joint does something wrong and I investigated accelerations about 20m/s^2 in the crank joint. Maybe this is the reason for the muscle overload.
But I don’t really know how to fix it. I tried increasing Bspline Order but it just slows down the study and there still occur these accelerations.

Can you have a look at it?
The data for the interpoldriver comes from the measure in the environment.any.

I am not sure if this is the problem, but it looks like because muscles are overload without a crank moment just from the movement and for example biceps is overload while stretching the ellbow.

Many thanks for your work!

Best regards,
Max

Hi Max,

Please have look at the object named “AnyFunButterworthFilter” in the reference manual

If you scroll to the bottom of the page for this obejct you will find a small example of its use.

This is an example from this model:

/// A lowpass butterworth filter
      AnyFunButterworthFilter LowPassFilter = 
      {
        FilterForwardBackwardOnOff = On;
        AutomaticInitialConditionOnOff = On;
        N = ..FilterOrders;
        W = {1/(..SampleFreq*0.5)*.CutOffFrequency};
        Type = LowPass;
      };
      
      // filter the data
      AnyVector Filtered = LowPassFilter(.TestData);
      
      /// Interpolation function of the lowpass filtered data
      AnyFunInterpol InterPolLowPass = 
      {
        Type = PiecewiseLinear;
        T = ..TestTime;
        Data = {.Filtered};
      };

Filtering definitely can be very important for the getting the right force.

Best regards
Søren

Hello,

just for my understanding…
You mean I should export rotation angle data of the joint like I did before, but then don’t use it right away from the txt file.
Instead I should load it via an Inputfile, do the filtering of this data and then use it for the interpoldriver?

Thank you,
Max

Hi Max,

When i wrote my answer i wrongly assumed you had mentioned the applied load i was a bit too fast, now i understand that you where taking about the accelerations.

I think that this acceleration sounds a bit high for such a motion, you mention that the accelerations are 20n/s^2 for the crank joint, i guess you are referring to a crank angular acceleration which is 20rads/sec?, if this occurs while the subject is pedaling steadily it sounds a bit high, it could possible be ok if it happens during a fast start up…

Since the model works on motion capture data and the crank motion is a result of the motion so it needs to be fixed/reduced int he motion and parameter study.

Again it is the filtering that needs to be reworked, please have a look at this page.

http://www.anybodytech.com/fileadmin/AnyBody/Docs/Tutorials/Making_things_move/lesson3.html

Please have a look at the accelerations at the hand segments to measure the effect of changing the filtering.

Best regards
Søren

Hi Søren,

when I look at Main.Studies.MotionOptimization.Output.BodyModel.Right.ShoulderArm.Seg.Hand.rDDot
value for acceleration is always zero.
Does that mean filtering works fine?

Best regards, Max

Hi Max,

I think you are looking at the accelerations in the motion and parameter study where you might have the posonly setting enabled sin the study, so acc and vel are zero.

When the positions are transferred to the inverse study though the interpolations functions they become non zero.

Please do the same in the inversedynamics study, where it should be non zero.

Best regards
Søren

Hi Søren,

thank you, you were right. I watched accelerations at the inverse dynamics and they occur at the hand in a way they shouldn’t.
So I reduced CutOffFrquency to 5 Hz but there are still some accelerations left.
What cutofffrequency do you think I can choose? Movement is as I said handcycling.
And do you think changing the Order of the filter will also help becasue of steeper cut off?

Best regards,
Max

Edit: In the meantime I tried it with CutOffFrequency 2Hz and Order 6 and accelerations still occur.

Hello again Søren,

I am trying now for the whole day to get that filtering right but I can’t. I can’t even find out the effect of different filters I use. There is still some kind of noise or something.
Please, can you try to make it run? I am running out of ideas…
I attached the model yesterday when I didn’t have changed anything on filtering.

Best regards,
Max

Dear Max Felsner,

I attached an intermediate version of your model.
I tried to have a look at your model because Søren is out of office for a while.
I’m sorry to say but I could not finish your model.

There are something which I found…

  1. In the Environment.any file, you tried to define some joints between human hands and the handles in your device.
    I would suggest you to maintain those joints only in the MotionAndParameterOptimizationModel mode.

  2. All the human joint angle trajectories will be recorded by the ‘JointAngleOutputs.any’ file.
    But also you should check whether the kinematics of your device is properly given for the InverseDynamicModel mode.

  3. I’m not sure whether GriffRechts and GriffLinks will rotate with respect to the Kurbel or not. If they can rotate, then how would you provide the kinematics of those two parts?

  4. Also you should check the direction of the Gravity in the ‘TrialSpecificData.any’ file.

In the InverseDynamicModel mode, I would strongly recommend you that the number of DOFs and the number of constraints of your model should be as same as each other.

It will be fine if you can upload your latest progress here again.
But in July we have less number of work resources so it may take some time to figure out your model in detail.

Best regards,
Moonki

Hello Moonki,

thank you for the reply and all your efforts! You handle this forum really well.
Unfortunately your changes do not really fit my problem but are some good inputs.

  1. I made these joints to transfer the crank moment from the Environment to the Body Model in the Inverse Dynamics.

  2. The handles “GriffRechts” and “GriffLinks” should be fixed at the hands like when the model holds these handles. So the kinematics should be that they are fixed to the hand what I tried with the:
    AnyKinEqSimpleDriver HandFixierungsDriverRechts =
    // {
    // AnySphericalJoint &Jnt = Main.EnvironmentModel.ExtraJoints.HandfixierungRechts;
    // DriverPos = {0*pi/180,0,0};
    // DriverVel = {0,0,0};
    // Reaction.Type = {On,On,On};
    // CType = {Hard,Hard,Hard}; //MotionAndParameterOptimizationModel
    // //CType = {Soft,Soft,Soft}; //InverseDynamic
    // };

  3. Maybe I am wrong but I think for a handbiker in position, like the one on the photo I attached, direction of Gravitiy should be negativ z-direction.

5)With my environment setup, the Number of DOFs and number of constraints matched.

Maybe I can explain my whole procedure:
-)I run the MotionAndParameterOptimizationStudy with Hard Constraints in Environment-Model Connection but without driving the crank and without a crank moment.
-)From this study I save the measure of the crank movement
-)In the inverse dynamics I use this data for a interpoldriver of the crankjoint
-)and I attach the crank moment given by an equation to the crank joint.
-)Then I run this study.

I was more or less satisfied with my MotionAndParameterOptimizationStudy and my Inverse Dynamics worked fine kinematically but there occured accelerations about -30m/s^2. Much too high for this movement and therefore, the model was overload during the inverse dynamics.
I think it is a problem of the filtering but in the meantime I am not sure if the C3D file data is perfect…

I will upload my model for the inverse dynamics when I changed some things. Maybe you have an idea for getting rid of these strange accelerations.

Best regards and many thanks,
Max

Dear Max,

  1. First of all, your original C3D file contains a lot of number of frames.
    That is the reason why I tried to adjust some offset values in the ‘TrialSpecificData.any’ file because it seems that you don’t need to perform all the frames. The motion seems to be repetitive.

  2. I see. If “GriffRechts” and “GriffLinks” should be fixed at hand, then I would define only one constraint between a hand and a handle. The reason is that those handles are connected to the main wheel by a single revolute joint.

  3. To avoid all negative effects on the accelerations, it is good to avoid the use of soft constraints in the inverse dynamics analysis.

  4. When I see the picture of this actual bike, then you need to implement some support on the human thorax from its back direction.

I will wait for your next upload for your models.

Best regards,
Moonki

Dear Moonki,

ad 1) Thank you, this is a good tip!

ad 2) What do you exactly mean by 1 constraint? A Revolute Joint instead of the spherical joint?

ad 4) Can I define just two RefNodes (on the BodyModel) near the scapula and on the same position two nodes of the BikeFrame and fix them together with a joint/driver to realize the backrest or is it more complicated? Or is it ok to set the Reaction.Type of the PelvisThorax Drivers to ON?

Best regards,
Max

Hello again Moonki,

I attached my new model… maybe you can have a look at the Inverse dynamics.

There are two things:

  1. There is an unreasonable peak of muscle activities at the end of every cycle when the arms are streched. For example the biceps is partly overload and this doesn’t makes sense in my eyes. Maybe you have an idea where that comes from.

  2. I would like to make an Outputfile for the coordinates of the c3d-markers. I could manage to make an outputfile for muscle activities forces and for the coordinates of the Markers of the bodymodel but the output of the c3d outputfile is wrong. It is located in the InverseDynamic.any

Many thanks for your help!

Best regards,
Max

Dear Max,

I had to spend a lot of my time to fix your model.
And because I could not expect how much time I had to spend on this model, so this is the reason why we can’t look all the models on the forum in detail.

And attached please find a modified version of your model.

  1. I could not pass the MotionAndParameterOptimization process with your device.
    So I try to pass this step using only markers without your device.
    Then in the inverse dynamics process, all the devices and constraints will be active.

  2. I didn’t want to process the entire number of steps in your C3D file.

  3. For the MotionAndParameterOptimization process, I had to add some extra drivers in order to stabilize your model.
    For instance, in your C3D file, there is no lower arm marker which will be helpful to determine the rotation of the lower arm parts(radius and ulna).
    So I had to add an extra driver for elbow flexion in order to avoid the flipped angle of it.
    Also there are only two markers in the pelvis which is not very good.
    So I had to add one more extra driver in order to stabilize the rotation of the pelvis.

  4. For inverse dynamics model, I added some reactions between the hand and the handle part of your device.

There may be some other stuffs which I don’t explain here.
But I believe that you can find all of those later.

In our example, there is a model which is called ‘SeatedHuman’.
From that model, you can figure out how to make some supportive forces on the back thorax of human.

I hope that this model may be helpful to you.

Best regards,
Moonki