Professional Documents
Culture Documents
| |
=
|
\
,
2 2 2 2
1 1 2 2 3
3
2 3
cos
2
k k l l
l l
( +
=
(
, where
1 1
cos
c
k x = and
2 1 c
k z l =
1 1 1 2 3
2
3 3 2
sin
sin tan
cos
c
z l l
r l l
| | | |
=
| |
+
\
\
, where ( ) ( )
2 2
3 3 2 3 3
cos sin r l l l = + +
These inverse kinematic equations are used to generate a set of angles which is to be varied with
time to make the robot trace any given path. A sample data generated in the workspace for a spline
trajectory may look like the one shown in Fig. 3. Which contains time increments of 0.01s in its first
column, second column contains angles taken up by joint one for each time intervals in radians. The
third and fourth column contains velocity and acceleration constraints which are neglected for the
current case.
Fig. 3: Angle variation for any joint as prepared in workspace.
With this as a background for the current example of robotic manipulator, one can construct robot
in SimMechanics using mechanical blocks. Drag-drop blocks from different mechanical modules to a
blank workspace created in MATLAB Simulink, and connect them to construct the robot system as
shown in the Fig. 4. Only three inputs for joints angles are required for the simulation to run.
Fig. 4: Structure of 3 DOF Robotic Manipulator using SimMechanics Blocks
Let the length of the links be l
1
= 100mm + 2mm for Base Height, l
2
= 300mm and l
3
= 300mm, the
parameters for each of the blocks can be set as shown in Table 1 as follows:
Block Name Obtained
From
Block Parameters to Set Comments
Machine
Environment
Bodies Gravity Vector [0 0 -9.81] m/s
2
Negative Z
Axis
Ground Bodies
Show Machine Environment Port
Location [0 0 0]
Fixing Joint
Joints
Prismatic
Axis of Action [1 1 0]
Free to
slide
Manipulator
Base Link0
Bodies
Mass: 302g,
Inertia: 1.0e-003 * [0.0630 0 0; 0 0.3046 0; 0 0 0.3674]
Kg/m
2
Only CS1
and CS2
are shown
Yaw Base
Revolute
Joint
Joints -
Revolute
Axis of Action [0 0 1], Reference CS Base
Number of sensor and actuator ports: 2
Yaw servo
Sensors &
Actuators
Joint
Actuator
Angular units: radians
Actuate
with
Motion
Th1_Sim
Simulink
Sources
From
Workspace
Data Source: Th1_Sim
Sample Time: 0.01s
Interpolate Data
Output after final data value: holding the final value
Format as
in Fig: 3
Joint Torque
Sensor
Sensors &
Actuators
Joint
Sensor
Check: Computed Torque (Nm)
Scope3
Simulink
Sinks
Scope
None
Link1 Bodies
Mass: 25g
Inertia:1.0e-003 *[0.0019 0 0;0 0.0019 0; 0 0
0.0001]kg/m
2
Parameters for other blocks are set in similar fashion depending on the robot configuration. It is left
as an assignment for the reader to do that. Body position sensor is configured to sense the absolute
position with respect to world coordinate system. The remaining two links may be set to be in
horizontal position. A Spline curve as shown in Fig. 5(a) is fed to the inverse kinematic formulation to
generate variations of different joint angles as in Fig. 5 (b), (c) and (d) for 50 curve points. The curve
points are spaced more closely towards its ends so as to have a reduced velocity at the ends. Any
two successive points are traversed in equal time interval of 0.01 seconds.
a. Spline Path Trajectory
b. Theta1 for 50 points on Trajectory
c. Theta2 for 50 points on Trajectory
d. Theta3 for 50 points on Trajectory
Fig. 5
Configuration parameters for the SimMechanics simulation are set to show animation during
simulation and display machines during updating diagram. Solver stop time is set to 0.5 seconds.
Now the model is all set to run with data for joint angle variations with time existing in the
workspace. One can now run the simulation to visualize the model and its run time parameters as in
Fig. 6. The scopes can be double-clicked to see the joint torque variations as in Fig. 7. This joint
torques for each joint may be utilized for actuator selection for each joint. The last link should be
constructed to take care of the payload attached to it.
The model visualization can be improved by grouping a set of blocks to construct a single block
assigning an image to it by editing its mask. The Model Properties can use callbacks to load a data
file on opening a model file.
Fig. 6: Stick Simulation of 3 DOF Robotic Manipulator
Fig. 7: Torque Variation of different joints in Nm for 0.5 Seconds Trajectory
With this I conclude the article, and I wish all the best for any innovative design one may have.
References:
SimMechanics User Guide 1984-2008 The MathWorks, Inc.