当前位置:网站首页>[matlab WSN communication] a_ Star improved leach multi hop transmission protocol [including source code phase 487]

[matlab WSN communication] a_ Star improved leach multi hop transmission protocol [including source code phase 487]

2022-06-11 06:48:00 Matlab fo Nu Tang Lian

One 、 Code run video ( Bili, Bili )

【Matlab Path planning 】 Ant colony algorithm for robot shortest path planning in large scale grid map 【 Including source code 1860 period 】

Two 、 Introduction to ant colony algorithm and grid map

With the application of robot technology in many fields , Such as Robot Cooperative welding 、 Post disaster search and rescue 、 military 、 Space exploration 、 Deep sea exploration 、 Household and service industries, etc , The development of robot is extending in the direction of intelligence , It is required to have self-organization 、 Self learning 、 Adaptive and other capabilities . Robot path planning means that the robot avoids obstacles from its initial position according to some rules 、 Reach the target position without collision . At present, the main methods used in the research of path planning at home and abroad are : Artificial potential field method 、 Probabilistic path graph method [3]、 Visual graph method 、 Grid method 、 Neural network algorithm 、 Genetic algorithm (ga) 、 Particle swarm optimization 、 Ant colony algorithm .

The grid method decomposes the search space of the robot into several units of equal size , Decompose complex environmental problems into simple problems , Path planning for static environments , And the calculation amount of the algorithm is small , Easy to implement , But in a complex environment , It is easy to prolong the planning time , The real-time performance of the system is not enough . Ant colony algorithm is a new bionic algorithm , Take ants foraging as a model , Through the previous generation of ants in the path left by the strength of pheromones to choose the path . The algorithm has good positive feedback 、 Parallelism and robustness ; But when it comes to complex problems , It will lead to long search time 、 Fall into local optimum 、 Stagnation, deadlock, etc . therefore , Combining the advantages and disadvantages of grid method and ant colony algorithm , The grid method and ant colony algorithm are combined for path planning , First create a grid map , Then the ant colony algorithm is used for global search , It can improve the performance of the algorithm .

1 Grid modeling
1.1 Introduction to the application of grid method in path planning

The grid method is made up of W.E.Howden On 1968 in , It is mainly to establish a path grid map according to the environment (map) . The basic principle is to divide the robot working environment into countless small grid cells with binary information , The size of each mesh is determined by the step size of the robot , That is, one step represents one grid size . When meshing , When there is less than one barrier grid or non barrier grid , Fill it up , Calculate by one grid .

The environment information is represented by a black-and-white grid . The black grid represents obstacles (barrier) , Indicates an infeasible area ; The white grid represents the passable area , Also called free zone . The grid method uses a binary matrix to represent the infeasible region and the free region , Matrix 1 It's for obstacles , 0 Stands for free grid , Thus, a path planning map that can describe the environment is established in the environment .

1.2 The establishment of grid map
hypothesis SP It is a regular convex polygon playground for robot in two-dimensional space , Break down the site into M×N A grid , It is composed of free grid and obstacle grid , Its movement mode is mainly in the form of octree . A collection of free grids P={P1, P2, …, Pm}, A collection of obstacle grids B={B1, B2, …, Bn}, set up A A collection of grids for robot workplaces , The expression is A=P∪B.

Based on the experimental site, a 10×10 grid map , Pictured 1 Shown . The sequence number set of the grid in the figure C={1, 2, 3, …, 100}. hypothesis 1 The sign is the initial position Gstart, 100 The sign is the target position Ggoal, The robot passes from its initial position n Second iteration search to find the best path , Where the initial position Gstart∈A And , Target location Ggoal∈A And , The specified initial position does not coincide with the target position , In the path search, it mainly searches in the form of octree .

2 Ant colony algorithm path planning problem description
2.1 Description of basic ant colony algorithm

Ant colony algorithm is a bionic algorithm that imitates ant colony foraging , The basic principle is to regard each robot as an ant in the ant colony . The ant searches the path through the pheromone strength left by the ant colony on the path , Send messages to other ants , Realize information exchange between robots . Usually the path is unknown , Ants usually choose their path according to probability Pkij (t) Random selection .
 Insert picture description here
among :α Is the heuristic factor ;β Is the expected heuristic factor ;τij For robots k From the position i To the position j The strength of pheromones left on this path ;allowedk Represents a collection of grids that have not been accessed by the robot ;ηij (t) Is a heuristic function , The size of the heuristic function is the same as i、j About the distance between , dij The smaller the value. , i, j The closer the relationship is , On the contrary, they are alienated , The expression is
 Insert picture description here
In style (xi, yi) Is the position coordinate of the point , (xj, yj) Is the position coordinate of the point .

2.2 Ant pheromone update
The robot will leave New pheromones on the path in the process of path search , The strength of pheromones left on the path increases with time , In order to avoid flooding heuristic information due to too many pheromones remaining in the search path , therefore , When the ant completes a search , Update the pheromones on all paths once , The expression is
 Insert picture description here
among :1-ρ Indicates pheromone residue factor , ρ Indicates pheromone volatilization coefficient ;Δτij (t) Indicates the path of the ant in this cycle (i, j) Pheromone increments on , Δτkij (t) It means the first one k An ant passes the path (i, j) The amount of pheromone increase in this cycle . According to the pheromone rule , Select ant week (ant-cycle) The model updates the model as an ant pheromone .
 Insert picture description here
In style , Q Represents pheromone strength , Lk It means the first one k Only the total length of all paths of ants in this cycle .

3、 ... and 、matlab Edition and references

1 matlab edition
2019b

2 reference
[1] Zhou Dongjian , Zhang Xingguo , Ma Haibo , Li Chenghao , Guo Xu . Grid based map - Robot optimal path planning based on ant colony algorithm [J]. Journal of Nantong University ( Natural science edition ). 2013,12(04)

3 remarks
This part of the introduction is taken from the Internet , For reference only , If infringement , Contact deletion

原网站

版权声明
本文为[Matlab fo Nu Tang Lian]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110642486095.html