Conversion of ac power input into dc power output without possibility of reversal