  In a wireless powered communication network (WPCN), an energy access point
supplies the energy needs of the network nodes through radio frequency wave
transmission, and the nodes store the received energy in their batteries for
their future data transmission. In this paper, we propose an online stochastic
policy that jointly controls energy transmission from the EAP to the nodes and
data transfer among the nodes. For this purpose, we first introduce a novel
perturbed Lyapunov function to address the limitations on the energy
consumption of the nodes imposed by their batteries. Then, using Lyapunov
optimization method, we propose a policy which is adaptive to any arbitrary
channel statistics in the network. Finally, we provide theoretical analysis for
the performance of the proposed policy and show that it stabilizes the network,
and the average power consumption of the network under this policy is within a
bounded gap of the minimum power level required for stabilizing the network.
