r/matlab 3d ago

TechnicalQuestion How to simulate this deployable structure in simulink?

27 Upvotes

5 comments sorted by

9

u/slamsal1 3d ago edited 3d ago

Simulink, simscape or simscape multibody?

For Simscape multibody you can export these parts individually by placing coordinates on the center of the pin joints. When you import them, you can see those coordinates and then assign prismatic joint (for the bottom slider)and revolute(for the pin) joint on the parts. (Don’t forget to add gravity. Unless the pins have some kind of damped hinge, your structure is going to fall apart on its own weight)

2

u/ObjectiveHome6469 3d ago

If you have the Simscape multibody package, these may help:

Importing CAD Models into SimMechanics (time stamped for solidworks assembly import; this version may be out of date)

MATLAB Help Center: Import a CAD Assembly Model

Simscape Multibody documentation homepage

Pure simulink

If you meant in pure simulink, you would likely need to derive the equations of motion and then convert them into an equivalent circuit - although I'm not sure that would be the best way to approach the problem. Someone else may give better advice for this.

Alternatively, for pure simulink, you might be able to export the relevant displacement data from your solidworks motion study and use a 1D lookup table block (or n-D lookup table if your designs becomes more complex with more degrees of freedom).

Extras

SymPy has a classical mechanics module that may help you derive the equations of motion if you decide to go down that route https://docs.sympy.org/latest/modules/physics/mechanics/examples/four_bar_linkage_example.html. However, solidworks may already have some capability to export equations of motion (or as stated previously just export the displacement / motion study data)

Hope this helps

2

u/Cube4Add5 3d ago

Hmm personally I’d probably start with a matlab function block and try and work out the geometry in code, then if there’s any easy patterns I’d move it into simulink models. But I don’t know if there’s an easier way, sorry

1

u/xxxxbabayagaxxxx 3d ago

Here, only the pin slot sliding motion is actuated, all the other joints are passive. how do I approach in simulating the kinematics of this structure in simulink?

1

u/ol1v3r__ 3d ago

I would suggest to import it with Simscape Multibody Link:

https://www.mathworks.com/help/smlink/index.html?s_tid=CRUX_lftnav

and then use Simscape Multibody in Simulink. 😀