The present disclosure relates to a method performed by a network controller 4 of an electrical microgrid 1 comprising a plurality of energy storages 2. Each of the energy storages is associated with a respective storage controller 3. The method comprises receiving information about a measurement made at a remote location RL in the microgrid. The method also comprises obtaining respective participation factors in respect of the remote location for each of at least a first energy storage 2a and a second energy storage 2b of the plurality of energy storages. The method also comprises obtaining respective states of charge of each of said at least first and second energy storages. The method also comprises, for each of the at least first and second energy storages, calculating a reference value for the energy storage 2a or 2b, and sending the reference value to the storage controller 3a or 3b with which the energy storage is associated. The calculating comprises calculating the reference value based on the obtained participation factors and the obtained states of charge.