还剩6页未读,继续阅读
文本内容:
附录牛头刨床主运动机构程序由主程序和子函数两MATLAB six_bar_main six_bar部份组成主程序文件
1.six_bar_main输入已知数据%
1.clear;11=
0.125;13=
0.600;14=
0.150;16=
0.275;161=
0.575;omegal=l;alpha1=0;hd=pi/180;du=180/pi;.调用子函数计算牛头刨床机构位移,角速度,角加速度%2six_bar forn1=1:459;theta ln1=-2*pi+
5.8199+n1-1*hd;11=[11,13,14,16,161];[theta,omega,alpha]=six_barthetalnl,omegal,alphal,11;s3nl=thetal;theta3n l=theta2;theta4nl=theta3;sEnl=theta4;v2nl=omegal;omega3n l=omega2;omega4n l=omega3;vEnl=omega4;a2nl=alphal;alpha3n l=alpha2;alpha4n l=alpha3;页脚.aEnl=alpha4;end.位移、角速度、角加速度、和牛头刨床图形输出%3figure3;nl=l:459;t=n1-1*2*pi/360;%绘角位移及位移线图subplot2,2,l;plott,theta3*du/r-J;grid on;hold on;axis auto;[haxes,hlinel,hline2]=plotyyt,theta4*du,t,sE;grid on;hold on;时间xlabelC/saxeshaxesl;角位移ylabel Acircaxeshaxes2;位移ylabel/mhold on;grid on;text
1.15,-
0.15/\theta_3!text
3.40,
0.27/\theta_4,text
2.25,-
0.15,s_E%绘角速度及速度线图subplot2,2,2;;plott,omega3,T-1grid on;hold on;axis auto;fhaxes,hlinel,hline2]=plotyyt,omega4,t,vE;grid on;hold on;时间xlabel/s axeshaxesl;,角速度八ylabel/rad\cdots{-1},axeshaxes2;速度八ylabel/m\cdots{-1}hold on;grid on;text
3.1,
0.35/\omega_3,text
2.1,
0.1/\omega_4,text
5.5,
0.45,v_E;%绘角加速度及加速度线图subplot2,2,3plott,alpha3/r-.*;grid on;hold on;axis auto;[haxes,hlinel,hline2]=plotyyt,alpha4,t,aE;grid on;hold on;时间xlabel/saxeshaxesl;角加速度八ylabel/rad\cdots{-2},axeshaxes2;力口速度八{ylabel/m\cdots-2}hold on;grid on;;text L5,
0.3\alpha_3text
3.5,.51,\alpha_4text
1.
50.11;a_E!%牛头刨床机构subplot2,2,4;nl=20;xl=O;;yi=ox2=s3n1*1000-50*costheta3n1;y2=s3n1*1000-50*sintheta3n1;x3=0;y3=16*1000;x4=l1*1000*costhetalnl;y4=s3n1*1000*sintheta3n1;x5=s3n1*1000+50*costheta3n1;y5=s3n1*1000+50*sintheta3n1;x6=l3*1000*costheta3n1;y6=13*1000*sintheta3n1;x7=13*1000*costheta3n1+14*1000*costheta4n1;y7=13*1000*sintheta3n1+14*1000*sintheta4n1;x8=13*1000*costheta3n1+14*1000^costheta4n l-900;y8=161*1000;x9=13*1000*costheta3n1+14*1000*costheta4n l+600;y9=161*1000;xl0=s3n1*1000-50*costheta3n1;y10=s3nl*l000-50*sintheta3n1;xl l=xl0+25*cospi/2-theta3n1;yll=yl0-25*sinpi/2-theta3n1;xl2=xl1+100*costheta3n1;yl2=yll+l00*sintheta3n1;xl3=x12-50*cospi/2-theta3n1;yl3=yl2+50*sinpi/2-theta3n1;x14=xl0-25*cospi/2-theta3n1;y14=y10+25*sinpi/2-theta3n1;x15=x10;y15=y10;x16=0;;y16=0x17=0;yl7=16*1000;k=l:2;plotxk,yk;hold on;k=3:4;plotxk,yk;hold on;k=5:9;plotxk,yk;hold on;k=10:15;plotxk,yk;hold on;k=16:17;plotxk,yk;hold on;grid on;axis[-56000650];牛头刨床运动仿真,titleCgrid on;xlabelmm,;ylabelmm plotxl,yl o;⑶⑶plotx,y,0;;plotx4,y4o;;plotx6,y6o;plotx7,y7,o;hold on;grid on;xlabelmm ylabelmmaxis[-4006000650];牛头刨床机构运动仿真%4figure2m=moviein20;j=0;for nl=l:5:360j=j+l;elf;xl=0;⑴y=0;x2=s3n1*1000-50*costheta3n1;y2=s3n1*1000-50*sintheta3n1;x3=0;y3=16*1000x4=l1*1000*costheta lnl;y4=s3n1*1000*sintheta3n1;x5=s3n1*1000+50*costheta3n1;y5=s3n1*1000+50*sintheta3n1;x6=13*1000*costheta3n1;y6=13*1000*sintheta3n1;x7=13*1000*costheta3n1+14*1000*costheta4n1;x7=13*1000*costheta3nl+14*1000*costheta4nl;⑺y=13*1000*sintheta3nl+14*1000*sintheta4nl;x8=13*1000*costheta3n1+14*1000*costheta4n l-900;y8=161*1000;x9=13*1000*costheta3n1+14*1000*costheta4n l+600;y9=161*1000;xl0=s3n1*1000-50*costheta3n1;y10=s3n1*1000-50*sintheta3n1;xl l=xl0+25*cospi/2-theta3n1;yl l=yl0-25*sinpi/2-theta3n1;xl2=xl1+100*costheta3n1;yl2=y11+100*sintheta3n1;xl3=x12-50*cospi/2-theta3n1;yl3=y12+50*sinpi/2-theta3n1;xl4=x10-25*cospi/2-theta3n1;y14=y10+25*sinpi/2-theta3n1;x15=x10;y15=y10;x16=0;y16=0;x170;y17=16*1000;k=l:2;plotxk,yk;hold on;k=3:4plotxk,yk;hold on;k=5:9;plotxk,yk;hold on;k=10:15;plotxk,yk;hold on;k=16:17;plotxk,yk;hold on;grid on;axis[-5006000650];牛头刨床运动仿真titlegrid on;xlabel,mm,;ylabel,mm,;;plotxl,yl o;;plotx3,y3o;;plotx4,y4o;;plotx6,y6o;;plotx7,y7o,;axis equal;mj=getframe;endmoviem,子函数文件2six_barfunction[theta,omega,alpha]=six_bar theta1,omega l,alphal,ll11=111;13=112;14=113;16=114;161=115;计算角位移和线位移%1s3=sqrtll*costhetal*ll*costhetal+16+l1*sinthetal*16+11*sinthetal;theta3=acoslPcosthetal/s3;theta4=pi-asin161-13*sintheta3/14;sE=13*costheta3+14*costheta4;thetal=s3;theta2=theta3;theta3=theta4;theta4=sE;计算角速度和线速度%2%从动件位置参数矩阵A=[sintheta3,s3*costheta3,0,0;-costheta3,s3*sintheta3,0,0;0,13*sintheta3,14*theta4,l;0,13*costheta3,14*costheta4,0];原动件位置参数矩阵B=[ll*costhetal;ll*sinthetal;0;0]%omega=A\omega1*B;二⑴;a2alphaalpha3=alpha2;v2=omegal;%滑块的速度omega3=omega2;alpha4=alpha3;构的角速度2%omega4=omega3;aE=alpha4;件的角速度3%vE=omega4构件的速度4%构件5计算角加速度和加速度%3A=[sintheta3,s3*costheta3,0,0;costheta3,-s3*sintheta3,0,0;%从动件位置参数矩阵0,13*sintheta3,14*theta4,l;0,13*costheta3,14*costheta4,0];At=[omega3*costheta3,v2*costheta3-s3*omega3*sintheta3,0,0;-omega3*sintheta3,-v2*sintheta3-s3*omega3*costheta3,0,0;0,13*omega3*costheta3,14*omega4*costheta4,0;013*omega3*sintheta3,-14*omega4*sintheta4,0];Bt=[-ll*omegal*sinthetal;-l1Iomega1*costhetal;0;0];%机构从动件的加速度矩阵alpha=A\-At*omega+omegal*Bt;表示滑块的加速度%a22表示杆件的角加速度%alpha33表示杆件的角加速度%构件的加速度%alpha445。
个人认证
优秀文档
获得点赞 0