基于MATLAB的凸轮设计

  • 格式:docx
  • 大小:108.46 KB
  • 文档页数:8

基于MATLAB的凸轮设计 ———————————————————————————————— 作者: ———————————————————————————————— 日期:

ﻩ 中国地质大学(武汉) 1. 凸轮要求 设计一对心直动滚子推杆盘形凸轮机构,滚子半径rr=10mm,凸轮以等角速度逆时针回转。凸轮转角δ=0~120 时,推杆等速上升20mm;δ=120~180 时,推杆远休止;δ=180~270时,推杆等加速等减速下降20mm;δ=270~360时,推杆近休止。要求推程的最大压力角α<=30,试选取合适的基圆半径,并绘制凸轮的廓线。问此凸轮是否有缺陷,应如何补救。

2.列出凸轮运动方程 {𝑆=30𝜋∗δ

𝑉=30𝜋𝑎=0

0<δ<2/3π

{𝑆=20𝑉=0𝑎=0 2/3π

{𝑆=360−480𝜋∗δ+160π2∗δ^2𝑉=−480𝜋−320𝜋2∗δ𝑎=−320/𝜋^2 5/4π<𝛿<32π {𝑆=0𝑉=0𝑎=0 2/3π<

δ<2π

3. 由方程写MATLAB源程序 %1.已知参数 clear; r0=50; %基圆半径 rr=10; %滚子半径 h=20; %行程 delta01=120;%推程运动角 delta02=60; % 远休角 delta03=90;%回程运动角 hd=pi/180; du=180/pi; n1=delta01+delta02; n2=delta01+delta02+delta03;

%2凸轮曲线设计 n=360; for i=1:360 %计算推杆运动规律 if i<=delta01 s(i)=30/pi*(i*hd); ds(i)=30/pi; ds=ds(i); elseif i>delta01 && i<=n1; s(i)=h; ds(i)=0; ds=ds(i); elseif i>n1 && i<=(n1+delta03/2) s(i)=-140+320/pi*(i*hd)-160/pi^2*(i*hd)^2; ds(i)=320/pi-320/pi^2*(i*hd); ds=ds(i); elseif i>(n1+delta03/2) && i<=n2 s(i)=360-480/pi*(i*hd)+160/pi^2*(i*hd)^2; ds(i)=-480/pi+320/pi^2*(i*hd); ds=ds(i); elseif i>n2 && i<=n s(i)=0; ds=0; end %计算凸轮轨迹曲线 xx(i)=(r0+s(i))*sin(i*hd);%计算理论轮廓曲线 yy(i)=(r0+s(i))*cos(i*hd); dx(i)=ds*sin(i*hd)+(r0+s(i))*cos(i*hd);%计算导数 dy(i)=ds*cos(i*hd)-(r0+s(i))*sin(i*hd); xp(i)=xx(i)+rr*dy(i)/sqrt(dx(i)^2+dy(i)^2); yp(i)=yy(i)-rr*dx(i)/sqrt(dx(i)^2+dy(i)^2); end

%3.输出凸轮轮廓曲线 figure(1); hold on; grid on; axis equal; axis([-(r0+h-30) (r0+h+10) -(r0+h+10) (r0+rr+10)]); text(r0+h+3,4,'X'); text(3,r0+rr+3,'Y'); text(-6,4,'O'); title('对心直动滚子推杆盘形凸轮设计'); xlabel('x/mm'); ylabel('y/mm'); plot([-(r0+h-40) (r0+h)],[0 0],'k'); plot([0 0],[-(r0+h) (r0+rr)],'k'); plot(xx,yy,'r--');%»绘凸轮实际轮廓曲线 ct=linspace(0,2*pi); plot(r0*cos(ct),r0*sin(ct),'g');%绘凸轮基圆 plot(rr*cos(ct),r0+rr*sin(ct),'k');%绘滚子圆 plot(0,r0,'o');%滚子圆中心 plot([0 0],[r0 r0+30],'k'); plot(xp,yp,'b'); %绘凸轮实际轮廓曲线

%4. 凸轮机构运动仿真 %计算凸轮滚子转角 xp0=0; yp0=r0-rr; dss=sqrt(diff(xp).^2+diff(yp).^2);%对轮廓曲线进行差分计算 ss(1)=sqrt((xp(1)-xp0)^2+(xp(1)-yp0)^2);%轮廓曲线第一点长度 for i=1:359 ss(i+1)=ss(i)+dss(i);%计算实际廓曲线长度 end phi=ss/rr;%计算滚子转角 %运动仿真开始 figure(2); m=moviein(20); j=0; for i=1:360 j=j+1; delta(i)=i*hd;%凸轮转角 xy=[xp',yp'];%凸轮实际轮廓曲线坐标 A1=[cos(delta(i)),sin(delta(i));%凸轮坐标旋转矩阵 -sin(delta(i)),cos(delta(i))]; xy=xy*A1;%旋转后实际凸轮曲线坐标 clf; %绘凸轮 plot(xy(:,1),xy(:,2)); hold on;axis equal; axis([-(120) (470) -(100) (140)]); plot([-(r0+h-40) (r0+h)],[0],'k');%绘凸轮水平轴 plot([0 0],[-(r0+h) (r0+rr)],'k');%绘凸轮垂直轴 plot(r0*cos(ct),r0*sin(ct),'g');%绘基圆 plot(rr*cos(ct),r0+s(i)+rr*sin(ct),'k');绘滚子圆 plot([0 rr*cos(-phi(i))],[r0+s(i) r0+s(i)+rr*sin(-phi(i))],'k'); % 绘滚子圆标线 plot([0 0],[r0+s(i) r0+s(i)+40],'k');%绘推杆 %绘推杆曲线 plot([1:360]+r0+h,s+r0); plot([(r0+h) (r0+h+360)],[r0 r0],'k'); plot([(r0+h) (r0+h)],[r0 r0+h],'k'); plot(i+r0+h,s(i)+r0,'*'); title('对心直动滚子推杆盘形凸轮设计'); xlabel('x/mm'); ylable('y/mm'); m(j)=getframe; end movie(m);

4.运动仿真结果 在MATLAB中可以看出轮廓曲线有一处缺口。应用圆弧连接起来。 5.计算结果 由于数据太多,只等间隔取了三十六组数据 Xx 8.9718 18.2411 27.5000 36.4246 44.6859 51.9615 57.9477 62.3712 65.0000 65.6539 64.2123 60.6218 53.6231 44.9951 35.0000 23.9414 12.1554 0.0000 -12.0696 -23.2658 -32.7778 -39.9163 -44.3549 -47.1503 -48.8408 -49.7267 -50.0000 -49.2404 -46.9846 -43.3013 -38.3022 -32.1394 -25.0000 -17.1010 -8.6824 -0.0000

Yy 50.8817 50.1169 47.6314 43.4092 37.4959 30.0000 21.0912 10.9977 0.0000 -11.5765 - 23.3714 -35.0000 -44.9951 -53.6231 -60.6218 -65.7785 -68.9365ﻩ-70.0000 -68.4502 -63.9223 -56.7728 -47.5704 -37.2182 -27.2222 -17.7766 -8.7682 -0.0000 8.6824 17.1010 25.0000 32.1394 38.3022 43.3013 46.9846 49.2404 50.0000

Dx 52.5400 53.3830 52.4060 49.5474 44.8111 38.2699 30.0646 20.4019 9.5493 -2.1723 -14.3980 -26.7301 -44.9951 -53.6231 -60.6218 -65.7785 -68.9365 - 70.0000 -67.4676 -60.0514 -48.2845 -33.0207 -19.8785 -12.5201 -7.1415 -3.1953 0.0000 8.6824 17.1010 25.0000 32.1394 38.3022 43.3013 46.9846ﻩ49.2404 50.0000 Dy 0.4324 -9.2677 -19.2301 -29.1094 -38.5478 -47.1869 -54.6817 -60.7129 -65.0000 -67.3121 -67.4784 -65.3964 -53.6231 -44.9951 -35.0000 -23.9414 -12.1554 -0.0000 17.6425 33.9010 47.4799 57.2560 58.9047 55.6385 52.7117 50.7094 50.0000 49.2404 46.9846 43.3013 38.3022 32.1394 25.0000 17.1010 8.6824 0.0000