1. A method for controlling a modular converter with a plurality of converter modules, each converter module having two power connectors, power semiconductors and an energy storage and/or an energy source, wherein the power connectors are short-circuited in a first switching state of the power semiconductors and are connected to the energy storage and/or energy source in a second switching state of the power semiconductors, the method comprising: selecting possible future switching sequences of the modular converter based on an actual converter switching state, wherein a switching sequence is a series of converter switching states with at least one converter switching state, and the converter switching state includes switching states of the plurality of converter modules; predicting a future current trajectory for each switching sequence based on actual internal currents and on actual internal voltages; determining candidate sequences from the switching sequences, wherein a candidate sequence is a switching sequence with a current trajectory within predefined bounds with respect to a reference current or, when the current traiectory is outside the predefined bounds, moves the current trajectory closer to the predefined bound; predicting future module voltages for each candidate sequence based on actual module voltages and the current trajectory of a respective candidate sequence; evaluating a cost function for each candidate sequence, wherein the cost function is based on converter switching states of at least one of the switching sequence, the future module voltages and future currents; and selecting a next converter switching state as a first converter switching state of a candidate sequence with a minimal cost among evaluated cost functions.