A method for controlling a modular converter, a) the modular converter comprising a plurality of M converter cells, each converter cell comprising i) an AC-to-DC converter, a primary side of which represents a primary side of said converter cell, said AC-to-DC converter being an active AC-to-DC converter comprising a plurality of semiconductor switches (46a-d), and operable in one of a plurality of modes, the plurality of modes comprising a bypassed mode, an active mode, and a diode mode, ii) a DC-to-DC converter, a secondary side of which represents a secondary side of said converter cell; with iii) a secondary side of said AC-to-DC converter and a primary side of said DC-to-DC converter connected in parallel with a DC-link capacitor, wherein b) the primary sides of the converter cells are connected in series, with a first converter cell connected to a line, preferably a medium voltage line, providing an AC line voltage U(t) having a peak value Û, and an M -th converter cell connected to a ground; the method characterized by the steps of: wherein in said active mode the semiconductor switches are pulsed, and in said diode mode the semiconductor switches are not pulsed and are in a blocking state; c) for a given allowable range [ U min, U max] of a DC-voltage U DC at the DC-link capacitor i) determining whether any integer number N ≤ M exists for which ii) U / N < U min, and iii) Û / (N-1) > U max; and d) if the condition under c) is fulfilled i) selecting an integer number L with L < N, ii) selecting a first set of N - L converter cells, iii) selecting a second set of L converter cells, iv) putting the AC-to-DC converter of, preferably all, converter cells which have not been selected in steps ii) or iii) into bypassed mode, v) putting the AC-to-DC converter of, preferably all, converter cells from the first set into diode mode, vi) putting the AC-to-DC converter of, preferably all, converter cells from the second set into active mode. a) the modular converter comprising a plurality of M converter cells, each converter cell comprising i) an AC-to-DC converter, a primary side of which represents a primary side of said converter cell, said AC-to-DC converter being an active AC-to-DC converter comprising a plurality of semiconductor switches (46a-d), and operable in one of a plurality of modes, the plurality of modes comprising a bypassed mode, an active mode, and a diode mode, ii) a DC-to-DC converter, a secondary side of which represents a secondary side of said converter cell; with iii) a secondary side of said AC-to-DC converter and a primary side of said DC-to-DC converter connected in parallel with a DC-link capacitor, wherein i) an AC-to-DC converter, a primary side of which represents a primary side of said converter cell, said AC-to-DC converter being an active AC-to-DC converter comprising a plurality of semiconductor switches (46a-d), and operable in one of a plurality of modes, the plurality of modes comprising a bypassed mode, an active mode, and a diode mode, ii) a DC-to-DC converter, a secondary side of which represents a secondary side of said converter cell; with iii) a secondary side of said AC-to-DC converter and a primary side of said DC-to-DC converter connected in parallel with a DC-link capacitor, wherein b) the primary sides of the converter cells are connected in series, with a first converter cell connected to a line, preferably a medium voltage line, providing an AC line voltage U(t) having a peak value Û, and an M -th converter cell connected to a ground; the method characterized by the steps of: wherein in said active mode the semiconductor switches are pulsed, and in said diode mode the semiconductor switches are not pulsed and are in a blocking state; c) for a given allowable range [ U min, U max] of a DC-voltage U DC at the DC-link capacitor i) determining whether any integer number N ≤ M exists for which ii) U / N < U min, and iii) Û / (N-1) > U max; and i) determining whether any integer number N ≤ M exists for which ii) U / N < U min, and iii) Û / (N-1) > U max; and d) if the condition under c) is fulfilled i) selecting an integer number L with L < N, ii) selecting a first set of N - L converter cells, iii) selecting a second set of L converter cells, iv) putting the AC-to-DC converter of, preferably all, converter cells which have not been selected in steps ii) or iii) into bypassed mode, v) putting the AC-to-DC converter of, preferably all, converter cells from the first set into diode mode, vi) putting the AC-to-DC converter of, preferably all, converter cells from the second set into active mode. i) selecting an integer number L with L < N, ii) selecting a first set of N - L converter cells, iii) selecting a second set of L converter cells, iv) putting the AC-to-DC converter of, preferably all, converter cells which have not been selected in steps ii) or iii) into bypassed mode, v) putting the AC-to-DC converter of, preferably all, converter cells from the first set into diode mode, vi) putting the AC-to-DC converter of, preferably all, converter cells from the second set into active mode.