MATLAB Answers

Is there a way to lock a prismatic joint during a SimScape simulation?

5 views (last 30 days)
Toby
Toby on 23 Feb 2017
Commented: Mark Wang on 22 Oct 2020
Is there a way to lock a prismatic joint during a SimScape simulation?
I'm modeling a linear brake between two bodies connected by a prismatic joint in SimScape second generation. Until now, I've implemented this by applying an actuator force to the prismatic joint equal to F_act = F_n*Cf*tanh(k*v_rel), where F_n is the normal force, Cf is a kinetic coefficient of friction, v_rel is the relative velocity, and k is a coefficient such that the tanh function approximates the combined Coulomb and viscous friction effects.
This approach works, but when the brake is applied, the simulation solves very slowly, because it becomes an extremely stiff system. I would like to replace this formulation with something that locks the bodies together when the relative velocity is below a certain threshold.
I've tried putting a motion-actuation prismatic joint in parallel with the first joint. The idea was to switch the motion input between zeros (i.e. locked together) and the motion output of the first prismatic joint. But this results in algebraic loops, and the simulation freezes after a few seconds.
I'd welcome any better ideas.
Thanks.
PS I think what I'm trying to do is similar to the behavior of the Loaded-Contact Translational Friction block in Simscape Driveline. But I'd like to implement a solution that doesn't depend on another SimScape package.

Answers (1)

Mark Wang
Mark Wang on 17 Jun 2020
In Sismscape Multibody, I just parallel the joint that we want to lock and unlock during the simulation with a weld joint. The weld joint's mode is set to "provided by input". And you can edit the input so as to make the weld joint works and lock your joint or disengage the weld joint and unlock your joint.
  2 Comments
Mark Wang
Mark Wang on 22 Oct 2020
I’m sorry for I ignore the matlab answers for some time. The model I built is like this.You may also see the model slx file. The model is in matlab2020a. The parallel was in the module Mysp1.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!