模糊控制系统仿真

上传人:cl****1 文档编号:552717929 上传时间:2023-03-16 格式:DOCX 页数:17 大小:871.47KB
返回 下载 相关 举报
模糊控制系统仿真_第1页
第1页 / 共17页
模糊控制系统仿真_第2页
第2页 / 共17页
模糊控制系统仿真_第3页
第3页 / 共17页
模糊控制系统仿真_第4页
第4页 / 共17页
模糊控制系统仿真_第5页
第5页 / 共17页
点击查看更多>>
资源描述

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

1、智能海制农跆施酱後糊加制务俊作直一. 实验内容运用matlab制作一个两个输入一个输出的模糊控制器。分别控制一阶二 阶三阶系统查看其输出。二. 实验分析1模糊逻辑控制器的基本结构模糊值去模糊化.去模糊化粘确值粘确值2根据系统实际情况,选择e, de和u的论域e range : -6 6ec range: -6 6u range: -2 23. e, de和u语言变量的选取e 7 个:NB,NM,NS,ZERO,PS,PM,PB ec 7 个:NB,NM,NS,ZERO,PS,PM,PB U 7 个:NB,NM,NS,ZERO,PS,PM,PB4. 模糊规则确定NBNMNSZEROPSPMPBN

2、BNBNBNBNBNMNSZERONMNBNBNMNMNSZEROPSNSNBNMNMNSZEROPSPMZERONBNMNSZEROPSPMPBPSNMNSZEROPSPMPMPBPMNSZEROPSPMPMPBPBPBZEROPSPMPBPBPBPB规则解释:(1)以e=NB,并且ec=NB,输出DU=NB为例。偏差e为负大(NB),偏差 变化率ec也为负大(NB),说明反馈超调量很大,而且反馈超调增大 的变化趋势也很大,因此应该是最大幅度的减小控制量,即控制量为 负大(NB)o(2) 以e=PB并且ec=PB,则u=PB,为例。偏差e为正大(PB),偏差变化率 ec也为正大(PB),说明

3、被控量远远没有达到稳态值,同时原理稳态值 的趋势很大,因此应该以最快的速度增加被控量,即输出u=PB。(3) 以e=NS并且ec=PS,则u=ZERO为例。偏差为负小(NS)时,偏差的变 化率为正小(PS),说明被控量反馈值略小,即,略有超调,并且以较 小的速度减小,因此可保持控制量不变,即控制增量为零(ZERO)o5. 隐含和推理方法的制定隐含采用 /mamdani,方法:max-min推理方法,即min方法去模糊方法:重心法。选择隶属函数的形式:三角型三. 实验步骤1.建立 fuzzy (fis)文件。(1)在主窗口输入fuzzy,显示如下图所示(2)选择EMt* Add Variable

4、 Input,增加一个输入,使之成为两输 入一输出。并将输入输出的名字分别改为e, ec, uo 双击输入e,修改e的范围(range)改为(6 6),并且将其中的mfs 全部删除,并且点击Edit, ADDMFS添加七个mfs,并依次将名字改为 NB,NM.PM,PBo 同理编辑 ec 和 uBJ Membership FunctionsAdd membership functions術 typetrimfNumber of MFs7OKCancelQ Membership Function Editor; kongzhi4(4) 建立规则,双击规则的图框,根据上图所示的规则表,建立规则。B

