資源描述:
《模糊PID參數(shù)自整定.doc》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、模糊PID參數(shù)自整定設(shè)被控對(duì)象為采樣時(shí)間為1ms,采樣模糊PID控制進(jìn)行階躍響應(yīng),在第300個(gè)采樣時(shí)間時(shí)控制加1.0的干擾,相應(yīng)的響應(yīng)結(jié)果如下圖:Ki的錄屬度函數(shù)Kp的錄屬度函數(shù)e的錄屬度函數(shù)ec的錄屬度函數(shù)下面是系統(tǒng)在外界有干擾輸入時(shí)普通PID和模糊PID參數(shù)自整定控制的階躍響應(yīng)曲線:模糊PID控制階躍響應(yīng)普通PID控制階躍響應(yīng).從上面的仿真圖可以看出,經(jīng)過(guò)模糊PID參數(shù)自整定后,在外界干擾輸入時(shí),可以得到很好的控制效果。下面是PID參數(shù)的整定曲線:.Kp的自整定調(diào)整Ki的自整定調(diào)整Kd的自整定調(diào)整程序文本:%FuzzyTunningPIDControlclearall;closeal
2、l;a=newfis('fuzzpid');a=addvar(a,'input','e',[-3,3]);%Parameterea=addmf(a,'input',1,'NB','zmf',[-3,-1]);a=addmf(a,'input',1,'NM','trimf',[-3,-2,0]);a=addmf(a,'input',1,'NS','trimf',[-3,-1,1]);a=addmf(a,'input',1,'Z','trimf',[-2,0,2]);a=addmf(a,'input',1,'PS','trimf',[-1,1,3]);a=addmf(a,'input',1,
3、'PM','trimf',[0,2,3]);a=addmf(a,'input',1,'PB','smf',[1,3]);a=addvar(a,'input','ec',[-3,3]);%Parametereca=addmf(a,'input',2,'NB','zmf',[-3,-1]);a=addmf(a,'input',2,'NM','trimf',[-3,-2,0]);a=addmf(a,'input',2,'NS','trimf',[-3,-1,1]);a=addmf(a,'input',2,'Z','trimf',[-2,0,2]);a=addmf(a,'input',2,'PS
4、','trimf',[-1,1,3]);a=addmf(a,'input',2,'PM','trimf',[0,2,3]);a=addmf(a,'input',2,'PB','smf',[1,3]);a=addvar(a,'output','kp',[-0.3,0.3]);%Parameterkpa=addmf(a,'output',1,'NB','zmf',[-0.3,-0.1]);a=addmf(a,'output',1,'NM','trimf',[-0.3,-0.2,0]);a=addmf(a,'output',1,'NS','trimf',[-0.3,-0.1,0.1]);a=a
5、ddmf(a,'output',1,'Z','trimf',[-0.2,0,0.2]);a=addmf(a,'output',1,'PS','trimf',[-0.1,0.1,0.3]);a=addmf(a,'output',1,'PM','trimf',[0,0.2,0.3]);a=addmf(a,'output',1,'PB','smf',[0.1,0.3]);a=addvar(a,'output','ki',[-0.06,0.06]);%Parameterkia=addmf(a,'output',2,'NB','zmf',[-0.06,-0.02]);a=addmf(a,'outp
6、ut',2,'NM','trimf',[-0.06,-0.04,0]);a=addmf(a,'output',2,'NS','trimf',[-0.06,-0.02,0.02]);a=addmf(a,'output',2,'Z','trimf',[-0.04,0,0.04]);a=addmf(a,'output',2,'PS','trimf',[-0.02,0.02,0.06]);a=addmf(a,'output',2,'PM','trimf',[0,0.04,0.06]);a=addmf(a,'output',2,'PB','smf',[0.02,0.06]);a=addvar(a,
7、'output','kd',[-3,3]);%Parameterkpa=addmf(a,'output',3,'NB','zmf',[-3,-1]);a=addmf(a,'output',3,'NM','trimf',[-3,-2,0]);a=addmf(a,'output',3,'NS','trimf',[-3,-1,1]);a=addmf(a,'output',3,'Z','trimf',[-2,0,2]);a=addmf(a,