MATLAB在時域分析中的應用_第1頁
MATLAB在時域分析中的應用_第2頁
MATLAB在時域分析中的應用_第3頁
MATLAB在時域分析中的應用_第4頁
MATLAB在時域分析中的應用_第5頁
已閱讀5頁,還剩69頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

控制系統(tǒng)計算機仿真Lirui@時域分析法續(xù)基于Simulink的PID控制器設計改善系統(tǒng)時域響應性能的措施二階系統(tǒng)參數(shù)對時域響應性能的影響時域響應性能指標求取LTIViewer應用TheComputerSimulationofControlSystemUESTC(2)單位階躍響應的求法:控制系統(tǒng)工具箱中給出了一個函數(shù)step()來直接求取線性系統(tǒng)的階躍響應,如果已知傳遞函數(shù)為:則該函數(shù)可有以下幾種調用格式:step(num,den)

(a)step(num,den,t)

(b)或

step(G)

(c)step(G,t)

(d)TheComputerSimulationofControlSystemUESTC該函數(shù)將繪制出系統(tǒng)在單位階躍輸入條件下的動態(tài)響應圖,同時給出穩(wěn)態(tài)值。對于式(b)和(d),t為圖像顯示的時間長度,是用戶指定的時間向量。式(a)和(c)的顯示時間由系統(tǒng)根據(jù)輸出曲線的形狀自行設定。如果需要將輸出結果返回到MATLAB工作空間中,則采用以下調用格式:

c=step(G)此時,屏上不會顯示響應曲線,必須利用plot()命令去查看響應曲線。plot可以根據(jù)兩個或多個給定的向量繪制二維圖形

TheComputerSimulationofControlSystemUESTC

已知傳遞函數(shù)為:G(s)=25/(s^2+4s+25)

利用以下MATLAB命令可得階躍響應曲線如圖3-2所示

num=[0025];

den=[1425];step(num,den)TheComputerSimulationofControlSystemUESTC典型環(huán)節(jié)及其傳遞函數(shù)一、典型環(huán)節(jié)及其傳遞函數(shù)典型環(huán)節(jié)通常分為以下六種:1比例環(huán)節(jié)式中K-增益特點:輸入輸出量成比例,無失真和時間延遲。任何一個復雜系統(tǒng)都是由有限個典型環(huán)節(jié)組合而成的。動態(tài)方程傳遞函數(shù)TheComputerSimulationofControlSystemUESTC典型環(huán)節(jié)及其傳遞函數(shù)2慣性環(huán)節(jié)3純微分環(huán)節(jié)動態(tài)方程傳遞函數(shù)動態(tài)方程傳遞函數(shù)TheComputerSimulationofControlSystemUESTC典型環(huán)節(jié)及其傳遞函數(shù)4一階微分環(huán)節(jié)5二階微分環(huán)節(jié)動態(tài)方程傳遞函數(shù)動態(tài)方程傳遞函數(shù)TheComputerSimulationofControlSystemUESTC典型環(huán)節(jié)及其傳遞函數(shù)6積分環(huán)節(jié)7振蕩環(huán)節(jié)式中ξ-阻尼比-自然振蕩角頻率(無阻尼振蕩角頻率)動態(tài)方程傳遞函數(shù)動態(tài)方程傳遞函數(shù)TheComputerSimulationofControlSystemUESTC典型環(huán)節(jié)及其傳遞函數(shù)8純時間延時環(huán)節(jié)式中-延遲時間動態(tài)方程傳遞函數(shù)TheComputerSimulationofControlSystemUESTC典型試驗信號二、典型試驗信號Typicaltestsignals(單位)階躍函數(shù)(Stepfunction)

(單位)斜坡函數(shù)(Rampfunction)(單位)加速度函數(shù)(Accelerationfun)(單位)脈沖函數(shù)(Impulsefunction)

