Design a Solar Farm with Artificial Intelligence

Charles Xie
7 min readJan 1, 2021

An updated version of this article is available at: https://intofuture.org/aladdin-design-solar-farm-with-ai.html

Everyone loves to maximize the return on investment (ROI). If we can effortlessly find a solution that pays a higher profit — even for only a few more dollars, why not? The problem is that, in many complicated engineering cases in reality, such as designing a solar farm, we often don’t know exactly what the optimal solutions are. We may know how to get some good solutions based on what textbooks or experts assert, but no one in the world can be 100% sure that there aren’t any better ones waiting to be discovered beyond the solution space that we have explored thus far. As humans, we can easily get complacent and settled with the solutions that we feel good about, leaving the job (and the reward) of finding better solutions for another time or to someone else.

Artificial intelligence (AI) is about to change all that. As design is essentially an evolution of solutions, AI techniques such as genetic algorithms (GA) are an excellent fit to the nature of many design problems and can generate a rich variety of competitive solutions in the same way genetics does for biology (no two leaves are exactly the same but they both work well for the plant). These powerful tools have the potential to help people learn, design, and discover novel things. In this article, we demonstrate how GA can be used to design a photovoltaic (PV) solar farm. We first provide a short screencast video in which we used the daily output or profit as the objective function to speed up the animation so that you can get a concrete idea about the evolution of design solutions driven by GA. The actual computation was based on using the annual output or profit as the objective function, presented in the text that follows the video. Note that the design process was still geared towards a single objective (i.e., the total output in kWh or the total profit in dollars over a given period of time). We will address design problems with multiple independent objectives later.

In GA, the solution depends largely on the choice of the objective function (or the fitness function), which specifies how the goal is formulated and calculated. For example, if the goal is to generate as much electricity as possible on a given piece of land without the concern about the cost of the solar panels, a design in which the solar panels are closely packed may be a good choice. On the other hand, if the goal is to generate as much electricity as possible from each individual solar panel because of their high price, a design in which rows of solar panels are far away from one another would be a good choice. Not surprisingly, in the case shown in the video, a single row of solar panels was found as the best solution. Aiming at maximizing the profit, real-world solutions always lie between these two extremes, which is why they must be solved using the principles of engineering design. The video above clearly illustrates the design evolution driven by GA in the three cases (the two extremes and an intermediate).

Figure 1. A 3D model of an existing solar farm in Massachusetts.

To test the usefulness of the GA implementation in the Aladdin software for solving real-world problems, we picked an existing solar farm in Massachusetts to see if GA could find better solutions. We built a3D model of the solar farm based on the information shown on Google Maps (Figure 1) and calculated its annual output using Aladdin. Because we couldn’t be exactly sure about the tilt angle, we also tweaked it a bit manually and ensured that an optimal tilt angle for the array be chosen (we found it to be around 32° facing south in this case). The existing solar farm has 4,542 solar panels, capable of generating 2,255 MWh of electricity per year, based on the analysis result of Aladdin.

Disclaimer: The selection of this site was purely for the purpose of scientific research and any opinion expressed as a result of this research should be viewed as exploratory and should not be considered as any kind of verdict on the existing solar farm and its designer(s). There might be other factors beyond our comprehension that compelled a designer to choose a particular trade-off. The purpose of this article is to show that, if we know all the factors needed to be considered in such a design task, we can use AI to augment our intelligence, patience, and diligence.

Aladdin has a tool that allows the user to draw a polygon within which the solar panels would be installed. This polygon is marked by white lines. Using this tool, we can ensure that our solar panel arrays will always be confined to the specified area. This took care of an important spatial constraint and guaranteed that GA would always generate solutions on approximately the same land parcel as is with the existing solar farm.

For the objective function, users can select the total annual output, the average annual output of a solar panel, or the annual profit. We chose the annual profit and assumed that the generated electricity would sell for 22.5¢ per kWh (the 2018 average retail price in Massachusetts) and the daily cost of a solar panel (summing up the cost of maintenance, financing, and so on) would be 20¢. We don’t know how accurate these ROI parameters are. But let’s just go with them for now. The annual profit is the total sale revenue minus the total operational cost. Qualitatively, we know that a higher electricity price and a lower operational cost would both favor using more solar panels whereas a lower electricity price and a higher operational cost would both favor using less solar panels. Finding the sweet spots in the middle requires quantitative analyses and comparisons of many different cases, a repetitive task that can be “outsourced” to AI.

Figure 2. The results of 10 iterations.

In Aladdin, GA always starts with the current design as an individual of the first generation (so if you already have a good design, it will converge quickly). For GA to not fixate on the existing solar farm, we created an initial model that had only a rack with a few solar panels on it, oriented at a zero tilt angle. The size of the population was set to be 20. So at the beginning, this initial model would compete with 19 randomly generated solutions and was almost guaranteed to lose the chance to enter the next generation. To pause GA so that we can check intermediate results, we let GA run for only 10 generations each time. For convenience, let’s call every 10 generations of GA evolution an iteration. Figure 2 shows that GA generated solutions below the supposed human performance in the first two iterations but quickly surpassed it after that. The solution kept improving but got stuck in iterations 5–7 and then it advanced again and stagnated again in iterations 8–10. This process could continue indefinitely, but we decided to terminate it after 10 iterations, or 100 generations. By this time, Aladdin had generated and evaluated 2,000 solutions, which took a few hours as it had to run 2,000 simulations of annual cycle for thousands of solar panels.

Figure 3: The best design from 2,000 solutions

The best solution (Figure 3) that emerged from these 2,000 generated solutions used 5,420 solar panels fixed at a tilt angle of 28.3° to generate 2,667 MWh per year and was about 16% better than the existing one based on the ROI model assumed above. The second best solution (Figure 4) used 4,670 solar panels fixed at a tilt angle of 38.6° to generate 2,340 MWh per year and was about 5.5% better than the existing one based on the ROI model. Note that if we used the average annual output per solar panel as the criterion, the second best solution would actually be better than the best one, but we know that the average panel output is not a good choice for the fitness function as it may result in an optimal solution with very few solar panels.

Figure 4: The second best design from 2,000 solutions.

In conclusion, Aladdin can be used to automatically search a large volume of the solution space and find a number of different solutions for the designer to pick and choose. The ability of AI to transcend human limitations in complex design is a significant application of AI that is going to reshape our world. We predict that future work will rely more and more on this power and today’s students must get ready for the big time.

--

--

Charles Xie

Computational Scientist, Physicist, & Inventor at the Institute for Future Intelligence https://intofuture.org