Vous êtes sur la page 1sur 4

Mecanismos: Practica Calificada

Alumno :Hugo Alfredo Salazar Monterroso

En Matlab:
clc,clear
clear
AM=[0,0,0,0,0,0,0,0,0,0,0];
chi=0;
% a+b-c-d=0
a=0.15; %longitud del eslabon 2
b=0.2121; %longitud del eslabon 3
c=0.2898; %longitud al eslabon 4
d=0.2049; %longitud d eslabon CB
f=0.1449; %longitud del eslabon 6
g=0.1449; %longitud al eslabon 6
t2=0.*pi/180;
t3=150.*pi/180;
t4=0.*pi/180;
t5=90.*pi/180;
t6=180.*pi/180;
w2=10;
alfa2=1;
for i=1:73
f1=a.*cos(t2)-b.*cos(t3)+c;

f2=a.*sin(t2)-b.*sin(t3);
f3=d.*cos(t3-15*pi/180)-f.*cos(t6)-g.*cos(t5);
f4=d.*sin(t3-15*pi/180)-f.*sin(t6)-g.*sin(t5);
A=[b.*sin(t3) -1 0 0;
-b.*cos(t3) 0 0 0;
-d*sin(t3) 0 f*sin(t6) -cos(t6);
d*cos(t3) 0 -f*cos(t6) -sin(t6)];
B=-[a.*cos(t2)-b.*cos(t3)+c;a.*sin(t2)-b.*sin(t3);
d.*cos(t3-15*pi/180)-f.*cos(t6)-g.*cos(t5);d.*sin(t3-15*pi/180)f.*sin(t6)-g.*sin(t5)];
x=inv(A)*B;
vt3=x(1);
vc=x(2);
vt6=x(3);
vf=x(4);
e=0.01;
while abs(vt3)>e & abs(vt6)>e
t3=t3+vt3;% variacion de tetha 3 =vt3
c=c+vc;
t6=t6+vt6;% variacion de tetha 6 =vt6
f=f+vf;
f1=a.*cos(t2)-b.*cos(t3)+c;
f2=a.*sin(t2)-b.*sin(t3);
f3=d.*cos(t3-15*pi/180)-f.*cos(t6)-g.*cos(t5);
f4=d.*sin(t3-15*pi/180)-f.*sin(t6)-g.*sin(t5);
A=[b.*sin(t3) -1 0 0;
-b.*cos(t3) 0 0 0;
-d*sin(t3) 0 f*sin(t6) -cos(t6);
d*cos(t3) 0 -f*cos(t6) -sin(t6)];
B=-[a.*cos(t2)-b.*cos(t3)+c;a.*sin(t2)-b.*sin(t3);
d.*cos(t3-15*pi/180)-f.*cos(t6)-g.*cos(t5);d.*sin(t3-15*pi/180)f.*sin(t6)-g.*sin(t5)];
x=inv(A)*B;
vt3=x(1);
vc=x(2);
vt6=x(3);
vf=x(4);
%velocidades w3, vel3, w6, vel6
%f5=-a*w2.*sin(t2)+b*w3*sin(t3)+vel3=0;
%f6=a*w2.*cos(t2)-b*w3*cos(t3)=0;
%f7=-d*w3.*sin(t3-15*pi/180)+f*w6*sin(t6)-vel6*cos(t6)=0;
%f8=d*w3.*cos(t3-15*pi/180)-f*w6*sin(t6)-vel6*sin(t6)=0;
Jv=[b.*sin(t3) -1 0 0;
-b.*cos(t3) 0 0 0;
-d*sin(t3) 0 f*sin(t6) -cos(t6);
d*cos(t3) 0 -f*cos(t6) -sin(t6)];
C=[a*w2*sin(t2);-a*w2*cos(t2);0;0];
Y=inv(Jv)*C;
w3=Y(1);
vel3=Y(2);
w6=Y(3);
vel6=Y(4);
%aceleraciones alfa3 ace3 alfa6 ace6
%f9=-a*alfa2*sin(t2)a*w2^2*cos(t2)+b*alfa3*sin(t3)+b*w3^2*cos(t3)=0;
%f10=a*alfa2*cos(t2)-a*w2^2*sen(t2)b*alfa3*cos(t3)+b*w3^2*sin(t3)=0;
%f11=-d*alfa3*sin(t3-15*pi/180)-d*w3^2*cos(t315*pi/180)+f*alfa6*sin(t6)+f*w6^2*cos(t6)+2*vel6*w6*sin(t6)ace6*cos(t6)=0;

%f12=d*alfa3*cos(t3-15*pi/180)-d*w3^2*sin(t3-15*pi/180)f*alfa5*cos(t6)+f*w6^2*sen(t6)-2*vel6*w6*cos(t6)-ace6*sin(t6)=0;
Ja=[b.*sin(t3) -1 0 0;
-b.*cos(t3) 0 0 0;
-d*sin(t3) 0 f*sin(t6) -cos(t6);
d*cos(t3) 0 -f*cos(t6) -sin(t6)];
D=[a*alfa2*sin(t2)+a*w2^2*cos(t2)-b*w3^2*cos(t3);
-a*alfa2*cos(t2)+a*w2^2*sin(t2)-b*w3^2*sin(t3);
d*w3^2*cos(t3-15*pi/180)-f*w6^2*cos(t6)-2*vel6*w6*sin(t6);
d*w3^2*sin(t3-15*pi/180)-f*w6^2*sin(t6)+2*vel6*w6*cos(t6)];

Z=inv(Ja)*D;
alfa3=Z(1);
ace3=Z(2);
alfa6=Z(3);
ace6=Z(4);
end

M1=[t2*180/pi,t3*180/pi,t6*180/pi,w3,vel3,w6,vel6,alfa3,ace3,alfa6,vel
6];

if chi==0
AM=M1;
chi=1;
else
AM=[AM;M1];
end
t2=t2+5*pi/180;
end
disp (' t2 t3 t6
disp (AM)
t2=AM(:,1);
t3=AM(:,2);
t6=AM(:,3);
w3=AM(:,4);
vel3=AM(:,5);
w6=AM(:,6);
vel6=AM(:,7);
alfa3=AM(:,8);
ace3=AM(:,9);
alaf6=AM(:,10);
ace6=AM(:,11);

Resultados:

w3

vel3

w6

vel6

alfa3

ace3

alfa6

ace6 ')

Vous aimerez peut-être aussi