There are several ways to reduce the ripple magnitude for direct torque-controlled permanent magnet synchronous motor (PMSM) drives. In this work, the compensated duty ratio optimized direct torque control (DDTC-TC) method was proposed to reduce the ripple for three-phase PMSM. The proposed control strategy employs the simplicity of conventional DTC (CDTC) and compensation of the reference torque to enforce the developed torque to oscillate around the required value. A torque error square minimization technique is employed to determine the duty ratio. The magnitude of the developed torque by the PMSM depends on the torque slope during the active and null voltage periods. The slope of the torque during each period is computed online. Based on the online computed slopes, the magnitude of the switching period and compensation torque were calculated. The ripple reduction capability of the proposed control scheme is tested using Matlab Simulink and a hardware in loop system. Results indicate that the control scheme is effective. Specifically, the torque and speed ripples are very small. The torque ripple during speed fluctuation is less for open-end winding PMSM. In addition, the proposed scheme is tested for four-quadrant operation, and the scheme is effective for four quadrant operation. Finally, verification of the effectiveness of the proposed scheme is performed using OPAL-RT-RT (OP4500). Verification indicates that the proposed scheme is effective.