The constant increase in energy demand and the need to reduce the carbon footprint on the environment has put countries in a race against time, looking for alternative resources or ways to supply this need. One of the main resources is solar radiation, which can be used to generate energy, initially on a small scale, but in recent years has been directed towards supplying large cities. The economic, political, and social investment must respond to planning and expansion criteria in order to generate feasible proposals. Through simulation of a real electrical system, the voltage instability was determined, which was corrected at software level by entering a photovoltaic solar plant, being this dimensioned from the PV curve obtained. Finally, the optimal location for the development of a solar photovoltaic plant among four possible scenarios was obtained through the application of an optimization algorithm. This approach was converted into an alternative applicable to different geographical locations.