Simmechanics 2nd generation - modelling things at angles

Hi All,
I've tried to upgrade to the 2nd generation but am getting fed up.
With 1G, I import my coordinates and create bodies and links that have these coordinates, with the joints at the interfaces. If it was a triangular link, a general body would be created.
With 2G, I've found ways to put Transforms at each coordinate, but creating bodies that go between these is a difficult task of vector transforms and extrusions, even just to make a straight tubular rod from one point to another in 3D space. I can put spheres at each joint but it's difficult to visualise the links themselves. I've used a matlab script to create a rotation matrix but it's not the simplest thing to have to do and I can't help but think I'm missing something since this is so complicated compared to the previous version?
Is there any way that I can just input geometry from coordinate points? I've found 2G is now quite slow and difficult, and as all the example models just have typed in rotation angles they aren't particularly helpful! I'd much rather use 2G as the visualisation is so much better.
Thanks, George.

Antworten (1)

Steve Miller
Steve Miller am 14 Nov. 2017

0 Stimmen

Hi George - anything you could do in 1G, you can do in 2G. If you post a 1G example, I/we can show some best practices for creating a comparable 2G model. Once you have built one model that uses the 2G convention, you will be off and running.
There are a number of File Exchange submissions that can be helpful, especially when it comes to creating bodies:
Simscape Multibody Parts Library: A library of parameterized parts, a set of MATLAB functions to create extrusions, and examples that show you how to assemble them.
Simscape Multibody Multiphysics Library: A library that helps you extend your 3D models with 1D effects in mechanical, hydraulic, and electrical domains
Simscape Multibody Contact Forces Library: A library of contact forces and examples showing how to use them.
The visualization is the most obvious advantage of 2G, but there are many other advantages (scalability, reusability, speed of simulation, etc.) that make learning the new approach worth it.
--Steve

2 Kommentare

Hello Steve, thanks for getting back to me so quickly,
I've attached the two ways that I can see for making a simple rod (for visualisation) in 1G and 2G. I may well have over-complicated the 2G option, I'm hoping there's a simpler way. I appreciate this could be a masked subsystem to speed it up in future.
For what I'm doing, the rod mass properties aren't particularly important, but there's lots of them so getting it done quickly and easily is beneficial.
aim: 1) rod between P1 and P2 2) CSYS of P1 points Z towards P3 for joints 3) Mass at centre of rod (simscape 2nd g is better as it does the inertia for the tube, although as stated this isn't significant to me).
My other query was whether the large number of transformations involved would slow the model, and whether the matlab code used for the transformations will be called every timestep and hence again slow the simulation? What I thought was an equivalent model in 2G runs quite a lot slower (proprietary though).
Thanks again, George.
GeorgeS
GeorgeS am 24 Sep. 2018
Bearbeitet: GeorgeS am 24 Sep. 2018
Hi Steve,
Did you have time to have a look at this response? it's been a long time as I got it halfway working using the method in the previously attached zip (still not in an ideal way) but I'm back using the software again now and it's still quite painful.
It would be so nice to have the original 1G body block implemented in 2G just as an alternative option, even if it was a way of making frames & rigid transforms simply. I've sort of got it working for a few parts, but can't make a generic one for n number of connection ports.
Thanks, George.

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 14 Nov. 2017

Bearbeitet:

am 24 Sep. 2018

Community Treasure Hunt

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

Start Hunting!

Translated by