Exergy method for the diagnosis of energy systems using measured data