Simscape Multibody: external force and motion inputs, reaction torque sensing.
36 views (last 30 days)
Show older comments
ALESSIA
on 16 Apr 2024 at 14:30
Commented: Dallas Perkins
on 22 Apr 2024 at 16:04
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 :)
0 Comments
Accepted Answer
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
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().
More Answers (0)
See Also
Categories
Find more on Assembly in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!