A Mobile AD Hoc Network Relay Method based on OLSR Protocol

: Aiming at the reliability and performance problems of data transmission in the complex mobile AD hoc network environment, a relay method is designed and implemented in the unstable network environment with complex dynamics such as mobile, multi-hop and no center according to practical needs. By introducing a prior link-state routing protocol, OLSR is introduced. Using range value judgment, sliding window statistics and improved multi-point relay selection technology, it can effectively reduce the redundancy of relay node set, reduce the forwarding frequency of service data in the network, save the network overhead, and ensure the data transmission delay and quality in the large scale and dense mobile AD hoc network.

The rapid development of wireless communication technology has driven the development of various wireless transmission network technologies.Taking the robot performance formation in a scenic spot as an example, when multiple robots have varying distances and different topologies, they still lack the ability to communicate, coordinate and cooperate with each other, which greatly limits the real-time response, over-the-horizon information transmission and maneuverability of multiple robots in performance training.Therefore, it is necessary to enhance the communication ability and dynamic networking ability among the robots, and improve the real-time situational awareness of the performance scene.There are many routing protocols in dynamic AD hoc network communication, which can be divided into reactive routing protocols and proactive routing protocols according to different routing discovery strategies.The present study is more of OLSR protocol (Optimized Link State Routing, should first type of link-state routing protocol), the agreement is the core idea of MPR technique (multi-point relay), The traditional method of MPR set selection is to maintain the neighbor table and routing table of each terminal node after receiving data, and start MPR selection through routing table entries.

Research Significance
Reactive routing protocols need to query available routes when sending data.If there are no available routes, they need to wait for route discovery, resulting in transmission delay.When sending data, the proactive routing protocol can obtain the path information in time according to the routing table, so the delay is small.However, the algorithms for maintaining the routing information table, calculating the route and selecting the relay point set are redundant, which leads to high overhead.In real performance scenarios, dynamic AD hoc networks tend to be changeable and unstable.This leads to the instability of routing information and increases the cost of routing maintenance table.In addition, traditional OLSR protocol relies too much on nodes with high coverage, resulting in redundancy of MPR set, which affects the efficiency and quality of message forwarding at relay points.
At present, it is difficult to solve the problem of minimizing the set of relay points, and scholars at home and abroad have conducted many related studies on this problem.For example, genetic algorithm is used to solve the optimal solution of the set of relay points, the core of which is the iterative optimization of the population.When the network scale is small, this method often has local optimal solutions, and it is not suitable for practical application due to the complexity of the algorithm.The ant colony algorithm is also used to solve the optimal solution of the relay point set, which has the characteristics of random optimization and globalization.However, besides requiring a large amount of global information in the early stage, the algorithm also has slow efficiency in the early stage, which is not suitable for the topology structure that changes rapidly at any time.
In view of the unstable performance scene combined with the above routing protocol and the shortcomings of the existing data transmission processing logic, in this context, this paper takes OLSR, a routing protocol in mobile AD hoc networks that has been studied more frequently, as the object, analyzes the defects of the protocol, and proposes an automatic relay method combining ranging value judgment and sliding window statistics.The experimental results show that the proposed method reduces the redundancy of relay point set, reduces the maintenance cost of routing table in unstable network environment, and shorters the data transmission time, which provides a reference for the selection of relay nodes in AD hoc network in robot cooperation scenario.

