基于遗传算法的自主式水下潜器路径规划问题(Matlab代码实现)

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

💥💥💞💞欢迎来到本博客❤️❤️💥💥

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

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

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

自主式水下机器人(Autonomous Underwater Vehicle,简称AUV)是近世纪发展起来的具有一定的自主导航和规划能力的水下机器人,可广泛应用于海洋学勘测、地形地貌测量、目标搜索、海底管线检测维修等领域,甚至可以用于水下古迹勘探或水下影视特技,通常可以在危险或人力不可到达的海域活动,扩展载人潜器或有缆潜器/水下机器人的作业能力与探测范围,AUV的这种自主性表现之一是 具有基于环境模型的全局规划能力。
应用遗传算法(GA)对AUV在大范围海洋环境中的全局路径规划问题进行了研究。介绍了基于栅格的环境模型及其数据结构 ,通过仿真结果可以看出 :GA采用可变长编码方式使路径描述简单、清晰 ,具有收敛速度快、求解实际问题效率高的特点,满足系统实时性要求 。

📚2 运行结果

部分代码:

Fitconst=0;         %Number of generations that fitness values remain constant
%% Genetic algorithm
while(Generation <= ITERATION)
    if (Fitconst<=THRESHOLD) %Stop iteration if fitness value is constant in threshold number of genreations
        fitness = Fitness(Parentpop,adjacency);       %Calculate fitness of parents
        crossover = Crossover(Parentpop,Pcross);      %Crossover
        Childpop = Mutation(crossover,Pmutation);     %Mutate and get chindren
        combopop=[Parentpop;Childpop];                %Combine parents and chindren
        combofitness=Fitness(combopop,adjacency);       %Calculate overall fitness
        nextpop=Select(combopop,combofitness);        %Select the first half of best to get 2nd gen
        Parentpop=nextpop.pop;
        if(Generation ==1)
            Best_GApath=Parentpop(1,:);
            Best_Fitness=combofitness(nextpop.bestplan);
        else
            New_Best_Fitness=combofitness(nextpop.bestplan);%Evaluate best solution
            New_Best_GApath=Parentpop(1,:);
            
            if(New_Best_Fitness<Best_Fitness)
                Best_Fitness=New_Best_Fitness;
                Best_GApath=New_Best_GApath;
                Fitconst = 0;
                
                %%%%%%%%Visualize planning process%%%%%%%%
%                     GENERATION=[1:Generation-1];
%                     GAplancoor = [RP(Best_GApath).x;RP(Best_GApath).y; RP(Best_GApath).z].';
%                     figure(1);
%                     for i=1:RPNUM
%                         subplot(2,1,1);     %Plot all rendezvous points
%                         plot3(RP(i).x,RP(i).y,RP(i).z,'o');
%                         text(RP(i).x,RP(i).y, RP(i).z,num2str(i));
%                         hold on;
%                         subplot(2,1,2);
%                         plot(RP(i).x,RP(i).y,'o');
%                         text(RP(i).x,RP(i).y,num2str(i));
%                         hold on;
%                     end
%                     subplot(2,1,1);
%                     plot3(GAplancoor(:,1),GAplancoor(:,2),GAplancoor(:,3),'r-.');
%                     title('3D Path of AUV');
%                     grid on;
%                     hold off;
%                     subplot(2,1,2);
%                     plot(GAplancoor(:,1),GAplancoor(:,2),'r-.');
%                     title('2D Path of AUV');
%                     grid on;
%                     hold off;
                %%%%%%%%Visualize planning process%%%%%%%%
                
            else
                Fitconst=Fitconst+1;
            end
        end 

🎉3 参考文献

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

[1]王宏健,边信黔,唐照东,施小成,丁福光.大范围环境下自主式水下潜器两种全局路径规划方法的研究[J].中国造船,2004(03):81-86.

🌈4 Matlab代码实现

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

荔枝科研社

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值