A digitally variable on-time controlled PFC flyback converter with primary-side regulation