当前位置:网站首页>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); 边栏推荐
- MySQL Express
- Explain cache consistency and memory barrier
- 如何在qsim查看软件对象的实例?
- 02 linear structure 3 reversing linked list
- NiO Summary - read and understand the whole NiO process
- Flask project configuration
- 接口测试工具-Postman使用详解
- 【nonebot2】几个简单的机器人模块(一言+彩虹屁+每日60s)
- 数智革新
- Encountered 7 file(s) that should have been pointers, but weren‘t
猜你喜欢

Hundreds of people participated. What are these people talking about in the opengauss open source community?

Explain cache consistency and memory barrier

redis的string类型及bitmap

String type and bitmap of redis

Low cost, low threshold, easy deployment, a new choice for the digital transformation of 48 million + small and medium-sized enterprises

NIO示例

redis 网络IO

Network IO summary

Realization of background channel group management function

Redis network IO
随机推荐
Have a good laugh
Background coupon management
Include error in vs Code (new header file)
Blueprint class view method
数智革新
Flink1.15 source code reading Flink clients client execution process (reading is boring)
691. 立方体IV
Encountered 7 file(s) that should have been pointers, but weren‘t
Cache consistency and memory barrier
Implementation of registration function
Realization of specification management and specification option management functions
4279. Cartesian tree
String type and bitmap of redis
Connection failed during installation of ros2 [ip: 91.189.91.39 80]
Transaction, order system add transaction
JS detects whether the client software is installed
Sequential storage and chain storage of stack implementation
微信安装包从0.5M暴涨到260M,为什么我们的程序越来越大?
Full Permutation (depth first, permutation tree)
Encountered 7 file(s) that should have been pointers, but weren‘t