1、连杆机构大作业报告机械原理大作业一平面六杆机构的分析题目:下图所示为一平面六杆机构。设已知各构件的尺寸如下表所示,又知原动件1以等角速度1=1rad/s沿逆时针方向回转,试求各从动件的角位移、角速度及角加速度以及E 点的位移、速度及加速度的变化情况。平面六杆机构的尺寸参数=65.09mm, =153.5mm, =41.7mm题号a2B26.5111.667.587.552.44360图 a)1 机构运动分析 如上图a)所示,建立直角坐标系。建立三个封闭图形ABCDA、DCEFGD和DGFED,由此可得:写成投影方程形式可得E点位移:分别将上式求一次、二次导数,写成矩阵形式,得到下面的速度和加速
2、度方程:E点的速度为:E点的加速度为:2 matlab程序设计2.1 程序流程图2.2 源程序:%创建函数myfun,函数fsolve通过它确定、。function f=myfun(x,y)l1=26.5;l2=111.6;l3=67.5;l4=87.5;l5=52.4;l6=43;l21=65;xg=153.5;yg=41.7;a=pi/3;eq1=l1*sin(y)+l2*sin(x(1)-l3*sin(x(2);eq2=l1*cos(y)+l2*cos(x(1)-l3*cos(x(2)-l4;eq3=l3*sin(x(2)+l21*sin(x(1)-a)-yg-l6*sin(x(4)-l
3、5*sin(x(3);eq4=l3*cos(x(2)+l21*cos(x(1)-a)-xg+l4-l6*cos(x(4)-l5*cos(x(3);f=eq1;eq2;eq3;eq4; 主程序如下:%求解过程l1=26.5;l2=111.6;l3=67.5;l4=87.5;l5=52.4;l6=43;l21=65;xg=153.5;yg=41.7;a=pi/3; %给定已知量th1=0:1/18:2*pi; %曲柄输入角度th1从0到2*pi,步长为pi/18th=zeros(length(th1),4); %建立一个N行4列的零矩阵,第一、二、三、四列%分别存放存放、v26=zeros(len
4、gth(th1),4); a26=zeros(length(th1),4);options=optimset(display,off); th0=31.3,59.5,274.6,60.7;th0=th0*pi/180;for m=1:length(th1) %建立for循环,求解、及E点坐标与位移 th(m,:)=fsolve(myfun,th0,options,th1(m); th0=th(m,1) th(m,2) th(m,3) th(m,4); xe(m)=xg+l6*cos(th(m,4)+l5*cos(th(m,3); %求E点横坐标 ye(m)=yg+l6*sin(th(m,4)+
5、l5*sin(th(m,3); %求E点纵坐标 se(m)=sqrt(xe(m)2+ye(m)2); %求E点位移end for n=1:length(th1) %建立for循环,求解各从动件和E点的速度 A=l2*cos(th(n,1) -l3*cos(th(n,2) 0 0 0 0; l2*sin(th(n,1) -l3*sin(th(n,2) 0 0 0 0;l21*cos(th(n,1)-a) l3*cos(th(n,2) -l5*cos(th(n,3) -l6*cos(th(n,4) 0 0; l21*sin(th(n,1)-a) l3*sin(th(n,2) -l5*sin(th(
6、n,3) -l6*sin(th(n,4) 0 0;0 0 -l5*cos(th(n,3) -l6*cos(th(n,4) 1 0; 0 0 l5*sin(th(n,3) l6*sin(th(n,4) 0 1; b=-l1*cos(th1(n) -l1*sin(th1(n) 0 0 0 0; v26(n,:)=(inv(A)*b); %求各从动件的速度 ve(n)=sqrt(v26(n,5)2+v26(n,6)2); %求E点速度end for i=1:length(th1) %建立for循环,求解各从动件和E点的加速度 C=l2*cos(th(i,1) -l3*cos(th(i,2) 0 0
7、0 0; l2*sin(th(i,1) -l3*sin(th(i,2) 0 0 0 0; l21*sin(th(i,1)-a) l3*sin(th(i,2) -l5*sin(th(i,3) -l6*sin(th(i,4) 0 0; l21*cos(th(i,1)-a) l3*cos(th(i,2) -l5*cos(th(i,3) -l6*cos(th(i,4) 0 0; 0 0 -l5*cos(th(i,3) -l6*cos(th(i,4) 1 0; 0 0 l5*sin(th(i,3) l6*sin(th(i,4) 0 1; E=l2*sin(th(i,1) -l3*sin(th(i,2)
8、0 0 0 0; -l2*cos(th(i,1) -l3*cos(th(i,2) 0 0 0 0; l21*cos(th(i,1)-a) -l3*cos(th(i,2) l5*cos(th(i,3) l6*cos(th(i,4) 0 0; l21*sin(th(i,1)-a) l3*sin(th(i,2) -l5*sin(th(i,3) -l6*sin(th(i,4) 0 0; 0 0 -l5*sin(th(i,3) -l6*sin(th(i,4) 0 0; 0 0 -l5*cos(th(i,3) -l6*cos(th(i,4) 0 0; d=(v26(i,1) v26(i,2) v26(i,
9、3) v26(i,4).2); g=l1*sin(th1(i) l1*cos(th1(i) 0 0 0 0; a26(i,:)=(inv(C)*(E*d-g); %求从动件的加速度 ae(i)=sqrt(a26(i,5)2+ a26(i,6)2); %求E点加速度end 绘图程序:th=th*180/pi;th1=th1*180/pi; %将、转换成以度单位%绘制各从动件位移图plot(th1,th,LineWidth,2.5);xlabel(theta1(度);ylabel(theta2、theta3、theta5、theta6(度));title(位置线图);legend(theta2,t
10、heta3,theta5,theta6);grid minor;%绘制速度线图plot(th1,v26(:,1),th1,v26(:,2),th1,v26(:,3),th1,v26(:,4), LineWidth,2.5);xlabel(theta1(度);ylabel(omega2、omega3、omega5、omega6(rad/s);title(速度线图);legend(omega2,omega3,omega5,omega6);grid minor;%绘制加速度线图plot(th1,a26(:,1),th1,a26(:,2),th1,a26(:,3),th1,a26(:,4),LineW
11、idth,2.5);xlabel(theta1(度);ylabel(alpha2、alpha3、alpha5、alpha6(rad/s2));title(加速度线图);legend(alpha2,alpha3,alpha5,alpha6); grid minor;% 绘制E点轨迹图形 plot(xe,ye ,LineWidth,2.5);title(E点的轨迹);xlabel(E点横坐标(mm);ylabel(E点纵坐标(mm);axis(120 180 14 62);grid on;% 绘制E点速度图plot(th1,v26(:,5),-xb,th1,v26(:,6),-*g,th1,ve,
12、-dr,LineWidth,2.5);title(E点速度图);xlabel(theta1(度);ylabel(速度 (mm/s);legend(E点速度x轴分量,E点速度y轴分量,E点速);grid minor;% 绘制E点加速度图plot(th1,aex,-xb,th1,aey,-*g,th1,ae,-db);title(E点加速度图);xlabel(theta1(度);ylabel(加速度 (mm/s2); legend(E点加速度x轴分量,E点加速度y轴分量,E点加速度);grid minor;2.3 运行结果2.3.1 图形1 各从动件的位移线图:2 各从动件的速度线图:3 各从动件的加速度线图:4 E点轨迹图:5 E点速度图:6 E点加速度图:2.3.2 计算所得数据角度数据 速度数据加速度数据
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1