  In energy harvesting communications, users transmit messages using energy
harvested from nature during the course of communication. With an optimum
transmit policy, the performance of the system depends only on the energy
arrival profiles. In this paper, we introduce the concept of energy
cooperation, where a user wirelessly transmits a portion of its energy to
another energy harvesting user. This enables shaping and optimization of the
energy arrivals at the energy-receiving node, and improves the overall system
performance, despite the loss incurred in energy transfer. We consider several
basic multi-user network structures with energy harvesting and wireless energy
transfer capabilities: relay channel, two-way channel and multiple access
channel. We determine energy management policies that maximize the system
throughput within a given duration using a Lagrangian formulation and the
resulting KKT optimality conditions. We develop a two-dimensional directional
water-filling algorithm which optimally controls the flow of harvested energy
in two dimensions: in time (from past to future) and among users (from
energy-transferring to energy-receiving) and show that a generalized version of
this algorithm achieves the boundary of the capacity region of the two-way
channel.
