Quality cost in electrical power systems