A method for controlling an electrical converter (10) is provided. The electrical converter (10) comprises a main stage (12) adapted for converting a
DC voltage into an intermediate
voltage having at least two
voltage levels and a filter
cell stage (14) with a filter
cell (30) for each phase of the main stage (12), with the main stage (12) comprising a DC link (20) and with each filter
cell (30) being adapted for adding or subtracting a
cell voltage of the filter cell (30) to the intermediate
voltage. The method comprises the steps of: determining a first optimized
pulse pattern (OPPMC,abc) for the main stage (12) and a second optimized
pulse pattern (OPPAF,abc) for the filter cells (30) from an offline-computed optimized
pulse pattern (OPPbase), wherein the first optimized pulse pattern (OPPMC,abc) comprises switching instants for the main stage (12) over a next computation window (αwin) and wherein the second optimized pulse pattern (OPPAF,abc) comprises switching instants for filter cells (30) over the next computation window (αwin); determining a neutral point potential (VNP) depending on a measured lower
DC link voltage (Vbot) and a measured upper
DC link voltage (Vtop) of the DC link (20); determining a first balancing
signal (UNPbal,abc) for the main stage (12) depending on the determined neutral point potential (VNP); determining a second balancing
signal (UAFbal,abc) for the filter cells (30) depending on measured cell voltages (VAFC,abc) of the filter cells (30); determining a first differential mode voltage (UNPbal,DM,abc) from the first balancing
signal (UNPbal,abc); determining a second differential mode voltage (UAFbal,DM,abc) from the second balancing signal (UAFbal,abc); determining a first voltage change (ΔUMC,abc) from the first balancing signal (UNPbal,abc) and the second differential mode voltage (UAFbal,DM,abc); determining a second voltage change (ΔUAF,abc) from the second balancing signal (UAFbal,abc) and the first differential mode voltage (UNPbal,DM,abc); adjusting the first optimized pulse pattern (OPPMC,abc) by moving its switching instants depending on the first voltage change (ΔUMC,abc) over the next computation window (αwin) and adjusting the second optimized pulse pattern (OPPAF,abc) by moving its switching instants depending on the second voltage change (ΔUAF,abc) over the next computation window (αwin); determining a reference flux trajectory (Ψref) over the next computation window (αwin) depending on the adjusted first and second optimized pulse pattern (OPPMC,abc, OPPAF,abc); and controlling the electrical converter (10) depending on the reference flux trajectory (Ψref) and on the adjusted first and second optimized pulse pattern (OPPMC,abc, OPPAF,abc).