TN1 DesignRobotUsingSolidworksMATLAB 13.02.2020 English
TN1 DesignRobotUsingSolidworksMATLAB 13.02.2020 English
1. OVERVIEW
1.1 Introduction
Simscape Multibody™ (formerly SimMechanics™ in MATLAB 2015b and before) provides
a multibody simulation environment for 3D mechanical systems, such as robots, vehicle
suspensions, construction equipment, and aircraft landing gear. You can model multibody systems
using blocks representing bodies, joints, constraints, force elements, and sensors. Simscape
Multibody formulates and solves the equations of motion for the complete mechanical system.
You can import complete CAD assemblies, including all masses, inertias, joints, constraints, and
3D geometry, into your model. An automatically generated 3D animation lets you visualize the
system dynamics.
Simscape Multibody helps you develop control systems and test system-level performance.
You can parameterize your models using MATLAB® variables and expressions, and design
control systems for your multibody system in Simulink®. You can integrate hydraulic, electrical,
pneumatic, and other physical systems into your model using components from the Simscape™
family of products. To deploy your models to other simulation environments, including hardware-
in-the-loop (HIL) systems, Simscape Multibody supports C-code generation.
Simscape Multibody Link is a plug-in that you install on your CAD application to export
your CAD assembly models. The plug-in generates the files that you need to import the model into
the Simscape Multibody environment in MATLAB. From this file, users can program, simulate
the motion of the model (designed by CAD) by attaching sensors, actuators, signal system, etc.
into the model.
You can install the plug-in on 3 CAD applications: SolidWorks, Autodesk Inventor, and PTC
Creo. In this Laboratory lesson, we design a robot in SolidWorks and after that, we import this
model into MATLAB for programming.
1.2 Preparation
Students need to install following software before coming to class:
- SolidWorks
- MATLAB
- Download Simscape Multibody Link Plug-in on MATLAB website.
Select the file versions matching your MATLAB release number and system architecture—e.g.,
release R2017b and Win64 architecture. Do not extract the zip archive.
2. BASIC KNOWLEDGE
2.1 Install Simscape Multibody Link Plug-in
Step 1: Get the Installation Files
- Go to the Simscape Multibody Link download page.
- Follow the prompts on the download page.
- Save the zip archive and MATLAB file in a convenient folder.
Select the file versions matching your MATLAB release number and system architecture—
e.g., release R2017b and Win64 architecture. Do not extract the zip archive.
The body subsystems in turn consist of Extruded Solid blocks interconnected through Rigid
Transform blocks. The Extruded Solid blocks provide the solid properties, including geometry,
inertia, color, and frames—axis triads that encode all position and orientation information in a
model. The Rigid Transform blocks rotate and translate the solids to ensure proper body
assembly.
3. Experimental Content
3.1 Time: 5 hours for each group of students.
3.2 Content
Students do following steps:
- Step 1: Design and assemble a 2DOF robot in SolidWorks (the robot is shown in Figure 1).
Next you should save this robot model as an assembly file.
- Step 2: Export a designed 2DOF robot to XML format file and import this file to MATLAB
using Simscape Multibody Link (2.3 Export and import files).
- Step 3: Change the color of each link of the robot: the base link is black, the first link is blue, the
second link is red, the end-effector link is green.
Guide: Double click the desired link, double click Solid block, choose: Properties/Graphic/Visual
Properties/Color
For First generation, double click the desired link (need to change color) and choose
Visualization.
- Step 4: Attach a “Transform Sensor” (For First generation is “Body Sensor’’) to the end-effector
link (KhauBut) to measure the position of the end-effector and show this position on XY Graph.
Guide: In end-effector link, add a new coordinate system. After that, attach “Transform Sensor”
to this frame.
For First Generation, in the end-effector link, add a CS3 coordinate system. The origin of this
frame is in the top of the end-effector. Next, we need to attach a “Body Sensor” in this frame.
- Step 5: Attach sensors “Joint Sensor” (First Generation) to joint 1 and joint 2 to measure the
angles as these joints and show on Scope. In case of new version, we attach directly to the joint
and choose “Sensor”.
- Step 6: Attach actuators “Joint Actuator” (First Generation) to joint 1 and joint 2. Choose control
mode of Force or Motion. In case of new version, we attach directly to the joint and choose
“Actuator”.
- Step 7: Program to control joint 1 and joint 2 to rotate desired angles according to time using
“ramp” block. (Example: Joint 1 rotates 60 degrees, Joint 2 rotate 90 degrees).
References
[1] Website MATLAB
Step 2:
Step 3:
Step 4:
Step 5:
Step 6:
Step 7: