matlab模糊控制实现

上传人:101****457 文档编号:100180716 上传时间:2019-09-22 格式:DOC 页数:8 大小:166KB
返回 下载 相关 举报
matlab模糊控制实现_第1页
第1页 / 共8页
matlab模糊控制实现_第2页
第2页 / 共8页
matlab模糊控制实现_第3页
第3页 / 共8页
matlab模糊控制实现_第4页
第4页 / 共8页
matlab模糊控制实现_第5页
第5页 / 共8页
点击查看更多>>
资源描述

《matlab模糊控制实现》由会员分享,可在线阅读,更多相关《matlab模糊控制实现(8页珍藏版)》请在金锄头文库上搜索。

1、 模糊控制作业一介绍模糊控制是指基于模糊逻辑描述一个过程的控制算法,是以模糊集合论、模糊语言变量及模糊逻辑推理为基础的,基于被控系统的物理特性,模拟人的思维方式和人的控制经验来实现的一种计算机智能控制。模糊控制器主要嵌有操作人员的经验和直觉知识,是模糊语言形式的控制方法,不需要预先知道被控对象结构、参数,不需要建立被控对象的精确数学模型,并能克服非线性因素、大惯性因素的影响,对调节对象的参数变化不敏感,对对象时变及纯滞后有一定的适应性,即具有较强的鲁棒性。模糊控制器的设计参数容易选择调整。模糊控制系统如图1-1所示 图 1-1 模糊控制系统框图二 本作业介绍1、选定模糊控制器的输入输出变量,并

2、进行量程转换输入语言变量选为实际浓度与给定值之间的偏差(纸浆浓度偏差)e及纸浆浓度偏差变化率ec,输出语言变量选为阀门开度增量u。首先确定e、ec和u的基本论域分别为-1.2%1.2%、-0.6%0.6%和-1212,选定e、u的模糊集合的论域为-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,ec的模糊集合的论域为-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,72、确定模糊控制器的结构根据系统输入变量个数可知,应采用采用双输入单输出模糊控制器。(如图2所示)模糊控制器主要包含三个功能环节:用于输入信号处理的模糊量化和模糊化环节,模糊控制算法功能单元,以及

3、用于输出解模糊化的模糊判决环节。二维模糊控制器 e d/dt 图2 双输入单输出模糊控制器3、确定各变量的模糊语言取值及相应的隶属函数,即进行模糊化模糊化是将模糊控制器输入量的确定值转换为相应模糊语言变量值的过程,此相应语言变量均由对应的隶属度函数来定义。对纸浆浓度偏差e、纸浆浓度偏差变化率ec、阀门开度的增量u进行模糊化,分别用模糊语言变量X、Y、Z进行表示,语言值集合均为负大,负中,负小,零,正小,正中,正大,用英文缩写进行表示分别为:X=NBe,NMe,NSe,ZOe,PSe,PMe,PBeY= NBec,NMec,NSec,ZOec,PSec,PMec,PBec Z= NBu,NMu,

4、NSu,ZOu,PSu,PMu,PBu 模糊化包括两个任务:第一个任务是进行论域变换,过程参数的实际范围称为基本论域,可以通过变换系数(量化因子)实现由基本论域到量化论域的变换;第二个任务是求得输入对应于语言变量的隶属度。取三角形隶属函数,并取为均非均匀间隔。a.任务一:求量化因子e、ec和u的基本论域分别为-1.2%1.2%、-0.6%0.6%和-1212,量化论域分别为-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7 。纸浆浓度偏差e的量化

5、因子Ke=6/0.012=500,纸浆浓度偏差变化率ec的量化因子Kec=6/0.006=1000,通过量化因子即可实现由基本论域到量化论域的变换。b.任务二:取隶属度函数选用三角形隶属度函数,如图所示: 图2-1 纸浆浓度偏差e的隶属度函数图2-2纸浆浓度偏差变化率ec的隶属度函数图2-3 阀门开度增量u的隶属度函数 这样对于纸浆浓度偏差e、纸浆浓度偏差变化率e的不同输入值,可以根据对应的隶属度函数,把它模糊化成不同的语言值,这样就完成了模糊化。4、建立模糊控制规则或控制算法根据人的直觉思维推理,由系统输出的误差和误差变化趋势来消除系统的误差的模糊控制规则,对于不同的被控对象,误差E,误差变

