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. battery disposal. Wireless Power Transfer (WPT) is the key enabling technology for charging over the air. There are various WPT methods including Radio Frequency (RF) power transfer [3], resonant coupling [4] and inductive coupling [5]. Compared to the two latter methods, RF power transfer provides a wider coverage range and is more flexible for transmitter/receiver deployment and movement [2]. Therefore, it is considered as the most promising WPT approach by the literature. Adapting WPT technology in wireless communication networks introduces new research challenges, mostly related to increasing coverage and efficiency. A prominent challenge is how to maintain power transfer efficiency despite the transmission path loss [6]. There has been numerous studies on energy beamforming as a technique for alleviating the high transmission path loss (e.g., see [6]-[9]). In [6] and [7], a wireless powered communication network (WPCN) consisting of a hybrid data/energy access point with multiple antennas and several single-antenna users is considered, in which the access point transmits energy toward the nodes in the down-link direction and November 27, 2018 DRAFT