欢迎来到淘文阁 - 分享文档赚钱的网站! | 帮助中心 好文档才是您的得力助手!
淘文阁 - 分享文档赚钱的网站
全部分类
  • 研究报告>
  • 管理文献>
  • 标准材料>
  • 技术资料>
  • 教育专区>
  • 应用文书>
  • 生活休闲>
  • 考试试题>
  • pptx模板>
  • 工商注册>
  • 期刊短文>
  • 图片设计>
  • ImageVerifierCode 换一换

    Matlab在机械设计中的应用大作业.doc

    • 资源ID:23963498       资源大小:1.15MB        全文页数:34页
    • 资源格式: DOC        下载积分:15金币
    快捷下载 游客一键下载
    会员登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录   QQ登录  
    二维码
    微信扫一扫登录
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    Matlab在机械设计中的应用大作业.doc

    Four short words sum up what has lifted most successful individuals above the crowd: a little bit more.-author-dateMatlab在机械设计中的应用大作业Matlab在机械设计中的应用Matlab在机械设计中的应用 大作业1、试用解析综合法设计一个曲柄摇杆机构。已知机构行程速度变化系数,摇杆CD的长度,摆角,要求机构的最小传动角。确定曲柄摇杆机构各构件杆长调用函数的编制:function f=funct(x) k=1.25; theta=pi*(k-1)/(k+1); yg=250; pis=pi/6 gamin=2*pi/9f1=(x(2)+x(1)2+(x(2)-x(1)2-2*(x(2)+x(1)*(x(2)-x(1)*cos(theta)-(2*yg*sin(pis/2)2; f2=yg2+x(3)2-2*yg*x(3)*cos(x(4)-(x(2)-x(1)2; f3=yg2 +x(3)2-2*yg*x(3)*cos(x(4)+pis)-(x(2)+x(1)2; f4=yg2+x(2)2-2*yg*x(2)*cos(gamin)-(x(3)-x(1)2; f=f1;f2;f3;f4;主函数:>> x0=50 120 200 0.5;>> k=1.25;>> theta=pi*(k-1)/(k+1);>> yg=250;>> gamin=2*pi/9;>> x=fsolve(funct,x0)求解结果:Equation solved.fsolve completed because the vector of funct values is near zeroas measured by the default value of the funct tolerance, andthe problem appears regular as measured by the gradient.<stopping criteria details>x = 62.9934 105.9045 245.0702 0.17242、四连杆机构如图1 所示,已知各构件的尺寸L1, L2, L3, L4及原动件1的角位移1和等角速度1,求构件2和3的角位移2 ,3,角速度2,3,角加速度2,3。解:设L1=304.8设定机架1长度,L2=101.6设定曲柄2长度,L3=254设定连杆3长度 ,L4=177.8设定摇杆4长度。% 曲柄摇杆机构运动分析 % (1)-为了计算连杆的输出角th3和摇杆的输出角th4 % 设定各杆的长度(单位:毫米)Ntrpss函数funct th3,th4=ntrpss(th,rs)L=sqrt(rs(1)*rs(1)+rs(2)*rs(2)-2*rs(1)*rs(2)*cos(th(1)+0.4867);phi=asin(rs(2)*sin(th(1)+90)/L);beta=acos(rs(4)*rs(4)+L*L-rs(3)*rs(3)/(2*rs(4)*L);if beta<0 beta=beta+pi;endth4=pi-phi-beta;th3=asin(rs(4)*sin(th4)-rs(2)*sin(th(1)-90.00)/rs(3);end主函数:clearrs(1)=304.8; rs(2)=101.6; rs(3)=254; rs(4)=177.8; dr=pi/180.0;% % 设定初始推测的输入 % 机构的初始位置 th(1)=0.0; th(2)=45*dr; th(3)=135*dr; % 摇杆4的初始位置角可以用三角形的正弦定理确定 %th(3)=pi-asin(sin(th(2)*rs(3)/rs(4) dth=5*dr; for i=1:72 th3,th4=ntrps(th,rs); th34(i,:)=th(1)/dr th3/dr th4/dr; % th(1)=th(1)+dth; th(2)=th3; th(3)=th4; end subplot(2,2,1) plot(th34(:,1),th34(:,2),th34(:,1),th34(:,3);axis(0 360 0 170)grid xlabel('时间/秒')ylabel('从动件角位移/度')title('角位移线图')text(110,110,'摇杆4角位移')text(50,35,'连杆3角位移')% (2)- - - - -计算连杆的角速度om3和摇杆的角速度om4% Setting initial conditionsom2=250; T=2*pi/om2; for i=1:72t=i*T/72;ct(2)=i*dth;A=-rs(3)*sin(th34(i,2)*dr) rs(4)*sin(th34(i,3)*dr);rs(3)*cos(th34(i,2)*dr) -rs(4)*cos(th34(i,3)*dr);B=om2*rs(2)*sin(ct(2);-om2*rs(2)*cos(ct(2);om=inv(A)*B; om3=om(1);om4=om(2);om34(i,:)=t om3 om4; endsubplot(2,2,2) % plot(om34(:,1),om34(:,2),om34(:,1),om34(:,3)axis(0 0.026 -190 210)grid title('角速度线图')xlabel('时间/秒')ylabel('从动件角速度')text(0.001,170,' 摇杆4角速度')text(0.013,130,' 摇杆3角速度')% (3)- - - - - 计算连杆的角加速度a3和摇杆的角加速度a4a2=0; for i=1:72 t=i*T/72;c(2)=i*dth;C=-rs(3)*sin(th34(i,2)*dr) rs(4)*sin(th34(i,3)*dr);rs(3)*cos(th34(i,2)*dr) -rs(4)*cos(th34(i, 3)*dr);D(1)=a2*rs(2)*sin(c(2)+om22*rs(2)*cos(c(2)+om34(i,2)2*rs(3)*cos(th34(i,2)*dr)-om34(i,3)2*rs(4)*cos(th34(i,3)*dr);D(2)=-a2*rs(2)*cos(c(2)+om22*rs(2)*sin(c(2)+om34(i,2)2*rs(3)*sin(th34(i,2)*dr)-om34(i,3)2*rs(4)*sin(th34(i,3)*dr);a=inv(C)*D' a3=a(1);a4=a(2);a34(i,:)=t a3 a4; endsubplot(2,2,3) plot(a34(:,1),a34(:,2),a34(:,1),a34(:,3)axis(0 0.026 -60000 80000)grid title('角加速度线图')xlabel('时间')ylabel('从动件加速度')text(0.003,62000,'摇杆4角加速度')text(0.010,33000,'摇杆3角加速度')disp '曲柄转角 连杆转角-摇杆转角-连杆角速度-摇杆角速度-连杆加速度-摇杆加速度'ydcs=th34(:,1),th34(:,2),th34(:,3),om34(:,2),om34(:,3),a34(:,2),a34(:,3);disp(ydcs)3、已知图中机构以下参数: 1)、各构件尺寸(5个长度);LAB=80mm, LBC=260mm, LCD=300mm, LCE=100mm, LEF=460mm。 2)、各构件重量及重心位置;G1=36N,S1在A点,G2=60N,S2在BC中点,G3=72N,S3在C点,G4=85N,S4在EF中点,G5=85N,S5在F点。 3)、各构件对重心的转动惯量(4个转动构件);I1=0.03kgm2,I2=0.08kgm2,I3=0.1 kgm2,I4=0.12 kgm2。 4)、阻力:注意推程为正、回程为负;作用在滑块5上的水平阻力(生产阻力)Pr=-4000N。当回程时,Pr=50N。 5)、曲柄顺时针回转,n1=400r/min转动的转速(注意转速单位)用matlab求解:1) 滑块5的位移线图(s-)、速度线图(v-)、加速度线图(a-)。这里指曲柄转过的角度,曲柄从右边水平开始,逆时针计算角度02.2) 作原动件1的平衡力矩线图。3) 编写界面程序,要求当输入曲柄某一角度值时,可计算出所有运动副反力R12,R23, R34,R56, R61,R63。要求最低实现以下基本功能: 其他格式自定。clearrs(1)=0.19235; rs(2)=0.08; rs(3)=0.26; rs(4)=0.30; rs(5)=0.40;rs(6)=0.460;e=0.090;dr=pi/180.0000; th(1)=0.0000; th(2)=50.3800*dr; th(3)=75.3600*dr; dth=dr; for i=1:360 th3,th4=ntrpss(th,rs); th5=-asin(rs(5)*sin(th4)-e)/rs(6); s=0.170+rs(5)*cos(th4)+rs(6)*cos(th5); th34(i,:)=th(1)/dr th3/dr th4/dr th5/dr s; th(1)=th(1)+dth; th(2)=th3; th(3)=th4; end om2=400;T=2*pi/om2; for i=1:360t=i*T/360;ct(2)=i*dth;A=-rs(3)*sin(th34(i,2)*dr) rs(4)*sin(th34(i,3)*dr);rs(3)*cos(th34(i,2)*dr) -rs(4)*cos(th34(i,3)*dr);B=om2*rs(2)*sin(ct(2);-om2*rs(2)*cos(ct(2);om=inv(A)*B; om3=om(1);om4=om(2);C=rs(6)*sin(th34(i,4)*dr) 1;-rs(6)*cos(th34(i,4)*dr) 0;D=-om(2)*rs(5)*sin(th34(i,3)*dr);om(2)*rs(5)*cos(th34(i,3)*dr);on=inv(C)*D;om5=on(1);om6=on(2);om34(i,:)=t om3 om4 om5 om6; enda2=0; for i=1:360 t=i*T/360;c(2)=i*dth;E=-rs(3)*sin(th34(i,2)*dr) rs(4)*sin(th34(i,3)*dr);rs(3)*cos(th34(i,2)*dr) -rs(4)*cos(th34(i,3)*dr);F(1)=a2*rs(2)*sin(c(2)+om2*om2*rs(2)*cos(c(2)+om34(i,2)*om34(i,2)*rs(3)*cos(th34(i,2)*dr)-om34(i,3)*om34(i,3)*rs(4)*cos(th34(i,3)*dr);F(2)=-a2*rs(2)*cos(c(2)+om2*om2*rs(2)*sin(c(2)+om34(i,2)*om34(i,2)*rs(3)*sin(th34(i,2)*dr)-om34(i,3)*om34(i,3)*rs(4)*sin(th34(i,3)*dr);a=inv(E)*F' a3=a(1);a4=a(2);G=rs(6)*sin(th34(i,4)*dr) 1;-rs(6)*cos(th34(i,4)*dr) 0;H=-om34(i,3).*om34(i,3)*rs(5)*cos(th34(i,3)-om34(i,4).*om34(i,4)*rs(6)*cos(th34(i,4);-om34(i,3).*om34(i,3)*rs(5)*sin(th34(i,3)-om34(i,4).*om34(i,4)*rs(6)*sin(th34(i,4);b=inv(G)*H;b1=b(1);b2=b(2);a34(i,:)=t a3 a4 b1 b2; endsyms p1 p2 p3 p4 jsd1x jsd1y jsd2x jsd2y jsd3x jsd3y jsd4x jsd4y jsd5x jsd5y F2x F2y M2 F3x F3y M3 F5x F5y M5 F6x F1 F2for i=1:360 t=i*T/360;p1=i*dth;om2=400;a2=0; jsd2x=-0.08*om2*om2*cos(p1)-0.13*(om34(i,2)*om34(i,2)*cos(th34(i,2)*dr)+a34(i,2)*sin(th34(i,2)*dr);jsd2y=-0.08*om2*om2*sin(p1)-0.13*(om34(i,2)*om34(i,2)*sin(th34(i,2)*dr)+a34(i,2)*cos(th34(i,2)*dr);jsd3x=-0.3*(om34(i,3)*om34(i,3)*cos(th34(i,3)*dr)+a34(i,3)*sin(th34(i,3)*dr);jsd3y=-0.3*(om34(i,3)*om34(i,3)*sin(th34(i,3)*dr)+a34(i,3)*cos(th34(i,3)*dr);jsd4x=-0.4*om34(i,3)*om34(i,3)*cos(th34(i,3)*dr)-0.23*(om34(i,4)*om34(i,4)*cos(th34(i,4)*dr)+a34(i,4)*sin(th34(i,4)*dr);jsd4y=-0.4*om34(i,3)*om34(i,3)*sin(th34(i,3)*dr)-0.23*(om34(i,4)*om34(i,4)*sin(th34(i,4)*dr)+a34(i,4)*cos(th34(i,4)*dr);jsd5x=-0.4*om34(i,3)*om34(i,3)*cos(th34(i,3)*dr)-0.46*(om34(i,4)*om34(i,4)*cos(th34(i,4)*dr)+a34(i,4)*sin(th34(i,4)*dr);F2x=-60/9.8*jsd2x;F2y=-60/9.8*jsd2y;M2=-0.08*a34(i,2);F3x=-72/9.8*jsd3x;F3y=-72/9.8*jsd3y;M3=-0.1*a34(i,3);F5x=-85/9.8*jsd4x;F5y=-85/9.8*jsd4y;M5=-0.12*a34(i,4);F6x=-85/9.8*jsd5x;F1=4000.0;X=0 1 0 1 0 0 0 0 0 0 0 0 0 0 01 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -0.08*sin(p1) 0.08*cos(p1) 0 0 0 0 0 0 0 0 0 0 10 0 0 -1 0 1 0 0 0 0 0 0 0 0 00 0 -1 0 1 0 0 0 0 0 0 0 0 0 00 0 -0.13*sin(th34(i,2)*dr) 0.13*cos(th34(i,2)*dr) -0.13*sin(th34(i,2)*dr) 0.13*sin(th34(i,2)*dr) 0 0 0 0 0 0 0 0 00 0 0 0 0 -1 0 1 0 1 0 0 0 0 00 0 0 0 -1 0 1 0 1 0 0 0 0 0 00 0 0 0 0 0 0.3*sin(th34(i,3)*dr) -0.3*cos(th34(i,3)*dr) -0.1*sin(th34(i,3)*dr) -0.1*cos(th34(i,3)*dr) 0 0 0 0 00 0 0 0 0 0 0 0 -1 0 1 0 0 0 00 0 0 0 0 0 0 0 0 -1 0 1 0 0 00 0 0 0 0 0 0 0 -0.23*sin(th34(i,4)*dr) 0.23*cos(th34(i,4)*dr) 0.23*sin(th34(i,4)*dr) 0.23*cos(th34(i,4)*dr) 0 0 00 0 0 0 0 0 0 0 0 0 0 -1 0 1 00 0 0 0 0 0 0 0 0 0 0 0 -1 0 0;Z=0 0 0 -F2y -F2x -M2 -F3y -F3x -M3 -F5x -F5y -M5 0 F6x+F1 0;t=X/Z;t15=t(15)power(i,:)=t t15;endplot(power(:,1),power(:,2)-

    注意事项

    本文(Matlab在机械设计中的应用大作业.doc)为本站会员(豆****)主动上传,淘文阁 - 分享文档赚钱的网站仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知淘文阁 - 分享文档赚钱的网站(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于淘文阁 - 版权申诉 - 用户使用规则 - 积分规则 - 联系我们

    本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知淘文阁网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

    工信部备案号:黑ICP备15003705号 © 2020-2023 www.taowenge.com 淘文阁 

    收起
    展开