Energy balance of reduced order models for unsteady flows using sparse coding