Power component life prediction method and system of adaptive dual-attention transformer

CN122451374BActive Publication Date: 2026-08-21AIR FORCE UNIV PLA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610902973.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-23
Publication Date
2026-08-21
Estimated Expiration
2046-06-23

AI Technical Summary

Technical Problem

然而,这类方法侧重于捕捉长程依赖以拟合全局趋势,忽视了对短期局部瞬态事件的敏感性,导致模型难以有效响应工况突变或早期损伤引发的异常模式,从而降低了电子功率部件的寿命预测精度

Benefits of technology

[0011]在本申请实施例中,获取待预测电子功率部件在最近连续多个历史时刻的时间序列数据;将时间序列数据输入训练完成的自适应双注意力Transformer模型,得到待预测电子功率部件的归一化剩余寿命百分比。其中,自适应双注意力Transformer模型包括输入嵌入与位置编码层、编码器层、注意力池化层和输出层,通过输入嵌入与位置编码层将时间序列数据映射到预设的模型内部特征维度并添加位置信息,增强了特征的表达能力,使模型能够在更丰富的特征空间中学习退化模式,并使自注意力机制能够感知时间序列的顺序信息,克服了标准Transformer对序列顺序不敏感的缺陷;通过利用编码器中的自适应混合注意力模块基于第一特征矩阵并行计算全局注意力特征和滑动窗口注意力特征,突破了单一注意力机制在多尺度退化特征提取上的局限;通过门控网络基于第一特征矩阵生成每种注意力特征对应的注意力权重,实现了局部与全局通路的融合比例的动态调节,能够对电子功率部件退化全生命周期内关键特征的选择性聚焦;将全局注意力特征、滑动窗口注意力特征和对应的注意力权重进行加权融合,能够平衡长距离依赖建模能力与局部动态感知能力,进一步,加权融合后的特征依次经过编码器中的残差连接与层归一化模块、前馈神经网络模块处理,得到编码器输出特征,利用注意力池化层将编码器输出特征沿时间维度聚合为全局特征向量,并通过输出层中的线性变换模块和Sigmoid激活函数进行映射,可以得到高精度的归一化剩余寿命百分比。本申请采用自适应双注意力Transformer融合机制实现电子功率部件的寿命预测,解决了传统方法难以同时兼顾长期趋势与局部波动的技术难题,能够提高电子功率部件的寿命预测精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122451374B_ABST
    Figure CN122451374B_ABST
Patent Text Reader

Abstract

The application discloses a power component life prediction method and system of adaptive double attention Transformer, and the method comprises the following steps: acquiring time series data of an electronic power component to be predicted at a plurality of latest continuous historical moments; inputting the time series data into an input embedding and position coding layer of the adaptive double attention Transformer model to obtain a first feature matrix; an adaptive mixed attention module in an encoder of the adaptive double attention Transformer model calculates global attention features and sliding window attention features in parallel based on the first feature matrix, and the corresponding attention weights of each kind of attention features, and the global attention features, the sliding window attention features and the corresponding attention weights are weighted and fused; an attention pooling layer of the adaptive double attention Transformer model aggregates the encoder output features into a global feature vector along the time dimension, and maps the global feature vector through an output layer to obtain a normalized remaining life percentage. The application can improve the life prediction accuracy of the electronic power component.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the fields of power component lifetime prediction and machine learning technology, specifically to an adaptive dual-attention Transformer method and system for power component lifetime prediction. Background Technology

[0002] With the rapid development of industrial automation and power electronics technology, electronic power components have become core components of aerospace equipment, weapon systems, and other applications. Their reliability is one of the key factors affecting the long-term stable operation of these systems. These components degrade under harsh conditions such as high voltage, high temperature, and high frequency over long periods. This degradation process is not a random event but exhibits a significant cumulative effect over time. Early stress continuously influences subsequent performance evolution, showing a certain statistical regularity throughout the device's lifespan. Therefore, accurately predicting the Remaining Useful Life (RUL) of components before failure has become a critical problem that urgently needs to be solved by industry and academia. Accurate RUL prediction is not only a core technology for intelligent maintenance but also a prerequisite for optimizing production processes, reducing maintenance costs, and improving system safety and reliability.

[0003] In the Remote Ultra-Low Life (RUL) prediction task, the degradation process of electronic power components exhibits a complex characteristic of both a global monotonic trend and local non-stationary transients, both of which jointly determine the prediction accuracy. Existing researchers have applied Transformer-based methods to the RUL prediction task. Its multi-head attention mechanism can simultaneously focus on degradation characteristics at different time steps, and the Transformer achieves direct modeling of global dependencies through a self-attention mechanism, capturing temporal dependencies in long-sequence data and significantly improving long-term dependency modeling capabilities. However, these methods focus on capturing long-range dependencies to fit the global trend, neglecting the sensitivity to short-term local transient events. This makes it difficult for the model to effectively respond to anomalous patterns caused by sudden changes in operating conditions or early damage, thus reducing the accuracy of electronic power component lifetime prediction. Summary of the Invention

[0004] In view of this, embodiments of this application provide a method and system for predicting the power component lifetime of an adaptive dual-attention Transformer, the method comprising: Acquire time series data of the electronic power component to be predicted at multiple recent consecutive historical moments; the time series data includes the multi-source state monitoring parameters of the electronic power component to be predicted at different moments. Input the time series data into the trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted; the normalized remaining lifetime percentage is the proportion of the number of cycles remaining from the current time to the end of the lifetime of the electronic power component to be predicted to the total number of cycles. The adaptive dual-attention Transformer model includes an input embedding and position encoding layer, an encoder layer, an attention pooling layer, and an output layer. Time-series data is input into the trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted, including: The time series data is mapped to a preset feature dimension within the model by an input embedding and location encoding layer, and location information is added to obtain the first feature matrix. The adaptive hybrid attention module in the encoder is used to compute global attention features and sliding window attention features in parallel based on the first feature matrix. The gating network generates attention weights for each attention feature based on the first feature matrix. The global attention features, sliding window attention features and corresponding attention weights are weighted and fused, and then processed sequentially through the residual connection and layer normalization module and the feedforward neural network module in the encoder to obtain the encoder output features. The encoder output features are aggregated into a global feature vector along the time dimension using an attention pooling layer, and the global feature vector is mapped to a normalized remaining lifetime percentage through a linear transformation module and a sigmoid activation function in the output layer.

[0005] Optionally, the adaptive hybrid attention module includes a multilayer perceptron and a sliding window attention unit, wherein the sliding window attention unit includes multiple sliding window attention heads, and the method for calculating the sliding window attention features includes: Based on the preset reference time window radius and the time step in the first feature matrix Input data at preset distances on both sides and a multilayer perceptron determine the time step. The corresponding adaptive window radius; the preset distance is determined based on the baseline time window radius; construct the mask matrix corresponding to the time series data. Among them, for two time steps in time series data ,like Then let ,otherwise ;in For time step The corresponding adaptive window radius, Represents the time steps in the mask matrix The corresponding mask value; for each sliding window attention head, the first feature matrix is ​​linearly transformed into a first query matrix, a first key matrix, and a first value matrix through a learnable first weight matrix, and the first dot product matrix is ​​calculated based on the first query matrix and the first key matrix; the mask matrix is... Add the first dot product matrix, normalize it using the Softmax function, and then multiply it with the first value matrix to obtain the sliding window attention sub-features; concatenate and linearly transform the sliding window attention sub-features output by each sliding window attention head to obtain the sliding window attention features.

[0006] Optionally, based on a preset reference time window radius and the time step in the first feature matrix... Input data at preset distances on both sides and a multilayer perceptron determine the time step. The corresponding adaptive window radii include: The time step is determined from the first feature matrix. Previously, with time steps The first input data at a position at a distance from the radius of the reference time window, and the time step. Afterwards, with time steps The first and second input data are input into a multilayer perceptron at a position relative to the radius of the reference time window to obtain the window adjustment factor; the time step is calculated based on the window adjustment factor, the maximum window adjustment range, and the radius of the reference time window. The corresponding adaptive window radius.

