Beruflich Dokumente
Kultur Dokumente
The big advantage of interfacing Matlab with Solidworks is that Matlab can
simulates the dynamics of the mechanical models.
At the end of this slides you will find it is very easy to design an assembly in
SolidWorks and animate it using Matlab.
We will start from scratch in a simple manner, and I will show you how to
do it step by step.
Notes:
SimMechanics Link :
Is the link between Matlab and SolidWorks, so you can import SolidWorks
assemblies to Matlab.
(Note: you will choose your platform first(Win32 (PC) Platform , Win64 (PC)
Platform , UNIX (64-bit Linux) , Mac OS X (64-bit Intel)).
NOW
You are ready to import your SolidWorks assembly to Matlab, the
process will be like this:
5- Now, you can put forces and torques on joints to achieve the
desired motion.
We can use sensors in the control system to get a feedback from the
system to the controller.
But, before we will talking about how to use them, let us talk first about
joints in Simulink.
- Prismatic
- Revolute
You can find them in : Simulink > Simscape > SimMechanics > First
Generation.
Note:
You can use Help to know the function of every block in the diagram.
Adding actuators and sensors:
We can apply a force or motion on a joint, and we can also add a sensor to
joint to estimate the motion of the joint (distance or angle).
To do that, we must add terminals to the joint by double click on the joint
block and increase the number of terminals.
Let us say we want to add actuator and sensor to the joint, this will be like
this:
The yellow block is the desired force or motion that we want to apply on
the joint, it may be a constant value or sine wave or anything we want.
We can choose the type of input(motion or force) from the joint actuator
block.
Note:
In case that we choose Motion, the input to the Joint Actuator block must
be three dimensional array input(because we can revolute about X or Y or Z
axis).
Here, I applied a Sine wave motion on the two joints, so we can see the two
links rotate in a Sine motion(tilting motion), and also added sensors on the
two joints to see the outputs on the scopes.
You can use this method to simulate control systems such as Inverted
Pendulum system, I tried it and that was cool .
Hope that was helpful for you, any questions you can contact me on:
https://www.facebook.com/samer.elsawy