## 2 Linearization of the Power Deficit Calculation  
### Annual Energy Produced by a Wind Farm  
The general form for calculating the energy produced by a wind farm is obtained by adding together the average power, \(\mathbb{E}[P_{i}]\), produced by each of the \(nt\) turbines in the wind farm, for every wind direction and for every wind speed. Over the course of a year (\(T=8760\) h), the energy produced by the wind farm, AEP, can be obtained from the following:  
\[\text{AEP}=T\sum_{i=1}^{nt}\mathbb{E}[P_{i}] \tag{2}\]  
and  
\[\mathbb{E}[P_{i}]=\int_{u_{ci}}^{u_{ca}}\int_{0}^{2\pi}P_{i}(u,\theta)\text{ f}(u,\theta)\text{d}u\text{d}\theta \tag{3}\]  
where \(u\) is the free-flow wind speed, \(\theta\) is the wind direction, \(u_{ci}\) and \(u_{co}\) represent the cut-in speed and cut-out speed, respectively, \(P_{i}(u,\theta)\) is the power produced by turbine \(i\) under free-flow wind conditions given by \(u\) and \(\theta\), and \(\text{ f}(u,\theta)\) is the frequency with which the wind blows at speed \(u\) from direction \(\theta\).  
More precisely, this summation should be multiplied by the availability and losses factor, \(k_{AL}\) (\(k_{AL}\leq 1\)), which allows the designer to account for the production losses due to the unavailability of turbines and other losses including those occurring in the electrical system, delays and errors in turbine orientation; inaccuracies in the turbine's power curve; or delays in turbine reconnection after a shutdown due to exceeding the maximum speed (hysteresis).  
In general, expression (3) is not analytically integrable, regardless of whether an analytic expression for the functions \(P_{i}(u,\theta)\) and \(\text{f}(u,\theta)\) can be obtained. Therefore, it must be discretized, transforming the integrals into summations, which yields the following:  
\[\mathbb{E}[P]=\frac{\text{AEP}}{T}=\sum_{i=1}^{nt}\sum_{u=u_{ci}}^{u_{ca}}\sum _{\theta=1}^{360}P_{i}(u,\theta)\text{ f}(u,\theta)\Delta u\Delta\theta \tag{4}\]Although it is usual to set \(\Delta u=1\) m/s as the discretization step for the wind speed and \(\Delta\theta=1\) deg for its direction, they will be kept for dimensional coherence.  
Additionally, the energy deficit and average power deficit due to the wake effect are given by  
\[\mathbb{E}[\delta P]=ntP_{1T}^{\text{ap}}-\mathbb{E}[P] \tag{5}\] \[\delta\text{AEP}=T\,nt\,P_{1T}^{\text{ap}}-\text{AEP} \tag{6}\]  
where \(P_{1T}^{\text{ap}}\) is the average power produced by an isolated turbine under the same wind conditions:  
\[P_{1T}^{\text{ap}}=\sum_{u=u_{cl}}^{u_{\text{req}}}Pc(u)\,\,\,\text{f}_{vel}(u )\Delta u\quad\text{with}\,\,\,\text{f}_{vel}(u)=\sum_{\theta=1}^{360}\,\, \text{f}(u,\theta)\Delta\theta. \tag{7}\]  
where \(Pc(u)\) represents the relationship between wind speed and the extracted electrical power (the power curve as given by the turbine manufacturer).  
For a wind farm consisting of \(nt\) turbines arranged in a specific layout \(L\), each turbine \(i\) can suffer the perturbation of another upstream one \(j\) which, for certain wind conditions (\(u,\,\theta\)), depends on the following factors:  
\(u\): the free stream wind speed \(s_{j,i}\): the separation between turbines \(i\) and \(j\) according to the layout \(L\) \(\varphi_{j\to i}\): the deviation between the segment linking the turbines (from \(j\) to \(i\)) and the wind direction \(\theta\).  
When a turbine is affected by wakes from multiple upstream turbines, it is necessary to combine these wakes in order to obtain the effective power resulting from all the interactions. Therefore, it is necessary to include in (4) the accumulated deficit resulting from these combined perturbations.  
The following subsections explain how to calculate \(P_{i}(u,\theta)\) using traditional wake aggregation methods as well as the proposed one.