[0007] Optionally, the gating network includes a global average pooling unit, a first fully connected network, and a second fully connected network. The gating network generates attention weights for each attention feature based on the first feature matrix, including: compressing the first feature matrix along the time dimension into a second global feature vector using the global average pooling unit; mapping the second global feature vector to 1 / 4 of the model's internal feature dimension using the first fully connected network and performing a non-linear transformation using the ReLU function to obtain a first feature vector; mapping the first feature vector to a two-dimensional space using the second fully connected network and converting it into attention weights corresponding to the global attention feature and the sliding window attention feature using the Softmax function; the sum of the attention weights corresponding to the global attention feature and the sliding window attention feature is 1.

[0008] Optionally, the encoder layer may include one or more; if there are multiple encoder layers, the encoder layers are connected in sequence, and the encoder output feature is the feature output by the last encoder layer.

[0009] Optionally, the training method for the adaptive dual-attention Transformer model includes: acquiring a training dataset; the training dataset includes time-series sample data of electronic power components throughout their entire lifespan and corresponding normalized remaining lifetime percentage labels; inputting the time-series sample data into the adaptive dual-attention Transformer model to obtain the predicted normalized remaining lifetime percentage; and performing backpropagation training on the network parameters of the adaptive dual-attention Transformer model based on the predicted normalized remaining lifetime percentage, the corresponding normalized remaining lifetime percentage labels, and the loss function until the convergence condition is met, thereby obtaining the trained adaptive dual-attention Transformer model.

[0010] This application provides a power component lifetime prediction system based on an adaptive dual-attention Transformer, comprising: The data acquisition module is used to acquire time series data of the electronic power component to be predicted at multiple recent consecutive historical moments; the time series data includes multi-source state monitoring parameters of the electronic power component to be predicted at different moments; The remaining lifetime prediction module is used to input time series data into the trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted; the normalized remaining lifetime percentage is the proportion of the number of cycles remaining from the current time to the end of the lifetime of the electronic power component to be predicted to the total number of cycles. The adaptive dual-attention Transformer model includes an input embedding and position encoding layer, an encoder layer, an attention pooling layer, and an output layer. The remaining lifetime prediction module is further used to map time series data to a preset internal feature dimension of the model and add position information through input embedding and location encoding layers to obtain a first feature matrix; the adaptive hybrid attention module in the encoder calculates global attention features and sliding window attention features in parallel based on the first feature matrix, and generates attention weights corresponding to each attention feature through a gating network based on the first feature matrix; the global attention features, sliding window attention features and corresponding attention weights are weighted and fused, and then processed sequentially through the residual connection and layer normalization module and the feedforward neural network module in the encoder to obtain the encoder output features; the attention pooling layer aggregates the encoder output features along the time dimension into a global feature vector, and the linear transformation module and the sigmoid activation function in the output layer map the global feature vector to a normalized remaining lifetime percentage.

[0011] In this embodiment, time-series data of the electronic power component to be predicted at multiple recent consecutive historical moments are obtained. The time-series data is then input into a trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted. The adaptive dual-attention Transformer model includes an input embedding and position encoding layer, an encoder layer, an attention pooling layer, and an output layer. The input embedding and position encoding layer maps the time-series data to a preset internal feature dimension and adds positional information, enhancing the expressive power of the features. This allows the model to learn degradation patterns in a richer feature space and enables the self-attention mechanism to perceive the sequential information of the time series, overcoming the standard Transformer's insensitivity to sequence order. By utilizing the adaptive hybrid attention module in the encoder to compute global attention features and sliding window attention features in parallel based on the first feature matrix, the limitations of a single attention mechanism in multi-scale degradation feature extraction are overcome. Furthermore, a gating network is used based on the first feature matrix... The feature matrix generates attention weights corresponding to each attention feature, enabling dynamic adjustment of the fusion ratio between local and global pathways. This allows for selective focusing on key features throughout the entire lifecycle of electronic power components. Weighted fusion of global attention features, sliding window attention features, and their corresponding attention weights balances long-distance dependency modeling capabilities with local dynamic perception capabilities. Furthermore, the weighted fused features are sequentially processed by the residual connection and layer normalization module and the feedforward neural network module in the encoder to obtain the encoder output features. An attention pooling layer aggregates the encoder output features along the time dimension into a global feature vector, which is then mapped using a linear transformation module and a sigmoid activation function in the output layer to obtain a high-precision normalized remaining lifetime percentage. This application employs an adaptive dual-attention Transformer fusion mechanism to predict the lifetime of electronic power components, solving the technical challenge of traditional methods simultaneously considering long-term trends and local fluctuations, thus improving the accuracy of electronic power component lifetime prediction. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort, wherein: Figure 1 A flowchart illustrating a power component lifetime prediction method using an adaptive dual-attention Transformer, provided in an embodiment of this application; Figure 2A schematic diagram of an adaptive dual-attention Transformer model architecture provided in this application; Figure 3 A schematic diagram of the structure of an adaptive dual-attention Transformer power component lifetime prediction system provided in this application; Figure 4 This application provides RUL prediction curves based on different methods using the NASA I dataset when SP=50. Figure 5 This application provides a RUL prediction curve based on different methods using the NASA I dataset when SP=70; Figure 6 This application provides a RUL prediction curve based on different methods using the NASA I dataset when SP=90. Figure 7 This application provides a RUL prediction curve based on different methods using the NASA II dataset when SP=50. Figure 8 This application provides a RUL prediction curve based on different methods using the NASA II dataset when SP=70; Figure 9 This application provides a RUL prediction curve based on different methods using the NASA II dataset when SP=90. Figure 10 This application provides RUL prediction curves based on different methods using the CALCE Ⅰ dataset when SP=300; Figure 11 This application provides RUL prediction curves based on different methods using the CALCE Ⅰ dataset when SP=400; Figure 12 This application provides RUL prediction curves based on different methods using the CALCE Ⅰ dataset when SP=500; Figure 13 This application provides RUL prediction curves based on different methods using the CALCE II dataset when SP=300; Figure 14 This application provides RUL prediction curves based on different methods using the CALCE II dataset when SP=400; Figure 15 This application provides a RUL prediction curve based on different methods using the CALCE II dataset when SP=500; Figure 16 This application provides a fitted image of the predicted and actual values ​​of a DC-DC power module when SP=10000. Figure 17 This application provides a fitted image of the predicted and actual values ​​of a DC-DC power module when SP=20000; Figure 18 This application provides a fitted image of the predicted and actual values ​​of a DC-DC power module under the condition of SP=30000. Detailed Implementation

[0013] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. The following embodiments are used to illustrate this application, but are not intended to limit the scope of this application. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0014] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0015] It should be noted that the terms "first, second, and third" used in the embodiments of the present invention are only used to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present invention described herein can be implemented in an order other than that illustrated or described herein.

[0016] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of this application pertain. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0017] This application provides a power component lifetime prediction method using an adaptive dual-attention Transformer, such as... Figure 1 The diagram shown is a flowchart illustrating a power component lifetime prediction method for an adaptive dual-attention Transformer provided in an embodiment of this application. The method includes: S101. Obtain time series data of the electronic power component to be predicted at multiple recent consecutive historical moments.

[0018] The time-series data includes multi-source condition monitoring parameters of the electronic power component to be predicted at different times. These parameters include the voltage, current, temperature, output power, and ripple of the electronic power component.

[0019] In some embodiments, the most recent consecutive historical moments can be 30, 50, 100, etc., obtained by continuously sampling from a time window prior to the current moment. The number of historical moments is merely illustrative and is not limited in this application. This application will subsequently describe the number of historical moments as 30.

[0020] In some embodiments, the multi-source condition monitoring data (actually collected voltage, current, temperature, output power, ripple, etc.) corresponding to the electronic power component to be predicted may differ at different historical moments. The historical moments are sorted by timestamps, and each historical moment is assigned corresponding multi-source condition monitoring data to obtain time series data. This application will subsequently describe the multi-source condition monitoring data as including five categories: voltage, current, temperature, output power, and ripple.

