下载本文档
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
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. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2026年滁州市第三人民医院医护人员招聘笔试备考试题及答案解析
- 2026年成都市锦江区第二人民医院医护人员招聘笔试模拟试题及答案解析
- 应届毕业生就业方向
- 德阳经济技术开发区第四幼儿园2026年春期面向社会公开招聘“两自一包”非在编幼儿教师笔试参考题库及答案解析
- 2026年郴州市事业单位人员招聘考试备考试题及答案详解
- 2026福建漳州市芗城利盛发展有限公司招聘劳务派遣人员1人笔试参考试题及答案详解
- 2026年东莞市交通运输系统事业单位人员招聘考试备考试题及答案详解
- 2026年毕节市市场监督管理系统事业单位人员招聘考试备考试题及答案详解
- 2026年防城港市国家电网系统事业单位人员招聘考试备考试题及答案详解
- 2026 危机案例复盘课件
- 悬挑式卸料平台监理实施细则
- 加油站公共安全风险评估报告
- 铸件(原材料)材质报告
- 提货申请单表
- 脑与认知科学概论PPT(第2版)完整全套教学课件
- 【初中化学】中国化学家-李寿恒
- 镭雕机作业指导书
- 生管指导手册(什么是PMC)
- 历届全国初中数学联赛真题和答案
- 国家义务教育监测八年级模拟试题(音乐)
- GB/T 8685-2008纺织品维护标签规范符号法
评论
0/150
提交评论