Micro-grid capacity optimization is an important part of the micro-grid planning. In this paper, considering the correlation of wind speed and illumination intensity and load with LHS technology generated on the basis of the correlation sample, this paper discusses the method for the power configuration and the choice of indicators is established based on the total life cycle cost and the mathematical evaluation model of the power supply reliability. The initial data for the whole year hourly wind speed and temperature hour load of some area in battery, access to different situations, the model is solved by particle swarm algorithm, obtains the configuration. Set different index will draw the corresponding configuration results, to meet user demand diversity.