# Vibration-Based Fingerprint Algorithm for Structural Health Monitoring of Wind Turbine Blades
## 3 Algorithm
### Detection of Type 2 Vibrations
#### 3.5.1 Scanning of Type 2 Vibrations  
First, peaks \(P_{v2}\bigcap P_{rem}\) were scanned for those peaks \(P_{v2}\) corresponding to Type 2 vibrations. The algorithm is displayed in Figure 8, left:  
1. The location of remaining peaks \(l_{i,n}\) as resulting from Section 3.4 was normalised, i.e., both the range of \(i\in 1,...,L_{G}\) and \(n\in 1,...,\hat{N}\) were normalised to [0,1]. Normalised peaks are denoted as _samples_ during the scanning part of the algorithm, and each peak \(l_{i,n}\) was converted to a sample with coordinates \([x,y]\) and \(x=\frac{i}{L_{G}}\) and \(y=\frac{y}{\hat{N}}\).
2. Those samples were scanned by using first- and second-degree polynomials (see Figure 8). For each outer loop iteration, an offset \(a_{0}\) was fixed. For each inner loop iteration, inclinations \(a_{1}\) were varied in steps of \(\Delta a_{1}\) up until a maximum inclination of \(a_{1,max}\). Parameters \(a_{0}\), \(a_{1}\), \(\Delta a_{1}\) and \(a_{1,max}\) were selected empirically based on the location of remaining peaks \(P_{v2}\bigcap P_{rem}\), as displayed in Figure 6 (right) (green colour).
3. For given \(a_{0}\) and \(a_{1}\), the following steps were conducted: 1. The \(x\) coordinate [0,1] was divided into \(N_{x}\) discrete intervals \(\hat{x}\). The model \(y_{1}(x)=a_{0}+a_{1}x\) was created for each iteration, and a boundary \(\epsilon_{1}\) with \(|y_{1}-\hat{y}|\leq\epsilon_{1}\) was introduced. This boundary was increased up until at least one of the following conditions was fulfilled: 1. _Strict_: For at least \(a_{int}\cdot N_{x}\) of intervals, at least one sample \([\hat{x},\hat{y}]\) had to be found per interval which fulfilled \(|y_{1}-\hat{y}|\leq\epsilon_{1}\). 2. _Interval_: For vibrations only occurring for specific values of the reference variable, an additional restricted range \(N_{x,local}\) was introduced. In this range, Condition (i) had to be fulfilled for at least \(M_{x,local}\) samples. 2. The model was refined by fitting a second-degree polynomial \(y_{2}(x)=b_{2}x^{2}+b_{1}x+b_{0}\) to all those samples \([\hat{x},\hat{y}]\), for which \(|y_{1}-\hat{y}|\leq\epsilon_{1}\) in the previous step. Linear least squares fitting was used and the prominence \(p_{i,n}\) of peaks related to samples \([\hat{x},\hat{y}]\) were used as fitting weights. Again, the two conditions for defining the range were applied as defined in Step 3(a) for a range \(\epsilon_{2}\). An example for both first- and second-degree polynomial fits and ranges is shown in Figure 9 (left).
4. Those models \(y_{2}\) with a sum of squared errors (SSE) lower than a maximum error \(SSE_{max}\) were selected as Type 2 vibrations and stored for further processing. In our analysis, \(SSE_{max}\) was selected empirically for each test turbine depending on respective data quality.
5. For each detected vibration, fit parameters \(b_{0}\), \(b_{1}\), \(b_{2}\) and \(\epsilon_{2}\) were stored. In addition, all samples \([\hat{x},\hat{y}]\) for which \(|y_{2}-\hat{y}|\leq\epsilon_{2}\) were saved for subsequent analyses. To improve robustness of scanning from bottom (\(a_{0}=0\)) to top (\(a_{0}=1\)), samples for which \(\hat{y}<(y_{2}(\hat{x})-2\epsilon_{2})\) were removed from the overall set of samples \([x,y]\) for the next iteration.
6. The offset \(a_{0}\) was adapted and increased by \(\Delta a_{0}\) for the next iteration if either a vibration was successfully detected or all inclinations \(a_{1}\) were tested without success.
7. Steps 3-6 were repeated up until the maximum offset \(a_{max}=1\) was reached.  
Here, only inclinations \(a_{1}\geq 0\) were tested since vibrations always increased with the reference variable (rotation frequency) in our datasets. The algorithm can easily be extended to also consider negative correlations by testing \(a_{1}<0\).  
Figure 8: Visualisation of vibration scanning and vibration filtering for detecting Type 2 vibrations.