[0021] S102. Input the time series data into the trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted.

[0022] The normalized remaining lifetime percentage is the proportion of the number of cycles remaining from the current moment until the end of the electronic power component's lifetime to the total number of cycles. By using the normalized remaining lifetime percentage as the prediction result of the remaining lifetime of the electronic power component from the current moment, the differences in the absolute value of the lifetime of individual devices can be eliminated, which facilitates performance evaluation across devices and datasets.

[0023] In some embodiments, such as Figure 2 As shown, the adaptive dual-attention Transformer model includes an input embedding and position encoding layer 201, an encoder layer 202, an attention pooling layer 203, and an output layer 204. Based on this, step S102, "inputting time-series data into the trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted," includes: S1021. The time series data is mapped to the preset internal feature dimension of the model through the input embedding and position encoding layer, and position information is added to obtain the first feature matrix; S1022. The adaptive hybrid attention module in the encoder is used to calculate the global attention feature and the sliding window attention feature in parallel based on the first feature matrix, and the gating network is used to generate the attention weight corresponding to each attention feature based on the first feature matrix. The global attention feature, the sliding window attention feature and the corresponding attention weight are weighted and fused, and then processed by the residual connection and layer normalization module and the feedforward neural network module in the encoder to obtain the encoder output feature; S1023. The attention pooling layer is used to aggregate the encoder output feature along the time dimension into a global feature vector, and the global feature vector is mapped to the normalized remaining lifetime percentage through the linear transformation module and the Sigmoid activation function in the output layer.

[0024] In some embodiments, the encoder layer includes one or more; when there are multiple encoder layers, the encoder layers are connected in sequence, and the encoder output feature is the feature output by the last encoder layer.

[0025] In some embodiments, the preset model internal feature dimension is the hidden dimension of the adaptive dual attention Transformer model, representing the feature space actually processed inside the model. The preset model internal feature dimension can be preset to 128, 256 or 512 based on experience. This application selects 128. In practice, the model internal feature dimension can be adjusted based on the data scale of the target task and the computational complexity of the model. The input embedding and position encoding layer implements feature encoding and position encoding. In the position encoding process, the time series data (30 time steps, each time step corresponding to 5 kinds of multi-source monitoring data) is first linearly transformed to obtain the initial mapping feature (30×64). Then, the initial mapping feature is deeply encoded to obtain the deep feature (30×128) corresponding to the preset model internal feature dimension (128). Then, position encoding is performed, and sinusoidal encoding is used to add position information to the deep feature, thereby obtaining the first feature matrix (30×128) containing position information.

[0026] In some embodiments, the encoder includes an adaptive hybrid attention module, a residual connection and layer normalization module, and a feedforward neural network module. The adaptive hybrid attention module includes a global attention unit, a sliding window attention unit, a gating network, and a weighted fusion unit. The global attention unit calculates global attention features based on a first feature matrix; the sliding window attention unit calculates sliding window attention features based on the first feature matrix; the gating network generates attention weights corresponding to the global attention features and the sliding window attention features based on the first feature matrix; the weighted fusion unit weights and fuses the global attention features, the sliding window attention features, and the corresponding attention weights to obtain hybrid attention features. The residual connection and layer normalization module adds the first feature matrix and the hybrid attention features and then performs layer normalization to obtain normalized features; the feedforward neural network module performs a nonlinear transformation on the normalized features to obtain the encoder output features.

[0027] In some embodiments, the adaptive hybrid attention module includes a multilayer perceptron, the sliding window attention unit includes multiple sliding window attention heads, and the method for calculating the sliding window attention features includes: based on a preset reference time window radius and a time step in the first feature matrix. Input data at preset distances on both sides and a multilayer perceptron determine the time step. The corresponding adaptive window radius; the preset distance is determined based on the baseline time window radius; construct the mask matrix corresponding to the time series data. Among them, for two time steps in time series data ,like Then let ,otherwise ;in For time step The corresponding adaptive window radius, Represents the time steps in the mask matrix The corresponding mask value; for each sliding window attention head, the first feature matrix is ​​linearly transformed into a first query matrix, a first key matrix, and a first value matrix through a learnable first weight matrix, and the first dot product matrix is ​​calculated based on the first query matrix and the first key matrix; the mask matrix is... Add the first dot product matrix, normalize it using the Softmax function, and then multiply it with the first value matrix to obtain the sliding window attention sub-features; concatenate and linearly transform the sliding window attention sub-features output by each sliding window attention head to obtain the sliding window attention features.

[0028] In some embodiments, the preset baseline time window radius can be a pre-defined time window radius. This application sets the preset baseline time window radius to 10, so that each time step only focuses on itself and its previous 9 historical time steps, thereby enhancing the model's ability to model local degradation trends. In practice, the preset baseline time window radius can be adjusted based on the performance of the validation set. Time step i is any time step in the time series data; based on the preset baseline time window radius and the time steps in the first feature matrix... Input data at preset distances on both sides and a multilayer perceptron determine the time step. The corresponding adaptive window radius includes: determining the time step from the first feature matrix. Previously, with time steps The first input data at a position at a distance from the radius of the reference time window, and the time step. Afterwards, with time steps The first and second input data are input into a multilayer perceptron at a position relative to the radius of the reference time window to obtain the window adjustment factor; the time step is calculated based on the window adjustment factor, the maximum window adjustment range, and the radius of the reference time window. The corresponding adaptive window radius.

[0029] In some embodiments, the multilayer perceptron includes two fully connected layers. The first input data and the second input data are concatenated and then input into the first fully connected layer of the multilayer perceptron for feature extraction and ReLU activation. The second fully connected layer of the multilayer perceptron maps the features output by the first fully connected layer into one-dimensional features and processes them through the Sigmoid function to obtain a window adjustment factor.

[0030] In some embodiments, the time step is calculated based on the window adjustment factor, the maximum window adjustment range, and the reference time window radius. Corresponding adaptive window radius It can be expressed by formula (1): (1); in, These represent the radius of the base time window and the maximum adjustment range of the window, respectively. This represents the Sigmoid function. This represents a multilayer perceptron. These represent the first input data and the second input data, respectively. This is the window adjustment factor, with a value range of [0, 1].

[0031] Understandably, by determining the adaptive window radius corresponding to different time steps, the model can intelligently adjust its observation field based on the real-time local characteristics of multi-source state monitoring data. During the stable degradation phase, it can focus on closely adjacent cycles, while automatically expanding the scope of attention when capturing weak abnormal signals, thereby achieving a dynamic balance between computational efficiency and feature capture capability.

[0032] In some embodiments, mask matrix The dimension of the sliding window attention sub-features is the same as the dimension of the first dot product matrix. It can be expressed by formula (2): (2); in, These represent the first query matrix, the first key matrix, and the first value matrix, respectively. Indicates transpose. Scaling factor The preset internal feature dimensions of the model. This indicates the number of attention heads in the sliding window.

[0033] It is understandable that this can be achieved by determining the adaptive window radius corresponding to the time step and constructing the mask matrix. , mask matrix Adding the first dot product matrix and normalizing it using the Softmax function before multiplying it with the first value matrix ensures that the computation at each time step depends only on its local context information, rather than the entire sequence. This focus on the strong correlation between adjacent time steps allows the sliding window attention unit to more sensitively capture transient abnormal signals during the degradation process of electronic power components, enhancing the model's ability to identify early faults.

[0034] In some embodiments, after processing each sliding window attention head to obtain sliding window attention sub-features, the sliding window attention sub-features are concatenated and linearly transformed to obtain sliding window attention features. This process can be represented by formula (3): (3); in, This represents the attention features of the sliding window. Indicates splicing, This represents the output feature of the first attention head. Indicates the first The output features of an attention head This represents the learnable output linear projection matrix.

