A novel repetitive square wave voltage generator used for insulation evaluation of rotating machines driven by power electronics