Based on an optimization method proposed by Polish scholars, the paper combines the energy transfer characteristics of power system, by constructing a Lagrange function, derives the expression of optimal current in single-phase and three-phase circuits, decomposes the current components and provides the detection algorithm for optimal current. By the simulation analysis, the paper verifies the compensation effect of the optimization method, the method can improve the efficiency of energy transfer in circuit noticeably. Finally, the method can explain the limitations of Fryze theory in current decomposition when voltage sources have internal impedance.