Está en la página 1de 8

%DINAMICA DE MAQUINAS

%BIELA MANIVELA

%INGENIERIA MECÁNICA UNSAAC

%ARTURO MACEDO SILVA

clc,clear

clear

AM=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];

chi=0;

format short

a=0.03; % manivela

b=0.07; %longitud del eslabon 3, manivela

d=0.05;

c=0;%descentrado

t1=0*pi/180;%empezamos de cero para que el programa corra desde cero

t2=0*pi/180;

t3=320*pi/180; %arbitrario

r2=0;%centro de gravedad del eslabón 2 en este caso es cero ojo

%LA TAREA TIENE OTRO CENTRO DE GRAVEDAD DE LA MANIVELA

r3=0;

r5=0.02;%centro de gravedad del eslabón 3

r6=0;

w2=-20;%

alfa2=-100;

m2=2;%kg

m3=0.5;

m4=0.5;

Ig2=0.001;%kg-m2

Ig3=0.01;

Ig4=0.002;
for i=1:73 %si desea conocer, por ejemplo, los resultados solo para

t2=60°

%en lugar de 73 coloque 1 y en t2=60°, no graficara nada.Borre el

punto

%y coma de la informacion que necesita y aparacerá en command window

f1=a*cos(t2)+b*cos(t3)-d*cos(t1);

f2=a*sin(t2)+b*sin(t3)-d*sin(t1)+c;

A=[-b*sin(t3) -cos(t1);b*cos(t3) -sin(t1)];

B=-[f1;f2];

X=A\B;

vt3=X(1);

vtd=X(2);

e=0.000001;

while abs(vtd)>e & abs(vt3)>e

d=d+vtd;

t3=t3+vt3;

f1=a*cos(t2)+b*cos(t3)-d*cos(t1);

f2=a*sin(t2)+b*sin(t3)-d*sin(t1)+c;

A=[-b*sin(t3) -cos(t1);b*cos(t3) -sin(t1)];

B=-[f1;f2];

X=A\B;

vt3=X(1);

vtd=X(2);

end

fi=2*pi-t3;

Jv=[-b*sin(t3) -cos(t1);b*cos(t3) -sin(t1)];

B=[a*w2*sin(t2);-a*w2*cos(t2)];

X=Jv\B;
w3=X(1);

vr=X(2);

Ja=[-b*sin(t3) -cos(t1);b*cos(t3) -sin(t1)];

acel=[a*alfa2*sin(t2)+a*w2*w2*cos(t2)+b*w3*w3*cos(t3);

-a*alfa2*cos(t2)+a*w2*w2*sin(t2)+b*w3*w3*sin(t3)];

Y=Ja\acel;

alfa3=Y(1);

ar=Y(2);%aceleración lineal del bloque 4

%TRAYECTORIA Del CG de la biela

rcx=a*cos(t2)+r5*cos(t3)+r6*cos(t3+pi/2);

rcy=a*sin(t2)+r5*sin(t3)+r6*sin(t3+pi/2);

RCC=sqrt(rcx^2+rcy^2);

%VELOCIDAD DEl CG de la biela

vcx=-a*w2*sin(t2)-r5*w3*sin(t3)-r6*w3*cos(t3);

vcy=a*w2*cos(t2)+r5*w3*cos(t3)-r6*w3*sin(t3);

VCC=sqrt(vcx^2+vcy^2);

%ACELERACIONES DE CG del 2 (manivela)

Ag2x=-(r2*alfa2-r3*w2*w2)*sin(t2)-(r3*alfa2+r2*w2*w2)*cos(t2);

Ag2y=(r2*alfa2-r3*w2*w2)*cos(t2)-(r3*alfa2+r2*w2*w2)*sin(t2);

Ag2=(sqrt(Ag2x^2+Ag2y^2));%total

%también se puede de la siguiente manera

%Ag2x=-r2*alfa2*sin(t2)-r2*w2^2*cos(t2)

%Ag2y=r2*alfa2*cos(t2)-r2*w2^2*sin(t2)

%Ag2=sqrt(Ag2x^2+Ag2y^2)

%aceleración de A

Aa2x=-a*alfa2*sin(t2)-a*w2^2*cos(t2);
Aa2y=a*alfa2*cos(t2)-a*w2^2*sin(t2);

