资源简介
老外写的一个程序,双输入单输出,并不是simulink模块,代码有点长,但是备注很详细,看懂问题不大。
代码片段和文件信息
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Fuzzy Model Reference Learning Control (FMRLC) System for a Tanker Ship
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% By: Kevin Passino
% Version: 4/26/01
%
% Notes: This program has evolved over time and uses programming
% ideas of Andrew Kwong Jeff Layne and Brian Klinehoffer.
%
% This program simulates an FMRLC for a tanker
% ship. It has a fuzzy controller with two inputs the error
% in the ship heading (e) and the change in that error (c). The output
% of the fuzzy controller is the rudder input (delta). The FMRLC
% adjusts the fuzzy controller to try to get tanker ship heading (psi)
% to track the output of a “reference model“ (psi_m) that has as an
% input the reference input heading (psi_r). We simulate the tanker
% as a continuous time system that is controlled by an FMRLC that
% is implemented on a digital computer with a sampling interval of T=1 sec.
%
% This program can be used to illustrate:
% - How to code an FMRLC (for two inputs and one output
% for the controller and “fuzzy inverse model“).
% - How to tune the input and output gains of an FMRLC.
% - How changes in plant conditions (“ballast“ and “full“ and speed)
% can affect performance and how the FMRLC can adapt to improve
% performance when there are such changes.
% - How the effects of sensor noise (heading sensor noise) and plant
% disturbances (wind hitting the side of the ship) can be reduced
% over the case of non-adaptive fuzzy control.
% - The shape of the nonlinearity synthesized by the FMRLC
% by plotting the input-output map of the fuzzy controller at the
% end of the simulation (and providing the output membership function
% centers).
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear % Clear all variables in memory
% Initialize ship parameters
ell=350; % Length of the ship (in meters)
abar=1; % Parameters for nonlinearity
bbar=1;
% Define the reference model (we use a first order transfer function
% k_r/(s+a_r)):
a_r=1/150;
k_r=1/150;
% Initialize parameters for the fuzzy controller
nume=11; % Number of input membership functions for the e
% universe of discourse (can change this but must also
% change some variables below if you make such a change)
numc=11; % Number of input membership functions for the c
% universe of discourse (can change this but must also
% change some variables below if you make such a change)
% Next we define the scaling gains for tuning membership functions for
% universes of discourse for e change in e (what we call c) and
% delta. These are g1 g2 and g0 respectively
% These can be tuned to try to improve the performance.
% First guess:
g1=1/pi;g2=100;g0=8*pi/18; % Chosen since:
% g1: The heading error is at most 180 deg (pi rad)
% g2: Just a guess - that ship heading will change at most
% by 0.01
- 上一篇:sage-husa滤波
- 下一篇:感应电机模型
相关资源
- Pattern Recognition and Machine Learning(高清
- MATLAB 编程 第二版 Stephen J. Chapman 著
- 均值滤波和FFT频谱分析Matlab代码
- 《MATLAB扩展编程》代码
- HDB3码、AMI码的MATLAB实现
- 3点GPS定位MATLAB仿真
- MATLAB数字信号处理85个实用案例精讲入
- matlab从入门到精通pdf94795
- 欧拉放大论文及matlab代码
- 跳一跳辅助_matlab版本
- 全面详解LTE MATLAB建模、仿真与实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- MATLAB Programming for Engineers 4th - Chapman
- matlab 各种谱分析对比
- 分数阶chen混沌matlab程序
- 蚁群算法论文+源代码
- 基于粒子群算法的非合作博弈的matl
- MATLAB车流仿真 包括跟驰、延误
- matlab空间桁架计算程序
- 基于MATLAB的图像特征点匹配和筛选
- DMA-TVP-FAVAR
- GPS信号的码捕获matlab代码.7z
- 一维光子晶体MATLAB仿真代码吸收率折
- newmark法源程序
- 传统关联成像、计算鬼成像matlab
- pri传统分选算法
- 摆动滚子推杆盘形凸轮设计
- 高斯正反算批量计算
- 医学图像重建作业matlab源码
- Matlab实现混沌系统的控制
评论
共有 条评论