An architecture for a power supply with an integrated UPS control system to which generic batteries may be connected. Such an architecture greatly reduces the overall cost, complexity, size and inefficiency of providing uninterruptible power to a device such as a computer system.