资源描述:
《积分累加式模糊自整定PID温度控制算法仿真.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、%基本成功uk<0时等于0%fuzzytunningPIDcontrolclearall;clearall;a=newfis('fuzzpid');a=addvar(a,'input','e',[-0.15,0.15]);%parameterea=addmf(a,'input',1,'NB','zmf',[-0.15,-0.1]);a=addmf(a,'input',1,'NM','trimf',[-0.12,-0.1,0]);a=addmf(a,'input',1,'NS','trimf',[-0.06,-0.
2、04,0]);a=addmf(a,'input',1,'Z','trimf',[-0.03,0,0.03]);a=addmf(a,'input',1,'PS','trimf',[0,0.04,0.06]);a=addmf(a,'input',1,'PM','trimf',[0,0.1,0.12]);a=addmf(a,'input',1,'PB','smf',[0.1,0.15]);a=addvar(a,'input','ec',[-0.003,0.003]);%parametereca=addmf(a,'inp
3、ut',2,'NB','zmf',[-0.003,-0.002]);a=addmf(a,'input',2,'NM','trimf',[-0.0025,-0.002,-0.001]);a=addmf(a,'input',2,'NS','trimf',[-0.0015,-0.001,-0.0005]);a=addmf(a,'input',2,'Z','trimf',[-0.001,0,0.001]);a=addmf(a,'input',2,'PS','trimf',[0.0005,0.001,0.0015]);a=
4、addmf(a,'input',2,'PM','trimf',[0.001,0.002,0.0025]);a=addmf(a,'input',2,'PB','smf',[0.002,0.003]);a=addvar(a,'output','kp',[-0.33,0.33]);%parameterkpa=addmf(a,'output',1,'NB','zmf',[-0.33,-0.11]);a=addmf(a,'output',1,'NM','trimf',[-0.33,-0.22,0]);a=addmf(a,'
5、output',1,'NS','trimf',[-0.33,-0.11,0.11]);a=addmf(a,'output',1,'Z','trimf',[-0.22,0,0.22]);a=addmf(a,'output',1,'PS','trimf',[-0.11,0.11,0.33]);a=addmf(a,'output',1,'PM','trimf',[0,0.22,0.33]);a=addmf(a,'output',1,'PB','smf',[0.11,0.33]);a=addvar(a,'output',
6、'ki',[-0.,0.]);%parameterkia=addmf(a,'output',2,'NB','zmf',[-0.,-0.]);a=addmf(a,'output',2,'NM','trimf',[-0.,-0.,0]);a=addmf(a,'output',2,'NS','trimf',[-0.,-0.,0.]);a=addmf(a,'output',2,'Z','trimf',[-0.,0,0.]);a=addmf(a,'output',2,'PS','trimf',[-0.,0.,0.]);a=
7、addmf(a,'output',2,'PM','trimf',[0,0.,0.]);a=addmf(a,'output',2,'PB','smf',[0.,0.]);a=addvar(a,'output','kd',[-2.4,2.4]);%parameterkda=addmf(a,'output',3,'NB','zmf',[-2.4,-0.8]);a=addmf(a,'output',3,'NM','trimf',[-2.4,-1.6,0]);a=addmf(a,'output',3,'NS','trimf
8、',[-2.4,-0.8,0]);a=addmf(a,'output',3,'Z','trimf',[-1.6,0,1.6]);a=addmf(a,'output',3,'PS','trimf',[0,0.8,2.4]);a=addmf(a,'output',3,'PM','trimf',[0,1.6,2.4]);a=addmf(a,'output',3,'PB','sm