Está en la página 1de 4

%Analisis de velocidad

Código de análisis A=a*w2(1,T)*sin(theta2);


posición, velocidad y B=b*sin(theta3);
C=cos(theta3);
aceleración de D=a*w2(1,T)*cos(theta2);
E=b*cos(theta3);
mecanismo de 4v F=sin(theta3);
barras en matlab: Vb(1,T)=(D-
b2=7.54; ((E*A)/B))/(F+((E*C)/B));
d=4.7; w3(1,T)=(A+C*Vb(1,T))/(B);
e=6.63; w5(1,T)=-
g=8.26; (b2*cos(theta3)*w3(1,T))/(e*cos(theta
theta2=0; %Angulo teta inicial 5));
theta1=278.5*(pi/180); %Angulo teta Vf(1,T)=-b2*w3(1,T)*sin(theta3)-
inicial e*w5(1,T)*sin(theta5);
w2=40; %Velocidad angular % cOMPONENTES EN X,Y DE LOS
alpha2=-1500; %Aceleración VECTORES DE VELOCIDAD DEL PUNTO A Y
B;
Px=0; x(2,T)=-
Px1=d*cos(theta1); a*w2(1,T)*sin(theta2)+x(1,T);
Py1=d*sin(theta1);
y(2,T)=a*w2(1,T)*cos(theta2)+y(1,T);
Vel=zeros(3,n);
Ace=zeros(4,n); y1(2,T)=Vb(1,T)*sin(theta3)+y(1,T);
x2(2,T)=-
w2=ones(1,n)*w2; b2*w3(1,T)*sin(theta3)+x1(1,T);
alpha2=ones(1,n)*alpha2;
w3=zeros(1,n); y2(2,T)=b2*w3(1,T)*cos(theta3)+y1(1,T
alpha3=zeros(1,n); );
w5=zeros(1,n);
alpha5=zeros(1,n);
Vb=zeros(1,n); %Magnitud de la velocidad de
Ab=zeros(1,n); A,A(deslizamiento),B(deslilizamiento)
Vf=zeros(1,n); Y C(deslilizamiento)
Af=zeros(1,n); Vel(1,T)=a*w2(1,T);
Vel(2,T)=Vb(1,T);
T=1; Vel(3,T)=b2*w3(1,T);
R=1; Vel(4,T)=-Vf(1,T);
while theta2<=gir; A2=-a*w2(1,T)^2*cos(theta2)-
cla a*alpha2(1,T)*sin(theta2)+b*w3(1,T)^2
%Análisis de posición *cos(theta3)+Vb(1,T)*w3(1,T)*sin(thet
b=sqrt(a^2+d^2- a3);
2*a*d*(cos(theta1)*cos(theta2)+sin(th B2=b*sin(theta3);
eta1)*sin(theta2))); %Obtención C2=-cos(theta3);
de b variable D2=-
theta3=acos((a*cos(theta2)- a*w2(1,T)^2*sin(theta2)+a*alpha2(1,T)
d*cos(theta1))/(b)); %Obtención *cos(theta2)+b*w3(1,T)^2*sin(theta3)-
de ttheta3 Vb(1,T)*w3(1,T)*cos(theta3);
theta5=asin((g- E2=-b*cos(theta3);
b2*sin(theta3))/(e)); F2=-sin(theta3);
f=b2*cos(theta3)+e*cos(theta5);
Ab(1,T)=(D2-
%Trayectorias del punto A ((E2*A2)/B2))/(((E2*C2)/B2)-F2);
x(1,T)=a*cos(theta2); %Obtención de Aceleración de la
y(1,T)=a*sin(theta2); manivela (B)
%Trayectorias del punto B alpha3(1,T)=(A2+(C2*Ab(1,T)))/(-
x1(1,T)=b2*cos(theta3)+Px1; B2); %Obtención de
y1(1,T)=b2*sin(theta3)+Py1; Aceleración de la velocidad angular 3
%Trayectorias del punto C %Obtención de Aceleración de la
x2(1,T)=f+Px1; velocidad angular 3
y2(1,T)=g+Py1; alpha5(1,T)=(-
b2*alpha3(1,T)*cos(theta3)+b2*w3(1,T)
^2*sin(theta3)+e*w5(1,T)^2*sin(theta5
))/(e*cos(theta5)); x2(3,T)=e*alpha5(1,T)*sin(theta5)+x1(
Af(1,T)=- 1,T);
b2*alpha3(1,T)*sin(theta3)- y2(3,T)=-
b2*w3(1,T)^2*cos(theta3)- e*alpha5(1,T)*cos(theta5)+y1(1,T);
e*alpha5(1,T)*sin(theta5)-
e*w5(1,T)^2*cos(theta5); x2(4,T)=e*w5(1,T)^2*cos(theta5)+x1(1,
%Componente en x,Y en y de la T);
aceleración tangencial del punto A
x(3,T)=- y2(4,T)=e*w5(1,T)^2*sin(theta5)+y1(1,
a*alpha2(1,T)*sin(theta2)+x(1,T); L);
Axt2(5,T)=x2(3,T)+x2(4,T)-
y(3,T)=a*alpha2(1,T)*cos(theta2)+y(1, x1(1,T);
T); Ayt2(5,T)=y2(3,T)+y2(4,T)-
x(4,T)=- y1(1,T);
a*w2(1,T)^2*cos(theta2)+x(1,T); %componente en X y Y DE LAS
y(4,T)=- ACELERACIONES TANGENCIALES DEL PUNTO
a*w2(1,T)^2*sin(theta2)+y(1,T); C
Axt(5,T)=x(3,T)+x(4,T)-x(1,T);
Ayt(5,T)=y(3,T)+y(4,T)-y(1,T); x(8,T)=Af(1,T)*cos(theta3)+x1(1,T);

