1. A method for controlling a modular converter, the modular converter including a plurality of converter modules configured for converting an input voltage into an output voltage to be supplied to a load, the method comprising: receiving a control input reference vector, a control input vector and a control input parameter vector; determining a control output reference vector from the control input reference vector, the control input vector and the control input parameter vector in a first control stage; and controlling the converter modules by generating switching signals based on the control output reference vector in a further control stage; wherein the control output reference vector is determined by: predicting at least one future state of the modular converter with a prediction model of the modular converter, wherein the prediction model is adapted for calculating the future state of the modular converter based on an actual state of the modular converter, a state of the modular converter having current values and/or voltage values of the modular converter; enhancing the at least one future state with respect to an objective function by minimizing the objective function with respect to a dynamical evolution in time of the prediction model, wherein the objective function is based on a cost value associated with switching costs of the converter modules, the objective function penalizes differences between the control input reference vector at a time step and a predicted evolution of the control input vector at the time step, and the objective function minimizes a change in evolution of the control output reference vector; and determining the control output reference vector from the future state.