第一范文网 - 专业文章范例文档资料分享平台

模糊控制器设计

来源:用户分享 时间:2025/5/29 6:52:43 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

y3 = gaussmf(x, [10 0]); y4 = gaussmf(x, [10 33]); y5 = gaussmf(x, [10 66]); y6 = gaussmf(x, [10 100]); a=[y0 y1 y2 y3 y4 y5 y6]; b=max(a);

% caculate input in fuzzy zone,get input_type and input_authorityvalue if x<=100 & x>=-100 if b==a(1) type='NB'; authorityvalue=y0; elseif b==a(2) type='NM'; authorityvalue=y1; elseif b==a(3) type='NS'; authorityvalue=y2; elseif b==a(4) type='ZE'; authorityvalue=y3; elseif b==a(5) type='PS'; authorityvalue=y4; elseif b==a(6) type='PM'; authorityvalue=y5; else b==a(7) type='PB';

17 / 27

authorityvalue=y6; end else

if x>100 type='PB'; authorityvalue=1; elseif x<-100 type='NB'; authorityvalue=1; end end type

authorityvalue % caculate output by if type=='NB'

out=authorityvalue*0;

% if input is NB, then output is PB; elseif type=='NM' out=authorityvalue*17;

% if input is NM, then output is PM; elseif type=='NS' out=authorityvalue*34;

% if input is NS, then output is PS; elseif type=='ZE' out=authorityvalue*51;

% if input is ZE, then output is ZE; elseif type=='PS' out=authorityvalue*68;

% if input is PS, then output is NS;

18 / 27

elseif type=='PM' out=authorityvalue*85;

% if input is PM, then output is NM; else type=='PB'

out=authorityvalue*100;

% if input is PB, then output is NB; end out 结果为: X=14 type =ZE

authorityvalue = 0.3753 out = 19.1409 X=-150 type =NB

authorityvalue =1 out =0

2. 设计一个模糊控制器,满足如下条件:

输入:-10-10范围内分为3个论域,NB ZE PB;隶属度函数满足高斯分布; 输入的误差:-2-2范围内分为3个论域,NB ZE PB;隶属度函数满足高斯分布;

输出:0到100范围内分为5个论域,NB NM ZE PM PB,隶属度函数为常数1。

模糊推理过程,output=(输入隶属度函数值+输入误差的隶属度函数值)/2*输出论域的中心值。 控制规则:

% % if input is NB and errorinput is NB, then output is NB; % % if input is NB and errorinput is ZE, then output is NM;

19 / 27

% % if input is NB and errorinput is PB, then output is ZE; % % if input is ZE and errorinput is NB, then output is NM; % % if input is ZE and errorinput is ZE, then output is ZE; % % if input is ZE and errorinput is PB, then output is PM; % % if input is PB and errorinput is NB, then output is ZE; % % if input is PB and errorinput is ZE, then output is PM; % % if input is PB and errorinput is PB, then output is PB; 1.输入为: 程序为: x1 = (-10:0.1:10)'; y0 = gaussmf(x1, [3 -10]); y1 = gaussmf(x1, [3 0]); y2 = gaussmf(x1, [3 10]); plot(x1,[y0 y1 y2]);

2.误差图: 程序为:

x1 = (-2:0.1:2)';

20 / 27

搜索更多关于: 模糊控制器设计 的文档
模糊控制器设计.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c6lia38ew4t4i6jo0x1m776vac3ljqt012dg_5.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top