模糊PID控制器的設計與仿真——設計步驟_第1頁
模糊PID控制器的設計與仿真——設計步驟_第2頁
免費預覽已結(jié)束,剩余3頁可下載查看

下載本文檔

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

文檔簡介

1、模糊PID控制器的設計與仿真設計模糊 PID 控制器時,首先要將精確量轉(zhuǎn)換為模糊量,并且要把轉(zhuǎn)換后的 模糊量映射到模糊控制論域當中, 這個過程就是精確量模糊化的過程。 模糊化的 主要功能就是將輸入量精確值轉(zhuǎn)換成為一個模糊變量的值, 最終形成一個模糊集 合。本次設計系統(tǒng)的精確量包括以下變量:變化量 e ,變化量的變化速率 ec 還 有參數(shù)整定過程中的輸出量 Kp,AKD,AK,在設計模糊 PID 的過程中,需要 將這些精確量轉(zhuǎn)換成為模糊論域上的模糊值。 本系統(tǒng)的誤差與誤差變化率的模糊 論域與基本論域為: E=-6,-4,-2,0,2,4,6;Ec=-6,-4,-2,0,2,4,6 。模糊 PID

2、 控制器的設計選用二維模糊控制器。 以給定值的偏差 e 和偏差 變化ec 為輸入;AKP,AKD, AK 為輸出的自適應模糊PID 控制器,見圖 1。圖 1 模糊 PID 控制器(1 )模糊變量選取輸入變量 E 和 EC 的模糊化將一定范圍(基本論域)的輸入變量映射到離散區(qū) 間(論域) 需要先驗知識來確定輸入變量的范圍。 就本系統(tǒng)而言, 設置語言變量取 七個,分別為 NB, NM, NS, ZO, PS, PM, PB。(2) 語言變量及隸屬函數(shù)根據(jù)控制要求,對各個輸入,輸出變量作如下劃定:e, ec 論域:-6 , -5 , -4 , -3 , -2 , -1 , 0, 1, 2, 3, 4

3、, 5, 6A &,AKD,AK 論域:-6 , -5 , -4 , -3 , -2 , -1 , 0, 1 , 2 , 3 , 4 , 5 , 6 應用模糊合成推理 PID 參數(shù)的整定算法。第 k 個采樣時間的整定為KP(k) KP0KP(k) , KI(k)KI0KI(k) , KD(k) KD0KD(k).式中KPO,K|O,KDO為經(jīng)典 PID 控制器的初始參數(shù)。設置輸入變量隸屬度函數(shù)如圖 2 所示 輸出變量隸屬度函數(shù)如圖 3 所示。圖 2 輸入變量隸屬度函 圖 3 輸出變量隸屬度函3)編輯模糊規(guī)則庫根據(jù)以上各輸出參數(shù)的模糊規(guī)則表,可以歸納出 49 條控制邏輯規(guī)則,具體的控制規(guī)

4、則如下所示:1. If(e isNB) and (ec is NB) then (kp isNB)(kiis PB)(kd is NS)(1)2.If(e isNB) and (ec is NM) then (kp is NB)(kiis PB)(kd is PS)(1)3.If(e isNB) and (ec is NS) then (kp is NM)(kiis PM)(kd is PB)(1)4.If(e isNB) and (ec is ZO) then (kp is NM)(kiis PM)(kd is PB)(1)5.If(e isNB) and (ec is PS) then (

5、kp is NS)(kiis PS)(kd is PB)(1)6.If(e isNB) and (ec is PM) then (kp is ZO)(kiis ZO)(kd is PM)(1)7.If(e isNB) and (ec is PB) then (kp is ZO)(kiis ZO)(kd is NS)(1)8.If(e isNM) and (ec is NB) then (kp is NB)(kiis PB)(kd is NS)(1)9.If(e isNM) and (ec is NM) then (kp is NB)(kiis PB)(kd is PS)(1)10.If (e

6、is NM) and (ec is NS) then (kp is NM)(ki is PM)(kd isPB)(1)11.If (e is NM) and (ec is ZO) then (kp is NS)(ki is PS)(kd isPM)(1)12.If (e is NM) and (ec is PS) then (kp is NS)(ki is PS)(kd isPM)(1)13.If (e is NM) and (ec is PM) then (kp is ZO)(ki is ZO)(kd isPS)(1)14.If (e is NM) and (ec is PB) then (

7、kp is PS)(ki is ZO)(kd isZO)(1)15.If (e is NS) and (ec is NB) then (kp is NM)(ki is PB)(kd isZO)(1)16.If (e is NS) and (ec is NM) then (kp is NM)(ki is PM)(kd isPS)(1)17.If (e is NS) and (ec is NS) then (kp is NM)(ki is PS)(kd isPM)(1)18.If (e is NS) and (ec is ZO) then (kp is NS)(ki is PS)(kd isPM)

