平面六连杆机构的运动分析Matlab代码1_平面六杆机构运动分析

2020-02-28 其他范文 下载本文

平面六连杆机构的运动分析Matlab代码1由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“平面六杆机构运动分析”。

平面六连杆机构的运动分析Matlab代码

clc,clear %参数赋值 l1=40;l2=55;l3=55;l4=22;M=-1;%装配模式 omiga1=10;theta1=0:1:360;theta1=theta1*pi/180;A=2*l1*l2*sin(theta1);B=2*l2*(l1*cos(theta1)-l4);C=l1^2+l2^2+l4^2-l3^2-2*l1*l4*cos(theta1);

E=2*l1*l3*sin(theta1);F=2*l3*(l1*cos(theta1)-l4);G=l2^2-l1^2-l3^2-l4^2+2*l1*l4*cos(theta1);

theta3=2*atan((E+M*sqrt(E.^2+F.^2-G.^2))./(F-G));theta2=2*atan((A+M*sqrt(A.^2+B.^2-C.^2))./(B-C));

omiga2=omiga1*1*sin(theta1-theta3)./(l2*sin(theta3-theta2));omiga3=omiga1*1*sin(theta1-theta2)./(l3*sin(theta3-theta2));

alph3=(omiga1^2*l1*cos(theta1-theta2)+omiga2.^2*l2-omiga3.^2*l3.*...cos(theta3-theta2))./(l3*sin(theta3-theta2));

alph2=(-omiga1^2*l1*cos(theta1-theta3)+omiga3.^2*l3-omiga3.^2*l2.*...cos(theta2-theta3))./(l2*sin(theta2-theta3));

%绘图

theta1=theta1*180/pi;theta3=theta3*180/pi subplot(3,1,1)plot(theta1,theta3),grid on xlabel('曲柄转角(^。)');ylabel('CD角位移(rad)');subplot(3,1,2)plot(theta1,omiga3),grid on xlabel('曲柄转角(^。)');ylabel('CD角速度(rad/s)');subplot(3,1,3)plot(theta1,alph3),grid on xlabel('曲柄转角(^。)');ylabel('CD角加速度(rad/s^2)')

clc,clear %参数赋值 l1=39;l2=55;l3=56;l4=23;M=-1;%装配模式 omiga1=10;theta1=0:1:360;%原动件角位移 theta1=theta1*pi/180;A=2*l1*l2*sin(theta1);B=2*l2*(l1*cos(theta1)-14);C=l1^2+l2^2+l4^2-l3^2-2*l1*l4*cos(theta1);

E=2*l1*l3*sin(theta1);F=2*l3*(l1*cos(theta1)-l4);G=12^2-l1^2-l3^2-l4^2+2*l1*l4*cos(theta1);theta3=2*atan((E+M*sqrt(E.^2+F.^2-G.^2))./(F-G));%摇杆角位移 theta2=2*atan((A+M*sqrt(A.^2+B.^2-C.^2))./(B-C));%连杆角位移

omiga2=omiga1*l1*sin(theta1-theta3)./(l2*sin(theta3-theta2));%连杆角速度

omiga3=omiga1*l1*sin(theta1-theta2)./(l3*sin(theta3-theta2));%摇杆角速度 %摇杆角加速度

alph3=(omiga1^2*l1*cos(theta1-theta2)+omiga2.^2*l2-omiga3.^2*l3.*...cos(theta3-theta2))./(l3*sin(theta3-theta2));%连杆角加速度

alph2=(-omiga1^2*l1*cos(theta1-theta3)+omiga3.^2*l3-omiga2.^2*l2.*...cos(theta2-theta3))./(l2*sin(theta2-theta3));

%绘图

theta1=theta1*180/pi;subplot(3,1,1)plot(theta1,theta2*180/pi),grid on xlabel('曲柄转角(^o)');ylabel('连杆角位移(rad)');subplot(3,1,2)plot(theta1,omiga2),grid on xlabel('曲柄转角(^o)');ylabel('连杆角速度(rad/s)');subplot(3,1,3)plot(theta1,alph2),grid on xlabel('曲柄转角(^o)');ylabel('连杆角加速度(rad/s^2)')

clc,clear %参数赋值 l1=40;l2=55;l3=55;l4=22;l5=35;l6=44;M=-1;%装配模式 omiga1=10;theta1=0:1:360;theta1=theta1*pi/180;A=2*l1*l2*sin(theta1);B=2*l2*(l1*cos(theta1)-l4);C=l1^2+l2^2+l4^2-l3^2-2*l1*l4*cos(theta1);

E=2*l1*l3*sin(theta1);F=2*l3*(l1*cos(theta1)-l4);G=l2^2-l1^2-l3^2-l4^2+2*l1*l4*cos(theta1);

