Simscape Multibody: How can I lock a revolute/spherical joint?
23 ビュー (過去 30 日間)
古いコメントを表示
Irina-Stefana Bulgaru
2021 年 6 月 2 日
コメント済み: Irina-Stefana Bulgaru
2021 年 6 月 9 日
I am trying to model a system composed of 2 bodies connected by a revolute joint. The movement is generated by one of the bodies, while the second body follows along and can oscillate like a pendulum around the revolute joint. What I need in this system is a way to lock the revolute joint at any point in time so that the second body is not moving anymore relative to the first body, and it maintains its orientation with respect to the first body at the time of "locking".
I tried the answer described here, however I don't think this solution is appropriate for revolute joints because I obtained a different behaviour than the one expected. As we can see in the animated gif below, the joint is meant to lock at t=200, and it indeed does not allow any relative movement between the two bodies, however at the moment of locking, the second body "glitches" into a perpendicular orientation with respect to the first body, instead of maintaining its natural orientation.
On the other hand, the unlocking behaviour (happening at t=800s) is smooth and expected, as we can see that the orientation between the two bodies is gradually changing.
One other option that i considered is actuating the joint so that it keeps a specific angle, but I am not sure how to determine that angle at any moment in time, and I am worried that this actuation may interfere with the natural dynamics happening when the joint should not be locked.
I may have to replace the revolute joint with a spherical one in the future for more freedom in rotation, ideally the solution for locking the joint should work for both types.
Thank you,
Irina
0 件のコメント
採用された回答
Steve Miller
2021 年 6 月 3 日
編集済み: Steve Miller
2021 年 6 月 8 日
Hi Irina,
It seems the effect you want could be created by rapidly increasing friction at the moment of lock. There are many friction laws out there, each with their pros and cons. The simplest one would be to measure the relative speed of the bodies in the Revolute Joint, multiply this by (0 for unlocked / 1 for locked), and then multiply that result by a very high damping coefficient. This will not be a "perfect" lock, for some relative velocity will be necessary to apply the friction, but it is very simple.
Enabling/disabling a joint will return the two frames to their original relative orientation, which does not seem to be a good fit for your use case.
--Steve
PS. Based on the comments below, I have added an example model based on sm_double_pendulum.slx.
3 件のコメント
Steve Miller
2021 年 6 月 5 日
You cannot influence the damping coefficient of friction, but you can actuate the joint with a torque. Making the torque act opposite to the velocity of the joint will make it stop spinning (or at least make it spin really slowly).
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Simulation and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!