




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、系統(tǒng)仿真與matlab綜合試題題 目: 曲柄滑塊機構的運動學仿真 編 號: 21 難度系數(shù): 姓 名 班 級 學 號 聯(lián)系方式 成 績 系統(tǒng)仿真與matlab綜合試題1一、引言3二、運動學分析3、實例題目3、運動分析3三、MATLAB程序編寫5四、使用指南和實例仿真8五、結語10一、引言曲柄滑塊機構是指用曲柄和滑塊來實現(xiàn)轉動和移動相互轉換的平面連桿機構,也稱曲柄連桿機構。曲柄滑塊機構廣泛應用于往復活塞式發(fā)動機、壓縮機、沖床等的主機構中,把往復移動轉換為不整周或整周的回轉運動;壓縮機、沖床以曲柄為主動件,把整周轉動轉換為往復移動。這里使用運動學知識,對其運動進行解析,并用為其設計仿真模塊。二、運
2、動學分析、實例題目對圖示單缸四沖程發(fā)動機中常見的曲柄滑塊機構進行運動學仿真。已知連桿長度:,連桿的轉速:,設曲柄r2以勻速旋轉,。初始條件:。仿真以為輸入,計算和,仿真時間0.5s。、運動分析建立封閉矢量方程:r2+r3=r1(9)將(9)式分解到x與y軸坐標上,得到:r2cos2+r3cos3=r1r2sin2+r3sin3=0(10)可得:r1=r2cos2+r3cos33=-arcsin(r2/r3)(11)對(10)式對時間求導得:-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)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 【正版授權】 ISO/IEC TS 7339:2024 EN Information technology - Cloud computing - Overview of platform capabilities type and platform as a service
- 【正版授權】 ISO 37111:2024 EN Sustainable cities and communities - Urban settlements - Guidance for a flexible approach to phased implementation of ISO 37101
- 2025年度大清包勞務合同(市政道路施工管理協(xié)議)
- 2025年度廢鐵進出口代理與運輸服務合同
- 2025年度科技展會場地布置及維護服務合同
- 2025年起動腳蹬桿項目建議書
- 2025年超低頻振動標準合作協(xié)議書
- 多元化教學方法實施方案計劃
- 倉庫工作總結計劃指引
- 社會媒體策略的實踐與回顧計劃
- 服飾品設計PPT完整全套教學課件
- 2023年04月廣東深圳市市場監(jiān)督管理局許可審查中心招考聘用醫(yī)療器械注冊審評員(員額)筆試參考題庫附答案解析
- 小學六年級數(shù)學計算題100道(含答案)
- 室外工程小市政監(jiān)理實施細則
- 我的妹妹-教學設計教案
- GB/T 881-2000螺尾錐銷
- GB/T 30512-2014汽車禁用物質要求
- GB/T 21117-2007磁致伸縮液位計
- 五年級上冊語文閱讀理解附答案
- 水帶業(yè)務操作規(guī)范一人兩帶
- 2023執(zhí)業(yè)藥師繼續(xù)教育試題題庫和答案(完整版)
評論
0/150
提交評論