Networking Scheme Design
The robot (node) performs the networking and time unification process according to the delivered parameters.After each node is connected to the network, the nodes periodically broadcast their heartbeat messages to confirm the link type of each other and establish their own neighbor table.Then, the multi-hop neighbor table and routing table of the node are established based on the neighbor table.In the process of data transmission, all data uses a unified packet format according to the protocol.The type of the message can be determined by judging the type field in the message.After receiving the Packet, the node determines the validity and type of the message.If the packet is a heartbeat message, the node analyzes it and obtains the ranging value.If the ranging value is within the valid range, the node determines the sliding window statistics.You can determine the status of a link by resolving the link type.If this node is not selected as an MPR node by another node, the improved relay point selection algorithm is triggered when the two-hop route is valid.If this node is selected as an MPR, the MPRSelector table of this node is maintained, the forwarding switch is turned on, and a TC message flag is sent.When the forwarding switch is turned on, when forwarding a service message, it is necessary to determine whether the node that sends the message is a member of the MPRSelector table of the node, and whether the TTL (number of hops allowed to be forwarded) value of the message is greater than 0. If all requirements are met, the message is forwarded; otherwise, the packet data must be discarded.A node selected as an MPR learns that it is selected as an MPR by receiving heartbeat messages for link determination, and then turns on the switch flag bit for forwarding and sending TC messages.At the same time, it establishes its own MPRSelector table and periodically broadcasts TC messages to help other nodes establish routes to this node.When there are multiple MPR nodes on the network, The relay routing table can be maintained by periodically broadcasting TC messages between MPR nodes, which ensures that each node in the AD hoc network has a route to all reachable destination nodes in the network.
The moving instability of each node will increase the cost of maintenance of neighbor table and routing table, and the idea of ranging value judgment and sliding window statistics is introduced.Specific ideas are as follows: Distance determination: After receiving the heartbeat message, the node analyzes the TOA value (TimeofArrive) of the heartbeat message and calculates the distance between the node and the sending heartbeat node.Based on the type of the node that sends the heartbeat message and the valid range of different devices, the out-of-line-of-sight node is not saved or updated in the neighbor table.In addition, the node is deleted from the local neighbor table and its routing information.
Sliding window statistical idea: After receiving the heartbeat message of a node, statistics on the number of heartbeat received by the node in the first 20 seconds are added to the non-over-the-horizon node in addition to normal data processing, and sliding statistics are carried out in each 20-second window.In this paper, the broadcast period of heartbeat is designed to be once every 2 seconds.Therefore, if the heartbeat count of a node within 20 seconds is less than two beats (the normal value is 10 heartbeats received within 20 seconds, that is, 10 beats), that is, the node receives less than or equal to eight heartbeat counts within 20 seconds, the node is deleted from the neighbor table and routing table maintained by the node.
The purpose of the above two methods is to transform the unstable neighbor node under boundary conditions into a nonneighbor node, thus triggering the improved relay point selection algorithm, and forwarding the service data to the node through the relay point, thus ensuring the quality of the service data.

Improved Relay Node Selection Algorithm Design
The MPR selection algorithm used by the standard OLSR protocol is a greedy selection algorithm, which can guarantee the success of selecting the MPR set by the selection node, but cannot guarantee the optimal MPR set.The reason is that standard algorithms prefer one-hop nodes with high coverage.In this paper, an improved MPR selection algorithm is proposed to avoid set redundancy.Its core idea is: if there is no node that must be selected among the neighbors of a node in the topology structure, the node with the least accessibility can be deleted to create the necessity of this choice, and then the MPR selection can be performed.
The specific process of the algorithm is as follows: Through experiments, the improved relay selection algorithm can effectively reduce the number of selected relay points but still ensure the normal communication of the network.The reduction of the number of relay points reduces the number of repeated forwarding times, thus reducing the network cost.

Comparative Experimental Verification
In order to verify the feasibility of the method proposed in this paper, the improved algorithm and the standard algorithm were compared and verified by experiment.The experimental scene was set up as shown in Figure 1.
The scenario assumed in this paper is data transmission between 13 robots, and the forwarding intention of each node is Default.At present, these robots have completed the network access process under the mobile AD hoc network.In order to ensure the efficient communication of information among robots, only some nodes need to be selected as relay points to forward service data.This object is set to number 3. The specific steps are as follows: First, empty the locally maintained MPR set; Secondly, because the forwarding intention of each node is Default, there is no node whose forwarding intention is Always in the one-hop neighbor table.Therefore, the node is skipped to the next step;   Fourth, according to step 4) of the algorithm, since there is the only neighbor node that reaches the two-hop neighbor node, that is, No. 4 is the only node that reaches the two-hop neighbor node 9, node 4 is selected as MPR.
Fifth, delete the two-hop neighbor nodes 9 and 10 covered by the one-hop neighbor node 4 from the N2 table.In this case, there are no nodes in the topology matching step 4).Enter Step 5.In this case, node 2 is the least connected among the remaining one-hop neighbor nodes.Therefore, node 2 is deleted.In this case, node 7 becomes the only node that reaches node 1.Therefore, node 7 is selected as MPR, and the two-hop neighbor nodes 1 and 11 covered by node 7 are removed.
Sixth, enter the algorithm step 5 again), at this time, among the remaining one-hop neighbor nodes, nodes 5 and 8 have the same minimum connection degree.If there are multiple nodes with the same minimum connection degree according to the algorithm, delete any node, assuming that node 8 is deleted, enter the algorithm step 4).
Seventh, at this time, node 6 becomes the only node that reaches two-hop node 13, which conforms to step 4 of the algorithm), then node 6 is selected as MPR, and node 13 covered by node 6 is removed from table N2.At this time, table N2 is empty, and the algorithm ends.The final MPR set is {4,6,7}.
In the standard MPR selection algorithm, the final MPR set is {4,5,6,7}.In this algorithm, the final MPR set is {4,6,7}.In the hypothetical scenario, compared with the standard algorithm, the algorithm proposed in this paper reduces the size of the MPR set.In the case of more complex AD hoc topology, the algorithm has more obvious advantages.Meanwhile, the algorithm breaks the favor of the standard algorithm for high-coverage nodes by paying more attention to the uniqueness of the link reachable, thus effectively reducing the redundancy of the MPR set.The smaller the MPR set, the smaller the frequency of TC message forwarding, so this paper also effectively reduces the network overhead and guarantees the quality of data transmission.

