OpenSim-MATLAB/Simulink Interface

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Giuseppe Scaccuto
Posts: 20
Joined: Mon Sep 24, 2018 9:32 am

OpenSim-MATLAB/Simulink Interface

Post by Giuseppe Scaccuto » Wed Feb 20, 2019 10:17 am

Dear all!

I set up a Forward Dynamics Simulation in Simulink with these settings:
- solver = RungeKuttaMerson Integrator (ode4)
- fixed step value = 0.01

I forced OpenSim to use same step size and make it constant with an integrator accuracy of 0.1.

Now my simulation results have a fixed number of steps both in Simulink and OpenSim.

When I perform some test on that model, I notice something strange in the plot of fiberlength values on the Pectoral muscle in Simulink while I don't see it in OpenSim. Here's the screenshot.

Immagin.png
Immagin.png (41.55 KiB) Viewed 404 times


There's a problem with the accuracy value or anything else?

Here's my .osim model:
Arm6.osim
(116.21 KiB) Downloaded 74 times

Thanks for your help.

Tags:

User avatar
Dimitar Stanev
Posts: 1096
Joined: Fri Jan 31, 2014 5:14 am

Re: OpenSim-MATLAB/Simulink Interface

Post by Dimitar Stanev » Sun Feb 24, 2019 10:53 am

There is method for setting the integrator step size:

https://simbody.github.io/simbody-3.6-d ... 15ae34a65e

You should not set the accuracy to such a low value. This may be causing the problem. It is also possible that the system is not realized to position stage when you access the muscle length.

POST REPLY