平面连杆机构运动分析.docx

上传人:b****7 文档编号:11100260 上传时间:2023-02-25 格式:DOCX 页数:30 大小:677.92KB
下载 相关 举报
平面连杆机构运动分析.docx_第1页
第1页 / 共30页
平面连杆机构运动分析.docx_第2页
第2页 / 共30页
平面连杆机构运动分析.docx_第3页
第3页 / 共30页
平面连杆机构运动分析.docx_第4页
第4页 / 共30页
平面连杆机构运动分析.docx_第5页
第5页 / 共30页
点击查看更多>>
下载资源
资源描述

平面连杆机构运动分析.docx

《平面连杆机构运动分析.docx》由会员分享,可在线阅读,更多相关《平面连杆机构运动分析.docx(30页珍藏版)》请在冰豆网上搜索。

平面连杆机构运动分析.docx

平面连杆机构运动分析

 

大作业

(一)

平面连杆机构的运动分析

 

班级:

姓名:

姓名:

姓名:

指导教师:

完成日期:

一、题目及原始数据

、平面连杆机构的运动分析题目:

如图所示,为一平面六杆机构。

设已知各构件的尺寸如表所示,又知原动件1以等角速度

=1rad/s沿逆时针方向回转,试求各从动件的角位移、角速度及角加速度以及位移E点的位移、速度及加速度的变化情况。

表平面六杆机构的尺寸参数

=65mm,

=,

=

题号

A

B

C

1-A

25

60°

=

=24

=

要求每组(每三人为一组,每人一题)至少打印一份源程序,每个同学计

算出原动件从0º到360º时(计算点数N=36)所要求各运动变量的大小,并绘出各组应的运动线图以及E点的轨迹曲线。

二、平面连杆机构运动分析方程

、位移方程:

、速度方程:

、加速度方程:

三、计算程序框图

4、计算源程序

主程序

%输入已知数据

clear

l1=;

l2=;

l3=;

l4=;

l5=;

l6=;

l22=;

xg=;

yg=;

omega1=1;

alph1=0;

hd=pi/180;

du=180/pi;

t1=1:

10:

361;

theta2=1:

10:

361;

theta3=1:

10:

361;

theta5=1:

10:

361;

theta6=1:

10:

361;

omega2=1:

10:

361;

omega3=1:

10:

361;

omega5=1:

10:

361;

omega6=1:

10:

361;

alph2=1:

10:

361;

alph3=1:

10:

361;

alph5=1:

10:

361;

alph6=1:

10:

361;

xe=1:

10:

361;

ye=1:

10:

361;

V=1:

10:

361;

a=1:

10:

361;

theta1=0;

options=gaoptimset('PopulationSize',100,'Generations',10000,'StallGenLimit',500,'TolFun',1e-100);

theta0=ga(@(thet)weiyi_0(thet,theta1),4,options);

iftheta0

(1)<0

theta0

(1)=theta0

(1)+2*pi;end

iftheta0

(1)>2*pi

theta0

(1)=theta0

(1)-2*pi;end

iftheta0

(2)<0

theta0

(2)=theta0

(2)+2*pi;end

iftheta0

(2)>2*pi

theta0

(2)=theta0

(2)-2*pi;end

iftheta0(3)<0

theta0(3)=theta0(3)+2*pi;end

iftheta0(3)>2*pi

theta0(3)=theta0(3)-2*pi;end

iftheta0(4)<0

theta0(4)=theta0(4)+2*pi;end

iftheta0(4)>2*pi

theta0(4)=theta0(4)-2*pi;

end

%调用子函数Fun_jixie计算该六杆机构的各杆角位移、角速度、角加速度以及E点的角位移、角速度、角加速度

forn1=1:

10:

361

theta1=(n1-1)*hd;

t1(n1)=theta1*du;

theta=fsolve(@(thet)weiyi(thet,theta1),theta0);

iftheta

(1)<0

theta

(1)=theta

(1)+2*pi;end

iftheta

(1)>2*pi

theta

(1)=theta

(1)-2*pi;end

iftheta

(2)<0

theta

(2)=theta

(2)+2*pi;end

iftheta

(2)>2*pi

theta

(2)=theta

(2)-2*pi;end

iftheta(3)<0

theta(3)=theta(3)+2*pi;end

iftheta(3)>2*pi

theta(3)=theta(3)-2*pi;end

iftheta(4)<0

theta(4)=theta(4)+2*pi;end

iftheta(4)>2*pi

theta(4)=theta(4)-2*pi;end

