#### Abstract

In this paper, the theoretical analysis showed that the length of the route and the interference of links were the main factors that influence the throughput of the network. Then, a dynamic channel allocation algorithm base on the length of routes and the interference of links was proposed to enhance the system throughput. In the proposed algorithm, ant colony algorithm was used to collect the information of network, such as the length of routes and the interference of links. Then, the priority of link access channel was decided according to the collected information. The simulation results showed that the proposed algorithm could improve the whole network throughput obviously.

#### 1. Introduction

The rest of the paper was organized as follows. Section 2 described the ant colony algorithm. Section 3 described the mathematical derivation of the algorithm. Section 4 described the channel allocation algorithm. Section 5 showed the simulation results. Finally, in Section 6, a simple conclusion was given.

#### 2. Ant Colony Intelligence Algorithm

Ant colony intelligence algorithm was developed by Dr. Eberhart and Kennedy. In this paper, the ant colony intelligence algorithm was modified to collect the information of the whole networks. The core idea of the ant colony intelligence algorithm was that the ant packet migrated through all the nodes in the networks as soon as possible and collect the information of the network. According to the information of the ant packet collected, some wise decisions were made to improve the performance of the network.

The ant packets were generated by the nodes in the network with a node selection algorithm. Each node generated a random number following uniform distribution between the interval , and denoted the node ID. That was . If was smaller than a threshold number , this node would generate an ant packet. must be within the interval and could be used to control the number of ant packets in the networks. The larger of , the more of ant packets would be generated in the networks. After generating the ant packets, the packets would be forwarded in the networks as follows.

An ant packet started from node and was passed to node ’s neighbors. The ant packet was passed to the neighbor nodes which had been passed by ant packets with least times. If more than one neighbor node had the same least passing times, a neighbor node was randomly selected to passing the ant packet. According to the above rules, when the ant packets were transmitted in the network, they collected the information of the nodes, for example, service volume information, the interference links, and the hops of the route passed the link and some other important information. If two ant packets passed the same nodes, they could exchange the collected information through the buffer on the nodes. This process helped the ant packet passed nodes to know the whole network’s information which was employed to make channel allocation.

#### 3. Mathematical Analysis

Supposing every link had enough services at time , the number of available channels was not enough, so if link did not occupy the idle channel, the channel would be occupied by other links in (hypothesis ①).

So

Supposing each channel transmits one packet in per time unit. Then, the networks’ throughput could also be denoted with the sum of the number of the occupied channels.

According to hypothesis ①, could be denoted with ,

According to equations (2) and (3),

Let

Then

was the total number of channels occupied by all the interference links of each link. Let the number of interference links of link be . So would appear times. Then could be reorganized as follows.

Supposing was arranged in the order from small to large (hypothesis ②).

Extracting a from , then

Since

Then equation (8) was simplified as

Extracting

Then equation (11) makes further simplifying

Then according to equations (6) and (12), the following formula could be gotten.

Supposing the service would be successfully transmitted to the terminal (hypothesis ③).

Then

According to equations (13) and (14), the following formula could be gotten.

Links forward the services of the same route are equal, that was

According to equations (15) and (16), the following formula could be gotten.

Since the number of element in the set was . So equation (17) was simplified as follows.

The above formula could be further simplified

According to hypothesis ③, the following formula could be gotten.

According to equations (19) and (20), the following formula could be gotten.

According to equation (21), the expectations of the throughput could be expression as follows.

Since the nodes were uniformly distributed in the networks, the following formula would get:

Since indicates the number of hops of route .

Then, according to equations (22) and (24), the following formula could be gotten.

Since , the following formula could be gotten from equation (21).

Supposing the links and it interference links access channel with equal probability (hypothesis ④).

Then link access channel probability could be denoted as follows.

According to equation (27), the route success transmission service probability could be denoted as follows.

According to equations (23) and (28), the expectations of the could be expressed as follows.

Since the number of element in the set was . So equation (29) was simplified as follows.

According to equation (30), the conclusion could be drawn that the shorter the route, the higher the service success transmission probability.

indicated the mean number of hops that decided link ’s priority, indicated the mean number of interference links of the routes passing link . So if the number of elements in the set was one, then, the following formula could be gotten.

Supposing the link was occupied by multiple routes, and represented the number of elements in the set . So, the following formula could be gotten.

When the network topology was fixed, , , , , and were constant. From equation (25), conclusions could be drawn that the routes with smaller hops had a higher influence on whole network’s throughput. From equation (26), the conclusion could be drawn that the routes with less interference links had a higher influence on the whole network’s throughput. Since the shorter the route, the higher the service success transmission probability, the channel allocation algorithm should choose the links with shorter route access channel with higher priority, and let the links in route with lower interference access channel with larger probability, which was a benefit to improve the throughput of network.

