1、V3=V3 5 0 KV3=V1V2A12 =-11cos -llsinq 0 0A, =AH+AI2A3 = a3 /4 Yi SA3=A2Aj三、计算程序框四、计算源程序41主程序*输入已知数据clear11=0.0240;12=0.1056;13=0.0675;14=0.0875;15=0.0344;16=0.025;122=0.065;xg=0.1535;yg=0.0417;omegal=l;alphl=0;hd=p/180;du=180/pi;tl=l:10:361;theta2=l:theta3=l:theta5=l:theta6=l:omega2=l:omega3=l:omega
2、5=l:omega6=l:alph2=l:alph3=l:alph5=l:alph6=l:xe=l:ye=l:V=l:a=l:thetal=0;optons=gaoptimset(PopularionSize1,100, Generations *,10000, StallGenLiraic,500, *TolFunle-100);thetaO=ga ( (thet) weiyi_0 (thet, thecal), 4. options);if thetaO(1)2*pithetaO(1)=thetaO(1)2*pi;if thetaO(2)thetaO(2)=thetaO(2)-2*pi;i
3、f thetaO(3)thetaO(3)=thetaO(3)-2*pi; endif thetaO(4)thetaO(4)=theta0(4)-2*pi;*调用子函数Fun_jixie i|-算该八杆机构的各杆角位移、角速度、角加速度以及E点的角位移、角速度、 角加速度for nl=l:361thetal=(nl-1)*hd;tl (nl)=thetal*du;theta=fsolve(thet) weiyi(thet thecal),thetaO);if theta(1)theta(1)=theta(1)-2*pi;if theta(2)theta(2)=theta(2)-2*pi;if t
4、heta(3)theta(3)=theta(3)-2*pi;if theta(4)theta(4)=theta(4)-2*pi;xe(nl),ye(nl)=weiyi_E(thetalz theta,11,12z122);omega,alph = Fun_j ixie(thetal,omegal,1112,13,1516,122,theta);V(nl)z a(nl)=suau_j asudu_E(omega(1),alph(1)z thetaz thecal,omegal,11,12,122z a Iphl);theta2(nl)=theta(1);theta3(nl)=theca(2);t
5、heta5(nl)=theta(3);theta6(nl)=theta (4);omega2(nl)=omega(1);omega3(nl)=omega(2);omega5(nl)=omega(3);omega(nl)=o mega(4);alph2(nl)=alph(1);alph3(nl)=alph(2);alph5(nl)=alph(3);alph6(nl)=alph(4); thetaO=theta;冬绘制各杆件的角位移、角速度、角加速度n2=l:nl=l:figure(1);%subplot (2,2f 1) %绘制位移线图plot(nl-1),theta2(n2)*duz r-1r
6、 (nl-1)r theta3(n2)*duz 1g-1f ,theta5 (n2)*auz * y-1, (nl-1),theta6(n2)*auz 1k-*,1LineWidth1,1 5);title Cft杆角位移线图J;xlabel (1 原动件 ltheca_l/circ 1);ylabel (角位移八circ);grid on;hold on;text(200r 60, 1 2 1);text(200,150, n 3text(200r350, t】5);text(200r260, $);subplot (2,2,2) *绘制角速度线图plot(nl-1)r omega2(n2)
7、, r-. (nl-1),omega3(n2), g-, (nl-1)tomega5(n2), y-1, (n1-1), omega6 (n2) , 1 k- LineWidth,. 5);title (1 ft杆角速度线图J;xlabel (原动件 ltheca_l/circ ylabelC Jfiii度/radcdots八7);hold cn;subplot (乙2,3) *绘制角加速度线图plot(nl-1),alph2(n2)z r-1, (nl-1),alph3(n2), g-1f (nl-1),alph5(n2), 1y1r (nl-1),alphS (n2) z k- f * L
8、ineVTidrh1 f 1.5);title 角加速度线图T;xlabel (1 原1 theta_l/circ *);ylabel 角力卩速度/radcdots 八-2 J ;%*求E点的位移figure(2)subplot(2f2,l)plot(xe(nl),ye(nl)f 1r-1z * LineWidth1,1 5);title (E的位移线图,);xlabel CE在x方向位移J;ylabel (E在y方向位移J;求2点角速度与角加速度subplot (2,2,2) 绘制E点角速度plot(nl-1)rV(nl)z r-,LineWidth *,1 5); title (E点角速度
9、J;xlabel (* 原动杵 IXthetal/Xcirc 1); ylabelfE 点角速度/radcdotsA -1 1; grid on;subplot (2,2,3)勺绘制E点角加速度plot(nl-1),a(nl)z1r-z1LineWidth,1 5);E点角加速度冷;xlabel (1 原动ft ltheca_l/circ 1);ylabel f E 点角加速度/radcdos八-21);*将数据输出到Exel表shujul .xls中 xlswrite (Eshuju3 xlsxlswrite(shuju3 xlsE shuju3 xls xlswrite(1E shuju3
10、 xls xlswrite(1E shuju3 xls机械原理大作业平面六杆机构Matlab程序 ,tl (nl) 1zsheetl1, Al1);机械原理大作业平而六杆机构Matlab程序 r theta2(nl)*auz sheecl1,Bl机械原理大作业平而八杆机构Matlab程序 ,thetaS(nl)1*auz sheetl1z Cl机械原理大作业平而六杆机构Matlab程序 ,theta5(nl)*auz 1sheecl1,1Dl机械原理大作业 T Illi A杆机构Matlab程序xlswrite(1E shuju3 xls xlswrite(1E shuju3 xls xlsw
11、rite(1E shuju3 xlst thetaS(nl)1*duz 1sheetl1z El机械原理大作业平面八杆机构Matlab程序 ,omega2(nl) 1z 1 sheet!z1 Fl1);机械原理大作业平血八杆机构Matlab程序,omegaS(nl) 1, * sheetl1, 1G11);机械原理大作业T lftlA杆机构Matlab程序 romega5(nl) 1, sheet!1, 1 Hl机械原理大作业平而六杆机构Matlab程序 romega6(nl) 1, sheetl1,1 II1);机械原理大作业TllIlA杆机构Matlab程序xlswrite(1Eshuju
12、3xls,alph2 (nl) ,1sheetl1,1Jl机械原理大作业平面人杆机构Matlab程序 falph3 (nl) , sheetl1,Kl1);机械原理大作业 TlfllA杆机构Mat:Lab程序 t alph5 (nl) LI机械原理大作业平面六杆机构Matlab程序,alph6 (nl) , 1sheetl1,Ml机械原理大作业平面川杆机构Matlab程序 rV(nl) 1 sheetl Nl1);机械原理大作业平而穴杆机构Matlab程序shuju3xlsa(nl) sheerl *014.2从动件角位移,角速度,角加速度function omega,alph = Fun_j
13、ixie( thetal,omegalf11,12,13r15z16,122z theta) *从动件角位移theta2=theta(1);theta3=theta(2);theta5=theta(3);theta6=theta (4);备计算从动件角速度A= -12*sin(theta2), 13*sin(theta3)r 0,12*cos (theta2), -13*cos(theta3)f 0z0;o;-122*sin(theta2 - pi/3)r -13*sin (theta3), -15*sin (thetaS), 16*sin(theta6);122*cos(theta2 - p
14、i/3)z 13*cos(theta3)z 15*cos(thetaS), -16*cos(theta6);B=ll*sin(thecal);-ll*cos(thetal) ; 0; 0);omega=A(omegal*B);omega2=omega(1);omega3=omega(2);omega5=omega(3);omega6=omega(4);%务计算角从动件角加速度A= -12*sin(theta2)r 13*sin(theta3), 0z12*cos (theta2), -13*cos(theta3) . 0z0;-122*sin(theta2 - pi/3)r -13*sin (
15、theta3), -15*sin (thetaS), 16*sin(thetafi);122*cos (theta2 - pi/3), 13*cos(theta3)z 15*cos (theta5), -16*cos(theta6);AC=-12*omega2*cos(theta2)r13*omega3*cos(thetaS),-12*omega2*sin(theta2),13*omega3*sin(theta3) r-122*omega2*cos(theta2 -o, o;pi/3)z-13*omega3*cos(theta3)r-15*omega5*cos(theta5),16*omega
16、6*cos(theta6); -122*omega2*sin(theta2 -pi/3),-13*omega3*sin(theta3)r-15*omega5*sin(theta5),16*omega6*sin(thetaS);Bt=omegal*ll*cos(thetal);omegal*ll*sin(thetal); alph=A(-At*omega+omegal*Bt);43 E点角速度,角加速度function Vz a=sudu_jasudu_E(omega,alphr theta,thetal,omegalr11,12,122,alphl) 务求E点角速度A=ll*sin(theta
17、l)r-12*sin(tbeta(2)+122*sin(pi/3-theta(1);ll*cos(thetal)z12*cos (theta(1)-122*cos(pi/3-theta(1);B=omega1;omega(1);Vx=-ll*sin(thecal)*omegal-12*sin(theta(2)+122*sin(pi/3-theta(1)*omega(1); Vy=ll*cos(thecal)*omegal+12*cos(theta(1)-122*cos(pi/3-theta(1)*omega(1); V=sqrt(Vx2+Vy2);*求E点角加速度Dl=alphl;alph(1
18、);D2=ll*cos(theral)*omegalz-12*cos(theta(1)*omega(1)-122*cos(pi/3-theta(1) omega (1);-ll*sin(thetal)*omegal 12*sin(theta(2)*omega(1)+122*sin(pi/3-the ta(l)*omega(1);al=A*Dl+D2*B;a=sqrt(al(1)2+al(2)八2);4.4 E点位移function xez ye = weiyi_E ( thecal, theta, 2.1,12.122)xe=ll*cos(thecal)+12*cos(theta(1)+122
19、*cos(pi/3-theta(1);ye=ll*sin(thecal)+12*sin(theta(2)+122*sin(pi/3-theta(1);五、计算结果各杆角位移变化主动杆1从动杆2从动杆3从动杆5从动杆6/()35. 608465. 6281207. 9752248. 09291030. 893461. 5375194. 8392245. 66832027. 086259.5197185. 6508242. 79253024. 247259. 4280179 3291237. 81744022. 271160.9068174. 5082230. 17165021. 000763.5
20、668169. 5566219. 56936020. 289967.0707162.6546205. 59807020. 024671.1528152.0191187. 90728020.122975.6089136. 6623167. 01769020. 528780.281911&6181146. 74591002L 205085.0474102- 4070132-540811022.128989.803390.2305125. 721012023. 287094.463081.3183123. 927113024.671998.950774. 4878124. 785614026. 27
21、96103.199068.9103126 772715028.1066107. 147264. 1954129.011616030.1477110.741360.0940130. 926617032.3934113.934556.4453132.127418034.8277116.687453.1161132. 349319037. 4267118.967849.9679131.434220040.1568120. 750346.8439129.322921042. 9741122. 014743.5755126. 045922045. 8240122.743540.0051121.70362
22、304& 6401122. 919036.0147116. 43812405L 3440122.520031.5507HO. 395225053. 8440121. 518426.6324103. 676926056. 0339119.876321.337396.285227057. 7910117. 544215.75828& 063328058.9751114. 46109. 92877& 638829059. 4298110.55793. 698867.360830058.9895105. 7702356.504553. 180231057. 4975100. 0632346. 8670
23、34. 321032054.844593.4802331.20497. 504233051.031086.2118302.1698327. 046934046. 245878. 679325& 909727& 655135040. 910071.5539227. 0232254.532636065.6281207. 9744248. 0919各杆角加位移变化/C )/ (rad/s)-0.5086-1. 5567-0.3234-0.4292-0.3058-1. 0981-0.2238-0.3315-0.1005-0.7553-0.3786-0.23820. 0760-0.5319-0.6263-0.15970. 2131-0.4595-0.9068-0 09690 3132-0.5604-1. 2182-0 04720. 3832-0.84985798-0. 00720. 4299-1. 3021-1. 96140. 02600. 4588-1. 7368-2.15290. 05460. 4738-1 7842-1. 79540. 08030. 4776-1.4218-1. 02700. 10430. 4721-1.0319-0.3838
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1