Simscape Multibody: How can I lock a revolute/spherical joint?

조회 수: 21 (최근 30일)
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

채택된 답변

Steve Miller
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
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).
Irina-Stefana Bulgaru
Irina-Stefana Bulgaru 2021년 6월 9일
Thank you so much for the model, now I understand!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by