[0035] In some embodiments, the global attention unit includes multiple global attention heads, the number of which is the same as the number of sliding window attention heads. The method for calculating global attention features includes: for each global attention head, linearly transforming the first feature matrix into a second query matrix using a learnable second query weight matrix, linearly transforming the first feature matrix into a second key matrix using a learnable second key weight matrix, and linearly transforming the first feature matrix into a second value matrix using a learnable second value weight matrix; calculating the dot product of the transpose of the second query matrix and the second key matrix, and scaling it by a scaling factor to obtain a scaled second dot product matrix; normalizing the second dot product matrix using the Softmax function to obtain the global attention weight matrix; multiplying the global attention weight matrix by the second value matrix to obtain global attention sub-features. Finally, concatenating and linearly transforming the global attention sub-features output by each attention head yields the global attention features.

[0036] In some embodiments, the gated network includes a global average pooling unit, a first fully connected network, and a second fully connected network. The gated network generates attention weights corresponding to each attention feature based on a first feature matrix, including: compressing the first feature matrix along the time dimension into a second global feature vector using the global average pooling unit; mapping the second global feature vector to 1 / 4 of the model's internal feature dimension using the first fully connected network and performing a non-linear transformation using the ReLU function to obtain a first feature vector; mapping the first feature vector to a two-dimensional space using the second fully connected network and converting it into attention weights corresponding to the global attention feature and the sliding window attention feature using the Softmax function; the sum of the attention weights corresponding to the global attention feature and the sliding window attention feature is 1.

[0037] In some embodiments, the gated network first performs global average pooling on the first feature matrix along the time dimension through a global average pooling unit to obtain a second global feature vector. This process can be represented by formula (4): (4); in, Represents the first characteristic matrix. Data corresponding to each time step This indicates the number of time steps (corresponding to the number of rows in the first feature matrix). This represents the second global feature vector. The second global feature vector compresses the time dimension information while retaining the global features of the channel dimension.

[0038] In some embodiments, the process of mapping the second global feature vector to 1 / 4 of the feature dimension within the model through a first fully connected network and performing a non-linear transformation using the ReLU function to obtain the first feature vector, and then mapping the first feature vector to a two-dimensional space using the second fully connected network and converting it into attention weights corresponding to the global attention features and the sliding window attention features using the Softmax function, can be represented as follows: (5); in, These represent the attention weights corresponding to the sliding window attention features and the global attention features, respectively. These are the weights and biases of the first fully connected network, respectively. These represent the weights and biases of the second fully connected network, respectively. Represents the ReLU function. This represents the Softmax function.

[0039] In some embodiments, the weighted fusion of global attention features, sliding window attention features, and corresponding attention weights can be expressed by formula (6): (6); in, This represents the hybrid attention features after weighted fusion. These represent global attention features and sliding window attention features, respectively. When... When the value is large, the model enhances its ability to integrate global context to predict long-term trends; when When the input is large, the model focuses on capturing local mutations and dynamic details. This mechanism of customizing the fusion strategy for each input enables truly personalized modeling, allowing the model to better generalize to complex degradation scenarios not covered by the training set. At the same time, the attention weights themselves can also serve as an interpretability indicator for judging whether the current sequence relies more on local or global information.

[0040] In some embodiments, the training method for the adaptive dual-attention Transformer model includes: acquiring a training dataset; the training dataset includes time-series sample data of electronic power components throughout their entire lifespan and corresponding normalized remaining lifetime percentage labels; inputting the time-series sample data into the adaptive dual-attention Transformer model to obtain a predicted normalized remaining lifetime percentage; and performing backpropagation training on the network parameters of the adaptive dual-attention Transformer model based on the predicted normalized remaining lifetime percentage, the corresponding normalized remaining lifetime percentage labels, and a loss function until the convergence condition is met, thereby obtaining the parameters of the trained adaptive dual-attention Transformer model.

[0041] In some embodiments, multi-source condition monitoring data of electronic power components are collected during the aging process (full life cycle) to construct a dataset containing the original degradation trajectory; then, the data in the dataset is cleaned to remove outliers (3). The data is normalized using Min-Max standardization, and the normalized dataset is then divided into training and testing datasets. Next, the time-series samples from the training dataset are input into the adaptive dual-attention Transformer model. The model's predicted loss is calculated by predicting the normalized remaining lifetime percentage, the corresponding normalized remaining lifetime percentage label, and the loss function. If the predicted loss is less than a preset loss value, the adaptive dual-attention Transformer model is updated until the convergence condition is met (e.g., the predicted loss is greater than or equal to the preset loss value). At this point, training stops, and the weight file of the trained adaptive dual-attention Transformer model is output.

[0042] In this embodiment, time-series data of the electronic power component to be predicted at multiple recent consecutive historical moments are obtained. The time-series data is then input into a trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted. The adaptive dual-attention Transformer model includes an input embedding and position encoding layer, an encoder layer, an attention pooling layer, and an output layer. The input embedding and position encoding layer maps the time-series data to a preset internal feature dimension and adds positional information, enhancing the expressive power of the features. This allows the model to learn degradation patterns in a richer feature space and enables the self-attention mechanism to perceive the sequential information of the time series, overcoming the standard Transformer's insensitivity to sequence order. By utilizing the adaptive hybrid attention module in the encoder to compute global attention features and sliding window attention features in parallel based on the first feature matrix, the limitations of a single attention mechanism in multi-scale degradation feature extraction are overcome. Furthermore, a gating network is used based on the first feature matrix... The feature matrix generates attention weights corresponding to each attention feature, enabling dynamic adjustment of the fusion ratio between local and global pathways. This allows for selective focusing on key features throughout the entire lifecycle of electronic power components. Weighted fusion of global attention features, sliding window attention features, and their corresponding attention weights balances long-distance dependency modeling capabilities with local dynamic perception capabilities. Furthermore, the weighted fused features are sequentially processed by the residual connection and layer normalization module and the feedforward neural network module in the encoder to obtain the encoder output features. An attention pooling layer aggregates the encoder output features along the time dimension into a global feature vector, which is then mapped using a linear transformation module and a sigmoid activation function in the output layer to obtain a high-precision normalized remaining lifetime percentage. This application employs an adaptive dual-attention Transformer fusion mechanism to predict the lifetime of electronic power components, solving the technical challenge of traditional methods simultaneously considering long-term trends and local fluctuations, thus improving the accuracy of electronic power component lifetime prediction.

[0043] This application provides an adaptive dual-attention Transformer power component lifetime prediction system, such as... Figure 3 As shown, the adaptive dual-attention Transformer power component lifetime prediction system 300 includes: The data acquisition module 301 is used to acquire time series data of the electronic power component to be predicted at multiple recent consecutive historical moments; the time series data includes multi-source state monitoring parameters of the electronic power component to be predicted at different moments; The remaining lifetime prediction module 302 is used to input time series data into the trained adaptive dual attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted; the normalized remaining lifetime percentage is the proportion of the number of cycles remaining from the current time to the end of the lifetime of the electronic power component to be predicted to the total number of cycles. The adaptive dual-attention Transformer model includes an input embedding and position encoding layer, an encoder layer, an attention pooling layer, and an output layer. The remaining lifetime prediction module 302 is further used to map time series data to a preset internal feature dimension of the model and add position information through the input embedding and position encoding layer to obtain a first feature matrix; the adaptive hybrid attention module in the encoder calculates global attention features and sliding window attention features in parallel based on the first feature matrix, and generates attention weights corresponding to each attention feature based on the first feature matrix through a gating network; the global attention features, sliding window attention features and corresponding attention weights are weighted and fused, and then processed sequentially through the residual connection and layer normalization module and the feedforward neural network module in the encoder to obtain the encoder output features; the attention pooling layer aggregates the encoder output features along the time dimension into a global feature vector, and the linear transformation module and the sigmoid activation function in the output layer map the global feature vector to a normalized remaining lifetime percentage.

