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