【船舶航向】模糊控制船舶航向仿真【含Matlab源码 3073期】

✅博主简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,Matlab项目合作可私信。
🍎个人主页:海神之光
🏆代码获取方式:
海神之光Matlab王者学习之路—代码获取方式
⛳️座右铭:行百里者,半于九十。

更多Matlab仿真内容点击👇
Matlab图像处理(进阶版)
路径规划(Matlab)
神经网络预测与分类(Matlab)
优化求解(Matlab)
语音处理(Matlab)
信号处理(Matlab)
车间调度(Matlab)

⛄一、模糊控制船舶航向仿真

对于模糊控制船舶航向仿真,你可以采用以下步骤:

1、确定系统模型:首先,需要了解船舶的动力学特性,包括质量、惯性、推进力等。根据船舶的特性,建立船舶的数学模型,例如使用牛顿力学方程或航行动力学方程。
2、设计模糊控制器:基于船舶的数学模型,设计模糊控制器来控制船舶的航向。模糊控制器是一种基于模糊逻辑的控制方法,它可以处理不确定性和模糊性的问题。通过设定适当的输入变量和输出变量,以及定义合适的模糊规则和模糊集合,可以实现船舶航向的控制。
3、进行仿真实验:使用仿真软件,如MATLAB/Simulink或其他专业仿真工具,将设计好的模糊控制器与船舶的数学模型相结合进行仿真实验。在仿真过程中,可以设置不同的初始条件和操作情景,评估模糊控制器在不同情况下的性能表现。
4、优化和调整控制器参数:根据仿真实验的结果,评估模糊控制器的性能,并进行参数的优化和调整。可以通过试验和迭代的方式,不断改进控制器的性能,以达到更好的船舶航向控制效果。

⛄二、部分源代码

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=8pi/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 rad/sec (0.57 deg/sec)
% g0: Since the rudder is constrained to move between ±80 deg
% “Good” tuned values:
g1=2/pi;,g2=250;,g0=8
pi/18;

% Next, define some parameters for the membership functions

we=0.2*(1/g1);
% we is half the width of the triangular input membership
% function bases (note that if you change g0, 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/g2);
% Similar to we but for the c universe of discourse
base=0.4*g0;
% 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 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/g1);

% Centers of input membership functions for the c universe of
% discourse 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/g2);

% This next matrix specifies the rules of the fuzzy controller.
% The entries are the centers of the output membership functions.
% This choice represents just one guess on how to synthesize
% the fuzzy controller. Notice the regularity
% of the pattern of rules (basiscally we are using a type of
% saturated index adding). Notice that it is scaled by g0, the
% output scaling factor, since it is a normalized rule base.
% The rule base can be tuned to try to improve performance.

% The gain gf is a gain that can be set to one to initialize
% the rule base with an initial guess at the fuzzy controller to be
% synthesized or to zero to initialize the rule base to all zeros
% (i.e., all centers at zero so the rules all say to put zero
% into the plant).

gf=1;

rules=[1 1 1 1 1 1 0.8 0.6 0.3 0.1 0;
1 1 1 1 1 0.8 0.6 0.3 0.1 0 -0.1;
1 1 1 1 0.8 0.6 0.3 0.1 0 -0.1 -0.3;
1 1 1 0.8 0.6 0.3 0.1 0 -0.1 -0.3 -0.6;
1 1 0.8 0.6 0.3 0.1 0 -0.1 -0.3 -0.6 -0.8;
1 0.8 0.6 0.3 0.1 0 -0.1 -0.3 -0.6 -0.8 -1;
0.8 0.6 0.3 0.1 0 -0.1 -0.3 -0.6 -0.8 -1 -1;
0.6 0.3 0.1 0 -0.1 -0.3 -0.6 -0.8 -1 -1 -1;
0.3 0.1 0 -0.1 -0.3 -0.6 -0.8 -1 -1 -1 -1;
0.1 0 -0.1 -0.3 -0.6 -0.8 -1 -1 -1 -1 -1;
0 -0.1 -0.3 -0.6 -0.8 -1 -1 -1 -1 -1 -1]gfg0;

% Next, we define some parameters for the fuzzy inverse model

gye=2/pi;,gyc=10; % 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.4;

⛄三、运行结果

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

⛄四、matlab版本及参考文献

1 matlab版本
2014a

2 参考文献
[1]陈敏, 钟楠, 周颖, 等. 基于模糊逻辑控制的船舶航向稳定性仿真研究[J]. 电子技术与软件工程, 2015, 4(3): 167-171.
[2]陈剑锋, 许松. 船舶航向控制系统的模糊P控制方法研究[J]. 控制与决策, 2006, 21(11): 1256-1259.
[3]张学军, 董艳斌. 船舶航向模糊控制仿真研究[J]. 现代电子技术, 2014, 37(16): 87-90.
曹文亮, 张伟, 薛宇峰. 船舶航向模糊控制系统设计与仿真[J]. 北京航空航天大学学报, 2007, 33(2): 190-193.

3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除

🍅 仿真咨询
1 各类智能优化算法改进及应用

生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化、公交排班优化、充电桩布局优化、车间布局优化、集装箱船配载优化、水泵组合优化、解医疗资源分配优化、设施布局优化、可视域基站和无人机选址优化

2 机器学习和深度学习方面
卷积神经网络(CNN)、LSTM、支持向量机(SVM)、最小二乘支持向量机(LSSVM)、极限学习机(ELM)、核极限学习机(KELM)、BP、RBF、宽度学习、DBN、RF、RBF、DELM、XGBOOST、TCN实现风电预测、光伏预测、电池寿命预测、辐射源识别、交通流预测、负荷预测、股价预测、PM2.5浓度预测、电池健康状态预测、水体光学参数反演、NLOS信号识别、地铁停车精准预测、变压器故障诊断

3 图像处理方面
图像识别、图像分割、图像检测、图像隐藏、图像配准、图像拼接、图像融合、图像增强、图像压缩感知

4 路径规划方面
旅行商问题(TSP)、车辆路径问题(VRP、MVRP、CVRP、VRPTW等)、无人机三维路径规划、无人机协同、无人机编队、机器人路径规划、栅格地图路径规划、多式联运运输问题、车辆协同无人机路径规划、天线线性阵列分布优化、车间布局优化

5 无人机应用方面
无人机路径规划、无人机控制、无人机编队、无人机协同、无人机任务分配

6 无线传感器定位及布局方面
传感器部署优化、通信协议优化、路由优化、目标定位优化、Dv-Hop定位优化、Leach协议优化、WSN覆盖优化、组播优化、RSSI定位优化

7 信号处理方面
信号识别、信号加密、信号去噪、信号增强、雷达信号处理、信号水印嵌入提取、肌电信号、脑电信号、信号配时优化

8 电力系统方面
微电网优化、无功优化、配电网重构、储能配置

9 元胞自动机方面
交通流 人群疏散 病毒扩散 晶体生长

10 雷达方面
卡尔曼滤波跟踪、航迹关联、航迹融合

  • 21
    点赞
  • 24
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值