Documentos de Académico
Documentos de Profesional
Documentos de Cultura
A=cosd(Th2)-k1-k2*cosd(Th2)+k3;
B=-1*(2*sind(Th2));
C=k1-(k2+1)*cosd(Th2)+k3;
D=cosd(Th2)-k1+k4*cosd(Th2)+k5;
E=-1*2*sind(Th2);
F=k1+(k4-1)*cosd(Th2)+k5;
S1=(-B-sqrt(B*B-4*A*C))/(2*A);
S2=(-B+sqrt(B*B-4*A*C))/(2*A);
S11=(-E-sqrt(E*E-4*D*F))/(2*D);
S22=(-E+sqrt(E*E-4*D*F))/(2*D);
Bu=b*cosd(Th31);
Bv=b*sind(Th31);
Cu=c*cosd(Th41);
Cv=c*sind(Th41);
% ANALIIS DE VELOCIDAD
Omega2=10*pi/3;
Omega3=(a*Omega2*sind(Th41-Th2))/(b*sind(Th31-
Th41));
Omega4=(a*Omega2*sind(Th2-Th31))/(c*sind(Th41-
Th31));
VAx= -a*Omega2*sind(Th2);
VAy= a*Omega2*cosd(Th2);
VBAx=-b*Omega3*sind(Th31);
VBAy= b*Omega3*cosd(Th31);
VBx= -c*Omega4*sind(Th41);
VBy= c*Omega4*cosd(Th41);
VPx= -ap*Omega3*sind(Th31+Th311);
VPy= ap*Omega3*cosd(Th31+Th311);
vx=[Ax,Bx,Bx];
vy=[Ay,By,By];
uV=[VAx,VBAx,VBx];
vV=[VAy,VBAy,VBy];
VXc=[Ax,Bu,d,Cu];
VYc=[Ay,Bv,0,Cv];
% Graficas y trayectorias.
figure(1)
plot([0 d],[0 0],'-ow',[0 Ax],[0 Ay],'or-',...
[Ax Bx],[Ay By],'-ok',Pint(:,1),Pint(:,2),'m.',...
[Bx d],[By 0],'og-',[Ax Px1],[Ay Py1],'k-',[Bx
Px1],[By Py1],'ok-','linewidth',2)
hold on
quiver(Ax,Ay,VAx,VAy,.2,'b','filled','linewidth',2);
quiver(Px1,Py1,VPx,VPy,.2,'b','filled','linewidth',2);
quiver(Bx,By,VBx,VBy,.2,'b','filled','linewidth',2);
% Texto
text(Ax+.1,Ay+.1,'A')
text(Bx+.1,By+.1,'B')
text(Px1+.1,Py1+.1,'P')
grid on
axis ([-4 6 -5 5]);
title('MECANISMO DE 4L')
axis square;
pause(0.05);
k=k+1;
hold off
end
%%
figure(2)
plot(VAn(:,1), VAc(:,1:3),'*-','linewidth',.5)
grid on
xlabel('\theta_2')
ylabel('Velocidad angular rad s^{-1}')
legend('w_2','w_3','w_4')
title('\theta_2 vs w_2, w_3, w_4')
hold on
figure(3)
plot(VAn(:,1),VAn(:,2:3),'*-','linewidth',.5)
grid on
xlabel('\theta_2')
ylabel('\theta_3 , \theta_4')
legend('\theta_2','\theta_3','\theta_4')
title('\theta_2 vs \theta_3, \theta_4')
hold on
figure(4)
plot(VAn(:,1),VV(:,1:3),'*-','linewidth',.5)
xlabel('\theta_2')
ylabel('Velocidad lineal m/s')
legend('V_A','V_B','V_P')
title('\theta_2 vs V_A, V_B, V_P')
grid on