平面六杆机构的运动分析 (题号 3-C) 指导老师 陈永琴 班 级 041011 学 号 04101042 姓 名 师汉 同组人 戴峰 杨彤 王建雄 1 1、 题目说明 下图为一平面六杆机构。一直各构件的尺寸如下表一,又知原动件1以角速度为1rad/s沿逆时针方向回转,要求个从动件的角位移、角速度、及角加速度以及E点的位移、速度及加速度变化情况。 表一 组号 3-C L1 26.5 L2 105.6 L2’ 65.0 L3 49.0 L4 87.5 L5 48.4 L6 39.0 α 600 (xG)(YG) L4’ L7 153.5 41.7 题目要求: 三人一组计算出原动件从0到2∏变化时(计算点数37)所要求的各运动变量的大小,并绘出运动曲线图及E点的轨迹曲线。 2、题目分析 1) 建立封闭图形: L2- L3= L4 - L1 2 L2 + L2’+ L5 -L6+ L7= L4’- L1 2) 机构运动分析 A.角位移分析 由图形封闭性得: L2cos2L3cos3L4L1cos1L2sin2L3sin3L1sin1 L2cos2L2'cos2a2L5cos5L6cos6L4'L1cos1L2sin2L2'sin2a2L5sin5L6sin6L7L1sin1B.角速度分析 上式对时间求一阶导数,可得速度方程: L2sin22L3sin33L1sin11L2cos22L3cos33L1cos11' LsinLsin(a)LsinLsinLsin222222555666111'LcosL2)2L5cos55L6cos66L1cos11222cos(2化为矩阵形式为: L2sin2L3sin3L2cos2L3cos3L2sin2L2'sina200L2cos2L2cosa2L1sin1Lcos111L1sin1Lcos11C.角加速度分析: 00L5sin5L5cos5203L6sin65L6cos660 3 角速度矩阵对时间求一阶导数,可得加速度矩阵为: L2sin2L3sin3002LcosLcos0022333L2sin2L2'sina20L5sin5L6sin65LcosL'cosa0LcosLcos222556662 2L2cos2L3cos300Lcos2112LsinLsinLsin0022331321L2cos2L2'cosa20L5cos5L6cos6521L1cos12LsinL'sina0LsinLsinLsin22255661126D.E点的运动状态 xExGL6cos6L5cos5位移:yyLsinLsin G6655EvExL6sin66L5sin55速度: vLcosLcosE666555y加速度: 22aLcosLsinLcosEx666666555L5sin5522 aLsinLcosLsinLcosE666666555555y3、 流程图 创建fsolve函数入口 文件function1.m 调用MATLAB系统函数fsolve求解各从动件的角位移分别存至th2,th3,th5,th6。绘制角位移随th1的变化曲线function2.m 4 利用角速度矩阵 W=A\\B,w2(m)=W(1),w3(m)=W(2),w5(m)=W(3),w6(m)=W(4) 绘制角速度随th1的变化曲线function2.m 利用角加速度矩阵求出从动件角加速度 K=A\\(C-B) 绘制角速度随th1的变化曲线function4.m 将以上各参数分别带入E点的位移、速度、加速度解析方程式,进行求解。绘制E点的位移、速度、加速度随th1变化的曲线function5.m,function6.m,function7.m 4、 源程序 a. 求从动件的角位移 9*- 结束 第一个M文件(function1.m) function t=function1(th,th1,l1,l2,l20,l3,l4,l40,l5,l6,l7,a) t=[l2*cos(th(1))-l3*cos(th(2))+l1*cos(th1)-l4; l2*sin(th(1))-l3*sin(th(2))+l1*sin(th1); l2*cos(th(1))+l20*cos(a-th(1))+l5*cos(th(3))-l6*cos(th(4))+l1*cos(th1)-l40; l2*sin(th(1))-l20*sin(a-th(1))+l5*sin(th(3))-l6*sin(th(4))+l1*sin(th1)-l7]; 第二个脚本文件(function2.m) l1=26.5;l2=105.6;l20=65.0;l3=49.0;l4=87.5;l40=153.5;l5=48.4;l6=39.0;l7=41.7;a=pi/3; th1=0:pi/18:2*pi; th2356=zeros(length(th1),4); options=optimset('display','off'); for m=1:length(th1) th2356(m,:)=fsolve('function1',[0.656 1.267 2.309 1.934],options,th1(m),l1,l2,l20,l3,l4,l40,l5,l6,l7,a); end disp(th2356); th2=th2356(:,1); th3=th2356(:,2); th5=th2356(:,3); th6=th2356(:,4); hold on plot(th1,th2,'r:','LineWidth',2.5) plot(th1,th3,'b','LineWidth',2.5) plot(th1,th5,'g-.','LineWidth',2.5) plot(th1,th6,'k--','LineWidth',2.5) hold off 5 grid on title('从动件的角位移') xlabel('{\heta}_{1}(rad)') ylabel('{\heta}_{2}{\heta}_{3}{\heta}_{5}{\heta}_{6},(rad)') legend('{\heta}_{2}','{\heta}_{3}','{\heta}_{5}','{\heta}_{6}','Location','NorthWest') axis([0,2*pi,-2,2*pi]) b.求从动件的角速度 第三个脚本文件(function3.m) w1=1;l1=26.5;l2=105.6;l20=65.0;l3=49.0;l4=87.5;l40=153.5;l5=48.4;l6=39.0;l7=41.7;a=pi/3; for m=1:37 A=[-l2*sin(th2(m)),l3*sin(th3(m)),0,0;... l2*cos(th2(m)),-l3*cos(th3(m)),0,0;... -l2*sin(th2(m))+l20*sin(a-th2(m)),0,-l5*sin(th5(m)),l6*sin(th6(m));... l2*cos(th2(m))+l20*cos(a-th2(m)),0,l5*cos(th5(m)),-l6*cos(th6(m))]; B=[l1*sin(th1(m)),-l1*cos(th1(m)),l1*sin(th1(m)),-l1*cos(th1(m))]'; W=A\\(w1*B); w2(m)=W(1); w3(m)=W(2); w5(m)=W(3); w6(m)=W(4); disp(W) end for m=1:37 W(m,1)=w2(m); W(m,2)=w3(m); W(m,3)=w5(m); W(m,4)=w6(m); end hold on plot(th1,w2,'r:','LineWidth',2.5) plot(th1,w3,'b','LineWidth',2.5) plot(th1,w5,'g-.','LineWidth',2.5) plot(th1,w6,'k--','LineWidth',2.5) hold off grid on title('从动件的角速度') xlabel('{\heta}_{1}(rad)') ylabel('{\\omega}_{2}{\\omega}_{3}{\\omega}_{5}{\\omega}_{6}(rad/s)') legend('{\\omega}_{2}','{\\omega}_{3}','{\\omega}_{5}','{\\omega}_{6}','Location','SouthWest') axis([0,2*pi,-2,5]) c.求从动件的角加速度 第四个脚本文件(function4.m) w1=1;l1=26.5;l2=105.6;l20=65.0;l3=49.0;l4=87.5;l40=153.5;l5=48.4;l6=39.0;l7=41.7;a=pi/3; for m=1:37 A=[-l2*sin(th2(m)),l3*sin(th3(m)),0,0;... l2*cos(th2(m)),-l3*cos(th3(m)),0,0;... -l2*sin(th2(m))+l20*sin(a-th2(m)),0,-l5*sin(th5(m)),l6*sin(th6(m));... l2*cos(th2(m))+l20*cos(a-th2(m)),0,l5*cos(th5(m)),-l6*cos(th6(m))]; B1=-[-l2*cos(th2(m))*w2(m),l3*cos(th3(m))*w3(m),0,0;... -l2*sin(th2(m))*w2(m),l3*sin(th3(m))*w3(m),0,0;... -l2*cos(th2(m))*w2(m)-l20*cos(a-th2(m))*w2(m),0,-l5*cos(th5(m))*w5(m),l6*cos(th6(m))*w6(m);... -l2*sin(th2(m))*w2(m)+l20*sin(a-th2(m))*w2(m),0,-l5*sin(th5(m))*w5(m),l6*sin(th6(m))*w6(m)]; 6 B2=[w2(m),w3(m),w5(m),w6(m)]'; B3=[l1*cos(th1(m))*w1;... l1*sin(th1(m))*w1;... l1*cos(th1(m))*w1;... l1*sin(th1(m))*w1]; K=A\\(B1*B2)+A\\(w1*B3); k2(m)=K(1); k3(m)=K(2); k5(m)=K(3); k6(m)=K(4); disp(K) end for m=1:37 AA(m,1)=k2(m); AA(m,2)=k3(m); AA(m,3)=k5(m); AA(m,4)=k6(m); end hold on plot(th1,k2,'r:','LineWidth',2.5) plot(th1,k3,'b','LineWidth',2.5) plot(th1,k5,'g-.','LineWidth',2.5) plot(th1,k6,'k--','LineWidth',2.5) hold off grid on title('从动件的角加速度') xlabel('{\heta}_{1}(rad)') ylabel('{\\alpha}_{2}{\\alpha}_{3}{\\alpha}_{5}{\\alpha}_{6}(rad/s^{2})') legend('{\\alpha}_{2}','{\\alpha}_{3}','{\\alpha}_{5}','{\\alpha}_{6}','Location','NorthWest') axis([0,2*pi,-15,20]) d.求E点的轨迹 第五个脚本文件(function5.m) l40=153.5;l7=41.7;l5=48.4;l6=39.0; for m=1:37 X(m)=l40+l6*cos(th6(m))-l5*cos(th5(m)); Y(m)=l7+l6*sin(th6(m))-l5*sin(th5(m)); disp(X(m));disp(Y(m)); end plot(X,Y,'b','LineWidth',2.5) axis([110,190,-30,40]) title('E点的轨迹') xlabel('Xe(mm)') ylabel('Ye(mm)') grid on e.求E点的速度 第六个脚本文件(function6.m) l5=48.4;l6=39.0; for m=1:37 A=[-l6*sin(th6(m)),l5*sin(th5(m));... l6*cos(th6(m)),-l5*cos(th5(m))]; B=[w6(m),w5(m)]'; V=A*B; vx(m)=V(1); 7 end V=(vx.^2+vy.^2).^(1/2);disp(V); hold on plot(th1,vx,'r','LineWidth',2.5) plot(th1,vy,'b','LineWidth',2.5) plot(th1,V,'g','LineWidth',2.5) hold off grid on title('E点的速度') xlabel('{\heta}_{1}(rad)') ylabel('Vex Vey V (mm/s)') legend('Vex','Vey','V','Location','NorthWest') axis([0,2*pi,-70,75]) vy(m)=V(2); disp(vx(m));disp(vy(m)); f.求E点的加速度 第七个脚本文件(function7.m) l5=48.4;l6=39.0; for m=1:37 A1=[-l6*sin(th6(m)),l5*sin(th5(m));... l6*cos(th6(m)),-l5*cos(th5(m))]; A2=[k6(m),k5(m)]'; B1=[-l6*cos(th6(m)),l5*cos(th5(m));... -l6*sin(th6(m)),l5*sin(th5(m))]; B2=[w6(m)^2,w5(m)^2]'; J=A1*A2+B1*B2; jx(m)=J(1); jy(m)=J(2); disp(jx(m));disp(jy(m)); end J=[(jx.^2+jy.^2).^(1/2)]'; disp(J); hold on plot(th1,jx,'r','LineWidth',2.5) plot(th1,jy,'b','LineWidth',2.5) plot(th1,J,'g','LineWidth',2.5) hold off grid on title('E点的加速度') xlabel('{\heta}_{1}(rad)') ylabel('{a}_{ex} {a}_{ey} {a}_{e} (mm/s^{2})') legend('{a}_{ex} ','{a}_{ey}','{a}_{e}','Location','SouthWest') axis([0,2*pi,-100,170]) 5、 计算结果和曲线图: a.各从动件的角位移与θ1的关系曲线和计算数据: θ1 0 0 10 0.174533 20 0.349066 θ2 0.2535 0.1928 0.1590 θ3 0.5711 0.5315 0.5540 θ5 1.2563 1.2624 1.2268 θ6 -0.4095 -0.5317 -0.5623 8 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 0.523599 0.698132 0.872665 1.047198 1.22173 1.396263 1.570796 1.745329 1.919862 2.094395 2.268928 2.443461 2.617994 2.792527 2.96706 3.141593 3.316126 3.490659 3.665191 3.839724 4.014257 4.18879 4.363323 4.537856 4.712389 4.886922 5.061455 5.235988 5.410521 5.585054 5.759587 5.934119 6.108652 0.1435 0.1392 0.1417 0.1487 0.1592 0.1723 0.1879 0.2059 0.2262 0.2490 0.2744 0.3025 0.3336 0.3675 0.4042 0.4436 0.4852 0.5284 0.5723 0.6160 0.6580 0.6969 0.7310 0.7581 0.7760 0.7823 0.7740 0.7483 0.7027 0.6357 0.5484 0.4465 0.3424 0.2535 0.6170 0.7031 0.8018 0.9071 1.0156 1.1248 1.2330 1.3388 1.4409 1.5383 1.6297 1.7141 1.7903 1.8574 1.9144 1.9606 1.9954 2.0183 2.0291 2.0275 2.0133 1.9862 1.9457 1.8910 1.8211 1.7348 1.6304 1.5067 1.3628 1.1996 1.0219 0.8416 0.6811 0.5711 1.1609 1.0780 0.9851 0.8846 0.7778 0.6660 0.5524 0.4416 0.3393 0.2501 1.9059 1.8349 1.7768 1.7313 1.6974 1.6731 1.6564 1.6446 1.6350 1.6248 1.6116 1.5938 1.5710 1.5450 1.5224 1.5224 1.6198 2.0950 2.7149 1.1171 1.1422 1.1757 1.2188 1.2563 -0.5391 -0.4976 -0.4595 -0.4371 -0.4376 -0.4646 -0.5178 -0.5927 -0.6817 -0.7752 2.9469 2.8963 2.8569 2.8229 2.7888 2.7503 2.7038 2.6470 2.5783 2.4968 2.4023 2.2949 2.1755 2.0468 1.9152 1.8013 1.7958 2.2656 3.3036 0.5828 0.3407 0.0712 -0.1943 -0.4095 360 6.283185 9 b.各从动件角速度与θ1的关系曲线和计算结果: θ1 ω2 0 -0. 4344 10 -0.2639 20 -0.1327 30 -0.0513 40 -0.0023 0.0290 50 0.0590 60 0.0680 70 0.0826 80 0.0962 90 0.1096 100 0.1234 110 0.1379 120 0.1533 130 0.1694 140 0.1860 150 0.2026 160 ω3 -0.4344 -0.0297 0.2665 0.4400 0.5366 0.5888 0.6152 0.6254 0.6242 0.6143 0.5969 0.5727 0.5419 0.5047 0.4611 0.4115 0.3564 ω5 0.1474 -0.0883 -0.3069 -0.4369 -0.5077 -0.5554 -0.5948 -0.6283 -0.6495 -0.6481 -0.6157 -0.5521 -0.4678 -0.4428 -0.3701 -0.2958 -0.2260 ω6 -0.9924 -0.4110 0.0191 0.2125 0.2433 0.1821 0.0677 -0.0771 -0.2318 -0.3732 -0.4782 -0.5316 -0.5317 -0.3325 -0.2523 -0.2051 -0.1905 10 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 0.2184 0.2325 0.2436 0.2506 0.2520 0.2468 0.2335 0.2108 0.1773 0.1316 0.0719 -0.0033 -0.0948 -0.2023 -0.3221 -0.4446 -0.5501 -0.6055 -0.5702 -0.4344 0.2964 0.2325 0.1656 0.0968 0.0266 -0.0449 -0.1179 -0.1932 -0.2719 -0.3557 -0.4462 -0.5449 -0.6522 -0.7666 -0.8819 -0.9835 -1.0414 -1.0037 -0.8044 -0.4344 -0.1648 -0.1151 -0.0792 -0.0587 -0.0543 -0.0649 -0.0876 -0.1170 -0.1432 -0.1488 -0.0950 0.1470 1.2594 4.0192 2.5398 0.1479 0.1588 0.2257 0.2542 0.1474 -0.2043 -0.2408 -0.2939 -0.3583 -0.2495 -0.5041 -0.5791 -0.6511 -0.7142 -0.7553 -0.7362 -0.5051 0.8061 4.4993 3.6258 -1.2540 -1.4916 -1.5689 -1.4272 -0.2644 11 c.各从动件角加速度与θ1的关系曲线和计算结果 θ1 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 α2 0.9699 0.9042 0.5956 0.3561 0.2196 0.1470 0.1087 0.0889 0.0797 0.0767 0.0776 0.0809 0.0855 0.0903 0.0942 0.0958 0.0937 0.0866 0.0733 0.0531 0.0255 -0.0095 -0.0519 -0.1018 -0.1595 -0.2255 -0.3006 -0.3849 -0.4770 -0.5718 -0.6569 -0.7073 -0.6779 -0.4991 -0.0935 0.5146 0.9699 α3 α5 α6 2.4050 -1.0835 3.20214 2.0767 -1.4393 3.1194 1.3094 -0.9918 1.7454 0.7360 -0.5373 0.5580 0.4026 -0.3188 -0.1367 0.2130 -0.2422 -0.5294 0.0984 -0.2133 -0.7617 0.0224 -0.1655 -0.8785 -0.0335 -0.0674 -0.8716 -0.0791 0.0918 -0.7252 -0.1195 0.2804 -0.4620 -0.1577 0.4378 -0.1486 -0.1949 0.5123 0.1384 -0.2316 0.3957 0.5474 -0.2672 0.4285 0.3671 -0.3007 0.4171 0.1744 -0.3307 0.3783 -0.0027 -0.3559 0.3204 -0.1499 -0.3755 0.2473 -0.2624 -0.3894 0.1626 -3415 -0.3989 0.0713 -0.3922 -0.4060 -0.0193 -0.4206 -0.4133 -0.0995 -0.4313 -0.4237 -0.1562 -0.4250 -0.4399 -0.1710 -0.3946 -0.4641 -0.1136 -0.3172 -0.4977 0.0823 -0.1225 -0.5407 0.6315 0.4530 -0.5902 2.6068 2.7801 -0.6383 12.7820 15.7278 -0.6672 5.5340 11.0206 -0.6413 -13.6792 -11.4941 -0.4949 -0.3316 -1.9177 -0.1192 0.3174 -0.9030 0.6203 0.3669 0.0843 1.6871 -0.1450 1.6397 2.4050 -1.0853 3.2021 12 d.E点运动分析结果: 0 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 θ1 0 0.174533 0.349066 0.523599 0.698132 0.872665 1.047198 1.22173 1.396263 1.570796 1.745329 1.919862 2.094395 2.268928 2.443461 2.617994 2.792527 2.96706 Xe 174.3046 172.4238 170.1713 167.6807 164.8738 161.6988 158.1675 154.3402 150.3092 146.1857 142.0899 138.1438 134.4633 131.1529 128.2997 125.9690 124.2016 123.0126 Ye -19.8534 -24.1896 -24.6581 -22.7124 -19.5563 -15.9271 -12.2539 -8.7887 -5.6779 -2.9976 -0.7713 1.0195 2.4281 3.5361 4.4466 5.2758 6.1437 7.1632 Vex -8.6248 -12.1997 -13.5386 -15.0965 -17.1192 -19.9629 -21.1566 -2206114 -23.4732 -23.6635 -23.1531 -21.9551 -20.1197 -17.7310 -14.9019 -11.7668 -8.4720 -5.1611 Vey -37.7102 -12.5182 5.6239 15.5185 19.9629 21.2266 20.6314 18.9403 16.6351 14.0573 11.4727 9.0999 7.1198 5.6762 4.8694 4.7488 5.3055 6.4692 Ve 38.6839 17.4796 14.6602 21.6501 26.2980 28.6555 29.5509 29.4959 28.7701 27.5240 25.8397 23.7662 21.3423 18.6174 15.6773 12.6889 9.9962 8.2758 aex -35.1393 -10.2559 -7.3747 -10.5266 -12.2671 -11.8315 -9.7997 -6.7383 -3.0636 0.9102 4.9251 8.7551 12.1961 15.0678 17.2225 18.5615 19.0556 18.7628 aey 147.0985 129.7075 78.0565 38.3772 14.7095 0.9899 -7.1073 -11.8242 -14.2705 -15.0173 -14.3923 -12.6258 -9.9258 -6.5201 -2.6775 1.2869 5.0252 8.1864 ae 151.2374 130.1123 78.4041 39.7947 19.1533 11.8728 12.1057 13.6094 14.5957 15.0448 15.2117 15.3643 15.7247 16.4180 17.4294 18.6060 19.7070 20.4710 13 180 190 200 210 220 230 240 250 260 270 280 290 300 310 320 330 340 350 360 3.141593 3.316126 3.490659 3.665191 3.839724 4.014257 4.18879 4.363323 4.537856 4.712389 4.886922 5.061455 5.235988 5.410521 5.585054 5.759587 5.934119 6.108652 6.283185 122.3963 122.3169 122.7430 123.6296 124.9409 126.6566 128.7785 131.3349 134.3801 137.9877 142.2348 147.1694 152.7570 158.8002 164.8468 170.1444 173.7701 175.0806 174.3046 8.4299 10.0122 11.9450 14.2250 16.8096 19.6174 22.5285 25.3837 27.9806 30.0663 31.3263 31.3753 29.7585 25.9888 19.6625 10.7101 -0.1972 -11.2616 -19.8534 -1.9596 1.0419 3.7998 6.3249 8.6815 10.9799 13.3625 15.9842 18.9827 22.4345 26.2843 30.2371 33.6129 35.2113 33.3497 26.4306 14.4321 0.8040 -8.6248 8.1112 10.0546 12.0906 13.9956 15.5443 16.5162 16.6907 15.8348 13.6834 9.9174 4.1537 -4.0293 -14.9733 -28.6334 -43.9678 -58.0233 -65.2381 -58.8565 -37.7102 8.3446 10.1085 12.6737 15.3584 19.8043 19.8328 21.3807 22.4997 23.4003 24.5288 26.6105 30.5044 36.7971 45.3840 55.1849 63.7596 66.8154 58.8620 38.6839 17.8365 16.5157 15.0982 13.8996 13.2116 13.2637 14.1899 15.9876 18.4521 21.0603 22.7881 21.8734 15.6656 0.9965 -23.9979 -55.5350 -78.6527 -71.1130 -35.1393 10.4589 11.6099 11.5061 10.1071 7.4300 3.4973 -1.7181 -8.3401 -16.6171 -26.9055 -39.5543 -54.5700 -70.8534 -84.7776 -88.2107 -67.4662 -8.1076 83.4351 147.0985 20.6768 20.1881 18.9827 17.1858 15.1575 13.7170 14.2935 18.0323 24.8315 34.1678 45.6491 58.7906 72.5646 84.7934 91.4168 87.3832 79.0694 109.6288 151.2374 14 15 6、心得体会 通过这次的机械原理大作业的完成,我学习到了很多东西,也有很多感触。 在完成本次六杆机构大作业的过程中,我体会到了MATLAB在机械分析分析中的重要性,这也是我第一次将过去学过的编程语言应用在实际解题中,确确实实体会到了计算机解题的优越性。同时,在将程序边好的那一刻,看着自己的劳动成果,心里不由得产生一种成就感。 在这个过程中,我也体会到了学习的重要性,我懂得了我们还有很多不懂得东西,但是我们不能被此局限住,我们要不断的学习,查资料,逐渐完善自己的知识面,而不是等待着老师讲解后再去学习,这样我们才能在以后的实践中有所提高。 能完成本次大作业,还得感谢王老师上课时的耐心讲解,以及同学的帮助。 16