Академический Документы
Профессиональный Документы
Культура Документы
CONACI
ONALDEMÉXI
CO
I
NSTI
TUTOTECNOL CODEL
ÓGI ALAGUNA
DI
VI ÓNDEESTUDI
SI OSDEPOSGRADO
EINVESTI
GACI
ÓN
M.
C.ENI
NGENI ERÍ
AELÉCTRI
CA
MECATRÓNICAYCONTROL
ROBÓTICA
TAREA14ÍNDI
CESDEMANIPULABI LI
DAD
DELROBOTDENSOVP-6242G
PRESENTA:
I
NG.MARI
OIVÁNNAVABUSTAMANTE
M1913001
CATEDRÁTI
CO:DOCTORJ
.ALFONSOPÁMANESGARCÍ
A
TORREÓN,COAHUI
LA MAYODE2019
Índice
1. Introducción 2
2. Problema a resolver 2
3. Resultados 4
4. Conclusiones 7
5. Referencias bibliográficas 7
Robótica 2
1. Introducción
ω = σ1 σ2
o en forma general
p
ω= det(JJ T )
Esta variable ω es definida por T. Yoshikawa como ı́ndice de manipulabilidad del manipu-
lador.
2. Problema a resolver
Resolución
Este trabajo tiene como enfoque principal la obtención y graficación de los ı́ndices de mani-
pulabilidad del robot Denso VP-6242G, para la tarea correspondiente a realizar. Se tomó como
anecedente el trabajo realizado en las tarea número 7, número 10.1 y número 13 del curso de
robótica, complementando el código de MatLab para que este pudiera graficar los ı́ndices de
desempeño.
Tarea 14. Índices de manipulabilidad del robot DENSO VP-6242G 3
J σ α d θ r
1 0 0 0 θ1 0
2 0 90◦ 0 θ2 0
3 0 0 d3 θ3 0
4 0 90◦ d4 θ4 r4
5 0 −90◦ 0 θ5 0
6 0 90◦ 0 θ6 0
3. Resultados
En la figura 5, se pueden observar las consignas de las velocidades articulares del robot al
desarrollar la tarea programada.
4. Conclusiones
5. Referencias bibliográficas
n= 99;
np = 100;
np1 = np+1;
e = 1; %solución del MIP
%Parámetros geométricos:
%Robot:
d3 = 210;
d4 = 75;
r4 = 210;
d6 = 70;
rh = 250; %Porque el marco 6 está unido al 4 y al 5
rp = 160; %Para trazar el vástago del muñón a la herramienta
%Pinza:
a = 30;
b = 5;
c = 60;
%Placa:
l = 180;
m = 300;
ak = 150;%350;%400; %150;
bk = 320;%75;%100; %200;
ck = -350;%-280-140;%-100; %400;
pnx = zeros(1,np1);
pny = zeros(1,np1);
pnz = zeros(1,np1);
t1g = zeros(1,np);
t2g = zeros(1,np);
t3g = zeros(1,np);
t4g = zeros(1,np);
t5g = zeros(1,np);
t6g = zeros(1,np);
time = zeros(1,np);
vx = zeros(1,np);
vy = zeros(1,np);
vz = zeros(1,np);
Vel1=zeros(1,np);
Vel2=zeros(1,np);
Vel3=zeros(1,np);
Vel4=zeros(1,np);
Vel5=zeros(1,np);
Vel6=zeros(1,np);
%wx = zeros(1,np);
%wy = zeros(1,np);
%wz = zeros(1,np);
th1g = zeros(1,np);
th2g = zeros(1,np);
th3g = zeros(1,np);
th4g = zeros(1,np);
th5g = zeros(1,np);
th6g = zeros(1,np);
kk1= zeros(1,np);
kk2= zeros(1,np);
kk3= zeros(1,np);
kk4= zeros(1,np);
kk5= zeros(1,np);
kk6= zeros(1,np);
kkk= zeros(1,5);
kappa= zeros(1,np);
Wa= zeros(1,np);
Ww= zeros(1,np);
th2min=-30;
th2max=210;
th2mean=((th2max+th2min)/2);
delth2mx= abs(th2max-th2mean);
th3min=-70;
th3max=71;
th3mean=((th3max+th3min)/2);
delth3mx= abs(th3max-th3mean);
th4min=-160;
th4max=160;
th4mean=((th4max+th4min)/2);
delth4mx= abs(th4max-th4mean);
th5min=-120;
th5max=120;
th5mean=((th5max+th5min)/2);
delth5mx= abs(th5max-th5mean);
th6min=-360;
th6max=360;
th6mean=((th6max+th6min)/2);
delth6mx= abs(th6max-th6mean);
aa = 0;
bb = 0;
cc = 280;
%Emplazamiento en el piso:
Te0 = [1 0 0 aa
0 1 0 bb
0 0 1 cc
0 0 0 1 ];
T0e = [1 0 0 -aa
0 1 0 -bb
0 0 1 -cc
0 0 0 1 ];
% %Emplazamiento en muro:
% Te0 = [0 0 1 aa
% 0 1 0 bb
% -1 0 0 cc
% 0 0 0 1 ];
%T0e = [0 0 1 -aa
% 0 1 0 -bb
% -1 0 0 -cc
% 0 0 0 1 ];
%Matriz que especifica el estado de la placa:
Tek = [0 0 1 ak
0 -1 0 bk
1 0 0 ck
0 0 0 1];
sp1 = [ 0 0 0 0]';
sp2 = [ 0 0 0 1]';
b1 = [ -80 80 -280 1]';
b2 = [ 80 80 -280 1]';
b3 = [ 80 -80 -280 1]';
b4 = [ -80 -80 -280 1]';
ex0 = [5 0 0 1]';
ey0 = [0 5 0 1]';
ez0 = [0 0 5 1]';
p1 = [ a b -c 1]';
p2 = [ a b 0 1]';
p3 = [ a -b 0 1]';
p4 = [ a -b -c 1]';
p5 = [-a b -c 1]';
p6 = [-a b 0 1]';
p7 = [-a -b 0 1]';
p8 = [-a -b -c 1]';
%Matriz de transformación de 6 a h:
T6h = [1 0 0 0
0 1 0 0
0 0 1 rh
0 0 0 1 ];
Th6 = [1 0 0 0
0 1 0 0
0 0 1 -rh
0 0 0 1 ];
T1 = 2;
T2 = 4;
x06 = 285;
y06 = 0;
z06 = -100;
%delx06 = 0;
%dely06 = 0;
%delz06 = 100;
ra1=25;
ra2=50;
ra3=75;
ra4=100;
npm=25;
for i=0:np
% t=T1*i/np;
if i<ra1
t = T1*i/npm;
x06 = 500;%525;
y06 = 30;%-70;
z06 = -300;%-300;
delx06 = 0;
dely06 = 0;
delz06 = 300;
T = T1;
ti1 = t;
elseif (ra1<=i&&i<ra2)
i2 = i-ra1;
t = T2*i2/npm;
x06 = 500;%525;
y06 = 30;
z06 = 0;
delx06 = 0;%-180;
dely06 = 140;%50;
delz06 = 0;
T = T2;
ti2 = t+ti1;
elseif(ra2<=i&&i<ra3)
i3 = i-ra2;
t = T1*i3/npm;
x06 = 500;
y06 = 170;%-20;
z06 = 0;
delx06 = 0;
dely06 = 0;
delz06 = -300;
T = T1;
ti3 = t+ti2;
elseif(ra3<=i&&i<ra4)
i4 = i-ra3;
t = T2*i4/npm;
x06 = 500;
y06 = 170;%-20;
z06 = -300;
delx06 = 0;%180;
dely06 = -140;%-50;
delz06 = 0;
T = T2;
ti4 = t+ti3;
end
%Especificación de las variables articulares:
funt = (t/T)-(1/(2*pi))*(sin(2*pi*t/T));
px = x06+delx06*funt;
py = y06+dely06*funt;
pz = z06+delz06*funt;
Tkh = [0 0 -1 px
0 1 0 py
1 0 0 pz
0 0 0 1];
%Matriz SNAP:
snap = T0e*Tek*Tkh*Th6;
sx = snap(1,1);
sy = snap(2,1);
sz = snap(3,1);
nx = snap(1,2);
ny = snap(2,2);
nz = snap(3,2);
ax = snap(1,3);
ay = snap(2,3);
az = snap(3,3);
Px = snap(1,4);
Py = snap(2,4);
Pz = snap(3,4);
%Theta 1:
t1 = atan2(Py,Px);
%Theta 2:
Z1=Px*cos(t1) + Py*sin(t1);
B1=2*(-(d4*Pz) - r4*Z1);
B2=2*(Pz*r4 - d4*Z1);
B3=d3^2 - d4^2 - Pz^2-r4^2 - Z1^2;
SQ=(B1*B3 + B2*sqrt(B1^2+B2^2-B3^2)*e)/(B1^2 + B2^2);
CQ=(B2*B3 - B1*sqrt(B1^2 +B2^2 -B3^2)*e)/(B1^2 + B2^2);
Q=atan2( SQ , CQ );
t2=atan2(-((-Pz-r4*cos(Q)+d4*sin(Q))/d3),(Z1-d4*cos(Q)-r4*sin(Q))/d3);
%Theta 3:
t3=Q-t2;
%Theta 4:
X=-(ay*cos(t1)) + ax*sin(t1);
Y=-(ax*cos(t1)*cos(t2+t3))-ay*cos(t2+t3)*sin(t1)-az*sin(t2+t3);
t4 = atan2(-X,Y );
%Theta 5:
Y5=-(cos(t4)*(ax*cos(t1)*cos(t2+t3)+ay*cos(t2+t3)*sin(t1)+az*sin(t2+t3))) -(-
(ay*cos(t1))+ax*sin(t1))*sin(t4);
Y15=az*cos(t2+t3)-ax*cos(t1)*sin(t2+t3)-ay*sin(t1)*sin(t2+t3);
t5 = atan2(-Y5,-Y15);
%Theta 6:
Y6=-(cos(t4)*(-
(sy*cos(t1))+sx*sin(t1)))+(sx*cos(t1)*cos(t2+t3)+sy*cos(t2+t3)*sin(t1)+sz*sin(t2+t3))*sin(t4
);
Y16=-(cos(t4)*(-
(ny*cos(t1))+nx*sin(t1)))+(nx*cos(t1)*cos(t2+t3)+ny*cos(t2+t3)*sin(t1)+nz*sin(t2+t3))*sin(t4
);
t6 = atan2(-Y6 , -Y16 );
if i<ra1
t1g(i+1)= rad2deg(t1);
t2g(i+1)= rad2deg(t2);
t3g(i+1)= rad2deg(t3);
t4g(i+1)= rad2deg(t4);
t5g(i+1)= rad2deg(t5);
t6g(i+1)= rad2deg(t6);
time(i+1)= ti1;
elseif (ra1<=i&&i<ra2)
t1g(i+1)= rad2deg(t1);
t2g(i+1)= rad2deg(t2);
t3g(i+1)= rad2deg(t3);
t4g(i+1)= rad2deg(t4);
t5g(i+1)= rad2deg(t5);
t6g(i+1)= rad2deg(t6);
time(i+1)= ti2;
elseif(ra2<=i&&i<ra3)
t1g(i+1)= rad2deg(t1);
t2g(i+1)= rad2deg(t2);
t3g(i+1)= rad2deg(t3);
t4g(i+1)= rad2deg(t4);
t5g(i+1)= rad2deg(t5);
t6g(i+1)= rad2deg(t6);
time(i+1)= ti3;
elseif(ra3<=i&&i<ra4)
t1g(i+1)= rad2deg(t1);
t2g(i+1)= rad2deg(t2);
t3g(i+1)= rad2deg(t3);
t4g(i+1)= rad2deg(t4);
t5g(i+1)= rad2deg(t5);
t6g(i+1)= rad2deg(t6);
time(i+1)= ti4;
end
if i < np
th1g(i+1)=rad2deg(t1);
th2g(i+1)=rad2deg(t2);
th3g(i+1)=rad2deg(t3);
th4g(i+1)=rad2deg(t4);
th5g(i+1)=rad2deg(t5);
th6g(i+1)=rad2deg(t6);
kk1(i+1)=abs((th1g(i+1)- th1mean)/delth1mx);
kk2(i+1)=abs((th2g(i+1)- th2mean)/delth2mx);
kk3(i+1)=abs((th3g(i+1)- th3mean)/delth3mx);
kk4(i+1)=abs((th4g(i+1)- th4mean)/delth4mx);
kk5(i+1)=abs((th5g(i+1)- th5mean)/delth5mx);
kk6(i+1)=abs((th6g(i+1)- th6mean)/delth6mx);
kkk(1)=kk1(i+1);
kkk(2)=kk2(i+1);
kkk(3)=kk3(i+1);
kkk(4)=kk4(i+1);
kkk(5)=kk5(i+1);
kkk(6)=kk6(i+1);
kmean= mean(kkk);
kstd= std(kkk,1);
kappa_i=kmean + kstd;
kappa(i+1)=kappa_i;
end
%%%%%%%%%%%%%%%%%%%%%%%
s1 = sin(t1);
c1 = cos(t1);
s2 = sin(t2);
c2 = cos(t2);
s3 = sin(t3);
c3 = cos(t3);
s4 = sin(t4);
c4 = cos(t4);
s5 = sin(t5);
c5 = cos(t5);
s6 = sin(t6);
c6 = cos(t6);
s23 = sin(t2+t3);
c23 = cos(t2+t3);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Matriz Jacobiana Básica:
J14 = 0;
J24 = 0;
J34 = 0;
J44 = c1*s23;
J54 = s1*s23;
J64 = -c23;
J15 = 0;
J25 = 0;
J35 = 0;
J45 = -(c4*s1)-c1*c23*s4;
J55 = (c1*c4)-c23*s1*s4;
J65 = (s23*s4);
J16 = 0;
J26 = 0;
J36 = 0;
J46 = -(c1*c5*s23) + c1*c23*c4*s5 + s1*s4*s5;
J56 = -(c5*s1*s23) + c23*c4*s1*s5 - c1*s4*s5;
J66 = (c23*c5) + c4*s23*s5;
JI = inv(J);
%Manipulabilidad
Jta = [J11 J12 J13
J21 J22 J23
J31 J32 J33 ];
if i<np
W1(i+1)=sqrt(det(Jta*JtaT));
W2(i+1)=sqrt(det(Jrw*JrwT));
W22=W2/1.537e7;
end
%Velocidad:
kvx06 = delx06*funtd;
kvy06 = dely06*funtd;
kvz06 = delz06*funtd;
wx=0;
wy=0;
wz=0;
T0k = T0e*Tek;
v06k = [kvx06;kvy06;kvz06];
v060 = R0k*v06k;
s0 = [v060(1); v060(2); v060(3);wx;wy;wz];
qd = JI*s0;
v06x = qd(1,1);
v06y = qd(2,1);
v06z = qd(3,1);
Vel = JI*s0;
Velaux=JI*0;
if i<ra1
vx(i+1)= v06x;
vy(i+1)= v06y;
vz(i+1)= v06z;
Vel1(i+1)=(Vel(1,1));
Vel2(i+1)=(Vel(2,1));
Vel3(i+1)=(Vel(3,1));
Vel4(i+1)=(Vel(4,1));
Vel5(i+1)=(Vel(5,1));
Vel6(i+1)=(Vel(6,1));
elseif (ra1<=i&&i<ra2)
vx(i+1)= v06x;
vy(i+1)= v06y;
vz(i+1)= v06z;
Vel1(i+1)=(Vel(1,1));
Vel2(i+1)=(Vel(2,1));
Vel3(i+1)=(Vel(3,1));
Vel4(i+1)=(Vel(4,1));
Vel5(i+1)=(Vel(5,1));
Vel6(i+1)=(Vel(6,1));
elseif(ra2<=i&&i<ra3)
vx(i+1)= v06x;
vy(i+1)= v06y;
vz(i+1)= v06z;
Vel1(i+1)=(Vel(1,1));
Vel2(i+1)=(Vel(2,1));
Vel3(i+1)=(Vel(3,1));
Vel4(i+1)=(Vel(4,1));
Vel5(i+1)=(Vel(5,1));
Vel6(i+1)=(Vel(6,1));
elseif(ra3<=i&&i<ra4)
vx(i+1)= v06x;
vy(i+1)= v06y;
vz(i+1)= v06z;
Vel1(i+1)=(Vel(1,1));
Vel2(i+1)=(Vel(2,1));
Vel3(i+1)=(Vel(3,1));
Vel4(i+1)=(Vel(4,1));
Vel5(i+1)=(Vel(5,1));
Vel6(i+1)=(Vel(6,1));
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
T3c = [1 0 0 d4
0 1 0 0
0 0 1 0
0 0 0 1];
T0h = T06*T6h;
x2 = 0;
y2 = 0;
z2 = 0;
x3 = d3*c1*c2;
y3 = d3*s1*c2;
z3 = d3*s2;
xc = d4*c1*c23+d3*c1*c2;
yc = d4*s1*c23+d3*s1*c2;
zc = d4*s23+d3*s2;
x4 = d3*c1*c2+d4*c1*c23+r4*c1*s23;
y4 = d3*s1*c2+d4*s1*c23+r4*s1*s23;
z4 = d3*s2+d4*s23-r4*c23;
x5 = x4;
y5 = y4;
z5 = z4;
x6 = x4+(c1*s23*c5+c1*c23*c4*s5+s1*s4*s5)*d6;
y6 = y4+(s1*s23*c5+s1*c23*c4*s5-c1*s4*s5)*d6;
z6 = z4+(-c23*c5+s23*c4*s5)*d6;
xOh = (c1*s23*c5+c1*c23*c4*s5+s1*s4*s5)*rh+d3*c1*c2+d4*c1*c23+r4*c1*s23;
yOh = (s1*s23*c5+s1*c23*c4*s5-c1*s4*s5)*rh+d3*s1*c2+d4*s1*c23+r4*s1*s23;
zOh = (-c23*c5+s23*c4*s5)*rh+d3*s2+d4*s23-r4*c23;
xOp = x4+(c1*s23*c5+c1*c23*c4*s5+s1*s4*s5)*rp;
yOp = y4+(s1*s23*c5+s1*c23*c4*s5-c1*s4*s5)*rp;
zOp = z4+(-c23*c5+s23*c4*s5)*rp;
pnx(i+1) = rpOh(1);
pny(i+1) = rpOh(2);
pnz(i+1) = rpOh(3);
%Primer eslabón:
es1x = [ aa rpO2(1)];
es1y = [ bb rpO2(2)];
es1z = [ cc rpO2(3)];
%Segundo eslabón:
es2x = [rpO2(1) rpO3(1)];
es2y = [rpO2(2) rpO3(2)];
es2z = [rpO2(3) rpO3(3)];
%Codo:
escx = [rpO3(1) rpOc(1)];
escy = [rpO3(2) rpOc(2)];
escz = [rpO3(3) rpOc(3)];
%Tercer eslabón:
es3x = [rpOc(1) rpO5(1)];
es3y = [rpOc(2) rpO5(2)];
es3z = [rpOc(3) rpO5(3)];
%Cuarto eslabón:
es4x = [rpO4(1) rpO6(1)];
es4y = [rpO4(2) rpO6(2)];
es4z = [rpO4(3) rpO6(3)];
%Eslabón herramienta:
espx = [rpO5(1) rpOp(1)];
espy = [rpO5(2) rpOp(2)];
espz = [rpO5(3) rpOp(3)];
%Herramienta:
hspx= [rpOp(1) rpOh(1)];
hspy= [rpOp(2) rpOh(2)];
hspz= [rpOp(3) rpOh(3)];
%Transformación de los puntos de la base del robot y de los extremos de
%los ejes del marco 0 al marco e:
s1n = Te0*sp1;
s2n = Te0*sp2;
b1n = Te0*b1;
b2n = Te0*b2;
b3n = Te0*b3;
b4n = Te0*b4;
T0k = Te0*Tek;
plA = T0k*Ak;
plB = T0k*Bk;
plC = T0k*Ck;
plD = T0k*Dk;
Teh = Te0*T0h;
pnz1 = Teh*p1;
pnz2 = Teh*p2;
pnz3 = Teh*p3;
pnz4 = Teh*p4;
pnz5 = Teh*p5;
pnz6 = Teh*p6;
pnz7 = Teh*p7;
pnz8 = Teh*p8;
if i>1
for j=2:i
plot3([pnx(j-1),pnx(j)],[pny(j-1),pny(j)],[pnz(j-1),pnz(j)],'b','LineWidth',1);
hold on
if j==i
plot3([pnx(j),pnx(j+1)],[pny(j),pny(j+1)],[pnz(j),pnz(j+1) ],'b','LineWidth',1);
end
end
end
%Dibujo de la placa:
plot3(plABx ,plABy ,plABz ,'k', plBCx ,plBCy ,plBCz,'k', plCDx ,plCDy ,plCDz
,'k','LineWidth',1);
plot3(plDAx ,plDAy ,plDAz ,'k','LineWidth',1);
%Dibujo de la herramienta:
plot3(espx,espy,espz, 'k-o','LineWidth',1);
plot3(hspx,hspy,hspz, 'r','LineWidth',1.5);
% view(2)
view([1,-1,1]) %Para emplazamiento en el piso.
% view([-1,-1,1]) %Para emplazamiento en muro
xlabel('x');
ylabel('y');
zlabel('z');
pause(0.0001)
end
figure (2)
title('Límites Articulares')
axis([0,11.52,-130,130])
xlabel('Tiempo')
ylabel('Articulación 5')
grid minor
%Velocidad Theta 1:
subplot(2,3,1)
plot(time,Vel1,'r','LineWidth',1)
hold on
axis([0,11.52,-2.5,2.5])
xlabel('Tiempo')
ylabel('Velocidad Articulación 1')
grid minor
%Velocidad Theta 2:
subplot(2,3,2)
plot(time,Vel2,'r','LineWidth',1)
hold on
axis([0,11.52,-2.5,2.5])
xlabel('Tiempo')
ylabel('Velocidad Articulación 2')
grid minor
%Velocidad Theta 3:
subplot(2,3,3)
plot(time,Vel3,'r','LineWidth',1)
hold on
axis([0,11.52,-2.5,2.5])
xlabel('Tiempo')
ylabel('Velocidad Articulación 3')
grid minor
%Velocidad Theta 4:
subplot(2,3,4)
plot(time,Vel4,'r','LineWidth',1)
hold on
axis([0,11.52,-2.5,2.5])
xlabel('Tiempo')
ylabel('Velocidad Articulación 4')
grid minor
%Velocidad Theta 5:
subplot(2,3,5)
plot(time,Vel5,'r','LineWidth',1)
hold on
axis([0,11.52,-2.5,2.5])
xlabel('Tiempo')
ylabel('Velocidad Articulación 5')
grid minor
%Velocidad Theta 6:
subplot(2,3,6)
plot(time,Vel6,'r','LineWidth',1)
hold on
axis([0,11.52,-2.5,2.5])
xlabel('Tiempo')
ylabel('Velocidad Articulación 6')
grid minor
figure(4)
title('Indices Articulares')
plot(time,kk1,'b','LineWidth',1)
legend('Articulacion 1')
hold on
axis([0,11,0,2])
figure(4)
plot(time,kk2,'r','LineWidth',1)
legend('Articulacion 2')
hold on
axis([0,11,0,2])
figure(4)
plot(time,kk3,'m','LineWidth',1)
legend('Articulacion 3')
hold on
axis([0,11,0,2])
figure(4)
plot(time,kk4,'k','LineWidth',1)
legend('Articulacion 4')
hold on
axis([0,11,0,2])
figure(4)
plot(time,kk5,'g','LineWidth',1)
legend('Articulacion 5')
hold on
axis([0,11,0,2])% plot(time(np),Ww,'g')
figure(4)
plot(time,kk6,'c','LineWidth',1)
legend('Articulacion 1','Articulacion 2','Articulacion 3','Articulacion 4','Articulacion
5','Articulacion 6')
hold on
axis([0,11,0,2])% plot(time(np),Ww,'g')
grid minor
figure(5)
title('Indices de manipulabilidad')
plot(time,W1,'b','LineWidth',1)
legend('Indice de manipulabilidad (posicion)','Indice de manipulabilidad (orientacion)')
hold on
grid minor
axis([0,10,0,1])
figure(5)
plot(time,W22,'r','LineWidth',1)
% legend('Indice de manipulabilidad (orientacion)')
hold on
grid minor
axis([0,10,0,1])