Modified Check Condition for left and right PWM to resolve conflict between forward and backward motions