top of page
Search

#3 First steps - Defining parts in Simscape

  • Writer: Aurel
    Aurel
  • Feb 3, 2022
  • 2 min read

Updated: Feb 4, 2022

To start my project, I need to have a SolidWorks model assembly, which I will later implement into Simscape. However, since I know to use SolidWorks quite well, I will start firstly to explore and get used to Simscape and I have decided to build a simple assembly there directly and play with the interface and physics of it.


The tutorial for this part I have used is this: https://uk.mathworks.com/videos/defining-rigid-bodies-68845.html

It is one of the resources I have also put into "#2 Useful Resources" blog entry.


I opened up Matlab and from there I launched a Simscape file with the command "smnew" into the command line. There I have left the Solver Configuration, World Frame, Mechanism Confirguarion, Rigid Transfom and a Brick Solid as they are needed for this.

The idea here is to make a simple pendulum and see how to keep geometries assembled together, and how to use gravity.


The system:

ree

The Subsystem I created, contains 2 blocks (the side/outer parts) of the pendulum, and a cylinder, which is going to be rotating and allowing the pendulum to move.


The subsystem:

ree

I have individually changed the graphics (colors, in the visual properties), sizes (in the dimensions), and have given frames to those blocks which are indicating the points of where the are going to be attached to either the World (Frame3 = W) or to another object (in this case called Frame2 = Pin).


Block properties:

ree

I later changed that 1 block from the main System and added between them a "revolute joint" as seen in the first image, which allows movement around the figure (which in my case is around the cylinder).

I have checked that my "Mechanism Configuration" block had the gravity behaving toward my relative "down" which I have put to be in -Y direction. The format given is "[X Y Z]".


Applying gravity:

ree

I have then tested the system, making it run for 10 seconds and check if the behavior was the one desired. It was fairly easy and it was fully functioning because I have followed a tutorial however I have learned from this how I can attach objects to one another, changing their appearence and how to apply a gravitational force.


Simulation:


The next steps I could do is to make sure that the objects have the adequate masses and the physics allow the pendulum to come to a full stop, as now it seems like it will not stop. Or it might stop but I can't exactly see the position of the end tip of the pendulum. For that I could also add a graph to observe its behavior.

 
 
 

Comments


bottom of page