Algorithms for structural identification and damage detection