机械原理课程设计任务书(二)柳柏魁专业液压传动与控制班级液压09-1 学号0907240110五、要求:1)计算从动件位移、速度、加速度并绘制线图。
2)确定凸轮机构的基本尺寸,选取滚子半径,画出凸轮实际廓线,并按比例绘出机构运动简图。
以上容作在A2或A3图纸上。
3)编写出计算说明书。
指导教师:..开始日期:2011 年 6 月26 日完成日期:2011 年7 月 1 日目录1.设计任务及要求------------------------------ 2.数学模型的建立------------------------------ 3.程序框图--------------------------------------- 4.程序清单及运行结果------------------------ 5.设计总结--------------------------------------- 6.参考文献--------------------------------------... .1设计任务与要求已知摆杆9为等加速等减速运动规律,其推程运动角φ=75,远休止角φs =10,回程运动角φ΄=70,摆杆长度l 09D =135,最大摆角φmax =15,许用压力角[α]=42,凸轮与曲线共轴。
要求:(1) 计算从动件位移、速度、加速度并绘制线图(用方格纸绘制),也可做动态显示。
(2) 确定凸轮的基本尺寸,选取滚子半径,画出凸轮的实际廓线,并按比例绘出机构运动简图。
(3) 编写计算说明书。
2数学模型(1) 推程等加速区当2/0ϕδ≤≤时 22max /21ϕδϕ=m (角位移) 2max /4ϕδϕω=(角速度)2max /4ϕϕε=(角加速度)(2) 推程等减速区. . 当ϕδϕ≤<2/时 22max max /)(21ϕδϕϕϕ--=m (角位移)2max /)(4ϕδϕϕω-=(角速度) 2max /4ϕϕε-=(角加速度)(3) 远休止区当s ϕϕδϕ+≤<时 max 1ϕ=m (角位移) 0=ω (角速度)0=ε(角加速度)(4) 回程等加速区当2/ϕϕϕδϕϕ'++≤<+s s 时 22max max /)(21ϕϕϕδϕϕ'---=s m (角位移)2max /)(4ϕϕϕδϕω'---=s (角速度)2max /4ϕϕε'-=(角加速度)(5) 回程等减速区当ϕϕϕδϕϕϕ'++≤<'++s s 2/时 22max /)(21ϕδϕϕϕϕ'-'++=s m (角位移)2max /)(4ϕδϕϕϕϕω'-'++-=s (角速度) 2max /4ϕϕε'=(角加速度)(6) 近休止区01=m (角位移) 0=ω(角速度)0=ε(角加速度)一、. .如图选取xOy 坐标系,B1点为凸轮轮廓线起始点。
开始时推杆轮子中心处于B1点处,当凸轮转过角度时,摆动推杆角位移为,由反转法作图可看出,此时滚子中心应处于B 点,其直角坐标为:()()00cos cos sin sin ϕϕδδϕϕδδ++-=++-=l a y l a x因为实际轮廓线与理论轮廓线为等距离,即法向距离处处相等,都为滚半径rT.故将理论廓线上的点沿其法向向测移动距离rT 即得实际廓线上的点B(x1,y1).由高等数学知,理论廓线B 点处法线nn 的斜率应为 ()()θθδδθcos /sin ////=-==d dy d dx dy dx tg.根据上式有: ()()()()δϕϕϕδδδδϕϕϕδδδd d l a d dy d d l a d dx /1sin sin //1cos cos /00++++-=+++-=可得 ()()()()()()2222////cos ////sin δδδθδδδθd dy d dx d dy d dy d dx d dx +-=+=实际轮廓线上对应的点B(x,y)的坐标为θθsin 1cos 1T T r y y r x x ==此即为凸轮工作的实际廓线方程,式中“-”用于等距线,“+” 于外等距线。
3程序框图程序清单及运行结果4程序清单及运行结果#include<math.h>#include<dos.h>#include<graphics.h>#include<conio.h>#include<stdio.h>#define l 135.0#define Aa 42#define r_b 40#define rr 8#define K (3.1415926/180)..#define dt 0.25float Q_max,Q_t,Q_s,Q_h;float Q_a;double L,pr;float e[1500],f[1500],g[1500];void Cal(float Q,double Q_Q[3]){Q_max=15,Q_t=75,Q_s=10,Q_h=70;if(Q>=0&&Q<=Q_t/2){Q_Q[0]=K*(2*Q_max*Q*Q/(Q_t*Q_t));Q_Q[1]=4*Q_max*Q/(Q_t*Q_t);Q_Q[2]=4*Q_max/(Q_t*Q_t);}if(Q>Q_t/2&&Q<=Q_t){Q_Q[0]=K*(Q_max-2*Q_max*(Q-Q_t)*(Q-Q_t)/(Q_t*Q_t));Q_Q[1]=4*Q_max*(Q_t-Q)/(Q_t*Q_t);Q_Q[2]=-4*Q_max/(Q_t*Q_t);}if(Q>Q_t&&Q<=Q_t+Q_s){Q_Q[0]=K*Q_max;Q_Q[1]=0;Q_Q[2]=0;}if(Q>Q_t+Q_s&&Q<=Q_t+Q_s+Q_h/2){Q_Q[0]=K*(Q_max-2*Q_max*(Q-Q_t-Q_s)*(Q-Q_t-Q_s)/(Q_h*Q_h));Q_Q[1]=-4*Q_max*(Q-Q_t-Q_s)/(Q_h*Q_h);Q_Q[2]=-4*Q_max/(Q_h*Q_h);}if(Q>Q_t+Q_s+Q_h/2&&Q<=Q_t+Q_s+Q_h){Q_Q[0]=K*(2*Q_max*(Q_h-Q+Q_t+Q_s)*(Q_h-Q+Q_t+Q_s)/(Q_h*Q_h)); Q_Q[1]=-4*Q_max*(Q_h-Q+Q_t+Q_s)/(Q_h*Q_h);Q_Q[2]=4*Q_max/(Q_h*Q_h);}if(Q>Q_t+Q_s+Q_h&&Q<=360){Q_Q[0]=K*0;Q_Q[1]=0;..Q_Q[2]=0;}}void Draw(float Q_m){float tt,x,y,x1,y1,x2,y2,x3,y3,x4,y4,dx,dy;double QQ[3];circle(240,240,3);circle(240+L*sin(50*K)+4*cos(240*K),240+L*cos(50*K)-4*sin(240*K),3); moveto(240,240);lineto(240+20*cos(240*K),240-20*sin(240*K));lineto(260+20*cos(240*K),240-20*sin(240*K));lineto(240,240);moveto(240+L*sin(50*K)+4*cos(240*K),240+L*cos(50*K)-4*sin(240*K)); lineto(240+L*sin(50*K)+20*cos(240*K),240+L*cos(50*K)-20*sin(240*K)); lineto(255+L*sin(50*K)+20*cos(240*K),240+L*cos(50*K)-20*sin(240*K)); lineto(240+L*sin(50*K)+4*cos(240*K),240+L*cos(50*K)-4*sin(240*K)); for(tt=0;tt<=720;tt=tt+2){Cal(tt,QQ);x1=L*cos(tt*K)-l*cos(Q_a+QQ[0]-tt*K);y1=l*sin(Q_a+QQ[0]-tt*K)+L*sin(tt*K);x2=x1*cos(Q_m*K+40*K)+y1*sin(Q_m*K+40*K);y2=-x1*sin(Q_m*K+40*K)+y1*cos(Q_m*K+40*K);putpixel(x2+240,240-y2,2);dx=(QQ[1]-1)*l*sin(Q_a+QQ[0]-tt*K)-L*sin(tt*K);dy=(QQ[1]-1)*l*cos(Q_a+QQ[0]-tt*K)+L*cos(tt*K);x3=x1-rr*dy/sqrt(dx*dx+dy*dy);y3=y1+rr*dx/sqrt(dx*dx+dy*dy);x4=x3*cos(Q_m*K+40*K)+y3*sin(Q_m*K+40*K);y4=-x3*sin(Q_m*K+40*K)+y3*cos(Q_m*K+40*K);putpixel(x4+240,240-y4,YELLOW);}}void Curvel(){int t;float y1,y2,y3,a=0;for(t=0;t<=360/dt;t++){delay(300);a=t*dt;..if((a>=0)&&(a<=Q_t/2)){y1=(2*Q_max*pow(a,2)/pow(Q_t,2))*10;y2=(4*Q_max*(dt*K)*a/pow(Q_t,2))*pow(10,4.8);y3=(4*Q_max*pow((dt*K),2)/pow(Q_t,2))*pow(10,8.5);putpixel(100+a,300-y1,1);putpixel(100+a,300-y2,2);putpixel(100+a,300-y3,4);line(100+Q_t/2,300-y3,100+Q_t/2,300);}if((a>Q_t/2)&&(a<=Q_t)){y1=(Q_max-2*Q_max*pow((Q_t-a),2)/pow(Q_t,2))*10;y2=(4*Q_max*(dt*K)*(Q_t-a)/pow(Q_t,2))*pow(10,4.8);y3=((-4)*Q_max*pow((dt*K),2)/pow(Q_t,2))*pow(10,8.5);putpixel(100+a,300-y1,1);putpixel(100+a,300-y2,2);putpixel(100+a,300-y3,4);line(100+Q_t,300-y3,100+Q_t,300);line(100+Q_t/2,300,100+Q_t/2,300-y3);}if((a>Q_t)&&(a<=Q_t+Q_s)){y1=Q_max*10;y2=0;y3=0;putpixel(100+a,300-y1,1);putpixel(100+a,300-y2,2);putpixel(100+a,300-y3,4);line((100+Q_t+Q_s),300,(100+Q_t+Q_s),300-y3);}if((a>Q_t+Q_s)&&(a<=Q_t+Q_s+Q_h/2)){y1=(Q_max-2*Q_max*pow((a-Q_t-Q_s),2)/pow(Q_h,2))*10;y2=((-4)*Q_max*(dt*K)*(a-Q_t-Q_s)/pow(Q_h,2))*pow(10,4.8);y3=((-4)*Q_max*pow((dt*K),2)/pow(Q_h,2))*pow(10,8.5);putpixel(100+a,300-y1,1);putpixel(100+a,300-y2,2);putpixel(100+a,300-y3,4);line((100+Q_t+Q_s+Q_h/2),300,(100+Q_t+Q_s+Q_h/2),300-y3);line((100+Q_t+Q_s),300,(100+Q_t+Q_s),300-y3);}..if((a>Q_t+Q_s+Q_h/2)&&(a<=Q_t+Q_s+Q_h)){y1=(2*Q_max*pow((Q_h-a+Q_t+Q_s),2)/pow(Q_h,2))*10;y2=((-4)*Q_max*(dt*K)*(Q_h-a+Q_t+Q_s)/pow(Q_h,2))*pow(10,4.8);y3=(4*Q_max*pow((dt*K),2)/pow(Q_h,2))*pow(10,8.5);putpixel(100+a,300-y1,1);putpixel(100+a,300-y2,2);putpixel(100+a,300-y3,4);line((100+Q_t+Q_s+Q_h),300-y3,(100+Q_t+Q_s+Q_h),300);line((100+Q_t+Q_s+Q_h/2),300,(100+Q_t+Q_s+Q_h/2),300-y3);}if((a>Q_t+Q_s+Q_h)&&(a<=360)){y1=0;y2=0;y3=0;putpixel(100+a,300,1);putpixel(100+a,300,2);putpixel(100+a,300,4);}e[t]=y1;f[t]=y2;g[t]=y3;}}main(){int gd=DETECT,gm;int i,t,choice,x_1,y_1,flag=1;double QQ1[3],aa;FILE *f1;if((f1=fopen("liliangliang.txt","w"))==NULL){printf("liliangliang.txt cannot open!\n");exit(0);}initgraph(&gd,&gm," ");cleardevice();for(t=0;!kbhit();t++){for(;t>360;)t-=360;..if(flag==1)for(L=l-r_b+70;L<l+r_b;L+=2){Q_a=acos((L*L+l*l-r_b*r_b)/(2.0*L*l));Cal(t,QQ1);aa=atan(l*(1-QQ1[1]-L*cos(Q_a-QQ1[0]))/(L*sin(Q_a+QQ1[0])));/*压力角*/ pr=(pow((L*L+l*l*(1+QQ1[1])*(1+QQ1[1])-2.0*L*l*(1+QQ1[1]*cos(Q_a+QQ1[ 0]))),3.0/2))/*曲率半径*//((1+QQ1[1])*(2+QQ1[1])*L*l*cos(Q_a+QQ1[0])+QQ1[2]*L*l*sin(Q_a+QQ1[ 0])-L*L-l*l*pow((1+QQ1[1]),3));if(aa<=Aa&&pr>rr)flag=0;break;}if(flag==0)Cal(t,QQ1);Draw(t);cleardevice();x_1=240+L*sin(50*K)-l*cos(Q_a+QQ1[0]+40*K);y_1=240+L*cos(50*K)-l*sin(Q_a+QQ1[0]+40*K);circle(x_1,y_1,rr);line(240+L*sin(50*K),240+L*cos(50*K),x_1,y_1);moveto(240+L*sin(50*K),240+L*cos(50*K));lineto(240+L*sin(50*K)+l*cos(Q_a+QQ1[0]+40*K),480+2*L*cos(50*K)-y_1); lineto(140+L+l*cos(Q_a+QQ1[0])*2,480+2*L*cos(50*K)-y_1);delay(1);}getch();cleardevice();line(100,80,100,445);line(70,300,530,300);line(100,80,98,90);line(100,80,102,90);line(520,298,530,300);line(520,302,530,300);setcolor(2);outtextxy(300,150,"The analysis of the worm gear's movement");printf("\n\n\n\n\n Q(w,a)");printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\tt");Curvel();getch();printf("\n\n\n\n\n\n\n\n\n\n");..for(i=0;i<=1440;i=i+20){delay(1000);printf("%d %f %f %f\n",i/4,e[i],f[i],g[i]); fprintf(f1,"%d %f %f %f\n",i/4,e[i],f[i],g[i]); }getch();fclose(f1);closegraph();}运行结果..角度10倍角位移104.8倍角速度108.5倍角加速度0 0.000000 0.000000 64.2189875 1.333333 14.683043 64.21898710 5.333333 29.366087 64.21898715 12.000000 44.049033 64.21898720 21.333334 58.732174 64.21898725 33.333332 73.415222 64.21898730 48.000000 88.098267 64.21898735 65.333336 102.781303 64.21898740 84.666664 102.781303 64.21898745 102.000000 88.098267 -64.21898750 116.666664 73.415222 -64.21898755 128.666672 58.732174 -64.21898760 138.000000 44.049133 -64.21898765 144.666672 29.366087 -64.21898770 148.666672 14.683043 -64.218987..75 150.000000 0.000000 -64.21898780 150.000000 0.000000 0.00000085 150.000000 0.000000 0.00000090 148.469391 -16.855536 -73.72077995 143.877548 -33.711071 -73.72077995 143.877548 -33.711071 -73.720779100 136.224487 -50.566605 -73.720779105 125.510201 -67.422124 -73.720779110 111.734695 -84.277672 -73.720779115 94.897957 -101.133209 -73.720779120 75.000000 -117.988747 -73.720779125 55.102039 -101.133209 73.720779130 38.256305 -84.277672 73.720779135 24.489796 -67.422142 73.720779140 13.775510 -50.566605 73.720779145 6.122449 -33.711071 73.720779150 1.530612 -16.855536 73.720779155 0.000000 -0.000000 73.720779160-360 0.00000000 0.0000000 0.00000005设计总结通常此次繁忙的机械原理课程设计,让我受益颇多。