5、J Ru:e Editor: kongzhi4 會寥File Edit View Options1.lf(e is NB) and (ec is NB) then (u is NB) (1)2. If (e is NB) and (ec is NM) then (u is NB) (1)3. If (e is NB) and (ec is NS) then (u is NB) (1)4. If (e is NB) and (ec is ZERO) then (u is NB) (1)5. If (e is NB) and (ec is PS) then (u is NM) (1)6. If (

6、e is NB) and (ec is PM) then (u is NS) (1)7. If (e is NB) and (ec is PBi then (u is ZERO) (1)8. If (e is NM) and (ec is NB) the n(u is NB) (1)9. If (e is NM) and (ec is NM) then (u is NB) (1)10.lf (e is NM) aid (ec is NS) then (u is NM) (1) 11. If (e is NM) aid (ec is ZERO) then (u is NM) (1)|12. If

7、 (e is NM) and (ec is PS) then (u is NS) (1)13. If (e is NM) nnd (ec is PM) then (u is ZERO) (1) 14.lf(e is NM) and (ec is PB)then (u is PS) (1)15. If (e is NS and (ec is NB) then (u is NB) (1)16. If (e is NS) and (ec is NM) then (u is NM) (1) 17,lf(e is NS) and (ec is NS) then (u is NM) (1)18.lf(e

8、is NS) and (ec is ZERO) then (u is NS) (1)19. If (e is NS) and (ec is PS) then (u is ZERO) (1)20. If(e is NS) and (ec is PM)then (u is PS) (1) 21 .lf(e is NS) and (ec is PB) then (u is PM) (1)22. If (e is ZERO) and (ec is NB) then (u is NB) (1)|23. If (e is ZERO) and (ec is NM) then (u is NM) (1)24.

9、 If (e is ZERO) and (ec is NS) then (u is NS) (1)25. If (e is ZERO) and (ec is ZERO) then (u is ZERO) (1)26. If (e is ZERO) and (ec is PS) then (u is PS)27. If (e is ZERO) and (ec is PM) then (u is PM) (1)26. If (e is ZERO) and (ec is PB) then (u is PB)29. If (e is PS) and (ec is NB)then (u is NM) (

10、1)30. If (e is PS) and (ec is NM) then (u is NS) (1) 31 .If (e is PS) and (ec is NS) then (u is ZERO) (1)32. If (e is PS) and (ec is ZERO) then (u is PS) (1)33. If (e is PS) and (ec is PS) then (u is PM) (1)34. If (e is PS) and (ec is PM) then (u is PM) (1)35. If (e is PS) and (ec is PB) then (u is

11、PB) (1)36. If (e is PM) and (ec is MB) then (u is NS) (1)37. If (e is PM) and (ec is NS) then (u is PS) (1)38. If (e is PM) and (ec is ZERO) then (u is PM) (1)39. If (e is PM) and (ec is PS) then (u is PM) (1)40. If (e is PM) and (ec is PM) then (u is PB) (1)41 .If (e is PM) and (ec is PB)then (u is

12、 PB) (1)42. If (e is PB) and (ec is NB)then (u is ZERO) (1)43. If (e is PB) and (ec is NM) then (u is PS) (1)44. If (e is PB) and (ec is NS) then (u is PM) (1)45. If (e is PB) and (ec is ZERO) then (u is PB) (1)46. If (e is PB) and (ec is PS) then (u is PB) (1)47. If (e is PB) and (ec is PM) then (u

13、 is PB) (1)48. If (m is PB) and (ec is PB) then (u is PB) (1) 49.lf(e is PM) and (ec is NM) then (u is ZERO) (1)IfandeecnotnotThennot(5) 查看规则及控制器的输出7QRule Viewer: korgzhi4File Edit View Optionse = 0ec = 0u = -3.23e-O054234567691011121314佔1617151920212225242526272329“30313233343S363738394041424344454

14、64748492 2input 1 0 oPlot points: ioiMove- left I right down h up jlopened system KongzhW. 49 rulesHelpCloseBl Surface Viewer kongzhidFile Edit Vievr Options(6)保存文件并输出到工作空间Edit ViewFile2.建立一阶二阶三阶系统,进行仿真。注意在模糊控制模块,要将刚建立的i s文件添加到模糊控制器中。(1) 一阶系统传递函数为:G(s) =厶其系统建模为:(2) 二阶系统Gainl传递函数为:G(S)= 其系统建模为:Gainl(3) 三节系统传递函数为G ( s )=(S + 1) s +s+ 1 ) 其系统建模为:四. 实验结果及分析1一阶系统图一:系统经过模糊控制器后的输出:图二:系统未经过模糊控制后的输出:图三:模糊控制器的输入:图四:模糊控制器的输出:实验结果分析:由上图可知加入模糊控制后是的一阶系统的调节时间变长了。由于模糊规则 划分的

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 学术论文 > 其它学术论文

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