版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、精選優(yōu)質(zhì)文檔-傾情為你奉上基于MATLAB語言環(huán)境的二階慣性系統(tǒng)PID控制仿真目錄一、課程設(shè)計(jì)要求3二、PID控制簡(jiǎn)述3三、系統(tǒng)性能分析5四、參數(shù)整定6五、PID三參數(shù)變化對(duì)系統(tǒng)的影響7六、人機(jī)交互界面設(shè)計(jì)9七、心得體會(huì)15一、課程設(shè)計(jì)要求1在MATLAB語言環(huán)境下,給定參數(shù)下的二階慣性系統(tǒng),要求分析在單位階躍函數(shù)作用下,系統(tǒng)的動(dòng)態(tài)響應(yīng)性能;2在系統(tǒng)的前向通道加入比例、積分、微分控制器,調(diào)整系統(tǒng)控制器的比例、積分、微分參數(shù),需求系統(tǒng)的最佳輸出性能;3利用所學(xué)知識(shí)分析三參數(shù)增大或減小時(shí),對(duì)系統(tǒng)動(dòng)靜態(tài)性能的影響,并用仿真實(shí)驗(yàn)驗(yàn)證其正確性。4.設(shè)計(jì)人機(jī)交互界面,可通過對(duì)界面輸入?yún)?shù),實(shí)現(xiàn)參數(shù)修改于曲
2、線顯示。注:二階系統(tǒng)前向通道傳遞函數(shù)為。二、PID控制簡(jiǎn)述PID控制器由比例單元(P)、積分單元(I)和微分單元(D)組成。其輸入e (t)與輸出u (t)的關(guān)系為: u(t)=kpe(t)+1/TIe(t)dt+TD*de(t)/dt 式中積分的上下限分別是0和t 。因此它的傳遞函數(shù)為:G(s)=U(s)/E(s)=kp1+1/(TI*s)+TD*s 。其中kp為比例系數(shù); TI為積分時(shí)間常數(shù); TD為微分時(shí)間常數(shù)。比例(P)控制比例控制是一種最簡(jiǎn)單的控制方式。其控制器的輸出與輸入誤差信號(hào)成比例關(guān)系。當(dāng)僅有比例控制時(shí)系統(tǒng)輸出存在穩(wěn)態(tài)誤差(ady-state error)。積分(I)控制在積分
3、控制中,控制器的輸出與輸入誤差信號(hào)的積分成正比關(guān)系。對(duì)一個(gè)自動(dòng)控制系統(tǒng),如果在進(jìn)入穩(wěn)態(tài)后存在穩(wěn)態(tài)誤差,則這個(gè)控制系統(tǒng)是有穩(wěn)態(tài)誤差的或簡(jiǎn)稱有差系統(tǒng)(System with Steady-state Error)。為了消除穩(wěn)態(tài)誤差,在控制器中必須引入項(xiàng)”。積分項(xiàng)對(duì)誤差取決于時(shí)間的積分,隨著時(shí)間的增加,積分項(xiàng)會(huì)增大。這樣,即便誤差很小,積分項(xiàng)也會(huì)隨著時(shí)間的增加而加大,推動(dòng)控制器的輸出增大使穩(wěn)態(tài)誤差進(jìn)一步減小,直到等于零。因此,比例+積分(PI)控制器,可以使系統(tǒng)在進(jìn)入穩(wěn)態(tài)后無穩(wěn)態(tài)誤差。微分(D)控制在微分控制中,控制器的輸出與輸入誤差信號(hào)的微分(即誤差的變化率)成正比關(guān)系。自動(dòng)控制系統(tǒng)在克服誤差的調(diào)
4、節(jié)過程中能會(huì)出現(xiàn)振蕩甚至失穩(wěn)。其原因是由于存在有較大慣性組件(環(huán)節(jié))或有滯后(delay)組件,具有抑制誤差的作用,其變化總是落后于誤的變化。解決的辦法是使抑制誤差的作用的變化“超前”,即在誤差接近零時(shí),抑制誤差的作用就應(yīng)該是零。這就是說,在控制器中僅入“比例”項(xiàng)往往是不夠的,比例項(xiàng)的作用僅是放大誤差的幅值,而目前需要增加的是“微分項(xiàng)”,它能預(yù)測(cè)誤差變化的趨勢(shì),這樣,有比例+微分的控制器,就能夠提前使抑制誤差的控制作用等于零,甚至為負(fù)值,從而避免了被控量的嚴(yán)重超調(diào)。所以對(duì)有較大慣性或滯的被控對(duì)象,比例+微分(PD)控制器能改善系統(tǒng)在調(diào)節(jié)過程中的動(dòng)態(tài)特性。PID控制器的參數(shù)整定PID控制器的參數(shù)
5、整定是控制系統(tǒng)設(shè)計(jì)的核心內(nèi)容。它是根據(jù)被控過程的特性確定PID控制器的比例系數(shù)、積分時(shí)間和微分時(shí)間大小。PID控制器參數(shù)整定的方法很多,概括起來有兩大類:一是理論計(jì)算整定法。它主要是依據(jù)系統(tǒng)的數(shù)學(xué)模型,經(jīng)過理論計(jì)算確定控器參數(shù)。這種方法所得到的計(jì)算數(shù)據(jù)未必可以直接用,還必須通過工程實(shí)際進(jìn)行調(diào)整和修改。二是工程整定方法,它主要依賴工程經(jīng)驗(yàn),直接在控制系統(tǒng)的試驗(yàn)中進(jìn)行,且方法簡(jiǎn)單、易于掌握,在工程實(shí)際中被廣泛采用。PID控制器參數(shù)的工程整定方法,主要有臨界比例法反應(yīng)曲線法和衰減法。三種方法各有其特點(diǎn),其共同點(diǎn)都是通過試驗(yàn),然后按照工程經(jīng)驗(yàn)公式對(duì)控制器參數(shù)進(jìn)行整定。但無論采用哪一方法所得到的控制器參
6、數(shù),都需要在實(shí)際運(yùn)行中進(jìn)行最后調(diào)整與完善?,F(xiàn)在一般采用的是臨界比例法。利用該方法進(jìn)行PID 整定步驟如下:(1)首先預(yù)選擇一個(gè)足夠短的采樣周期讓系統(tǒng)工作(2)僅加入比例控制環(huán)節(jié),直到系統(tǒng)對(duì)輸入的階躍響應(yīng)出現(xiàn)臨界振蕩,記下這時(shí)的比例放大系數(shù)和臨界振蕩周期(3)在一定的控制度下通過公式計(jì)算得到PID控制器的參數(shù)。三、系統(tǒng)性能分析穩(wěn)定性判斷程序如下:num=1;den=100 4 81; z,p,k=tf2zp(num,den) jj=find(real(p)>0);n=length(jj); if(n>0) disp('The System is Unstable');
7、 else disp('The System is Stable'); end axis equal; pzmap(p,z); title('The pole Map of system');運(yùn)行結(jié)果:z =Empty matrix: 0-by-1p =-0.0200 + 0.8998i -0.0200 - 0.8998ik = 0.0100The System is Stable所以系統(tǒng)是穩(wěn)定的。系統(tǒng)的極點(diǎn)分布圖如下:系統(tǒng)的性能指標(biāo)判斷程序如下:num=1;den=100 4 80;step(num,den);figure(1);hold on得出性能指標(biāo)如下
8、:上升時(shí)間tr:1.79s峰值時(shí)間tp:3.58s最大超調(diào)量:92%調(diào)節(jié)時(shí)間ts:150s穩(wěn)態(tài)誤差:0.988衰減率:0.0625由各指標(biāo)可知,該系統(tǒng)的最大超調(diào)量過大,調(diào)節(jié)時(shí)間太長,且穩(wěn)態(tài)誤差接近于1,需要進(jìn)行整定。四、參數(shù)的整定調(diào)節(jié)器參數(shù)整定的實(shí)質(zhì)就是選擇合適的調(diào)節(jié)器參數(shù),使其閉環(huán)控制系統(tǒng)的特征方程的每一個(gè)根都能滿足穩(wěn)定性的要求,即選擇調(diào)節(jié)器的參數(shù)比例度。積分時(shí)間以及微分時(shí)間的大小,是特征方程所有實(shí)根的實(shí)數(shù)部分均為負(fù)數(shù),從而保證系統(tǒng)式穩(wěn)定的;與此同時(shí)還要使衰減指數(shù)在0.2210.366之間,以滿足衰減率在0.750.9的要求加入PID調(diào)節(jié)器,調(diào)節(jié)PID調(diào)節(jié)器各項(xiàng)參數(shù),可得當(dāng)Kp=200,Ti
9、=0.32;Td=3;系統(tǒng)的各參數(shù)為:上升時(shí)間tr:0.537s峰值時(shí)間tp:0.997s最大超調(diào)量:5%調(diào)節(jié)時(shí)間ts:12s穩(wěn)態(tài)誤差:0衰減率:0.6由上述各指標(biāo)可知系統(tǒng)的穩(wěn)態(tài)誤差已消除,調(diào)節(jié)時(shí)間也在工業(yè)可接受標(biāo)準(zhǔn)范圍內(nèi)。五、PID三參數(shù)變化對(duì)系統(tǒng)的影響設(shè)PID控制器的傳遞函數(shù)為:G(s)=Kp(1+1/Tis+Tds)1、 比例控制的影響:下面的程序研究在不同的Kp值下,閉環(huán)系統(tǒng)的單位階躍響應(yīng)曲線及根軌跡圖,程序如下:G0=tf(1,100 4 80);P=1 10 20 50 79;hold onfor i=1:length(P)G=feedback(P(i)*G0,1);step(G)
10、;grid on,axis(0,160,0,1)endhold off由圖可知:隨著Kp的增大,閉環(huán)系統(tǒng)的靈敏度增大,穩(wěn)態(tài)誤差減小,響應(yīng)的震蕩增強(qiáng)。輸入程序:figure,rlocus(G0)k=rlocfind(G0)可得根軌跡圖如下:由根軌跡圖知道,無論K值怎么變化,根軌跡都不會(huì)跨入右半平面,即系統(tǒng)一直是穩(wěn)定的。2、 積分控制的影響 將Kp的值固定在Kp=70,采用PI控制策略,則我們可以通過下面的程序繪制不同的Ti值下閉環(huán)系統(tǒng)的單位階躍響應(yīng)曲線。程序如下:G0=tf(1,100 4 80);Kp=1;Ti=0.3:0.05:0.7;hold onfor i=1:length(Ti);Gc
11、=tf(Kp*1,1/Ti(i),1,0);G=feedback(Gc*G0,1);step(G);grid on,axis(0,350,0,1.1);end得出圖如下:由圖可知,隨著Ti的減小,系統(tǒng)的調(diào)節(jié)時(shí)間變短,但是當(dāng)Ti太小時(shí),系統(tǒng)將變的不穩(wěn)定。PI控制能使系統(tǒng)由有差系統(tǒng)變?yōu)闊o差系統(tǒng),但是積分作用不能太強(qiáng)。在題所示系統(tǒng)中,Ti的選值不能小于0.3,。3、微分控制的影響令Kp=100,Ti=0.32,通過以下程序得出在不同的Td值下閉環(huán)系統(tǒng)的階躍響應(yīng)曲線,程序如下:G0=tf(1,100 4 80);Kp=100;Ti=0.32;Td=2:0.5:5;hold onfor i=1:leng
12、th(Td);Gc=tf(Kp*Ti*Td(i),Ti,1,Ti,0);G=feedback(Gc*G0,1);step(G);grid on,axis(0,100,0,1.5);end由上圖曲線可以看出,Td的取值越大,系統(tǒng)響應(yīng)速度越快,同時(shí)系統(tǒng)的超調(diào)量將小。六、人機(jī)交互界面設(shè)計(jì)人機(jī)交互界面采用matlab的GUI模塊設(shè)計(jì)。程序如下:function varargout = PID(varargin)% PID M-file for PID.fig% PID, by itself, creates a new PID or raises the existing% singleton*.%
13、H = PID returns the handle to a new PID or the handle to% the existing singleton*.% PID('CALLBACK',hObject,eventData,handles,.) calls the local% function named CALLBACK in PID.M with the given input arguments.% PID('Property','Value',.) creates a new PID or raises the% existi
14、ng singleton*. Starting from the left, property value pairs are% applied to the GUI before PID_OpeningFunction gets called. An% unrecognized property name or invalid value makes property application% stop. All inputs are passed to PID_OpeningFcn via varargin.% *See GUI Options on GUIDE's Tools m
15、enu. Choose "GUI allows only one% instance to run (singleton)".% See also: GUIDE, GUIDATA, GUIHANDLES% Copyright 2002-2003 The MathWorks, Inc.% Edit the above text to modify the response to help PID% Last Modified by GUIDE v2.5 07-Dec-2011 11:37:11% Begin initialization code - DO NOT EDITg
16、ui_Singleton = 1;gui_State = struct('gui_Name', mfilename, . 'gui_Singleton', gui_Singleton, . 'gui_OpeningFcn', PID_OpeningFcn, . 'gui_OutputFcn', PID_OutputFcn, . 'gui_LayoutFcn', , . 'gui_Callback', );if nargin && ischar(varargin1) gui_State
17、.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 PID is made visible.function PID_OpeningFcn(hObject, eventdata, handles, varargin)% This
18、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 PID (see VARARGIN)% Choose default command line output for PIDhandle
19、s.output = hObject;% Update handles structureguidata(hObject, handles);% UIWAIT makes PID wait for user response (see UIRESUME)% uiwait(handles.figure1);% - Outputs from this function are returned to the command line.function varargout = PID_OutputFcn(hObject, eventdata, handles) % varargout cell ar
20、ray 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;function edit1_Cal
21、lback(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 of edit1 as text% str2double(get(hObject,'St
22、ring') returns contents of edit1 as a doubleinput=str2num(get(hObject,'String');if(isempty(input) set(hObject,'String',' ')endguidata(hObject,handles);% - Executes during object creation, after setting all properties.function edit1_CreateFcn(hObject, eventdata, handles)%
23、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 Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor
24、','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');endfunction edit2_Callback(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with han
25、dles and user data (see GUIDATA)% Hints: get(hObject,'String') returns contents of edit2 as text% str2double(get(hObject,'String') returns contents of edit2 as a doubleinput=str2num(get(hObject,'String');if(isempty(input) set(hObject,'String',' ')endguidata(hO
26、bject,handles);% - Executes during object creation, after setting all properties.function edit2_CreateFcn(hObject, eventdata, handles)% hObject handle to edit2 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles empty - handles not created until after all CreateFcns
27、 called% Hint: edit controls usually have a white background on Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');endfunction edit3_Callback(hObject, eventdata, ha
28、ndles)% hObject handle to edit3 (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 of edit3 as text% str2double(get(hObject,'String') returns contents
29、of edit3 as a doubleinput=str2num(get(hObject,'String');if(isempty(input) set(hObject,'String',' ')endguidata(hObject,handles);% - Executes during object creation, after setting all properties.function edit3_CreateFcn(hObject, eventdata, handles)% hObject handle to edit3 (see
30、 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 Windows.% See ISPC and COMPUTER.if ispc set(hObject,'BackgroundColor','white');else
31、set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor');end% - Executes on button press in clear.function clear_Callback(hObject, eventdata, handles)% hObject handle to clear (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structur
32、e with handles and user data (see GUIDATA)% - 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 future version of MATLAB% handles structure with handles and user data (
33、see GUIDATA)% - Executes on button press in pushbutton3.function pushbutton3_Callback(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)% - Executes on button press in pushbutton4.function pushbutton4_Callback(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 dat
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 【Ks5u解析】江蘇省徐州、連云港、宿遷三市2021屆高三第三次模擬考試物理試題
- 2025年度新型城鎮(zhèn)化建設(shè)項(xiàng)目標(biāo)準(zhǔn)磚、燒結(jié)磚采購合同3篇
- 二零二五年度債權(quán)債務(wù)轉(zhuǎn)讓與債務(wù)重組代理合同3篇
- 2024年規(guī)范化沙石物料運(yùn)輸服務(wù)協(xié)議模板版B版
- 2024版智能零售系統(tǒng)購銷合同
- 二零二五年度醫(yī)療健康產(chǎn)業(yè)發(fā)展工期延期補(bǔ)充協(xié)議書3篇
- 古詩詞誦讀《錦瑟》說課稿 2024-2025學(xué)年統(tǒng)編版高中語文選擇性必修中冊(cè)
- 第三課《圖形化編程》說課稿 2023-2024學(xué)年新世紀(jì)版(2018)初中信息技術(shù)八年級(jí)上冊(cè)
- 大班清明節(jié)創(chuàng)意活動(dòng)策劃方案四篇
- 二零二五年度國防教育軍訓(xùn)教官選拔與任用協(xié)議3篇
- 用戶界面測(cè)試
- 人工氣道濕化的護(hù)理培訓(xùn)課件
- 電網(wǎng)適用的法律法規(guī)標(biāo)準(zhǔn)規(guī)范清單
- 讀書分享-給教師的一百條建議
- GB/T 4269.3-2000農(nóng)林拖拉機(jī)和機(jī)械、草坪和園藝動(dòng)力機(jī)械操作者操縱機(jī)構(gòu)和其他顯示裝置用符號(hào)第3部分:草坪和園藝動(dòng)力機(jī)械用符號(hào)
- GB/T 11618.1-2008銅管接頭第1部分:釬焊式管件
- 開工復(fù)工第一課
- 安徽省淮南市鳳臺(tái)縣基層診所醫(yī)療機(jī)構(gòu)衛(wèi)生院社區(qū)衛(wèi)生服務(wù)中心村衛(wèi)生室地址信息
- 旅游服務(wù)禮儀說課市公開課金獎(jiǎng)市賽課一等獎(jiǎng)?wù)n件
- 【線性代數(shù)自考練習(xí)題】滇西應(yīng)用技術(shù)大學(xué)專升本真題匯總(附答案解析)
- 英語北京版四年級(jí)(上冊(cè))單詞匯總
評(píng)論
0/150
提交評(píng)論