下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、水箱水位模糊控制系统设计一 在MATLAB命令窗口中输入sltank,便可打开如图所示的模型窗口。图1sltank仿真图(1) 打开MATLAB,输入指令fuzzy,打开模糊逻辑工具箱的图形用户界面窗口,新建一个Mamdani模糊推理系统。(2) 增加一个输入变量,将输入变量命名为水位误差、误差变化,将输出变量命名为阀门开关速度。这样就建立了一个两输入单输出的模糊推理系统,保存为shuiwei1。图2增加一个输入变量(3) 设计模糊化模块;设水位误差level的论域为2.95 3.05,误差变化率rate的论域为-0.2 0.2;两个输入量的模糊集为level设为为7个,rate设为5个:其中
2、水位误差level定为NB、NM、NS、ZE、PS、PM、PB;参数分别为0.01 2.95、0.01 2.97,0.01 2.99、0.01 3、0.01 3.01、0.01 3.03、0.01 3.05,隶属度均为高斯函数;图3输入量level的参数设定误差变化率rate分别为负大,负小,不变,正小,正大。参数分别为,0.03 -0.2、0.03 -0.1、0.03 0、0.03 0.1、0.03 -0.2,隶属度函数均为高斯函数。图4误差变化率rate的参数设定阀门的开关速度设为七个等级:快关,中关,慢关,不动,慢开,中开,快开,其论域为2.95 3.05。参数分别为;2.94 2.95
3、 2.96、2.965 2.97 2.975、2.99 2.99 2.995、2.999 3 3.001、3.005 3.01 3.015、3.02 3.03 3.035、3.04 3.05 3.06,隶属函数为三角形函数。图5输出量valve的参数设定(4) 设计模糊规则打开Ruel Editor窗口,通过选择添加模糊规则;1) If (level is NB) and (rate is 负大) then (valve is 快关) (1)2) If (level is NB) and (rate is 负小) then (valve is 快关) (1) 3) If (level is N
4、B) and (rate is 不变) then (valve is 快关) (1) 4) If (level is NB) and (rate is 正小) then (valve is 中关) (1)5) If (level is NB) and (rate is 正大) then (valve is 不动) (1) 6) If (level is NM) and (rate is 负大) then (valve is 快关) (1) 7) If (level is NM) and (rate is 负小) then (valve is 快关) (1) 8) If (level is NM
5、) and (rate is 不变) then (valve is 快关) (1) 9) If (level is NM) and (rate is 正小) then (valve is 中关) (1)10) If (level is NM) and (rate is 正大) then (valve is 不动) (1)11) If (level is NS) and (rate is 负大) then (valve is 中关) (1) 12) If (level is NS) and (rate is 负小) then (valve is 中关) (1) 13) If (level is
6、NS) and (rate is 不变) then (valve is 中关) (1) 14) If (level is NS) and (rate is 正小) then (valve is 不动) (1) 15) If (level is NS) and (rate is 正大) then (valve is 慢开) (1) 16) If (level is ZE) and (rate is 负大) then (valve is 中关) (1) 17) If (level is ZE) and (rate is 负小) then (valve is 慢关) (1)18) If (level
7、 is ZE) and (rate is 不变) then (valve is 不动) (1)19) If (level is ZE) and (rate is 正小) then (valve is 慢开) (1) 20) If (level is ZE) and (rate is 正大) then (valve is 中开) (1)21) If (level is PS) and (rate is 负大) then (valve is 慢关) (1) 22) If (level is PS) and (rate is 负小) then (valve is 不动) (1) 23) If (le
8、vel is PS) and (rate is 不变) then (valve is 中开) (1)24) If (level is PS) and (rate is 正小) then (valve is 中开) (1) 25) If (level is PS) and (rate is 正大) then (valve is 中开) (1) 26) If (level is PM) and (rate is 负大) then (valve is 不动) (1) 27) If (level is PM) and (rate is 负小) then (valve is 中开) (1) 28) If
9、 (level is PM) and (rate is 不变) then (valve is 快开) (1) 29) If (level is PM) and (rate is 正小) then (valve is 快开) (1) 30) If (level is PM) and (rate is 正大) then (valve is 快开) (1)31) If (level is PB) and (rate is 负大) then (valve is 不动) (1) 32) If (level is PB) and (rate is 负小) then (valve is 中开) (1)33)
10、 If (level is PB) and (rate is 不变) then (valve is 快开) (1) 34) If (level is PB) and (rate is 正小) then (valve is 快开) (1)35) If (level is PB) and (rate is 正大) then (valve is 快开) (1) 这35条模糊控制规则的权重都为1.图6模糊控制规则的设定(5) 利用编辑器的 to Workspace, 将当前的模糊推理系统,以shuiwei1保存到工作空间中。(6) 在如图1所示的Simulink仿真系统中,打开Fuzzy Logic Controller模糊逻辑控制器模块对话框,在其FIS Structure参数对话框中输入:
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 进小区环境整治工作方案
- 人教版初中数学八年级下册第7单元同步练习题及答案
- 小学美术教资面试绘画技巧试卷
- 财会岗2026面试模拟练习自测卷含答案解析配套思路
- 河南水利岗面试模拟练习2026含答案
- 幼儿园校消防安全教育教学主题班会课件
- 2026年江苏省湘教版七年级英语第10单元语法巩固测试课件
- 西藏林芝地区2026届中考数学考试模拟冲刺卷含解析
- 破产清算项目法律咨询及服务协议2026
- 快递行业职业技能理论知识竞赛考试题库(含答案)
- 2026年摩托车零部件及配件制造行业发展研究报告及未来五至十年资本热度与投融资趋势
- 成人高考专升本2025年考试《政治》真题试卷(含答案)
- 2026中国动力电池梯次利用商业模式与残值评估研究报告
- 6.5美丽中国加快建设 课件 (共32张)+内嵌视频 统编版道德与法治9年级上册
- 人教版2026-2027学年九年级道德与法治上册教学计划(及进度表)
- 电镀故障处理手册
- 《数字绘画基础教程》课件-06造型篇-项目六
- 中国传统技艺课件
- 2025睿实消防自动跟踪定位射流灭火系统说明书
- 尿常规培训课件
- GB/T 20977-2024糕点质量通则
评论
0/150
提交评论