MATLAB Answers

How to change File Solid

2 views (last 30 days)
A
A on 5 Jul 2021
Commented: A on 24 Jul 2021
I imported a CAD model into MATLAB Simscape. I was then able to generate the model in Simscape.
What I am going to do is as follows. Please tell me how to do it.
I want to edit the File Solid block imported into Simscape to change the shape of the model, e.g. size and length. However, I do not want to   edit the File Solid block by changing the CAD model and importing it again as shown in the attached picture.
We want to edit the File Solid block by using MATLAB program or Simlink.
If we can change the shape of the model by editing the File Solid block with a MATLAB program or Simlink, we would like to be able to change the shape of the File Solid block every time we run a simulation.
This is because we want to use it for reinforcement learning. I want to change the shape of the File Solid block every time I run a simulation and reflect it in the File Solid block.

Accepted Answer

Yifeng Tang
Yifeng Tang on 23 Jul 2021
I don't think you can edit the content of the solid via the file solid block, so I am not aware of a way to do what you have in mind directly. However, maybe there are workarounds to model the "effects" of changing the shape of the part. What go into the computation/simulation from the solid, apart from the visual, really are the mass, moment of inertia, and attached frames. So, if your reinforcement learning can be set up to change those parameters, to approximately reflect the effects of changing the shape, it may work to some degree. You can get the baseline values of the actual part by looking at the derived values of the inertia in the file block, then you can change the inertia specification to "custom" and allows direct change of those number. Just a thought.
  1 Comment
A
A on 24 Jul 2021
Thank you very much for your answer. I'll give it a try.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by