Ag3x=-a*alfa2*sin(t2)-a*w2*w2*cos(t2)-(r5*alfa3-r6*w3*w3)*sin(t3)-

(r6*alfa3+r5*w3*w3)*cos(t3);

Ag3y=a*alfa2*cos(t2)-a*w2*w2*sin(t2)+(r5*alfa3-r6*w3*w3)*cos(t3)-

(r6*alfa3+r5*w3*w3)*sin(t3);

%aceleracion del cg del 3

Ag3x=Aa2x+(-r5*alfa3*sin(t3)-r5*w3^2*cos(t3));

Ag3y=Aa2y+(r5*alfa3*cos(t3)-r5*w3^2*sin(t3));

Ag3=sqrt(Ag3x^2+Ag3y^2);

ACC3=sqrt(Ag3x^2+Ag3y^2);%total

m2ag2x=m2*Ag2x;

m2ag2y=m2*Ag2y;

m3ag3x=m3*Ag3x;

m3ag3y=m3*Ag3y;

m4ag4x=m4*ar;%aceleración del bloque 4

Fpx=-10*9.81; %N

Fpy=0;

q2x=r2*cos(t2+pi);

q2y=r2*sin(t2+pi);

p2x=(a-r2)*cos(t2);

p2y=(a-r2)*sin(t2);

q3x=r5*cos(t3-pi);

q3y=r5*sin(t3-pi);

p3x=(b-r5)*cos(t3);

p3y=(b-r5)*sin(t3);

MM=[-1 0 1 0 0 0 0 0;
0 -1 0 1 0 0 0 0;

q2y -q2x -p2y p2x 0 0 0 1;

0 0 -1 0 1 0 0 0;

0 0 0 -1 0 1 0 0;

0 0 q3y -q3x -p3y p3x 0 0;

0 0 0 0 -1 0 0 0;

0 0 0 0 0 -1 1 0];

NN=[m2ag2x;m2ag2y;Ig2*alfa2;m3ag3x;m3ag3y;Ig3*alfa3;(m4*ar-Fpx);-Fpy];

FFF=MM\NN

F21x=FFF(1);

F21y=FFF(2);

F32x=FFF(3);

F32y=FFF(4);

F43x=FFF(5);

F43y=FFF(6);

F14y=FFF(7);

T0=FFF(8);

F21=sqrt(F21x^2+F21y^2);

F32=sqrt(F32x^2+F32y^2);

F43=sqrt(F43x^2+F43y^2);

M1=[t2*180/pi,F21x,F21y,F21,F32x,F32y,F32,F43x,F43y,F43,F14y,T0];

if chi==0

AM=M1;

chi=1;

else

AM=[AM;M1];

end

t2=t2+5*pi/180;
end

disp (' t2 f21X F21Y F21 F32X F32Y

F32 F43X F43y F43 F14y T0');

disp (AM);

T2=AM(:,1);

F21x=AM(:,2);

F21y=AM(:,3);

F21=AM(:,4);

F32x=AM(:,5);

F32y=AM(:,6);

F32=AM(:,7);

F43x=AM(:,8);

F43y=AM(:,9);

F43=AM(:,10);

F14y=AM(:,11);

T0=AM(:,12);

figure (1)

plot (T2,F21x,'r')

grid

title('F21x')

figure (2)

plot(T2,F21y,'r')

grid

title('F21y')

figure (3)

plot(T2,F21,'r' )

grid

title('REACCION EN O2 (F21)')
figure (4)

plot (T2,F32x,'r')

grid

title('F32x')

figure (5)

plot(T2,F32y,'r')

grid

title('F32y')

figure (6)

plot(T2,F32,'r')

grid

title('REACCION EN LA JUNTA A (F32)')

figure (7)

plot(T2,F43x,'r' )

grid

title('F43x')

figure (8)

plot(T2,F43y,'r' )

grid

title('F43y')

figure (9)

plot(T2,F43,'r' )

grid

title('REACCION EN LA JUNTA B (F43)')

figure(10)

plot(T2,F14y,'r')

grid

title('F14y')
figure (11)

plot(T2,T0)

grid

title('torque motriz T0')

figure (12)

plot(T2,F21,T2,F32,T2,F43,'b')

title('reacciones en O2 A y B')

legend('F21','F32','F43')

También podría gustarte