资源简介
MATLAB实现的模糊自适应控制函数的源代码
代码片段和文件信息
clear % Clear all variables in memory
eold=0; % Intial condition used to calculate c
rold=0; % Intial condition used to calculate r
yeold=0; % Intial condition used to calculate yc
ymold=0; % Initial condition for the first order reference model
% Next initialize parameters for the fuzzy controller
nume=11; % Number of input membership functions for the e
% universe of discourse
numc=11; % Number of input membership functions for the c
% universe of discourse
ge=1/2;gc=1/2;gu=5;
% Scaling gains for tuning membership functions for
% universes of discourse for e c and u respectively
% These are tuned to improve the performance of the FMRLC
we=0.2*(1/ge);
% we is half the width of the triangular input membership
% function bases (note that if you change ge the base width
% will correspondingly change so that we always end
% up with uniformly distributed input membership functions)
% Note that if you change nume you will need to adjust the
% “0.2“ factor if you want membership functions that
% overlap in the same way.
wc=0.2*(1/gc);
% Similar to we but for the c universe of discourse
base=0.4*gu;
% base width of output membership fuctions of the fuzzy
% controller
% Place centers of membership functions of the fuzzy controller:
% Centers of input membership functions for the e universe of
% discourse for of fuzzy controller (a vector of centers)
ce=[-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1]*(1/ge);
% Centers of input membership functions for the c universe of
% discourse for of fuzzy controller (a vector of centers)
cc=[-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1]*(1/gc);
gf=0;
fuzzyrules=[-1 -1 -1 -1 -1 -1 -0.8 -0.6 -0.4 -0.2 0;
-1 -1 -1 -1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2;
-1 -1 -1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4;
-1 -1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6;
-1 -1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8;
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1;
-0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1;
-0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1 1;
-0.4 -0.2 0 0.2 0.4 0.6 0.8 1 1 1 1;
-0.2 0 0.2 0.4 0.6 0.8 1 1 1 1 1;
0 0.2 0.4 0.6 0.8 1 1 1 1 1 1]*gu*gf;
% Next we define some parameters for the fuzzy inverse model
gye=1/2;gyc=1/2;
% Scaling gains for the error and change in error for
% the inverse model
% These are tuned to improve the performance of the FMRLC
gp=0.2;
numye=11; % Number of input membership functions for the ye
% universe of discourse
numyc=11; % Number of input membership functions for the yc
% universe of discourse
wye=0.2*(1/gye); % Sets the width of the membership functions for
% ye from center to extremes
wyc=0.2*(1/gyc); % Sets the width of the membership functions for
% yc from center to extremes
invbase=0.4*gp; % Sets the base of
- 上一篇:matlab 全息图
- 下一篇:Matlab图像模板匹配算法
相关资源
- 非线性SVM算法-matlab实现
- Matlab实现基于相关的模板匹配程序
- 光纤传输中的分布傅立叶算法matlab实
- 引导图像滤波器 Matlab实现
- LU分解的MATLAB实现
- 用matlab实现的多站定位系统性能仿真
- k近邻算法matlab实现
- MATLAB实现的BPSK调制解调
- FNN MATLAB实现
- 工程优化问题的Matlab实现代码
- MATLAB实现混沌图像加密仿真程序
- matlab实现摄像机标定
- qam 用matlab实现qam仿真的程序
- MATLAB实现弹道仿真
- HDB3码、AMI码的MATLAB实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- Matlab实现混沌系统的控制
- matlab实现电力系统潮流计算-PQ分解法
- ROC曲线 matlab实现
- OFDM通信系统matlab实现
- matlab实现对两幅图像的叠加
- 织物密度测量MATLAB实现
- BP神经网络实现手写数字识别matlab实现
- 自动寻峰谷算法matlab实现
- AR模型算法的matlab实现和实验分析
- Dijkstra最短路径算法的Matlab实现
- 随机梯度下降算法的MATLAB实现
- 数字信号处理及MATLAB实现__第二版__学
- Harris角点检测matlab实现
- matlab实现仿射加密解密
评论
共有 条评论