An Intelligent Algorithm for Smart Grid Protection Applications