This paper establishes a power planning model based on minimizing operation and maintenance cost. The model take into account the costs of the wind turbines, photovoltaic cells, batteries, biomass generators, diesel generators, power electronics devices and communications facilities operation and maintenance, credit them in the objective function, and considering some certain constraints, use particle swarm algorithm model, by calculating and, simulating examples, to find the optimal solution, Finally to find the conclusion that to use wind turbines, photovoltaic cells and batteries for electric as much as possible.