[0044] In some embodiments, the adaptive hybrid attention module includes a multilayer perceptron and a sliding window attention unit, the sliding window attention unit including a plurality of sliding window attention heads, and the remaining lifetime prediction module 302 is further configured to: Based on the preset reference time window radius and the time step in the first feature matrix Input data at preset distances on both sides and a multilayer perceptron determine the time step. The corresponding adaptive window radius; the preset distance is determined based on the baseline time window radius; Construct the mask matrix corresponding to the time series data Among them, for two time steps in time series data ,like Then let ,otherwise ;in For time step The corresponding adaptive window radius, Represents the time steps in the mask matrix The corresponding mask value; For each sliding window attention head, the first feature matrix is ​​linearly transformed into a first query matrix, a first key matrix, and a first value matrix through a learnable first weight matrix, and the first dot product matrix is ​​calculated based on the first query matrix and the first key matrix; the mask matrix is ​​then... Add the first dot product matrix, normalize it using the Softmax function, and then multiply it with the first value matrix to obtain the sliding window attention sub-features; The sliding window attention features are obtained by concatenating and linearly transforming the sliding window attention sub-features output by each sliding window attention head.

[0045] In some embodiments, the remaining lifetime prediction module 302 is further configured to: determine a time step from the first feature matrix. Previously, with time steps The first input data at a position at a distance from the radius of the reference time window, and the time step. Afterwards, with time steps The second input data is located at a position relative to the radius of the reference time window; the first and second input data are input into the multilayer perceptron to obtain the window adjustment factor; the time step is calculated based on the window adjustment factor, the maximum window adjustment range, and the radius of the reference time window. The corresponding adaptive window radius.

[0046] In some embodiments, the gated network includes a global average pooling unit, a first fully connected network, and a second fully connected network; the remaining lifetime prediction module 302 is further configured to: compress the first feature matrix into a second global feature vector along the time dimension using the global average pooling unit; map the second global feature vector to 1 / 4 of the feature dimension within the model through the first fully connected network and perform a nonlinear transformation using the ReLU function to obtain the first feature vector; map the first feature vector to a two-dimensional space using the second fully connected network and convert it into attention weights corresponding to the global attention features and the sliding window attention features through the Softmax function; the sum of the attention weights corresponding to the global attention features and the attention weights corresponding to the sliding window attention features is 1.

[0047] In some embodiments, the adaptive dual-attention Transformer power component lifetime prediction system further includes a model training module for acquiring a training dataset. The training dataset includes time-series sample data of electronic power components throughout their entire lifespan and corresponding normalized remaining lifetime percentage labels. The time-series sample data is input into the adaptive dual-attention Transformer model to obtain the predicted normalized remaining lifetime percentage. The network parameters of the adaptive dual-attention Transformer model are backpropagated and trained based on the predicted normalized remaining lifetime percentage, the corresponding normalized remaining lifetime percentage labels, and the loss function until the convergence condition is met, thus obtaining the trained adaptive dual-attention Transformer model.

[0048] It should be noted that the description of the above system embodiments is similar to the description of the above method embodiments, and has the same or similar beneficial effects as the method embodiments. For technical details not disclosed in the system embodiments of this application, please refer to the description of the method embodiments of this application for understanding.

[0049] The following describes the experimental process of the power component lifetime prediction method of the adaptive dual-attention Transformer provided in this application.

[0050] The degradation process of lithium-ion batteries under standard charge-discharge cycles exhibits both global degradation trends and local transient events. Therefore, this application selects the NASA lithium-ion battery dataset and the CALCE dataset released by the University of Maryland to verify the effectiveness of the adaptive dual-attention Transformer power component lifetime prediction method provided in this application. Specifically, four datasets (B0005, B0006, B0007, and B0018) from the NASA dataset are selected for model validation. The initial capacities of B0005, B0006, B0007, and B0018 are 1.86 Ah, 2.04 Ah, 1.89 Ah, and 1.86 Ah, respectively, with a rated capacity of 2.4 Ah for all. The battery is charged at a constant current of 2 A until the battery voltage reaches 4.2 V, and then charged at this constant voltage until the charging current drops to 20 mA. The discharge current is a constant 2 A. When the actual usable capacity of the battery drops to 70% of the rated capacity, the battery is considered to have reached its lifetime threshold, which is set at 1.4 Ah. The CALCE dataset uses four batteries numbered CS2_35, CS2_36, CS2_37, and CS2_38, each with a rated capacity of 1.1 Ah. All batteries were charged using a standard constant current / constant voltage (DC / DC) method, starting at a constant current of 0.5 A until the voltage reached 4.2 V, and then charged at a constant voltage of 4.2 V until the charging current dropped to 0.05 A. These lithium-ion batteries share the same discharge cutoff voltage of 2.7 V and a constant discharge current of 1 A. A battery is considered to have reached its lifespan threshold, denoted as 0.77 Ah, when its actual usable capacity drops to 70% of its rated capacity.

[0051] To comprehensively evaluate the model's generalization performance and ensure the reliability of the statistical results, this application employs a leave-one-out cross-validation strategy on both datasets. Specifically, for each sequence containing four batteries, one battery is selected sequentially as an independent test set, while the remaining three batteries are combined into a training pool. Subsequently, the data in the training pool is further divided into training and validation subsets for model parameter optimization and hyperparameter tuning. The specific partitioning scheme for the four experiments is shown in Table 1. This partitioning method maximizes the use of limited data, effectively avoids data leakage caused by random partitioning, significantly reduces the volatility of evaluation results, and thus provides a robust estimate of the model's generalization ability on unseen data.

[0052] Table 1 Dataset Partitioning Methods ; When a battery's rated capacity drops to 70%, it is considered to have reached end-of-life (EOL). Based on this standard, RUL (Rating of Limiting Life) can be defined as the percentage of cycles elapsed from the current moment until EOL out of the total battery's lifespan. Therefore, the RUL of a battery can be defined as: (7); in, This indicates the total number of battery cycles from the start of use to the end of its lifespan. This indicates the number of cycles performed at the prediction start point (SP). This definition normalizes RUL into a relative metric that effectively reflects the phased characteristics of the battery aging process.

[0053] Hyperparameter configuration is a key factor affecting RUL prediction results. The hyperparameter configuration during the experimental training process is shown in Table 2. All experimental models were run on the PyTorch 3.8 framework.

[0054] Table 2 Experimental hyperparameter configuration ; To comprehensively and objectively evaluate the predictive performance of the Adaptive Dual-Attention Transformer model, this application uses five state-of-the-art (SOTA) methods for RUL prediction: Autoformer, iTransformer, TimesMixer, TCN, and Mamba to conduct comparative experiments, verifying from multiple dimensions the superiority and robustness of the Adaptive Dual-Attention Transformer (ADAformer) model provided in this application in complex degradation scenarios.

[0055] I. NASA Dataset Prediction Results Experiments were conducted using the NASA dataset, with the starting prediction point (SP) set to 50, 70, and 90. The RUL prediction results for the NASA I dataset are shown in Table 3.

[0056] Table 3 NASA I Prediction Results and Comparative Experiment Results ; From a comprehensive perspective, the ADAformer proposed in this application demonstrates a significant leading advantage, with a mean MAE (mean absolute error) of 0.0077 and a mean root mean square error (RMSE) of 0.0138, both of which are the lowest among all models. In comparison, the second-best performing iTransformer has a mean MAE of 0.0102, meaning ADAformer reduces its error by approximately 0.0025. This indicates that even on datasets with relatively clear degradation patterns, the dual attention pathway collaborative mechanism proposed in this application can still fit the degradation curve more accurately than a single global attention or convolution mechanism.

[0057] Looking at different SPs, at SP=50, ADAformer's R 2The accuracy rate is 99.10%, outperforming the iTransformer and Mamba models. This is attributed to the sliding window local attention mechanism, which enables it to keenly capture subtle capacity decline trends in the early stages when battery health is high and degradation characteristics are weak, avoiding the over-smoothing phenomenon caused by the excessively large receptive field of traditional Transformers. At SP=70 and SP=90, corresponding to the mid-to-late stages of battery degradation, the nonlinearity of degradation intensifies. ADAformer's MAE at SP=70 is only 0.0084, while the errors of iTransformer and TimesMixer reach 0.0235 and 0.0141, respectively. Particularly at the failure threshold of SP=90, ADAformer still maintains an extremely low RMSE of 0.0129, demonstrating that the gating network can effectively adjust the weights of global attention features and sliding window attention features, maintaining the stability of the predicted trajectory even during drastic changes.

