A power supply apparatus comprising: an input terminal adapted to receive an external AC power; an output terminal adapted to output a first AC power, a first power conversion unit adapted to convert the received external AC power to a first DC power and outputs the first DC power; a second power conversion unit adapted to convert a DC power to a first AC power and outputs the first AC power to the output terminal; a first node electrically connected between the output of the first power conversion unit and the input of the second power conversion unit; a control unit adapted to control the operations of the first and second power conversion units (12, 13); wherein a first and a second battery group (15-1, 15-2) are each connected to the control unit and electrically connectable to first node, wherein the control unit is adapted to dynamically allocate one of the first and the second battery group as a first dynamic battery group and the other of the first and the second battery group as a second dynamic battery group depending on a predetermined condition, wherein the first dynamic battery group acts in a power supply mode, and the second dynamic battery group acts in a standby mode, characterized by a bypass circuit electrically connected to the input terminal and the output terminal to bypass the first and second power conversion units (12, 13), wherein the predetermined condition corresponds to a second emergency situation, which corresponds to the case where a power for a load at the output terminal of the power supply apparatus exceeds the power at the input terminal, and wherein in the second emergency situation, the control unit is adapted to control supply of the external AC power to the output terminal of the power supply apparatus in addition to the energy of the first dynamic battery group. an input terminal adapted to receive an external AC power; an output terminal adapted to output a first AC power, a first power conversion unit adapted to convert the received external AC power to a first DC power and outputs the first DC power; a second power conversion unit adapted to convert a DC power to a first AC power and outputs the first AC power to the output terminal; a first node electrically connected between the output of the first power conversion unit and the input of the second power conversion unit; a control unit adapted to control the operations of the first and second power conversion units (12, 13); wherein a first and a second battery group (15-1, 15-2) are each connected to the control unit and electrically connectable to first node, wherein the control unit is adapted to dynamically allocate one of the first and the second battery group as a first dynamic battery group and the other of the first and the second battery group as a second dynamic battery group depending on a predetermined condition, wherein the first dynamic battery group acts in a power supply mode, and the second dynamic battery group acts in a standby mode, characterized by a bypass circuit electrically connected to the input terminal and the output terminal to bypass the first and second power conversion units (12, 13), wherein the predetermined condition corresponds to a second emergency situation, which corresponds to the case where a power for a load at the output terminal of the power supply apparatus exceeds the power at the input terminal, and wherein in the second emergency situation, the control unit is adapted to control supply of the external AC power to the output terminal of the power supply apparatus in addition to the energy of the first dynamic battery group.