6、化率EC及控制量U有不同的意义。在本设计中分别为纸浆浓度偏差e、纸浆浓度偏差变化率ec、阀门开度的增量u。 建立模糊控制规则是指规则的归纳和规则库的建立,是从实际控制经验过渡到模糊控制器的中心环节。控制律通常由一组if-then结构的模糊条件语句构成,或总结为模糊控制规则表。例如:If (input1 is NBe) and (input2 is NBec) then (output1 is PBu) (1) 即是模糊条件语句5、确定模糊推理和解模糊化方法输出的解模糊化就是将语言表达的模糊量恢复到精确的数值,也就是根据输出模糊子集的隶属度计算出确定数值。一、 设计过程及步骤1、模糊控制器的设计

7、a.对系统的输入和输出进行设定对输入和输出的个数,词集个数和名称,量化论域进行设定。Input2与output1的设定方法类似。设定完毕后保存到workspace.如下图所示。b.控制规则的设置双击上图中zfm出现控制规则编辑窗口,根据设计任务书上所给的控制规则与模糊控制表编写控制规则,并在matable命令窗口中导出控制规则,如下所示: a=readfis(zfm); showrule(a)ans =1. If (input1 is NBe) and (input2 is NBec) then (output1 is PBu) (1) 2. If (input1 is NMe) and (i

8、nput2 is NBec) then (output1 is PBu) (1) 3. If (input1 is NSe) and (input2 is NBec) then (output1 is PMu) (1) 4. If (input1 is ZOe) and (input2 is NBec) then (output1 is PMu) (1) 5. If (input1 is PSe) and (input2 is NBec) then (output1 is PSu) (1) 6. If (input1 is PMe) and (input2 is NBec) then (out

9、put1 is ZOu) (1) 7. If (input1 is PBe) and (input2 is NBec) then (output1 is ZOu) (1) 8. If (input1 is NBe) and (input2 is NMec) then (output1 is PBu) (1) 9. If (input1 is NMe) and (input2 is NMec) then (output1 is PBu) (1) 10. If (input1 is NSe) and (input2 is NMec) then (output1 is PMu) (1)11. If

10、(input1 is ZOe) and (input2 is NMec) then (output1 is PMu) (1)12. If (input1 is PSe) and (input2 is NMec) then (output1 is PSu) (1)13. If (input1 is PMe) and (input2 is NMec) then (output1 is ZOu) (1)14. If (input1 is PBe) and (input2 is NMec) then (output1 is ZOu) (1)15. If (input1 is NBe) and (inp

11、ut2 is NSec) then (output1 is PBu) (1)16. If (input1 is NMe) and (input2 is NSec) then (output1 is PBu) (1)17. If (input1 is NSe) and (input2 is NSec) then (output1 is PMu) (1)18. If (input1 is ZOe) and (input2 is NSec) then (output1 is PSu) (1)19. If (input1 is PSe) and (input2 is NSec) then (outpu

12、t1 is ZOu) (1)20. If (input1 is PMe) and (input2 is NSec) then (output1 is NMu) (1)21. If (input1 is PBe) and (input2 is NSec) then (output1 is NMu) (1)22. If (input1 is NBe) and (input2 is ZOec) then (output1 is PBu) (1)23. If (input1 is NMe) and (input2 is ZOec) then (output1 is PBu) (1)24. If (in

13、put1 is NSe) and (input2 is ZOec) then (output1 is PMu) (1)25. If (input1 is ZOe) and (input2 is ZOec) then (output1 is ZOu) (1)26. If (input1 is PSe) and (input2 is ZOec) then (output1 is NMu) (1)27. If (input1 is PMe) and (input2 is ZOec) then (output1 is NBu) (1)28. If (input1 is PBe) and (input2

14、 is ZOec) then (output1 is NBu) (1)29. If (input1 is NBe) and (input2 is PSec) then (output1 is PMu) (1)30. If (input1 is NMe) and (input2 is PSec) then (output1 is PMu) (1)31. If (input1 is NSe) and (input2 is PSec) then (output1 is ZOu) (1)32. If (input1 is ZOe) and (input2 is PSec) then (output1 is NSu) (1)33. If (input1 is PSe) and (input2 is PSec) then (output1 is NMu) (1)34. If (input1 is PMe) and (input2 is PSec) then (output1 is NBu) (

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号