[0058] Figure 4 , Figure 5 and Figure 6 (The vertical axis represents battery capacity (unit: Ah), and the horizontal axis represents battery cycle count.) The following are RUL prediction curves based on different methods using the NASA II dataset for SP=50, SP=70, and SP=90, respectively, for comparison. Figure 4 , Figure 5 and Figure 6 It can be seen that, under different SP conditions, the prediction curve of ADAformer provided in this application is closer to the actual capacity decay curve than the prediction curves of the other five methods. This further illustrates that the ADAformer model can achieve the best prediction of the real capacity decay curve.

[0059] Table 4 shows the comparison results of different models on the NASA II dataset.

[0060] Table 4. NASA II Prediction Results and Comparative Experiment Results ; Compared to NASA I, the NASA II dataset exhibits more complex operational fluctuations. As shown in Table 4, ADAformer demonstrates a more significant advantage, with a mean MAE of 0.0143 and a mean RMSE of 0.0243. In the early stages of degradation, the R-value of the ADAformer model... 2The accuracy rate remained high at 97.44%, outperforming the prediction results of the other five models, indicating that the model can effectively distinguish between real degradation signals and environmental noise, avoiding being misled by spurious fluctuations. At SP=70, ADAformer's MAE was controlled at 0.0144, while the errors of iTransformer and TimesMixer surged to 0.0235 and 0.0606, respectively. This significant difference confirms the effectiveness of the proposed local and global dual-pathway architecture in handling non-stationary, highly volatile data. The local path captures transient changes, while the global path anchors long-term trends; their complementarity greatly enhances the model's generalization boundary. Near the end of its lifespan, ADAformer's RMSE was 0.0257, significantly lower than Mamba (0.0305) and TCN (0.0332). This shows that even under the dual pressure of small sample sizes and high noise, the ADAformer model can still accurately converge to the true failure point without divergence or overfitting.

[0061] Figure 7 , Figure 8 and Figure 9 (The vertical axis represents battery capacity (unit: Ah), and the horizontal axis represents battery cycle count.) The following are RUL prediction curves based on different methods using the NASA II dataset for SP=50, SP=70, and SP=90, respectively, for comparison. Figure 7 , Figure 8 and Figure 9 It can be seen that the ADAformer model's predicted curves closely match the actual degradation curves, both in the early, gradual degradation phase and in the later stages when capacity regeneration occurs. In contrast, other models, while generally predicting the overall trend of battery degradation, perform poorly when faced with localized abrupt changes. This fully demonstrates that the ADAformer model, with its dual-attention collaborative mechanism, possesses strong robustness and adaptability in handling complex nonlinear degradation data, enabling it to more accurately approximate the actual end-of-life point of the battery.

[0062] II. CALCE Dataset Prediction Results The CALCE dataset is known for its highly consistent and low-noise laboratory conditions. Its degradation trajectories exhibit high monotonicity, placing higher demands on the long-term trend extrapolation accuracy of the models, as the scarcity of local disturbances means that even minor systematic biases can be amplified. In the experiments, SP values ​​of 300, 400, and 500 were used on the CALCE dataset. Table 5 shows the prediction comparison results of each model on the CALCE I dataset.

[0063] Table 5. CALCE I Prediction Results and Comparative Experiment Results ; As shown in Table 5, the ADAformer model maintains its overall lead on the CALCE Ⅰ dataset. Its mean MAE is 0.0100 and its mean RMSE is 0.1696. Although the absolute values ​​are lower than those on the NASA dataset due to the different data scale, its performance in relative error control is excellent. Especially in the early prediction stage with SP=300, ADAformer's MAE is only 0.0088, and R... 2 With a success rate as high as 99.45%, it significantly outperforms Autoformer (MAE 0.0186, R² 98.23%) and Mamba (MAE 0.0202, R² 97.81%). This indicates that even in an ideal environment without significant local mutations, the dual-pathway structure of the ADAformer model can still achieve more accurate long-term predictions than pure global attention or state-space models by finely modeling the changes in the decay slope.

[0064] It is worth noting that TCN performs exceptionally well on this dataset, nearly matching ADAformer, demonstrating the inherent advantage of convolutional architectures in handling smooth, highly regular time series. However, in the later stages with SP=500, TCN's RMSE rises to 0.0220, while ADAformer remains stable at 0.0187, showing stronger end-of-life convergence. This phenomenon indicates that even with smooth data, small nonlinear accelerations near the end of their lifespan still require adaptive mechanisms to capture, which is precisely where the value of the ADAformer gating network lies.

[0065] Figure 10 , Figure 11 and Figure 12 (The vertical axis represents battery capacity (unit: Ah), and the horizontal axis represents battery cycle count.) The following are RUL prediction curves based on different methods using the CALCE Ⅰ dataset for SP=300, SP=400, and SP=500, respectively, for comparison. Figure 10 , Figure 11 and Figure 12As can be seen, ADAformer's prediction curve is closest to the true curve under all SP conditions, especially in the later stage of SP=500, where its prediction path almost coincides with the true value without significant deviation or divergence. In contrast, Autoformer and Mamba show a slight tendency to overestimate in the early stages, while TimesMixer exhibits oscillating overfitting in local areas. It is worth noting that although TCN performs well overall, it shows an over-smoothing trend at SP=300, failing to capture subtle slope changes. This intuitively confirms the advantage of ADAformer's dual-path mechanism, which can maintain global trend stability while fine-tuning the decay rate through local attention, achieving extreme fitting accuracy under ideal conditions. This verifies that it is not only suitable for noisy scenarios but also can reach its performance limit in highly consistent data.

[0066] Table 6 presents the experimental results for the CALCE II dataset. Compared to CALCE I, this dataset contains more diverse charge and discharge protocols and environmental stresses, leading to slight non-monotonic degradation behavior in some samples. It is an ideal testbed for verifying the model's generalization ability across operating conditions.

[0067] Table 6. CALCE II Prediction Results and Comparative Experiment Results ; As shown in Table 6, ADAformer's mean MAE is 0.0083 and mean RMSE is 0.0127, both significantly outperforming other methods. Of particular note is the high R-value of the ADAformer model in early predictions with SP=300. 2 Achieving 99.78% accuracy means the model's estimation of the initial degradation rate is approaching the theoretical limit. In mid-to-late-stage predictions, ADAformer's advantage widens further. For example, at SP=500, its MAE is 0.0090, while TimesMixer and Mamba reach 0.0154 and 0.0270, respectively. This difference stems from the subtle nonlinear inflection points implicit in CALCE II, which traditional models tend to misinterpret as noise and over-smooth, while ADAformer's local attention module effectively identifies these, thus preventing predicted trajectories from deviating from the true path.

[0068] Figure 13 , Figure 14 and Figure 15 (The vertical axis represents battery capacity (unit: Ah), and the horizontal axis represents battery cycle count.) The following are RUL prediction curves based on different methods using the CALCE II dataset for SP=300, SP=400, and SP=500, respectively, for comparison. Figure 13 , Figure 14 and Figure 15It is evident that ADAformer still exhibits the strongest trajectory tracking capability, especially at SP=400 and SP=500, where its predicted curve accurately follows the inflection point of the actual capacity without lag or jumps. In contrast, other models, such as iTransformer and Autoformer, while starting well at SP=300, gradually deviate as the cycle progresses; TimesMixer, on the other hand, produces high-frequency oscillations in local intervals, reflecting its sensitivity to weak signals but lack of stability. Notably, Mamba significantly underestimates the remaining lifetime at SP=500, indicating that state-space models may have an adaptation bottleneck when handling non-standard degradation modes.

