  We formulate the optimal energy arbitrage problem for a piecewise linear cost
function for energy storage devices using linear programming (LP). The LP
formulation is based on the equivalent minimization of the epigraph. This
formulation considers ramping and capacity constraints, charging and
discharging efficiency losses of the storage, inelastic consumer load and local
renewable generation in presence of net-metering which facilitates selling of
energy to the grid and incentivizes consumers to install renewable generation
and energy storage. We consider the case where the consumer loads, electricity
prices, and renewable generations at different instances are uncertain. These
uncertain quantities are predicted using an Auto-Regressive Moving Average
(ARMA) model and used in a model predictive control (MPC) framework to obtain
the arbitrage decision at each instance. In numerical results we present the
sensitivity analysis of storage performing arbitrage with varying ramping
batteries and different ratio of selling and buying price of electricity.
