Text this: A Novel Simulink-Based Implementation of Cosine Comparator Logic for Gate Control in Three-Phase Controlled Rectifiers