How to Set Initial Position for a Mass Block in Simscape?
Show older comments
I am working on a mechanical translational system in Simscape, and I need to set an initial position for the Mass block. However, the Mass block only allows setting an initial velocity and force, not position.
I tried using an Ideal Motion Sensor to specify the initial position, but it does not contribute to the problem's resolution, so it does not work for setting the initial condition.
In my version of MATLAB:
- The "Ideal Translational Motion Actuator" does not appear in the Simscape library.
- The "State Targets" option is not available in the Solver Configuration block.
What is the correct way to set an initial position for the Mass block in Simscape when these options are unavailable?
Would using a high-stiffness spring temporarily be a valid workaround, or is there another recommended approach?
2 Comments
Yifeng Tang
on 31 Mar 2025
I would be interested in learning more about your statement that you "need to set an initial position for the Mass block". Would you be able to provide more details and why you say that? Maybe we can find another way to approach the problem where the initial position of the mass isn't necessary. I suspect it's actually the position of some other component that you really needed.
José
on 1 Apr 2025
Accepted Answer
More Answers (0)
Categories
Find more on Foundation and Custom Domains in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!