Text this: Microcontroller-based phase-angle measurement and correctiontechnique