A Generic Framework for Prognostics of Complex Systems