正弦函數(shù)(Simusoidalfunction)TheComputerSimulationofControlSystemUESTC時域響應性能指標三、動態(tài)性能指標上升時間響應曲線從穩(wěn)態(tài)值的10%上升到90%,所需的時間。上升時間越短,響應速度越快峰值時間:響應曲線達到峰值所需要的時間。TheComputerSimulationofControlSystemUESTC時域響應性能指標動態(tài)性能指標調節(jié)時間(SettlingTime)響應曲線達到并永遠保持在一個允許誤差范圍內,所需的最短時間。用穩(wěn)態(tài)值的百分數(shù)(通常取5%或2%)表示。

超調量%

:指響應的最大偏離量h(tp)于終值之差的百分比,即

即:ttrTheComputerSimulationofControlSystemUESTC時域響應性能指標求取四、時域響應性能指標求取1.峰值時間(timetopeak)峰值時間可由下述命令獲得:[Y,k]=max(y)%求出y的峰值及相應的時間timetopeak=t(k)%獲得峰值時間TheComputerSimulationofControlSystemUESTC時域響應性能指標求取2.超調量(Percentovershoot)超調量可由以下命令獲得:C=dcgain(G)%求取系統(tǒng)的終值[Y,k]=max(y)%求出y的峰值及相應的時間percentovershoot=100*(Y-C)/C%計算超調量TheComputerSimulationofControlSystemUESTC時域響應性能指標求取C=dcgain(G);%求取系統(tǒng)的終值n=1;whiley(n)<0.1*C%通過循環(huán),求取輸出第一n=n+1;次到達終值的10%的時間endm=1;whiley(n)<0.9*C%通過循環(huán),求取輸出第一

m=m+1;

次到達終值的90%的時間endrisetime=t(m)-t(n)3.上升時間TheComputerSimulationofControlSystemUESTC時域響應性能指標求取4.調節(jié)時間(settingtime)C=dcgain(G);i=length(t);while(y(i)>0.98*C)&(y(i)<1.02*C)i=i-1;endSettingtime=t(i)TheComputerSimulationofControlSystemUESTC時域響應性能指標求取例1已知二階系統(tǒng)傳遞函數(shù)為編程求取系統(tǒng)的性能指標。TheComputerSimulationofControlSystemUESTC時域響應性能指標求取

G=zpk([],[-1+3*i,-1-3*i],3);%計算最大峰值時間和它對應的超調量。

C=dcgain(G)[y,t]=step(G);plot(t,y)grid[Y,k]=max(y);timetopeak=t(k)percentovershoot=100*(Y-C)/CTheComputerSimulationofControlSystemUESTC二階系統(tǒng)的時域分析%計算上升時間。n=1;whiley(n)<Cn=n+1;endrisetime=t(n)TheComputerSimulationofControlSystemUESTC二階系統(tǒng)的時域分析%計算穩(wěn)態(tài)響應時間。

i=length(t);while(y(i)>0.98*C)&(y(i)<1.02*C)i=i-1;endSettingtime=t(i)TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響C=0.300timeopeak=1.0491percentovershoot=

35.0914risetime=0.6626settingtime=3.5337運行程序后,結果為:TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響五、二階系統(tǒng)參數(shù)對時域響應性能的影響二階系統(tǒng)結構圖:TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響二階系統(tǒng)的標準形式:式中,n為無阻尼自由振蕩角頻率,簡稱固有頻率;為阻尼系數(shù);T=1/n為系統(tǒng)振蕩周期。TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響系統(tǒng)的特征方程為:系統(tǒng)的特征根為:TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響,為兩個相等的根s1,2=-n(2)臨界阻尼,兩個不相等的根(3)過阻尼極點為一對純虛根,s1,2=±jn瞬態(tài)響應變?yōu)榈确袷?(1)無阻尼TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響閉環(huán)極點為共扼復根,位于右半S平面,(4)欠阻尼系統(tǒng)其階躍響應為一種衰減振蕩曲線。上升時間tr

峰值時間tpTheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響超調量

調整時間ts:與n成反比,其中,為允許誤差。TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響5.1閉環(huán)參數(shù)n和的影響

