Measurement, Control and Protection in a Smart Grid with a Reference to Energy Management Systems