Abstract
Introduction
Wireless sensor network (WSN) refers to a group of spatially dispersed and dedicated sensors for monitoring and recording the physical conditions of the environment and organizing the collected data at a central location. Meanwhile, WSN can also be used for target object tracking and identification due to its sensory capabilities in spatially dispersed region. With the increase of requirements on various new applications, such as the new requirement proposed by multimedia information acquisition and high-speed information transmission to transmission technology during target tracking, the traditional methods fail to meet performance requirements, and therefore, it is necessary to study new routing protocols so as to meet the application needs.
In recent years, many scholars study object identification algorithm and positioning algorithm. Vasuhi and Vaidehi
1
propose the WSN target tracking method based on Interactive Multiple Model, due to the fact that traditional methods fail to accurately identify targets. Lu et al.
2
consider the constraint of electric energy and transmission in WSN; they study collaborative target tracking triggered by event-based information filtering. Oracevic et al.
3
propose a safe and reliable target tracking protocol and consider safety when targets are tracked. Su et al.
4
put forward estimation and control strategies of bi-target tracking mobile sensor network. Shi et al.
5
propose a probability-based dynamic but non-complete
Routing has always been a hotspot in WSN. Considering the importance of energy to WSNs, Rahman et al. 11 study various energy efficient routing (EER) protocols, classify them, and discuss their advantages and disadvantages. Keskin et al. 12 provide a mathematical model that integrates WSN design decisions, activity schedules, data routing, and trajectory of mobile receiver at the sensor location, and then present two heuristic methods for solving the model. Anitha and Kamalakkannan 13 propose an improved enhanced cluster based multipath routing protocol in mobile wireless sensor network (ECBR-MWSN) algorithm based on low-energy adaptive clustering. The protocol uses parameters such as maximum dump energy, minimum mobility, and the minimum distance from the base station, and selects new clusters by periodically running algorithms proposed so as to prolong the life of sensor network through balancing node energy consumption. Based on the analysis of low energy adaptive clustering hierarchy (LEACH) protocol characteristics, Zhang et al. 14 propose WSN based on simulated annealing (SA) and genetic algorithm (GA) to balance clustering routing protocol; meanwhile, they prolong lifetime of WSN by switching cluster head balance load. Han et al. 15 propose a general self-organizing energy balance routing protocol based on tree, which constructs a routing tree, reports the information about root node by broadcasting, and allows each node and its neighbors’ information to select node relation, thus transmitting information. Besides, Karaboga et al. 16 propose a clustering mechanism based on artificial bee colony algorithm, which applies the intelligent foraging behavior of simulated bee colony into clustering technology so as to prolong the network lifetime. The energy constraint of the network is mainly considered in above routing protocols, and they design different data transmission models from the perspective of energy consumption so as to help the network realize data exchange in different modes, but they fail to study transmission of target tracking applications, and corresponding routing protocols are lacked.
The proposal of software-defined network (SDN) provides a new research perspective for the application of WSN as well as a new framework for resource scheduling of WSN. Considering characteristics like invariance and difficult management of WSN policy, Luo et al. 17 put forward a software-defined WSN architecture, which solves key technologies of core components. Besides proposing solutions for SDN-based WSN, Galluccio et al. 18 also carefully describe implementation details of software defined networking for wireless sensor networks (SDN-WISE), which is outstanding in making network programming flexible and concise. Jagadeesan and Krishnamachari 19 summarize the application of wireless network SDN technology, introduce relevant technologies, and also outline its development trend. Analyzing the software-defined sensor networks combining WSNs and SDN, Zeng et al. 20 introduce the concept of software-defined sensor networks (SDSNs) and summarize the related innovations, which provide technical support for SDSNs implementation. In view of the issues faced by wireless network virtualization like signals control, Liang and Yu 21 propose issues and challenges in implementing wireless network virtualization. Moreover, Jacobsson and Orfanidis 22 also propose a software-defined WSN architecture and discuss how SDN can be applied in wide WSN to deploy hardware and custom software so as to meet the needs of specific deployments and applications. Wang et al. 23 propose a software-defined algorithm and manage network energy through the algorithm executed in controller. Proposing an SDN concept with a structured and hierarchical management of WSN, Olivier et al. 24 aim at addressing some inherent problems in WSN management through SDN’s structured and hierarchical ways. SDN opens new ways for WSN to deploy resources. At this stage, the application of SDN in WSN is still under development, and is mainly limited to aspects like architecture, basic protocols, and deployment applications, and fails to involve in specific issues such as target tracking; therefore, there is a large space for the research of this issue.
According to research and analysis above, this article proposes a Hierarchical Adaptive Routing algorithm based on SDN (HAR-SDN), which uses multi-objective scheduling strategies combining energy and throughput after considering factors in transmission speed and energy consumption. This article designs resource scheduling scheme on the basis of SDN framework with two results.
It carries out decision making, scheduling, and deployment through SDN controller.
It adopts hierarchical scheduling method combining local path planning with global scheduling to route detecting information of the target.
Description of routing selection
Combination of SDN and WSN
WSN achieves connectivity by means of self-organizing through sensor nodes; although this network is widely applied, there are many shortcomings in structural features, for example, scheduling strategy of sensor nodes cannot be reconfigured and uniform management is lacked in self-organizing method. With the introduction of SDN framework, great changes occur to resource scheduling methods. By separating the controlling plane and data plane, SDN realizes decoupling of the program management function and the data scheduling function, shields the differences of devices, and achieves reconstruction of hardware resource; besides, it completes virtual mapping of the physical resources through SDN controller and the OpenFlow protocol. Recently, OpenFlow has been applied in WSN. 17 Related technologies20,25 improve structure of OpenFlow and design corresponding matching rules. As shown in Figure 1, the controller, according to control strategies, will pass parameters to WSN through the OpenFlow extension protocol to reconfigure resources; at the same time, the state information in network will be sent to the controller for decision making. In the process of network resource management, the sensor is only responsible for the perception and transmission of information, while the controller is responsible for the decision making and scheduling.

