1000字范文,内容丰富有趣,学习的好帮手!
1000字范文 > 液位控制系统matlab仿真 智能控制及MATLAB实现—水箱液位模糊控制仿真设计

液位控制系统matlab仿真 智能控制及MATLAB实现—水箱液位模糊控制仿真设计

时间:2022-05-01 22:08:10

相关推荐

液位控制系统matlab仿真 智能控制及MATLAB实现—水箱液位模糊控制仿真设计

《智能控制及MATLAB实现—水箱液位模糊控制仿真设计》由会员分享,可在线阅读,更多相关《智能控制及MATLAB实现—水箱液位模糊控制仿真设计(6页珍藏版)》请在人人文库网上搜索。

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) 利用编辑器的File/Save to Workspace, 将当前的模糊推理系统,以shuiwei1保存到工作空间中。(6) 在如图1所示的Simulink仿真系统中,打开Fuzzy Logic Controller模糊逻辑控制器模块对话框,在其FIS File or Structure参数对话框中输入:shuiwei1。(7) 在如图1所示的Simulink系统中,打开仿真参数设置窗口,正确设置仿真参数后,启动仿真便可看到水位变化曲线。图7水位变化曲线通过曲面观察器也可以清晰的看见水箱液位模糊推理的输入输出关系。图8Surface Viewer总结:随着科学技术的发展,智能控制技术必会日趋完善,并且能够在多领域应用。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。