Aiming at the drawbacks of the optimization and design methods and the practical production goal of least energy consumption, a new theory is raised that the gas of the layer released energy in the lifting process including two parts: dissolved-gas expansion energy and free-gas expansion energy. The motor's input power of rod pumping system is divided into hydraulic horse power, gas expansion power, surface mechanical loss power, subsurface loss power. Using the theory of energy-conservation, the simulation model of free-gas expansion power has been established, the simulating models of the motor's input power which are based on the energy method have been improved and the simulation precision of system efficiency has been enhanced. The entire optimization design models have been set up in which the single-well output is taken as the optimum design variable, the planed production of all oil wells in an overall oilfield as the restraint condition and the least input power of the overall oilfield as the object. Synthesizing the optimization design results of the single well and the entire oilfield, the optimal output and the optimal swabbing parameters of all wells can be got. The actual optimizing examples show that the total power consumption designed by the entire optimization method is less 12.95% than that by the single optimization method.