error in inverse dynamics
- Diana Toderita
- Posts: 5
- Joined: Tue Oct 10, 2023 2:19 am
error in inverse dynamics
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
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
- Attachments
-
- ID_output_right.txt
- (2.86 KiB) Downloaded 248 times
-
- IK_results_right.mot
- (2.86 KiB) Downloaded 268 times
-
- GRF_right.mot
- (66.83 KiB) Downloaded 237 times
- Ton van den Bogert
- Posts: 166
- Joined: Thu Apr 27, 2006 11:37 am
Re: error in inverse dynamics
I plotted your data.
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
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')
- Diana Toderita
- Posts: 5
- Joined: Tue Oct 10, 2023 2:19 am
Re: error in inverse dynamics
Many thanks for your reply.
I have attached the raw marker data for the trial.
Any insights would be much appreciated!
I have attached the raw marker data for the trial.
Any insights would be much appreciated!
- Attachments
-
- motion_data_right.txt
- (120.79 KiB) Downloaded 264 times
- Ton van den Bogert
- Posts: 166
- Joined: Thu Apr 27, 2006 11:37 am
Re: error in inverse dynamics
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.
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
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
- Mohammadreza Rezaie
- Posts: 401
- Joined: Fri Nov 24, 2017 12:48 am
Re: error in inverse dynamics
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
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
- Diana Toderita
- Posts: 5
- Joined: Tue Oct 10, 2023 2:19 am
Re: error in inverse dynamics
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
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
- Attachments
-
- Walk_Peak_front.PNG (71.42 KiB) Viewed 2329 times
-
- Peak_lateral.PNG (98 KiB) Viewed 2329 times
-
- P14_walk2_test3.txt
- (207.15 KiB) Downloaded 269 times
-
- P14_walk2_GRF_test3.mot
- (164.33 KiB) Downloaded 240 times
-
- P14_SelfSelected_walk_2_grf.xml
- (2.74 KiB) Downloaded 272 times
- Mohammadreza Rezaie
- Posts: 401
- Joined: Fri Nov 24, 2017 12:48 am
Re: error in inverse dynamics
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.
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.
- Diana Toderita
- Posts: 5
- Joined: Tue Oct 10, 2023 2:19 am
Re: error in inverse dynamics
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.
- Mohammadreza Rezaie
- Posts: 401
- Joined: Fri Nov 24, 2017 12:48 am
Re: error in inverse dynamics
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.
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.
- Diana Toderita
- Posts: 5
- Joined: Tue Oct 10, 2023 2:19 am
Re: error in inverse dynamics
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
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