资源描述:
《平面六杆机构的运动分析Matlab代码.doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、平面六杆机构的运动分析M代码%参数赋值clc,clear10=22;11=40;12=55;13=55;14=44;15=35;M=-l;Omigal=10;Theta1=0:0.01:360;Theta1=Theta1*pi/l80;%求解各个构件位移、速度、加速度A=2*l1*12*sin(Theta1);B=2*12*(ll*cos(Theta1)-10);C=llA2+12A2+10A2-13A2-2*ll*l()*cos(Theta1);E=2*ll*13*sin(Thetal);F=2*13*(ll*cos(Theta1)-10);G=12A2-11A2-13A2-10A
2、2+2*ll*10*cos(Theta1);Theta3=2*atan((E+M*sqrt(E.A2+F.A2-G.A2))./(F-G));Theta31=Theta3-3O;S=15.*cos(Theta31)-sqrt(-15A2.*sin(Theta31).A2+14A2);Theta2=2*atan((A+M*sqrt(A.A2+B.A2-C.A2))./(B-C));Theta4=atan(15.*sin(Theta3l)./(15.*cos(Theta31)-S));Omiga2=Omiga1*11*sin(Theta1-Theta3)./(12*sin(Theta3-
3、Theta2));Omiga3=Omiga1*11*sin(Theta1-Theta2)./(13*sin(Theta3-Theta2));Omiga4=((-15).*Omiga3.*cos(Theta31))./(14.*cos(Theta4));Vf=-15.*Omiga3.*sin(Theta31)+l4.*Omiga4.*sin(Theta4);Alfa3=(OmigalA2*ll*cos(Thetal-Theta2)4-Omiga2.A2*12-Omiga3.A2*13.*cos(Theta3-Theta2))./(13*sin(Theta3-Theta2));Alfa2
4、=(-Omiga1A2*l1*cos(Theta1-Theta3)+Omiga3.A2*13-Omiga2.A2*12.*cos(Theta2-Theta3))./(12*sin(Theta2-Theta3));Alfa4=(l5.*Alfa3.*cos(Theta3l)+l4.*Omiga4.A2.:3:sin(Theta4)-15.*Omiga3.A2.*sin(Theta31))./(l4.*cos(Theta4));Af=(-15).*Omiga3.A2.*cos(Theta31)+14.*(Omiga4.A2.*cos(Theta4)+Alfa4.*sin(Theta4))
5、-15.*Alfa3.*sin(Theta31);%绘图Theta1=Theta1*180/pi;Subplot(3,l,l)plot(Thetal,Theta2),gridonxlabel('曲柄转角(八。)^ylabeK'BC杆角位移(rad)*);Subplot(3,l,2)plot(Theta1,Omiga2),gridonxlabel('曲柄转角(人。)');ylabel('BC杆角速度(rad/s)*);Subplot(3,l,3)plot(Theta1,Alfa2),gridonxlabelCllll柄转角(人。)^ylabeK'BC杆角加速度(rad/sA2)');S
6、ubplot(3,l,l)plot(Theta1,Theta3),gridonxlabelCllll柄转角(八。)^iylabelCCD杆角位移(md)*);Subplot(3,l,2)plot(Theta1,Omiga3),gridonxlabelCllll柄转角(人。)');ylabel('CD杆角速度(rad/s)*);Subplot(3,1,3)plot(Theta1,Alfa3),gridonxlabelC曲柄转角(Ao)^ylabelCCD杆角加速度(rad/sA2)*);Subplot(3,l,l)plot(Thetal,Theta4*18O/pi),gridonxla
7、belfft柄转角(八。));ylabel(*EF杆角位移(rad)');Subplot(3,l,2)plot(Theta1,Omiga4),gridonxlabelC曲柄转角(人。)');ylabel(EF杆角速度(rad/s)');Subplot(3,l,3)plot(Theta1,Alfa4),gridonxlabelCllll柄转角(人。)J;ylabel(EF杆角加速度(rad/sA2)*);Subplot(3,l,l)plot(Thetal,S