Energy harvesting has been considered as a promising technique to decrease the conventional grid energy expenditure. However, most renewable energy sources are unreliable and random. To overcome these drawbacks, besides the commonly adopted approaches such as purchasing power from the grid and deploying batteries, energy cooperation is an appealing solution. In this paper, we investigate the energy management problem by jointly optimizing the data admission rate, transmit power, energy sharing among base stations (BSs), battery charging and discharging rate, and the energy purchased from the grid in hybrid energy powered cellular networks. First, the long-term average total cost minimization problem under the constraints on limited battery size and users' data rate requirements is formulated as a stochastic optimization problem. Employing the Lyapunov optimization technique and alternating direction method of multipliers (ADMM), we propose an online distributed algorithm, referred to as distributed online energy management algorithm (DOEMA), where the current system states are needed, without requiring the system statistic or future information. Furthermore, the proposed algorithm can be implemented in a parallel and completely distributed fashion, which could provide more engineering guidelines for practical communication protocols compared with the centralized algorithm. The extensive simulation results are conducted to demonstrate the correctness of the theoretical analysis and validate the performance improvement against other algorithms in terms of system total cost reduction.INDEX TERMS Multi-cell networks, renewable energy, energy cooperation, stochastic optimization, ADMM, distributed online algorithm.QI ZENG received the Ph.D. degree in communication and information system from