A generalized flexibility matrix-based model updating method for damage detection of plane truss and frame structures