当前位置:网站首页>Matlab uses m file to produce fuzzy controller
Matlab uses m file to produce fuzzy controller
2022-07-27 08:46:00 【User 9925864】
A friend asked a question , You want to optimize the universe of fuzzy control through particle swarm optimization , under these circumstances , You can't go straight through matlab Of fuzzy Toolbox to generate automatically fis Fuzzy file , Need to pass through M File generation fuzzy controller , And write it as a function for easy calling ,
Early fuzzy control and particle swarm gate :
matlab Use of fuzzy control toolbox and fuzzy control pid Example reference ( One )
matlab Use of fuzzy control toolbox and fuzzy control pid Example reference ( Two )
Particle swarm optimization algorithm (PSO)
Particle swarm optimization algorithm -Python Version and Matlab Function call
Give an example as follows :
%%
clc
close all
clear
FIS = newfis('FIS','sugeno');
%%
% Define input E:
FIS = addvar(FIS,'input','E',[-10 10]);
FIS = addmf(FIS,'input',1,'Negative','gaussmf',[7 -10]);
FIS = addmf(FIS,'input',1,'Positive','gaussmf',[7 10]);
%%
% Define input CE:
FIS = addvar(FIS,'input','CE',[-10 10]);
FIS = addmf(FIS,'input',2,'Negative','gaussmf',[7 -10]);
FIS = addmf(FIS,'input',2,'Positive','gaussmf',[7 10]);
%%
% Define the output u:
FIS = addvar(FIS,'output','u',[-20 20]);
FIS = addmf(FIS,'output',1,'Min','constant',-20);
FIS = addmf(FIS,'output',1,'Zero','constant',0);
FIS = addmf(FIS,'output',1,'Max','constant',20);
%%
% Define the rules :
% Format : Input 1~ Input 2~ Output ~ The weight ( The default is :1) logical relationship (1=and;2=or)
ruleList = [1 1 1 1 1;... % Rule 1
1 2 2 1 1;... % Rule 2
2 1 2 1 1;... % Rule 3
2 2 3 1 1];
FIS = addrule(FIS,ruleList); 边栏推荐
- Arm undefined instruction exception assembly
- 如何在B站上快乐的学习?
- 691. Cube IV
- Query and association of flask to database
- User management - restrictions
- Realization of backstage brand management function
- Encountered 7 file(s) that should have been pointers, but weren‘t
- 3428. Put apples
- Help send some recruitment. If you are interested, you can have a look
- Initial summary of flask framework creation project
猜你喜欢

It's better to be full than delicious; It's better to be drunk than drunk

Flask request data acquisition and response

Flink1.15源码阅读flink-clients客户端执行流程(阅读较枯燥)

Fluent rendering mechanism - GPU thread rendering

E. Split into two sets

Oppo self-developed large-scale knowledge map and its application in digital intelligence engineering

Create a project to realize login and registration, generate JWT, and send verification code

“蔚来杯“2022牛客暑期多校训练营1

Network IO summary

4276. Good at C
随机推荐
Flask project configuration
无法获取下列许可SOLIDWORKS Standard,无法找到使用许可文件。(-1,359,2)。
Arm undefined instruction exception assembly
[uni app advanced practice] take you hand-in-hand to learn the development of a purely practical complex project 1/100
Use of flask
Hangzhou E-Commerce Research Institute released an explanation of the new term "digital existence"
691. Cube IV
NIO总结文——一篇读懂NIO整个流程
Day6 --- Sqlalchemy advanced
众昂矿业:新能源行业快速发展,氟化工产品势头强劲
Realize SKU management in the background
View 的滑动冲突
Login to homepage function implementation
Zhongang Mining: the new energy industry is developing rapidly, and fluorine chemical products have a strong momentum
Have a good laugh
2034: [Blue Bridge Cup 2022 preliminary] pruning shrubs
Create a project to realize login and registration, generate JWT, and send verification code
MCDF顶层验证方案
Block, there is a gap between the block elements in the row
4277. Block reversal