tr,tp和ts均與n成反比,因此,n越大則響應越快。唯一決定了p%的大小,越大,p%越小例2已知單位負反饋系統(tǒng),其開環(huán)傳遞函數(shù)為其中n=1,試繪制分別為0,0.2,0.4,0.6,0.9,1.2,1.5時其單位負反饋系統(tǒng)的單位階躍響應曲線TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響wn=1sigma=[0,0.2,0.4,0.6,0.9,1.2,1.5]figure(1);holdonnum=wn*wnt=linspace(0,20,200)'%將t在0到20之間均等分成200份fori=sigmaden=conv([1,0],[1,2*wn*i]);s1=tf(num,den)sys=feedback(s1,1)

TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響step(sys,t)gridendtitle('典型二階系統(tǒng)取不同阻尼比時的單位階躍響應')holdongtext('sigma=0');gtext('sigma=0.2');gtext('sigma=0.4');gtext('sigma=.6');gtext('sigma=0.9');gtext('sigma=1.2');gtext('sigma=1.5');TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響從圖中可知:在為0.4~0.9的范圍內,系統(tǒng)上升較快,超調又不太大,故工程上一般選這個范圍,其中,尤以時響應較快,此時超調僅為4.3%,通常稱最佳阻尼。TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響5.2開環(huán)參數(shù)K和T的影響二階系統(tǒng)可通過適當?shù)淖儞Q寫成如下形式對比標準二階系統(tǒng),可設即TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響可見:T越小,則n越大,也越大,系統(tǒng)的快速性和相對穩(wěn)定性同時好轉;K越大,則n越大,而越小,表明K對快速性和相對穩(wěn)定性的影響是矛盾的。TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響例3已知單位負反饋的二階系統(tǒng),其開環(huán)傳函為其中T=1,試繪制k分別為0.1,0.2,0.5,0.8,1.0,2.4時,其單位負反饋系統(tǒng)的單位階躍響應曲線。TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響T=1k=[0.1,0.2,0.5,0.8,1.0,2.4]t=linspace(0,20,200)'num=1;den=conv([1,0],[T,1])forj=1:6s1=tf(num*k(j),den)sys=feedback(s1,1)

