It is important to optimize wind turbine positions to mitigate potential wake losses. To perform this optimization, atmospheric conditions, such as the inflow speed and direction, are assigned probability distributions according to measured data, which are propagated through engineering wake models to estimate the annual energy production (AEP). This study presents stochastic gradient descent (SGD) for wind farm optimization, which is an approach that estimates the gradient of the AEP using Monte Carlo simulation, allowing for the consideration of an arbitrarily large number of atmospheric conditions. SGD is demonstrated using wind farms with square and circular boundaries, considering cases with 100, 144, 225, and 325 turbines, and the results are compared to a deterministic optimization approach. It is shown that SGD finds a larger optimal AEP in substantially less time than the deterministic counterpart as the number of wind turbines is increased.

Wind farms are groups of wind turbines that harness the power in the atmospheric boundary layer to provide renewable energy. When a wind turbine absorbs energy from the air, the air downstream of the wind turbine has reduced power, which often reduces the power production of downstream turbines. This is known as the wake effect

Stochastic gradient descent (SGD) is an optimization algorithm commonly used in machine learning when selecting neural network weights

Interestingly, SGD is not often applied to problems with nonlinear constraints, although it can be fruitful to include nonlinear constraints in the context of training a machine learning algorithm. For example, when recognizing three-dimensional pictures of people, it can be useful to impose a constraint that any person's left arm should be close to the same length as their right arm

The wind farm layout optimization problem presents a setting where the objective (AEP) can be formulated as being stochastic (e.g., the AEP is derived from a probability density function), while the constraints (e.g., boundaries and minimum turbine spacing) are firmly deterministic. This paper explores the potential benefits of formulating the wind farm layout optimization problem in this way. As part of this, the Adam algorithm is extended to optimize a stochastic objective with deterministic constraints. To the best of the authors' knowledge, this exact algorithm has not been published before.

This study benchmarks the performance of the proposed SGD approach when compared to conventional gradient-based optimization within the TOPFARM framework

