Professional Documents
Culture Documents
Lab 2 Robotica
Lab 2 Robotica
LABORATORIO N° 02
ROBÓTICA I
Integrantes:
1) Chipana Quispe, Hugo
2) Guillermo Ricra, Jerson
3) Salvatierra Juro, Elvis
CICLO 2016-III
COMANDO DE MATLAB
clc
close all
clear all
%Datos
q1i=-45; %limite angular inicial
q1f=135; %limite angular final
dq1i=9;
dq1f=12;
M2=[0 0 1 0;
-1 0 0 0;
0 -1 0 L2;
0 0 0 1];
M3=[cos(T3) 0 sin(T3) 0;
sin(T3) 0 -cos(T3) 0;
0 1 0 0;
0 0 0 1];
M4=[1 0 0 0;
0 1 0 0;
0 0 1 L4;
0 0 0 1];
%MT=MATRICE RESULTANTE
MT=M1*M2*M3*M4
t=ti:0.001:tf;
A=[ti^3 ti^2 ti 1;3*ti^2 2*ti 1 0; tf^3 tf^2 tf 1;3*tf^2 2*tf 1 0]
B=[q1i;dq1i;q1f;dq1f]
X=inv(A)*B
a1=X(1); b1=X(2); c1=X(3); d1=X(4);
q1t=(a1*t.^3+b1*t.^2+c1*t+d1); %posicion
dq1t=(3*a1*t.^2+2*b1*t+c1); %velocidad
ddq1t=(6*a1*t+2*b1); %aceleracion
figure
%Posicion articular
subplot(411)
plot(t,q1t)
subplot(412)
plot(t,q2t)
subplot(413)
plot(t,q3t)
subplot(414)
plot(t,q4t)
figure
%Velocidad articular
subplot(411)
plot(t,dq1t)
subplot(412)
plot(t,dq2t)
subplot(413)
plot(t,dq3t)
subplot(414)
plot(t,dq4t)
figure
%Aceleracion narticular
subplot(411)
plot(t,ddq1t)
subplot(412)
plot(t,ddq2t)
subplot(413)
plot(t,ddq3t)
subplot(414)
plot(t,ddq4t)
%Posicion LIneal Cartesiana
Px=-d4*cosd(q3t).*sind(q1t)-d2*cosd(q1t);
Py=d4*cosd(q1t).*cosd(q3t)+d2*cosd(q1t);
Pz=d4*sind(q3t);
figure
subplot(311)
plot(t,Px)
subplot(312)
plot(t,Py)
subplot(313)
plot(t,Pz)
figure
plot3(Px,Py,Pz)
figure
comet3(Px,Py,Pz)
POSICION ARTICULAR
VELOCIDAD ARTICULADA
ACELERACION ARTICULADA
POSICION LINEAL CARTESIANA (3D)