Circuit averaging and numerical average value modeling of flyback converter in CCM and DCM including parasitics and snubbers