Diagnostic models in mechatronic systems