Prescribing a coordinate

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Shelby Walford
Posts: 7
Joined: Tue Sep 04, 2018 12:05 pm

Prescribing a coordinate

Post by Shelby Walford » Mon Oct 19, 2020 11:10 am

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!

Tags:

User avatar
Carmichael Ong
Posts: 401
Joined: Fri Feb 24, 2012 11:50 am

Re: Prescribing a coordinate

Post by Carmichael Ong » Tue Oct 20, 2020 10:28 am

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.

User avatar
Shelby Walford
Posts: 7
Joined: Tue Sep 04, 2018 12:05 pm

Re: Prescribing a coordinate

Post by Shelby Walford » Tue Oct 20, 2020 1:45 pm

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.

User avatar
Carmichael Ong
Posts: 401
Joined: Fri Feb 24, 2012 11:50 am

Re: Prescribing a coordinate

Post by Carmichael Ong » Tue Oct 20, 2020 2:00 pm

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.

POST REPLY