1、机械原理大作业平面连杆机构报告1平面连杆机构的运动分析(题号:平面六杆机构)一、题目:计算平面连杆机构的运动学分析二、平面连杆机构的运动分析方程三、程序流程图四、计算源程序五、计算结果数据六、运动线图及分析七、体会及建议八、参考书一、题目说明:1、题目简介:(1)如图所示平面六杆机构,设已知各构件的尺寸如下表一,又知原动件1以角速度为1rad/s沿逆时针方向回转,试求个从动件的角位移、角速度、及角加速度以及E点的位移、速度及加速度变化情况。(2)已知其尺寸参数如下表所示:组号L1L2L3L4L5L6XGYG2-A26.5116.667.587.552.443.060153.541.72、题目要
2、求与成员组成及分工:(1)题目要求:两人一组计算出原动件从0到360时(计算点数N = 36)所要求的各运动变量的大小,并绘出运动曲线图以及E点的轨迹曲线,本组题号为:2A。二、题目分析:1、建立封闭图形:L1 + L2= L3+ L4L1 + L2= L5+ L6+AG2、机构运动分析:(1)角位移分析由图形封闭性得: 将上式化简可得:(2)角速度分析上式对时间求一阶导数,可得速度方程:化为矩阵形式为:(3)角加速度分析:矩阵对时间求一阶导数,可得加速度矩阵为:(4)E点的运动状态位移:速度:加速度:三、流程图:四、源程序#include#include#include#define PI
3、3.1415926#define N 4void Solutionangle(double 18,double ); /*矢量法求角位移*/ void Solutionspeed(double NN,double N,double 18,double ); /*角速度求解*/void Solutionacceleration(double NN,double NN,double N,double 18);/*角加速度求解*/void GaussianE(double NN,double N,double N);/*高斯消去*/void FoundmatrixA(double 18,double
4、 NN); /创建系数矩阵Avoid FoundmatrixB(double 18,double ,double N);/创建系数矩阵Bvoid FoundmatrixDA(double 18,double NN);/创建矩阵DAvoid FoundmatrixDB(double 18,double ,double N);/创建矩阵DB/定义全局变量double l1=26.5,l2=111.6,l3=67.5,l4=87.5,l5=52.4,l6=43.0;double l2g=65.0,xg=153.5,yg=41.7,inang=60*PI/180,as1=1.0; /主函数void m
5、ain() int i,j; FILE *fp; double shuju3618; double psvalue18,aNN,daNN,bN,dbN,ang1; /建立文件,并制表头 if(fp=fopen(filel,w)=NULL) printf(Cannt open this file.n); exit(0); fprintf(fp,n The Kinematic Parameters of Point 5n); fprintf(fp, ang2 ang3 ang5 ang6); fprintf(fp, as2 as3 as5 as6); fprintf(fp, aas2 aas3 a
6、as5 aas6); fprintf(fp, xe ye vex vey aex aeyn); /计算数据并写入文件 for(i=0;i36;i+) ang1=i*PI/18; Solutionangle(psvalue,ang1); FoundmatrixB(psvalue,ang1,b); FoundmatrixA(psvalue,a); Solutionspeed(a,b,psvalue,ang1); FoundmatrixDA(psvalue,da); FoundmatrixDB(psvalue,ang1,db); Solutionacceleration(a,da,db,psvalu
7、e); for(j=0;j4;j+) shujuij=psvaluej*180/PI; for(j=4;j18;j+) shujuij=psvaluej; fprintf(fp,n); for(j=0;j18;j+) fprintf(fp,%12.3f,shujuij); fclose(fp); /输出数据 for(i=0;i36;i+) ang1=i*PI/18; printf(n输出ang1=%d时的求解n,i*10); printf(angle angspeed angacceleration E:n); for(j=0;j4;j+) printf(%lft,shujuij); prin
8、tf(n); for(j=4;j8;j+) printf(%lft,shujuij); printf(n); for(j=8;j12;j+) printf(%lft,shujuij); printf(n); for(j=12;j18;j+) printf(%lft,shujuij); printf(n); /*矢量法求角位移*/ void Solutionangle(double value18,double ang1) double xe,ye,A,B,C,phi,alpha,csn,ang5g,d2,d,ang2,ang3,ang5,ang6; A=2*l1*l3*sin(ang1); B
9、=2*l3*(l1*cos(ang1)-l4); C=l2*l2-l1*l1-l3*l3-l4*l4+2*l1*l4*cos(ang1); ang3=2*atan(A+sqrt(A*A+B*B-C*C)/(B-C); if(ang30)/限定ang3大小 ang3=2*atan(A-sqrt(A*A+B*B-C*C)/(B-C); ang2=asin(l3*sin(ang3)-l1*sin(ang1)/l2); xe=l4+l3*cos(ang3)+l2g*cos(ang2-inang); ye=l3*sin(ang3)+l2g*sin(ang2-inang); phi=atan2(yg-ye
10、),(xg-xe); d2=(yg-ye)*(yg-ye)+(xg-xe)*(xg-xe); d=sqrt(d2); csn=(l5*l5+d2-l6*l6)/(2.0*l5*d); alpha=atan2(sqrt(1.0-csn*csn),csn); ang5g=phi-alpha; ang5=ang5g-PI; ang6=atan2(ye+l5*sin(ang5g)-yg,xe+l5*cos(ang5g)-xg); value0=ang2;value1=ang3;value2=ang5;value3=ang6; value12=xe;value13=ye; /限定角度大小 for(int
11、 i=0;i2*PI) valuei-=2*PI; while(valuei0) valuei+=2*PI; /*角速度求解*/void Solutionspeed(double a2NN,double b2N,double value18,double ang1) double ang2,ang3; ang2=value0;ang3=value1; double p2N; GaussianE(a2,b2,p2); value4=p20; value5=p21; value6=p22; value7=p23; value14=-l3*value5*sin(ang3)-l2g*value4*si
12、n(ang2-inang); value15=l3*value5*cos(ang3)+l2g*value4*cos(ang2-inang);/*角加速度求解*/void Solutionacceleration(double a3NN,double da3NN,double db3N,double value18) int i,j; double ang2,ang3; ang2=value0;ang3=value1; double bkN=0; double p3N; for(i=0;iN;i+) for(j=0;jN;j+) bki+=-da3ij*value4+j; bki+=db3i*a
13、s1; GaussianE(a3,bk,p3); value8=p30; value9=p31; value10=p32; value11=p33; value16=-l3*value9*sin(ang3)-l3*value5*value5*cos(ang3)-l2g*value8*sin(ang2-inang)-l2g*value4*value4*cos(ang2-inang); value17=l3*value9*cos(ang3)-l3*value5*value5*sin(ang3)+l2g*value8*cos(ang2-inang)-l2g*value4*value4*sin(ang
14、2-inang);/*高斯消去法解矩阵方程*/void GaussianE(double a4NN,double b4N,double p4N) int i,j,k; double a4gNN,b4gN,t; for(i=0;iN;i+) for(j=0;jN;j+) a4gij=a4ij; for(i=0;iN;i+) b4gi=b4i; /使主对角线上的值尽可能大 if(a4g00a4g11) for(j=0;jN;j+) t=a4g0j;a4g0j=a4g1j;a4g1j=t; t=b4g0;b4g0=b4g1;b4g1=t; if(a4g22a4g33) for(j=0;jN;j+)
15、t=a4g2j;a4g2j=a4g3j;a4g3j=t; t=b4g2;b4g2=b4g1;b4g3=t; /初等行变换 for(j=0;jN;j+) for(i=0;iN;i+) if(i!=j) for(k=0;kN;k+) if(k!=j) a4gik-=a4gij/a4gjj*a4gjk; b4gi-=b4gj*a4gij/a4gjj; a4gij=0; for(i=0;iN;i+) b4gi/=a4gii; p40=b4g0; p41=b4g1; p42=b4g2; p43=b4g3;/创建系数矩阵Avoid FoundmatrixA(double value518,double a
16、5NN) double ang2,ang3,ang5,ang6; ang2=value50;ang3=value51;ang5=value52;ang6=value53; a500=-l2*sin(ang2);a501=l3*sin(ang3); a510=l2*cos(ang2);a511=-l3*cos(ang3); a520=-l2*sin(ang2)-l2g*sin(ang2-inang); a522=l5*sin(ang5);a523=l6*sin(ang6); a530=l2*cos(ang2)+l2g*cos(ang2-inang); a532=-l5*cos(ang5);a53
17、3=-l6*cos(ang6); a502=a503=a512=a513=a521=a531=0;/创建系数矩阵Bvoid FoundmatrixB(double value618,double ang1,double b6N) b60=b62=l1*sin(ang1)*as1; b61=b63=-l1*cos(ang1)*as1;/创建矩阵DAvoid FoundmatrixDA(double value718,double da7NN) double ang2,ang3,ang5,ang6,as2,as3,as5,as6; ang2=value70;ang3=value71;ang5=va
18、lue72;ang6=value73; as2=value74;as3=value75;as5=value76;as6=value77; da700=-l2*as2*cos(ang2);da701=l3*as3*cos(ang3); da710=-l2*as2*sin(ang2);da711=l3*as3*sin(ang3); da720=as2*(-l2*cos(ang2)-l2g*cos(ang2-inang); da722=as5*l5*cos(ang5);da723=as6*l6*cos(ang6); da730=as2*(-l2*sin(ang2)-l2g*sin(ang2-inan
19、g); da732=as5*l5*sin(ang5);da733=as6*l6*sin(ang6); da702=da703=da712=da713=da721=da731=0;/创建矩阵DBvoid FoundmatrixDB(double value818,double ang1,double db8N) db80=db82=l1*as1*cos(ang1); db81=db83=l1*as1*sin(ang1);五、计算结果及相关曲线图:A组:数据ang2ang3ang5ang631.41659.518274.84660.93327.44156.107267.10447.45924.31
20、954.603261.9639.40422.07154.839257.86535.15320.58756.482254.05733.43319.72559.178250.12233.16819.35662.621245.73333.419.3866.57240.47233.14519.72470.84233.65931.15820.33875.287224.17925.65621.18879.799210.78814.56622.25384.282193.987357.78523.51888.659177.339339.15824.97392.859164.018322.76426.6196.
21、825154.479309.82228.423100.501147.803299.8730.402103.84142.952292.12232.533106.8139.123285.90534.799109.344135.751280.70837.173111.44132.448276.14539.622113.061128.955271.91442.105114.183125.1267.7844.569114.784120.784263.56446.952114.839115.961259.1549.182114.323110.623254.48651.174113.203104.77924
22、9.58852.829111.4498.434244.52354.036108.98691.547239.38654.673105.78983.996234.24154.607101.79775.52229.03653.70896.97265.573223.37851.86791.3252.837215.83149.03584.9333.036200.97845.2778.038355.866164.37140.79771.08313.857116.27636.01264.679288.38282.34as2as3as5as6-0.434-0.434-1.783-2.79-0.357-0.24
23、5-1.285-2.163-0.267-0.059-1.053-1.748-0.1840.1-0.973-1.493-0.1150.223-0.984-1.365-0.060.311-1.059-1.344-0.0160.373-1.185-1.4180.0190.414-1.361-1.5850.0490.438-1.584-1.8420.0740.45-1.817-2.1510.0960.451-1.916-2.3430.1170.444-1.703-2.1750.1360.43-1.316-1.7620.1550.409-1.029-1.4090.1730.383-0.792-1.132
24、0.190.352-0.561-0.8720.2060.316-0.423-0.6890.220.276-0.352-0.5630.2320.232-0.328-0.4820.2420.186-0.336-0.4350.2470.138-0.365-0.4150.2480.087-0.407-0.4150.2440.033-0.457-0.430.232-0.023-0.508-0.4540.213-0.081-0.559-0.4790.184-0.143-0.609-0.50.145-0.21-0.66-0.5120.094-0.282-0.719-0.5150.031-0.359-0.79
25、5-0.515-0.046-0.44-0.908-0.532-0.136-0.524-1.1-0.62-0.234-0.605-1.507-0.964-0.332-0.67-2.666-2.29-0.417-0.702-4.566-4.892-0.471-0.68-4.309-5.087-0.477-0.589-2.745-3.75aas2aas3aas5aas60.3671.022.3860.3490.51.1092.4641.6170.5061.0051.9911.8270.440.8071.5731.6860.3560.61.3331.5140.2810.4251.2731.4460.2240.2871.3931.5490.1820.1821.7371.9040.1540.12.4182.6710.1350.0363.5894.0930.122-0.0174.8165.810.114-0.0624.1985.5890.109-0.1011.8843.1630.105-0.1350.1671.1280.1-0.1661.6391.7220.095-0.1931.0331.2550.08
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1