  The co-optimization of behind-the-meter distributed energy resources is
considered for prosumers under the net energy metering tariff. The distributed
energy resources considered include renewable generations, flexible demands,
and battery energy storage systems. An energy management system co-optimizes
the consumptions and battery storage based on locally available stochastic
renewables by solving a stochastic dynamic program that maximizes the expected
operation surplus. To circumvent the exponential complexity of the dynamic
program solution, we propose a closed-form and linear computation complexity
co-optimization algorithm based on a relaxation-projection approach to a
constrained stochastic dynamic program. Sufficient conditions for optimality
for the proposed solution are obtained. Numerical studies demonstrate orders of
magnitude reduction of computation costs and significantly reduced optimality
gap.