Software-defined wireless sensor networks.
High requirements are proposed by routing of moving target information to WSN: first, it needs to provide higher transmission rate to ensure real-time and efficient transmission of information; second, energy consumption factors must be taken into account by the network; and finally, corresponding scheduling strategies are needed to track mobile target. Considering above factors, we design an SDN-based hierarchical scheduling algorithm by viewing throughput and energy as indicators.
Hierarchical scheduling algorithm
Hierarchical routing includes local path planning and global path optimization. We can obtain optimal routing of nodes among adjacent clusters through local path planning, and the purpose of the global path optimization is to construct a full path for information transmission from target to sink node by selecting optimal routing among adjacent clusters. The description of hierarchical routing is as shown in Figure 2. In the process of target tracking, all sensors are divided into clusters; the line between adjacent clusters represents the optimal routing from the current node to adjacent cluster. Based on the routing, the full path can be achieved to transmit the target information. In terms of scheduling indicators, energy and throughput are taken into account, and energy computing aims at extending lifetime; Figure 3 can be referred to for selection of high-speed transmission node. Due to physical characteristics of wireless transmission, different distances of communication are corresponding to different transmission rates, and therefore, neighbor node of communication distance with more throughput can be used to transmit data for the purpose of improving the transmission speed of links.

Schematic diagram of hierarchy routing.

Schematic diagram of high-speed node selection.
SDN controller is responsible for running and scheduling hierarchical scheduling algorithm, which reduces the operational load of WSN itself. Besides, the global path optimization will adjust local nodes timely by means of on-demand service, reducing the running cost of routing algorithm.
Target tracking model
Particle filter is an algorithm developed based on Kalman filter, which is mainly used for target tracking and has been applied in various fields, including WSNs.26,27
Like Kalman filter, particle filter 28 is also based on system state equation and system observation equation to estimate the system. As shown in formulas (1) and (2)
The state of target at time
In particle filter, the sampling information of the sensors correspond to particles, so the set of particles at time
where
A posterior probability density
In fact, the target tracking is the estimation of the target state, that is, the prior knowledge is used to predict the future state through the system state equation, and the system is corrected by updating the posterior probability density in the process.
Assuming that the set of particles at time
Initialization of particles:
For
Importance sampling: For
Resampling: The effective number of particles
Put the particle into the state transition function to obtain the new estimated state. As shown in formula (5)
The prediction of the target movement can not only realize continuous tracking of the target but also provide the scheduling goal for global routing so as to establish the corresponding routing.
SDN-based hierarchical routing algorithm of target tracking
In the process of target tracking, according to different application requirements, we need to obtain different kinds of information of the target in real time, including position, velocity, size, sound and image information, and so on. Meanwhile, we also need to consider the energy consumption of the sensor network itself. Therefore, we design a hierarchical routing algorithm for both throughput and network energy consumption to ensure the efficient and real-time transmission of the information.
First, definition of throughput: In terms of energy consumption and transmission rate, many studies29,30 show that routing between nearest nodes is not optimal by means of multi-hop manner, and therefore, it is necessary to select proper distance between nodes for transmission. For more details, refer to literature. 31
Assuming that the transmission distance between node 0 and node
According to loss model of power law path, formula (6) can be expressed as below
The transmission rate is represented as
The formula (10) can be obtained after arrangement
Through derivation of above formula, we can get the optimal transmission distance
Second, definition of lifetime: Lifetime is an important index to evaluate energy consumption of wireless sensor. Formula (12) refers to energy consumption when nodes send and receive
wherein
Thus, we can get time-to-live of node
wherein
Local path planning
Objective function of local optimization
Because WSN adopts multi-hop routing method, it is necessary to construct local routing (LR) between adjacent clusters for the purpose of effectively transmitting information among multiple clusters. The starting node of local routing is node
In order to meet the transmission requirements, this article defines a multi-objective function with purpose of seeking for greater throughput and longer network lifetime. Moreover, the article carries out normalization processing by adopting
Local path planning aim to maximize minimum transmission rate between nodes and lifetime of nodes with the least lifetime. Therefore, the objective function is defined as shown in formula (15)
where
Selection of optimal path among clusters
In recent years, neural networks are widely applied in WSN because of similarity of node perception in neural networks and rules-based information transmission methods with WSNs as well as strong parallel computing and potential hardware implementation capabilities.32,33 The Hopfield 34 network is a feedback system composed of non-linear components, and it is famous for successfully solving Traveling Salesman Problem; Continuous Hopfield Neural Network (CHNN) is designed according to circuit model structure, as shown in Figure 4.