y(:,j)=step(sys,t);endTheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響plot(t,y(:,1:6));gridtitle(‘典型二階系統(tǒng)取不同開環(huán)增益時的單位階躍響應')gtext('k=0.1');gtext('k=0.2');gtext('k=0.5');gtext('k=0.8');gtext('k=1.0');gtext('k=2.4');TheComputerSimulationofControlSystemUESTC二階系統(tǒng)參數(shù)對時域響應性能的影響TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施六、改善系統(tǒng)時域響應性能的一些措施6.1輸出微分反饋TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施根據(jù)K,T與n,的關系,將原開環(huán)傳遞函數(shù)改寫為:其中,n和是=0時原系統(tǒng)的固有頻率和阻尼系數(shù)。當不等于0時,由其閉環(huán)傳遞函數(shù)可推出:TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施可見,加微分反饋后,系統(tǒng)的固有頻率n不變,而阻尼比提高了。結論:輸出微分反饋可在不改變快速性的條件下提高相對穩(wěn)定性,因此在實際中可通過提高K來進一步提高快速性,而用來保證必要的相對穩(wěn)定性。TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施例4已知單位負反饋的二階系統(tǒng),其中T=1,K=1,試繪制分別為0,0.05,0.2,0.5,1.0,2.4時,其單位負反饋系統(tǒng)的單位階躍響應曲線。T=1k=1tou=[0,0.05,0.2,0.5,1.0,2.4]t=linspace(0,20,200)'num=1TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施forj=1:6den=conv([1,0],[T,1+tou(j)])s1=tf(num*k,den)sys=feedback(s1,1)

y(:,j)=step(sys,t);endplot(t,y(:,1:6));gridtitle('典型二階系統(tǒng)采用輸出微分反饋時的單位階躍響應')gtext('tou=0');gtext('tou=0.05');gtext('tou=0.2');gtext('tou=0.5');gtext('tou=1.0');gtext('tou=2.4');TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施6.2比例微分控制其閉環(huán)傳遞函數(shù)為TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施可知:比例微分控制同樣能實現(xiàn)在不改變n的條件下提高系統(tǒng)阻尼比作用類似輸出微分反饋控制。但與輸出微分反饋控制不同的是,在閉環(huán)傳遞函數(shù)中增加了一個零點,分析表明,它的存在將使系統(tǒng)的上升加快,但p%會有所增加,其趨勢隨的加大而加大TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施例5設系統(tǒng)閉環(huán)傳遞函數(shù)為試求取時的單位階躍響應。解Matlab程序代碼如下:TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施tou=[0,0.2,0.4]t=linspace(0,8,80)'num=4;den=[1,2,4]forj=1:3sys=tf(conv(num,[tou(j),1]),den)

y(:,j)=step(sys,t);endplot(t,y(:,1:3));gridtitle('比例微分控制,不同微分時間下的系統(tǒng)階躍響應')gtext('tou=0');gtext('tou=0.2');gtext('tou=0.4');TheComputerSimulationofControlSystemUESTC改善系統(tǒng)時域響應性能的措施TheComputerSimulationofControlSystemUESTCLTIViewer應用七、LTIViewer應用(Linear-Time-InvariantViewer)LTIViewer的使用非常簡單,只需要以下兩步簡單的操作:(1)在Matlab工作空間中建好控制系統(tǒng)的數(shù)學模型;(2)在命令窗口中輸入“LTIViewer”,調出LTIViewer窗口,便可對控制系統(tǒng)進行許多功能的分析。下面以控制系統(tǒng)的模型為例進行介紹。TheComputerSimulationofControlSystemUESTCLTIViewer應用【步驟1】建立數(shù)學模型?!静襟E2】進入LTIViewer窗口。TheComputerSimulationofControlSystemUESTCLTIViewer應用【步驟3】在LTIViewer中導入控制系統(tǒng)的模型。TheComputerSimulationofControlSystemUESTCLTIViewer應用TheComputerSimulationofControlSystemUESTCLTIViewer應用【步驟4】操作功能豐富的現(xiàn)場菜單。TheComputerSimulationofControlSystemUESTCLTIViewer應用菜單的主要功能如下:PlotTypes:選擇圖形類型。Characteristics:可對不同類型的響應曲線標出相關特征值。Properties:對圖形窗口進行編譯,對顯示性能參數(shù)進行設置。下圖為選擇沖擊響應的圖形。TheComputerSimulationofControlSystemUESTCLTIViewer應用TheComputerSimulationofControlSystemUESTCLTIViewer應用【步驟5】配置圖形窗口,實現(xiàn)多圖形窗口顯示。選擇EditPlotConfigurations后,彈出圖形配置對話框。TheComputerSimulationofControlSystemUESTCLTIViewer應用TheComputerSimulationofControlSystemUESTC基于Simulink的PID控制器設計控制器kpTiPT/(KL)0PI0.9T/(KL)L/0.30PID1.2T/(KL)2.2L0.5L八、Ziegler-Nichols整定法PID控制器:被控系統(tǒng)TheComputerSimulationofControlSystemUESTC基于Simulink的PID控制器設計八、Ziegler-Nichols整定法例6已知如圖所示的控制系統(tǒng)。試采用Ziegler-Nichols整定公式計算系統(tǒng)P,PI,PID控制器的參數(shù),并繪制整定后系統(tǒng)的單位階躍響應曲線TheComputerSimulationofControlSystemUESTC基于Simulink的PID控制器設計解:(1)獲取開環(huán)系統(tǒng)的單位階躍響應。TheComputerSimulationofControlSystemUESTC基于Simulink的PID控制器設計可得:L=2.2,T=9.2-2.2K=13.727TheComputerSimulationofControlSystemUESTC基于Simulink的PID控制器設計(2)P控制器:Kp=0.2318TheComputerSimulationofControlSystemUESTC基于Simulink的PID控制器設計TheComputerSimulationofControlSystemU

溫馨提示

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

最新文檔

評論

0/150

提交評論