[xe(n1),ye(n1)]=weiyi_E(theta1,theta,l1,l2,l22);

[omega,alph]=Fun_jixie(theta1,omega1,l1,l2,l3,l5,l6,l22,theta);

[V(n1),a(n1)]=sudu_jasudu_E(omega

(1),alph

(1),theta,theta1,omega1,l1,l2,l22,alph1);theta2(n1)=theta

(1);theta3(n1)=theta

(2);theta5(n1)=theta(3);theta6(n1)=theta(4);omega2(n1)=omega

(1);omega3(n1)=omega

(2);omega5(n1)=omega(3);omega6(n1)=omega(4);

alph2(n1)=alph

(1);alph3(n1)=alph

(2);alph5(n1)=alph(3);alph6(n1)=alph(4);

theta0=theta;

end

%绘制各杆件的角位移、角速度、角加速度

n2=1:

10:

361;

n1=1:

10:

361;

figure

(1);%%%%%%

subplot(2,2,1)%绘制位移线图

plot((n1-1),theta2(n2)*du,'r-',(n1-1),theta3(n2)*du,'g-',(n1-1),theta5(n2)*du,'y-',(n1-1),theta6(n2)*du,'k-','LineWidth',;

title('各杆角位移线图');

xlabel('原动件1\theta_1/\circ');

ylabel('角位移/\circ');

gridon;holdon;

text(200,60,'θ2');

text(200,150,'θ3');

text(200,350,'θ5');

text(200,260,'θ6');

%%%%%%

subplot(2,2,2)%绘制角速度线图

plot((n1-1),omega2(n2),'r-',(n1-1),omega3(n2),'g-',(n1-1),omega5(n2),'y-',(n1-1),omega6(n2),'k-','LineWidth',;

title('各杆角速度线图');

xlabel('原动件1\theta_1/\circ');

ylabel('角速度/rad\cdots^{-1}');

gridon;holdon;

%%%%%%

subplot(2,2,3)%绘制角加速度线图

plot((n1-1),alph2(n2),'r-',(n1-1),alph3(n2),'g-',(n1-1),alph5(n2),'y-',(n1-1),alph6(n2),'k-','LineWidth',;

title('各杆角加速度线图');

xlabel('原动件1\theta_1/\circ');

ylabel('角加速度/rad\cdots^{-2}');

gridon;holdon;

%%%%%%%

%求E点的位移

figure

(2)

subplot(2,2,1)

plot(xe(n1),ye(n1),'r-','LineWidth',;

title('E的位移线图');

xlabel('E在x方向位移');

ylabel('E在y方向位移');

gridon;holdon;

%求E点角速度与角加速度

subplot(2,2,2)%绘制E点角速度

plot((n1-1),V(n1),'r-','LineWidth',;

title('E点角速度');

xlabel('原动件1\theta_1/\circ');

ylabel('E点角速度/rad\cdots^{-1}');

gridon;holdon;

subplot(2,2,3)%绘制E点角加速度

plot((n1-1),a(n1),'r-','LineWidth',;

title('E点角加速度');

xlabel('原动件1\theta_1/\circ');

ylabel('E点角加速度/rad\cdots^{-2}');

gridon;holdon;

%将数据输出到Exel表中

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',t1(n1)','sheet1','A1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',theta2(n1)'*du,'sheet1','B1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',theta3(n1)'*du,'sheet1','C1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',theta5(n1)'*du,'sheet1','D1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',theta6(n1)'*du,'sheet1','E1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',omega2(n1)','sheet1','F1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',omega3(n1)','sheet1','G1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',omega5(n1)','sheet1','H1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',omega6(n1)','sheet1','I1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',alph2(n1)','sheet1','J1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',alph3(n1)','sheet1','K1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',alph5(n1)','sheet1','L1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',alph6(n1)','sheet1','M1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',V(n1)','sheet1','N1');

xlswrite('E:

\机械原理大作业\平面六杆机构\Matlab程序\',a(n1)','sheet1','O1');

从动件角位移,角速度,角加速度

function[omega,alph]=Fun_jixie(theta1,omega1,l1,l2,l3,l5,l6,l22,theta)

%从动件角位移

theta2=theta

(1);theta3=theta

(2);theta5=theta(3);theta6=theta(4);

%%%%%%

%计算从动件角速度

A=[-l2*sin(theta2),l3*sin(theta3),0,0;

l2*cos(theta2),-l3*cos(theta3),0,0;

-l22*sin(theta2-pi/3),-l3*sin(theta3),-l5*sin(theta5),l6*sin(theta6);

l22*cos(theta2-pi/3),l3*cos(theta3),l5*cos(theta5),-l6*cos(theta6)];

B=[l1*sin(theta1);-l1*cos(theta1);0;0];

omega=A\(omega1*B);

omega2=omega

(1);omega3=omega

(2);omega5=omega(3);omega6=omega(4);

%%%%%

%计算角从动件角加速度

A=[-l2*sin(theta2),l3*sin(theta3),0,0;

l2*cos(theta2),-l3*cos(theta3),0,0;

-l22*sin(theta2-pi/3),-l3*sin(theta3),-l5*sin(theta5),l6*sin(theta6);

l22*cos(theta2-pi/3),l3*cos(theta3),l5*cos(theta5),-l6*cos(theta6)];

At=[-l2*omega2*cos(theta2),l3*omega3*cos(theta3),0,0;

-l2*omega2*sin(theta2),l3*omega3*sin(theta3),0,0;

-l22*omega2*cos(theta2-pi/3),-l3*omega3*cos(theta3),-l5*omega5*cos(theta5),l6*omega6*cos(theta6);

-l22*omega2*sin(theta2-pi/3),-l3*omega3*sin(theta3),-l5*omega5*sin(theta5),l6*omega6*sin(theta6)];

Bt=[omega1*l1*cos(theta1);omega1*l1*sin(theta1);0;0;];

alph=A\(-At*omega+omega1*Bt);

end

点角速度,角加速度

function[V,a]=sudu_jasudu_E(omega,alph,theta,theta1,omega1,l1,l2,l22,alph1)

%求E点角速度

A=[-l1*sin(theta1),-l2*sin(theta

(2))+l22*sin(pi/3-theta

(1));l1*cos(theta1),l2*cos(theta

(1))-l22*cos(pi/3-theta

(1))];

B=[omega1;omega

(1)];

Vx=-l1*sin(theta1)*omega1-l2*sin(theta

(2))+l22*sin(pi/3-theta

(1))*omega

(1);

Vy=l1*cos(theta1)*omega1+l2*cos(theta

(1))-l22*cos(pi/3-theta

(1))*omega

(1);

V=sqrt(Vx^2+Vy^2);

%求E点角加速度

D1=[alph1;alph

(1)];

D2=[-l1*cos(theta1)*omega1,-l2*cos(theta

(1))*omega

(1)-l22*cos(pi/3-theta

(1))*omega

(1);-l1*sin(theta1)*omega1,-l2*sin(theta

(2))*omega

(1)+l22*sin(pi/3-theta

(1))*omega

(1)];

a1=A*D1+D2*B;

a=sqrt(a1

(1)^2+a1

(2)^2);

end

E点位移

function[xe,ye]=weiyi_E(theta1,theta,l1,l2,l22)

xe=l1*cos(theta1)+l2*cos(theta

(1))+l22*cos(pi/3-theta

(1));

ye=l1*sin(theta1)+l2*sin(theta

(2))+l22*sin(pi/3-theta

(1));

end

5、计算结果

1-C

各杆角位移变化

主动杆1

从动杆2

从动杆3

从动杆5

从动杆6

/(°)

0

10

20

30

40

50

60

70

80

90

100

110

120

130

140

150

160

170

180

190

200

210

220

230

240

250

260

270

280

290

300

310

320

330

340

350

360

各杆角加位移变化

主动杆1

从动杆2

从动杆3

从动杆5

从动杆6

/(°)

/(rad/s)

0

10

20

30

40

50

60

70

80

90

100

110

120

130

140

150

160

170

180

190

200

210

220

230

240

250

260

270

280

290

300

310

320

330

340

350

360

各杆角加位移变化

主动杆1

从动杆2

从动杆3

从动杆5

从动杆6

E点速度

E点加速度

/(°)

/(rad/s²)

/(rad/s)

/(rad/s²)

0

10

20

30

40

50

60

70

80

90

100

110

120

130

140

150

160

170

180

190

200

210

220

230

240

250

260

270

280

290

300

310

320

330

340

350

360

1-A

各杆角位移变化:

主动杆1从动杆2从动杆3从动杆5从动杆6角速度变化:

主动杆1从动杆2从动杆3从动杆5从动杆6角加速度变化:

从动杆2从动杆3从动杆5从动杆6E点速度E点加速度

0

10

20

30

40

50

60

70

80

90

100

110

120

130

140

150

160

170

180

190

200

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 外语学习 > 英语考试

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1