matlab曲柄滑塊機構(gòu)的運動學仿真(共10頁)_第1頁
matlab曲柄滑塊機構(gòu)的運動學仿真(共10頁)_第2頁
matlab曲柄滑塊機構(gòu)的運動學仿真(共10頁)_第3頁
matlab曲柄滑塊機構(gòu)的運動學仿真(共10頁)_第4頁
matlab曲柄滑塊機構(gòu)的運動學仿真(共10頁)_第5頁
已閱讀5頁,還剩5頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、系統(tǒng)仿真與matlab綜合試題題 目: 曲柄滑塊機構(gòu)的運動學仿真 編 號: 21 難度系數(shù): 姓 名 班 級 學 號 聯(lián)系方式 成 績 系統(tǒng)仿真與matlab綜合試題1一、引言3二、運動學分析3、實例題目3、運動分析3三、MATLAB程序編寫5四、使用指南和實例仿真8五、結(jié)語10一、引言曲柄滑塊機構(gòu)是指用曲柄和滑塊來實現(xiàn)轉(zhuǎn)動和移動相互轉(zhuǎn)換的平面連桿機構(gòu),也稱曲柄連桿機構(gòu)。曲柄滑塊機構(gòu)廣泛應(yīng)用于往復(fù)活塞式發(fā)動機、壓縮機、沖床等的主機構(gòu)中,把往復(fù)移動轉(zhuǎn)換為不整周或整周的回轉(zhuǎn)運動;壓縮機、沖床以曲柄為主動件,把整周轉(zhuǎn)動轉(zhuǎn)換為往復(fù)移動。這里使用運動學知識,對其運動進行解析,并用為其設(shè)計仿真模塊。二、運

2、動學分析、實例題目對圖示單缸四沖程發(fā)動機中常見的曲柄滑塊機構(gòu)進行運動學仿真。已知連桿長度:,連桿的轉(zhuǎn)速:,設(shè)曲柄r2以勻速旋轉(zhuǎn),。初始條件:。仿真以為輸入,計算和,仿真時間0.5s。、運動分析建立封閉矢量方程:r2+r3=r1(9)將(9)式分解到x與y軸坐標上,得到:r2cos2+r3cos3=r1r2sin2+r3sin3=0(10)可得:r1=r2cos2+r3cos33=-arcsin(r2/r3)(11)對(10)式對時間求導(dǎo)得:-r22sin2+ r33sin3=v1r22cos2+ r33cos3=0(12)將上式用矩陣形式表示,令:A= r3sin3 1-r3cos3 0X=

3、3 v1B=-r22sin2r22cos2則(12)可表示為:AX=B。(13)從而可解出3與v1。三、MATLAB程序編寫源代碼如下:function varargout = z1(varargin)% Z1 MATLAB code for z1.fig% Z1, by itself, creates a new Z1 or raises the existing% singleton*.% H = Z1 returns the handle to a new Z1 or the handle to% the existing singleton*.% Z1(CALLBACK,hObject

4、,eventData,handles,.) calls the local% function named CALLBACK in Z1.M with the given input arguments.% Z1(Property,Value,.) creates a new Z1 or raises the% existing singleton*. Starting from the left, property value pairs are% applied to the GUI before z1_OpeningFcn gets called. An% unrecognized pr

5、operty name or invalid value makes property application% stop. All inputs are passed to z1_OpeningFcn via varargin.% *See GUI Options on GUIDEs Tools menu. Choose GUI allows only one% instance to run (singleton).% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to he

6、lp z1% Last Modified by GUIDE v2.5 29-Dec-2016 22:57:13% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct(gui_Name, mfilename, . gui_Singleton, gui_Singleton, . gui_OpeningFcn, z1_OpeningFcn, . gui_OutputFcn, z1_OutputFcn, . gui_LayoutFcn, , . gui_Callback, );if nargin & i

7、schar(varargin1) gui_State.gui_Callback = str2func(varargin1);endif nargout varargout1:nargout = gui_mainfcn(gui_State, varargin:);else gui_mainfcn(gui_State, varargin:);end% End initialization code - DO NOT EDIT% - Executes just before z1 is made visible.function z1_OpeningFcn(hObject, eventdata, h

8、andles, varargin)% This function has no output args, see OutputFcn.% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% varargin command line arguments to z1 (see VARARGIN)% Choose default command li

9、ne output for z1handles.output = hObject;% Update handles structureguidata(hObject, handles);axes(handles.axes3)map1=imread(1.bmp);imshow(map1)% UIWAIT makes z1 wait for user response (see UIRESUME)% uiwait(handles.figure1);% - Outputs from this function are returned to the command line.function var

10、argout = z1_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);% hObject handle to figure% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Get default command line outpu

11、t from handles structurevarargout1 = handles.output;% - Executes on button press in pushbuttonRun.function pushbuttonRun_Callback(hObject, eventdata, handles)%主要計算程序r2=0.1;%單位mr3=0.4;%單位momiga2=str2double(get(handles.edit1,String); %單位rad/sx11=1:500 %單位msfor i=1:500 theta2(i)=i*omiga2/1000; theta3(i

12、)=asin(-r2/r3*sin(theta2(i); B=-r2*omiga2*sin(theta2(i);r2*omiga2*cos(theta2(i); A=r3*sin(theta3(i) 1;-r3*cos(theta3(i) 0; X=inv(A)*B; omiga3(i)=X(1,1); v3(i)=X(2,1); end axes(handles.axes1) %制表1plot(x11/1000,omiga3); xlabel(時間(t/s)) ylabel(連桿角速度3(rad/s)) axes(handles.axes2) %制表2plot(x11/1000,v3); x

13、label(時間(t/s)) ylabel(滑塊速度v1(m/s))% hObject handle to pushbuttonRun (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)function edit1_Callback(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventd

14、ata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hints: get(hObject,String) returns contents of edit1 as text% str2double(get(hObject,String) returns contents of edit1 as a double% - Executes during object creation, after setting

15、 all properties.function edit1_CreateFcn(hObject, eventdata, handles)% hObject handle to edit1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on W

16、indows.% See ISPC and COMPUTER.if ispc & isequal(get(hObject,BackgroundColor), get(0,defaultUicontrolBackgroundColor) set(hObject,BackgroundColor,white);end% - Executes on button press in pushbuttonExit.function pushbuttonExit_Callback(hObject, eventdata, handles)ss=questdlg(確認退出?,退出信息窗口!,繼續(xù)仿真!,退出仿真!,退出仿真!);switch ss case 退出仿真! delete(handles.figure1);end% hObject handle to pushbuttonExit (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structu

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
  • 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論