A microprocessor based UPS control unit