智能控制及MATLAB实现—水箱液位模糊控制仿真设计.doc_第1页
智能控制及MATLAB实现—水箱液位模糊控制仿真设计.doc_第2页
智能控制及MATLAB实现—水箱液位模糊控制仿真设计.doc_第3页
智能控制及MATLAB实现—水箱液位模糊控制仿真设计.doc_第4页
智能控制及MATLAB实现—水箱液位模糊控制仿真设计.doc_第5页
免费预览已结束,剩余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个:其中水位误差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 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 NB) 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) 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 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 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 (level 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 (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) 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) 利用编辑器的File/Save to Workspace, 将当前的模糊推理系统,以shuiwei1保存到工作空间中。(6) 在如图1所示的Simulink仿真系统中,打开Fuzzy Logic Controller模糊逻辑控制器模块对话框,在其FIS File or Structure参数对话框中输入

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论