大作业(一) 平面连杆机构的运动分析
(题号1—C)
学 院: 机电 学院 班 级: 05021004 学 号:2010301240 姓 名: 曹朋 成 绩: 同 组 者: 邓杰 完成日期 2012 年 12 月 10
日
一 题目及原始数据
平面连杆机构的运动分析题目
使用计算机完成下列平面连杆机构的运动分析。如上图1-1所示为一平面六杆机构。设一直各构件的尺寸如表一所示,又知原动件1以等角速度W1=1rod/s沿逆时针方向回转,试求个从动件的角位移,角速度以及角加速度,及E点的位移,速度及加速度的变化情况。
1. 2.
图1-1
表1 平面六杆机构的尺寸参数 L2`=65.0mm ,XG=153.5mm, YG=41.7mm mm 题号 L 1 L2 L3 L4 L5 L6 a A B C 1-C 29.5 105.6 67.5 87.5 34.4 25.0 60° L1=26.5 L1=24 L1=29.5
二 平面连杆机构运动分析方程
运用Pro ENGINEER软件进行机构运动仿真
由于在接下来第二节的运动分析方程建立的过程当中,会涉及到许多从动件转角,而在算这些转角的过程当中,用到了“正弦定理”、“余弦定理”、“大角减小角来算夹角”等步骤,所以依靠已有的图形软件Pro ENGINEER软件来进行运动仿真,从而分析出会不会出现“以上定理或方法不适用“的情况,比如说出现“小角减大角”。
图2-1,2-2,2-3.为运用Pro ENGINEER软件进行机构杆1 旋转一周运动仿真的结果:
图2-1
图2-2 图2-3
从图2-12-2,2-3中可以清晰的看出,GF做的是整周回转运动,经过分析判断,在任意时刻,本章第二节所列的方程都是成立的,所以可以直接利用这些方程来进行编程。
三 平面连杆机构运动分析
1.位移分析
如原图,首先建立一平面直角坐标系,并且标出各构件矢量以及其方向角。其中共有六个未知量2,3,5,6,SE,7。为求解需建立三个封闭矢量方程,为此需利用三个封闭图形ABCDA、ABCEA和AGFEA,由此可得
l1+l2=l4+l3 l1+l2=SE+l2’ AG+l6=SE+l5
由此得到投影方程
l1cos1l2cos2l4l3cos3 lsinlsinlsin1223312lcoslcosScoslcos(2)1122E72'3 2lsinlsinSsinlsin(2)1122E72'3xGl6cos6SEcos7l5cos5 ylsinSsinlsin66E755G由于上面的式子是一个非线性方程组,直接求解比较困难,在这里借助几何
方法进行求解,在图中连接BD、GE并且设
BDA1,BDC2,GEF3,GEA4,由此得(1),(2),
(3):
①
lBDl1l42l1l4cos1l1sin1lBDsin1222l1arcsin1sin1lBD222lBDl3l22arccos2lBDl3
3122arcsinl3sin3l1sin1l2②
Dl1cos1l2cos2l2'sin2El1sin1l2sin2l2'cos2ED27arctanSE2
DE
③
y222222lGExGyGSE2xGyGSEcosarctanG7xGcos4SExGyGlGE2SElGE22222222SExGyGlGE4arccos2SElGE222lGl5l6E3arccos2llGE5345725734当 SEsin7l5sin5y0时:SEsin7l5sin5yG62arcsinl6Ssin7l5sin5yG否则 6arcsinE l6
2.速度及角速度分析
对投影方程各式对时间取一次导数,并且写成矩阵形式,便得到以下速度方程式
l2sin2l2cos23l2'cos2l2sin20.5l2'sin223l2'sin2l2cos20.5l2'cos2200l2sin2l3cos300000000l5sin5l5cos50000l6sin6l6cos600cos7sin7cos7sin7023SEsin756SEcos7vSESEsin77SEcos70l1sin1l1cos1l1sin11lcos1100
3.加速度及角加速度分析
对投影方程各式对时间取二次导数,并且写成矩阵形式,便得到以下加速度
方程式
l2sin2l2cos23lsin0.5lsinl2'cos2222'223l2'sin2l2cos20.5l2'cos2200l2sin2l3cos300000000l5sin5l5cos50000l6sin6l6cos600cos7sin7cos7sin7023SEsin756SEcos7aSESEsin77SEcos70
2l2cos22l2sin23l2'sin22l2cos220.5l2'cos2223l2'cos22l2sin220.5l2'sin222003l3cos300005l5cos500000027sin727cos727sin727cos703l3sin300006l6cos66l6sin65l5sin50SE7cos7SE7sin7SE7cos7SE7sin7
1l1cos11l1sin11l1cos11。 1l1sin100
四 程序流程框图
①主程序框图
输入:l1、l21、l22、l3、l4、l5、l6、xG、yG、omega1以及beta1n1=1theta1=(n1-1)*180调用子函数crank_rocker计算各从动构件的角位移、角速度以及角加速度,还有指定点E点的位移、速度以及加速度,并且输出图形n1=n1+10n1>361YN结束
②子程序crank_rocker框图
L=sqrt(l1*l1+l4*l4-2*l1*l4*cos(theta1))phi1=asin((l1/L)*sin(theta1));phi2=acos((L*L+l3*l3-l21*l21)/(2*L*l3))phi2<0Ntheta3=pi-phi1-phi2; theta2=asin((l3*sin(theta3)-l1*sin(theta1))/l21);D=l1*cos(theta1)+l21*cos(theta2)+l22*sin(theta2);E=l1*sin(theta1)+l21*sin(theta2)-l22*cos(theta2)SE=sqrt(D*D+E*E);theta7=atan(E/D)M=xG*xG+yG*yG+SE*SE-2*sqrt(xG*xG+yG*yG)*SE*cos(atan(xG/yG)-theta7);N=sqrt(M);P=sin(atan(xG/yG)-theta7);phi4=asin((sqrt(xG*xG+yG*yG)*P)/N);phi3=acos((N*N+l5*l5-l6*l6)/(2*N*l5))Yphi2=phi2+piphi3=phi3+piphi3<0Ntheta5=pi+theta7-phi3-phi4;Z=SE*sin(theta7)+l5*sin(theta5)-yG;theta6=2*pi+asin((SE*sin(theta7)+l5*sin(theta5)-yG)/l6); (z<0)theta6=asin((SE*sin(theta7)+l5*sin(theta5)-yG)/l6);(z≥0)Y调系数矩阵T、U、Tt、Ut结束
五 源程序代码
(1)主程序
********************************************************************* %1.输入已知数据 clear;
l1=26.5;l21=105.6;l3=67.5;l4=87.5;l5=47.2;l6=37.8;l22=65.0;xG=153.5;yG=41.7; omega1=1; beta1=0;
hd=pi/180;du=180/pi;
%2.调用子函数crank_rocker计算各从动构件的角位移、角速度以及角加速度,还有指定点E点的位移、速度以及加速度 for n1=1:361
theta1=(n1-1)*hd;
[theta,omega,beta,x]=crank_rocker(theta1,omega1,beta1,l1,l21,l3,l4,l5,l6,l22,xG,yG); theta2(n1)=theta(1); theta3(n1)=theta(2); theta5(n1)=theta(3); theta6(n1)=theta(4); SE(n1)=theta(5); theta7(n1)=theta(6);
xE(n1)=x(1); yE(n1)=x(2);
omega2(n1)=omega(1); omega3(n1)=omega(2); omega5(n1)=omega(3); omega6(n1)=omega(4); vSE(n1)=omega(5); omega7(n1)=omega(6);
beta2(n1)=beta(1); beta3(n1)=beta(2); beta5(n1)=beta(3); beta6(n1)=beta(4); aSE(n1)=beta(5); beta7(n1)=beta(6); end
%3.各从动构件的角位移、角速度以及角加速度和指定点E点的位移、速度以及加速度的图形输出 figure(1); n1=1:361;
subplot(1,1,1); %绘制角位移、E点位移图 plot(n1,theta2*du,'r','LineWidth',2) grid on; hold on; figure(1); n1=1:361; subplot(1,1,1);
plot(n1,theta3*du,'g','LineWidth',2) grid on; hold on; figure(1);
n1=1:361; subplot(1,1,1);
plot(n1,theta5*du,'m','LineWidth',2) grid on; hold on; figure(1); n1=1:361; subplot(1,1,1);
plot(n1,theta6*du,'--','LineWidth',2) grid on; hold on; figure(1); n1=1:361; subplot(1,1,1);
plot(n1,SE,'-.','LineWidth',2) grid on; hold on; figure(1); n1=1:361; subplot(1,1,1);
plot(n1,theta7*du,'k','LineWidth',2) grid on; hold on;
figure(2);
subplot(1,1,1); plot(n1,omega2,'r','LineWidth',2) hold on; grid on; figure(2);
subplot(1,1,1);
plot(n1,omega3,'g','LineWidth',2) hold on; grid on; figure(2);
subplot(1,1,1);
plot(n1,omega5,'m','LineWidth',2) hold on; grid on; figure(2);
subplot(1,1,1);
plot(n1,omega6,'--','LineWidth',2) hold on; grid on;
%绘制角速度图
figure(2);
subplot(1,1,1);
plot(n1,omega7,'k','LineWidth',2) hold on; grid on;
figure(3);
subplot(1,1,1); %绘制E点速度图 plot(n1,vSE,'-.','LineWidth',2) grid on; hold on;
figure(4);
subplot(1,1,1); plot(n1,beta2,'r','LineWidth',2) grid on; hold on; figure(4);
subplot(1,1,1);
plot(n1,beta3,'g','LineWidth',2) grid on; hold on; figure(4);
subplot(1,1,1);
plot(n1,beta5,'m','LineWidth',2) grid on; hold on; figure(4);
subplot(1,1,1);
plot(n1,beta6,'--','LineWidth',2) grid on; hold on; figure(4);
subplot(1,1,1);
plot(n1,beta7,'k','LineWidth',2) grid on; hold on;
figure(5);
subplot(1,1,1); plot(n1,aSE,'g','LineWidth',2) grid on; hold on;
%绘制角加速度图 %绘制E点加速度图
figure(6);
subplot(1,1,1); %绘制E点轨迹图 plot(xE,yE,'-.','LineWidth',2) grid on; hold on;
(2)子函数crank_rocker
********************************************************************* function[theta,omega,beta,x]=crank_rocker(theta1,omega1,beta1,l1,l21,l3,l4,l5,l6,l22,xG,yG)
%1.计算各从动构件的角位移,还有指定点E点的位移 L=sqrt(l1*l1+l4*l4-2*l1*l4*cos(theta1)); phi1=asin((l1/L)*sin(theta1));
phi2=acos((L*L+l3*l3-l21*l21)/(2*L*l3)); if phi2<0
phi2=phi2+pi; end
theta3=pi-phi1-phi2; %theta3表示构件3转过角度
theta2=asin((l3*sin(theta3)-l1*sin(theta1))/l21); %theta2表示构件2转过角度
D=l1*cos(theta1)+l21*cos(theta2)+l22*sin(theta2); E=l1*sin(theta1)+l21*sin(theta2)-l22*cos(theta2); SE=sqrt(D*D+E*E);
theta7=atan(E/D); %theta7表示构件7转过角度
M=xG*xG+yG*yG+SE*SE-2*sqrt(xG*xG+yG*yG)*SE*cos(atan(yG/xG)-theta7); N=sqrt(M);
P=sin(atan(yG/xG)-theta7);
phi4=pi-asin((sqrt(xG*xG+yG*yG)*P)/N);
%1.计算各从动构件的角位移,还有指定点E点的位移 L=sqrt(l1*l1+l4*l4-2*l1*l4*cos(theta1)); phi1=asin((l1/L)*sin(theta1));
phi2=acos((L*L+l3*l3-l21*l21)/(2*L*l3)); if phi2<0
phi2=phi2+pi; end
theta3=pi-phi1-phi2; %theta3表示构件3转过角度
theta2=asin((l3*sin(theta3)-l1*sin(theta1))/l21); %theta2表示构件2
转过角度
D=l1*cos(theta1)+l21*cos(theta2)+l22*sin(theta2); E=l1*sin(theta1)+l21*sin(theta2)-l22*cos(theta2); SE=sqrt(D*D+E*E);
theta7=atan(E/D); %theta7表示构件7转过角度
M=xG*xG+yG*yG+SE*SE-2*sqrt(xG*xG+yG*yG)*SE*cos(atan(yG/xG)-theta7); N=sqrt(M);
P=SE*SE+M-(xG*xG+yG*yG); phi4=acos(P/(2*SE*N));
phi3=acos((N*N+l5*l5-l6*l6)/(2*N*l5)); if phi3<0
phi3=phi3+pi; end
theta5=pi+theta7-phi3-phi4;
Z=SE*sin(theta7)+l5*sin(theta5)-yG; if Z<0
theta6=2*pi+asin((SE*sin(theta7)+l5*sin(theta5)-yG)/l6); else
theta6=asin((SE*sin(theta7)+l5*sin(theta5)-yG)/l6); end
theta=[theta2; theta3; theta5; theta6; SE; theta7];
xE=SE*cos(theta7); yE=SE*sin(theta7); x=[xE; yE];
%2.计算各从动构件的角速度,还有指定点E点的速度
T=[-l21*sin(theta2),l21*sin(theta3),0,0,0,0; %各从动构件的位置参数,还有指定点E点的位移参数矩阵 -l21*cos(theta2),l3*cos(theta3),0,0,0,0;
-l21*sin(theta2)-0.5*l22*cos(theta2)+0.866*cos(theta2),0,0,0,-cos(theta7),SE*sin(theta7);
l21*cos(theta2)+0.5*l22*cos(theta2)+0.866*l22*sin(theta2),0,0,0,-sin(theta7),-SE*cos(theta7);
0,0,l5*sin(theta5),-l6*sin(theta6),-cos(theta7),SE*sin(theta7); 0,0,l5*cos(theta5),-l6*cos(theta6),sin(theta7),SE*cos(theta7)];
U=[l1*sin(theta1); %原动件的位置参数列阵 l1*cos(theta1); l1*sin(theta1); -l1*cos(theta1); 0; 0];
omega=T\\(omega1*U); %各从动构件的角速度参数,还有指定点E点的速度参数矩阵 omega2=omega(1); omega3=omega(2); omega5=omega(3); omega6=omega(4); vSE=omega(5); omega7=omega(6);
3%.计算各从动件的角加速度,还有指定点E点的加速度
Tt=[omega2*l21*cos(theta2),-omega3*l3*cos(theta3),0,0,0,0; %各从动构件的角速度参数,还有指定点E点的速度参数矩阵
-omega2*l21*sin(theta2),omega3*l3*sin(theta3),0,0,0,0;
omega2*l21*cos(theta2)+0.866*omega2*l22*sin(theta2)+0.5*l21*cos(theta2),0,0,0,2*omega7*sin(theta7),SE*omega7*cos(theta7);
omega2*l21*sin(theta2)-0.866*omega2*l22*cos(theta2)+0.5*omega2*l22*sin(theta2),0,0,0,2*omega7*cos(theta7),-SE*omega7*sin(theta7);
0,0,-omega5*l5*cos(theta5),omega6*l6*cos(theta6),-2*omega7*sin(theta7),-SE*omega7*cos(theta7);
0,0,omega5*l5*sin(theta5),-omega6*l6*sin(theta6),-2*omega7*cos(theta7),SE*omega7*sin(theta7)];
Ut=[omega1*l1*cos(theta1); %原动件的角速度参数列阵
-omega1*l1*sin(theta1); omega1*l1*cos(theta1); omega1*l1*sin(theta1); 0;
0];
beta=T\\(-Tt*omega+beta1*U+omega1*Ut); %各从动构件的角加速度参数,还有指定点E点的加速度参数列阵
六 . 计算结果(以2构件的角速度omega2为例)
omega2 =
Columns 1 through 11
-0.4335 -0.4290 -0.4243 -0.3918 -0.3858 -0.3797
Columns 12 through 22
-0.3736 -0.3673 -0.3609 -0.3217 -0.3151 -0.3085
Columns 23 through 33
-0.3019 -0.2953 -0.2887 -0.2500 -0.2437 -0.2375
Columns 34 through 44
-0.2313 -0.2252 -0.2192 -0.1842 -0.1786 -0.1731
Columns 45 through 55
-0.1676 -0.1622 -0.1569 -0.1261 -0.1211 -0.1162
Columns 56 through 66
-0.1114 -0.1066 -0.1019 -0.0744 -0.0700 -0.0656
Columns 67 through 77
-0.4193 -0.4141 -0.3545 -0.3480 -0.2822 -0.2756 -0.2132 -0.2073 -0.1516 -0.1464 -0.0972 -0.0926 -0.4088 -0.4033 -0.3415 -0.3349 -0.2692 -0.2627 -0.2014 -0.1956 -0.1412 -0.1361 -0.0880 -0.0834 -0.3976 -0.3283 -0.2563 -0.1899 -0.1311 -0.0789
-0.0613 -0.0570 -0.0527 -0.0485 -0.0442 -0.0401 -0.0359 -0.0318 -0.0277 -0.0237 -0.0197
Columns 78 through 88
-0.0157 -0.0117 -0.0078 -0.0038 0.0001 0.0039 0.0078 0.0116 0.0154 0.0192 0.0229
Columns 89 through 99
0.0266 0.0304 0.0341 0.0558 0.0593 0.0629
Columns 100 through 110
0.0664 0.0699 0.0734 0.0939 0.0972 0.1005
Columns 111 through 121
0.1039 0.1072 0.1104 0.1297 0.1329 0.1360
Columns 122 through 132
0.1391 0.1422 0.1453 0.1633 0.1662 0.1691
Columns 133 through 143
0.1720 0.1749 0.1777 0.1943 0.1969 0.1996
Columns 144 through 154
0.2022 0.2048 0.2074 0.2223 0.2247 0.2270
Columns 155 through 165
0.2294 0.2317 0.2339 0.2469 0.2489 0.2510
Columns 166 through 176
0.0377 0.0414 0.0768 0.0803 0.1137 0.1169 0.1483 0.1514 0.1805 0.1833 0.2099 0.2125 0.2362 0.2384 0.0450 0.0486 0.0837 0.0871 0.1202 0.1234 0.1544 0.1574 0.1861 0.1888 0.2150 0.2174 0.2406 0.2427 0.0522 0.0905 0.1266 0.1603 0.1916 0.2199 0.2448
0.2529 0.2549 0.2568 0.2587 0.2605 0.2623 0.2641 0.2658 0.2675 0.2691 0.2707
Columns 177 through 187
0.2723 0.2738 0.2753 0.2767 0.2781 0.2795 0.2808 0.2821 0.2833 0.2845 0.2856
Columns 188 through 198
0.2867 0.2877 0.2887 0.2935 0.2941 0.2947
Columns 199 through 209
0.2952 0.2956 0.2960 0.2971 0.2971 0.2970
Columns 210 through 220
0.2968 0.2965 0.2962 0.2929 0.2921 0.2912
Columns 221 through 231
0.2902 0.2892 0.2881 0.2795 0.2778 0.2760
Columns 232 through 242
0.2741 0.2721 0.2700 0.2555 0.2527 0.2498
Columns 243 through 253
0.2468 0.2437 0.2405 0.2189 0.2149 0.2108
Columns 254 through 264
0.2065 0.2021 0.1976 0.1679 0.1625 0.1570
0.2896 0.2905 0.2964 0.2966 0.2959 0.2954 0.2868 0.2856 0.2679 0.2656 0.2372 0.2338 0.1930 0.1883 0.2913 0.2921 0.2968 0.2970 0.2949 0.2943 0.2842 0.2827 0.2632 0.2607 0.2302 0.2266 0.1834 0.1784 0.2928 0.2971 0.2936 0.2812 0.2582 0.2228 0.1732
Columns 265 through 275
0.1513 0.1455 0.1395 0.1334 0.1272 0.1208 0.1143 0.1076 0.1008 0.0938 0.0867
Columns 276 through 286
0.0795 0.0721 0.0646 0.0569 0.0491 0.0412 0.0331 0.0249 0.0165 0.0080 -0.0006
Columns 287 through 297
-0.0094 -0.0182 -0.0272 -0.0837 -0.0934 -0.1032
Columns 298 through 308
-0.1132 -0.1232 -0.1332 -0.1944 -0.2046 -0.2148
Columns 309 through 319
-0.2250 -0.2352 -0.2453 -0.3042 -0.3136 -0.3228
Columns 320 through 330
-0.3319 -0.3407 -0.3494 -0.3962 -0.4031 -0.4096
Columns 331 through 341
-0.4158 -0.4217 -0.4273 -0.4530 -0.4560 -0.4586
Columns 342 through 352
-0.4608 -0.4626 -0.4640 -0.4645 -0.4633 -0.4618
Columns 353 through 361
-0.4599 -0.4576 -0.4551 -0.4335
-0.0364 -0.0456 -0.1433 -0.1535 -0.2554 -0.2653 -0.3578 -0.3660 -0.4325 -0.4373 -0.4650 -0.4657 -0.4522 -0.4490 -0.0550 -0.0644 -0.1637 -0.1739 -0.2752 -0.2850 -0.3740 -0.3817 -0.4418 -0.4459 -0.4659 -0.4658 -0.4455 -0.4418 -0.0740 -0.1841 -0.2947 -0.3891 -0.4496 -0.4654 -0.4378
>>
七 . 运动线图及分析
E点运动轨迹
图-7-1
由图7-1可知E点做整周回转运动,与仿真结果相符 E点速度
图7-2
E点加速度
图7-3
由图7-2,7-3可知E点是做变加速运动,与仿真结果相似 从动件转角位移及E点位移
图7-4 从动件的角速度
图7-5
从动件的角加速度
图7-6
第七章 体会
在完成本次机械原理平面六杆机构运动分析大作业的过程中,感到了运用计算机进行机构运动分析方便性以及将来运用计算机分析的必然趋势,也学会了对软件MATLAB的熟悉及运用,和用Pro ENGINEER进行仿真技巧,觉得收获甚大
在完成大作业的过程中更清楚的认识到了团队合作的重要性。在这个过程中,我也
体会到了学习的重要性,我懂得了我们还有很多不懂得东西,但是我们不能被此局限住,实践才是我们最好的老师,只有不断的进行实践,提高,才能不断地提高自己,完善自我
第八章 参考书
【1】程怀琛 MATLAB 及其在理工课程中的应用指南 西安电子科技大学出版社
【2】] 孙恒 陈作摸 葛文杰 主编 机械原理第七版 高等教育出版社
因篇幅问题不能全部显示,请点此查看更多更全内容