CHNN circuit model.
CHNN is continuous in time, which means neurons in the network are working in a synchronous manner. As for a neuron, that is neuron
According to Kirchhoff laws,
35
the node equation corresponding to the
Stability is an important indicator for Hopfield to evaluate state of network operation, and therefore, the Lyapunov function is introduced in the Hopfield network for analysis, which is called the energy function
The next step is to convert the local routing into a form that the Hopfield can handle, as shown in Figure 5.

Node selection of local routing.
In this figure,
Then, the constraints can be integrated to construct energy function.
Constraint of starting node: The first line is the starting node, therefore
Constraint of end node: The last column is the ending node, therefore
Constraint of relay node: The relay node not only receives data but also sends data, and the constraint condition can be expressed in formula (20)
Formula (21) can be obtained through local optimization objective function
The energy function is as shown in formula (22)
wherein
Complexity analysis
The number of neuron is
Global path optimization
The introduction of SDN makes scheduling management of WSN more flexible in ways. The mapping relationship between strategies and resources through control plane and the data plane allows resources’ allocation and implementation from global scheduling to the sensor node, thus realizing global path planning of WSN. Based on the local routing, global routing carries out end-to-end routing optimization by means of on-demand service. The coarse-grained scheduling is adopted in global routing, which can not only improve scheduling efficiency but also avoid unnecessary resources waste.
Hierarchical algorithm of sub-path
What the global path constructs is a sub-path sequence, and therefore it is necessary to be clear about relationships among sub-paths. The routing process involves in several clusters; it shows from definition of local path planning that there is a correspondence between adjacent clusters, which means there is hierarchical relationship in all sub-paths from target to sink nodes; therefore, it is necessary to classify sub-paths.
Step 5. We can obtain
Global optimization objective function
All local paths are divided into
wherein
The objective function is characterized by the following points:
Quantization of multiple indexes. The global routing scheduling adopts the same indexes as the local routing, and the method of normalization is used to quantify the multi-objective. Moreover, the multi-objective function is transformed into single objective function by linear integration, avoiding the problem of single objective optimization for multi-objective.
The performance of the algorithm is adjusted by weight. The normalized function only needs adjusting the weight for objective according to experimental effect and experience, which improves the optimization efficiency of the algorithm.
Coarse-grained scheduling. The scheduling unit changes from each node to a local path, which can further improve the scheduling efficiency for the global path.
Convenient comparison with similar algorithms. At present, most of the algorithms in this field are based on single objective. The function forms defined in this article can be compared with similar algorithms more intuitively and effectively.
Solutions to global optimal path
The main characteristic of global routing is to build MCKP model, and MCKP belongs to non-deterministic polynomial complete (NP-C) problem; therefore, how to choose an appropriate method to solve the problem is the key issue. In general, classical algorithms solving knapsack problem are GA, SA, binary particle swarm optimization (BPSO), and so on. Among them, GA adopts natural genetic mechanism and has strong global searching capability. However, the algorithm tends to appear premature phenomenon in the process of searching; SA adopts the temperature change model of thermodynamic system and avoids falling into the local optimal solution by introducing Metropolis rules in iterative process. But the convergence speed is getting slower when the problem size is getting bigger. The particle swarm optimization (PSO), which appears later than the first two, has been a popular evolutionary algorithm for many years. Different from other evolutionary algorithms, PSO does not use evolutionary operators for individuals. Instead, each individual is viewed as a particle in
BHTPSO improves the convergence speed of BPSO and searching method of global optimal solution, which improves the efficiency of solution. There is a correlation between BHTPSO and hybrid topology particle swarm optimization (HTPSO), and each particle in the HTPSO updates particle velocity by using the optimal position
The next position of each particle can be calculated according to current position
In formula (25),
wherein
The best position for each particle in HTPSO can be calculated through its best individual experience
In BHTPSO, the velocity of a particle can be calculated from formula (30), and the velocity is related to varied probability between 0 and 1. The “0” value of velocity indicates that the particle position is good and does not change; the probability function is shown in Figure 6

