Page 1 of 1

error in inverse dynamics

Posted: Fri Jan 12, 2024 6:37 am
by dianatoderita
Hello!

I have an issue with the inverse dynamics process using a lower limb model for gait.

The ground reaction forces and inverse kinematics look alright. However, the inverse dynamics shows a very large peak in the ankle torque towards the end of stance, that should not occur. This artefact then appears in all other joints for this limb. The contralateral limb doesn't have this issue. I have attached the force plate data file, inverse kinematics and inverse dynamics outputs for the ankle joint. The force vector looks to be acting in the correct place on the calcaneus.

The problem persists with other trials for this participant, and with other participants as well.

Please can someone help to understand where the issue is?

Thank you!
Diana

Re: error in inverse dynamics

Posted: Fri Jan 12, 2024 9:00 am
by bogert
I plotted your data.
Untitled.png
Untitled.png (11.14 KiB) Viewed 1410 times
The joint moment is close to 400 Nm at the peak, which is far too large indeed. The GRF at that time is 1000 N (which is normal), so this means that the center of pressure is about 0.4 meters from the ankle joint. Unless your subject is wearing skis, that is not possible.

The ankle joint angle looks normal, although normally it will go a little above zero. This depends somewhat on how the local coordinate systems are defined.

The high joint moment suggests that the spatial registration between motion capture and force plate is incorrect. I can possibly say more if you post the raw marker data for this trial.

Ton van den Bogert

Code: Select all

q = importdata('IK_results_right.mot','\t',11);
F = importdata('GRF_right.mot');
M = importdata('ID_output_right.txt');

subplot(3,1,1)
plot(M.data(:,1),M.data(:,2));
title('ankle moment');

subplot(3,1,2);
plot(F.data(:,1),F.data(:,[3 4]));
title('GRF')

subplot(3,1,3);
plot(q.data(:,1),q.data(:,2));
title('ankle angle')

Re: error in inverse dynamics

Posted: Fri Jan 12, 2024 9:55 am
by dianatoderita
Many thanks for your reply.

I have attached the raw marker data for the trial.

Any insights would be much appreciated!

Re: error in inverse dynamics

Posted: Fri Jan 12, 2024 1:15 pm
by bogert
The spatial registration between raw motion capture data and force plate is correct, the center of pressure is exactly were it is expected and not 0.4 meters off. I plotted the horizontal position of COP and a few markers in the lower right leg and foot.
Untitled.png
Untitled.png (16.29 KiB) Viewed 1317 times
The next thing to check would be that the IK is done correctly. For ankle moment, what matters is the position of the ankle joint relative to the center of pressure (COP) of the GRF. Play back the result of the IK and show the GRF vectors in the same view. Does the skeleton track the markers? Is the vector located in the right foot? Is the ankle joint within 0-20 cm of the center of pressure?

It is also possible that the center of pressure information was not imported correctly. Search the forum for "center of pressure", it has been discussed a few times.

Ton van den Bogert

Re: error in inverse dynamics

Posted: Fri Jan 12, 2024 9:19 pm
by kernalnet
Hi,
Inspecting your markers data, I could see early heel rise in the right leg (a plantarflexion peak is evident between 3.2 and 3.4 s, the mid-stance phase), which could increase the ankle joint moment. Is he/she a pathological subject, a prosthesis/orthosis user? This could explain why the ankle angle didn't come to dorsiflexion at all. When syncing the markers and GRF, everything looks good; however, you may need to transform your experimental data to match OpenSim coordinate system (XYZ). It's also a good practice to associate IK and GRF motion data before running ID tool. If this looks good, check the force, point, and torque identifiers in the external loads XML file. Please see:
https://simtk-confluence.stanford.edu:8 ... ap%29+Data
https://simtk-confluence.stanford.edu:8 ... h+a+Motion
https://simtk-confluence.stanford.edu:8 ... ernalLoads

Hope this helps,
-Mohammadreza

Re: error in inverse dynamics

Posted: Mon Jan 15, 2024 8:18 am
by dianatoderita
Hello both,

Many thanks for your help.

I have now used the matlab code OpenSim provided to export the .trc and .mot files (attached) from the .crd and they should be aligned with the OpenSim coordinate system. Previously I was exporting them from Vicon.

I played back the IK. The skeleton tracks the markers and the ground reaction force is located in the right foot (pictures attached).

I have also checked the identifiers in the external loads XML file, and it all looks fine (hoping I am not making a silly mistake...). I have also attached the .xml GRF setup file.

Also, this artefact occurs for the right limb only, the moments for the left limb look normal and do not have this large peak. Could this be a modelling issue in the right joint?

Any further suggestions would be welcome!

Thank you,
Diana

Re: error in inverse dynamics

Posted: Mon Jan 15, 2024 8:33 am
by kernalnet
Hi, according to the provided files, I could see that the identifiers are not set correctly. The right leg requires the following identifiers:

ground_force_1_v
ground_force_1_p
ground_moment_1_m

Please double check this and let me know if it can fix the issue.

Re: error in inverse dynamics

Posted: Mon Jan 15, 2024 8:54 am
by dianatoderita
Hi, the left limb is the first one to step on the force plate 1, and the right limb uses force plate 2. This is why I associated the right limb with identifiers 2 and the left limb with identifiers 1.

Re: error in inverse dynamics

Posted: Mon Jan 15, 2024 9:07 am
by kernalnet
Oh, sorry. I didn't check the rest of the force file and thought you sent one FP data only, similar to the former files. If you share the scaled model and IK output of this subject, troubleshooting would be easier.

So, markers and GRF of the right leg are well-aligned and the XML force file is correct. The associated IK output and GRF (your image) seems fine as well. One other thing to check is the mass properties of the scaled model and the segments.

Re: error in inverse dynamics

Posted: Fri Jan 19, 2024 6:03 am
by dianatoderita
Hello both,

Thank you very much for your advice and help, much appreciated. I managed to fix the model, it turns out there was a modelling issue in the definition of the joints.

All the best,
Diana