improved pwm ration duty cycle to frequency