Parametric average value modeling of flyback converters in ccm and dcm including parasitics and snubbers