step_interval info in PointKinematics, BodyKinematics etc

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
George Mastorakis
Posts: 31
Joined: Tue Mar 15, 2016 1:27 pm

step_interval info in PointKinematics, BodyKinematics etc

Post by George Mastorakis » Thu Apr 27, 2017 1:40 pm

Hi

I'm trying to figure out what the step_interval (found in Analyses - PointKinematics, BodyKinematics etc.) is in terms of time. How is it defined?
E.g. When I run a 1 sec simulation with step_interval=1 I'll get 1859 steps/samples. How is this number declared please?

Thanks

George

User avatar
Thomas Uchida
Posts: 1777
Joined: Wed May 16, 2012 11:40 am

Re: step_interval info in PointKinematics, BodyKinematics etc

Post by Thomas Uchida » Thu Apr 27, 2017 6:53 pm

Here's the description for the step_interval property (in the GUI, select "XML Browser" from the "Help" menu and display the XML for the PointKinematics class, for example):

Code: Select all

<!--Specifies how often to store results during a simulation. More specifically, the interval (a positive integer) specifies how many successful integration steps should be taken before results are recorded again.-->
For example, setting step_interval to 10 will run the Analysis every tenth integration time step.

User avatar
George Mastorakis
Posts: 31
Joined: Tue Mar 15, 2016 1:27 pm

Re: step_interval info in PointKinematics, BodyKinematics etc

Post by George Mastorakis » Fri Apr 28, 2017 6:31 am

Hi Tom

Thanks for this. Is there a way to fixate the number of steps per second of the simulation please?

E.g. 1000steps/sec for A simulation, or 2000steps/sec for B simulation

George

User avatar
Thomas Uchida
Posts: 1777
Joined: Wed May 16, 2012 11:40 am

Re: step_interval info in PointKinematics, BodyKinematics etc

Post by Thomas Uchida » Fri Apr 28, 2017 2:07 pm

Is there a way to fixate the number of steps per second of the simulation please?
I'm assuming you're using the Forward Tool. If you check the "Use time steps from states file" box in the "Integrator Settings" pane, the rows in the output files will align with the "time" column in the "initial states" file. There is a description of this feature in the Confluence documentation (at the bottom of the "How to Use the Forward Dynamics Tool" page: http://simtk-confluence.stanford.edu:80 ... amics+Tool) and in the code (https://github.com/opensim-org/opensim- ... l.cpp#L179). When specifying the desired time points in the "initial states" file, don't forget to update the "nRows" line in the header.

User avatar
George Mastorakis
Posts: 31
Joined: Tue Mar 15, 2016 1:27 pm

Re: step_interval info in PointKinematics, BodyKinematics etc

Post by George Mastorakis » Mon May 01, 2017 9:56 am

Apologies but it doesn't seem to work. There is no visible correlation between the Integrator Settings values and the nRows found in the resulting .sto files. Is there anything missing please?

User avatar
Thomas Uchida
Posts: 1777
Joined: Wed May 16, 2012 11:40 am

Re: step_interval info in PointKinematics, BodyKinematics etc

Post by Thomas Uchida » Mon May 01, 2017 10:57 am

If that feature isn't doing the job, I suggest simply interpolating the results in a post-processing script.

User avatar
George Mastorakis
Posts: 31
Joined: Tue Mar 15, 2016 1:27 pm

Re: step_interval info in PointKinematics, BodyKinematics etc

Post by George Mastorakis » Tue May 02, 2017 5:02 am

This is also an option. Thanks for pointing it out.

User avatar
Thomas Uchida
Posts: 1777
Joined: Wed May 16, 2012 11:40 am

Re: step_interval info in PointKinematics, BodyKinematics etc

Post by Thomas Uchida » Tue May 02, 2017 3:28 pm

I tested in OpenSim 3.3 using the arm26 model and didn't encounter an issue. I've attached a .zip containing the model file, the initial states file I created (the "time" column lists the time points that will appear in the output), and the Forward Tool setup file.
Attachments
forum7683.zip
(7.8 KiB) Downloaded 27 times

POST REPLY