How Do I Set Simscape Multibody Spring Damper Initial Properties?
35 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Sebastian Castro
2016 年 5 月 31 日
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 件のコメント
Sebastian Castro
2016 年 5 月 31 日
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
その他の回答 (1 件)
Omar Crypps
2016 年 10 月 2 日
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 件のコメント
Omar Crypps
2016 年 10 月 2 日
</matlabcentral/answers/uploaded_files/60361/pastedImage_0.png> here is the screen shot of my error
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!