#### 4. The Principle of Channel Allocation

##### 4.1. The Principle of Channel Allocation

Considered the factors that the channel assigned with greedy algorithm which would cause the congestion in the network and increase the end-to-end delay, the routes with less interference links had a higher influence on the whole network’s throughput, and the following algorithm was proposed to solve the problem. and denoted the maximum and the minimum value of the , respectively, and and indicated the maximum and the minimum hops of the routes in the networks, respectively. indicated the set of the routes with hop , and indicated the element number of . indicated the idle channels for link . Then defined two interference threshold , if the route with hops was not existence then replace it with hops , in the same way, until the hops was and , if the route with hops was nonexistence then replace it with hops , in the same way, until the hops was . A random value for each idle channel of link was generated following the uniform distribution from 0 to 1 to determine whether link access channel j. and were two channel access threshold values. and were gotten with the following formulas.

indicated the number of available channels that could be occupied by link , and was a indicative function of the set . So how many channels could be occupied by link was shown as follows.

##### 4.2. The Process of Channel Allocation

At the beginning of the simulation, nodes in the network randomly generated a certain number of ant packets. The ant packets rambled in the network and collected information of the number of interference links, number of routes’ hops, and the amount of service. Then, the nodes who got the information determined the priority of the link according to the collected information. The priority was updated upon the information updating by the ant packets. First, the priority values of the links were nearly zeros, links occupied idle channels if available, and there was no regulation for channel occupancy. Then, after a period of time, the link that had been passed by the ant packets would have updated priority values. Each link occupied channels according to the steps shown in Figure 1.

#### 5. Result Analysis

##### 5.1. Simulation Parameter

The important simulation parameters were shown in Table 1.

In the practical WMNs, the interference radius is usually longer than the communication radius. For simplicity in the simulation, supposed the interference radius is equal to the communication radius in the simulation. network_range was 500, node_coverage was 50, node_number was 100, and node_position was generated by function rand, multiplied by network_range, obtaining the horizontal and vertical coordinates. Calculating the Euclidean distance, , comparing with node_coverage, obtaining the neighbor relationship of nodes. According to the neighbor relationship of nodes, the links and the interference relationship among links were built. Randomly choose nodes as the peers of P2P services, servers, and clients of FTP services. Then, routes were established with the shortest path routing algorithm. In the simulation, the P2P services were transmitted at constant rate, and the FTP services were transmitted based on TCP.

##### 5.2. Simulation Results

In order to validate the algorithm, we carried out simulation with Matlab. Randomly choose nodes as the peers of P2P services and FTP services. Then, routes were established with the shortest path routing algorithm. In the first scenario, the P2P services were transmitted at constant rate, the FTP services were transmitted based on TCP, and the pairs of nodes with P2P service were increased. As shown in Figure 2, the throughput of the proposed algorithm was higher than the CLCA algorithm. As Figure 3 shows the packet lost ratio of the proposed algorithm was lower than the CLCA algorithm. Since, the short routes had a much higher packet successful transmit probability than the long routes, and the links with low interference accessed channel with high probability which was a benefit to reduce the interference of the network. Therefore, the proposed algorithm decreased interference and inclined the end-to-end delay.

In the second scenario, the nodes as the peers of P2P services are constant, the FTP services were transmitted based on TCP, and the P2P packet generating rate was 0.2 packet per simulation time and was gradually increased later. As the simulation results in Figure 4 shows that the throughput of the two algorithms increases rapidly with the packet generating rate, and the proposed algorithm increased faster than the CLCA algorithm. However, the throughput tended to decrease after reaching the peak point with the increase of the packet generating rate. Since, with the increase packet generating rate the congestion of the network is much more serious, which increase the end-to-end delay and much more packet data would be a loss. As shown in Figure 5, the packet loss ratio was increased with the packet generating rate, and the packet loss ratio of the proposed algorithm was lower than the cross-layer channel allocation algorithm.

#### 6. Conclusion

In this paper, a dynamic channel allocation algorithm base on the length of routes and the interference of the links was proposed to reduce the effects of interference. In the algorithm, the links with the shorter route and less interference links had a higher priority to access channels, which was a benefit to reduce the packet loss ratio caused by end-to-end delay. The links with less interference links accessing channel with the higher probability, which was helpful to reduce the effects of interference and improved the throughput of the network. According to the mathematical analysis and the simulated results, the performance of the proposed algorithm was better than the CLCA algorithm.

With the high-speed development of the wireless communication, the future wireless networks would be layered and heterogeneous. How to allocation the channel in layered heterogeneous network would be investigated further.

#### Data Availability

The data that support the findings of this study are available from the corresponding author upon reasonable request.

#### Conflicts of Interest

The authors declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

#### Acknowledgments

This paper was support by the National Key Research and Development Program (Program ID: 2020YFC0811004).