Fault diagnosis in dynamic systems: theory and application