Evaluation of Pattern Recognition Algorithms for Applications on Power Factor Compensation