A variable frequency angle-based repetitive control for torque ripple reduction in PMSMs