A method of active flux control for an output stage of a power converter for an electric rail network, the output stage comprising a transformer connected to the power converter, the method comprising the steps of: deriving an estimated magnetisation flux (Φ̂) of the transformer using a closed-loop estimator comprising: a modelled magnetisation flux, wherein the output of the modelled magnetisation flux is an open-loop estimate of the magnetisation flux (Φ m) of the transformer obtained from a magnetisation curve adapted to the transformer and an estimate of a magnetisation current (I m) of the transformer, and a flux model comprising a dynamic model of the magnetisation flux of the transformer, wherein the output of the flux model is the estimated magnetisation flux (Φ̂) of the transformer and wherein the inputs of the flux model are a measured secondary current (I s), a measured converter voltage (U s), and an input derived (ΔΦ) from the difference between the output of the flux model and the output of the modelled magnetisation flux; calculating a direct current DC component of the estimated magnetisation flux (Φ̂ dc) of the transformer; and carrying out current control by injecting a DC current component into the transformer, wherein the DC current component is calculated from the DC component of the estimated magnetisation flux (Φ̂ dc) of the transformer. deriving an estimated magnetisation flux (Φ̂) of the transformer using a closed-loop estimator comprising: a modelled magnetisation flux, wherein the output of the modelled magnetisation flux is an open-loop estimate of the magnetisation flux (Φ m) of the transformer obtained from a magnetisation curve adapted to the transformer and an estimate of a magnetisation current (I m) of the transformer, and a flux model comprising a dynamic model of the magnetisation flux of the transformer, wherein the output of the flux model is the estimated magnetisation flux (Φ̂) of the transformer and wherein the inputs of the flux model are a measured secondary current (I s), a measured converter voltage (U s), and an input derived (ΔΦ) from the difference between the output of the flux model and the output of the modelled magnetisation flux; a modelled magnetisation flux, wherein the output of the modelled magnetisation flux is an open-loop estimate of the magnetisation flux (Φ m) of the transformer obtained from a magnetisation curve adapted to the transformer and an estimate of a magnetisation current (I m) of the transformer, and a flux model comprising a dynamic model of the magnetisation flux of the transformer, wherein the output of the flux model is the estimated magnetisation flux (Φ̂) of the transformer and wherein the inputs of the flux model are a measured secondary current (I s), a measured converter voltage (U s), and an input derived (ΔΦ) from the difference between the output of the flux model and the output of the modelled magnetisation flux; calculating a direct current DC component of the estimated magnetisation flux (Φ̂ dc) of the transformer; and carrying out current control by injecting a DC current component into the transformer, wherein the DC current component is calculated from the DC component of the estimated magnetisation flux (Φ̂ dc) of the transformer.