A method for controlling power distribution through an electrical network comprising the steps of: a) modelling the network to: relate active and reactive power flow ( P ij, Q ij) respectively in at least one designated branch connecting a pair of nodes ( ij) of the network to a combination of measured voltage and active power being injected at a node i of the network to which a device that injects and absorbs reactive power is connected; relate an expected voltage ( V MinD) at the node i at a given level of network demand to a combination of active and reactive power being injected by said device at said node i; b) measuring voltage, and injected reactive power and active power at the node i; c) calculating a desired set voltage V Set Old at said node i which maximizes active power flow in said designated branch for a given measured voltage and active power injected at the node i; d) calculating said expected voltage ( V MinD) based on said injected reactive and active power; e) calculating an adjusted desired set voltage V Set New based on said expected voltage; f) determining a required adjustment of said device's voltage set point (Δ V) based on a difference between said adjusted desired set voltage and said measured voltage; g) checking a complex power constraint S ij + for said designated branch as a function of said injected power and said adjusted desired set voltage (Δ V) to determine a possible required change to said device's active power setting (Δ P); h) calculating a required change (Δ Q) to said device's reactive power setting as a function of said adjusted desired set voltage and said device's active power setting; and i) communicating said required change to said active power setting or said reactive power setting to said device. a) modelling the network to: relate active and reactive power flow ( P ij, Q ij) respectively in at least one designated branch connecting a pair of nodes ( ij) of the network to a combination of measured voltage and active power being injected at a node i of the network to which a device that injects and absorbs reactive power is connected; relate an expected voltage ( V MinD) at the node i at a given level of network demand to a combination of active and reactive power being injected by said device at said node i; relate active and reactive power flow ( P ij, Q ij) respectively in at least one designated branch connecting a pair of nodes ( ij) of the network to a combination of measured voltage and active power being injected at a node i of the network to which a device that injects and absorbs reactive power is connected; relate an expected voltage ( V MinD) at the node i at a given level of network demand to a combination of active and reactive power being injected by said device at said node i; b) measuring voltage, and injected reactive power and active power at the node i; c) calculating a desired set voltage V Set Old at said node i which maximizes active power flow in said designated branch for a given measured voltage and active power injected at the node i; d) calculating said expected voltage ( V MinD) based on said injected reactive and active power; e) calculating an adjusted desired set voltage V Set New based on said expected voltage; f) determining a required adjustment of said device's voltage set point (Δ V) based on a difference between said adjusted desired set voltage and said measured voltage; g) checking a complex power constraint S ij + for said designated branch as a function of said injected power and said adjusted desired set voltage (Δ V) to determine a possible required change to said device's active power setting (Δ P); h) calculating a required change (Δ Q) to said device's reactive power setting as a function of said adjusted desired set voltage and said device's active power setting; and i) communicating said required change to said active power setting or said reactive power setting to said device.