theta3=2*atan((E+M*sqrt(E.^2+F.^2-G.^2))./(F-G));theta2=2*atan((A+M*sqrt(A.^2+B.^2-C.^2))./(B-C));

omiga2=omiga1*1*sin(theta1-theta3)./(l2*sin(theta3-theta2));omiga3=omiga1*1*sin(theta1-theta2)./(l3*sin(theta3-theta2));

alph3=(omiga1^2*l1*cos(theta1-theta2)+omiga2.^2*l2-omiga3.^2*l3.*...cos(theta3-theta2))./(l3*sin(theta3-theta2));

alph2=(-omiga1^2*l1*cos(theta1-theta3)+omiga3.^2*l3-omiga3.^2*l2.*...cos(theta2-theta3))./(l2*sin(theta2-theta3));

theta31=theta3-pi/6;theta4=pi-asin(l5.^sin(theta31)./l6);%EF角位移

omiga4=l5.*omiga3.*cos(theta31)./(l6.*cos(theta4));%EF角速度

%EF角加速度

alph4=(l5.*alph3.*cos(theta31)-l5.*omiga3.^2.*sin(theta31)+l6.*omiga4.^2.*...sin(theta4))./(l6.*cos(theta4));

%绘图

theta1=theta1*180/pi;theta4=theta4*180/pi;subplot(3,1,1)plot(theta1,theta4),grid on xlabel('曲柄转角(^。)');ylabel('EF杆角位移(rad)');subplot(3,1,2)plot(theta1,omiga4),grid on xlabel('曲柄转角(^。)');ylabel('EF杆角速度(rad/s)');subplot(3,1,3)plot(theta1,alph4),grid on xlabel('曲柄转角(^。)');ylabel('EF角加速度(rad/s^2')

clc,clear %参数赋值 l1=40;l2=55;l3=55;l4=22;l5=35;l6=44;M=-1;%装配模式 omiga1=10;theta1=0:1:360;theta1=theta1*pi/180;A=2*l1*l2*sin(theta1);B=2*l2*(l1*cos(theta1)-l4);C=l1^2+l2^2+l4^2-l3^2-2*l1*l4*cos(theta1);

E=2*l1*l3*sin(theta1);F=2*l3*(l1*cos(theta1)-l4);G=l2^2-l1^2-l3^2-l4^2+2*l1*l4*cos(theta1);

theta3=2*atan((E+M*sqrt(E.^2+F.^2-G.^2))./(F-G));theta2=2*atan((A+M*sqrt(A.^2+B.^2-C.^2))./(B-C));

omiga2=omiga1*1*sin(theta1-theta3)./(l2*sin(theta3-theta2));omiga3=omiga1*1*sin(theta1-theta2)./(l3*sin(theta3-theta2));

alph3=(omiga1^2*l1*cos(theta1-theta2)+omiga2.^2*l2-omiga3.^2*l3.*...cos(theta3-theta2))./(l3*sin(theta3-theta2));

alph2=(-omiga1^2*l1*cos(theta1-theta3)+omiga3.^2*l3-omiga3.^2*l2.*...cos(theta2-theta3))./(l2*sin(theta2-theta3));

theta31=theta3-pi/6;theta4=pi-asin(l5.^sin(theta31)./l6);%EF角位移

omiga4=l5.*omiga3.*cos(theta31)./(l6.*cos(theta4));%EF角速度 %EF角加速度

alph4=(l5.*alph3.*cos(theta31)-l5.*omiga3.^2.*sin(theta31)+l6.*omiga4.^2.*...sin(theta4))./(l6.*cos(theta4));

vf=-l5.*omiga3.*sin(theta31)+l6.*omiga4.*sin(theta4);alphf=-l5.*alph3.*sin(theta31)-l5.*omiga3.^2.*cos(theta31)+l6.*alph4.*...sin(theta4)+l6.*omiga4.^2.*cos(theta4);%绘图

theta1=theta1*180/pi;subplot(2,1,1)plot(theta1,vf),grid on xlabel('曲柄转角(^。)');ylabel('f点速度(mm/s)');subplot(2,1,2)plot(theta1,alphf),grid on xlabel('曲柄转角(^。)');ylabel('f点加速度(mm^2/s)')

装Z-121班:余凌国

学号:129054458 指导老师:张俊

《平面六连杆机构的运动分析Matlab代码1.docx》
将本文的Word文档下载,方便收藏和打印
推荐度:
平面六连杆机构的运动分析Matlab代码1
点击下载文档
相关专题 平面六杆机构运动分析 连杆 平面 代码 平面六杆机构运动分析 连杆 平面 代码
[其他范文]相关推荐
    [其他范文]热门文章
      下载全文