Simmechanics representation of a compressed spring
7 次查看(过去 30 天)
显示 更早的评论
How can i represent a pre-compressed spring between two bodies?
0 个评论
采纳的回答
Ryan G
2012-8-16
Depending on the version of simmechanics you use this will be different, I will assume Simmechanics 1 since verson 2 just came out.
Say you have 2 bodies (consider the ground a body in this case) you want them connected by a spring. Utilize Body Spring and Damper block.
Inside the block, if this is spring only, set K to the appropriate value, C to 0, Natural Length to the appropriate value and make sure the units are correct.
Now, for precompression, you want the two CS connecting to the spring to be defined as close together as you want the spring compressed. For Example:
Two bodies that are simple point masses. CS1 of Body1 is at [0,0,0]; CS1 of Body2 is at [2,0,0] relative to adjoining and spring natural length is 2. If you simulate this the spring is not compressed.
Now, change the CS1 of Body2 to [1,0,0]. Now the spring is compressed 1 unit.
Hope this helps.
0 个评论
更多回答(1 个)
Jonathon
2012-8-20
1 个评论
Ryan G
2012-8-20
Below is a rough idea of how you could implement this. The spring block included does not really allow for 2-stage springs, although there might be something better than what I have to do it. Essentially you can actuate the body and feedback the position. K*x = Force so you can use that as the actuation force.
In this example after the length of teh spring passes 5 meters it detaches. I created a latch so once it detaches it can't re-attach. This is very rough/quick assembly so you need to check for units and +/- accuracy here. You would also need to adjust the position x as it is in world coordinates.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/175863/image.png)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Assembly 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!