Está en la página 1de 6

Stephanny Cedeño Vázquez. Matricula: 120035997. Ingeniería Mecatrónica. Grupo: M178.

Correo: 120035997@upq.edu.mx

“Mecanismo de 1 grado de libertad”


Stephanny Cedeño Vázquez. Matricula: 120035997. Ingeniería Mecatrónica. Grupo: M178.
Correo: 120035997@upq.edu.mx

% Modelo Cinemático Mecanismo de un grado de


libertad end
clear for i=15:-1:-20
close all v=v+1;
clc theta=deg2rad(i);
%Datos
AB=.9; Ax=-0.5;
BC=0.9; Ay=1.2;
CD=1.1; Bx=Ax+AB*cos(theta);
CE=1.3; By=Ay+AB*sin(theta);
EF=.9; BD=sqrt((Dy-By)^2+(Dx-Bx)^2);
Dx=0.5; alpha=acos((BC^2+CD^2+BD^2)/2*BC*CD);
Dy=0; %MCD
Ax=-05;
Ay=1.2; Cx=Bx+BC*cos(alpha);
Cy=By+BC*sin(alpha);
v=0; Ex=Cx+CE*cos(alpha);
for i=-15:1:20 Ey=Cy+CE*sin(alpha);
v=v+1; Fx=Ex+EF*cos(-45);
theta=deg2rad(i); Fy=Ey+EF*sin(-45);

Ax=-0.5; %vectores para gráficas


Ay=1; VBx(v)=Bx;
Bx=Ax+AB*cos(theta); VBy(v)=By;
By=Ay+AB*sin(theta); VCx(v)=Cx;
BD=sqrt((Dy-By)^2+(Dx-Bx)^2); VCy(v)=Cy;
sigma=acos((BC^2+CD^2+BD^2)/2*BC*CD); VFx(v)=Fx;
%MCD vFy(v)=Fy;

Cx=Bx+BC*cos(sigma); %Velocidad
Cy=By+BC*sin(sigma); dBx=diff(VBx)/0.01;
Ex=Cx+CE*cos(sigma); dBy=diff(VBy)/0.01;
Ey=Cy+CE*sin(sigma); dCx=diff(VCx)/0.01;
Fx=Ex+EF*cos(-45); dCy=diff(VCy)/0.01;
Fy=Ey+EF*sin(-45); dFx=diff(VFx)/0.01;
dFy=diff(vFy)/0.01;
figure(1)
plot([Ax,Bx],[Ay,By],'-g',... figure(1)
[Bx,Cx],[By,Cy],'-g',... plot([Ax,Bx],[Ay,By],'-g',...
[Cx,Dx],[Cy,Dy],'-g',... [Bx,Cx],[By,Cy],'-g',...
[Cx,Ex],[Cy,Ey],'-g',... [Cx,Dx],[Cy,Dy],'-g',...
[Ex,Fx],[Ey,Fy],'-g',... [Cx,Ex],[Cy,Ey],'-g',...
Ax,Ay,'om',... [Ex,Fx],[Ey,Fy],'-g',...
Bx,By,'om',... Ax,Ay,'om',...
Cx,Cy,'om',... Bx,By,'om',...
Ex,Ey,'om',... Cx,Cy,'om',...
Fx,Fy,'om',... Ex,Ey,'om',...
Dx,Dy,'om') Fx,Fy,'om',...
grid on Dx,Dy,'om')
grid minor grid on
xlabel('X (m)') grid minor
ylabel('Y (m)') xlabel('x(m)')
title('Mecanismo de un Grado de ylabel('y(m)')
Libertad') title('Mecanismo de un Grdo de
Libertad')
axis([-1.5 5 -5 5])
Stephanny Cedeño Vázquez. Matricula: 120035997. Ingeniería Mecatrónica. Grupo: M178.
Correo: 120035997@upq.edu.mx

axis([-1.5 5 -5 5]) ylabel('velocidad By')


end legend('velocidad
By','Location','northeast')
figure(2) title ('Velocidad de By')
plot(VBx,'-b');
xlabel('Tiempo(s)') figure(10)
ylabel('Posición Bx') plot(dCx,'-g');
legend('Posición Bx','Location','northeast') xlabel('Tiempo(s)')
title ('Posición de Bx') ylabel('Velocidad Cx')
legend('Velocidad
figure(3) Cx','Location','northeast')
plot(VBy,'-b'); title ('Velocidad de Cx')
xlabel('Tiempo(s)')
ylabel('Posición By') figure(11)
legend('Posición By','Location','northeast') plot(dCy,'-g');
title ('Posición de By') xlabel('Tiempo(s)')
ylabel('Velocidad Cy')
figure(4) legend('Velocidad
plot(VCx,'-g'); Cy','Location','northeast')
xlabel('Tiempo(s)') title ('Velocidad de Cy')
ylabel('Posición Cx')
legend('Posición Cx','Location','northeast') figure(12)
title ('Posición de Cx') plot(dFx,'-m');
xlabel('Tiempo(s)')
figure(5) ylabel('Velocidad Fx')
plot(VCy,'-g'); legend('Velocidad
xlabel('Tiempo(s)') Fx','Location','northeast')
ylabel('Posición Cy') title ('Velocidad de Fx')
legend('Posición Cy','Location','northeast')
title ('Posición de Cy') figure(12)
plot(dFy,'-m');
figure(6) xlabel('Tiempo(s)')
plot(VFx,'-m'); ylabel('Velocidad Fy')
xlabel('Tiempo(s)') legend('Velocidad
ylabel('Posición Fx)') Fy','Location','northeast')
legend('Posición Fx','Location','northeast') title ('Velocidad de Fy')
title ('Posición de Fx')

figure(7)
plot(vFy,'-m');
xlabel('Tiempo(s)')
ylabel('Posición Fy')
legend('Posición Fy','Location','northeast')
title ('Posición de Fy')

figure(8)
plot(dBx,'-b');
xlabel('Tiempo(s)')
ylabel('Velocidad Bx')
legend('Velocidad
Bx','Location','northeast')
title ('Velocidad de Bx')

figure(9)
plot(dBy,'-b');
xlabel('tiempo(s)')
Stephanny Cedeño Vázquez. Matricula: 120035997. Ingeniería Mecatrónica. Grupo: M178.
Correo: 120035997@upq.edu.mx
Stephanny Cedeño Vázquez. Matricula: 120035997. Ingeniería Mecatrónica. Grupo: M178.
Correo: 120035997@upq.edu.mx
Stephanny Cedeño Vázquez. Matricula: 120035997. Ingeniería Mecatrónica. Grupo: M178.
Correo: 120035997@upq.edu.mx

También podría gustarte