Abstract
Software defined wireless networks (SDWNs) present an innovative framework for virtualized network control and flexible architecture design of wireless sensor networks (WSNs). However, the decoupled control and data planes and the logically centralized control in SDWNs may cause high energy consumption and resource waste during system operation, hindering their application in WSNs. In this paper, we propose a software defined WSN (SDWSN) prototype to improve the energy efficiency and adaptability of WSNs for environmental monitoring applications, taking into account the constraints of WSNs in terms of energy, radio resources, and computational capabilities, and the value redundancy and distributed nature of data flows in periodic transmissions for monitoring applications. Particularly, we design a reinforcement learning based mechanism to perform value-redundancy filtering and load-balancing routing according to the values and distribution of data flows, respectively, in order to improve the energy efficiency and self-adaptability to environmental changes for WSNs. The optimal matching rules in flow table are designed to curb the control signaling overhead and balance the distribution of data flows for achieving in-network fusion in data plane with guaranteed quality of service (QoS). Experiment results show that the proposed SDWSN prototype can effectively improve the energy efficiency and self-adaptability of environmental monitoring WSNs with QoS.
1. Introduction
Wireless sensor networks (WSNs) are application-oriented information-centric networks, which are characterized by limited energy and constrained radio resources [1]. One typical application of WSNs is environmental monitoring, where data-gathering based environmental monitoring tasks are executed by nodes with heterogeneous sensing and programmable functions. Each node in WSNs could be equipped with multiple sensors for different sensing purposes, for example, temperature, humidity, light, and vibration. In WSNs, the time-varying wireless communication environment and random interference may lead to unreliable communication links, while switching on/off of network nodes due to energy constraints can cause unpredictable topology changes, making it difficult to guarantee reliable and adaptive data-gathering for monitoring applications.
Software defined wireless networks (SDWNs) enable programmable control in network and virtualization of network equipment by decoupling control plane and data plane [2]. The logic centralization and simplified abstraction of control plane can improve the scalability and multitasking efficiency [3]. The combination of SDWNs based architecture and WSNs, that is, software defined wireless sensor network (SDWSN), would bring the following advantages:
SDWNs based abstraction of network control plane can effectively reduce the cost of WSN expansion and operation. SDWNs based virtualization of network equipment and programmable control of common hardware and software enabled flexible task configuration, high resource utilization, and simplified network management in WSNs.
However, to realize the above advantages of SDWSN for monitoring applications is not without difficulties. The control-data decoupled structure of SDWNs relies on cross-plane control traffic, which may result in excessive communication overhead and transmission delay. In SDWSN, although different virtual networks can work together on top of the same physical infrastructure, the centralized control plane may lead to high energy costs due to information collection for reaching a global view, and the multiple virtual networks may compete for common physical network resources. If a large number of flows simultaneously request a switch to forward data, network congestion or even crash may occur. Furthermore, energy- and resource-constrained WSNs might not have the sufficient network resources to realize the dynamic resource allocation and QoS of SDWNs. Therefore, the energy and resource utilization of SDWSN need to be carefully designed for resource-constrained and application-oriented WSNs.
Most existing works on SDWSN focus on providing QoS guarantee or optimizing network management for monitoring applications. The software defined information centric network (SDN-IC) [4] floods the network with packets so as to leave reverse path information at routers, but that method will cause frequent duplication of packets and lead to huge communication loads, which increase not only end-to-end delay but also energy consumption. The resource allocation in a software-driven wide-area network (SWAN) was optimized by an agent-based traffic engineering scheme [5], which requires excessive information exchange between the controller and switches for tracking network topology and traffic distribution changes. With the increase of network density, the SWAN would be plagued by large overhead caused by collisions between candidate relays contending for media. The software defined vehicular ad hoc network (SDV) [6] uses network virtualization to allocate network traffic in a programmable fashion, where surveillance packets are delivered following a position-aided data-gathering mechanism with greedy perimeter stateless routing (GPRS) [7] in case of controller failure. However, the SDV controller needs to gather and maintain a large amount of information for transmission power control, which is not practical for large-scale monitoring WSNs. In [8], the energy consumption of a multitask SDWSN was minimized for monitoring applications with guaranteed quality-of-sensing by solving a mixed integer linear programming problem at a high computation complexity. In [9, 10], the load-balancing routing algorithms for WSNs construct an optimal routing tree by minimizing the total weight of routing paths, where the path weights are modeled as a function of energy consumption. However, none of these works has adequately considered the application-oriented features of flows and in-network data fusion in complex and dynamic monitoring environments for SDWSN, thereby significantly limiting their energy efficiency and environmental adaptability.
In this paper, we develop an energy-efficient cognitive SDWSN prototype for environmental monitoring application, where high computational complexity management of data fusion and data routing are centralized in control plane, while low computational complexity execution of algorithms is implemented in data plane. The cognitive mechanism based on reinforcement learning (RL) [11] is embedded in control plane for information processing, where the interactions (in terms of reward or punishment) between agents and the environment are utilized to enhance the intelligence in policy decision making and to improve the self-adaptability of the energy-saving mechanisms in dynamic environments. Particularly, we propose to mine the application-specific value redundancy of flows in periodic transmissions of monitoring data using an autoregressive moving average (ARMA) [12] based time series forecast model. We design RL based mechanisms to perform value-redundancy filtering and load-balancing routing according to the values and distribution of flows, respectively, in order to improve the energy efficiency and self-adaptability to environmental changes of WSNs. Furthermore, the actions of control plane are mapped to low-complexity vector calculations and rule matching in switch's flow table. The rules in flow table are designed to curb the control signaling overhead and balance the distribution of data flows for achieving in-network fusion in data plane.
The novel aspects of the proposed energy-efficient SDWSN prototype are energy saving with guaranteed QoS is achieved by mining the application-specific value redundancy and distribution of data flows in SDWSN, taking into account the inherent constraints of WSNs in terms of energy, radio resources, and computational capabilities; the RL based mechanisms for value-redundancy filtering and load-balancing routing can adapt to the varying environment and network status, thus improving the self-adaptability of SDWSN for monitoring applications.
The rest of the paper is organized as follows. Section 2 elaborates the cognitive SDWSN prototype and its functional architecture. Section 3 presents a specific implementation of the proposed prototype. In Section 4, performance of the proposed SDWSN prototype in terms of energy efficiency and self-adaptability is evaluated through experiments in comparison with existing WSN approaches for monitoring. Finally, conclusion is drawn in Section 5.
2. Functional Architecture of SDWSN Prototype
In this section, we propose a cognitive SDWSN prototype, where RL is incorporated into the network information process for an integrated consideration of the energy- and resource-constrained trait of WSNs, complex features of monitoring applications, and dynamic nature of WSN deployment environments.
As shown in Figure 1, the fundamental functionalities of SDWSN prototype include an information QoS setting module, cognitive information middleware (CIM), and an information processing module. Following the design principles of SDWNs, the application plane of SDWSN prototype is designed to meet the QoS requirements of monitoring applications, supported by the hardware of sensors. Application plane interacts with control plane through an application programming interface (API). The functionalities of data plane are dynamically configured using Over-the-Air Programming (OTAP) technique [13], which can run multiple tasks simultaneously with QoS and can reduce the energy consumption in online task scheduling.

