基于改进PSO-ABC算法的机器人路径规划(Matlab代码实现)

 ‍个人主页:研学社的博客 

欢迎来到本博客❤️❤️

博主优势:博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

本文目录如下:

目录

1 概述

2 运行结果

3 Matlab代码实现

4 参考文献


1 概述

系统试图借助人工蜂群针对粒子群算法和蜂群算法在寻优中存在的一些早熟和收敛速精度不高等问题,本文分别对粒子算法和蜂群算法的更新策略以及更新公式进行了改进,利用改进的粒子群算法和改进的蜂群算法同时对一个粒子位置进行部分算术更新的方法,提出了一种新混合的优化算法.并将其在12个多极值基准函数进行全局最优化测试,实验结果表明,笔者提出的混合优化算法收敛的速度和收敛精度大大提高了,其性大大优于改进的粒子群算法(CLPSO算法)和人工蜂群算法,对于高、低维复杂函数的优化均适用.。(ABC)算法和粒子群优化算法相结合的方法可找到从起点到终点之间最优的路径。这是一种很好的机器人寻径策略。在每一次运行中,新的障碍在新的位置和曲线试图找到最佳路径。多次运行以找到最佳结果。

2 运行结果

基于改进PSO-ABC算法的机器人路径规划(Matlab代码实现)_第1张图片

基于改进PSO-ABC算法的机器人路径规划(Matlab代码实现)_第2张图片

主函数部分代码:

%% Cleaning The Stage
clc;
clear;
warning('off');

%% Start ABC + PSO Optimal Path Finder
model=Basics();
model.n=6;  % number of Handle Points
CostFunction=@(x) Cost(x,model);    % Cost Function
nVar=model.n;       % Number of Decision Variables
VarSize=[1 nVar];   % Size of Decision Variables Matrix
VarMin.x=model.xmin;           % Lower Bound of Variables
VarMax.x=model.xmax;           % Upper Bound of Variables
VarMin.y=model.ymin;           % Lower Bound of Variables
VarMax.y=model.ymax;           % Upper Bound of Variables

%% PSO + ABC Parameters
MaxIt=150;          % Maximum Number of Iterations
nPop=20;           % Population Size (Swarm Size)
w=1;                % Inertia Weight
wdamp=0.98;         % Inertia Weight Damping Ratio
c1=1.5;             % Personal Learning Coefficient
c2=1.5;             % Global Learning Coefficient
nOnlooker = nPop;         % Number of Onlooker Bees
L = round(0.6*nVar*nPop); % Abandonment Limit Parameter (Trial Limit)
a = 1;
alpha=0.1;
VelMax.x=alpha*(VarMax.x-VarMin.x);    % Maximum Velocity
VelMin.x=-VelMax.x;                    % Minimum Velocity
VelMax.y=alpha*(VarMax.y-VarMin.y);    % Maximum Velocity
VelMin.y=-VelMax.y;                    % Minimum Velocity

%% Initialization PSO + ABC
% Create Empty Particle Structure
empty_particle.Position=[];
empty_particle.Velocity=[];
empty_particle.Cost=[];
empty_particle.Sol=[];
empty_particle.Best.Position=[];
empty_particle.Best.Cost=[];
empty_particle.Best.Sol=[];
% Empty Bee Structure
empty_bee.Position = [];
empty_bee.Cost = [];
% Initialize Global Best
GlobalBest.Cost=inf;
% Initialize Population Array
pop = repmat(empty_bee, nPop, 1);
bee = repmat(empty_bee, nPop, 1);
% Initialize Best Solution Ever Found
BestSol.Cost = inf;
GlobalBest.Cost=inf;
% Create Particles Matrix
particle=repmat(empty_particle,nPop,1);
% Initialization Loop
for i=1:nPop
% Initialize Position
if i > 1
particle(i).Position=CRSolution(model);
else

3 Matlab代码实现

4 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]叶奕茂,赵华生,金龙.一种基于PSO-ABC的全局优化算法[J].广西民族大学学报(自然科学版),2013,19(04):55-59.DOI:10.16177/j.cnki.gxmzzk.2013.04.022.

你可能感兴趣的:(#,matlab,算法,机器人)