版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)
文檔簡介
1、自控控制原理 MATLAB 程序設(shè)計作業(yè)指導(dǎo)老師:汪曉寧目錄一、題目 . 2二、運行結(jié)果 . 3三、程序說明 . 8四、附錄 . 9 代碼 . . 9 參考文獻 . 17一、題目用 Matlab 創(chuàng)建用戶界面,并完成以下功能a 將產(chǎn)生未綜合系統(tǒng)的根軌跡圖以及 0.707阻尼比線, 你可以交互地選擇交點的運行 點。 界面能顯示運行點的坐標(biāo)、 增益值以及近似為二階系統(tǒng)估算的超調(diào)量、 調(diào)整時 間、峰值時間、阻尼比、無阻尼自然震蕩頻率以及穩(wěn)態(tài)誤差b 顯示未綜合系統(tǒng)的階躍響應(yīng)c 輸入控制器的參數(shù), 繪制綜合后系統(tǒng)的根軌跡圖以及顯示綜合的設(shè)計點 (主導(dǎo)極點 , 允許不斷改變控制器參數(shù),知道所繪制的根軌跡通
2、過設(shè)計點d 對于綜合后的系統(tǒng), 顯示運行點的坐標(biāo)、 增益,近似為二階系統(tǒng)估算的超調(diào)量、調(diào) 整時間、峰值時間、阻尼比、無阻尼自然震蕩頻率以及誤差系數(shù)e 顯示綜合后系統(tǒng)的階躍響應(yīng)二、運行結(jié)果 輸入傳遞函數(shù)分子分母 生成根軌跡圖 選擇點并得到該點各項參數(shù)在下方輸出面板輸出 獲得階躍響應(yīng)圖用 rltool(輔助,選擇合適的插入零點 輸入零點,并得到根軌跡圖 選擇根軌跡圖上的任一點,得到數(shù)據(jù),在下方輸出面板輸出得到階躍響應(yīng)圖 三、運行說明第一步, 在請輸入分子后的輸入框輸入傳遞函數(shù)分子的矩陣, 在下一輸入框輸入傳遞函 數(shù)分母并按“生成根軌跡圖”按鈕獲得根軌跡第二步, 按選擇點并顯示各參數(shù)獲得根軌跡圖上任
3、一點的各項數(shù)據(jù), 數(shù)據(jù)全部輸出在下 方輸出面板第三步,按“生成階躍響應(yīng)圖”按鈕可以獲得該函數(shù)的階躍響應(yīng)第四步,在“請輸入插入零點”后的輸入框中輸入?yún)?shù),并按“生成綜合后根軌跡圖” 按鈕產(chǎn)生根軌跡 (可以通過點擊 “根軌跡校正”按鈕,調(diào)用工具箱拖動零點進行快速查看根 軌跡圖,選擇合適的根軌跡再在輸入框中輸入零點的值第五步,按“選擇點并顯示各參數(shù)(綜合后系統(tǒng) ”選取各點,查閱參數(shù),數(shù)據(jù)輸出在 下方輸出面板上第六步,按“生成階躍響應(yīng)圖(綜合后系統(tǒng) ”可以得到綜合后系統(tǒng)的階躍響應(yīng)最后,點擊“退出”結(jié)束程序四、附錄代碼:function varargout = Liushuai20122510(vara
4、rgin% LIUSHUAI20122510 MATLAB code for Liushuai20122510.fig% LIUSHUAI20122510, by itself, creates a new LIUSHUAI20122510 or raises the existing% singleton*.% H = LIUSHUAI20122510 returns the handle to a new LIUSHUAI20122510 or the handle to% the existing singleton*.% LIUSHUAI20122510('CALLBACK
5、39;,hObject,eventData,handles,.calls the local% function named CALLBACK in LIUSHUAI20122510.M with the given input arguments.% LIUSHUAI20122510('Property','Value',. creates a new LIUSHUAI20122510 or raises the% existing singleton*. Starting from the left, property value pairs are% ap
6、plied to the GUI before Liushuai20122510_OpeningFcn gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to Liushuai20122510_OpeningFcn via varargin.% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one% instanc
7、e to run (singleton".% See also: GUIDE, GUIDATA, GUIHANDLES% Edit the above text to modify the response to help Liushuai20122510 % Last Modified by GUIDE v2.5 16-Dec-2014 10:28:20% Begin initialization code - DO NOT EDITgui_Singleton = 1;gui_State = struct('gui_Name', mfilename, .'g
8、ui_Singleton', gui_Singleton, .'gui_OpeningFcn', Liushuai20122510_OpeningFcn, .'gui_OutputFcn', Liushuai20122510_OutputFcn, . 'gui_LayoutFcn', , .'gui_Callback', ;if nargin && ischar(varargin1gui_State.gui_Callback = str2func(varargin1;endif nargoutvarargo
9、ut1:nargout = gui_mainfcn(gui_State, varargin:;elsegui_mainfcn(gui_State, varargin:;end% End initialization code - DO NOT EDIT% - Executes just before Liushuai20122510 is made visible.function Liushuai20122510_OpeningFcn(hObject, eventdata, handles, varargin% This function has no output args, see Ou
10、tputFcn.% 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 Liushuai20122510 (see VARARGIN% Choose default command line output for Liushuai20122510handles.output =
11、 hObject;% Update handles structureguidata(hObject, handles;% UIWAIT makes Liushuai20122510 wait for user response (see UIRESUME % uiwait(handles.figure1;% - Outputs from this function are returned to the command line. function varargout = Liushuai20122510_OutputFcn(hObject, eventdata, handles% vara
12、rgout 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 output from handles structurevarargout1 = handles.output;% - Ex
13、ecutes on button press in pushbutton1.function pushbutton1_Callback(hObject, eventdata, handles% hObject handle to pushbutton1 (see GCBO% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATAnum = str2num(get(handles.edit1,'S
14、tring' ;den = str2num(get(handles.edit2,'String' ;G = tf(num,den;rlocus(Ghold on ;sgrid(0.707,hold off ;% - Executes on button press in pushbutton2.function pushbutton2_Callback(hObject, eventdata, handles% hObject handle to pushbutton2 (see GCBO% eventdata reserved - to be defined in a
15、future version of MATLAB % handles structure with handles and user data (see GUIDATAnum = str2num(get(handles.edit1,'String' ;den = str2num(get(handles.edit2,'String' ;sys=tf(num,den;y,t=step(sys;plot(t,y;grid on ;% - Executes on button press in pushbutton3.function pushbutton3_Callb
16、ack(hObject, eventdata, handles% hObject handle to pushbutton3 (see GCBO% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA close(gcbf;function edit1_Callback(hObject, eventdata, handles% hObject handle to edit1 (see GCBO% ev
17、entdata 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 c
18、reation, after setting 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
19、 white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor' , get(0,'defaultUicontrolBackgroundColor' set(hObject,'BackgroundColor' , 'white' ;end% - Executes on button press in pushbutton4.function pushbutton4_Callbac
20、k(hObject, eventdata, handles% hObject handle to pushbutton4 (see GCBO% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATAnum = str2num(get(handles.edit1,'String' ;den = str2num(get(handles.edit2,'String' ;fina
21、lvalue = polyval(num,0/polyval(den,0sys=tf(num,den;Kc,p=rlocfind(sys;set(handles.Kc,'string' ,Kc;X = real(p(1Y = imag(p(1set(handles.Xpoint,'string' ,num2str(X;set(handles.Ypoint,'string' ,num2str(Y;damp=sqrt(X(1,12/(X(1,12+Y(1,12;Wn=abs(X(1,1/damp;Tp=pi/(Wn*sqrt(1-damp2;over
22、shoot=exp(-pi*damp/sqrt(1-damp2;Ts=3/(damp*Wn;deviation=Wn2;set(handles.overshoot,'string' ,num2str(overshoot;set(handles.Ts,'string' ,Ts;set(handles.Tp,'string' ,Tp;set(handles.Wn,'string' ,num2str(Wn;set(handles.damp,'string' ,num2str(damp;set(handles.deviat
23、ion,'string' ,deviation;function edit2_Callback(hObject, eventdata, handles% hObject handle to edit1 (see GCBO% eventdata 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 o
24、f edit1 as text% str2double(get(hObject,'String' returns contents of edit1 as a double% - Executes during object creation, after setting all properties. function edit2_CreateFcn(hObject, eventdata, handles% hObject handle to edit1 (see GCBO% eventdata reserved - to be defined in a future ver
25、sion of MATLAB % handles empty - handles not created until after all CreateFcns called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor' , get(0,'defaultUicontrolBackgroundColor' set(hObjec
26、t,'BackgroundColor' , 'white' ;end% - Executes on button press in pushbutton5.function pushbutton5_Callback(hObject, eventdata, handles% hObject handle to pushbutton5 (see GCBO% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user
27、 data (see GUIDATAnum = str2num(get(handles.edit1,'String' ;den = str2num(get(handles.edit2,'String' ;sys=tf(num,denrltool(sys;%ÀûÓù¤¾ßµ÷Õû¿ØÖÆÆ÷²ÎÊýʹ֮
28、¾-¹ýÖ÷µ¼¼«µãfunction edit4_Callback(hObject, eventdata, handles% hObject handle to edit4 (see GCBO% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA% Hints: get(hObject,
29、'String' returns contents of edit4 as textw'q % str2double(get(hObject,'String' returns contents of edit4 as a double% - Executes during object creation, after setting all properties. function edit4_CreateFcn(hObject, eventdata, handles% hObject handle to edit4 (see GCBO% eventda
30、ta 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 Windows.% See ISPC and COMPUTER.if ispc && isequal(get(hObject,'BackgroundColor' , get(0,'defa
31、ultUicontrolBackgroundColor' set(hObject,'BackgroundColor' , 'white' ;end% - Executes on button press in pushbutton6.function pushbutton6_Callback(hObject, eventdata, handles% hObject handle to pushbutton6 (see GCBO% eventdata reserved - to be defined in a future version of MATLA
32、B % handles structure with handles and user data (see GUIDATA% - Executes on button press in pushbutton7.function pushbutton7_Callback(hObject, eventdata, handles% hObject handle to pushbutton7 (see GCBO% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handl
33、es and user data (see GUIDATA% - Executes on button press in pushbutton8.function pushbutton8_Callback(hObject, eventdata, handles% hObject handle to pushbutton8 (see GCBO% eventdata reserved - to be defined in a future version of MATLAB自動控制原理 Matlab 程序設(shè)計報告 % handles structure with handles and user
34、data (see GUIDATA % - Executes on button press in pushbutton9. function pushbutton9_Callback(hObject, eventdata, handles % hObject % eventdata % handles handle to pushbutton9 (see GCBO reserved - to be defined in a future version of MATLAB structure with handles and user data (see GUIDATA num = str2
35、num(get(handles.edit1,'String' den = str2num(get(handles.edit2,'String' A = str2num(get(handles.edit5,'String'*(-1; num = 1 A; G = tf(num,den; rlocus(G hold on; sgrid(0.707, hold off; % - Executes on button press in pushbutton10. function pushbutton10_Callback(hObject, eventd
36、ata, handles % hObject % eventdata % handles handle to pushbutton10 (see GCBO reserved - to be defined in a future version of MATLAB structure with handles and user data (see GUIDATA num = str2num(get(handles.edit1,'String' den = str2num(get(handles.edit2,'String' A = str2num(get(han
37、dles.edit5,'String' num = 1 A; sys=tf(num,den; y,t=step(sys; plot(t,y; grid on; % - Executes on button press in pushbutton11. function pushbutton11_Callback(hObject, eventdata, handles % hObject % eventdata % handles handle to pushbutton11 (see GCBO reserved - to be defined in a future versi
38、on of MATLAB structure with handles and user data (see GUIDATA num = str2num(get(handles.edit1,'String' den = str2num(get(handles.edit2,'String' A = str2num(get(handles.edit5,'String' 15 自動控制原理 Matlab 程序設(shè)計報告 num1 = 1 A; sys=tf(num1,den; Kc,p=rlocfind(sys; set(handles.Kc,'string',Kc; X = real(p(1 Y = imag(p(1 set(handles.Xpoint,'string',num2str(X; set(handles.Ypoint,'string',num2str(Y; damp=sqrt(X(1,12/(X(1,12+Y(1,12; Wn=abs(X(1,1/damp; Tp=pi/(Wn*sqrt(1-damp2; overshoot=exp(-pi*damp/sqrt(1-damp2; Ts=3/(damp*Wn; deviat
溫馨提示
- 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)容負責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025版信用證抵押貸款業(yè)務(wù)合作協(xié)議范本3篇
- 2025版土方工程居間代理服務(wù)合同范本下載33篇
- 2025年度股權(quán)分割與繼承處理協(xié)議
- 2025年度房地產(chǎn)合作終止協(xié)議書
- 2025年度旅游文化股權(quán)合作協(xié)議書
- 二零二五年度木工機械操作人員勞務(wù)租賃合同4篇
- 2025年度牧業(yè)產(chǎn)品品牌推廣與營銷合同4篇
- 二零二五年度火鍋餐飲品牌區(qū)域代理授權(quán)協(xié)議
- 二零二五年度餐飲店員工激勵機制與績效考核合同
- 二零二五版環(huán)保技術(shù)入股合作協(xié)議書3篇
- 并購指南(如何發(fā)現(xiàn)好公司)
- DL-T-1642-2016環(huán)形混凝土電桿用腳扣
- 平安產(chǎn)險陜西省地方財政生豬價格保險條款
- 銅礦成礦作用與地質(zhì)環(huán)境分析
- 30題紀檢監(jiān)察位崗位常見面試問題含HR問題考察點及參考回答
- 詢價函模板(非常詳盡)
- 《AI營銷畫布:數(shù)字化營銷的落地與實戰(zhàn)》
- 麻醉藥品、精神藥品、放射性藥品、醫(yī)療用毒性藥品及藥品類易制毒化學(xué)品等特殊管理藥品的使用與管理規(guī)章制度
- 乘務(wù)培訓(xùn)4有限時間水上迫降
- 2023年低年級寫話教學(xué)評語方法(五篇)
- DB22T 1655-2012結(jié)直腸外科術(shù)前腸道準備技術(shù)要求
評論
0/150
提交評論