# Damage Diagnosis for Offshore Wind Turbine Foundations Based on the Fractal Dimension
## 3 Damage Diagnose Strategy
### Fractal Dimension
#### 3.2.1 [PERSON]'s Algorithm  
For a given sensor \(\tau=1,\ldots,24\), the time series used in this work are the rows in matrix \(\mathbf{Y}\) in Equation (3). More precisely, for a given row \(i=1,\ldots,6400\) and a given sensor \(\tau=1,\ldots,24\), the associated time series are composed of a sequence of \(\
u=256\) points, \(s^{1}_{i,\tau},s^{2}_{i,\tau},\ldots,s^{\
u}_{i,\tau}\in\mathbb{R}^{2}\) where  
\[s^{j}_{i,\tau}=(j,\mathbf{Y}\left[i,j+\
u(\tau-1)\right])\in\mathbb{R}^{2},\, j=1,\ldots,\
u,\]  
where \(\mathbf{Y}[\alpha,\beta]\) represents the element in the \(\alpha\)-th row and \(\beta\)-th column of matrix \(\mathbf{Y}\). To estimate the fractal dimension of the time series, [PERSON] [37] defines two magnitudes, \(L\) and \(d\), see Figure 3. On the one hand, the total length of the curve \(L\) is defined as the sum of the distance between two consecutive points. More precisely, for a given row \(i=1,\ldots,6400\) and a given sensor \(\tau=1,\ldots,24\):  
\[L_{i,\tau}=\sum_{j=1}^{\
u-1}\left\|s^{j+1}_{i,\tau}-s^{j}_{i,\tau}\right\|_ {2}=\sum_{j=1}^{\
u-1}\sqrt{1+\left(\mathbf{Y}\left[i,j+1+\
u(\tau-1)\right] -\mathbf{Y}\left[i,j+\
u(\tau-1)\right]\right)^{2}}. \tag{6}\]  
On the other hand, \(d\) is the diameter or planar extent of the time series and it is defined as the maximum distance between the first point in the time series and the rest of points. More precisely, for a given row \(i=1,\ldots,6400\) and a given sensor \(\tau=1,\ldots,24\):  
\[d_{i,\tau}=\max_{j=2,\ldots,\
u}\left\|s^{j}_{i,\tau}-s^{1}_{i,\tau}\right\|_ {2}. \tag{7}\]  
The last step in the [PERSON]'s algorithm is the normalization of both \(L_{i,\tau}\) and \(d_{i,\tau}\) by the average distance \(a_{i,\tau}\) between two consecutive points. More precisely, for a given row \(i=1,\ldots,6400\) and a given sensor \(\tau=1,\ldots,24\):  
\[a_{i,\tau}=\frac{L_{i,\tau}}{\
u-1}. \tag{8}\]  
Finally, for a given row \(i=1,\ldots,6400\) and a given sensor \(\tau=1,\ldots,24\), the formula for the fractal dimension \(z_{i,\tau}\) can be represented as:  
\[z_{i,\tau}=\frac{\log\left(\frac{L_{i,\tau}}{a_{i,\tau}}\right)}{\log\left( \frac{d_{i,\tau}}{a_{i,\tau}}\right)}=\frac{\log\left(\
u-1\right)}{\log\left( \frac{d_{i,\tau}(\
u-1)}{L_{i,\tau}}\right)}=\frac{\log(\
u-1)}{\log(\
u-1)+ \log\left(\frac{d_{i,\tau}}{L_{i,\tau}}\right)}. \tag{9}\]  
Note that \(d_{i,\tau}\leq L_{i,\tau}\), where both \(d_{i,\tau}\) and \(L_{i,\tau}\) are positive real numbers. Therefore,  
\[0<\frac{d_{i,\tau}}{L_{i,\tau}}\leq 1,\]  
that implies  
\[\log\left(\frac{d_{i,\tau}}{L_{i,\tau}}\right)\leq 0.\]  
The expression \(\log\left(\frac{d_{i,\tau}}{L_{i,\tau}}\right)\) is zero if, and only if, the points \(s^{j}_{i,\tau}\), \(j=1,\ldots,\
u\) are all aligned. In this case, the fractal dimension is exactly 1. When the ratio \(\frac{d_{i,\tau}}{L_{i,\tau}}\) decreases from 1 to \(\frac{1}{\sqrt{\
u-1}}\), then the fractal dimension of the time series increases up to 2. Even though the fractal dimension of a plane fractal never exceeds 2, the fractal dimension of a time series using the [PERSON]'s algorithm may exceed this value when the fraction \(\frac{d_{i,\tau}}{L_{i,\tau}}\) is less than \(\frac{1}{\sqrt{\
u-1}}\). However, the fractal dimension of a regular time series normally lies within the range \([1,2]\). With the fractal dimensions \(z_{i,\tau}\) of the time series in matrix \(\mathbf{Y}\) in Equation (3), we build a new matrix \(\mathbf{Z}\) as:  
\[\mathbf{Z}=\left( \begin{array}{c|c|c|c}\text{sensor }\#1&\text{sensor }\#2&\cdots&\text{sensor }\#24\\ z_{1,1}&z_{1,2}&\cdots&z_{1,24}\\ z_{2,1}&z_{2,2}&\cdots&z_{2,24}\\ \vdots&\vdots&\ddots&\vdots\\ z_{6400,1}&z_{6400,2}&\cdots&z_{6400,24}\end{array} \right)\in\mathcal{M}_{6400 \times 24}(\mathbb{R}).