Exploiting QoS Flexibility for Smart Grid and IoT Applications Using TV White Spaces:
Extended Version
Abstract
In this paper, we consider the utilization of TV White Spaces (TVWS) by small Cognitive Radio (CR) wireless network operators (SCWNO) to support the communication needs of various smart grid and internet of things (IoT) applications. Spectrum leasing could be essential for SCWNO to support a wide range of applications. In our paper, we assume that in order to ensure Quality of service (QoS) requirements, the CR operator has the option of leasing the specially designated high priority TVWS channels (HPC) for short term use by paying a small fee according to the actual usage. Based on Lyapunov drift plus penalty function framework, we develop an online algorithm to exploit QoS flexibility. Such flexibility might be available in terms of data transmission delays as well as data quality reduction in order to minimize the overall HPC leasing cost. The developed algorithm also provides three adjustable parameters that could be controlled to tradeoff the total cost and QoS. The performance of the proposed algorithm is very close to the optimal offline lower bound solution.
I Introduction
The significance of Cognitive Radio (CR) technology that allows the opportunistic and intelligent use of wireless spectrum is well recognized [1, 2, 3, 4]. In recent years, TV White spaces (TVWS) have also become available for wireless communication due to the transition from analog to digital TV broadcasts. TVWS comprise of relatively large frequency blocks in the very high frequency (VHF) and ultra high frequency (UHF) bands with a tremendous potential to support several new applications and services. There is a general consensus among the spectrum regulators to provide an unlicensed access to TVWS [5, 6, 7]. There are also some efforts to standardize the use of TVWS spectrum. For example, the IEEE 802.11af, also sometimes referred to as ‘WhiteFi’ or ‘Super WiFi’ adds the TVWS bands to the IEEE 802.11 family of specifications.
Fortunately, the free TVWS availability has coincided with the ever increasing interest in smart grids, internet of things (IoT), and machinetomachine (M2M) communication [8, 9]. The data rate requirements of many novel smart grid applications, e.g., demand response management, energy monitoring for shared facilities (e.g. lift, corridor light), environmental sensing, etc., could be supported by exploiting TVWS. Some of these applications require stringent Quality of Service (QoS) guarantees. Using the CR technology and TVWS, many new small and virtual wireless data service providers can also emerge to support these applications. We would refer to these operators as ‘small cognitive radio wireless network operators’ (SCWNO). The competition would also increase among the traditional wireless operators and SCWNOs for the freely available TVWS. Hence, to support a wide range of applications with varying QoS requirements, there are also some proposals to assign certain channels in the TVWS spectrum as high priority channels (HPCs) [7], which could be temporarily leased by the interested CR operators by paying a small license fee. In this context, minimizing the HPC leasing cost while providing the desired QoS guarantees would become a challenge, particularly for the SCWNOs.
SCWNO can minimize HPC leasing costs by exploiting the maximum amount of flexibility that could be offered by the considered smart grid or IoT application [10]. For example, for certain applications, SCWNO can wait for free TVWS spectrum availability and delay the transmission of data packets according to the prescribed requirements. Simultaneously, SCWNO can further exploit the redundancy in the measurements (e.g., smart meter data readings, environmental sensor readings, etc.) and it can reduce the size of data packets (e.g., by dropping the least significant bits). The transmission of some reduced size packets in different time slots would impact the temporal quality of data but it would also reduce the HPC leasing cost. Therefore, SCWNO is required to intelligently exploit all the available QoS flexibility (delay and quality) to minimize its spectrum leasing costs.
In [11], we considered this problem and we developed an optimal offline algorithm with the objective of minimizing the overall HPC leasing cost of the SCWNO. We imposed hard constraints on the transmission delays and data quality. We also developed an online heuristic whose performance was not close enough to the optimal offline algorithm. In current work, we use Lyapunov drift plus penalty framework, which has been used by several researchers to obtain real time solutions of many interesting research problems [12, 13, 14, 15]. For our problem, using this framework, we decouple the problem in time and develop an efficient and novel online algorithm that can be independently solved in each time slot. The performance of our Lyapunov based online algorithm is very close to the optimal lower bound that is provided by the offline algorithm in [11]. The developed algorithm also provides three controllable parameters that could be tuned to tradeoff HPC leasing cost, delay and data quality according to the application requirements. In practical systems, this algorithm can more efficiently exploit the QoS flexibility and further reduce the HPC leasing cost of the SCWNOs.
Ii System Model and problem formulation
Iia System Model
Consider the scenario as shown in Figure 1. The data from several smart homes in a residential community and multiple buildings in a smart city is aggregated (e.g., using power line communication) at the local data concentrators deployed by the SCWNO. Using the CR technology, the data concentrators transmit the queued data on TVWS to the remote SCWNO Base Station (BS). From the remote BS, the data is further transmitted on the backhaul internet for smart grid and IoT services.
For such applications, we assume a discrete time system and we consider the transmission of data queued at the local data concentrators using TVWS. In the remainder of this work, our focus will be on any one such data concentrator. We assume that ‘data units’ arrive or depart from the data concentrator queue. Each data unit comprises of multiple packets and each packet comprises of multiple bits. The queue length, denoted by , evolves according to the following update equation,
(1) 
In this equation, denotes the arrival rate in time slot , while the departure rate from the queue at time is denoted by . The arrival and departure rates are defined in terms of data units. We assume that only one data unit can arrive in the queue at any time , i.e., , such that . Similarly, we also assume that a maximum of only one data unit (either of full size or reduced size) can be transmitted in any given time slot , i.e., and subsequently, .
Let, denote the total number of data bits in one full size data unit. We suppose that the number of bits in a reduced size data unit are , where . A reduced size data unit might be obtained by dropping least significant bits. Let, denotes the time varying per unit HPC spectrum price to transmit one data bit in time slot . We assume that the spectrum price increases linearly with the number of bits. Therefore, the size of data unit also becomes an important factor in determining the cost of purchased spectrum. The reduction in the size of data unit has an adverse impact on the overall data quality. However, it is important to note that for some applications in the scenario considered in Figure 1, e.g., smart energy and water meters there is a certain amount of redundancy in the consecutive readings. This redundancy could allow transmitting reduced size data units in some time slots to avoid HPC purchase decisions. Thus, in any time slot , the SCWNO BS has the options to make any one of the following decisions:

