1HHaarrbbiinnIInnssttiittuutteeooffTTeecchhnnoollooggyy机机械械原原理理大大作作业业二二课程名称:机械原理设计题目:凸轮机构设计21.设计题目设计直动从动件盘形凸轮机构,其原始参数见表1表一:凸轮机构原始参数升程(mm)升程运动角(º)升程运动规律升程许用压力角(º)回程运动角(º)回程运动规律回程许用压力角(º)远休止角(º)近休止角(º)140150正弦加速度30100等减等加速60357532.凸轮推杆运动规律(1)推程运动规律(正弦加速度运动)推程01500)512sin(21524140)2sin(2100hs)512cos(1168)2cos(100hv)512sin(52016)2sin(20202ha推程002351852220'0)3637(545361402Shhs)3637(59072-4-202'0Shv222'02590724ha(2)回程运动规律(等加速等减速运动)回程0023518522202'0)3637(545361402Shhs)3637(59072-4-202'0Shv222'02590724ha00285235222'002'0)3657-(54536-2Shs4)3657-(59072--4-2'002'0Shv222'02590724ha3.运动线图及凸轮sdds线图采用Matlab编程,其源程序如下:function[psi,s,v,a,f,F]=fsva2(h,phi01,phis01,phi02,phis02,n)w=2*pi*n/60;psi1=linspace(0,phi01,round(phi01)+1);%推程正弦加速s1=h*(psi1/phi01-sin(2*pi*psi1/phi01)/(2*pi));f1=h/(phi01*pi/180)-h*cos(2*pi*psi1/phi01)/(phi01*pi/180);F1=2*pi*h*sin(2*pi*psi1/phi01)/((phi01*pi/180)^2);v1=h*w*(1-cos(2*pi*psi1/phi01))/(phi01*pi/180);a1=2*pi*h*w^2*sin(2*pi*psi1/phi01)/((phi01*pi/180)^2);psi2=linspace(phi01+1,phis01+phi01,round(phis01));%远休程s2=h*ones(1,length(psi2));f2=zeros(1,length(psi2));F2=f2;v2=zeros(1,length(psi2));a2=zeros(1,length(psi2));psi01=linspace(phi01+phis01,phi01+phis01+phi02/2,round(phi02/2));%等减等加速s01=h-2*h*(psi01-(phi01+phis01)).^2/(phi02^2);f01=-4*h*(psi01-(phi01+phis01))/(phi02^2*pi/180);F01=-4*h/((phi01*pi/180)^2)*ones(1,length(psi01));v01=-4*h*w*(psi01-(phi01+phis01))/(phi02^2*pi/180);a01=-4*h*w^2/((phi02*pi/180)^2)*ones(1,length(psi01));psi02=linspace(phi01+phis01+phi02/2+1,phi01+phis01+phi02,round(phi02/2));s02=2*h*(-psi02+(phi01+phis01+phi02)).^2/(phi02^2);f02=-4*h*(-psi02+(phi01+phis01+phi02))/(phi02^2*pi/180);F02=4*h/((phi02*pi/180)^2)*ones(1,length(psi02));v02=-4*h*w*(-psi02+(phi01+phis01+phi02))/(phi02^2*pi/180);a02=4*h*w^2/((phi02*pi/180)^2)*ones(1,length(psi02));s3=[s01,s02];f3=[f01,f02];F3=[F01,F02];v3=[v01,v02];a3=[a01,a02];psi3=[psi01,psi02];5psi4=linspace(phi01+phis01+phi02+1,360,round(phis02));%近休程s4=zeros(1,length(psi4));f4=zeros(1,length(psi4));F4=f4;v4=zeros(1,length(psi4));a4=zeros(1,length(psi4));psi=[psi1,psi2,psi3,psi4];s=[s1,s2,s3,s4];f=[f1,f2,f3,f4];F=[F1,F2,F3,F4];v=[v1,v2,v3,v4];a=[a1,a2,a3,a4];functionhuatu(psi,s,v,a,f)figure(1)subplot(3,1,1);plot(psi,s),gridonxlabel('凸轮转角(^o)');ylabel('位移(mm)');title('凸轮机构运动规律')subplot(3,1,2);plot(psi,v),gridonxlabel('凸轮转角(^o)');ylabel('速度(mm/s)');subplot(3,1,3);plot(psi,a),gridonxlabel('凸轮转角(^o)');ylabel('加速度(mm/s^2)');figure(2)plot(f,s),gridonxlabel('ds/df');ylabel('s(f)')窗口输入下面命令:[psi,s,v,a,f,F]=fsva(140,150,35,100,75,1);huatu(psi,s,v,a,f)可得运动规律图如下:61.凸轮的基圆半径和偏距7以ds/df-s(f)图为基础,可分别作出三条限制线(推程许用压力角的切界限Dtdt,回程许用压力角的限制线Dt'dt',起始点压力角许用线B0d''),以这三条线可确定最小基圆半径及所对应的偏距e,在其下方选择一合适点,即可满足压力角的限制条件。利用matlab作图,其代码如下:function[x,d1,d2,x0,d0]=er(s,f,a1,a2)%d1,d2,d0为三条限制线y值,可确定最小基圆半径k1=tan(pi/2-a1*pi/180);k2=-tan(pi/2-a2*pi/180);ym1=0;ym2=0;fori=1:361iff(i)0y1=-k1*f(i)+s(i);ify1ym1ym1=y1;f01=f(i);s01=s(i);%求的推程限制线对应的切点坐标endelsey2=-k2*f(i)+s(i);ify2ym2ym2=y2;f02=f(i);s02=s(i);%回程的限制线切点坐标endendendx=linspace(-100,200,300);d1=k1*(x-f01)+s01;d2=k2*(x-f02)+s02;x0=linspace(0,200,200);d0=-k1*x0;命令窗口输入:[x,d1,d2,x0,d0]=er(s,f,30,60);plot(x,d1,x,d2,x0,d0),axisequal得图如下:得最小基圆对应的坐标位置大约为(36.4,-62.8)经计算取偏距e=35mm,r0=80mm.84.滚子半径及凸轮理论廓线和实际廓线为求滚子许用半径,须确定最小曲率半径,以防止凸轮工作轮廓出现尖点或出现相交包络线,确定最小曲率半径数学模型如下:)/)(/()/)(/(])/()/[(22222/322dxdddydydddxddyddx其中:cos)(sin])/[(/0sseddsddxsin)(cos])/[(/0sseddsddysin])/[(cos])/(2[/02222ssdsdeddsdxdcos])/[(sin])/(2[/02222ssdsdeddsdyd利用上式可求的最小曲率半斤,而后可确定实际廓线。理论廓线数学模型:sincos)(cossin)(00essyessx9凸轮实际廓线坐标方程式:22'22')/()/()/()/()/()/(ddyddxddyryyddyddxddxrxxtt其中rt为确定的滚子半径。根据上面公式,利用matlab编程求解,其代码如下:functionpm=qulv(psi,s,f,F,e,r0)s0=sqrt(r0^2-e^2);Q1=(s0+s).*cos(psi*pi/180)+(f-e).*sin(psi*pi/180);Q2=-(s0+s).*sin(psi*pi/180)+(f-e).*cos(psi*pi/180);A0=sqrt(Q1.^2+Q2.^2);A=A0.^3;S1=(2*f-e).*cos(psi*pi/180)+(F-s0-s).*sin(psi*pi/180);S2=(F-s0-s).*cos(psi*pi/180)-(2*f-e).*sin(psi*pi/180);B=Q1.*S2-Q2.*S1;p=A./B;pm=100;fori=1:length(psi)ifabs(p(i))pmpm=p(i);endend在命令窗口输入:pm=qulv(psi,s,f,F,35,80)pm=75.0207故,可判断出rt37.402mm,现取rt=18mm,利用matlab编程得实际和理论廓线,其代码如下:functionhuatu2(psi,s,f,e,r0,rt)s0=sqrt(r0^2-e^2);x1=(s0+s).*sin(psi*pi/180)+e*cos(psi*pi/180);y1=(s0+s).*cos(psi*pi/180)-e*sin(psi*pi/180);Q1=(s0+s).*cos(psi*pi/180)+(f-e).*sin(psi*pi/180);10Q2=-(s0+s).*sin(psi*pi/180)+(f-e).*cos(psi*pi/180);A0=sqrt(Q1.^2+Q2.^2);x2=x1+rt*Q2./A0;y2=y1-rt*Q1./A0;figure(3)plot(r0.*cos(psi*pi/180),r0.*sin(psi*pi/180),'-',x1,y1,'--',x2,y2),gridonlegend('基圆','凸轮理论轮廓','凸轮实际轮廓')axisequal在窗口命令中输入:rt=18;huatu2(psi,s,f,35,80,rt)得图如下: