3.1. Numerical Implementation of the Algorithm
The model-based wedge detection algorithm is implemented in the programming language
Python. The steps to determine the position
, the size parameters
and the area
of each turbulence wedge are outlined in a flowchart in
Figure 5.
As a first step, either the simulated thermogram is created or the recorded thermogram of the wind turbine blade is loaded. The loaded thermogram is then preprocessed, which includes an optional normalization of the thermogram intensities by the maximum intensity as well as an image rotation. The rotation aligns the natural transition line of the thermogram horizontally, which simplifies the calculation of the correlations as the
y-positions of the line remain constant. To determine the rotation angle, the
y-positions of the natural transition line
are at first detected in the unprocessed thermogram, using the classical gradient-based method described in
Section 2.2. Using the coordinates of the natural transition line, the rotation angle
is calculated according to
where
and
are the last coordinates of the natural transition line and
and
are the first coordinates of the natural transition line in the original, i.e., non-rotated thermogram. The whole thermogram is rotated by the angle
using the
rotate functionality from the
Python Image Library (PIL). Note that the image rotation is not necessary for simulated images, where the natural transition line is already aligned horizontally.
The preprocessing also includes the determination of the angle of the turbulence wedges, which is currently the only manually estimated input parameter for the wedge detection algorithm. However, remains the same for all turbulence wedges until the flow condition changes at which the thermograms are captured.
After the preprocessing, the
y-positions of the leading edge
and the trailing edge
, as well as the natural transition line
, are detected in the thermogram by using the gradient-based method introduced in
Section 2.2. The values obtained by the gradient-based method are fitted with a linear regression using the
RANSAC algorithm of
Python’s sklearn library. To use the leading edge and the natural transition line in the wedge detection algorithm, the
y-position values are rounded to the next integer. With the
y-positions of the leading edge and the natural transition line, the maximum height
of the turbulence wedges is calculated according to
where the mean is taken over all
x-positions.
As the next step, the wedges and their
x-positions
are detected along the natural transition line by cross-correlating the thermogram with the wedge-shaped templates, see
Section 2.3.2. For the position detection,
differently sized templates with running template index
j are randomly generated, where
is the default value. The templates’ heights
are drawn from a uniform distribution in the interval
. This interval has proven adequate for detecting wedges in real thermograms, but the interval can also be adapted to any values in
if needed. The investigation of real thermograms (see
Section 3.2) has further shown that the height-to-width ratio of real turbulence wedges is, on average,
. Consequently, the templates’ widths are drawn from a normal distribution with
, where
is the mean and
is the variance of the normal distribution.
To calculate the cross-correlation between the thermogram and each turbulence wedge template, the template with index
j is placed with its top left corner at
and
as a starting point. A section of the full thermogram the same size as the template is required for the cross-correlation calculation. The columns (i.e., the width) of the thermogram section are chosen from the position
x to
of the full thermogram. The rows (i.e., the height) of the thermogram section are determined from the position
to
. The cross-correlation of the thermogram section and the template is calculated using Equation (
4) and the template is moved to the right by
pixel. This way, the cross-correlation value
is calculated for each
x-position. However, when the right edge of the template reaches the right edge of the thermogram, the top left corner is at
, where
is the width of the thermogram. For the remaining
x-positions the cross-correlation can not be calculated as the template would otherwise protrude outside the borders of the thermogram. Therefore, due to the different widths
of each template, the length of the cross-correlation curve of each template is different. To align the results of the cross-correlations of different templates, the cross-correlation values for each template
j are shifted to the right by
and the maximum cross-correlation value is subtracted. Using the aligned cross-correlation curves, the relative frequency of minima is determined. The positions of the local maxima above 35% in the relative frequency then correspond to the wedge positions
. The threshold value of 35% can be adapted depending on the desired sensitivity of the algorithm. The higher the threshold value, the more contrast the turbulence wedges need to have in order to be detected, which can lead to overlooked turbulence wedges. A lower threshold value, on the other hand, can result in an erroneous detection of noisy structures in the image as a turbulence wedge. Note that the relative frequency is currently not interpolated, i.e., the wedge positions
are integer values.
As the last step of the wedge detection algorithm, the wedges’ sizes
and their areas
are determined for each wedge position
using a weighted correlation, see
Section 2.3.3. For each
, the initial template
with the size
is used to create a range of new templates. Each template is then compared to the wedge to find the template with the best fit to the turbulence wedge. The sizes of the new templates are taken from a range of
for the height and
for the width. For each height and width combination of the two intervals, a new template is created, which results in
templates in total with running template index
k. Using each template, the weighted correlation with the turbulence wedge at the position
is calculated. To calculate the weighted correlation, the top left corner of the current template matrix is placed at
along the natural transition line at
, resulting in the top right corner of the template to be positioned at
. The columns (i.e., the width) of the thermogram section are selected from the
x-position
of the thermogram to
. The rows (i.e., the height) of the thermogram section are determined from the
y-position
to
. Thus, the thermogram section and the template have the same size. The weighted correlation is chosen as a measure of similarity so that the intensity gradient near the leading edge of the thermogram is counteracted, which is implemented through the weights
in the weight matrix. Thus, the weighting emphasizes a good match at the base of the template to the turbulence wedge. Therefore, the weights are larger near the base of the turbulence wedge, with
, and linearly decrease row by row to smaller weights near the tip,
. The number of steps for the linear decrease, which was implemented with the
linspace function of
Python’s numpy, is equal to the height
of the current template. The linear decrease is repeated in each matrix column for
columns. The weight matrix, the thermogram section and the template therefore all have the same size, and the weighted correlation is calculated using Equation (
7). The calculations result in a phase space of correlation values, i.e., one value for each height-width combination, see
Figure 6. The size of the template which attains the highest correlation value, see red x in
Figure 6, is the size
of the turbulence wedge at position
, from which the area
can be calculated with Equation (
6).
3.2. Simulation Setup
In order to verify the wedge detection algorithm and characterize it with respect to the measurement uncertainties, simulated thermograms are needed, where all measurands of the thermogram are a priori known exactly.
The simulated thermogram consists of a matrix with a height and a width . The trailing edge is placed at , the natural transition at and the leading edge at . The blade edges and natural transition lines are aligned horizontally. The pixel intensities of the turbulent region and the laminar region are quantities that need to be modelled to values in real thermograms. The pixel intensity of the background is set to , as a low value results in a strong gradient to the blade edge. However, the pixel intensity of the background does not influence the wedge detection algorithm and the exact value is therefore inconsequential.
Moreover, the intensity gradient near the leading edge is simulated. Near the natural transition line, the laminar value is prevalent. Towards the leading edge, the pixel intensities start to linearly decrease at some
y-position
, see
Figure 1 (right). Then, at a
y-position
near the leading edge, the decreasing intensity reaches the turbulent intensity value
. After this
y-position up to the leading edge, the pixel intensities are set to
. The parameters
and
are modelled according to real thermograms. Note that both parameters are subsequently presented normalized by
to make them transferable to thermograms of any size.
In addition, the amount of Gaussian blur in the thermogram can be set, with a standard deviation of the Gaussian kernel of . The blur value was estimated manually to match the blur in real thermograms.
Furthermore, the noise in real thermograms is simulated by creating a matrix of noise values with the same size as the thermogram, for which each pixel value is drawn from a normal distribution with mean and variance in arbitrary pixel intensity units. By changing the variance , the amount of noise in the image can be varied. The matrix is then added to the thermogram to obtain a noisy thermogram.
To emulate a turbulence wedge realistically, the parameters additionally required from real thermograms are the typical range of the height
and the width
of the turbulence wedge. Instead of the absolute height value (in pixels), the relative height
is considered here, which makes the value applicable to thermograms of any size. To emulate the average width of the turbulence wedges, the height-to-width ratio
is further considered. The angle
of each wedges is set, by default, so that the tip position is centered below the middle of the wedge for all turbulence wedges. Finally, the typical contrast-to-noise ratio (CNR) of a turbulence wedge is emulated, where the CNR is defined as
where
and
are the mean pixel intensities in the turbulent region inside the wedge and the laminar region right outside of the turbulence wedge with index
i, respectively. Furthermore,
and
denotes the spatial standard deviation of the pixel intensities of the turbulence wedge or its surrounding area.
To realistically emulate real thermograms, the above mentioned features of real thermograms and turbulence wedges need to be quantified. For this reason, real thermograms of wind turbines in operation are analyzed. In the analysis, 14 different thermograms and 43 different turbulence wedges are included. All heights and widths are measured using the program ImageJ [
16], while the CNR calculations are performed in Python. The loaded thermograms are normalized to a range of
. The results can be seen in
Table 1, where the first section contains the values that are important for the modelling of a thermogram without turbulence wedges. The second section contains the characteristic values of the turbulence wedges.
By adapting the mean values in
Table 1 in the simulated thermograms, thermograms of rotor blades of in-service wind turbines are emulated realistically. The values used in the simulation can be seen in the rightmost column. Note that the values for
and
are identical in the simulation, because the marginal difference in the experimental results is neglected. Furthermore, the values of the heights
of the simulated turbulence wedges are drawn from a uniform distribution in the interval
if not explicitly stated otherwise, which places the found mean value approximately in the middle of the range. The widths
of the simulated turbulence wedges are drawn from a normal distribution
, where
is the mean and
is the variance of the normal distribution. By modifying the size of the turbulence wedges in the simulated thermograms in a small interval which is easily detectable by the algorithm, no size that is particularly well or poorly detected is chosen by chance.
In order to characterize the dependency of the model-based wedge detection algorithm on the CNR value as well as the size of the turbulence wedges, Monte Carlo simulations are performed which utilize the simulated thermograms. With the results of the Monte Carlo simulations, the systematic and the random errors of the wedge position , the wedge size and the wedge area are investigated.
For the investigation of the dependency of the algorithm on the CNR, the CNR of a single turbulence wedge is changed in a range of 2 to 20 by changing the pixel intensity of the turbulence wedge. The choice of the CNR range places the mean value of found in real thermograms in the middle of the range, but also covers more extreme CNR values. Varying the intensity of the turbulence wedges instead of changing the amount of noise in the image is more realistic, as the noise in real thermograms stays approximately constant throughout the image.
To investigate the dependency of the algorithm on the size of the turbulence wedges, the height of the turbulence wedge in the thermogram is changed systematically in a range of . Due to the identified relationship , the wedge width is changed accordingly. The CNR value of the turbulence wedge, however, remains constant at throughout this analysis.
3.3. Measurement Setup
Real thermograms of rotor blades of in-service wind turbines are required to validate the algorithm. Therefore, thermographic measurements are performed on a
wind turbine of the type GE 1.5 sl, manufactured by General Electric (Boston, MA, USA), with a hub height of
and rotor diameter of
. The thermograms are taken with an actively cooled infrared camera called imageIR 8300, manufactured by InfraTec GmbH (Dresden, Germany). This thermographic camera has an InSb focal plane array with a format of
where
, and is sensitive to light of a wavelength of 2–5
. The dynamic range is 14 bit, the integration time is set to 1600
and the noise equivalent temperature difference is about
at
. The measurements are taken over multiple days on a wind turbines at a measurement distance of
m. Due to the length of the rotor blades and to improve the spatial resolution, a
telephoto lens is used. Consequently, the rotor blades are captured in segments. For this purpose, the thermographic camera is triggered externally with an optical trigger camera when the rotor blade is positioned horizontally, i.e., parallel to the ground. An example of a typical measurement setup can be seen in
Figure 7, where thermograms of the suction side of the rotor blade are acquired.
With the measurement setup, thermographic measurements of different rotor blade segments are taken, where the turbulence wedge have varying sizes as well as different CNR values, which are used to validate the wedge detection algorithm. Furthermore, the distance between wedges differs between the measurements, which has not been considered in the verification and which demonstrates the applicability of the wedge detection algorithm to real thermograms.