  We consider the economic dispatch (ED) for an Energy Internet composed of
energy routers (ERs), interconnected microgrids and main grid. The microgrid
consists of several bus nodes associated with distributed generators (DGs) and
intelligent control units (ICUs). We propose a distributed ED algorithm for the
grid-connected microgrid, where each ICU iterates the estimated electricity
price of the distribution system and the estimation for the average power
mismatch of the whole microgrid by leader-following and average consensus
algorithms, respectively. The ER iterates the incremental power exchanged with
the distribution system. By constructing an auxiliary consensus system, we
prove that if the communication topology of the Energy Internet contains a
spanning tree with the ER as the root and there is a path from each ICU to the
ER, then the estimated electricity price of the distribution system converges
to its real value, the power supply and demand achieves balance and the ED
achieves optimal asymptotically. Furthermore, we propose an autonomous
distributed ED algorithm covering both grid-connected and isolated modes of the
microgrid by feeding back the estimated average power mismatch for updating the
incremental costs with penalty factor. It is proved that if the communication
topology of the microgrid is connected and there exists an ICU bi-directionally
neighboring the ER, then the microgrid can switches between the two modes
reliably. The simulation results demonstrate the effectiveness of the proposed
algorithms.
