Regulating PWM Voltage

My approach allows pulse width measurements, too.