A power supply system for a lighting unit, said power supply system comprising: a driver adapted to receive an AC or DC input power supply at an input, and to convert the input power supply into a driving current at an output for supply to the lighting unit; an interface to an energy storage device for providing a secondary power supply; a converter adapted: in a first mode to connect to said output of said driver for diverting at least a part of the driving current from the lighting unit to charge the energy storage device; in a second mode to connect to the lighting unit for converting the secondary power supply to drive the lighting unit; and in a third mode to drive the lighting unit from a grid at the input without charging or discharging the energy storage device; and a controller to actively control said converter and the output of said driver synchronously to maintain the current through the lighting unit when switching the converter between the third mode and one of the first and second modes, wherein the controller, when to actively control said converter and the output of said driver synchronously when switching the converter between the third mode and the second mode, is adapted to: obtain an output of the converter, and control the output of the driver according to the obtained output of the converter; or obtain an output of the driver, and control the output of the converter according to the obtained output of the driver. a driver adapted to receive an AC or DC input power supply at an input, and to convert the input power supply into a driving current at an output for supply to the lighting unit; an interface to an energy storage device for providing a secondary power supply; a converter adapted: in a first mode to connect to said output of said driver for diverting at least a part of the driving current from the lighting unit to charge the energy storage device; in a second mode to connect to the lighting unit for converting the secondary power supply to drive the lighting unit; and in a third mode to drive the lighting unit from a grid at the input without charging or discharging the energy storage device; and in a first mode to connect to said output of said driver for diverting at least a part of the driving current from the lighting unit to charge the energy storage device; in a second mode to connect to the lighting unit for converting the secondary power supply to drive the lighting unit; and in a third mode to drive the lighting unit from a grid at the input without charging or discharging the energy storage device; and a controller to actively control said converter and the output of said driver synchronously to maintain the current through the lighting unit when switching the converter between the third mode and one of the first and second modes, wherein the controller, when to actively control said converter and the output of said driver synchronously when switching the converter between the third mode and the second mode, is adapted to: obtain an output of the converter, and control the output of the driver according to the obtained output of the converter; or obtain an output of the driver, and control the output of the converter according to the obtained output of the driver. obtain an output of the converter, and control the output of the driver according to the obtained output of the converter; or obtain an output of the driver, and control the output of the converter according to the obtained output of the driver.