A controller for a voltage source converter , characterised in that said controller includes: an AC vector control element configured to generate an AC voltage demand signal based on a measure of an AC voltage output from the voltage source converter sampled at a sample frequency and a demand value, a module selection element configured to determine a module instruction set based on said AC voltage demand signal , said module instruction set providing switching instructions for a plurality of modules of the voltage source converter to form an output waveform, said AC vector control element configured to generate said AC voltage demand signal in a rotating reference frame space formed by transformation, using a DQ transform, of said measure of the AC voltage output and said demand value into a set of rotating frame sequence terms operating in the rotating reference frame space, wherein said AC vector control element is configured to generate said AC voltage demand signal comprising at least two AC voltage demand values, each comprising an AC voltage demand value at a respective time, the respective times distributed over a sampling period, wherein the at least two AC voltage demand values comprise an AC demand value at a first time and at least one AC voltage demand value at a future time, the AC voltage demand values calculated from the same set of rotating frame sequence terms , said AC voltage demand values determined in said rotating reference frame space, wherein said module selection element is configured to determine the module instruction set for each of the at least one AC voltage demand values at a future time in accordance with the respective times at which demand values are generated; and wherein the at least one of the at least two AC voltage demand values which is generated for the future time is predicted in that it is calculated from the same set of rotating frame sequence terms by shifting the rotating reference frame. an AC vector control element configured to generate an AC voltage demand signal based on a measure of an AC voltage output from the voltage source converter sampled at a sample frequency and a demand value, a module selection element configured to determine a module instruction set based on said AC voltage demand signal , said module instruction set providing switching instructions for a plurality of modules of the voltage source converter to form an output waveform, said AC vector control element configured to generate said AC voltage demand signal in a rotating reference frame space formed by transformation, using a DQ transform, of said measure of the AC voltage output and said demand value into a set of rotating frame sequence terms operating in the rotating reference frame space, wherein said AC vector control element is configured to generate said AC voltage demand signal comprising at least two AC voltage demand values, each comprising an AC voltage demand value at a respective time, the respective times distributed over a sampling period, wherein the at least two AC voltage demand values comprise an AC demand value at a first time and at least one AC voltage demand value at a future time, the AC voltage demand values calculated from the same set of rotating frame sequence terms , said AC voltage demand values determined in said rotating reference frame space, wherein said module selection element is configured to determine the module instruction set for each of the at least one AC voltage demand values at a future time in accordance with the respective times at which demand values are generated; and wherein the at least one of the at least two AC voltage demand values which is generated for the future time is predicted in that it is calculated from the same set of rotating frame sequence terms by shifting the rotating reference frame. <EOS>