Page 1 of 1

Prescribing a coordinate

Posted: Mon Oct 19, 2020 11:10 am
by shelbywalford
Hi All,

I am trying to prescribe motion of a coordinate for a certain time frame (0-0.49 s), and then run forward dynamics for a different time frame (0-1.35 s). I would like my prescribed coordinate to be free from the 0.49 to 1.35 s range. Is this possible? Right now, forward dynamics just fails because I'm sure this prescribed coordinate is constrained so it's trying to interpolate from 0.49-1.35 s.

For reference I have defined the prescribed motion as a SIMM spline in the .osim file.

Thank you!

Re: Prescribing a coordinate

Posted: Tue Oct 20, 2020 10:28 am
by ongcf
One quick question: Are you only analyzing results after the prescribed motion time (i.e., after 0.49 s)? If so, one thing you can do is calculate the position and velocities of your motion at 0.49 s based on your SIMM spline, and then apply these as the default coordinate and coordinate speeds of your model. Then, your simulation will effectively run "starting" at 0.49 s, and you can remove the prescribed coordinate.

Re: Prescribing a coordinate

Posted: Tue Oct 20, 2020 1:45 pm
by shelbywalford
Yes, that's true! I am wanting to analyze both time periods. I am essentially doing this by using one manager, initialized using the initial state and integrating to 0.49 s. Then, setting prescribed to "false" for my prescribed coordinate that I want to be free at this end state, and using a second manager to integrate from this state to the final time. The downside is having two reporters to have to mess with, but I can definitely make this work if that's the only option.

Re: Prescribing a coordinate

Posted: Tue Oct 20, 2020 2:00 pm
by ongcf
Ah whoops, I missed that you were using MATLAB with the manager. Since the prescribed coordinate is a pretty large change in a simulation, I think that using two managers and integrating them separately is the way to go.