A Model-Based Approach to Diagnostics and Health Management