机械原理大作业凸轮.docx
《机械原理大作业凸轮.docx》由会员分享,可在线阅读,更多相关《机械原理大作业凸轮.docx(35页珍藏版)》请在冰点文库上搜索。
![机械原理大作业凸轮.docx](https://file1.bingdoc.com/fileroot1/2023-5/17/67958eec-8148-4797-b53c-d2f351f3dcad/67958eec-8148-4797-b53c-d2f351f3dcad1.gif)
机械原理大作业凸轮
大作业
(二)
凸轮机构设计
题号:
6
班级:
姓名:
学号:
同组者:
成绩:
完成时间:
一凸轮机构题目要求1
二摆杆的运动规律及凸轮轮廓线方程2
三计算程序3
四运算结果及凸轮机构图9
4.1第一组(A组)机构图及计算结果9
4.2第二组(B组)机构图及计算结果14
4.3第三组(C组)机构图及计算结果19
五心得体会24
第一组(A组)24
第二组(B组)24
第三组(C组)24
六参考资料25
附录程序框图26
一凸轮机构题目要求(摆动滚子推杆盘形凸轮机构)
题目要求:
试用计算机辅助设计完成下列偏置直动滚子推杆盘形凸轮机构或摆动滚子推杆盘形凸轮机构的设计,已知数据如下各表所示。
凸轮沿逆时针方向作匀速转动。
表一摆动滚子推杆盘形凸轮机构的已知参数
题号
初选的基圆半径R0/mm
机架长度Loa/mm
摆杆长度Lab/mm
滚子半径Rr/mm
推杆摆角φ
许用压力角
许用最小曲率半径[ρamin]
[α1]
[α2]
A
15
60
55
10
24°
35°
70°
0.3Rr
B
20
70
65
14
26°
40°
70°
0.3Rr
C
22
72
68
18
28°
45°
65°
0.35Rr
要求:
1)凸轮理论轮廓和实际轮廓的坐标值
2)推程和回程的最大压力角,及凸轮对应的转角
3)凸轮实际轮廓曲线的最小曲率
4)半径及相应凸轮转角
5)基圆半径
6)绘制凸轮理论廓线和实际廓线
7)计算点数:
N:
72~120
推杆运动规律:
1)推程运动规律:
等加速等减速运动
2)回程运动规律:
余弦加速度运动
二摆杆的运动规律及凸轮轮廓线方程
1)推程:
1,运动规律:
等加速等减速运动;
2,轮廓线方程:
A:
等加速推程段
设定推程加速段边界条件为:
在始点处δ=0,s=0,v=0。
在终点处
。
整理得:
(注意:
δ的变化范围为0~δ0/2。
)
B:
等减速推程段
设定推程减速段边界条件为:
在始点处
在终点处
,s=h,v=0。
整理得:
(注意:
δ的变化范围为δ0/2~δ0)
2)回程
(1)运动规律:
余弦加速度运动;
(2)轮廓线方程:
三计算程序(matlab)
functionpushbutton1_Callback(hObject,eventdata,handles)
%hObjecthandletopushbutton1(seeGCBO)
%eventdatareserved-tobedefinedinafutureversionofMATLAB
%handlesstructurewithhandlesanduserdata(seeGUIDATA)
t1=0;t5=360;
%输入
disp('凸轮运动规律:
近休;等加速等减速运动;远休;余弦加速度运动');
r0=str2num(get(handles.edit1,'string'));%初选基圆半径
L1=str2num(get(handles.edit2,'string'));%机架长度
L2=str2num(get(handles.edit3,'string'));%摆杆长度
Rr=str2num(get(handles.edit4,'string'));%滚子半径
Q0=str2num(get(handles.edit5,'string'));%摆杆摆角
a1=str2num(get(handles.edit6,'string'));a2=str2num(get(handles.edit7,'string'));
ppk=str2num(get(handles.edit8,'string'));
Pk=ppk*Rr;
t2=str2num(get(handles.edit9,'string'));t3=str2num(get(handles.edit10,'string'));t4=str2num(get(handles.edit11,'string'));
rm=str2num(get(handles.edit12,'string'));
n=str2num(get(handles.edit12,'string'));
fprintf('初选基圆半径R0=%d\n机架长度Loa=%d\n摆杆长度Lab=%d\n滚子半径Rr=%d\n推杆摆角ψ=%d\n推程许用压力角【a1】=%d°\n回程许用压力角【a2】=%d°\n许用最小曲率半径Pmin=%d\n',r0,L1,L2,Rr,Q0,a1,a2,Pk);
fprintf('凸轮近休起始转角:
%d°\n凸轮近休结束转角:
%d°\n凸轮推程结束转角:
%d°\n凸轮远休结束转角:
%d°\n凸轮回程结束转角:
%d°\n',t1,t2,t3,t4,t5);
a1=a1*pi/180;
a2=a2*pi/180;
Q0=(Q0*pi)/180;
x=zeros(1,n+1);y=zeros(1,n+1);xx=zeros(1,n+1);yy=zeros(1,n+1);
W=2*pi/n;zx=zeros(1,n+1);zy=zeros(1,n+1);zxx=zeros(1,n+1);zyy=zeros(1,n+1);
max=90;
forR0=r0:
rm
Q01=acos((L1^2+L2^2-R0^2)/(2*L1*L2));%q01机架与摆杆夹角
i=0;
forth=(t1*pi/180):
(2*pi/n):
(t2*pi/180)
i=i+1;
x(i)=L1*sin(th)-L2*sin(th+Q01);
y(i)=L1*cos(th)-L2*cos(th+Q01);
xx(i)=(R0-Rr)/R0*x(i);yy(i)=(R0-Rr)/R0*y(i);
end
i=i-1;max1=0;th1=0;k=100;thk=0;
t=t2;
ifrem(t,360/n)>0
i=i+1;
end
whilerem(t,360/n)>0
t=t+1;
end
forth=(t2*pi/180):
(2*pi/n):
(((t3-t2)/2+t2)*pi/180)
i=i+1;
Q=2*Q0*(th-t2*pi/180)^2/((t3-t2)*pi/180)^2;
x(i)=L1*sin(th)-L2*sin(th+Q+Q01);y(i)=L1*cos(th)-L2*cos(th+Q+Q01);
DX1=L1*cos(th)-L2*cos(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*(1+129600*Q0*(th-1/180*t2*pi)/(t3-t2)^2/pi^2);%x轴角速度
DY1=-L1*sin(th)+L2*sin(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*(1+129600*Q0*(th-1/180*t2*pi)/(t3-t2)^2/pi^2);%y轴角速度
ths1=DX1/sqrt(DX1^2+DY1^2);
thc1=-DY1/sqrt(DX1^2+DY1^2);
xx(i)=x(i)-Rr*thc1;yy(i)=y(i)-Rr*ths1;
dQ1=129600*Q0*(th-1/180*t2*pi)/(t3-t2)^2/pi^2;%角速度
a=atan((L2*abs(dQ1)-(L1*cos(Q01+Q)-L2))/(L1*sin(Q01+Q)));
ifa>max1
max1=a;
th1=th;
end
%K1=subs(K1);
K1=((L1*cos(th)-L2*cos(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*(1+129600*Q0*(th-1/180*t2*pi)/(t3-t2)^2/pi^2))*(-L1*cos(th)+L2*cos(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*(1+129600*Q0*(th-1/180*t2*pi)/(t3-t2)^2/pi^2)^2+129600*L2*sin(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*Q0/(t3-t2)^2/pi^2)-(-L1*sin(th)+L2*sin(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*(1+129600*Q0*(th-1/180*t2*pi)/(t3-t2)^2/pi^2)^2-129600*L2*cos(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*Q0/(t3-t2)^2/pi^2)*(-L1*sin(th)+L2*sin(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*(1+129600*Q0*(th-1/180*t2*pi)/(t3-t2)^2/pi^2)))/((L1*cos(th)-L2*cos(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*(1+129600*Q0*(th-1/180*t2*pi)/(t3-t2)^2/pi^2))^2+(-L1*sin(th)+L2*sin(th+64800*Q0*(th-1/180*t2*pi)^2/(t3-t2)^2/pi^2+Q01)*(1+129600*Q0*(th-1/180*t2*pi)/(t3-t2)^2/pi^2))^2)^(3/2);
kr=1/abs(K1);
ifk>kr
k=kr;
thk=th;
end
end
i=i-1;
t=round((t3-t2)/2+t2);
if(t<(t3-t2)/2+t2)
t=t+1;
i=i+1;
end
if(t<(t3-t2)/2+t2||t>(t3-t2)/2+t2||rem(t,360/n)>0)
i=i+1;
end
whilerem(t,360/n)>0
t=t+1;
end
forth=(t*pi/180):
(2*pi/n):
(t3*pi/180)
i=i+1;
Q=Q0-2*Q0*(t3*pi/180-th)^2/((t3-t2)*pi/180)^2;
x(i)=L1*sin(th)-L2*sin(th+Q+Q01);y(i)=L1*cos(th)-L2*cos(th+Q+Q01);
DX2=L1*cos(th)+L2*cos(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*(-1-129600*Q0*(1/180*t3*pi-th)/(t3-t2)^2/pi^2);
DY2=-L1*sin(th)+L2*sin(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*(-1-129600*Q0*(1/180*t3*pi-th)/(t3-t2)^2/pi^2);
ths2=DX2/sqrt(DX2^2+DY2^2);
thc2=-DY2/sqrt(DX2^2+DY2^2);
xx(i)=x(i)-Rr*thc2;yy(i)=y(i)-Rr*ths2;
dQ2=129600*Q0*(1/180*t3*pi-th)/(t3-t2)^2/pi^2;
a=atan((L2*abs(dQ2)-(L1*cos(Q01+Q)-L2))/(L1*sin(Q01+Q)));
ifa>max1
max1=a;
th1=th;
end
%K2=subs(K2);
K2=((L1*cos(th)+L2*cos(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*(-1-129600*Q0*(1/180*t3*pi-th)/(t3-t2)^2/pi^2))*(-L1*cos(th)+L2*cos(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*(-1-129600*Q0*(1/180*t3*pi-th)/(t3-t2)^2/pi^2)^2+129600*L2*sin(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*Q0/(t3-t2)^2/pi^2)-(-L1*sin(th)-L2*sin(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*(-1-129600*Q0*(1/180*t3*pi-th)/(t3-t2)^2/pi^2)^2+129600*L2*cos(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*Q0/(t3-t2)^2/pi^2)*(-L1*sin(th)+L2*sin(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*(-1-129600*Q0*(1/180*t3*pi-th)/(t3-t2)^2/pi^2)))/((L1*cos(th)+L2*cos(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*(-1-129600*Q0*(1/180*t3*pi-th)/(t3-t2)^2/pi^2))^2+(-L1*sin(th)+L2*sin(-th-Q0+64800*Q0*(1/180*t3*pi-th)^2/(t3-t2)^2/pi^2-Q01)*(-1-129600*Q0*(1/180*t3*pi-th)/(t3-t2)^2/pi^2))^2)^(3/2);
kr=1/abs(K2);
ifk>kr
k=kr;
thk=th;
end
end
ifmax>max1||max<=a1
max=max1;
rh=sqrt(x(i)^2+y(i)^2);
i=i-1;max2=0;th2=0;
t=round(t3);
whilerem(t,360/n)>0
t=t-1;
end
forth=(t*pi/180):
2*pi/n:
(t4*pi/180)
i=i+1;
x(i)=L1*sin(th)-L2*sin(th+Q0+Q01);y(i)=L1*cos(th)-L2*cos(th+Q0+Q01);
xx(i)=(rh-Rr)/rh*x(i);yy(i)=(rh-Rr)/rh*y(i);
end
i=i-1;
t=round(t4);
ifrem(t,360/n)>0
i=i+1;
end
whilerem(t,360/n)>0
t=t+1;
end
forth=(t*pi/180):
(2*pi/n):
(t5*pi/180)
i=i+1;
Q=Q0*(1+cos(pi*(th-(t*pi/180))/(2*pi-t4*pi/180)))/2;
Q1=-pi*(Q0)*sin(pi*(th-(t*pi/180))/(2*pi-t4*pi/180))/2/(2*pi-t4*pi/180);
Q2=-pi^2*(Q0)*cos(pi*(th-(t*pi/180))/(2*pi-t4*pi/180))/2/(2*pi-t4*pi/180)^2;
x(i)=L1*sin(th)-L2*sin(th+Q+Q01);y(i)=L1*cos(th)-L2*cos(th+Q+Q01);
DX3=L1*cos(th)-L2*cos(th+Q+Q01)*(1+Q1);
DY3=-L1*sin(th)+L2*sin(th+Q+Q01)*(1+Q1);
ths3=DX3/sqrt(DX3^2+DY3^2);
thc3=-DY3/sqrt(DX3^2+DY3^2);
xx(i)=x(i)-Rr*thc3;yy(i)=y(i)-Rr*ths3;
dQ3=Q1;
a=atan((L2*abs(dQ3)+(L1*cos(Q01+Q)-L2))/(L1*sin(Q01+Q)));
ifa>max2
max2=a;
th2=th;
end
%K3=subs(K3);
K3=(DX3*(-L1*cos(th)+L2*cos(th+Q+Q01)*(1+Q1)^2+L2*sin(th+Q+Q01)*(Q2))-(-L1*sin(th)+L2*sin(th+Q+Q01)*(1+Q1)^2-L2*cos(th+Q+Q01)*(Q2))*(-L1*sin(th)+L2*sin(th+Q+Q01)*(1+Q1)))/((L1*cos(th)-L2*cos(th+Q+Q01)*(1+Q1))^2+(-L1*sin(th)+L2*sin(th+Q+Q01)*(1+Q1))^2)^(3/2);
kr=1/abs(K3);
ifk>kr
k=kr;
thk=th;
end
end
th1=th1*180/pi;
th2=th2*180/pi;
thk=thk*180/pi;
d
(1)=max1*180/pi;d
(2)=th1;d(3)=max2*180/pi;d(4)=th2;d(5)=k;d(6)=thk;d(7)=R0;
data(1,:
)=x;
data(2,:
)=y;
data(3,:
)=xx;
data(4,:
)=yy;
ifmax1>a1||max2>a2||(k-Rr)continue
else
break;
end
end
end
%绘图
axes(handles.axes1);
h=3;
x=data(1,:
);
y=data(2,:
);
xx=data(3,:
);
yy=data(4,:
);
ro=d(7);
whileh
fork=1:
n
z=0:
360;
rx=x(k)+Rr*cos(z*pi/180);
ry=y(k)+Rr*sin(z*pi/180);
rox=ro*cos(z*pi/180);
roy=ro*sin(z*pi/180);
lx=[x(k)0];ly=[y(k)L1];
lxx=[00];lyy=[L10];
plot(x,y,rx,ry,lx,ly,xx,yy,rox,roy,'--',lxx,lyy,'--');
axis([-100100-100100])
axis('square')
pause(0.01);
drawnow;
fori=1:
n+1
zx(i)=x(i)*cos(W)-y(i)*sin(W);
zy(i)=x(i)*sin(W)+y(i)*cos(W);
zxx(i)=xx(i)*cos(W)-yy(i)*sin(W);
zyy(i)=xx(i)*sin(W)+yy(i)*cos(W);
end
x=zx;y=zy;
xx=zxx;yy=zyy;
end
h=h-1;
end
%导出数据及结果
disp('-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-');
disp('——————————计算结果——————————');
disp('-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-');
ifmax>a1
disp('无法满足条件,求出的结果为推程压力角最小时的解!
');
end
fprintf('推程最大压力角=%f°\n对应转角=%f°\n回程最大压力角=%f°\n对应转角=%f°\n最小曲率半径Pmin=%f\n对应转角=%f°\n最后确定基圆半径=%f\n',d
(1),d
(2),d(3),d(4),d(5),d(6),d(7));
disp('正在导出数据,请稍候……');
title={'凸轮转角';'理论轮廓X';'理论轮廓Y';'实际轮廓X';'实际轮廓Y'};
xlswrite('data.xls',title');
dd=0:
360/n:
360;
dd=[dd'data'];
xlswrite('data.xls',dd,'A2:
E362');
disp('数据导出完毕,请查看当前目录下的data.xls文件');
四运算结果及凸轮机构图
4.1A组
4.1.1交互界面图及凸轮机构图
4.1.2轮廓线坐标
凸轮转角
理论轮廓X
理论轮廓Y
实际轮廓X
实际轮廓Y
0
-24.7167
10.86667
-15.5624
6.841975
3
-24.1141
12.14535
-15.183
7.64707
6
-23.4454
13.39074
-14.7619
8.431205
9
-22.7125
14.59942
-14.3005
9.19223
12
-21.9173
15.7681
-13.7998
9.92806
15
-21.062
16.89355
-13.2613
10.63668
18
-20.149
17.9727
-12.6864
11.31614
21
-19.1808
19.00258
-12.0768
11.96459
24
-18.16
19.98038
-11.4341
12.58024
27
-17.0894
20.90342
-10.76
13.16141
30
-15.972
21.76916
-10.0564
13.70651
33
-14.8108
22.57524
-9.3253
14.21404
36
-13.609
23.31943
-8.56861
14.68261
39
-12.3699
23.99971
-7.78844
15.11093
42
-11.0969
24.61421
-6.98692
15.49784
45
-9.79346
25.16124
-6.16625
15.84226
48
-8.4632
25.63931
-5.32868
16.14327
51
-7.10974
26.0471
-4.4765
16.40003
54
-5.7368
26.3835
-3.61