高等机构学题目:牛头刨床机构运动分析院系名称:机械与动力学院专业班级:机械工程学生姓名:学号:学生姓名:学号:学生姓名:学号:指导教师:2015年12月17日目录一问题描述........................................................ - 1 -二运动分析........................................................ - 1 -2.1矢量法构建机构独立位置方程................................ - 1 -2.2机构速度分析.............................................. - 2 -2.3机构加速度分析............................................ - 2 -2.4机构运动线图绘制.......................................... - 2 -三总结............................................................ - 4 -附录一:Matlab程序............................................... - 4 -牛头刨床机构运动分析一 问题描述如图1-1所示的牛头刨床机构中,800h mm =,1360h mm =,2120h mm =,200AB l mm =,960CD l mm =,160DE l mm =。
设曲柄以等角速度15/rad s ω=逆时针方向回转,试对其进行运动分析,求出该机构中各从动件的方位角、角速度和角加速度以及各机构的运动线图。
图1-1 牛头刨床机构二 运动分析2.1矢量法构建机构独立位置方程如图2-1所示,以E 为坐标原点建立直角坐标系,并标出各杆矢量及其方位角。
其中共有四个未知量334,,,c S S θθ。
图2-1 坐标系建立以两个封闭图形ABDEA 和EDCFE 为基准构建两个封闭矢量位置方程,即:134AE l S l +=+34c h S l l +=+将上述矢量方程分别沿X 轴和Y 轴进行投影,得牛头刨床机构的独立位置方程如下:3344211cos cos cos s l h l θθθ+=+ 3344111sin sin sin s l h l θθθ+=+3344cos cos c l l s θθ+= 3344sin sin l l h θθ+=利用Matlab 进行编程求解,可求得各机构的位置,程序见附录一。
2.2机构速度分析将机构的位置方程对时间求一次导数,并写成矩阵的形式,得机构的速度方程如下:33344311333443111334443344cos sin sin 0sin sin cos cos 0cos 0sin sin 100cos cos 00c s l s l s l l l l l l s θθθθθθθωθωθθωθθ---⎡⎤⎡⎤⎡⎤⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥=⎢⎥⎢⎥⎢⎥--⎢⎥⎢⎥⎢⎥⎣⎦⎣⎦⎣⎦ 利用Matlab 进行编程求解,可求得各机构的角速度或速度,程序见附录一。
2.3机构加速度分析将机构的速度方程对时间求一次导数,并写成矩阵的形式,得机构的加速度方程如下:33344333333344433344333333344433444333443344cos sin sin 0sin sin cos cos 0sin cos cos 0cos cos sin sin 00sin sin 10cos 0cos cos 0c s l s s s l s l s s l l l l l l l s θθθθθωθωθθθθαθθωθωθθθαωθωθθ------⎡⎤⎡⎤⎢⎥⎢⎥--⎢⎥⎢⎥=-⎢⎥⎢⎥----⎢⎥⎢⎥⎣⎦⎣⎦33443334441111111cos 00sin sin 0cos sin 00c s l l s l l ωθωωθωθωθωθω⎡⎤⎡⎤⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥--⎣⎦⎣⎦-⎡⎤⎢⎥-⎢⎥+⎢⎥⎢⎥⎣⎦利用Matlab 进行编程求解,可求得各机构的角加速度或加速度,程序见附录一。
2.4机构运动线图绘制通过Matlab 进行计算求解,得到各构件的位置、速度和加速度,如表2-1所示。
根据所求得的各构件的位置、速度及加速度,进行机构运动线图的绘制,如图2-2所示。
程序见附录一。
表2-1 各构件的位置、速度和加速度图2-2 机构的运动线图位移线图时间/s 角位移 / ︒位移/m角速度线图时间/s角速度 / r a d ⋅s -1速度/m ⋅s -1角加速度线图时间/s角加速度 / r a d ⋅s -2加速度/m ⋅s -2牛头刨床运动仿真mmm m三总结通过对牛头刨床机构的运动分析,让我们学会了如何使用矩阵法建立平面机构的运动方程。
对机构进行运动分析的关键是独立位置方程的建立和求解,由于独立位置方程是一个非线性方程组,计算难度较大。
本文借用了Matlab软件进行编程求解独立位置方程,同时对牛头刨床机构进行了运动仿真,并绘制了牛头刨床机构的运动线图,完成了从理论分析到编程求解的运动分析过程。
附录一:Matlab程序(1)子函数PosionFun.mfunction f=Position_Fun(x,theta1,h,h1,h2,l1,l3,l4)f=[ x(1)*cos(x(2))+l4*cos(x(3))-h2-l1*cos(theta1);x(1)*sin(x(2))+l4*sin(x(3))-h1-l1*sin(theta1);l3*cos(x(2))+l4*cos(x(3))-x(4);l3*sin(x(2))+l4*sin(x(3))-h];end(2)子函数Six_Bar.mfunction[theta,omega,alpha]=Six_Bar(theta0,theta1,omega1,alpha1,h,h1,h2,l1,l3,l4) theta=fsolve(@(x)Position_Fun(x,theta1,h,h1,h2,l1,l3,l4),theta0);S3=theta(1);theta3=theta(2);theta4=theta(3);Sc=theta(4);%计算连杆3、连杆4、滑块2和C点的速度A=[ cos(theta3) -S3*sin(theta3) -l4*sin(theta4) 0;sin(theta3) S3*cos(theta3) l4*cos(theta4) 0;0 -l3*sin(theta3) -l4*sin(theta4) 1;0 l3*cos(theta3) l4*cos(theta4) 0];B=[-l1*sin(theta1);l1*cos(theta1);0;0];omega=A\(omega1*B);v3=omega(1);omega3=omega(2);omega4=omega(3);vc=omega(4);%计算连杆3、连杆4的角加速度,滑块2及C点的加速度A=[ cos(theta3) -S3*sin(theta3) -l4*sin(theta4) 0;sin(theta3) S3*cos(theta3) l4*cos(theta4) 0;0 -l3*sin(theta3) -l4*sin(theta4) 1;0 l3*cos(theta3) l4*cos(theta4) 0];At=[-sin(theta3) -v3*sin(theta3)-S3*omega3*cos(theta3) -l4*omega4*cos(theta4) 0;cos(theta3) v3*cos(theta3)-S3*omega3*sin(theta3) -l4*omega4*sin(theta4) 0;0 -l3*omega3*cos(theta3) -l4*omega4*cos(theta4) 0;0 -l3*omega3*sin(theta3) -l4*omega4*sin(theta4) 0];B=[-l1*sin(theta1);l1*cos(theta1);0;0];Bt=[-l1*omega1*cos(theta1);-l1*omega1*sin(theta1);0;0];alpha=A\(-At*omega+alpha1*B+omega1*Bt);a3=alpha(1);alpha3=alpha(2);alpha4=alpha(3);ac=alpha(4);end(3)主程序SixBar_main.m%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 牛头刨床机构运动分析%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%输入已知数据clear;l1=0.2;l3=0.96;l4=0.16;h=0.8;h1=0.36;h2=0.12;omega1=5;alpha1=0;hd=pi/180;du=180/pi;theta0=[0.3;60*hd;270*hd;0.45];%%%调用子函数 Six_Bar 计算牛头刨床机构位移,角速度,角加速度for n1=1:459theta1(n1)=-2*pi+5.8119+(n1-1)*hd;[theta,omega,alpha]=Six_Bar(theta0,theta1(n1),omega1,alpha1,h,h1,h2,l1,l3,l 4);S3(n1)=theta(1); %滑块2相对于CD杆的位移theta3(n1)=theta(2); %杆3转过的角度theta4(n1)=theta(3); %杆4转过的角度Sc(n1)=theta(4); %杆5的位移v3(n1)=omega(1); %滑块2相对于CD杆的速度omega3(n1)=omega(2); %杆3转过的角速度omega4(n1)=omega(3); %杆4转过的角速度vc(n1)=omega(4); %杆5的速度a3(n1)=alpha(1); %滑块2相对于CD杆的加速度alpha3(n1)=alpha(2); %杆3转过的角加速度alpha4(n1)=alpha(3); %杆4转过的角加速度ac(n1)=alpha(4); %杆5的加速度theta0=theta;endthetaOmegaAlpha=[theta3'*du,theta4'*du,Sc',omega3',omega4',vc',alpha3', alpha4',ac'];xlswrite('Positon_Speed_Acceleration.xls',thetaOmegaAlpha,'sheet1','b1:j459');%%% 位移,角速度,角加速度和四杆机构图形输出figure(1);n1=1:459;t=(n1-1)*2*pi/360;% 绘角位移和位移线图subplot(2,2,1);plot(t,theta3*du,'r-.','LineWidth',1.5);hold on;grid on;axis auto;[haxes,hline1,hline2]=plotyy(t,theta4*du,t,Sc);set(hline1,'LineWidth',1.5);set(hline2,'LineWidth',1.5);grid on;hold on;title('位移线图');xlabel('时间/s');axes(haxes(1));ylabel('角位移 / \circ');axes(haxes(2));ylabel('位移/m');hold on;grid on;text(2.75,-0.4,'\theta_3');text(3,0.65,'\theta_4');text(5,-0.25,'S_c');% 绘角速度及速度线图subplot(2,2,2);plot(t,omega3,'r-.','LineWidth',1.5);grid on;hold on;axis auto;[haxes,hline1,hline2]=plotyy(t,omega4,t,vc); set(hline1,'LineWidth',1.5);set(hline2,'LineWidth',1.5);grid on;hold on;title('角速度线图');xlabel('时间/s');axes(haxes(1));ylabel('角速度 / rad\cdots^{-1}');axes(haxes(2));ylabel('速度/m\cdots^{-1}');grid on;hold on;text(1.25,0.55,'\omega_3');text(4.65,2.25,'\omega_4');text(5,-2.85,'v_c');% 绘角加速度和加速度线图subplot(2,2,3);plot(t,alpha3,'r-.','LineWidth',1.5);grid on;hold on;[haxes,hline1,hline2]=plotyy(t,alpha4,t,ac); set(hline1,'LineWidth',1.5);set(hline2,'LineWidth',1.5);grid on;hold on;title('角加速度线图');xlabel('时间/s');axes(haxes(1));ylabel('角加速度 / rad\cdots^{-2}');axes(haxes(2));ylabel('加速度/m\cdots^{-2}');grid on;hold on;text(3,6.5,'\alpha_3');text(4.25,17.5,'\alpha_4');text(1.25,-4.5,'a_c');%绘制牛头刨床机构subplot(2,2,4);n1=20;x(1)=0;y(1)=0;x(2)=l4*1000*cos(theta4(n1));y(2)=l4*1000*sin(theta4(n1));x(3)=l4*1000*cos(theta4(n1))+(S3(n1)*1000-50)*cos(theta3(n1)); y(3)=l4*1000*sin(theta4(n1))+(S3(n1)*1000-50)*sin(theta3(n1)); x(4)=h2*1000;y(4)=h1*1000;x(5)=x(4)+l1*1000*cos(theta1(n1));y(5)=y(4)+l1*1000*sin(theta1(n1));x(6)=x(3)+100*cos(theta3(n1));y(6)=y(3)+100*sin(theta3(n1));x(7)=l4*1000*cos(theta4(n1))+l3*1000*cos(theta3(n1));y(7)=l4*1000*sin(theta4(n1))+l3*1000*sin(theta3(n1));x(8)=x(7)-900;y(8)=h*1000;x(9)=x(7)+600;y(9)=h*1000;x(10)=l4*1000*cos(theta4(n1))+(S3(n1)*1000-50)*cos(theta3(n1)); y(10)=l4*1000*sin(theta4(n1))+(S3(n1)*1000-50)*sin(theta3(n1)); x(11)=x(10)+25*cos(pi/2-theta3(n1));y(11)=y(10)-25*sin(pi/2-theta3(n1));x(12)=x(11)+100*cos(theta3(n1));y(12)=y(11)+100*sin(theta3(n1));x(13)=x(12)-50*cos(pi/2-theta3(n1));y(13)=y(12)+50*sin(pi/2-theta3(n1));x(14)=x(10)-25*cos(pi/2-theta3(n1));y(14)=y(10)+25*sin(pi/2-theta3(n1));x(15)=x(10);y(15)=y(10);x(16)=0;y(16)=0;y(17)=y(4);k=1:3;plot(x(k),y(k));hold on;k=4:5;plot(x(k),y(k));hold on;k=6:9;plot(x(k),y(k));hold on;k=10:15;plot(x(k),y(k));hold on;k=16:17;plot(x(k),y(k),'-.');hold on;grid on;axis([-350 800 -250 950]); title('牛头刨床运动仿真'); grid on;xlabel('mm');ylabel('mm');plot(x(1),y(1),'o');plot(x(2),y(2),'o');plot(x(4),y(4),'o');plot(x(5),y(5),'o');plot(x(7),y(7),'o');%%%牛头刨床机构运动仿真figure(2)m=moviein(20);j=0;for n1=1:5:360j=j+1;clf;y(1)=0;x(2)=l4*1000*cos(theta4(n1));y(2)=l4*1000*sin(theta4(n1));x(3)=l4*1000*cos(theta4(n1))+(S3(n1)*1000-50)*cos(theta3(n1)); y(3)=l4*1000*sin(theta4(n1))+(S3(n1)*1000-50)*sin(theta3(n1)); x(4)=h2*1000;y(4)=h1*1000;x(5)=x(4)+l1*1000*cos(theta1(n1));y(5)=y(4)+l1*1000*sin(theta1(n1));x(6)=x(3)+100*cos(theta3(n1));y(6)=y(3)+100*sin(theta3(n1));x(7)=l4*1000*cos(theta4(n1))+l3*1000*cos(theta3(n1));y(7)=l4*1000*sin(theta4(n1))+l3*1000*sin(theta3(n1));x(8)=x(7)-900;y(8)=h*1000;x(9)=x(7)+600;y(9)=h*1000;x(10)=l4*1000*cos(theta4(n1))+(S3(n1)*1000-50)*cos(theta3(n1)); y(10)=l4*1000*sin(theta4(n1))+(S3(n1)*1000-50)*sin(theta3(n1)); x(11)=x(10)+25*cos(pi/2-theta3(n1));y(11)=y(10)-25*sin(pi/2-theta3(n1));x(12)=x(11)+100*cos(theta3(n1));y(12)=y(11)+100*sin(theta3(n1));x(13)=x(12)-50*cos(pi/2-theta3(n1));y(13)=y(12)+50*sin(pi/2-theta3(n1));x(14)=x(10)-25*cos(pi/2-theta3(n1));y(14)=y(10)+25*sin(pi/2-theta3(n1));x(15)=x(10);y(15)=y(10);x(16)=0;y(16)=0;x(17)=x(4);y(17)=y(4);k=1:3;plot(x(k),y(k));hold on;k=4:5;plot(x(k),y(k));hold on;k=6:9;plot(x(k),y(k));hold on;k=10:15;plot(x(k),y(k));hold on;k=16:17;plot(x(k),y(k),'-.');hold on;grid on;axis([-350 800 -250 950]); title('牛头刨床运动仿真'); grid on;xlabel('mm');ylabel('mm');plot(x(1),y(1),'o');plot(x(2),y(2),'o');plot(x(4),y(4),'o');plot(x(5),y(5),'o');plot(x(7),y(7),'o');axis equal;m(j)=getframe;endfor i=1:3movie(m)end。