1、若用矩阵形式来表示,则上式可写为 (6)(3)加速度分析 将式(2)对时间t求二次导数,可得加速度关系 (7) (8)联解上式即可求得二个角加速度上式用矩阵得形式可表示为 (9)3 程序设计主程序six_bar_main文件%1.输入已知数据clear;l1=0.22;l2=0.65;l4=0.70;l6=0.18;a=0.60;s3=1.00;omega1=(100*pi)/3;alpha1=0;hd=pi/180;du=180/pi;%2.调用子函数six_bar计算for n1=1:361; theta1(n1)=(n1-1)*hd; theta,omega,alpha=six_bar(
2、theta1(n1),omega1,alpha1,l1,l2,l4,l6,a,s3); s2(n1)=theta(1); %s2表示杆BD的长度 theta2(n1)=theta(2); %theta2表示杆2转过角度 theta4(n1)=theta(3); %theta4表示杆4转过角度 s5(n1)=theta(4); %s5表示滑块5相对x轴的距离 v2(n1)=omega(1); %v2表示滑块3相对于BD杆的速度 omega2(n1)=omega(2); %omega2表示构件2的角速度 omega4(n1)=omega(3); %omega4表示构件4的角速度 v5(n1)=om
3、ega(4); %v5表示滑块5的速度 a2(n1)=alpha(1); %a2表示滑块3相对于杆BD的加速度 alpha2(n1)=alpha(2); %alpha2表示杆2的角加速度 alpha4(n1)=alpha(3); %alpha4表示杆的角加速度 a5(n1)=alpha(4); %a5表示滑块5的加速度end%3.图形输出figure(1);n1=1:subplot(2,2,1); %绘角位移及位移线图plot(n1,theta2*du,r);grid on;hold on;axis auto;haxes,hline1,hline2=plotyy(n1,theta4*du,n1
4、,s5);title(角位移及位移线图xlabel(曲柄转角theta_1/circ)axes(haxes(1);ylabel(角位移/circaxes(haxes(2);位移/mtext(300,0.83,theta_2text(150,0.92,theta_4text(180,0.84,s_5subplot(2,2,2); %绘角速度及速度线图 plot(n1,omega2,haxes,hline1,hline2=plotyy(n1,omega4,n1,v5);角速度及速度线图角速度/radcdots-1速度/mcdots-1text(90,6,omega_2text(230,-15,om
5、ega_4text(130,0.1,v_5subplot(2,2,3); %绘角加速度及加速度图plot(n1,alpha2,haxes,hline1,hline2=plotyy(n1,alpha4,n1,a5);角加速度及加速度图角加速度/radcdots-2加速度/mcdots-1text(125,500,alpha_2text(150,-1200,alpha_4text(160,1000,a_5subplot(2,2,4); %机构图nx1=12.083 ;nx2=74.760 ;nx=300 ;x(1)=0;y(1)=0;x(2)=l1*1000*cos(nx*hd);y(2)=l1*
6、1000*sin(nx*hd);x(3)=s3*1000-50*cos(nx1*hd);y(3)=-50*sin(nx1*hd);x(4)=s3*1000;y(4)=0;x(5)=s3*1000+150*cos(nx1*hd);y(5)=150*sin(nx1*hd);x(6)=s3*1000+50*cos(nx1*hd)+25*sin(nx1*hd);y(6)=50*sin(nx1*hd)-25*cos(nx1*hd);x(7)=s3*1000-50*cos(nx1*hd)+25*sin(nx1*hd);y(7)=-25*cos(nx1*hd)-50*sin(nx1*hd);x(8)=s3*
7、1000-50*cos(nx1*hd)-25*sin(nx1*hd);y(8)=25*cos(nx1*hd)-50*sin(nx1*hd);x(9)=s3*1000+50*cos(nx1*hd)-25*sin(nx1*hd);y(9)=50*sin(nx1*hd)+25*cos(nx1*hd);x(10)=s3*1000+50*cos(nx1*hd)+25*sin(nx1*hd);y(10)=50*sin(nx1*hd)-25*cos(nx1*hd);x(11)=l1*1000*cos(nx*hd)+l2*1000*cos(nx1*hd);y(11)=l1*1000*sin(nx*hd)+l2
8、*1000*sin(nx1*hd);x(12)=l1*1000*cos(nx*hd)+l2*1000*cos(nx1*hd)+l6*1000*sin(nx1*hd);y(12)=l1*1000*sin(nx*hd)+l2*1000*sin(nx1*hd)-l6*1000*cos(nx1*hd);x(13)=a*1000;y(13)=l1*1000*sin(nx*hd)+l2*1000*sin(nx1*hd)-l6*1000*cos(nx1*hd)-l4*1000*sin(nx2*hd);x(14)=a*1000-20;y(14)=l1*1000*sin(nx*hd)+l2*1000*sin(n
9、x1*hd)-l6*1000*cos(nx1*hd)-l4*1000*sin(nx2*hd)+50;x(15)=a*1000;y(15)=l1*1000*sin(nx*hd)+l2*1000*sin(nx1*hd)-l6*1000*cos(nx1*hd)-l4*1000*sin(nx2*hd)+50;x(16)=a*1000+20;y(16)=l1*1000*sin(nx*hd)+l2*1000*sin(nx1*hd)-l6*1000*cos(nx1*hd)-l4*1000*sin(nx2*hd)+50;x(17)=a*1000+20;y(17)=l1*1000*sin(nx*hd)+l2*1
10、000*sin(nx1*hd)-l6*1000*cos(nx1*hd)-l4*1000*sin(nx2*hd)-50;x(18)=a*1000;y(18)=l1*1000*sin(nx*hd)+l2*1000*sin(nx1*hd)-l6*1000*cos(nx1*hd)-l4*1000*sin(nx2*hd)-50;x(19)=a*1000-20;y(19)=l1*1000*sin(nx*hd)+l2*1000*sin(nx1*hd)-l6*1000*cos(nx1*hd)-l4*1000*sin(nx2*hd)-50;x(20)=a*1000-20;y(20)=l1*1000*sin(nx
11、*hd)+l2*1000*sin(nx1*hd)-l6*1000*cos(nx1*hd)-l4*1000*sin(nx2*hd)+50;k=1:2;plot(x(k),y(k);k=2:5;k=6:10;k=11:12;k=12:13;k=14:20;plot(x(1),y(1),oplot(x(2),y(2),plot(x(4),y(4),plot(x(12),y(12),plot(x(13),y(13),机构简图mmaxis(-100 1300 -1100 300);%4.运动仿真figure(2)m=moviein(20);j=0;j=j+1;clf;x(2)=l1*1000*cos(t
12、heta1(n1);y(2)=l1*1000*sin(theta1(n1);x(3)=s3*1000-50*cos(theta2(n1);y(3)=-50*sin(theta2(n1);x(5)=s3*1000+150*cos(theta2(n1);y(5)=150*sin(theta2(n1);x(6)=s3*1000+50*cos(theta2(n1)+25*sin(theta2(n1);y(6)=50*sin(theta2(n1)-25*cos(theta2(n1);x(7)=s3*1000-50*cos(theta2(n1)+25*sin(theta2(n1);y(7)=-25*cos
13、(theta2(n1)-50*sin(theta2(n1);x(8)=s3*1000-50*cos(theta2(n1)-25*sin(theta2(n1);y(8)=25*cos(theta2(n1)-50*sin(theta2(n1);x(9)=s3*1000+50*cos(theta2(n1)-25*sin(theta2(n1);y(9)=50*sin(theta2(n1)+25*cos(theta2(n1);x(10)=s3*1000+50*cos(theta2(n1)+25*sin(theta2(n1);y(10)=50*sin(theta2(n1)-25*cos(theta2(n1
14、);x(11)=l1*1000*cos(theta1(n1)+l2*1000*cos(theta2(n1);y(11)=l1*1000*sin(theta1(n1)+l2*1000*sin(theta2(n1);x(12)=l1*1000*cos(theta1(n1)+l2*1000*cos(theta2(n1)+l6*1000*sin(theta2(n1);y(12)=l1*1000*sin(theta1(n1)+l2*1000*sin(theta2(n1)-l6*1000*cos(theta2(n1);y(13)=l1*1000*sin(theta1(n1)+l2*1000*sin(the
15、ta2(n1)-l6*1000*cos(theta2(n1)-l4*1000*sin(theta4(n1);y(14)=l1*1000*sin(theta1(n1)+l2*1000*sin(theta2(n1)-l6*1000*cos(theta2(n1)-l4*1000*sin(theta4(n1)+50;y(15)=l1*1000*sin(theta1(n1)+l2*1000*sin(theta2(n1)-l6*1000*cos(theta2(n1)-l4*1000*sin(theta4(n1)+50;y(16)=l1*1000*sin(theta1(n1)+l2*1000*sin(the
16、ta2(n1)-l6*1000*cos(theta2(n1)-l4*1000*sin(theta4(n1)+50;y(17)=l1*1000*sin(theta1(n1)+l2*1000*sin(theta2(n1)-l6*1000*cos(theta2(n1)-l4*1000*sin(theta4(n1)-50;y(18)=l1*1000*sin(theta1(n1)+l2*1000*sin(theta2(n1)-l6*1000*cos(theta2(n1)-l4*1000*sin(theta4(n1)-50;y(19)=l1*1000*sin(theta1(n1)+l2*1000*sin(
17、theta2(n1)-l6*1000*cos(theta2(n1)-l4*1000*sin(theta4(n1)-50;y(20)=l1*1000*sin(theta1(n1)+l2*1000*sin(theta2(n1)-l6*1000*cos(theta2(n1)-l4*1000*sin(theta4(n1)+50;axis(-300 1300 -1100 300);运动仿真axis equal;m(j)=getframe;movie(m);子程序six_bar文件%1计算角位移和线位移s2=sqrt(s3-l1*cos(theta1)*(s3-l1*cos(theta1)+(l1*sin
18、(theta1)*(l1*sin(theta1);theta2=asin(-l1*sin(theta1)/s2);theta4=acos(l1*cos(theta1)+l2*cos(theta2)+l6*sin(theta2)-a)/l4);s5=l4*sin(theta4)+l6*cos(theta2)-l1*sin(theta1)-l2*sin(theta2);theta(1)=s2;theta(2)=theta2;theta(3)=theta4;theta(4)=s5;%计算角速度和线速度A=sin(theta2),s2*cos(theta2),0,0; cos(theta2),-s2*
19、sin(theta2),0,0; 0,l2*cos(theta2)+l6*sin(theta2),-l4*cos(theta4),1; 0,l2*sin(theta2)-l6*sin(theta2),-l4*sin(theta4),0;B=-l1*cos(theta1);l1*sin(theta1);-l1*cos(theta1);-l1*sin(theta1);omega=A(omega1*B);V2=omega(1);omega2=omega(2);omega4=omega(3);V5=omega(4);%计算角加速度和加速度 0,l2*cos(theta2)+sin(theta2),-l
20、4*cos(theta4),1; 0,l2*sin(theta2)-l6*cos(theta2),l4*sin(theta4),0;At=-2*omega2*sin(theta2),s2*omega2*sin(theta2),0,0; 2*omega2*sin(theta2),s2*omega2*cos(theta2),0,0; 0,l2*omega2*sin(theta2)-l6*omega2*cos(theta2),-l4*omega4*sin(theta4),0; 0,-l2*omega2*cos(theta2)-l6*omega2*sin(theta2),l4*omega4*cos(theta4),0;Bt=l1*omega1*sin(theta1);l1*omega1*cos(theta1);l1*omega1*sin(theta1);l1*omega1*cos(theta1);alpha=A(At*omega+omega1*Bt);a2=alpha(1);alpha2=alpha(2);alpha4=alpha(3);a5=alpha(4);4 计算结果图2为运算结果和六杆机构的运动线图图2
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1