[0069] To verify the effectiveness and reliability of the ADAformer model provided in this application, we conducted ablation experiments on the NASA I, NASA II, CALCE I, and CALCE II datasets, removing SWA and GA respectively to test their impact on prediction performance. As shown in Tables 7 and 8, the ADAformer model significantly outperformed any single-module variant in all datasets and SP settings. Taking NASA I as an example, in the SP=50 scenario, the full model achieved an R² of 99.10%, while removing SWA and GA reduced the R² to 98.65% and 98.63% respectively, indicating that even in the early stages dominated by global trends, local fluctuation modeling remains indispensable; and vice versa. This demonstrates that SWA and GA are not simply superimposed, but rather achieve synergistic gains through dynamic complementarity.

[0070] Table 7. Error Results of Ablation Experiments on NASA Datasets ; Table 8. Ablation Experiment Error Results for CALCE Dataset ; In the early stages of degradation, removing the Global Historical Information (GA) leads to a significant decrease in predictive performance. For example, in Table 8, when SP=300 for CALCE I, removing the GA improves the RMSE by 0.0095 compared to the ADAformer model; in Table 7, when SP=50 for NASA II, removing the GA increases the MAE by 0.005 compared to the ADAformer model. This indicates that in the early stages of battery degradation, capacity decay is relatively gradual, and global historical information is crucial for building a stable predictive baseline. The lack of a GA affects the model's ability to model long-term trends, making the model more susceptible to noise interference and causing predictive drift.

[0071] As the SP increases, as shown in Tables 7 and 8, the performance degradation caused by removing SWA gradually widens, especially in late-stage degradation scenarios. For example, in Table 7, when SP=90 for NASA I, removing SWA improves RMSE by 0.0042 compared to the ADAformer model; in Table 8, when SP=500 for CALCE II, removing SWA increases MAE by 0.0017 and RMSE by 0.0017 compared to the ADAformer model. This phenomenon also confirms that when the battery enters the deep degradation stage, the capacity curve exhibits strong nonlinearity and sudden drops, and the model must rely on SWA to capture recent local fluctuations. In contrast, the impact of GA is relatively mild in the later stages of degradation.

[0072] It is noteworthy that the above patterns remain consistent across both the NASA and CALCE datasets, and hold true even under different sampling frequencies and battery chemistry systems. This indicates that SWA's sensitivity to late-stage degradation has cross-platform universality.

[0073] III. Engineering Application Verification for DC-DC Power Modules A DC-DC power module is a power electronic device that efficiently converts one DC voltage to another. It is widely used in complex electronic systems such as aerospace and weapon systems. Its core principle is to achieve efficient conversion and regulation of electrical energy through high-frequency switching in conjunction with magnetic and energy storage components. Benefiting from its advantages of high efficiency, small size, and high power density, DC-DC modules have become an indispensable power supply unit in modern electronic systems.

[0074] However, as typical power electronic components, DC-DC power modules are susceptible to thermal stress, humidity stress, and electrical stress during long-term operation, leading to gradual performance degradation of their internal key components. For example, the equivalent series resistance (ESR) of electrolytic capacitors increases with usage time, resulting in decreased filtering capability; the on-resistance of MOSFETs increases due to aging, causing increased power consumption and accelerated temperature rise. These degradation processes are characterized by their insidious, cumulative, and nonlinear nature, potentially leading to unstable output voltage, reduced conversion efficiency, or even functional failure. Due to their typical structure, clear degradation mechanisms, and coverage of various failure modes of common power electronic components, DC-DC power modules are widely regarded as ideal subjects for studying the reliability and lifespan prediction of electronic power components. Therefore, this application selects an industrial-grade DC-DC power module as the research vehicle, conducting accelerated degradation tests based on its typical operating stresses to simulate the performance degradation process under real industrial scenarios, thereby verifying the feasibility and practicality of the proposed model in practical engineering applications.

[0075] This application conducts accelerated degradation tests on a DC-DC power module under the combined effects of temperature, humidity, and electrical stress. The normal operating environment of this component is: temperature 20℃~40℃ and humidity 40%~60%. The performance degradation process of the component under normal operating conditions is extremely slow. Long-term monitoring of its degradation process under actual service conditions would make it difficult to obtain sufficient degradation data within a limited research period. To efficiently obtain experimental data reflecting its aging trend while ensuring that its degradation mechanism is consistent with actual operating conditions, the accelerated stress conditions set in this application are: temperature 80℃, relative humidity 90%, and electrical stress of 24V DC voltage. The DC-DC power module is placed in a temperature and humidity test chamber. A current sensor is used to collect the module's current value, which is transmitted to a computer via a data acquisition card. The accelerated degradation test lasted 912 hours with a sampling frequency of 5kHz, obtaining approximately 16 million data points. Data were repeatedly extracted according to the principle of stratified sampling to form experimental test groups, containing approximately 30,000 voltage and current values.

[0076] As the module operates for an extended period, the ESR (Electrolyte Ratio) gradually increases due to electrolyte evaporation, leading to a significant increase in output voltage ripple. Voltage ripple is more sensitive to minor aging of internal components and can reflect the module's health degradation earlier. Therefore, in the experiment, voltage ripple was chosen as the core degradation characteristic indicator.

[0077] The trained ADAformer model was directly applied to the measured voltage ripple dataset of a DC-DC power module, with SP values ​​of 10000, 20000, and 30000 for prediction, to evaluate the model's performance in real-world noise environments. The prediction errors for the DC-DC power module are shown in Table 9.

[0078] Table 9 Prediction Error of DC-DC Power Module ; The fitted graphs of the predicted and actual values ​​of the DC-DC power module are shown below when SP is 10000, 20000, and 30000. Figure 16 , Figure 17 and Figure 18 (The vertical axis represents the root mean square value (RMS) of the ripple voltage, in V; the horizontal axis represents the number of cycles (x10).) 4 As shown in the figure.

[0079] Combined with Table 9, Figure 16 , Figure 17 and Figure 18 Analysis reveals that in the early stages of equipment operation, the voltage ripple signal primarily exhibits random fluctuations around a reference value, with minimal amplitude variations. At this point, the model achieves a 93.36% R-value. 2With an extremely low RMSE (0.0008), the model exhibits excellent noise resistance. Figure 16 As shown, the predicted curve closely follows the fluctuation trajectory of the true value, indicating that the GA algorithm effectively filters out high-frequency electromagnetic interference, accurately captures the subtle characteristics of the signal during the steady period, and does not produce false oscillations or false alarms due to oversensitivity.

[0080] When SP=20000, as the stress duration increases, the capacitor aging effect begins to appear, and the voltage ripple fluctuation amplitude increases, exhibiting more complex dynamic characteristics. At this stage, the model still maintains extremely high accuracy, with a MAE of only 0.0005. This indicates that the adaptive gating mechanism successfully balances long-range dependence and local abrupt changes, such as... Figure 17 As shown, the model not only smoothly fits the overall evolution trajectory of the ripple, but also accurately responds to local spike fluctuations, demonstrating good robustness.

[0081] In the prediction phase with SP=30000, the model's performance metrics were further improved, R... 2 It reached a peak of 93.39%, while the RMSE dropped to a minimum of 0.0006. This is mainly due to the SWA mechanism's precise focus on recent features. Figure 18 As shown, the model responds sensitively to sharp jumps and complex patterns in ripple signals, with the predicted curve closely matching the actual curve. This high-precision fitting avoids the prediction lag common in traditional methods when dealing with non-stationary signals, demonstrating the model's effectiveness in processing full lifecycle degradation data of DC-DC power modules.

[0082] This application addresses the problem of long-term dependence on local transient features in RUL prediction tasks for electronic power components. It proposes an ADAformer model, which adaptively balances global trend understanding with local detail focus by adjusting the weights of GA and SWA. Comparative experiments on NASA and CALCE datasets show that, compared to mainstream models such as Autoformer, iTransformer, and Mamba, the ADAformer model reduces the mean MSE by at least 15.4% and the mean RMSE by at least 18.2%, exhibiting stronger robustness in the early and late stages of degradation. The model's attention mechanism provides an interpretable theoretical basis for intelligent operation and maintenance of electronic power components. The model is applied to measured data from accelerated degradation tests of DC-DC power modules, predicting RUL... 2 The accuracy rate reached 93%, verifying the effectiveness of the ADAformer model in processing real industrial scenario data. This indicates that the method is not only applicable to standard laboratory datasets, but also has the potential for application in complex electronic systems such as aerospace and weapon systems for condition monitoring and predictive maintenance.