Probability function.
In BHTPSO, if there is no change for optimal position in many iterations found by multi-particle, we can add a value to formula (30) to accelerate convergence rate and jump out of the local optimum, and then the value can be defined in formula (31)
Therefore, the next position of each particle can be calculated by formula (32). The global optimization path can be obtained through calculation above
Complexity analysis
Complexity of BHTPSO, including one is problem size, which depends on the number of particles
Description of process of HAR-SDN
The process of HAR-SDN can be described, as shown in Figure 7.

Description of HAR-SDN.
Experiments and analysis
We design a test bed in view of structural characteristics of the model, and the schematic diagram shown in Figure 8 is composed of two computers, program development board and a number of sensors. The development board is the dedicated network development platform for the wireless sensor, with Processor cc2480, as shown in Figure 9. Moreover, development tool IAR Embedded Workbench is also adopted; each development board can be matched with several wireless sensors, as shown in Figure 10. Computer 1 runs SDN controller with CPU Intel i7, 8G DDR4 memory, Windows 7, and 64 bit, and controller is developed by Java program and using expended OpenFlow protocol; network topology information is stored in a JGraphT’s Graph object. Computer 2 runs the OMNeT++ simulator. Because the number of sensors is limited in physical testing, this article adopts the way combining physical testing and simulation experiments to test performance of algorithms proposed under different scenarios. In this experiment, we used up to 500 sensor nodes for testing. If we want to test a large-scale sensor network, such as thousands of nodes, method of multi-controller cooperation 37 can be adopted to improve network scalability and ensure the scheduling performance of the algorithm.

Schematic diagram of test bed.

WSN development board.

Wireless sensor.
This article compares two routing algorithms LEACH and SAR (Sequential Assignment Routing) with HAR-SDN. LEACH is responsible for prolonging lifetime of network through scheduling of the cluster head; SAR is the first routing protocol with Quality of Service (QoS) awareness.
Physical test
Two scenarios are adopted in physical test and the parameters are shown in Table 1. Due to the limitation of the number of sensors, meanwhile, in order to ensure the validity of local routing as well as test the effect of global routing under different number of clusters, we set three sensor nodes for each cluster, and the number of clusters changes with the total number of sensors. Sensor nodes are deployed in a preset manner, and test indexes include network lifetime and throughput.
Lifetime
Parameters of physical test.
WSN: wireless sensor network.
Lifetime is an important index to assess network energy consumption. Figures 11 and 12 show the proportions of ineffective nodes accounted for in total nodes due to energy exhaustion in the case of 9 nodes and 30 nodes, respectively. In the case of nine nodes, SAR has the shortest lifetime, followed by HAR-SDN and LEACH (the longest one). Due to the small number of sensor nodes, there is no significant difference in transmission path of all algorithms, and the main difference comes from the complexity of algorithm operation. LEACH realizes load sharing by rotation of cluster head. SAR is an algorithm with high complexity; all nodes need to exchange information so as to construct a tree rooted at nodes within communication radius of sink, and at the same time, they calculate energy consumption and QoS of nodes along the route. In terms of HAR-SDN, the calculation cost is borne by SDN controller, and the network needs to upload the operation information and distribute scheduling strategies ultimately.

Lifetime results of physical test in nine nodes scenario.

