Temperature Compensation using Constraint based Dynamic Time Warping in Guided Waves

. The paper explores Structural Health Monitoring (SHM) using ultrasonic guided waves for detecting damage in structures. Guided waves enable inspection over long distances and inaccessible areas, yet they are sensitive to changes in environmental and operating conditions (EOC), with temperature being a significant factor. The key challenge in guided waves based SHM is distinguishing between changes caused by defects and those due to temperature fluctuations. This paper focuses on warping-based methods for temperature compensation. Dynamic Time-Warping (DTW) encounters challenges due to its quadratic complexity. However, applying constraints to DTW accelerates the warping process by limiting the scope of the warping path to specified areas. In this paper, we employ the Sakoe-Chiba global constraint to confine our warping path within a defined area. The Sakoe-Chiba region is defined by a window size parameter, which dictates the maximum temporal shift permitted from the diagonal. To determine this shift, we utilize the Local Peak Coherence method (LPC). Results indicate that Sakoe-Chiba constraint based DTW performs well, demonstrating comparable warping performance to DTW but with significantly reduced computational complexity. The analysis also includes comparisons with temperature compensation DTW across a range of temperatures, highlighting the effectiveness of Sakoe-Chiba constraint based DTW in mitigating errors introduced by larger temperature variations.


Introduction
The detection of damages in Structural Health Monitoring (SHM) based on ultrasonic guided waves, involves the permanent placement of sensors on the structure [1].The sensors provide repeated measurements that aid in damage detection, utilizing signals acquired when the structure is assumed to be in a pristine condition, referred to as baseline signals.Guided waves exhibit high sensitivity to both damages and changes in Environmental and Operating Conditions (EOC) [2] with temperature variations being particularly important.Efficient temperature compensation methods are crucial before comparing the measured signal to the baseline signal.The stretch-based method [3] with a single baseline exhibits limitations outside certain temperature ranges.In contrast, warping-based methods demonstrate notable efficacy and offer a wider temperature compensation range.Despite its superior performance, Dynamic Time Warping (DTW) [4] is hindered by its computational complexity, rendering it impractical for extended time sequences.The quadratic time complexity of DTW presents a barrier to practical implementation, undermining the inherent advantage of guided waves long-distance propagation for SHM.In practical applications, the complexity and accessibility of structures often render it unfeasible to establish multiple baselines [5] under controlled EOC.
In this paper, we will evaluate the compensation effectiveness of a constraint-based DTW method, specifically employing Sakoe-Chiba band [6].This method constrains the formulation of cost matrix to specified region only, defined by window length parameter (r).To ensure fairness and impartiality in our assessment, we will use a dataset provided by the Open Guide Wave (OGW) platform [7].

Principles and methods
In a guided waves SHM system, a group of sensors are strategically attached to minimize the number needed for inspecting the entire structure.One sensor is used as a transmitter, to induce vibrations in the structure, and these vibrations are then recorded by other attached transducers.This configuration is referred to as the pitch-catch mode, and the monitoring technique involving induced vibrations is termed active SHM.
In the baseline method, a reference signal is obtained when the structure is in an undamaged state and under controlled EOC.This baseline signal   () serves as a benchmark for comparing signals acquired during the operational phase termed as measured signal ().Any deviation of the measured signal from the baseline signal is referred as error signal ().
A challenge associated with guided waves lies in their susceptibility to variations in EOC.
Fluctuations due to temperature emerge as one of the dominant factors.Consequently, the error signal is not solely dependent upon material properties but also influenced by temperature.The variability in temperature poses a significant hurdle in damage detection, as it complicates the interpretation of signals.However, by compensating for the temperature effect, the reliability of damage detection can be significantly enhanced.Fig. 2a illustrates the influence of temperature on guided waves with two measurements taken at a temperature difference of 10 °C.A zoomed version spanning from 250 µs to 600 µs is depicted in Fig. 2b.Additionally, Fig. 2c and 2d display signals obtained at temperature differences of 20 °C and 40 °C, respectively.As the temperature difference increases, the delay/advancement of the wave packets also increase.Temperature fluctuations result in changes of Young's modulus of the material, influencing both group velocity (resulting in a stretch-like effect) and phase velocity changing the shape of wave packets).While most compensation techniques primarily address changes in group velocity, they often overlook the effect of phase velocity variations.As a result, their performance deteriorates when the assumption that the temperature results in a stretch-like waveform distortion only no longer holds.Warping methods have the capability to incorporate both, instead of relying on one global stretch factor it can localize the stretching effect.
In DTW, we do not assume uniform stretching to align the two signals.Instead, a warping path based on local stretching or compression is calculated.DTW is implemented by: 1) formulation of cost matrix, 2) determination of the warping path (W) using backtracking, and 3) and finally, alignment of the signal using warping path.
The cost matrix is defined as To initiate and terminate the iterative DTW algorithm, some boundary conditions are required.The boundary conditions chosen in this paper are: which means the first sample from   () is linked to the first sample from () .More samples of   () may be mapped to the first element of () , but it indicates a starting point of the warping path.The other boundary condition is at the other end of the sequences, forcing the last sample of   () to be linked to the last sample of () , as The optimal warping path is the path that minimizes the distance Dist(W) defined as: Fig. 3 illustrates the cost matrix and the warping path.The vertical axis represents the baseline signal   (), while the horizontal axis depicts the compressed measured signal () in Fig. 3a and the dilated measured signal () in Fig. 3b when DTW is performed.The construction of the cost has a computational complexity of ( 2 ), when both signals are of equal length .However, considering that temperature shifts typically affect only a few data points, creating the entire cost matrix of size  2 is not required.Applying constraint to the DTW can easily speed up the warping process.

Sakoe-Chiba constraint based Dynamic Time Warping (C-DTW)
To enhance the efficiency of Dynamic Time Warping (DTW) and expedite the warping process, constraints can be applied.One such constraint is the Sakoe-Chiba band.By restricting the search space within a specified band width along the diagonal of the cost matrix, the Sakoe-Chiba constraint reduces computational overhead while maintaining alignment accuracy.This approach optimizes DTW performance, making it more efficient for applications where only localized adjustments are necessary due to temperature-induced variations in the signal.The formation of cost matrix using equation ( 4) can be limited using window condition.Adjustment window condition where i is the i th index in sequence   (), j is the j th index in the sequence () and r is an appropriate positive integer called window length.The estimation of the window length is done using the local peak coherence (LPC) [8] method.LPC assesses a sequence of delays around different time points and then estimates τ through linear regression when two signals exhibit similarity but are temporally delayed.To provide additional flexibility to the warping path, the value of r is set to 1.5τ.Fig. 4 illustrates the cost matrix and the warping path similar to Fig. 3 with Sakoe-Chiba constraint.The cost matrix and warping path suggests that it is unnecessary to compute the entire cost matrix when performing temperature compensation.

OGW dataset
Evaluating compensation techniques involves considering factors like geometry, materials, setup, and environment.To foster equitable comparisons, we perform the examination of our C-DTW temperature compensation using a previously established and verified dataset.This methodology aims to promote impartial assessments by minimizing the impact of varied experimental parameters on the evaluation of compensation techniques.In OGW dataset measurements conducted on CFRP plate.The arrangement of transducers and damage position is shown in Figure (5).All actuator-sensor pair are measured in round robin methodology for the range of frequencies, from 40 kHz up to 260 kHz.In this work, we have used the subset of data collected with the 40 kHz transducer, operating in a pitch catch mode, where transducer T4 serving as a pitch and transducer T10 as catch.A 5-cycle Hann-windowed sine wave with an excitation signal of ±100 V was applied to transducer T4.The resulting signal from transducer T10 was then amplified, digitized, and recorded for a duration of 1300 µs.The structure underwent temperature exposure ranging from 20 °C to 60 °C in increments of 0.5 °C.For damage detection, measurements from damage position D12 is selected.More detailed information on the data set can be found in [8].

