  In this paper, we consider a scenario where an energy harvesting sensor
continuously monitors a system and sends time-stamped status updates to a
destination. The destination keeps track of the system status through the
received updates. We use the metric Age of Information (AoI), the time that has
elapsed since the last received update was generated, to measure the
"freshness" of the status information available at the destination. We assume
energy arrives randomly at the sensor according to a Poisson process, and each
status update consumes one unit of energy. Our objective is to design optimal
online status update policies to minimize the long-term average AoI, subject to
the energy causality constraint at the sensor. We consider three scenarios,
i.e., the battery size is infinite, finite, and one unit only, respectively.
  For the infinite battery scenario, we adopt a best-effort uniform status
update policy and show that it minimizes the long-term average AoI. For the
finite battery scenario, we adopt an energy-aware adaptive status update
policy, and prove that it is asymptotically optimal when the battery size goes
to infinity. For the last scenario where the battery size is one, we first show
that within a broadly defined class of online policies, the optimal policy
should have a renewal structure, i.e., the status update epochs form a renewal
process, and the length of each renewal interval depends on the first energy
arrival over that interval only. We then focus on a renewal interval, and prove
that if the AoI in the system is below a threshold when the first energy
arrives, the sensor should store the energy and hold status update until the
AoI reaches the threshold, otherwise, it updates the status immediately. We
analytically characterize the long-term average AoI under such a
threshold-based policy, and explicitly identify the optimal threshold.
