基于MATLAB实现平面四杆机构运动仿真!

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

:1002-6886(2005)04-0050-03MATLAB,,(中南大学机电工程学院,湖南长沙410083):王静文(1977),女,中南大学机电工程学院硕士研究生:2005-3-18:本文利用MATLAB软件实现平面四杆机构及其演化形式的运动仿真,为平面四杆机构的设计与分析提供一条便捷的途径:平面四杆机构运动仿真MATLABKinematicSimulationofPlanarFourbarMechanismBasedonMATLABWANGJingwen,LIUShunrao,MOJiangtaoAbstract:ThispaperfocusonthekinematicsmiulationofplanarfourbarmechanismanditsevolutionswithsoftwareMATLAB,whichgiveanotherefficaciouswayforthedesignandanalysisofplanarfourbarmechanism.Keywords:planarfourbarmechanism;kinematicsmiulation;MATLAB1,,,,,MATLAB,,,,MATLABMATLAB,22.1[1][2]1,L1L3L2L0,L1L3L2L0,L11,L31,,:L1ei1+L2ei2=L0+L3ei3(1),:L1cos1+L2cos2-L3cos3-L0=0(2)L1sin1+L2sin2-L3sin3=0(3)2,13,1,3(2):sin2=(L3sin3-L1sin1)/L2(4)(4)cos2=1-sin22(2),:f(1,3)=L1cos1+L21-L3sin3-L1sin1L2!-L3cos3-L0=0(5)1,f(3)=033,,L3:3=d3/dt(6)(6),L3:3=d3/dt(7)2.2MATLABf(3)=03,MATLABfzero,f=f(3)MATLABfour_bar_equation.m,four_bar.mfzerof(x)=0,:x=fzero(fun,x0),funf(x)M,funfour_bar_equation.m,x,x03,(6),;,MATLABdiffdiff,:y=diff(x),MATLAB,linesetdrawnow,∀50∀20054,MATLAB[3]1)four_bar.mfunctionfour_barglobalL0L1L2L3th1str=inputdlg({P'leaseinput(rack_length)L0:#,#Pleaseinputcrank_lengthL1:#,#Pleaseinputlinkage_lengthL2:#,#Pleaseinputrock_lengthL3(13L3=20.6):#,#Pleaseinputw1(rad/sec):#,#Pleaseinputrepeattimesm:#,#Pleaseinputinitialtheta3(rad):#},#Pleaseinput!#,1,{#20#,#8#,#25#,#20#,#100#,#10#,#1#});L0=str2num(str{1});L1=str2num(str{2});L2=str2num(str{3});L3=str2num(str{4});w1=str2num(str{5});m=str2num(str{6});theta3=str2num(str{7});t=linspace(0,2*pi/w1,181);dt=2*pi/180/w1;theta1=w1*t;th1=theta1(1);theta3(1)=fzero(#four_bar_equation#,theta3);x_a=0;y_a=0;x_b=x_a+L1*cos(theta1(1));y_b=y_a+L1*sin(theta1(1));x_d=x_a+L0;y_d=y_a;x_c=x_d+L3*cos(theta3(1));y_c=y_d+L3*sin(theta3(1));figure(#name#,#four_bar_movie......#,#numbertitle#,#off#,#position#,[232199617479]);line([x_a;x_d],[y_a;y_d],#color#,#m#,#linestyle#,#-#,#linewidth#,3,#erasemode#,#none#);line(x_a,y_a,#color#,#b#,#linestyle#,#.#,#erasemode#,#none#,#markersize#,40);line(x_d,y_d,#color#,#b#,#linestyle#,#.#,#erasemode#,#none#,#markersize#,40);dot_b=line(x_b,y_b,#color#,#b#,#linestyle#,#.#,#erasemode#,#xor#,#markersize#,15);dot_c=line(x_c,y_c,#color#,#b#,#linestyle#,#.#,#erasemode#,#xor#,#markersize#,15);line_ab=line([x_a;x_b],[y_a;y_b],#color#,#r#,#linestyle#,#-#,#erasemode#,#xor#);line_bc=line([x_b;x_c],[y_b;y_c],#color#,#g#,#linestyle#,#-#,#erasemode#,#xor#);line_cd=line([x_c;x_d],[y_c;y_d],#color#,#b#,#linestyle#,#-#,#erasemode#,#xor#);axis([-L1-L0/3L2+L3-L0/3-L1L3]);axisequa;lfori=1:mforj=2:181th1=theta1(j);theta3(j)=fzero(#four_bar_equation#,theta3(j-1));x_b=x_a+L1*cos(th1);y_b=y_a+L1*sin(th1);x_b_cl(,j1)=x_b;y_b_cl(,j1)=y_b;x_c=x_d+L3*cos(theta3(j));y_c=y_d+L3*sin(theta3(j));x_c_cl(,j1)=x_c;y_c_cl(,j1)=y_c;set(dot_b,#xdata#,x_b,y'data#,y_b);set(dot_c,#xdata#,x_c,y'data#,y_c);set(line_ab,#xdata#,[x_a;x_b],y'data#,[y_a;y_b]);set(line_bc,#xdata#,[x_b;x_c],#ydata#,[y_b;y_c]);set(line_cd,#xdata#,[x_c;x_d],#ydata#,[y_c;y_d]);drawnow;endendw3=diff(theta3)/dt;a3=diff(w3)/dt;2)four_bar_equation.mfunctiony=four_bar_equation(x)globalL0L1L2L3th1y=L1*cos(th1)+L2*sqrt(1-(L3*sin(x)-L1*sin(th1))^2/L2/L2)-L3*cos(x)-L0;2.32,3,MATLABplot,456∀51∀2.4,,1),fzero,,7891011,1213143MATLAB,,MATLAB6.51周晓阳.数学实验与MATLAB.武汉:华中科技大学出版社,20022陈怀琛.MATLAB及其在理工课程中的应用指南.西安:西安电子科技大学出版社,20003张志涌.精通MATLAB6.5版.北京:北京航空航天大学出版社,2003(上接第24页)3,,1UsingMSC.ADAMS/FunctionBuilder.Version9.MDI,19982G.Bianch,L.MolinariTosatt.iVirtualPrototypingofParallelMechanisms.ProcInstnMechEngrsVol216PartK:Multi-bodyDynamics,20023SadowskiDA.TipsforSuccessfulPracticeofSimulation.Proceedingsofthe1999WinterSimulationConference,December5-8,19994郑建荣.ADAMS-虚拟样机技术入门与提高[M].北京:机械工业出版社,20025李军,邢俊文等.ADAMS实例教程[M].北京:北京理工大学出版社,20026王国强,张进平等.虚拟样机技术及其在ADAMS上的实践[M].西安:西北工业大学出版社,20027龙凯,程颖.MSC.ADAMS软件在齿轮啮合力仿真计算中的应用[J].2002MSC.Software中国用户论文集,20028曹巨江,陈雪峰.弧面凸轮诱导主曲率与接触应力[J].机械设计,2001(11)9徐芝纶.弹性力学[M].北京:高等教育出版社,1990∀52∀20054

1 / 3
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功