Lifetime results of physical test in 30 nodes scenario.
In 30 nodes scenario, due to simple, LEACH is not easy to get more nodes to balance energy consumption through the scheduling of cluster heads, therefore, compared with other two algorithms, the lifetime of LEACH is the shortest. SAR is a multi-path routing protocol, and despite of its higher complexity than others, its lifetime is longer than LEACH because the nodes are selected for energy in routing process and optimize energy of nodes around the sink. The cost of HAR-SDN mainly consists of communication and calculation. The computational cost of the algorithm is reduced thanks to the adoption of SDN controller; compared with SAR, there is no significant increase of communication cost of node. For SAR, which is designed according to fixed routing, it is difficult to adapt to the requirements of changing routing, by contrast, the HAR-SDN can routing on demand.
2. Throughput
Throughput is an index to evaluate network communication performance. As shown in Figure 13, when test rate is 50 kb/s, there are so many transmission paths for selection in the case of fewer transmission nodes, and therefore, the throughput is not significantly differentiated. As shown in Figure 14, with increase in nodes, the throughput is low because LEACH fails to consider other factors other than energy consumption. The SAR satisfies QoS by using priority of data, but improvement to throughput is limited. Considering communication characteristics of WSN, HAR-SDN selects transmission nodes with high throughput to transmit data so as to construct high-speed transmission route. When the number of network nodes is large, the performance is more obvious. In a word, the throughput of HAR-SDN algorithm in three algorithms is the highest.

Throughput in nine nodes scenario.

Throughput in 30 nodes scenario.
Simulation test
In order to further verify performance of the algorithm, we also conduct a simulation experiment on the basis of physical test. The experimental parameters are shown in Table 2. Considering the distribution of sensor nodes, we distribute sensor nodes to each cluster as evenly as possible, so that the number of sensors in each cluster is as close as possible. Meanwhile, the specific distribution ratio of allocation scheme is as shown in formula (33)
Parameters of simulation test.
WSN: wireless sensor network.
where
Lifetime
Respectively, we have tested 200 and 500 node scenarios, as shown in Figures 15 and 16, and wherein the proportion of ineffective nodes is limited to 35%. Experimental results show that with increase of nodes, the lifetime of various algorithms is prolonged. In contrast, the lifetime of LEACH is the shortest, followed by SAR and HAR-SDN (the longest one), which is consistent with the results of physical test. Due to the design of the algorithm, it is difficult for LEACH to schedule more nodes to participate in routing process, consuming a plenty of energy for partial nodes, and therefore, the lifetime for network is short. SAR considers both QoS and energy, and carries out multi-path routing. The initial cost for algorithm is high, but the cost shall be lower as for fixed routing network; besides, it is hard to guarantee cost for ever-changing routing. The experimental results show that HAR-SDN is superior to SAR, which can be explained by following reasons: (1) Initialization: initialization stage of algorithm plans all local paths without frequent modifying routing; (2) On-demand routing: global optimization, based on local paths, makes decisions according to target location, reducing the cost of route planning; (3) Controller is responsible for calculation: the controller components are responsible for main computing load, reducing the cost of WSN, and all nodes only need to transmit basic state information; and (4) Routing scheduling algorithm involves in calculation by viewing node energy as an important indicator.
2. Throughput

Lifetime simulation for 200 nodes.

Lifetime simulation for 500 nodes.
As shown in Figures 17 and 18, the test results in three algorithms are consistent with that of physical test. LEACH fails to consider the transmission rate factor, so its throughput is the lowest. SAR adopts multi-route QoS strategy but cannot guarantee the high-speed data transmission during target tracking. The throughput of HAR-SDN is the largest in three algorithms. Adopting the ways combining local path and global optimization and viewing throughput and energy consumption as scheduling objectives, HAR-SDN covers all optimal paths among clusters through local optimization path, and global routing is achieved orienting to the target, improving route efficiency and flexibility. The performance of HAR-SDN is obvious with the increase of network node density.

Throughput simulation for 200 nodes.

Throughput simulation for 500 nodes.
Conclusion
With the increase of application demand of WSN, the acquisition of multimedia information and real-time information transmission in the process of target tracking requires the network to provide higher throughput, so this article proposes a hierarchical multi-objective adaptive routing algorithm based on SDN. The algorithm uses dual index of energy and throughput to achieve higher transmission rate under effective energy consumption, and adopts a way of combining the local routing and global routing under SDN. Based on the optimal path set between clusters, the global route can be constructed on-demand according to the movement of target. The test bed has two parts: physical test and simulation test. In physical test, the network lifetime and the throughput of HAR-SDN are better than that of LEACH and SAR. The results of the simulation test are consistent with the physical test and achieve the expected design performance. In future work, a deep learning approach will be used to provide WSN with more intelligent self-configuration capabilities to cope with changes in the environment.
