Simscape Multibody: external force and motion inputs, reaction torque sensing.

36 views (last 30 days)
Hello everyone!
I'm using simscape multibody and I'm studying a simple 2-links multibody system.
The frame (1st link) is connected to the 2nd one through a revolute joint coupling.
I'd like to apply:
  • a vertical external force (Fext) at the end of the 2nd link
  • vary the angle-joint position (theta) from 45° to 60° (therefore, apply a vector, as the angle input, to the joint in Simscape)
The purpose of this study is to sense the Reaction torque (T) at the joint that balances the Fext so that the system stays sill (for every configuration of theta).
How can I do it using Simscape multibody's blocks?
Thank you very much in advance :)

Accepted Answer

Dallas Perkins
Dallas Perkins on 19 Apr 2024 at 21:43
Hi ALESSIA,
You can use the External Force and Torque block to provide Fext. Set the resolution frame to world so that you can set it on whatever axis "down" is. For the revolute joint, under Actuation you can set Torque to "Automatically Computed" and Motion to "Provided by Input" to specify the joint angle.
If you're looking at multiple static positions (i.e. not changing during simulation) you can just run multiple simulations varying theta.
  2 Comments
ALESSIA
ALESSIA on 21 Apr 2024 at 16:05
Hi Dallas, thank you very much for your answer, really appreciated.
What if I wanted to run multiple static problems (as you said at the end of your kind answer) but by varying the value of theta a lot? Like with a 1 degree step, from 45 to 110 [°].
Is there an automatic way to let Simscape do that instead of changing manually the theta value (since it would mean chainging it many many times)?
Thank you :)
Dallas Perkins
Dallas Perkins on 22 Apr 2024 at 16:04
I would make theta a MATLAB variable and then you could script running the model over the range you want e.g.
mdl = 'my_model_name';
theta = 45:110
for idx = 1:length(theta)
simIn(idx) = Simulink.SimulationInput(mdl);
simIn(idx) = setVariable(simIn(idx),'theta',theta(idx));
end
simOut = sim(simIn);
Simulation input objects are nice since you can easily go to running in parallel if you have the parallel computing toolbox by changing sim() to parsim().
You could also do this interactively with the Multiple Simulation Panel.
Also look into using Fast Restart to speed up the process.

Sign in to comment.

More Answers (0)

Products


Release

R2023b

Community Treasure Hunt

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

Start Hunting!