A Method For Parameter Estimation And System Identification For Model Based Diagnostics