Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Bas Van Hooren » Thu Mar 07, 2024 2:16 am

Hi all,

I am experimenting with attaching IMU's to the body and then using the IMUDataReporter within the analyze tool to obtain the linear accelerations of the IMU.

To this purpose, I first attached IMU's to my model using the IMU placer with the example set-up file provided with the Rajagopal OpenSense model. This seems to work as all IMU's appear on the body.

Within the analyze tool I then load my motion (running), specify external loads and reserve actuators and I add the IMUDataReporter to obtain the linear accelerations of the IMU. Within the DataReported I can 'check' whether I want the accelerations to be computed while using or ignoring external forces. By default the external forces are used. When I run the tool in this way, I get implausible linear accelerations. For example, the vertical, AP, and ML accelerations from the tibial IMU are ~1000, -2800 and 1400 during still standing.

I thought the implausible accelerations might be related because the external forces are being used to compute the accelerations. However, when I specify to ignore the external forces, the analyze tool crashes each time. I get the following error message:
error OS.jpg
error OS.jpg (79.33 KiB) Viewed 957 times
. I have also tried removing the external loads and reserve actuators and then ignored the forces, but this produces the same error and crash.

Any suggestions on how to obtain realistic linear accelerations using the IMUDataReporter would be greatly appreciated. Interestingly by the way: the angular velocities do seem plausible...

Tags:

User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Bas Van Hooren » Mon Mar 11, 2024 9:00 am

Any of the OpenSim developers any idea about the cause of the crash or implausible acceleration values?

I assume the implausible acceleration is because I am not ignoring the external load, but if this is the case it would be good to know how to prevent the tool from crashing if ignoring external loads.

User avatar
Ayman Habib
Posts: 2233
Joined: Fri Apr 01, 2005 12:24 pm

Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Ayman Habib » Mon Mar 11, 2024 1:35 pm

Hello,

Please relax the assembly tolerance (first reported exception) to something like

Code: Select all

<assembly_accuracy>1e-7</assembly_accuracy>
and then retry.

Hope this helps,
-Ayman

User avatar
Nicholas Bianco
Posts: 927
Joined: Thu Oct 04, 2012 8:09 pm

Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Nicholas Bianco » Thu Mar 21, 2024 3:29 pm

Hi Bas,

To add, if you specify that you want to compute accelerations without external forces, we add a PositionMotion to the model which applies the set of forces to the model required to produce the motion. This is necessary because OpenSim needs forces in order to compute the correct accelerations.

PositionMotion splines the input data in order to prescribe the kinematics to the model. The splined kinematics might be slightly different from your input kinematics, which then might slightly violate the model's kinematic constraint errors -- hence the assembly errors you are seeing.

-Nick

User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Bas Van Hooren » Thu Mar 28, 2024 8:34 am

Thank you both for your replies!

I have tried changing the tolerance limit in the .xml file (<integrator_error_tolerance>1.0000000000000001e-5</integrator_error_tolerance>) but this did not solve the issue unfortunately.

I also tried the adjustment regarding the assembly accuracy in Matlab (<assembly_accuracy>1e-7</assembly_accuracy>), but it also did not work. In fact, when I run the ImuDataReporter in Matlab, I get the following error:
OS error.jpg
OS error.jpg (31.3 KiB) Viewed 755 times


Any other suggestions that I might try?

User avatar
Nicholas Bianco
Posts: 927
Joined: Thu Oct 04, 2012 8:09 pm

Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Nicholas Bianco » Thu Mar 28, 2024 3:05 pm

Hi Bas,

Could you try removing the ExternalLoads from the model and set property 'compute_accelerations_without_forces' to true? That should give you reasonable IMU signals provided there's no issues with the model or data. If that works, then we could try to reintroduce the external loads.

-Nick

User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Bas Van Hooren » Thu Apr 04, 2024 9:25 am

Thanks for your suggestion Nicholas.

When I don't specify any external loads and set compute_acceleration_without_forces to true Opensim crashes.

If instead I remove the external loads and set compute_acceleration_without_forces to false, the tool runs, but again produces an output that seems implausible given the high accelerations during still standing.

I have also tried the following:
Add external loads, but add not reserve actuators --> this results in OpenSim 'Executing analyses...' without any results

Add NO external loads, but add reserve actuators --> the output from this seems implausible given the high accelerations during still standing (output is similar to the second option above).

Can I conclude based on your model that the issue would therefore need to be in the GRF data or model? I use the Catelli-Rajagopal-Ulrich model, with IMUs added using the example file provided with OpenSim version 4.5. Therefore it seems unlikely that the model is the issue.

It also seems unlikely that the GRF are incorrect as we have used these successfully in a previous version of OpenSim 3.3 and when I compared them to the example files provided with the new version I believe no modifications to this file was required.

Any further suggestions would be very much appreciated.

User avatar
Nicholas Bianco
Posts: 927
Joined: Thu Oct 04, 2012 8:09 pm

Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Nicholas Bianco » Sun Apr 07, 2024 9:46 am

If instead I remove the external loads and set compute_acceleration_without_forces to false, the tool runs, but again produces an output that seems implausible given the high accelerations during still standing.
This result makes sense to me: if there are no forces in the model to match the motion, then the accelerations will be incorrect. Remember that OpenSim calculates accelerations based on both the current kinematic state and the applied forces.
Can I conclude based on your model that the issue would therefore need to be in the GRF data or model?
I'm not quite sure what the issue is yet. Could you try one thing: run inverse dynamics with the current model, kinematics, and external loads and see what it produces?

User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Bas Van Hooren » Wed Apr 10, 2024 12:33 am

I really appreciate your continuous suggestions Nicholas.

I have ran the inverse dynamics and it produces results consistent with what I obtained in OpenSim version 3.3 for the same participant, and also in line with the literature (although my ankle joint moment is a little higher [~3 Nm/kg for the specific participant I'm using for testing vs 2.5 Nm/kg in some other studies at the same speed]).

I would assume this means that the ID/GRF/IK input/output are valid?

User avatar
Bas Van Hooren
Posts: 30
Joined: Fri Jan 29, 2016 10:59 am

Re: Implausible linear acceleration from IMUDataReport & OpenSim crash when using IMUDataReporter with ignore ext. load

Post by Bas Van Hooren » Thu Apr 11, 2024 1:26 am

I have also just ran the same analysis using the Rajagopal model and experimental data provided with the OpenSim installation. There I also get values for the tibial acceleration that are very different from the literature and the pattern of the acceleration is also different.

For example, the figure below (Milner et al. 2020) shows tibial acceleration during treadmill running as measured using a real accelerometer. The peak positive vertical acceleration would be expected to be around 6-10 g around initial contact, with values close to zero during the remaining stance phase. Similar values are reported in other papers.
tib acc.jpeg
tib acc.jpeg (100.48 KiB) Viewed 644 times
The figure below shows the acceleration obtained from the tibial IMU with the DataReporterTool using the Rajagopal model and experimental running data provided with the OpenSim installation. I assume the values are in m/s2, but even if I would express this in g, they would be very different, and the pattern is also very different.
IMU.png
IMU.png (27.75 KiB) Viewed 644 times
Could it be that the IMUDataReporter output is not reporting in the IMU reference frame as a real accelerometer would?

POST REPLY