y(8,T)=Af(1,T)*sin(theta3)+y1(1,T);
x1(3,T)=b2*alpha3(1,T)*sin(theta3)+x(
1,T); %Magnitud de la aceleracion de A
%ABtx=c*alpha4*cos(t4);
Componente en x, de la aceleración Ace(1,T)=sqrt((a*alpha2(1,T))^2+(a*w2
tangencial del punto B (1,T)^2)^2);
y1(3,T)=- %Magnitud de la aceleracion de B
b2*alpha3(1,T)*cos(theta3)+y(1,T);
%ABty=-c*alpha4*sin(t4); Ace(2,T)=sqrt((b2*alpha3(1,T))^2+(b2*
Componente en y, de la aceleración w3(1,T)^2)^2);
tangencial del punto B %Magnitud de la aceleracion de
DESLIZAMIENTO
x1(4,T)=b2*w3(1,T)^2*cos(theta3)+x(1, Ace(3,T)=Ab(1,T);
T); %ABnx=- %Magnitud de la aceleracion de
c*alpha4*cos(t4); Componente en x, CORIOLIS
de la aceleración normal del punto B Ace(4,T)=Vb(1,T)*w3(1,T);
%Magnitud de la aceleracion de C
y1(4,T)=b2*w3(1,T)^2*sin(theta3)+y(1, DESLIZAMIENTO
T); Ace(5,T)=Af(1,T);
%ABny=c*alpha4*sin(t4); %Graficar los eslabones
Componente en y, de la aceleración plot([Px,x(1,T)],[Py,y(1,T)], 'C-
normal del punto B o','lineWidth',2.5);
Axt1(5,T)=x1(3,T)+x1(4,T)-x(1,T); %Graficar el eslabón 2
Ayt1(5,)=y1(3,T)+y1(4,T)-y(1,T); plot([Px1,x(1,T)],[Py1,y(1,T)],
'C-o','lineWidth',2.5);
%Graficar el eslabón 3
x(6,T)=Ab(1,T)*cos(theta3)+x1(1,T); plot([Px1,x1(1,T)],[Py1,y1(1,T)],
%ADESx Componente en x, de la 'C-o','lineWidth',2.5);
aceleración tangencial del punto B %Graficar el eslabón 3

y(6,T)=Ab(1,T)*sin(theta3)+y1(1,T); plot([x2(1,T),x1(1,T)],[y2(1,T),y1(1,
%ADESy Componente en y, de la T)], 'r-o','lineWidth',2.5);
aceleración tangencial del punto B %Graficar el eslabón 5
%ACORIOLIS en X y en Y
%Grafica Trayectorias del punto A
x(7,T)=Vb(1,T)*w3(1,T)*sin(theta3)+x( y B
1,T); J(8,k)=x(1,T);
y(7,T)=- J(9,k)=y(1,T);
Vb(1,T)*w3(1,T)*cos(theta3)+y(1,T); plot(J(8,:),J(9,:),'--r',
%Componente en x,Y en Y de la 'lineWidth',1.5);
aceleración tangencial del punto BC J1(8,k)=x1(1,T);
J1(9,k)=y1(1,T);
plot(J1(8,:),J1(9,:),'--r', theta2=theta2+incremento;
'lineWidth',1.5); T=T+1;
J2(8,k)=x2(1,T); R=R+1;
J2(9,k)=y2(1,T); drawnow;
plot(J2(8,:),J2(9,:),'--r',
'lineWidth',2); end

%Graficar corredera
plot([x2(1,T)-
2,x2(1,T)+2],[y2(1,T)+1,y2(1,T)+1],[x % Se grafica en forma matricial
2(1,T)+2,x2(1,T)+2],[y2(1,T)+1,y2(1,T de 2x3
)-1],... figure(2)
[x2(1,T)+2,x2(1,T)- title('Aceleracion y velocidades
2],[y2(1,T)-1,y2(1,T)-1],[x2(1,T)- lineales');
2,x2(1,T)-2],[y2(1,T)-1,y2(1,T)+1], subplot(2,3,1)
'b','lineWidth',3); % Se grafica theta2 vs velocidad
plot(T, VA)
%Grafica vector de VELOCIDAD del grid
punto A xlabel('THETA2')
ylabel('Velocidad A')
plot([x(1,T),x(2,T)],[y(1,T),y(2,T)], subplot(2,3,4)
'k','lineWidth',2.5); % Se grafica theta2 vs velocidad
%Grafica vector de VELOCIDAD del plot(T,AA)
punto A (desl.) grid
xlabel('THETA2')
plot([x(1,T),x1(2,T)],[y(1,T),y1(2,T) ylabel('Aceleración A')
], 'k','lineWidth',2.5); subplot(2,3,2)
%Grafica vector de VELOCIDAD del % Se grafica theta2 vs velocidad
punto B plot(T, VB)
grid
plot([x1(1,T),x2(2,T)],[y1(1,T),y2(2, xlabel('THETA2')
T)], 'k','lineWidth',2.5); ylabel('Velocidad B')
%Grafica vector de VELOCIDAD del subplot(2,3,5)
punto B (desli.) % Se grafica theta2 vs velocidad
plot(T,AB)
plot([x2(1,T),x2(1,T)+Vf(1,T)],[y2(1, grid
T),y2(1,T)], 'g','lineWidth',2.5); xlabel('THETA2')
ylabel('Aceleración B')
subplot(2,3,3)
%DETALLES % Se grafica theta2 vs velocidad
txt1 = 'A '; plot(T, VC)
text(x(1,T),y(1,T),txt1,'HorizontalAl grid
ignment','right') xlabel('THETA2')
txt2 = ' B'; ylabel('Velocidad C')
text(x1(1,T),y1(1,T),txt2); subplot(2,3,6)
txt3 = ' VA'; % Se grafica theta2 vs velocidad
text(x(2,T),y(2,T),txt3); plot(T,AC)
txt4 = ' VB'; grid
text(x2(2,T),y2(2,T),txt4); xlabel('THETA2')
txt5 = ' ARA'; ylabel('Aceleración C')
text(Axt(5,T),Ayt(5,T),txt5);
txt6 = ' ARB';
text(Axt1(5,T),Ayt1(5,T),txt6); figure(3)
txt8 = ' C'; title('Aceleracion y velocidades
text(x2(1,T),y2(1,T),txt8); angulares');
txt9 = ' VecDesli'; subplot(2,3,1)
text(x2(1,T)+Vf(1,T),y2(1,T),txt9); % Se grafica theta2 vs velocidad
plot(T, w2)
xlim([-8 12]); grid
ylim([-10 10]); xlabel('THETA2')
grid on ylabel('Velocidad A')
subplot(2,3,4)
% Se grafica theta2 vs velocidad
plot(T,alpha2)
grid
xlabel('THETA2')
ylabel('Aceleración A')
subplot(2,3,2)
% Se grafica theta2 vs velocidad
plot(T, w3)
grid
xlabel('THETA2')
ylabel('Velocidad B')
subplot(2,3,5)
% Se grafica theta2 vs velocidad
plot(T,alpha3)
grid
xlabel('THETA2')
ylabel('Aceleración B')
Análisis de las gráficas de velocidad,
aceleración de los puntos A,B Y C; del
mecanismo de cuatro barras;

También podría gustarte