How Do I Set Simscape Multibody Spring Damper Initial Properties?
31 views (last 30 days)
Show older comments
Chuck Saunders
on 27 May 2016
Commented: Omar Crypps
on 2 Oct 2016
I've been having some issues in much larger code I've been working and seem to have narrowed it down to the spring damper block.
I have a spring damper block between two frame transforms. The spring damper block is set to an initial position of zero. I would assume, then, that this means that the spring is at 0 length, meaning that the initial position of the block relative to the world frame would be simply the two frame transforms added together.
This is not the case.
I am not sure why this is happening, or if there's some other way I should be setting this up. This is a simplified example of what I have going on elsewhere in larger code - the "world" frame there is the center of the body, and then there are transforms to the hard mounts on the body where other systems actually connect. I've found that adding a spring damper block helps the simulation tremendously, but this failure to initialize correctly is killing my program.
Any help would be greatly appreciated, even if it's just an explanation of why this isn't working the way I expected.
0 Comments
Accepted Answer
Sebastian Castro
on 31 May 2016
I think what you want to do is use a Prismatic Joint block instead of a Spring and Damper Force block.
This block lets you specify an initial position target, as well as spring and damping. If you want the system to start at the spring equilibrium position, set up the initial position target to 0 and see if that's what you wanted.
When I try this, I get the Transform Sensor starting at -2 and ending at about -2.1. I believe this matches what you said you expected.
In fact, I didn't even know you could use the Spring Damping and Force block like that! The typical way to use Simscape Multibody is by defining degrees of freedom using joint blocks. The Spring and Damping Force block is useful when you want a straight-line spring force between two coordinate frames that may not be directly tied to a single degree of freedom.
- Sebastian
2 Comments
Sebastian Castro
on 31 May 2016
Again, there are other use cases for that block -- in situations where the straight-line direction of the spring/damping force is not along the same axis as the permitted motion.
- Sebastian
More Answers (1)
Omar Crypps
on 2 Oct 2016
Hi, I designed a model of 1 degree of freedom on Solidworks and i followed all the steps to export it to the Simulink of Matlab. However, there is always an error that appears after exporting it on Simlink.
Unfortuntely, I can't add a screen shot here but the error tells me " Constraint is not supported , the constraint has been exported as unknown constraint .
1 Comment
Omar Crypps
on 2 Oct 2016
</matlabcentral/answers/uploaded_files/60361/pastedImage_0.png> here is the screen shot of my error
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!