Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
-
hu hu
- Posts: 13
- Joined: Fri Jun 23, 2023 1:50 am
Post
by hu hu » Tue Dec 17, 2024 12:40 am
After performing static optimization, I obtained two files: `HYOID_Scaled_StaticOptimization_activation.sto` and `HYOID_Scaled_StaticOptimization_force.sto`. I am now using the activations obtained from the static optimization to calculate muscle forces and comparing them to the forces from the static optimization results. The code snippet is as follows.
Code: Select all
for i in range(nCoords):
coord = coord_set.get(i)
coord_value = data.get(i * 2)
coord_speed = data.get(i * 2 + 1)
coord.setValue(state, coord_value)
coord.setSpeedValue(state, coord_speed)
model.realizeVelocity(state)
Code: Select all
for i in range(nMuscles):
muscle = MuscleSet.get(i)
muscle_force[j, i] = muscle.calcInextensibleTendonActiveFiberForce(state, 1.0)*\
activation_data.get(i)
Below are the results of the comparison. The calculated results do not match exactly. How should this be interpreted? Am I missing something?
-
Attachments
-
- example_plot.jpg (533.31 KiB) Viewed 313 times
Tags:
-
hu hu
- Posts: 13
- Joined: Fri Jun 23, 2023 1:50 am
Post
by hu hu » Mon Dec 23, 2024 7:01 pm
Thank you for your reply, but I found that after making this adjustment, there is no noticeable difference in the results. Here is the code snippet:
Code: Select all
for i in range(nCoords):
coord = coord_set.get(i)
coord_value = data.get(i * 2)
coord_speed = data.get(i * 2 + 1)
coord.setValue(state, coord_value, False)
coord.setSpeedValue(state, coord_speed)
model.assemble(state)
model.realizeVelocity(state)
-
Nicos Haralabidis
- Posts: 199
- Joined: Tue Aug 16, 2016 1:46 am
Post
by Nicos Haralabidis » Thu Dec 26, 2024 8:20 pm
Hello Huhu,
How are you calculating the coordinate speeds when you manually try to calculate muscle forces? Perhaps differences between your coordinate speeds and those calculated by the static optimization tool differ (impacting the force-velocity multiplier) which may explain the differences you observe.
Thanks,
Nicos