Dynamic gait generation of legged robots can considered as a problem to generate limit cycles in a phase space from the mathematical point of view. One of the basic necessary conditions of dynamic walking is to restore the mechanical energy that is dissipated by an impact between the swing leg and the floor at the transition instant. Energy-effective dynamic gait generation then yields the problem on how to restore the mechanical energy effectively during the swing phase. This paper first unifies the gait generation methods proposed so far by introducing a variable virtual gravity concept and two solution formulas. Taking up the energy tracking control and virtual passive dynamic walking as two typical methods, the paper analyzes the control performances from the view of points of energy efficiency and robust stability through numerical simulations. The obtained results are evaluated based on some criterion, and the conditions for maximum efficiency are theoretically clarified. Throughout this paper, we aim to clarify mathematical principle of energy-effective dynamic walking.