您好,欢迎访问三七文档
当前位置:首页 > 电子/通信 > 综合/其它 > 凸轮的matlab绘制
《机械原理》课程设计报告附2:习题4-3解答(1)凸轮的理论廓线方程:002200()sincos()cossinxsseyssesre式中(2)从动件在不同阶段的位移方程:2sin()[0,120]230[120,150][150,300]'0[300,360]hhshh推程阶段远休止阶段回程阶段近休止阶段(3)求解凸轮的实际廓线:2222arar00x=x-rcosy=y-rsinsincos()cossinsin()sincoscosdxddxdydddyddxdydddxdsssedddydsssedd式中而《机械原理》课程设计报告同样,由于位移s与从动件所处的运动阶段有关,所以有:2cos()[0,120]0[120,150]s[150,300]'0[300,360]hhdhd推程阶段远休止阶段回程阶段近休止阶段(4)代入已知条件,并用Matlab语言编程求解,编程代码如下:disp'********偏置直动滚子从动件盘形凸轮设计********'disp'已知条件:'disp'凸轮作逆时针方向转动,从动件偏置在凸轮轴心的右边'disp'从动件在推程作摆线运动规律运动,在回程作等速运动规律运动'ro=50;rr=10;e=12;h=30;ft=120;fs=30;fh=150;fprintf(1,'基圆半径ro=%3.4fmm\n',ro)fprintf(1,'滚子半径rr=%3.4fmm\n',rr)fprintf(1,'推杆偏距e=%3.4fmm\n',e)fprintf(1,'推程行程h=%3.4fmm\n',h)fprintf(1,'推程运动角ft=%3.4f度\n',ft)fprintf(1,'远休止角fs=%3.4f度\n',fs)fprintf(1,'回程运动角fh=%3.4f度\n',fh)hd=pi/180;du=180/pi;so=sqrt(ro^2-e^2);d1=ft+fs;d2=ft+fs+fh;disp''disp'计算过程和输出结果:'disp'1-1推程(摆线运动规律运动)'s=zeros(ft);ds=zeros(ft);d2s=zeros(ft);forf=1:fts(f)=h*f/ft-h*sin(2*pi*f/ft)/(2*pi);s=s(f);ds(f)=h/(ft*hd)-h/(ft*hd)*cos(2*pi*f/ft);ds=ds(f);d2s(f)=2*pi*h/(ft*hd)^2*sin(2*pi*f/ft);d2s=d2s(f);enddisp'1-2回程(等速运动规律运动)'s=zeros(fh);ds=zeros(fh);d2s=zeros(fh);forf=d1:d2s(f)=h-h*(f-150)/fh;s=s(f);ds(f)=-h/(fh*hd);ds=ds(f);d2s(f)=0;d2s=d2s(f);enddisp'2-计算凸轮理论廓线与实际廓线的直角坐标'《机械原理》课程设计报告n=360;s=zeros(n);ds=zeros(n);r=zeros(n);rp=zeros(n);x=zeros(n);y=zeros(n);dx=zeros(n);dy=zeros(n);xx=zeros(n);yy=zeros(n);xa=zeros(n);ya=zeros(n);xxa=zeros(n);yya=zeros(n);forf=1:niff=fts(f)=h*f/ft-h*sin(2*pi*f/ft)/(2*pi);s=s(f);ds(f)=h/(ft*hd)-h/(ft*hd)*cos(2*pi*f/ft);ds=ds(f);elseiffft&f=d1s=h;ds=0;elseiffd1&f=d2s(f)=h-h*(f-150)/fh;s=s(f);ds(f)=-h/(fh*hd);ds=ds(f);elseiffd2&f=ns=0;ds=0;endxx(f)=(so+s)*sin(f*hd)+e*cos(f*hd);x=xx(f);yy(f)=(so+s)*cos(f*hd)-e*sin(f*hd);y=yy(f);dx(f)=(ds-e)*sin(f*hd)+(so+s)*cos(f*hd);dx=dx(f);dy(f)=(ds-e)*cos(f*hd)-(so+s)*sin(f*hd);dy=dy(f);xxa(f)=x+rr*dy/sqrt(dx^2+dy^2);xa=xxa(f);yya(f)=y-rr*dx/sqrt(dx^2+dy^2);ya=yya(f);r(f)=sqrt(x^2+y^2);rp(f)=sqrt(xa^2+ya^2);enddisp'2-1推程(摆线运动规律运动)'disp'凸轮转角理论x理论y实际x实际y'forf=10:10:ftnu=[fxx(f)yy(f)xxa(f)yya(f)];disp(nu)enddisp'2-2回程(等速运动规律运动)'disp'凸轮转角理论x理论y实际x实际y'forf=d1:10:d2nu=[fxx(f)yy(f)xxa(f)yya(f)];disp(nu)enddisp'2-3凸轮轮廓向径'disp'凸轮转角理论r实际r'forf=10:10:nnu=[fr(f)rp(f)];disp(nu)end《机械原理》课程设计报告disp'绘制凸轮的理论轮廓和实际轮廓:'plot(xx,yy,'r-.')%理论轮廓(红色,点划线)axis([-(ro+h-10)(ro+h+10)-(ro+h+10)(ro+rr+10)])%横轴和纵轴的下限和上限axisequal%横轴和纵轴的尺度比例相同text(ro+h+3,0,'X')%标注横轴text(0,ro+rr+3,'Y')%标注纵轴text(-5,5,'O')%标注直角坐标系原点title('偏置直动滚子从动件盘形凸轮设计')%标注图形标题holdon;%保持图形plot([-(ro+h)(ro+h)],[00],'k')%横轴(黑色)plot([00],[-(ro+h)(ro+rr)],'k')%纵轴(黑色)plot([ee],[0(ro+rr)],'k--')%初始偏置位置(黑色,虚线)ct=linspace(0,2*pi);%画圆的极角变化范围plot(ro*cos(ct),ro*sin(ct),'g')%基圆(绿色)plot(e*cos(ct),e*sin(ct),'c--')%偏距圆(蓝绿色,虚线)plot(e+rr*cos(ct),so+rr*sin(ct),'y')%滚子圆(黄色)plot(xxa,yya,'b')%实际轮廓(蓝色)(5)求解凸轮理论廓线和实际廓线坐标值如下:********偏置直动滚子从动件盘形凸轮设计********已知条件:凸轮作逆时针方向转动,从动件偏置在凸轮轴心的右边从动件在推程作摆线运动规律运动,在回程作等速运动规律运动基圆半径ro=50.0000mm滚子半径rr=10.0000mm推杆偏距e=12.0000mm推程行程h=30.0000mm推程运动角ft=120.0000度远休止角fs=30.0000度回程运动角fh=150.0000度计算过程和输出结果:1-1推程(摆线运动规律运动)1-2回程(等速运动规律运动)计算凸轮理论廓线与实际廓线的直角坐标2-1推程(摆线运动规律运动)凸轮转角理论x理论y实际x实际y10.000020.265945.828416.567436.537520.000028.173442.320023.853633.301230.000036.024338.395931.421629.518140.000044.162533.962239.146025.311550.000052.643028.507846.778820.407760.000061.026121.377053.915914.3453《机械原理》课程设计报告70.000068.403612.126759.93686.805780.000073.65330.801964.1128-2.194690.000075.8133-12.000065.8180-12.3064100.000074.4098-25.305664.6887-22.9602110.000069.5921-38.099660.7079-33.5092120.000062.0165-49.661654.2107-43.41102-2回程(等速运动规律运动)凸轮转角理论x理论y实际x实际y150.000028.8770-74.016525.2424-64.7004160.000014.9014-76.027014.3851-66.0404170.00001.1258-75.49002.4259-65.5749180.0000-12.0000-72.5386-8.9229-63.0238190.0000-24.0666-67.3832-19.3110-58.5864200.0000-34.7179-60.3010-28.4390-52.5180210.0000-43.6616-51.6242-36.0665-45.1192220.0000-50.6772-41.7260-42.0190-36.7223230.0000-55.6208-31.0065-46.1908-27.6786240.0000-58.4280-19.8770-48.5462-18.3440250.0000-59.1126-8.7451-49.1177-9.0659260.0000-57.76351.9999-48.0018-0.1704270.0000-54.538612.0000-45.35248.0487280.0000-49.656720.9409-41.372315.3401290.0000-43.386528.5615-36.303121.5028300.0000-36.035734.6616-30.414126.39132-3凸轮轮廓向径凸轮转角理论r实际r10.000050.109440.118220.000050.840240.962930.000052.649843.111940.000055.711446.616350.000059.866351.036660.000064.661955.791770.000069.470260.322080.000073.657764.150490.000076.757166.9586100.000078.595168.6426110.000079.338769.3420120.000079.450169.4501130.000079.450169.4501140.000079.450169.4501150.000079.450169.4501160.000077.473667.5889170.000075.498465.6197180.000073.524563.6524《机械原理》课程设计报告190.000071.552161.6869200.000069.581259.7237210.000067.612157.7628220.000065.644855.8044230.000063.679553.8489240.000061.716551.8964250.000059.755949.9474260.000057.798148.0021270.000055.843246.0611280.000053.891644.1247290.000051.943842
本文标题:凸轮的matlab绘制
链接地址:https://www.777doc.com/doc-6287515 .html