# Adjustable Capacity Evaluation Method Based on Step-by-Step Power Mapping of Offshore Wind Farms
## 3 Step-by-Step Mapping of Offshore Wind Farm Power
### Mapping of Wind Turbine Power to Collector System Power  
There are two ways to calculate the cable loss: using the wind turbine power to directly calculate the cable loss or mapping the wind turbine power to an intermediate variable to calculate the line loss. According to the division of the power transmission process of the wind farm, the power of the collector system is selected as the intermediate variable. Figure 2 shows the power collector system of the offshore wind farm. The power emitted by the wind turbine is raised from low voltage to medium voltage by the transformer and then merged into the bus bar through the collector line. In this process power loss will occur, so the sum of the distributed fan power cannot be directly used as the power of the collector system. Otherwise, there will be a large error when calculating the cable loss. Based on the BP (Back Propagation) neural network, this paper establishes the connection between the power of the wind turbines and the power of the collector system. The structure of BP neural network is shown in Figure 3.  
In the above figure, the input vector is \(\mathbf{X}=\left(x_{1},x_{2},\cdots,x_{n}\right)^{T}\), the output of the hidden layer is \(\mathbf{Y}=\left(y_{1},y_{2},\cdots,y_{m}\right)^{T}\), the output of the output layer is \(\mathbf{O}=\left(o_{1},o_{2},\cdots o_{l}\right)^{T}\). \(\mathbf{\omega}_{ij}\) is the connection weight from the input layer to the hidden layer. \(\mathbf{\omega}_{jk}\) is the connection weight from the hidden layer to the output layer. Figure 2: Power collector system of the offshore wind farm. The mathematical model of the BP neural network is as follows  
\[y_{j}=f(\sum\limits_{i=1}^{n}\omega_{ij}x_{i})\quad j=1,2,\cdots m \tag{1}\]  
\[o_{k}=f(\sum\limits_{j=1}^{m}\omega_{jk}y_{j})\quad k=1,2,\cdots l \tag{2}\]  
where \(f(\cdot)\) is the activation function of the network. The formula for determining the number of neurons in the hidden layer is as follows  
\[m<\sqrt{(n+l)}+a, \tag{3}\]  
where \(m\) is the number of hidden layer nodes, \(n\) is the number of input layer nodes, \(l\) is the number of output layer nodes, \(a\) is a constant between 0 and 10. Training is performed by setting different numbers of hidden layer nodes, and finally the model with the smallest error is selected. Considering the large number of wind turbines in offshore wind farms, direct fitting may not be effective. Therefore, spectral clustering of wind turbines is performed to reduce the data dimension of the input data. Assuming that the number of wind turbines is \(a\), and each unit has historical power data of \(b\) time points, then the power sequence of the wind farm can be written as the following matrix. \[X=[x_{1},x_{2},\cdots,x_{a}]^{T}= \begin{bmatrix}x_{11}&\cdots&x_{1b}\\ \vdots&\ddots&\vdots\\ x_{a1}&\cdots&x_{ab}\end{bmatrix} _{a\times b}, \tag{4}\]  
where \(x_{1},x_{2},\cdots,x_{a}\) is the row vector formed by the historical power sequence of each wind turbine, and the dimension is \(b\). To quantify the similarity of the power data, set the vector \(Q=[q_{1},q_{2},\cdots,q_{n}]\), \(O=[o_{1},o_{2},\cdots,o_{n}]\). The Pearson correlation coefficient can be calculated as  
\[p_{\rm QO}=\frac{\sum\limits_{i=1}^{n}(q_{i}-\overline{q})(o_{i}-\overline{o} )}{\sqrt{\sum\limits_{i=1}^{n}(q_{i}-\overline{q})^{2}}\sqrt{\sum\limits_{i=1} ^{n}(o_{i}-\overline{o})^{2}}}, \tag{5}\]  
Figure 3: The structure of BP neural network. where \(\overline{\vartheta}\) is the average value of \(Q\), \(\overline{\vartheta}\) is the average value of \(O\). The specific steps of spectral clustering are as follows:  
1. For the power sequence vector of any wind turbine \(i\) and wind turbine \(j\) in the offshore wind farm, calculate the Pearson coefficient between the two and denote it as \(p_{ij}\), and then construct the similarity matrix \(P\): \[P= \begin{bmatrix}p_{11}&\cdots&p_{1a}\\ \vdots&\ddots&\vdots\\ p_{a1}&\cdots&p_{aa}\end{bmatrix} _{a\times a},\] (6)
2. Based on the similarity matrix \(P\), calculate the degree matrix \(H\) \[H=