Warping performance of C-DTW vs DTW
To evaluate the warping performance, we used the signal collected at 20 °C as the baseline and the signal at 40 °C as the measured signal, as illustrated in Fig. 6a, 6b.A dilation like effect is observed in the measured signal with respect to the baseline signal.
In Fig. 6a and 6c, illustrates the results of the C-DTW and DTW process respectively.In DTW the optimal warping path is selected using minimum distance Dist(W) defined in Eq. ( 4).Using optimal warpath new temperature compensated aligned baseline signal is created for measured signal at 40 ℃.Temperature compensated aligned baseline signal using DTW and measured signal are shown in Fig. 6(b).
The warping path is calculated using C-DTW with adjustment window in Eq. ( 8).Temperature compensated aligned baseline signal using C-DTW and measured signal are shown in Fig. 7(d).The warping performance appears to be nearly identical.To compare warping performance across each timestamps, we introduce the measure  ().
() = |() −  ̂()|, where () is the measured signal and  ̂() is the aligned bassline signal to the measured signal.Both DTW and C-DTW demonstrate excellent warping performance across all timestamps, as illustrated in Fig. 7, where the  () plots overlap consistently.The degree of overlap is evident in AES values 4.48 for DTW and 4.54 for C-DTW.

Warping performance vs temperature
The temperature compensation performance across a range of temperatures 20 ℃ to 60 ℃ is depicted in Fig. 8.
Notably, C-DTW demonstrates nearly identical performance to DTW across all temperatures in both cases.However, there is an increase in the value in the case of damage.

Damage Detection
The AES value demonstrates a noticeable increase with distance from the baseline temperature of 20 ℃, observed in both undamaged and damaged scenarios.In Fig. 9, we assess the damage detection performance, blue data points represent the values of AES for each temperature in the absence of damage, and a blue line denotes the linear fitting of these data points.Red data point signifies the value of AES in the case of damage and line represents the linear fitting.
In the context of GW-based structural health monitoring (SHM), detecting damage with a single measurement proves challenging.However, a continuous escalation in the AES value serves as a significant indicator of structural damage.We can employ a step detector similar to equation (13) in the [4].Any significant rise in the AES value at given temperature will help in detection of damage.Fig. 9(a) shows damage detection in case of DTW and Fig. 9(b) shows damage detection in case of C-DTW.

Conclusions
In this paper, we introduced Sakoe-Chiba C-DTW as a novel approach for temperature compensation in guided wave systems.We conducted a comprehensive analysis, comparing its performance with existing method DTW.While DTW ( 2 ) complexity poses limitations, particularly hindering the full utilization in application of guided waves over long-distance propagation.Remarkably, applying constraint to the DTW cost matrix (C-DTW) save lots of computational time and space, as the temperature included effect only shifts the signals by only few time stamps.
Further studies could explore temperature compensation for larger temperature differences, investigating how well the proposed methods perform under more extreme conditions.Additionally, exploring smarter classification approaches for damage detection, beyond simple linear fitting of data points, could enhance the accuracy and robustness of the detection process.Techniques such as machine learning or advanced signal processing algorithms could be investigated for their applicability in this context.

Fig. 1 .
Fig. 1.Illustration of Guided waves based SHM with only one actuator sensor pair.

Fig. 3 .
Fig. 3. Demonstration of cost matrix and warping path in DTW in case of baseline (a) compression (b) Dilation

Fig. 8 (
a) represents temperature compensation in the absence of damage, while Fig. 8(b) displays temperature compensation in the presence of damage.The Absolute Error Signal (AES) for DTW and C-DTW is illustrated. = ∑  ()

Fig. 7 .
Fig. 7. Absolute Error due to warping process across timestamps C-DTW and DTW