Cognitive SDWSN prototype.
The data plane is abstracted into a weighted directed graph,
In the control plane, CIM is a part of the controller that performs adaptive data mining of network information using machine learning schemes with QoS guarantee. Information mapping (IM) module in CIM is responsible for preprocessing information received from data plane (i.e., information mining). It has two main duties: to perform online evaluation of the value of current monitoring data flow using an ARMA model and to build a flow distribution map and a network interconnection map in
Routing decisions are made by CIM in the controller and then translated into rules and actions to be deployed in flow tables. APIs are used to configure flow tables for routing, in conjunction with a floodless service discovery mechanism. As part of the operating system, Sensor OpenFlow (SOF) [14] channel is used to establish an end-to-end connection between the controller and a switch. SOF also supports queries on packet streams and automatically splits queries between the data plane and the control plane, thus avoiding the increase of traffic in the data plane due to queries. Value matching and path matching are designed by CIM and executed by lightweight actions of flow tables in an on-demand driven energy-saving mode. This reduces the amount of information exchange between the operating system and the data plane. After data-gathering routing has been established, data packets can be forwarded and processed in the data plane. Subsequent (follow-up) packets in a flow are forwarded in the data plane based on the configured routing in flow tables without any further participation from the control plane. This can reduce the data-gathering traffic in the data plane and decrease control overhead in the control plane. The features specified in the MAC layer (as part of the operating system) are logically partitioned into two different modules: the lower MAC module, which depends on the proprietary Hardware Abstraction Layer (HAL) and controls time critical functions to achieve value-redundancy fusing in the data plane based on service differentiation access control; and the upper MAC module, which is responsible for delay-tolerant control plane functions.
The proposed cognitive SDWSN prototype takes into account the inherent constraints of WSNs in terms of energy, radio resources, and computational capabilities. Energy saving is achieved through the design of value-redundancy data fusing and load-balancing data routing technologies in CIM. By using machine learning schemes for energy saving in control plane and by incorporating lightweight execution using a flow table at each switch in data plane, intelligence and controllability can be achieved in all stages of the information operation chain in SDWSN. The introduction of in-network processing with low computational complexity in data plane facilitates the centralization of QoS management in control plane, thus reducing the total amount of overheads for cross-plane communications. Moreover, low-complexity numerical operations of the flow entries are enabled by IM module, which matches CIM's outputs to vector constant parameters.
Based on the proposed SDWSN prototype, programmability and resource reutilization in data plane can be improved through OTAP. The overhead for cross-plane control signaling can be reduced by introducing a data fusion mechanism into data plane, which also improves the controllability of packet routing and the efficiency of resource utilization.
3. Design of RL Based Energy-Saving Mechanisms
In this section, the implementation of the proposed SDWSN prototype for environmental monitoring applications will be discussed with a focus on RL based energy-saving mechanisms.
3.1. Design of Energy-Saving Mechanisms in Control Plane
In event-detection based monitoring applications, the periodic transmissions of monitoring data usually have low duty cycles and high time-domain correlation, resulting in data value redundancy. In the following, we exploit the data value redundancy to achieve transmission energy saving.
RL is an agent based learning approach, which uses the trial and error method to find a reward maximizing behavior in a dynamic environment. RL can adapt to the dynamic environment with a relatively low complexity, rendering itself perfectly applicable to WSNs with limited resources and operating in unpredictable environments. Therefore, we design the energy-saving policy
During a specific data-gathering round
Since the ARMA model captures the statistical characteristics of a time series, which can be used to mine the sampled data value redundancy and to perform real-time value evaluation of data flows, we adopt ARMA to predicate the value
After the value of data flow
In the RL mechanism, the dynamic environment is characterized by a 4-tuple
The CW optimization strategy is shown in Algorithm 1, where
① Initialize Q table entry for each (s, a) pair and reward r Setting parameters ② Perform the following steps during each round: {Do calculate the QoS factor of flow Observe the current state While (the current run < iteration threshold) {Adjust Γ with given Q according to (4); Select action Execute the adjustment of window's size according to (5); Maximize per-round local reward Observe the new state Learn s, a, r Execute the iterative process of Q Select next step action Update Status End while loop } Get the reward from the current run If B is lower than the iteration threshold, then go to Step ② End do loop } ③ Obtain the optimal policy Γ, which is inputted into flow-table based on
Status table in CIM tracks how the operational environment evolves with time, where new states can be mined and new actions should be discovered. Policy
Based on the above analysis, we design
4. Implementation of Flow-Table Based Policy in Data Plane
SDWSN are characterized by the decoupled control and data planes. Although the energy-efficient mechanisms

Implementation process of flow table.
When the current flow matching process ends and the next flow arrives, if the newly arrived flow contains the same contents as the previous one, it will be considered as redundant. In this case, flow table does not need to be updated for value-redundancy filtering or forwarding path. Therefore, cross-plane communications and task reconfiguration can be greatly reduced, thus improving the energy efficiency in application-oriented SDWSN. When the real-time status (e.g., QoS and throughput) of SDWSN notably changes, the value-redundancy filtering parameters and routing paths can be dynamically adjusted by
In the proposed SDWSN-RL prototype, the control traffic from the controller to the data plane (i.e., downstream traffic) contains Packet-Out, Modify-State (configuration), and Read-State (request or query); the control traffic from the data plane to the controller (i.e., upstream traffic) contains Packet-In and Read-State (reply or report). The control traffic flow can be described as follows. Once a source host generates a query message, the controller responds with a reply message if the source host and the destination host are on the same island. Otherwise, the controller drops this query message. When network status changes, Packet-In event will be triggered by a request message in the data plane. Each switch sends a reply message containing the switch status to the controller via a secure channel supported by SOF. Meanwhile, Modify-State configuration messages are exchanged between the controller and switches via the secure channel as well. A Packet-Out message is generated by PD module and sent to switch to validate an entry in flow table. If no response is returned within a specified time, the potentially invalid entry will be deleted. The amount of Packet-In/Out messages for handling requests grows with the number of switches in the network.
5. Experiment Results
We perform experiments to evaluate the performance of the proposed RL based SDWSN prototype (SDWSN-RL) for environmental monitoring applications. The network simulator NS2 [21] is used to build the experiment environment. The parameter values used for the experiment setup are given in Table 1. We adopt the event radius (ER) model [22] to simulate the impulsive traffic triggered by temporally and spatially correlated monitoring events in a disk area. Following the ER model, the monitoring area of SDWSN is divided into an event gathering region, a data relaying region, and a decision making region. The first two regions belong to data plane, and the third one belongs to control plane. The monitoring center, that is, BS, is placed at the top right corner of the monitoring area with the coordinate (128 m, 162 m). The event center is located at the coordinate (48 m, 82 m) inside the event gathering area. The arrival of events follows a Poisson distribution in the time domain. Note that all the experiment results in Figures 3–8 include the energy consumptions of both data-gathering and control traffic. In the energy consumption calculation, we consider the energy consumption
Experiment parameters.

Energy consumption of WSN with and without software defined architecture.

Comparison of load-balancing performance.

Network lifetime of SDWSN.

Comparison of node-level remaining energy.

Comparison of energy consumption per bit.

Comparison of control traffic cost.
Figure 3 shows the comparison of energy consumption rate between SDWSN-RL and a WSN without SDN (called NonSD-WSN-RL). NonSD-WSN-RL is different from SDWSN-RL mainly in that there is no SDN architecture or SOF support. In NonSD-WSN-RL, each switch uses hybrid energy-efficient distributed clustering routing (HEED) with a back-pressure mode [23], periodically computes the utility based on current queue gradients, and decides the next hop for each flow accordingly. The energy consumption rate is defined as the ratio of the energy consumption of SDWSN-RL (or NonSD-WSN-RL) to that of single-hop communication (without clustering or aggregation). Figure 3 shows that the average energy consumption rate of SDWSN-RL is much lower than that of NonSD-WSN-RL for each considered density of network nodes. The energy consumption rate of NonSD-WSN-RL increases faster with the increase of data-gathering rounds than SDWSN-RL. Furthermore, when the network node density increases from
Figure 4 shows the experiment results in terms of the normalized link BWU of 10 randomly selected links. For performance comparison with SDWSN-RL, we include three classic data-gathering schemes, SDN-IC, SDV+GPRS, and SWAN, which are content-centric, position-aided, and agent-based, respectively. We calculate the normalized variance of BWU (
Figure 4 also includes NonSD-WSN-RL in the load-balancing performance comparison. We can see that the load-balancing performance of NonSD-WSN-RL is much worse than that of SDWSN-RL and the other SD based schemes. This is because the load-balancing routing mechanism in SDWSN-RL utilizes global network information to construct optimal routing paths in a centralized manner. More specifically, SOF in SDWSN-RL provides a lightweight control protocol between the central controller and the switches in the data plane. The controller uses information in flow tables to calculate the load-balancing routes among all switches and sends the flow tables back to the switches to indicate the next hop towards each destination. SOF provides simple APIs at switches and allows the controller to program the switches through the APIs, which provide flexible lookup mode for deploying routing protocols. The SDN controller can obtain information about granular control, network topology, and link statistics, which is used in the centralized load-balancing routing, while such information is not available or difficult to obtain in traditional WSNs without SDN. NonSD-WSN-RL relies on a distributed neighbor discovery approach, which is not efficient in load balancing. Moreover, frequent next-hop neighbor discoveries and data packet forwarding based on distributed communications would lead to a sharp increase in control traffic with the increase of node density.
Figure 5 plots the average survival rate of nodes versus the number of data-gathering rounds for the four considered schemes. The survival rate of nodes in a network can be used to evaluate the total energy consumption of a data-gathering mechanism [24]. The lifetime of SDWSN is defined as the duration of normal network operations (e.g., data-gathering) while the survival rate of nodes is maintained above a threshold (
Figure 6 indicates the remaining energy level of a node after 80 data-gathering rounds normalized with respect to its initial energy level (which is fixed at 2 mJ for all nodes), for 36 different nodes randomly selected in an annular area centered at the coordinate (48 m, 82 m) (i.e., the event center) with the inner and outer radiuses of 10 meters and 20 meters, respectively. The experiment results show that for almost all the selected nodes, SDWSN-RL achieves the highest residual energy level among the four considered schemes. This would effectively prolong the lifetime of SDWSN. With each scheme, the normalized residual energy level varies across different nodes. A higher (lower) level of the remaining energy is due to the smaller (larger) amount of data flows that the node has forwarded. Compared with the three existing schemes, SDWSN-RL offers a more balanced distribution of energy consumption across the network nodes. This is mainly due to the proposed load-balancing routing mechanism, which utilizes global network information to construct optimal routing paths in a centralized manner.
Figure 7 plots the average energy consumed by the four considered schemes for forwarding a single bit of data (mJ/bit) while meeting the same QoS requirement, versus the number of sensor nodes deployed in SDWSN. We can see that the energy consumption per bit of SDWSN-RL increases with the number of sensor nodes at a much slower rate than the three existing schemes, leading to a much lower energy consumption per bit of SDWSN-RL for large numbers of sensor nodes than the existing schemes. This is because the application-oriented in-network fusion in data plane of SDWSN-RL inhibits the transmission of value-redundant flows, and meanwhile the flow value determined by (1) is not notably affected by the number of traffic sources (i.e., nodes in the event gathering area), while the other three schemes would generate excessive traffic loads due to the large amount of local information exchange for executing distributed algorithms in data plane and the large amount of control overhead for cross-layer interaction, which degrade the energy efficiency especially for SDWSN with a large number of sensor nodes.
Figure 8 shows the comparison of control traffic cost between our proposed SDWSN-RL and the other three schemes (SWAN, SDV+GPRS, and SDN-IC), where the control traffic cost is defined as the ratio of control overhead to network throughout, and the network throughput is defined as the rate of successful bit delivery from the IG module to the monitor center. Figure 8 plots the normalized control traffic cost versus the time interval between two successive updates of the parameter
We can see from Figure 8 that the control traffic cost decreases with the increasing update interval of
Since the throughput is inversely proportional to the control traffic cost for given control overhead, the results in Figure 8 also indicate that SDWSN-RL achieves the highest throughput among the four schemes considered, because it significantly reduces local control message exchanges, thereby freeing up radio resources for more data packets to be successfully delivered. The other three schemes (SWAN, SDN-IC, and SDV+GPRS) use broadcast-based service discovery mechanisms and distributed protocol, where switches need to wait for the wireless medium to be free to send their packets and many data packets may have to be dropped due to the wait, thereby limiting the throughput. Moreover, the broadcast based service discovery mechanisms require high volumes of control messages to be exchanged and high packet processing overhead.
6. Conclusion
In this paper, we have proposed a SOF-based SDWSN prototype for improving the energy efficiency and adaptability of WSNs in environmental monitoring applications, taking into account the inherent constraints of WSNs in terms of energy, radio resources and computational capabilities, and the distributed data flows of monitoring applications. Experiments results have shown that the proposed SDWSN prototype can greatly improve energy efficiency by effectively inhibiting the transmission of value-redundant loads, reducing the amount of cross-plane communications and enhancing the load balance in SDWSN.
In our future work, we will improve the scalability of control-plane mechanisms using decentralized coordination to overcome the bottleneck of a single logical controller and develop an adaptive anti-interference mechanism to improve the robustness of SDWSN for diverse monitoring applications in wireless environments with severe interference.
Footnotes
Conflict of Interests
The authors declares that there is no conflict of interests regarding the publication of this paper.
