A new algorithm for smart grid protection based on synchronized sampling