A new distance relay based on a weighted recursive least-square algorithm