Closing Remarks
For the robot wireless data transmission environment, in view of the complexity and variability of mobile AD hoc networks in real performance scenes, the ranging value judgment method and sliding window statistical idea are used to ensure the communication quality of each equipment in critical state, and reduce the maintenance cost of neighbor table and routing table caused by network instability.The improved algorithm for selecting the relay point set can effectively reduce the redundancy of the relay point set, which not only ensures the efficient arrival of service data in the whole network, but also reduces the frequency of intranetwork service message forwarding, improves the performance of the network and saves the network overhead.It provides guarantee for cooperative performance and information exchange of large and complex multi-robots, and has strong practical value.

Fig 1 .
Fig 1. Experimental comparison and verification diagram between the improved algorithm and the standard algorithm Third, the one-hop neighbortable and two-hop neighbor table of this node are: One hop neighbor table: Node 2, node 4, node 5, node 6, node 7, node 8 Two-hop neighbor table: Node 1, node 9, node 10, node 11, node 12, node 13 Calculate the depth D(y) of all nodes in a hop neighbor table: D(2): 1 D(4): 2 D(5): 3 D(6): 2 D(7): 2 D(8): 1Fourth, according to step 4) of the algorithm, since there is the only neighbor node that reaches the two-hop neighbor node, that is, No. 4 is the only node that reaches the two-hop neighbor node 9, node 4 is selected as MPR.Fifth, delete the two-hop neighbor nodes 9 and 10 covered by the one-hop neighbor node 4 from the N2 table.In this case, there are no nodes in the topology matching step 4).EnterStep 5.In this case, node 2 is the least connected among the remaining one-hop neighbor nodes.Therefore, node 2 is deleted.In this case, node 7 becomes the only node that reaches node 1.Therefore, node 7 is selected as MPR, and the two-hop neighbor nodes 1 and 11 covered by node 7 are removed.Sixth, enter the algorithm step 5 again), at this time, among the remaining one-hop neighbor nodes, nodes 5 and 8 have the same minimum connection degree.If there are multiple nodes with the same minimum connection degree according to the algorithm, delete any node, assuming that node 8 is deleted, enter the algorithm step 4).Seventh, at this time, node 6 becomes the only node that reaches two-hop node 13, which conforms to step 4 of the algorithm), then node 6 is selected as MPR, and node 13 covered by node 6 is removed from table N2.At this time, table N2 is empty, and the algorithm ends.The final MPR set is {4,6,7}.In the standard MPR selection algorithm, the final MPR set is {4,5,6,7}.In this algorithm, the final MPR set is {4,6,7}.In the hypothetical scenario, compared with the standard algorithm, the algorithm proposed in this paper reduces the size of the MPR set.In the case of more complex AD hoc topology, the algorithm has more obvious advantages.Meanwhile, the algorithm breaks the favor of the standard algorithm for high-coverage nodes by paying more attention to the uniqueness of the link reachable, thus effectively 1) Clear the locally maintained MPR set; 2) Select the node whose forwarding intention is Always from the one-hop neighbor table of the local node and add the node to the MPR set; 3) Maintain the local one-hop neighbor table and the twohop neighbor table of the local node by processing heartbeat messages, and calculate the depth of all nodes in the one-hop neighbor table.(Depth of the one-hop neighbor node y (y is a node in the one-hop neighbor table), that is, the number of neighbors of y except all nodes in the one-hop neighbor table and the compute node itself.);4) If there is a unique neighbor node that reaches a two-hop node, the node is added to the MPR set, and the nodes in the two-hop neighbor table that can be overwritten by the MPR set are deleted; 5) Traverse the two-hop neighbor table.If the two-hop neighbor table is not empty, perform the following steps: a) Calculate the connectivity of all nodes in the one-hop neighbor table (that is, the number of neighbors of nodes in the one-hop neighbor table); b) Select the node with the lowest connectivity.If multiple nodes exist, delete any node.If only one node exists, delete it.
table and two-hop neighbor table of this node are: One hop neighbor table: Node 2, node 4, node 5, node 6, node 7, node 8 Two-hop neighbor table: Node 1, node 9, node 10, node 11, node 12, node 13 Calculate the depth D(y) of all nodes in a hop neighbor table: D