资源描述:
《matlab曲柄滑块机构的运动学仿真.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、《系统仿真与matlab》综合试题题目:曲柄滑块机构的运动学仿真编号:21难度系数:姓名班级学号联系方式成绩《系统仿真与matlab》综合试题1一、引言3二、运动学分析31、实例题目32、运动分析3三、MATLAB程序编写5四、使用指南和实例仿真8五、结语10一、引言曲柄滑块机构是指用曲柄和滑块来实现转动和移动相互转换的平面连杆机构,也称曲柄连杆机构。曲柄滑块机构广泛应用于往复活塞式发动机、压缩机、冲床等的主机构中,把往复移动转换为不整周或整周的回转运动;压缩机、冲床以曲柄为主动件,把整周转动转换为往
2、复移动。这里使用运动学知识,对其运动进行解析,并用MATLAB为其设计仿真模块。二、运动学分析1、实例题目对图示单缸四冲程发动机中常见的曲柄滑块机构进行运动学仿真。已知连杆长度:,,连杆的转速:,,设曲柄r2以匀速旋转,。初始条件:。仿真以为输入,计算和,仿真时间0.5s。2、运动分析建立封闭矢量方程: r2+r3=r1 (9) 将(9)式分解到x与y轴坐标上,得到: r2cosθ2+r3cosθ3=r1r2sinθ2+r3sinθ3=0 (10) 可得: r1=
3、r2cosθ2+r3cosθ3θ3=-arcsin(r2/r3) (11) 对(10)式对时间求导得: -r2ω2sinθ2+r3ω3sinθ3=v1r2ω2cosθ2+r3ω3cosθ3=0(12) 将上式用矩阵形式表示,令: A=[r3sinθ31-r3cosθ30]X=[ω3v1]B=[-r2ω2sinθ2r2ω2cosθ2]则(12)可表示为:AX=B。(13)从而可解出ω3与v1。三、MATLAB程序编写源代码如下:functionvarargout=
4、z1(varargin)%Z1MATLABcodeforz1.fig%Z1,byitself,createsanewZ1orraisestheexisting%singleton*.%%H=Z1returnsthehandletoanewZ1orthehandleto%theexistingsingleton*.%%Z1('CALLBACK',hObject,eventData,handles,...)callsthelocal%functionnamedCALLBACKinZ1.Mwiththegi
5、veninputarguments.%%Z1('Property','Value',...)createsanewZ1orraisesthe%existingsingleton*.Startingfromtheleft,propertyvaluepairsare%appliedtotheGUIbeforez1_OpeningFcngetscalled.An%unrecognizedpropertynameorinvalidvaluemakespropertyapplication%stop.Allin
6、putsarepassedtoz1_OpeningFcnviavarargin.%%*SeeGUIOptionsonGUIDE'sToolsmenu.Choose"GUIallowsonlyone%instancetorun(singleton)".%%Seealso:GUIDE,GUIDATA,GUIHANDLES%Edittheabovetexttomodifytheresponsetohelpz1%LastModifiedbyGUIDEv2.529-Dec-201622:57:13%Begini
7、nitializationcode-DONOTEDITgui_Singleton=1;gui_State=struct('gui_Name',mfilename,...'gui_Singleton',gui_Singleton,...'gui_OpeningFcn',@z1_OpeningFcn,...'gui_OutputFcn',@z1_OutputFcn,...'gui_LayoutFcn',[],...'gui_Callback',[]);ifnargin&&ischar(varargin{1
8、})gui_State.gui_Callback=str2func(varargin{1});endifnargout[varargout{1:nargout}]=gui_mainfcn(gui_State,varargin{:});elsegui_mainfcn(gui_State,varargin{:});end%Endinitializationcode-DONOTEDIT%---Executesjustbeforez1ismadevisible.