A passivity-based solution for CCM-DCM boost converter power factor control