[0083] It should be noted that, depending on the implementation needs, the various steps / modules described in the embodiments of this application can be broken down into more steps / modules, or two or more steps / modules or parts of the operations of steps / modules can be combined into new steps / modules to achieve the purpose of the embodiments of this application.

[0084] The methods described in the embodiments of this application can be implemented in hardware, firmware, or as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk, or magneto-optical disk), or as computer code downloaded over a network that is originally stored in a remote recording medium or a non-transitory machine-readable medium and will be stored in a local recording medium. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.

[0085] Those skilled in the art will recognize that the units and method steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the embodiments of this application.

[0086] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.

Claims

1. A power component lifetime prediction method using an adaptive dual-attention Transformer, characterized in that, include: Acquire time series data of the electronic power component to be predicted at multiple recent consecutive historical moments; Time series data includes multi-source state monitoring parameters of the electronic power component to be predicted at different times; Input the time series data into the trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted; the normalized remaining lifetime percentage is the proportion of the number of cycles remaining from the current time to the end of the lifetime of the electronic power component to be predicted to the total number of cycles. The adaptive dual-attention Transformer model includes an input embedding and position encoding layer, an encoder layer, an attention pooling layer, and an output layer. Time-series data is input into the trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted, including: The time series data is mapped to a preset feature dimension within the model by an input embedding and location encoding layer, and location information is added to obtain the first feature matrix. The adaptive hybrid attention module in the encoder is used to compute global attention features and sliding window attention features in parallel based on the first feature matrix. The gating network generates attention weights for each attention feature based on the first feature matrix. The global attention features, sliding window attention features and corresponding attention weights are weighted and fused, and then processed sequentially through the residual connection and layer normalization module and the feedforward neural network module in the encoder to obtain the encoder output features. The encoder output features are aggregated into a global feature vector along the time dimension using an attention pooling layer, and the global feature vector is mapped to a normalized remaining lifetime percentage through a linear transformation module and a sigmoid activation function in the output layer. The adaptive hybrid attention module includes a multilayer perceptron and a sliding window attention unit. The sliding window attention unit includes multiple sliding window attention heads. The method for calculating the sliding window attention features includes: The time step is determined from the first feature matrix. Previously, with time steps The first input data at a position at a distance from the radius of the reference time window, and the time step. Afterwards, with time steps The second input data located at a position relative to the radius of the reference time window; The first and second input data are input into the multilayer perceptron to obtain the window adjustment factor; Calculate the time step based on the window adjustment factor, the maximum window adjustment range, and the baseline time window radius. The corresponding adaptive window radius; the preset distance is determined based on the baseline time window radius; Construct the mask matrix corresponding to the time series data Among them, for two time steps in time series data ,like Then let ,otherwise ;in For time step The corresponding adaptive window radius, Represents the time steps in the mask matrix The corresponding mask value; For each sliding window attention head, the first feature matrix is ​​linearly transformed into a first query matrix, a first key matrix, and a first value matrix through a learnable first weight matrix, and the first dot product matrix is ​​calculated based on the first query matrix and the first key matrix; the mask matrix is ​​then... Add the first dot product matrix, normalize it using the Softmax function, and then multiply it with the first value matrix to obtain the sliding window attention sub-features; The sliding window attention features are obtained by concatenating and linearly transforming the sliding window attention sub-features output by each sliding window attention head.

2. The method according to claim 1, characterized in that, The gated network includes a global average pooling unit, a first fully connected network, and a second fully connected network. Attention weights for each attention feature are generated using a gating network based on the first feature matrix, including: The first feature matrix is ​​compressed into a second global feature vector along the time dimension using a global average pooling unit. The second global feature vector is mapped to 1 / 4 of the feature dimension inside the model through the first fully connected network and then non-linearly transformed by the ReLU function to obtain the first feature vector. The first feature vector is mapped to a two-dimensional space using a second fully connected network and converted into attention weights corresponding to global attention features and sliding window attention features using a Softmax function; the sum of the attention weights corresponding to global attention features and sliding window attention features is 1.

3. The method according to claim 1, characterized in that, The encoder layer may include one or more; when there are multiple encoder layers, the encoder layers are connected in sequence, and the encoder output feature is the feature output by the last encoder layer.

4. The method according to any one of claims 1 to 3, characterized in that, The training method for the adaptive dual-attention Transformer model includes: Obtain the training dataset; the training dataset includes time-series sample data of electronic power components throughout their entire lifespan and corresponding normalized remaining lifetime percentage labels; Input the time series sample data into the adaptive dual attention Transformer model to obtain the predicted normalized percentage of remaining lifetime; The network parameters of the adaptive dual-attention Transformer model are backpropagated and trained according to the predicted normalized remaining lifetime percentage, the corresponding normalized remaining lifetime percentage label, and the loss function until the convergence condition is met, thus obtaining the trained adaptive dual-attention Transformer model.

5. A power component lifetime prediction system based on an adaptive dual-attention Transformer, characterized in that, include: The data acquisition module is used to acquire time series data of the electronic power component to be predicted at multiple recent consecutive historical moments; Time series data includes multi-source state monitoring parameters of the electronic power component to be predicted at different times; The remaining lifetime prediction module is used to input time series data into the trained adaptive dual-attention Transformer model to obtain the normalized remaining lifetime percentage of the electronic power component to be predicted; the normalized remaining lifetime percentage is the proportion of the number of cycles remaining from the current time to the end of the lifetime of the electronic power component to be predicted to the total number of cycles. The adaptive dual-attention Transformer model includes an input embedding and position encoding layer, an encoder layer, an attention pooling layer, and an output layer. The remaining lifetime prediction module is further used to map time series data to a preset internal feature dimension of the model and add position information through input embedding and location encoding layers to obtain a first feature matrix; the adaptive hybrid attention module in the encoder calculates global attention features and sliding window attention features in parallel based on the first feature matrix, and generates attention weights corresponding to each attention feature through a gating network based on the first feature matrix; the global attention features, sliding window attention features and corresponding attention weights are weighted and fused, and then processed sequentially through the residual connection and layer normalization module and the feedforward neural network module in the encoder to obtain the encoder output features; the attention pooling layer aggregates the encoder output features along the time dimension into a global feature vector, and the linear transformation module and the sigmoid activation function in the output layer map the global feature vector to a normalized remaining lifetime percentage; The adaptive hybrid attention module includes a multilayer perceptron and a sliding window attention unit. The sliding window attention unit includes multiple sliding window attention heads. The method for calculating the sliding window attention features includes: The time step is determined from the first feature matrix. Previously, with time steps The first input data at a position at a distance from the radius of the reference time window, and the time step. Afterwards, with time steps The second input data located at a position relative to the radius of the reference time window; The first and second input data are input into the multilayer perceptron to obtain the window adjustment factor; Calculate the time step based on the window adjustment factor, the maximum window adjustment range, and the baseline time window radius. The corresponding adaptive window radius; the preset distance is determined based on the baseline time window radius; Construct the mask matrix corresponding to the time series data Among them, for two time steps in time series data ,like Then let ,otherwise ;in For time step The corresponding adaptive window radius, Represents the time steps in the mask matrix The corresponding mask value; For each sliding window attention head, the first feature matrix is ​​linearly transformed into a first query matrix, a first key matrix, and a first value matrix through a learnable first weight matrix, and the first dot product matrix is ​​calculated based on the first query matrix and the first key matrix; the mask matrix is ​​then... Add the first dot product matrix, normalize it using the Softmax function, and then multiply it with the first value matrix to obtain the sliding window attention sub-features; The sliding window attention features are obtained by concatenating and linearly transforming the sliding window attention sub-features output by each sliding window attention head.

Citation Information

Patent Citations

  • Data-driven electric vehicle battery remaining life prediction method

    CN117805658A

  • Sodium battery residual life prediction method for underwater robot application scene

    CN120822203A