平面连杆机构运动分析Word格式文档下载.docx
《平面连杆机构运动分析Word格式文档下载.docx》由会员分享,可在线阅读,更多相关《平面连杆机构运动分析Word格式文档下载.docx(46页珍藏版)》请在冰豆网上搜索。
![平面连杆机构运动分析Word格式文档下载.docx](https://file1.bdocx.com/fileroot1/2022-11/21/dea52249-d98d-4eb6-8fb1-70d0c0ddd3b8/dea52249-d98d-4eb6-8fb1-70d0c0ddd3b81.gif)
V3=[V350K]
V3=V1\V2
A12=[-11cos^-llsinq00]
A,=AH+AI2
A3=[a3/4YiS]
A3=A2\Aj
三、计算程序框
四、计算源程序
4・1主程序
*输入已知数据
clear
11=0.0240;
12=0.1056;
13=0.0675;
14=0.0875;
15=0.0344;
16=0.025;
122=0.065;
xg=0.1535;
yg=0.0417;
omegal=l;
alphl=0;
hd=p±
/180;
du=180/pi;
tl=l:
10:
361;
theta2=l:
theta3=l:
theta5=l:
theta6=l:
omega2=l:
omega3=l:
omega5=l:
omega6=l:
alph2=l:
alph3=l:
alph5=l:
alph6=l:
xe=l:
ye=l:
V=l:
a=l:
thetal=0;
opt±
ons=gaoptimset('
PopularionSize1,100,'
Generations*,10000,'
StallGenLiraic'
500,*TolFun\le-100);
thetaO=ga((thet)weiyi__0(thet,thecal),4.options);
ifthetaO
(1)<
thetaO
(1)=theta0
(1)+2*pi;
end
ifthetaO
(1)>
2*pi
thetaO
(1)=thetaO
(1)~2*pi;
ifthetaO
(2)<
thetaO
(2)=thetaO
(2)+2*pi;
ifthetaO
(2)>
thetaO
(2)=thetaO
(2)-2*pi;
ifthetaO(3)<
thecaO(3)=thetaO(3)+2*pi;
ifthetaO(3)>
thetaO(3)=thetaO(3)-2*pi;
end
ifthetaO(4)<
thetaO(4)=thetaO(4)+2*pi;
ifthetaO(4)>
thetaO(4)=theta0(4)-2*pi;
*调用子函数Fun_jixiei|-算该八杆机构的各杆角位移、角速度、角加速度以及E点的角位移、角速度、角加速度
fornl=l:
361
thetal=(nl-1)*hd;
tl(nl)=thetal*du;
theta=fsolve((thet)weiyi(thet^thecal),thetaO);
iftheta
(1)<
theta
(1)=theta
(1)+2*pi;
iftheta
(1)>
theta
(1)=theta
(1)-2*pi;
iftheta
(2)<
theta
(2)=theta
(2)+2*pi;
iftheta
(2)>
theta
(2)=theta
(2)-2*pi;
iftheta(3)<
theta(3)=theta(3)+2*pi;
iftheta(3)>
theta(3)=theta(3)-2*pi;
iftheta(4)<
theta(4)=theta(4)+2*pi;
iftheta(4)>
theta(4)=theta(4)-2*pi;
[xe(nl),ye(nl)]=weiyi_E(thetalztheta,11,12z122);
[omega,alph]=Fun_jixie(thetal,omegal,11^12,13,15^16,122,theta);
[V(nl)za(nl))=suau_jasudu_E(omega
(1),alph
(1)zthetazthecal,omegal,11,12,122zaIphl);
theta2(nl)=theta
(1);
theta3(nl)=theca
(2);
theta5(nl)=theta(3);
theta6(nl)=theta(4);
omega2(nl)=omega
(1);
omega3(nl)=omega
(2);
omega5(nl)=omega(3);
omega©
(nl)=omega(4);
alph2(nl)=alph
(1);
alph3(nl)=alph
(2);
alph5(nl)=alph(3);
alph6(nl)=alph(4);
thetaO=theta;
冬绘制各杆件的角位移、角速度、角加速度
n2=l:
nl=l:
figure
(1);
%%%%%%
subplot(2,2f1)%绘制位移线图
plot((nl-1),theta2(n2)*duz'
r-1r(nl-1)rtheta3(n2)*duz1g-1f,theta5(n2)*a
uz*y-1,(nl-1),theta6(n2)*auz1k-*,1LineWidth1,1・5);
titleCft杆角位移线图J;
xlabel(1原动件l\theca_l/\circ1);
ylabel(■角位移八circ'
);
gridon;
holdon;
text(200r60,・«
121);
text(200,150,'
n3'
text(200r350,t】5・);
text(200r260,'
»
$•);
subplot(2,2,2)*绘制角速度线图
plot((nl-1)romega2(n2),°
r-'
.(nl-1),omega3(n2),'
g-'
(nl-1)tomega5(n2),'
y-1,(n
1-1),omega6(n2),1k-'
'
LineWidth'
].・5);
title(1ft杆角速度线图J;
xlabel('
原动件l\theca_l/\circ'
ylabelCJfiii度/rad\cdots八{7「);
holdcn;
subplot(乙2,3)*绘制角加速度线图
plot((nl-1),alph2(n2)z'
r-1,(nl-1),alph3(n2),'
g-1f(nl-1),alph5(n2),1y1r(nl-1
),alphS(n2)z'
k-'
f*LineVTidrh1f1.5);
title角加速度线图T;
xlabel(1原1\theta__l/\circ*);
ylabel{'
角力卩速度/rad\cdots八{-2}J;
%%%%%%%
*求E点的位移
figure
(2)
subplot(2f2,l)
plot(xe(nl),ye(nl)f1r-1z*LineWidth1,1・5);
title(«
E的位移线图,);
xlabelCE在x方向位移J;
ylabel((E在y方向位移J;
§
求2点角速度与角加速度
subplot(2,2,2)§
绘制E点角速度
plot((nl-1)rV(nl)z'
r-'
'
LineWidth*,1・5);
title('
E点角速度J;
xlabel(*原动杵IXtheta^l/Xcirc1);
ylabelf'
E点角速度/rad\cdotsA{-1}1;
gridon;
subplot(2,2,3)勺绘制E点角加速度
plot((nl-1),a(nl)z1r-'
z1LineWidth'
1・5);
E点角加速度冷;
xlabel(1原动ftl\theca_l/\circ1);
ylabelfE点角加速度/rad\cdos八{-2}1);
*将数据输出到Exel表shujul.xls中xlswrite('
E
\shuju3・xls
xlswrite('
\shuju3・xls
E\shuju3・xlsxlswrite(1E\shuju3・xlsxlswrite(1E\shuju3・xls
\机械原理大作业\平面六杆机构\Matlab程序,tl(nl)1z'
sheetl1,'
Al1);
\机械原理大作业\平而六杆机构\Matlab程序rtheta2(nl)'
*auz'
sheecl1,'
Bl'
\机械原理大作业\平而八杆机构\Matlab程序,thetaS(nl)1*auz'
sheetl1z'
Cl'
\机械原理大作业\平而六杆机构\Matlab程序,theta5(nl)'
*auz1sheecl1,1Dl'
\机械原理大作业\TIlliA杆机构\Matlab程序
xlswrite(1E\shuju3・xlsxlswrite(1E\shuju3・xlsxlswrite(1E\shuju3・xls
tthetaS(nl)1*duz1sheetl1z'
El'
\机械原理大作业\平面八杆机构\Matlab程序,omega2(nl)1z1sheet!
'
z1Fl1);
\机械原理大作业\平血八杆机构\Matlab程序
omegaS(nl)1,*sheetl1,1G11);
\机械原理大作业\TlftlA杆机构\Matlab程序romega5(nl)1,'
sheet!
1,1Hl'
\机械原理大作业\平而六杆机构\Matlab程序romega6(nl)1,'
sheetl1,1II1);
\机械原理大作业\TllIlA杆机构\Matlab程序
xlswrite(1E
\shuju3・xls
alph2(nl)'
1sheetl1,1Jl'
\机械原理大作业\平面人杆机构\Matlab程序falph3(nl)'
'
sheetl1,'
Kl1);
\机械原理大作业\TlfllA杆机构\Mat:
Lab程序talph5(nl)'
LI'
\机械原理大作业\平面六杆机构\Matlab程序
alph6(nl)'
1sheetl1,'
Ml'
\机械原理大作业\平面川杆机构\Matlab程序rV(nl)\1sheetl\'
Nl1);
\机械原理大作业\平而穴杆机构\Matlab程序
\shuju3・xls\a(nl)\'
sheerl\*01'
4.2从动件角位移,角速度,角加速度
function[omega,alph]=Fun_jixie(thetal,omegalf11,12,13r15z16,122ztheta)*从动件角位移
theta2=theta
(1);
theta3=theta
(2);
theta5=theta(3);
theta6=theta(4);
备计算从动件角速度
A=[-12*sin(theta2),13*sin(theta3)r0,
12*cos(theta2),-13*cos(theta3)f0z
0;
o;
-122*sin(theta2-pi/3)r-13*sin(theta3),-15*sin(thetaS),16*sin(theta6);
122*cos(theta2-pi/3)z13*cos(theta3)z15*cos(thetaS),-16*cos(theta6)];
B=[ll*sin(thecal);
-ll*cos(thetal);
0;
0);
omega=A\(omegal*B);
omega2=omega
(1);
omega3=omega
(2);
omega5=omega(3);
omega6=omega(4);
%%%%%
务计算角从动件角加速度
A=[-12*sin(theta2)r13*sin(theta3),0z
12*cos(theta2),-13*cos(theta3).0z
0;
-122*sin(theta2-pi/3)r-13*sin(theta3),-15*sin(thetaS),16*sin(thetafi);
122*cos(theta2-pi/3),13*cos(theta3)z15*cos(theta5),-16*cos(theta6)];
AC=[-12*omega2*cos(theta2)r13*omega3*cos(thetaS),
-12*omega2*sin(theta2),13*omega3*sin(theta3)r
-122*omega2*cos(theta2-
o,o;
pi/3)z-13*omega3*cos(theta3)r-15*omega5*cos(theta5),16*omega6*cos(theta6);
-122*omega2*sin(theta2-
pi/3),-13*omega3*sin(theta3)r-15*omega5*sin(theta5),16*omega6*sin(thetaS)];
Bt=[omegal*ll*cos(thetal);
omegal*ll*sin(thetal);
alph=A\(-At*omega+omegal*Bt);
43E点角速度,角加速度
function[Vza]=sudu_jasudu_E(omega,alphrtheta,thetal,omegalr11,12,122,alphl)务求E点角速度
A=[~ll*sin(thetal)r-12*sin(tbeta
(2))+122*sin(pi/3-theta
(1));
ll*cos(thetal)z1
2*cos(theta
(1))-122*cos(pi/3-theta
(1))];
B=[omega1;
omega
(1)];
Vx=-ll*sin(thecal)*omegal-12*sin(theta
(2))+122*sin(pi/3-theta
(1))*omega
(1);
Vy=ll*cos(thecal)*omegal+12*cos(theta
(1))-122*cos(pi/3-theta
(1))*omega
(1);
V=sqrt(Vx"
2+Vy"
2);
*求E点角加速度
Dl=[alphl;
alph
(1)];
D2=[~ll*cos(theral)*omegalz-12*cos(theta
(1))*omega
(1)-122*cos(pi/3-theta
(1))♦omega
(1);
-ll*sin(thetal)*omegal^~12*sin(theta
(2))*omega
(1)+122*sin(pi/3-theta(l))*omega
(1)];
al=A*Dl+D2*B;
a=sqrt(al
(1)^2+al
(2)八2);
4.4E点位移
function[xezye]=weiyi_E(thecal,theta,2.1,12.122)
xe=ll*cos(thecal)+12*cos(theta
(1))+122*cos(pi/3-theta
(1));
ye=ll*sin(thecal)+12*sin(theta
(2))+122*sin(pi/3-theta
(1));
五、计算结果
各杆角位移变化
主动杆1
从动杆2
从动杆3
从动杆5
从动杆6
/(°
)
35.6084
65.6281
207.9752
248.0929
10
30.8934
61.5375
194.8392
245.6683
20
27.0862
59.5197
185.6508
242.7925
30
24.2472
59.4280
179・3291
237.8174
40
22.2711
60.9068
174.5082
230.1716
50
21.0007
63.5668
169.5566
219.5693
60
20.2899
67.0707
162.6546
205.5980
70
20.0246
71.1528
152.0191
187.9072
80
20.1229
75.6089
136.6623
167.0176
90
20.5287
80.2819
11&
6181
146.7459
100
2L2050
85.0474
102-4070
132-5408
110
22.1289
89.8033
90.2305
125.7210
120
23.2870
94.4630
81.3183
123.9271
130
24.6719
98.9507
74.4878
124.7856
140
26.2796
103.1990
68.9103
126・7727
150
28.1066
107.1472
64.1954
129.0116
160
30.1477
110.7413
60.0940
130.9266
170
32.3934
113.9345
56.4453
132.1274
180
34.8277
116.6874
53.1161
132.3493
190
37.4267
118.9678
49.9679
131.4342
200
40.1568
120.7503
46.8439
129.3229
210
42.9741
122.0147
43.5755
126.0459
220
45.8240
122.7435
40.0051
121.7036
230
4&
6401
122.9190
36.0147
116.4381
240
5L3440
122.5200
31.5507
HO.3952
250
53.8440
121.5184
26.6324
103.6769
260
56.0339
119.8763
21.3373
96.2852
270
57.7910
117.5442
15.7582
8&
0633
280
58.9751
114.4610
9.9287
7&
6388
290
59.4298
110.5579
3.6988
67.3608
300
58.9895
105.7702
356.5045
53.1802
310
57.4975
100.0632
346.8670
34.3210
320
54.8445
93.4802
331.2049
7.5042
330
51.0310
86.2118
302.1698
327.0469
340
46.2458
78.6793
25&
9097
27&
6551
350
40.9100
71.5539
227.0232
254.5326
360
65.6281
207.9744
248.0919
各杆角加位移变化
/C)
/(rad/s)
-0.5086
-1.5567
-0.3234
-0.4292
-0.3058
-1.0981
-0.2238
-0.3315
-0.1005
-0.7553
-0.3786
-0.2382
0.0760
-0.5319
-0.6263
-0.1597
0.2131
-0.4595
-0.9068
-0・0969
0・3132
-0.5604
-1.2182
-0・0472
0.3832
-0.8498
5798
-0.0072
0.4299
-1.3021
-1.9614
0.0260
0.4588
-1.7368
-2.1529
0.0546
0.4738
-1・7842
-1.7954
0.0803
0.4776
-1.4218
-1.0270
0.1043
0.4721
-1.0319
-0.3838