哈工大机械原理大作业-凸轮结构设计 下载本文

哈尔滨工业大学课程设计说明书

理论轮廓与实际轮廓200理论轮廓线150实际轮廓线10050y/mm0-50-100-150-200-200-150-100-50x/mm050100150

Matlab程序如下:

w = pi/3;

p1 = 0:(pi/1000):(2*pi/3); p2 = (2*pi/3):(pi/1000):pi; p3 = pi:(pi/1000):(5*pi/4);

p4 = (5*pi/4):(pi/1000):(3*pi/2); p5 = (3*pi/2):(pi/1000):(2*pi);

s1 = 25 * (1 - cos(3*p1./2)); s2 = 50;

s3 = 50 - 400/(pi^2).*(p3 - pi).^2; s4 = 400/(pi^2)*(3*pi/2-p4).^2; s5 = 0; figure(1)

plot(p1,s1,'b',p2,s2,'b',p3,s3,'b',p4,s4,'b',p5,s5,'b')

哈尔滨工业大学课程设计说明书

axis([0 2*pi -5 55]); gridon

xlabel('转角/rad') ylabel('位移/(mm)') title('位移与转角曲线')

v1 = 75/2 * w * sin(3*p1./2); v2 = 0;

v3 = - 800 * w/(pi^2)*(p3 - pi); v4 = - 800 * w/(pi^2)*(3*pi/2-p4); v5 = 0; figure(2)

plot(p1,v1,'b',p2,v2,'b',p3,v3,'b',p4,v4,'b',p5,v5,'b') axis([0 2*pi -80 50]); gridon

xlabel('转角/rad') ylabel('速度/(mm/s)') title('速度与转角曲线')

a1 = 225/4 * w^2 * cos(3*p1./2); a2 = 0;

a3 = - 800 * w^2/(pi^2); a4 = 800 * w^2/(pi^2); a5 = 0; figure(3)

plot(p1,a1,'b',p2,a2,'b',p3,a3,'b',p4,a4,'b',p5,a5,'b') axis([0 2*pi -100 100]); gridon

xlabel('转角/rad')

ylabel('加速度/(mm/s^2)') title('加速度与转角曲线')

z1 = 75/2 * sin(3*p1./2); z2 = 0;

z3 = - 800 /(pi^2)*(p3 - pi); z4 = - 800 /(pi^2)*(3*pi/2-p4); z5 = 0;

xa=-100:0.01:100;

ya=xa.*-tan(55*pi/180)-34; xb=-100:0.01:100;

yb=xb.*tan(25*pi/180)-9; xc=-100:0.01:0;

yc=xc.*tan(55*pi/180); figure(4)

哈尔滨工业大学课程设计说明书

plot(-z1,s1,'b',-z2,s2,'b',-z3,s3,'b',-z4,s4,'b',-z5,s5,'b',xa,ya,'g',xb,yb,'g',xc,yc,'g'); axis([-60 90 -70 60]); gridon

xlabel('ds/dφ mm/rad') ylabel('s / mm') title('ds/dφ-s')

s0=120; e=50;

r0=sqrt(s0^2+e^2);

x1=(s0+s1).*cos(p1)-e*sin(p1); y1=(s0+s1).*sin(p1)+e*cos(p1); x2=(s0+s2).*cos(p2)-e*sin(p2); y2=(s0+s2).*sin(p2)+e*cos(p2); x3=(s0+s3).*cos(p3)-e*sin(p3); y3=(s0+s3).*sin(p3)+e*cos(p3); x4=(s0+s4).*cos(p4)-e*sin(p4); y4=(s0+s4).*sin(p4)+e*cos(p4); x5=(s0+s5).*cos(p5)-e*sin(p5); y5=(s0+s5).*sin(p5)+e*cos(p5); figure(5)

plot(x1,y1,'r',x2,y2,'r',x3,y3,'r',x4,y4,'r',x5,y5,'r'); axis([-200 150 -200 200]); gridon

xlabel('x/mm'); ylabel('y/mm');

title('理论轮廓');

v=[];

tx1=diff(x1,p1); txx1=diff(x1,p1,2); yx1=diff(y1,p1); yxx1=diff(y1,p1,2);

k1=subs(abs((tx1*yxx1-txx1*yx1)/(tx1^2+yx1^2)^1.5),{x1},{xx1}); v=[v,1/k1];

tx2=diff(x2,p2); txx2=diff(x2,p2,2); yx2=diff(y2,p2); yxx2=diff(y2,p2,2);

k2=subs(abs((tx2*yxx2-txx2*yx2)/(tx2^2+yx2^2)^1.5),{x2},{xx2}); v=[v,1/k2];

tx3=diff(x3,p3); txx3=diff(x3,p3,2);

哈尔滨工业大学课程设计说明书

yx3=diff(y3,p3); yxx3=diff(y3,p3,3);

k3=subs(abs((tx3*yxx3-txx3*yx3)/(tx3^2+yx3^2)^1.5),{x3},{xx3}); v=[v,1/k3];

tx4=diff(x4,p4); txx4=diff(x4,p4,2); yx4=diff(y4,p4); yxx4=diff(y4,p4,2);

k4=subs(abs((tx4*yxx4-txx4*yx4)/(tx4^2+yx4^2)^1.5),{x4},{xx4}); v=[v,1/k4];

tx5=diff(x5,p5);

txx5=diff(x5,p5,2); yx5=diff(y5,p5); yxx5=diff(y5,p5,2);

k5=subs(abs((tx5*yxx5-txx5*yx5)/(tx5^2+yx5^2)^1.5),{x5},{xx5}); v=[v,1/k5]; min(v)

rr=20;

A1=v1./w-e; B1=s0+s1;

X1=x1-rr*(A1.*sin(p1)+B1.*cos(p1))./(A1.^2+B1.^2).^(1/2); Y1=y1+rr*(A1.*cos(p1)-B1.*sin(p1))./(A1.^2+B1.^2).^(1/2); A2=v2./w-e; B2=s0+s2;

X2=x2-rr*(A2.*sin(p2)+B2.*cos(p2))./(A2.^2+B2.^2).^(1/2); Y2=y2+rr*(A2.*cos(p2)-B2.*sin(p2))./(A2.^2+B2.^2).^(1/2); A3=v3./w-e; B3=s0+s3;

X3=x3-rr*(A3.*sin(p3)+B3.*cos(p3))./(A3.^2+B3.^2).^(1/2); Y3=y3+rr*(A3.*cos(p3)-B3.*sin(p3))./(A3.^2+B3.^2).^(1/2); A4=v4./w-e; B4=s0+s4;

X4=x4-rr*(A4.*sin(p4)+B4.*cos(p4))./(A4.^2+B4.^2).^(1/2); Y4=y4+rr*(A4.*cos(p4)-B4.*sin(p4))./(A4.^2+B4.^2).^(1/2); A5=v5./w-e; B5=s0+s5;

X5=x5-rr*(A5.*sin(p5)+B5.*cos(p5))./(A5.^2+B5.^2).^(1/2); Y5=y5+rr*(A5.*cos(p5)-B5.*sin(p5))./(A5.^2+B5.^2).^(1/2); figure(6)

plot(x1,y1,'r',x2,y2,'r',x3,y3,'r',x4,y4,'r',x5,y5,'r',X1,Y1,'g',X2,Y2,'g',X3,Y3,'g',X4,Y4,'g',X5,Y5,'g'); axis([-200 150 -200 200]); gridon

xlabel('x/mm');

哈尔滨工业大学课程设计说明书

ylabel('y/mm');

title('理论轮廓与实际轮廓');