## 3 Experiments and Results
### Drift-Elimination Experiment
The self-attention mechanism and multi-attention mechanism of the Transformer model not only solve the problem of long-term dependence but also realize the parallel  
computation, which significantly improves the computational efficiency. For the above reasons, the Transformer model has shown further improvement in eliminating signal baseline drift compared to the AGRU model, based on the available experimental results. Gaussian noise was added to the sinusoidal signal to compare the ability of the four models to remove drift in a more realistic setting. The simulated voltage signal is still \(u_{r}(t)=0.1\,\sin(1.5\,\pi t)\), to which Gaussian noise with mean \(\mu=0\) and standard deviation \(\sigma=0.005\) is added to generate a new signal \(u_{e}(t)\). The drift captured by the real sensor used in the experiments of Figure 5 is then superimposed on \(u_{e}(t)\) to obtain a signal that contains both drift and Gaussian noise, thus simulating a sampled voltage \(u_{g}(t)\) that more closely resembles a real environment. The hyperparameters of the four models are constant, and the experimental results are shown in Figure 6 and Table 3. Since the RNN and GRU models perform poorly in dealing with long-term dependencies, both models still perform poorly in removing drift after adding Gaussian noise and lead to a severe distortion of the signal. Both the AGRU model and the Transformer model perform well in removing baseline drift from the signal. The characteristics of drift in both the time and frequency domains differ significantly from those of sinusoidal signals and Gaussian noise. Therefore, with the introduction of the attention mechanism, the model can effectively distinguish which signal features need to be preserved and which should be forgotten. This allows the model to retain important signal components while removing drift. The Transformer model performs more stably and efficiently than the AGRU model in handling long-term dependencies. As shown in Figure 6 and Table 3, the Transformer model demonstrates a superior ability to eliminate drift, even with the addition of Gaussian noise. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Methods** & **MAPE (\%)** & **RMSE (V)** & **MAE (V)** \\ \hline RNN & 1.2126\% & 0.0411 & 0.0325 \\ GRU & 1.0377\% & 0.0352 & 0.0278 \\ AGRU & 0.2343\% & 0.0076 & 0.0062 \\ Transformer & 0.1872\% & 0.0060 & 0.0049 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance of different algorithms on simulated signals. Figure 5: Drift-elimination results of different algorithms for simulated signals. (**a**) RNN. (**b**) GRU. (**c**) AGRU. (**d**) Transformer. Then, real sampling voltages are used to evaluate the ability of the model to eliminate baseline drift in the signal. In the experiment, high-temperature strain gauges were first pasted onto nickel-based high-temperature alloy substrates. Next, they were placed in graphite sleeves and mullite sleeves; finally, they were fixed with the fixture of the electronic universal testing machine, and the temperature inside the graphite sleeves was gradually increased by controlling the high-frequency induction heating equipment. Tests were carried out at ambient temperatures of 23 \({}^{\circ}\)C, 100 \({}^{\circ}\)C, 170 \({}^{\circ}\)C, and 210 \({}^{\circ}\)C, respectively. In Figure 7, the black curve represents the sampled voltage \(u_{s}(t)\), whereas the red curve illustrates the drift obtained through low-pass filtering. It can be observed that as the ambient temperature increases, the drift in the signal becomes more pronounced. The signal \(u_{s}(t)\) acquired at a temperature of 170 \({}^{\circ}\)C and 210 \({}^{\circ}\)C is separately input into the trained Transformer model, and the output is shown as the blue curve in Figure 7, where \(u_{r}(t)\) is the signal after removing the drift.