The development and use of single‐phase electric energy router (SPEER) makes the household power system operate more reliably and bring economic income at the same time. This paper presents an economic energy optimization management method of SPEER with historical data of previous day and real‐time data in the grid‐connected mode of SPEER, which can be realized by DSP. First, based on the exchange power between the SPEER and the grid, the optimal charging and discharging power of the battery to make up for the energy difference between the previous day and the real time is obtained through the particle swarm intelligence algorithm, and the optimal economic model of SPEER operation is established. Then, on the hardware experimental platform, DSP is used to realize the real‐time optimization, and the optimal economic optimization algorithm proposed in this paper is implemented and verified on hardware experimental platform. The contradiction between the complexity of optimization algorithm and the limitation of hardware resources is solved in the proposed energy management system.