Transmission of one full size data unit using the freely available TVWS spectrum.

Transmission of one reduced size data unit using the freely available TVWS spectrum.

Transmission of one full size data unit by purchasing HPCs.

Transmission of one reduced size data unit by purchasing HPCs.

No transmission of a data unit.
IiB Problem Formulation
Let , , , and respectively denote the binary decision variables for the transmission/nontransmission of one data unit of full size or reduced size on free TVWS and HPC spectrum. For example, indicates the transmission of one full size data unit using the freely available TVWS spectrum at time . These decision variables are mutually exclusive, i.e., in any time slot , only one decision variable can become 1. Additionally, setting all the decision variables equal to 0 would indicate nontransmission of a data unit in time slot . In terms of the decision variables and the fact that only one data unit may be transmitted in any given time slot, the departure rate can be written as,
(2) 
The transmission of a full size or a reduced size data unit on freely available TVWS spectrum does not cost the SCWNO. However, if there is a strong competition for TVWS spectrum among various operators, free TVWS availability will become time varying and limited. In such scenarios, in order to maintain a certain QoS, in terms of both delay and data quality, the SCWNO might be required to lease HPCs. Our objective in this paper is to minimize the time average expected cost incurred due to the HPC purchase decisions. We can mathematically write down the objective function as:
(3) 
To further simplify our objective function, let and . We can now rewrite (3) as,
(4) 
We have the following optimization problem,
(5) 
subject to the following constraints:
(6) 
(7) 
(8) 
Constraint (6) indicates that in any time slot , a maximum of only one decision variable can become 1. Constraint (7) is due to the binary nature of decision variables. For stability of the queue, the time average queue backlog should be finite, which is given as constraint (8). This problem imposes certain conditions on the arrival and departure dynamics and on queue stability. However, there are no constraints on the delay and data quality.
In the following, we will first define two virtual queues, respectively known as the qualityaware and delayaware queues. Qualityaware queue keeps track of the data quality, while delayaware queue keeps track of queuing delays. We will then use Lyapunov drift plus penalty function framework to obtain a real time algorithm to minimize the cost function.
Iii Online Algorithm Development
Iiia Lyapunov drift plus penalty framework
We have two QoS dimensions, i.e., data quality (measured in terms of the number of data units whose size is reduced) and queuing delay. We define two virtual queues, which are denoted by and . Virtual queue, is the qualityaware queue, while is the delayaware queue.
(9) 
(10) 
Both the virtual queues have the same departure rate as the original queue . However, whenever we transmit a reduced size data unit, which reduces data quality, is incremented by . Similarly, whenever there are no transmissions from the nonempty queue, which increases the queuing delay, is incremented by .
Let, denote the concatenated vector of actual and virtual queues. We define the following Lyapunov function,
(11) 
The Lyapunov function is a measure of congestion in the actual and virtual queues. We define the conditional 1slot Lyapunov drift function as,
(12) 
The Lyapunov drift plus penalty function is given by the following expression,
(13) 
where, is a parameter that can be used in the delay, quality and performance tradeoffs. Using the Lyapunov drift plus penalty function framework, instead of minimizing the original objective function, we can minimize an upper bound on (13), which is given by the following function,
(14) 
The detailed derivation of (14) is provided in Appendix A. Now, instead of solving the original optimization problem, the decoupling in time provided by (14) can be used to develop an online algorithm. Therefore, in every time slot , we have the following optimization problem:
(15) 
subject to constraints (6), (7). In the next subsection, we develop an online algorithm to obtain an optimal solution of problem (15).
IiiB Online Algorithm
Let, , indicate the availability/nonavailability of free TVWS spectrum in time slot . The value of indicates the nonavailability of free TVWS spectrum for the transmission of either a full size or a reduced size data unit. The value of , on the other hand, indicates the availability of free TVWS spectrum, which is only sufficient for the transmission of one reduced size data unit. Finally, the value of , indicates the availability of free TVWS spectrum, which is enough for the transmission of one full size data unit. Depending on the availability of free TVWS spectrum, HPC prices and actual and virtual queue lengths, we can develop an algorithm that solves the optimization problem (15) and makes appropriate real time decisions on the purchase of HPCs and the reduction in the size of data units.
In our optimization problem, constraint (6), (7) ensures that no more than one binary decision variables can be 1. By exploiting these two constraints, we obtain four possible values of the objective function (15). These values can be obtained by setting only one binary decision variable equal to 1,
(16) 
(17) 
(18) 
(19) 
Here, is obtained by letting in (15). Similarly, , , and are respectively obtained by setting , and equal to 1 in (15). It is obvious that the value of , while the remaining values could be positive, negative or zero depending on the dynamic HPC prices, queue lengths and different parameters. We also define a variable denoted by and set it equal to 0 to identify the case when the transmitter decides not to transmit a data unit of any size in time slot .
There are three possible states of free TVWS spectrum availability. When , we have sufficient freely available TVWS spectrum to transmit a full size data unit. In this case, if the queue length is nonzero, the value of will always be negative and minimum. Therefore, the obvious decision would be to exploit the availability of free TVWS spectrum to transmit one full size data unit. When , we have sufficient free TVWS spectrum to transmit a reduced size data unit. However, our decision to use the free TVWS spectrum for the transmission of one reduced size data unit also depends on the quality and delay. In this case, we can also note that by a factor of , which indicates that if we decide to transmit a reduced size data unit then we should always transmit it on the free TVWS spectrum. Thus, if the queue length is nonzero, we can either exploit the free TVWS spectrum and transmit a reduced size data unit or we can purchase HPC spectrum to transmit one full size data unit or we do not transmit at all. The final decision among these three options will be made depending on the actual values of in time slot . We will select the option that gives the minimum value. When , we do not have freely available TVWS spectrum. In this case, there are three possible options, purchase HPC spectrum for the transmission of a full size data unit, or purchase HPC spectrum for the transmission of a reduced size data unit or no transmission of data unit in time slot . Now, we have to decide based on the values of , and select the option that gives the minimum value. All these steps are detailed in Algorithm 1.
This algorithm also provides various controllable parameters, i.e., , and that could be used to tradeoff cost, delay and data quality.
IiiC Analytical Bounds on worst case delay and data quality
We have one actual queue and two virtual queues, i.e., and . Let and respectively denote the maximum price to purchase full size and the reduced size data units. Let, , and respectively denote the upper bounds on , and . These bounds are given by the following expressions,
(20) 
(21) 
(22) 
Let, denote the worst case delay bound. Since, we assume that only one data unit can enter or leave the queue in any time slot, the worst case delay can be obtained from the maximum queue length, i.e.,
(23) 
where, denotes the ceil operation. A data unit arriving in the queue at time will always leave the queue before time slot.
Finally, we can upper bound the maximum number of reduced size data units in every time slots by the following equation,
(24) 
For example, if , then the total number of reduced size data units in every 100 data units are given by (24). If denotes the total number of time slots of operation (e.g., time slots), then an upper bound on the total number of reduced size data units out of total data units (recall we have one data unit arriving every time slot) is determined by the following expression,
(25) 
The proofs of (20), (22), (21), (23) and (24) are given in Appendix B.
Iv Simulation Results
The availability of free TVWS spectrum is generated in MATLAB as uniformly distributed integer random variables. The random variable takes three possible values to indicate the nonavailability of free TVWS spectrum, the availability of free TVWS spectrum for the transmission of one reduced size data unit and the availability of free TVWS spectrum for the transmission of one full size data unit. We assume , i.e., the size of a reduced size data unit is half that of the full size data unit. The values of , i.e., the cost of leasing HPC for the transmission of one data unit is generated as a uniformly distributed random variable between . The values of . In these simulations, we compare the performance of our proposed online algorithm with the optimal offline bound and the online heuristic that were developed in [11]. For fair comparison with the schemes presented in [11] we assume , i.e., a data unit arriving in every time slot.
In Figure 2, we fix and we vary the value of parameter . We run the simulation for time slots. We plot the resulting queue length at the end of 10,000 time slots and on the same graph, we also plot the total number of data units that are transmitted with reduced size. As we consider a large range of parameter , the horizontal axis is in scale. Let denote the total number of data units that are transmitted with reduced size. Similarly, let the total number of transmitted data units be denoted by . We can equivalently interpret the results in Figure 2 as the transmission of data units out of which the size of data units can be reduced and these data units have to be transmitted in time slots. We can see that for small values of the queue length is small but as the value of increases the queue length also increases. Similarly, as the value of increases, the total number of packets that are transmitted with reduced size decreases.
In Figure 3, we plot the total cost of our proposed algorithm, the optimal offline lower bound and the online heuristic in [11] for different values of parameter . For every value of , for comparison with the algorithms in [11] we have used and that were obtained in Figure 2. We can observe that when the value of is small, the total cost is very high. Increasing the value of reduces the total cost, and it goes to zero for very large values of . However, at large values of , the corresponding values of and are also high. The performance of our proposed Lyapunov algorithm is very close to the optimal lower bound for all the values of . The mean square difference between the total cost of our proposed algorithm and that of the optimal lower bound is 13.77 as compared to 148.4 for the total cost of online heuristic and the optimal lower bound.
SCWNO can adjust three parameters, , and according to the smart grid or IoT application requirements. In Table I, the cost of proposed Lyapunov algorithm and the cost of optimal offline lower bound for different combinations of , and are given. We can observe that for applications which demand stringent constraints on delay, small values of , and should be used. On the other hand, if data quality is more important then larger values of are more desirable. In any situation, the algorithm can be effectively used to exploit any amount of QoS flexibility that might be available in order to minimize the HPC leasing cost of SCWNO.
V Conclusions
In this paper, we considered the HPC leasing cost minimization problem of SCWNO operating in TVWS bands. We used the concept of delay and quality aware virtual queues and then used Lyapunov drift plus penalty function framework to develop an online algorithm. The algorithm can effectively tradeoff any amount of QoS flexibility that might be available in terms of queuing delays and data quality with the HPC leasing cost through three adjustable parameters. These parameters can be tuned according to the application requirements. Simulation results showed that the performance of the proposed algorithm is also very close to the optimal offline lower bound solution. This work can be further extended in future by relaxing the restrictions on the input arrival and departure rates from the queue and by allowing the simultaneous utilization of free and leased TVWS spectrum.
a Derivation of per time slot optimization problems (14)
We start with the one step Lyapunov drift function, i.e.,
We can show that,
We can now write the conditional one step Lyapunov drift function as,
(26) 
where, . Adding, to (26), we obtain,
(27) 
In the RHS of the above expression considering only the terms that involve the decision variables gives us . As we can only control the decision variables, the problem is equivalent to minimizing subject to constraints on the optimization variables.
B Proofs of Worst Case Bounds
Bound on (20): We first prove that . Since, , it is true for . We follow the approach adopted in [12, 13]. Suppose, it holds for time slot . We show it also holds for time slot . Consider the case when . Then , because the queue can only increase by 1 data unit at most by any time slot. Thus, the result holds in this case. Now consider the opposite case, when . In this case, the value of according to (18) will be negative. Therefore, the option of no transmission cannot be used and the algorithm will always transmit at least one data unit from the queue. There are three possible situations depending on the value of . In the best case, if , the algorithm will always transmit one full size data unit using the free TVWS spectrum since . On the other hand, if , the value of will result in the purchase of HPC spectrum for the transmission of full size data unit, if , otherwise, the algorithm will exploit the free TVWS spectrum to transmit a reduced size data unit. Finally, in the worst case, if , once again as , the algorithm will purchase HPC spectrum for the transmission of one full size data unit if , otherwise, the spectrum will be purchased for the transmission of one reduced size data unit. As we serve at least one data unit and the input arrival in the next time slot cannot exceed one data unit so the queue cannot exceed in the next time slot and . Finally, to complete the proof, if , then from the queue dynamics, , which is again less than . Therefore, .
Bound on (21): This proof is similar to the that of . We first prove that . Since, , it is true for . Suppose, it holds for time slot . We show it also holds for time slot . Consider the case when . Then , because this virtual queue can only increase by at most by any time slot (if the decisions is no transmission from nonempty queue). Thus, the result holds in this case. Now consider the opposite case, when . In this case, because , the value of according to (18) will be negative. Therefore, the option of no transmission cannot be exercised and the algorithm will always transmit at least one data unit from the queue (even in the worst case when ). As we must serve at least one data unit, the virtual queue will not increment (it only increments by in case of no transmissions from the nonempty queue) and hence in the next time slot . Therefore, . This completes the proof for .
Bound on (22): Proof of this bound involves two interesting cases depending on the value of . Following similar lines as in the proofs of the previous two bounds, we first show that . Since, , it is true for . Suppose, it holds for time slot . We show it also holds for time slot . Consider the case when . Then , because this virtual queue can only increase by at most by any time slot. Thus, the result holds in this case. Now consider the opposite case, when . In this case, the value of according to (18) will be negative. Now, there are two cases depending on the value of : i) and ii) . In the first case, , and therefore, . In this case, we will not transmit a reduced size data unit and in the worst case of , as , we will purchase one full size data unit. Since we do not reduce data quality, the virtual queue will not increment (it only increments by when we transmit a reduced size data unit) and hence in the next time slot . This completes the proof for the first case. In the second case, it is obvious that and . Therefore, in this case, we can transmit a reduced size data unit. The transmission of a reduced size data unit will further increase the virtual queue length by . However, at the same time, the departure of a reduced size data unit will also decrease the queue length by 1. Since, , the overall impact of departure and increment will either decrease the queue length or keep it constant. Thus, once again we will have . This completes the proof for the bound on .
Bound on Queuing Delay (23): In our model, at most one data unit can arrive or depart the queue in any time slot . Due to this restriction, the worst case queuing delay is defined by the maximum backlog, i.e., . Therefore, any data unit that arrives in the queue at time slot will be out of the queue before the time slot , where, , which leads us to,
and concludes the proof.
Bound on Data Quality (24): Let denote the number of reduced size data units that are transmitted in time slots. For all , we have,
where, indicate the transmission of a reduced size data unit. We sum the above equation over , which give us,
Using the maximum value of and substituting in the above expression,
Rearranging the terms and using the fact that and , we can write,
Finally, as the number of reduced size data units in time slots cannot exceed and further to ensure integer values we obtain,
which concludes the proof.
References
 [1] S. Haykin, “Cognitive radio: Brainempowered wireless communications,” IEEE Journal on Selected Areas in Communications, vol. 23, no. 2, pp. 201–220, Feb. 2005.
 [2] J. Tallon, T. K. Forde, and L. Doyle, “Dynamic spectrum access networks: Independent coalition formation,” IEEE Vehicular Technology Magazine, vol. 7, no. 2, pp. 69–76, Jun. 2012.
 [3] L. Doyle, J. Kibiada, T. K. Forde, and L. DaSilva, “Spectrum without bounds, networks without borders,” Proceedings of the IEEE, vol. 102, no. 3, pp. 351–365, Feb. 2014.
 [4] J. Wang, M. Ghosh, and K. Challapali, “Emerging cognitive radio applications: A survey,” IEEE Commun. Mag, vol. 49, no. 3, pp. 74–81, Mar. 2011.
 [5] FCC, “Unlicensed operation in the tv broadcast bands,” FCC, Tech. Rep., Sep. 2010.
 [6] OFCOM, “Digital dividend: Cognitive access, statement licenseexempting cognitive devices using interleaved spectrum,” OFCOM, Tech. Rep., Jul. 2009.
 [7] IDA, “Regulatory framework for tv white space operations in the vhf/uhf bands,” InfoCommunications Development Authority (IDA) of Singapore, Tech. Rep., Jun. 2014.
 [8] Y. B. Lin, Y. W. Lin, C. Y. Chih, T. Y. Li, C. C. Tai, Y. C. Wang, F. J. Lin, H. C. Kuo, C. C. Huang, and S. C. Hsu, “EasyConnect: A management system for iot devices and its applications for interactive design and art,” IEEE Internet of Things Journal, vol. 2, no. 6, pp. 551–561, Dec. 2015.
 [9] Y. Liu, C. Yuen, X. Cao, N. U. Hassan, and J. Chen, “Design of a scalable hybrid MAC protocol for heterogeneous M2M networks,” IEEE Internet of Things Journal, vol. 1, pp. 99–111, Feb. 2014.
 [10] N. U. Hassan, W. Tushar, C. Yuen, S. G. Kerk, and S. W. Oh, “Guaranteeing QoS using unlicensed TV White Spaces for smart grid applications,” IEEE Wireless Communications Magazine, 2017.
 [11] N. U. Hassan, C. Yuen, and M. B. Atique, “Tradeoff in delay, cost, and quality in data transmission over TV White Spaces,” in Proc. IEEE ICC, May 2016, pp. 1–6.
 [12] M. J. Neely, “Stochastic network optimization with application to communication and queuing systems,” Morgan Claypool, Tech. Rep., 2010.
 [13] M. J. Neely, A. S. Tehrani, and G. Dimakis, “Efficient algorithms for renewable energy allocation to delay tolerant consumers,” in Proc. IEEE SmartGridComm, Oct. 2010, pp. 549 – 554.
 [14] W. Wu, Q. Yang, B. Li, and K. S. Kwak, “Adaptive resource allocation algorithm of lyapunov optimization for timevarying wireless networks,” IEEE Communications Letters, vol. 20, no. 5, pp. 934–937, May 2016.
 [15] N. U. Hassan, S. Hussain, C. Yuen, and L. Duan, “Tradeoff between spectrum cost and quality of service in a cognitive radio network,” in Proc. IEEE GLOBECOM, Dec. 2013, pp. 1179 – 1184.