GENERALIZED ENERGY STORAGE IN DISTRIBUTED ENERGY SYSTEMS