While there are some wind plant optimization studies that resemble our approach, we are not aware of any studies that have applied SGD to the wind farm optimization problem (although SGD has been applied to other problems in engineering optimization, e.g.,

The remainder of the paper is the following. Section

When deciding where to put wind turbines, a typical strategy is to maximize wind farm AEP while ensuring turbines are within the prospective site and are not spaced too closely together. In this study, we examine square and circular wind farms, where the corresponding optimization problems are posed as

The AEP is defined as

The AEP is typically estimated through rectangular quadrature, where the freestream velocity and direction are discretized using evenly spaced intervals,

The AEP can also be estimated through Monte Carlo integration,

The associated AEP gradient can also be approximated through Monte Carlo simulation:

SGD is built upon the steepest descent algorithm. Early SGD algorithms added a moving average term (sometimes referred to as “momentum”) to avoid spurious oscillations

TOPFARM stochastic gradient descent implementation.

for

do

if early_stopping and

if

break

else:

The spacing between turbines is enforced using a penalty term,

Similarly, the distance outside of boundaries is enforced using a penalty term. When considering square wind farms this penalty term is defined as

The total penalty,

In Algorithm 1, the learning rate (

We propose a method for setting free parameters to ensure that all units are consistent. The only free parameters we manually set are the number of optimization iterations and the number of power samples per iteration. The optimization generally becomes more accurate and more expensive as these parameters increase, and users are free to balance this trade-off as they see fit. Our formulation does not guarantee that all intermediate solutions satisfy the constraints, especially in the beginning of the optimization. The constraint multiplier begins on a comparable scale to the AEP and is scheduled to increase so that the constraint gradients overwhelm the AEP gradients as the optimization progresses. The number of iterations,

We initially attempted this approach using the widely used default parameter values in the original Adam algorithm,

The learning rate,

The initial learning rate,

The learning rate is scheduled to decay as

The constraint multiplier,

The wind rose samples,

The SLSQP algorithm

The spacing and boundary constraints are passed to the optimizer as individual inequality constraints. The spacing constraints are defined as

Square wind farm boundaries are represented using four inequality constraints per turbine,

We apply the optimization approaches discussed above to optimize wind power plants of various sizes using the TOPFARM framework

We use the pyOptSparseDriver

The wind rose, visualized in Fig.

Lillgrund wind speed and direction probability mass function with 360 direction bins and five wind speed bins, where the probability mass function is a linear interpolation of coarser measurements.

In all wind farm optimization problems considered, constraint gradients, and the associated penalty function gradients, are computed analytically. The AEP gradient is computed via automatic differentiation. The directions are discretized from 0 to 360

While each Monte Carlo estimate of AEP has significant error, the average error will be close to 0 throughout the course of the SGD optimization.
We compare the accuracy of the Monte Carlo approach (Eq.

Convergence of AEP

In this study, we select 50 samples for every SGD iteration. Figure

Computational time associated with computing the gradient for various wind farm sizes and wind rose sampling strategies. The left panel compares the cost of computing AEP gradients when using different numbers of Monte Carlo samples with the cost of the full factorial wind rose (8280 samples) for farms with various numbers of wind turbines. The right panel compares the cost of Monte Carlo estimates of the AEP gradient for different numbers of samples of the atmospheric conditions and turbines in the wind farm.

The optimization algorithms are timed based on the time elapsed between the first and final optimization gradient evaluations. Each optimization case is run on first-generation AMD EPYC 7351 processors.

In the following subsections, the performance of SGD and SLSQP is compared for wind farms with square and circular boundaries, and the sensitivity of the SGD algorithm is assessed.

The performance of SGD is compared to the deterministic counterpart, considering wind farms with 100, 144, 225, and 324 turbines, with square boundary constraints, using 20 different initial starting conditions to obtain statistically significant results. The AEP, constraint violation (

Optimization results associated with SGD and SLSQP for square wind farms with 100, 144, 225, and 324 turbines, using 20 random initial starting conditions. The AEP (top panels), constraint penalty (middle panels), and computational time (bottom panels) are plotted as boxplots. The SGD results are plotted for

The final layouts associated with one of the random initial conditions used in the 324-turbine analysis, when

The final layouts found using SLSQP

The results of the 100-, 144-, 225-, and 324-turbine wind farm optimization cases are summarized in Table

Results of SGD and deterministic optimizations for various square wind farm sizes. Each optimization case is run using 20 random initial starting conditions, and the mean and standard deviation are reported with respect to these 20 initial points. The SGD results are associated with

To ensure that the previously presented results are not specific to square wind farms, we performed a similar set of analyses examining circular wind farms. The results yield similar trends to the analysis using square wind farms – SGD becomes significantly less time-consuming than SLSQP as the number of turbines increases and generally yields solutions with slightly larger AEPs.

Optimization results associated with SGD and SLSQP for circular wind farms with 100, 144, and 225 turbines, using 20 random initial starting conditions. The AEP (top panels), constraint penalty (middle panels), and computational time (bottom panels) are plotted as box and whisker plots. The SGD results are plotted for

Circular winds farms were optimized using 20 random initial layouts, examining different farm sizes, using the SGD and SLSQP optimization algorithms. The results are summarized in Fig.

The results of the circular wind farm optimization are compared between the SGD and SLSQP optimizers in Table

Results of SGD and deterministic optimizations for various circular wind farm sizes. Each optimization case is run using 20 random initial starting conditions, and the mean and standard deviation are reported with respect to these 20 initial points. The SGD results are associated with

The final layouts found using SLSQP

There are several parameters in the SGD algorithm that were tuned to perform reasonably well. In this section, we investigate the sensitivity of the SGD optimization results with respect to the early stopping option in Algorithm 1, the number of Monte Carlo samples per optimization iteration, the learning rate schedule, and the initial and final learning rates.

As the optimization progresses, the constraint multiplier,

Results using different configurations of the early stopping option in TOPFARM, as well as the SGD optimization without early stopping, considering the circular wind farm with 225 turbines, with

The optimization results presented in this study used 50 power samples per iteration (

Optimization results associated with SGD for a square 100-turbine wind farm using 20 random initial starting conditions and

This study used an exotic learning rate scheduler. We tried several schedulers and observed this one to be the best at finding sufficiently large AEP solutions that reasonably satisfied the imposed constraints. Figure

Influence of the learning rate scheduler on the SGD optimization, considering a 100-turbine wind farm with a square boundary. The product scheduler is shown in yellow. The exponential scheduler is shown in blue. The linear scheduler is shown in purple. The AEP

The initial and final learning rates,

SGD is a promising optimization tool for wind farm design. Instead of evaluating all anticipated atmospheric conditions during every optimization iteration, SGD randomly samples the defined distributions of atmospheric conditions, resulting in substantially reduced computational time required for each optimization iteration. The total optimization time can be scheduled according to a prescribed computational budget. The presented formulation allows for continuous resolution of uncertain variables, eliminating the need to choose a discretization resolution of atmospheric conditions, such as the wind speed and direction. This technique does not become exponentially more expensive as a greater number of uncertain parameters is included, allowing for consideration of other atmospheric conditions, such as turbulence intensity, air density, veer, and shear

The presented SGD approach was shown to become more effective than a deterministic counterpart as the number of wind turbines increased. SGD yielded slightly higher AEPs than the deterministic approach in substantially reduced computational time. The time required to optimize wind farm layouts can be a major bottleneck in corporate workflows, and the time savings associated with the SGD approach allows engineers to access optimization results sooner than a conventional approach. If the inflow conditions were discretized using extremely small bins, or if several atmospheric conditions were to be considered, we expect that the SGD approach would perform the optimization even faster and more effectively than the deterministic approach.

The SGD approach is a simple framework that is well suited to large-scale stochastic wind power plant design optimization challenges. This framework is available in the open-source TOPFARM package. Future work includes exploring separate schedulers for the constraint multiplier and learning rate and scheduling the number of Monte Carlo samples,

The code used in this study is available from DTU Wind Energy Systems' PyWake and TOPFARM repositories (

The data used in this study have been made available on Zenodo:

JQ and PER designed the experiments. JQ, PER, MMP, and RVR developed the problem formulation. JQ developed the SGD formulation. JQ, RVR, MFM, and MMP performed the simulations. JQ, MMP, and RVP prepared the paper with contributions from all co-authors.

The contact author has declared that none of the authors has any competing interests.

Publisher's note: Copernicus Publications remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

The authors gratefully acknowledge the computational and data resources provided on the Sophia HPC cluster at the Technical University of Denmark,

This paper was edited by Cristina Archer and reviewed by Ahmad Vasel-Be-Hagh and two anonymous referees.