8、(1)19.If (e is NS) and (ec is PS) then (kp is ZO)(ki is ZO)(kd isPS)(1)20.If (e is NS) and (ec is PM) then (kp is PS)(ki is NS)(kd isPS)(1)21.If (e is NS) and (ec is PB) then (kp is PS)(ki is NS)(kd isZO)(1)22.If (e is ZO) and (ec is NB) then (kp is NM)(ki is PM)(kd isZO)(1)23.If (e is ZO) and (ec i

9、s NM) then (kp is NM)(ki is PM)(kd isPS)(1)24.If (e is ZO) and (ec is NS) then (kp is NS)(ki is PS)(kd isPS)(1)25.If (e is ZO) and (ec is ZO) then (kp is ZO)(ki is ZO)(kd isPS)(1)26.If (e is ZO) and (ec is PS) then (kp is PS)(ki is NS)(kd isPS)(1)27.If (e is ZO) and (ec is PM) then (kp is PM)(ki is

10、NM)(kd isPS)(1)28.If (e is ZO) and (ec is PB) then (kp is PM)(ki is NM)(kd isZO)(1)29.If (e is PS) and (ec is NB) then (kp is NS)(ki is PM)(kd isZO)(1)30.If (e is PS) and (ec is NM) then (kp is NS)(ki is PS)(kd isZO)(1)31.If (e is PS) and (ec is NS) then (kp is ZO)(ki is ZO)(kd isZO)(1)32.If (e is P

11、S) and (ec is ZO) then (kp is PS)(ki is NS)(kd isZO)(1)33.If (e is PS) and (ec is PS) then (kp is PS)(ki is NS)(kd isZO)(1)34.If (e is PS) and (ec is PM) then (kp is PM)(ki is NM)(kd isZO)(1)35.If (e is PS) and (ec is PB) then (kp is PM)(ki is NB)(kd isZO)(1)36.If (e is PM) and (ec is NB) then (kp i

12、s NS)(ki is ZO)(kd isNB)(1)37.If (e is PM) and (ec is NM) then (kp is ZO)(ki is ZO)(kd isPS)(1)38.If (e is PM) and (ec is NS) then (kp is PS)(ki is NS)(kd is NS)(1)39.If (e is PM) and (ec is ZO) then (kp is PM)(ki is NS)(kd isNS)(1)40.If (e is PM) and (ec is PS) then (kp is PM)(ki is NM)(kd isNS)(1)

13、41.If (e is PM) and (ec is PM) then (kp is PM)(ki is NB)(kd isNS)(1)42.If (e is PM) and (ec is PB) then (kp is PB)(ki is NB)(kd isNB)(1)43.If (e is PB) and (ec is NB) then (kp is ZO)(ki is ZO)(kd isNB)(1)44.If (e is PB) and (ec is NM) then (kp is ZO)(ki is ZO)(kd isNM)(1)45.If (e is PB) and (ec is N

14、S) then (kp is PM)(ki is NS)(kd isNM)(1)46.If (e is PB) and (ec is ZO) then (kp is PM)(ki is NM)(kd isNM)(1)47.If (e is PB) and (ec is PS) then (kp is PM)(ki is NM)(kd isNS)(1)48.If (e is PB) and (ec is PM) then (kp is PB)(ki is NB)(kd isNS)(1)49.If (e is PB) and (ec is PB) then (kp is PB)(ki is NB)

15、(kd isNB)(1)把這 49 條控制邏輯規(guī)則,鍵入到模糊規(guī)則庫中,如圖4。圖 4 模糊規(guī)則庫(5)模糊 PID 控制器仿真利用 MATLAB件中的 Simulink 仿真環(huán)境,可以對模糊 PID 控制器系統(tǒng)進行 模擬仿真實驗, 來檢驗設計是否達到要求。 針對本次控制器設計, 我們設置被控對象為,根據(jù)被控對象,設置相應的 PID 參數(shù)(s 1)( s 2)( s 3)( s 4)為:KP=6;K|=3;KD=2。圖 5 為控制器系統(tǒng)在 Simulink 中的仿真模型。為了方便與傳統(tǒng) PID 控制器進行比較, 在 Simulink 仿真環(huán)境中作出傳統(tǒng) PID 控制以便于對模糊 PID 進行比

16、較。在傳統(tǒng) PID 控制器中設置相應的 PID 參數(shù)為:KP=6;KI=3;心=2。圖 6 是傳統(tǒng) PID 與模糊 PID 控制器在 Simulink 中的階躍仿 真波形比較。圖 5 傳統(tǒng) PID 與模糊 PID 控制器在 Simulink 中的仿真模型圖 6 傳統(tǒng) PID 與模糊 PID 控制器在 Simulink 中的階躍仿真波形比較圖 6 中,黃色線為輸入的階躍信號,紫色為輸出的傳統(tǒng) PID 控制信號,青色 為輸出的模糊 PID 控制信號,通過圖 1-7 中傳統(tǒng) PID 控制方式與模糊 PID 控制控 制曲線的對比結(jié)果可以看出,模糊控制的控制性能要明顯好于傳統(tǒng)的 PID 控制效 果。我們把輸入信號變?yōu)檎倚盘栐僖淮芜M行傳統(tǒng) PID 與模糊 PI

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 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

提交評論