Anda di halaman 1dari 3

ITMT 270

Robotics Systems Application

Assignment 3 (Computer Lab Report)


Department of Applied Engineering and Technology
College of Science and Technology
Morehead State University
Fill the follow:
Software used: MatLab
Version: 8.5 2015
Describe the purpose of the laboratory:
To better understand programming, and exactly what MatLab is
capable of doing. This is done by actively getting involved with a
hands on approach to using the software.

Name of de robot simulated:


Planar Robot

Number of degrees of freedom: 2


DOF

Robot classification
By kinematic structure: Planar
By degrees of freedom: 2 DOF
robot
By the workspace geometry: The The motions characteristics: this
robot has access to only two
robot is capable of moving
movements. It can manipulate
forward and backwards on the x
the effector on the z axis and the axis, and up and down by the z
x axis, although it is unable to
axis. However, it is unable to
travel in another direction. So I
move on the y axis. So I would
would say it would be again
say that it is planar in its
planar.
motions.
1. What commands or functions did you learn for Matlab? Basic structure of
the program as far as layout and general commands. We also covered
editor window and basic command of variables. The most memorable thing
from MatLab that I took away was the feature in which it calculates. The
program is similar but not exact to CodeBlocks in C++ programming.
2. Enter your programming code developed in Matlab. Adds comments to
understand step by step what the code is doing.

clear all
close all
software)
clc
l1=20;
l2=25;
the arms)

(this simply clears the window of variables)


(Here we close all things that could be pulled up in the
(clc is used to clear the workspace)

(l1 and l2 are simply establishing the lengths of both of

x=33.3901;
y=29.1511;

(x and y are establishing the location of x and y)

%x=0;
%y=45;
%
%x=45;
%y=0;
%
%
(the variables above here x and y are arbitrary and do not need to be
included in this so they are left with the % sign to remain hidden in the
calculations by mat lab.)
%theta computation
cos_theta2 = (x^2 + y^2 - l1^2 - l2^2)/(2*l1*l2)
sin_theta2 = sqrt (1 - cos_theta2^2)
theta2 = atan (sin_theta2/cos_theta2);
theta2_deg= theta2 *180/pi
cos_theta1 =(x*(11+12*cos_theta2)+(y*12*sin_theta2))/(x^2+y^2);
sin_theta1 = sqrt(1 - cos_theta1^2);
theta1= atan(sin_theta1/cos_theta1);
theta1_deg=theta1*180/pi
(above here we have the actual equations in which we want to solve
for)
%
%graphic
xj1=0;
yj1=0;
(the xj1 and yj1 are the joint locations.)

xj2 =l1*cos_theta1;
yj2 = l2* sin_theta1;
hold on
grid on
axis equal;
plot (xj1, yj1, 'o')
plot (xj2, yj2, 'o')
plot (x,y,'o')
line([xj1, xj2],[yj1,yj2],'lineWidth',2);
line([x,xj2],[y,yj2],'lineWidth',2);
(all of this above here is just merely establishing the joint locations and
the locations to plot on a graph. I.e. the grid on, plot, and line
commands. It is also to be noted that the linewidth command shows how
wide we want the line represented on the graph to actually be.)
%
%
(It is to be noted that the percentage signs % show inputs that will
not be included in the mat lab calculations.)
3. Include the graphical representation of your model. (Refer to included
MatLab Attachment in blackboard.) I was unable to pull this up and am not
sure on how exactly to get it from Mat Lab into Microsoft word.

Anda mungkin juga menyukai