A fuzzy-logic-based controller for active rectifier