A power system consisting of a Photovoltaic (PV) array panel, diesel generator Battery banks and load is considered in this paper. A novel approach is proposed for optimal design of hybrid renewable energy systems. The particle swarm optimization (PSO) algorithm has been applied to minimize simultaneously the total cost of the system, loss of load probability (LLP) and CO2 emission of the hybrid power generation system in isolated rural village in south Algeria named “Ilamane”. These geographical data is as follows: Latitude: 23.12° N, Longitude: 5.27° E and Altitude: 1928m. This study also reveals the Importance of PV and battery banks systems. Without their connections the annual cost of diesel generator becomes considerably high. Moreover, the proposed method is effectively used to deal with the cost reduction of a hybrid system under non-existence or unmet load condition, finally the results of our algorithm is compared with the software homer.