Closed-Loop Subspace Identification And Fault Diagnosis With Optimal Structured Residuals