Hello,
I am using the Thoracoscapular Model (https://simtk.org/projects/thoracoscapular). I tried to run Static Optimisation using the given IK results and coordinate actuator but I keep having failed SO at all time steps because of acceleration constraint violation (see below). At ground_thorax_rot_x, the coordinate actuator is as large as 1000N and the IK is filtered at 6Hz.
What should I do to improve the simulation?
Thanks
Failed Static Optimisation - Acceleration Constraint Violation
- Hazimah Mahmud
- Posts: 14
- Joined: Mon Jan 20, 2020 9:16 am
- Carmichael Ong
- Posts: 383
- Joined: Fri Feb 24, 2012 11:50 am
Re: Failed Static Optimisation - Acceleration Constraint Violation
Since that's a rotational degree of freedom, it seems like your data requires 1000 Nm of torque, which is a lot. It sounds like you should go back to your scale and IK step results to make sure that they look correct first, since static optimization is trying to match those accelerations.
- Hazimah Mahmud
- Posts: 14
- Joined: Mon Jan 20, 2020 9:16 am
Re: Failed Static Optimisation - Acceleration Constraint Violation
Hi Carmichael,
Thanks for your reply.
I don't think there should be any issues with scaling and IK as I am using the given scaled model and given IK results from the website. I have added reserve actuators (RA) at all joints (with the maximum value of 3Nm at the thorax). When running CMC with this RA file, it was fine. When running static optimisation with this RA file, I have acceleration constraint violation (as mentioned in the original post). To check if RA was the issue, I have removed all the muscles from the model using Notepad++, then run SO using the same RA file. In a way, the model was running based on joint-driven torque only. Static optimisation was then running successfully. I don't see any reason why using the same reserve actuator works on CMC, but not on SO.
Is it worth changing the muscle properties to overcome the issue? Say, the current one is using Millard2012EquilibriumMuscle and perhaps changing it to Thelen2003Muscle might work?
I would appreciate you response.
Thanks,
Hazimah
Thanks for your reply.
I don't think there should be any issues with scaling and IK as I am using the given scaled model and given IK results from the website. I have added reserve actuators (RA) at all joints (with the maximum value of 3Nm at the thorax). When running CMC with this RA file, it was fine. When running static optimisation with this RA file, I have acceleration constraint violation (as mentioned in the original post). To check if RA was the issue, I have removed all the muscles from the model using Notepad++, then run SO using the same RA file. In a way, the model was running based on joint-driven torque only. Static optimisation was then running successfully. I don't see any reason why using the same reserve actuator works on CMC, but not on SO.
Is it worth changing the muscle properties to overcome the issue? Say, the current one is using Millard2012EquilibriumMuscle and perhaps changing it to Thelen2003Muscle might work?
I would appreciate you response.
Thanks,
Hazimah
- Alicia Blasi-Toccacceli
- Posts: 6
- Joined: Mon Nov 04, 2019 2:26 am
Re: Failed Static Optimisation - Acceleration Constraint Violation
Hello,
We are using the same model and we have the same issue with the static optimization (problem with acceleration constraint violation "ground_thorax_rot_x") . We used residual actuators too (on all degrees of freedom of the ground thorax joint, and with very very high values (50000 N) to be sure to have enough force and moment to solve dynamic equations) but without success. We also tried to lock this joint (some DoF or all), to increase or decrease the thorax mass or to diminish SO precision and it didn't work.
Despite this issue, OpenSim calculated muscle forces and activation (obviously false). To be sure, we summed force contribution of muscle heads (to check if it gives a relevant force for the entire muscle) and we deselected "use muscle force-length-velocity relation" checkbox before running SO. It gave nothing good.
We really do not understand why, because we use relatively "poor" kinematics (and filtered at 6 Hz) so we think there is no issues with IK. And calculated accelerations and moments seem relevant (not too high, smooth, no sudden acceleration). Our calculated "ground_thorax_rot_x" moment is about 50 Nm at most, so our residual actuator should be largely enough to compensate it...
Hence, like M. Mahmud said, is the muscle properties the problem? (But I don't really understand why would it be.)
Any clues would be really appreciated.
Thanks,
Alicia
We are using the same model and we have the same issue with the static optimization (problem with acceleration constraint violation "ground_thorax_rot_x") . We used residual actuators too (on all degrees of freedom of the ground thorax joint, and with very very high values (50000 N) to be sure to have enough force and moment to solve dynamic equations) but without success. We also tried to lock this joint (some DoF or all), to increase or decrease the thorax mass or to diminish SO precision and it didn't work.
Despite this issue, OpenSim calculated muscle forces and activation (obviously false). To be sure, we summed force contribution of muscle heads (to check if it gives a relevant force for the entire muscle) and we deselected "use muscle force-length-velocity relation" checkbox before running SO. It gave nothing good.
We really do not understand why, because we use relatively "poor" kinematics (and filtered at 6 Hz) so we think there is no issues with IK. And calculated accelerations and moments seem relevant (not too high, smooth, no sudden acceleration). Our calculated "ground_thorax_rot_x" moment is about 50 Nm at most, so our residual actuator should be largely enough to compensate it...
Hence, like M. Mahmud said, is the muscle properties the problem? (But I don't really understand why would it be.)
Any clues would be really appreciated.
Thanks,
Alicia
- Hazimah Mahmud
- Posts: 14
- Joined: Mon Jan 20, 2020 9:16 am
Re: Failed Static Optimisation - Acceleration Constraint Violation
Hi,
Any response is highly appreciated!![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Hazimah
Any response is highly appreciated!
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Hazimah
- Michael Asmussen
- Posts: 67
- Joined: Mon Jul 11, 2016 7:46 am
Re: Failed Static Optimisation - Acceleration Constraint Violation
Hi Hazimah,
Does SO fail on all the time steps or just the ones you are reporting (0.12 and 0.13)? Did you have any improvements since your first post?
Can you confirm that the reserve forces are acting on the model? Maybe there is an issue with implementation. Can you, for example, see the reserve forces acting at the elbow after static optimization?
All the best,
Mike
Does SO fail on all the time steps or just the ones you are reporting (0.12 and 0.13)? Did you have any improvements since your first post?
Can you confirm that the reserve forces are acting on the model? Maybe there is an issue with implementation. Can you, for example, see the reserve forces acting at the elbow after static optimization?
All the best,
Mike
- Hazimah Mahmud
- Posts: 14
- Joined: Mon Jan 20, 2020 9:16 am
Re: Failed Static Optimisation - Acceleration Constraint Violation
Hi Mike,
SO failed at all time steps. Unfortunately, I haven't managed to get any improvements.
As mentioned, when I removed all the muscles from the model and run static optimisation based on reserve actuators only, SO was working fine (no failures at any time steps). This implies that the reserve actuators were properly acting on each joint. No reserve actuators were added to the elbow and wrist because their joint angles are constant.
I hope I have answered all your questions.
Thanks,
Hazimah
SO failed at all time steps. Unfortunately, I haven't managed to get any improvements.
As mentioned, when I removed all the muscles from the model and run static optimisation based on reserve actuators only, SO was working fine (no failures at any time steps). This implies that the reserve actuators were properly acting on each joint. No reserve actuators were added to the elbow and wrist because their joint angles are constant.
I hope I have answered all your questions.
Thanks,
Hazimah