A cascaded multilevel converter configured to convert plural DC voltages to AC voltage for supply to a transmission grid, the cascaded multilevel converter comprising a plurality of modules (114, 115, 116) coupled to each other to form a branch, each of the modules comprising a switching circuit and a DC link for supplying DC voltage to the switching circuit, and a controller configured to control the switching circuit of each module to generate an AC voltage in the branch, wherein the controller is configured to: receive a reference voltage value for the DC link voltage of each module, determine for each module a voltage across a capacitor of the DC link of the module based on the DC link voltage measurement of each module, determine for each module a reference power value for charging the capacitor of the DC link of the module to the reference voltage value for the module, determine, from the reference power values of the modules, a common reference AC current value for AC current in the branch, wherein the common reference AC current value is constructed per branch by summing the individual power references from the modules in the branch to obtain a total branch power demand, determine, from the common reference AC current value, a common reference AC voltage value for AC voltage in the branch, determine for each module a reference AC voltage value using the common reference AC voltage value and the reference power value for the module, and generate a pulse width modulation signal to control the switching circuit of each module based on the reference AC voltage value for the module and the voltage across the capacitor of the module; wherein the controller is configured to determine the reference power value for each module based on a difference between squared values of the voltage across the capacitor of the DC link of the module and the reference voltage value for the module. receive a reference voltage value for the DC link voltage of each module, determine for each module a voltage across a capacitor of the DC link of the module based on the DC link voltage measurement of each module, determine for each module a reference power value for charging the capacitor of the DC link of the module to the reference voltage value for the module, determine, from the reference power values of the modules, a common reference AC current value for AC current in the branch, wherein the common reference AC current value is constructed per branch by summing the individual power references from the modules in the branch to obtain a total branch power demand, determine, from the common reference AC current value, a common reference AC voltage value for AC voltage in the branch, determine for each module a reference AC voltage value using the common reference AC voltage value and the reference power value for the module, and generate a pulse width modulation signal to control the switching circuit of each module based on the reference AC voltage value for the module and the voltage across the capacitor of the module; wherein the controller is configured to determine the reference power value for each module based on a difference between squared values of the voltage across the capacitor of the DC link of the module and the reference voltage value for the module.