Self-Diagnostic Encoders Find Problems Before They Stop Your Machinery