Energy Management System for Analysis and Data Exchange Methodology in the Smart Grid