Why does spring-damper element move solid?

3 views (last 30 days)
I'm trying to simulate the simple 1-DOF spring-damper mass system. The red block (see picture below) should oscillate on the ground (y,z = const.) in the x direction.
When I put all the element blocks - without the spring and damper Force - together it looks fine.
But when I insert the spring and damper Force, it seems to move the red block with its center of mass into the world frame.
Is there a way (without using the prismatic joint) to avoid this?
Here are the simscape blocks without the spring and damper force:
and at last with the spring and damper force inserted:
I'm grateful for any help.

Answers (1)

Steve Miller
Steve Miller on 24 Nov 2022
When you insert the Spring and Damper force block, the brick is free to move in space, as there is nothing constraining it. With no constraints, it can start the simulation anywhere it wants, and so it starts at [0 0 0].
I am not sure why you do not want use a Prismatic Joint. If you want to specify where it should start the simulation, you will need to attach a joint to it. You could attach a 6-DOF Joint and specify its initial position and orientation to be anywhere in space.
--Steve
  1 Comment
Stefan Klimmek
Stefan Klimmek on 26 Nov 2022
I thought that a pure Spring and Damper block would be more general than the Prismatic joint. That's why I gave it a go. Thank you very much for your answer :)

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!