An impact load inversion method based on a joint attention mechanism coding-decoding model
Patent Information
- Application Number
- CN202310781400.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2043-06-29
AI Technical Summary
传统的荷载反演方法存在测量噪声敏感性强、模型误差影响大、绝大多数仅限于线弹性结构等不足
[0043] The present invention has the following advantages: The present invention uses a joint attention mechanism to assign weights to the channels and time steps of the input sequence, thereby more effectively extracting the sparse features of the impact load in the time domain and realizing accurate inversion of the impact load; The method proposed in this invention does not require the acquisition of any structural parameters, and the method is applicable to both linear and nonlinear structures. In addition, the method has a certain robustness to measurement noise and low sensitivity to sensor placement.
Smart Images

Figure CN116776698B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of structural impact load inversion, and particularly relates to an impact load inversion method based on a joint attention mechanism encoding and decoding model. Background Technology
[0002] The safety, reliability, and durability of engineering structures are closely related to the load information acting on them. Impact loads, as one of the most common and prevalent loads in engineering structures, are sudden and instantaneous loads, such as impacts, earthquakes, and explosions. The effects of impact loads have a significant impact on the safety, reliability, and durability of structures. Therefore, accurately obtaining impact load information is crucial for scientifically analyzing the vibration state of structures, rationally assessing the safe operating status of structures, and conducting structural optimization design. Due to the extremely complex actual environment and the instantaneous and complex characteristics of impact loads, direct measurement of impact loads using force sensors is often difficult. Compared to direct measurement methods, inverting the load information acting on the structure through the dynamic response of the structure acquired by sensors has become an important research direction in the field of structural engineering.
[0003] Traditional impact load inversion methods can be divided into frequency domain methods and time domain methods. Frequency domain load inversion methods invert dynamic loads based on the system's input-output mapping relationship in the frequency domain, utilizing the structure's dynamic response. Time domain load inversion methods invert dynamic loads based on the system's input-output convolution relationship in the time domain, utilizing the structure's dynamic response. Traditional load inversion methods suffer from drawbacks such as high sensitivity to measurement noise, significant influence from model errors, and being largely limited to linear elastic structures.
[0004] With the rapid development of artificial intelligence, deep learning provides new ideas and directions for load inversion research. Compared with machine learning, deep learning models often have more network layers and are better able to learn the inherent patterns of data from complex samples. Therefore, deep learning has attracted the attention and research of scholars in many fields, such as image classification and speech recognition. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes an impact load inversion method based on a joint attention mechanism encoder-decoder model. Considering the inherent sparse characteristics of impact loads in the time domain, a one-dimensional convolutional neural network and a long short-term memory network are adopted in the encoder-decoder framework. A joint attention mechanism is embedded in the structure to increase the weight of important information in the sequence data and reduce the weight of useless information, thereby quickly extracting the features of the input sequence data and realizing the time history inversion of impact loads.
[0006] To achieve the above objectives, this invention provides an impact load inversion method based on a joint attention mechanism encoding / decoding model, comprising the following steps:
[0007] Acquire initial data, which includes acceleration response data and impact load data;
[0008] The initial data is normalized to obtain the normalized data;
[0009] The normalized data is divided into a training set, a validation set, and a test set;
[0010] Set training parameters, and based on the training parameters, input the training set and the validation set into a preset joint attention mechanism encoding and decoding model to obtain the optimal hyperparameter model;
[0011] Input the test set into the optimal hyperparameter model to obtain the predicted impact load;
[0012] The predicted impact load is processed and evaluated using an error index to complete the impact load inversion based on the joint attention mechanism encoding and decoding model.
[0013] Optionally, obtaining the initial data includes: obtaining the initial data based on the finite element model of the actual structure or on-site measurement, wherein the actual structure is a three-layer frame structure.
[0014] Optionally, obtaining the initial data further includes: the acceleration response data and the impact load data are constructed as a three-dimensional tensor of [batch size, number of time steps, number of channels].
[0015] Optionally, normalizing the initial data to obtain the normalized data further includes:
[0016] The normalized data includes normalized acceleration response data and normalized impact load data;
[0017] The distribution range of the normalized acceleration response data is [-1, 1];
[0018] The distribution range of the normalized impact load data is [0, 1].
[0019] Optionally, the preset joint attention mechanism encoding / decoding model includes an encoder and a decoder;
[0020] The encoder includes an input layer, a one-dimensional convolutional layer, a joint attention mechanism layer, a long short-term memory neural network layer, and a bidirectional long short-term memory network layer.
[0021] The decoder comprises a one-dimensional transposed convolutional layer, a joint attention mechanism layer, a long short-term memory network layer, a fully connected layer, and an output layer;
[0022] The joint attention matrix layer includes channel attention mechanism and position attention mechanism.
[0023] Optionally, the encoder includes:
[0024] The input layer is an acceleration response sequence. Based on the first one-dimensional convolutional layer, feature extraction is performed on the acceleration response sequence to obtain a first feature extraction result.
[0025] The first feature extraction result is input into the first joint attention mechanism layer, and weights are assigned based on the channel attention mechanism and the position attention mechanism to obtain the first weight assignment result;
[0026] The first weight allocation result is input into the first long short-term memory network layer, and the effective features of the sequence are learned using several units to obtain the sequence processed by the long short-term memory network layer.
[0027] Based on the second one-dimensional convolutional layer, feature extraction is performed on the sequence processed by the long short-term memory network layer to obtain the second feature extraction result;
[0028] The second joint attention mechanism layer is used to assign weights to the second feature extraction result, and the bidirectional long short-term memory network layer is used to extract sequence features to obtain the extracted feature sequence.
[0029] Optionally, the decoder includes:
[0030] The extracted feature sequence is initially restored based on the first one-dimensional transposed convolutional layer to obtain the initially restored sequence.
[0031] The pre-restored sequence is input into the joint attention mechanism layer for weight allocation to obtain the second weight allocation result;
[0032] The second weight allocation result is input into the second long short-term memory network layer, and the second one-dimensional transposed convolutional layer is used to restore the features and obtain the restored feature sequence.
[0033] The feature reconstruction sequence is input into the joint attention mechanism layer, and the sequence is output using the fully connected layer and the output layer to obtain the predicted impact load sequence.
[0034] Optionally, the training parameters include the number of training epochs, the optimizer, and the loss function.
[0035] Optionally, based on the training parameters, inputting the training set and the validation set into the preset joint attention encoding / decoding model to obtain the optimal hyperparameter model includes:
[0036] Set an initial learning rate, optimize the loss function based on error backpropagation, and obtain the optimized loss function;
[0037] Using the optimizer, the optimal weight matrix and bias terms are obtained;
[0038] Based on the optimized loss function, the optimal weight matrix, and the bias term, the training set and the validation set are input into the preset joint attention mechanism encoding / decoding model for training to obtain the optimal hyperparameter model.
[0039] Optionally, the predicted impact load is processed and evaluated using an error index to complete the impact load inversion based on the joint attention mechanism encoding / decoding model, including:
[0040] The predicted impact load is inversely normalized to obtain the inverted impact load.
[0041] The acceleration response data of the training set is input into the optimal hyperparameter model to obtain the inversion result;
[0042] Set an actual impact load, and based on the inverted impact load and the actual impact load, quantitatively evaluate and analyze the inversion results based on error parameters to complete the impact load inversion based on the joint attention mechanism encoding and decoding model.
[0043] The present invention has the following advantages: The present invention uses a joint attention mechanism to assign weights to the channels and time steps of the input sequence, thereby more effectively extracting the sparse features of the impact load in the time domain and realizing accurate inversion of the impact load; The method proposed in this invention does not require the acquisition of any structural parameters, and the method is applicable to both linear and nonlinear structures. In addition, the method has a certain robustness to measurement noise and low sensitivity to sensor placement. Attached Figure Description
[0044] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0045] Figure 1 This is a flowchart illustrating an impact load inversion method based on a joint attention mechanism encoding / decoding model according to an embodiment of the present invention.
[0046] Figure 2 This is a schematic diagram of the joint attention mechanism encoding / decoding model proposed in an embodiment of the present invention;
[0047] Figure 3 This is a schematic diagram of the joint attention mechanism proposed in an embodiment of the present invention;
[0048] Figure 4 This is a schematic diagram of the positional attention mechanism proposed in an embodiment of the present invention;
[0049] Figure 5 This is a schematic diagram of the channel attention mechanism proposed in an embodiment of the present invention;
[0050] Figure 6 This is a schematic diagram of the three-layer linear shear frame proposed in an embodiment of the present invention;
[0051] Figure 7 The figure shows the inversion results of the impact load under 50% noise proposed in the embodiment of the present invention. Detailed Implementation
[0052] It should be noted that, unless otherwise specified, the embodiments and features described in the present invention can be combined with each other. The present application will now be described in detail with reference to the accompanying drawings and embodiments.
[0053] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0054] like Figure 1 As shown, this embodiment provides an impact load inversion method based on a joint attention mechanism encoding / decoding model, which specifically includes the following steps:
[0055] S1. Obtain structural acceleration response data and impact load data by establishing a finite element model of the actual structure or by on-site measurement. The actual structure is the three-layer frame structure in this embodiment, namely a three-layer linear shear frame.
[0056] Acceleration response data and impact load data were constructed as three-dimensional tensors of [batch size, number of time steps, number of channels].
[0057] S2. Normalize the acceleration data obtained in S1. The normalized acceleration data distribution range is [-1, 1]. Normalize the impact load data to between 0 and 1.
[0058] S3. Divide the normalized acceleration response data and impact load data into training set, validation set and test set according to the proportion.
[0059] S4. Construct a joint attention mechanism encoder-decoder model. The model adopts an encoder-decoder structure. The encoder includes an input layer, a one-dimensional convolutional layer, a joint attention mechanism layer, a long short-term memory neural network layer, and a bidirectional long short-term memory network layer. The decoder includes a one-dimensional transposed convolutional layer, a joint attention mechanism layer, a long short-term memory network layer, a fully connected layer, and an output layer.
[0060] like Figure 2 As shown, in the encoder, the input to the joint attention mechanism encoding / decoding model is an acceleration response sequence of [b, l1, n], where b represents the batch size, l1 represents the length of the acceleration response sequence, and n represents the number of sensors used. First, after feature extraction by a one-dimensional convolutional layer Conv_1 with c1 filters, the sequence length becomes l2. The feature extraction is represented by the tensor [b, l2, c1]. Next, the feature extraction result is input to the first joint attention mechanism layer, JAM, which assigns weights to the sequence from both channel and position perspectives. The result after JAM processing is represented as [b, l2, c1]. Then, the above result is fed into a Long Multi-Period Memory (LSTM) network, which uses u1 units to learn the effective features of the sequence, resulting in [b, l2, u1]. After feature extraction by a one-dimensional convolutional layer Conv_2 with c2 filters, the sequence length becomes l3, resulting in [b, l3, c2]. JAM_2 is then used to further assign weights to the sequence. The result is [b, l2, 2]. Finally, a bidirectional long multi-phase memory network (BiLSTM) with u2 units is used to extract sequence features, which are represented as [b, l3, u2]. In the decoder, a one-dimensional transposed convolutional network (ConvT_1) with c3 filters is first used to initially restore the features [b, l3, u2] extracted by encoding and decoding. The length of the initially restored sequence is l4, and the result is represented as [b, l4, c3]. After the sequence is input into JAM, the result is [b, l4, c3]. Then, the sequence is input into a long multi-phase memory network (LSTM_2) with u3 units, and the result is represented as [b, l4, u3]. The sequence is further restored by using a ConvT_2 with c4 filters. At this time, the length of the sequence becomes l5, and the result is represented as [b, l5, c4]. The sequence is weighted by JAM, and the weighting result is represented as [b, l5, c4]. Finally, the sequence is output through a fully connected layer (FC) to obtain the predicted impact load sequence.
[0061] S5. Set training parameters such as the number of training rounds, optimizer, and loss function. Input the training set and validation set of acceleration response data and impact load data into the joint attention mechanism encoding and decoding model for iterative training and validation to obtain the optimal hyperparameter model.
[0062] Here, the number of training rounds refers to the number of times the joint attention mechanism encoder-decoder model iterates over the entire training set, the optimizer is the algorithm used to update the weights and biases in the joint attention mechanism encoder-decoder model, and the loss function is the function used to evaluate the difference between the model's prediction and the true label.
[0063] S6. Input the test set of acceleration response data and impact load data into the joint attention mechanism encoding and decoding model with optimal hyperparameters to obtain the predicted impact load;
[0064] S7. The predicted impact load in S6 is inversely normalized to obtain the inverted impact load. Based on the inverted impact load and the actual impact load, the inversion results are quantitatively evaluated and analyzed using three error indices: peak error, impulse error, and root mean square error.
[0065] The inversion results are obtained mainly by inputting the acceleration response of the test set into the optimal hyperparameter model, and then obtaining the predicted value of the impact load, which is the result of the load inversion.
[0066] like Figure 3 As shown, the joint attention mechanism in this embodiment includes: channel attention mechanism and position attention mechanism.
[0067] The specific working principle of the channel attention mechanism includes:
[0068] like Figure 4 As shown, basic feature extractors (such as CNNs) transform the input into a feature map x∈R. C×L Here, R is a real number, C represents the number of channels, and L represents the length of the time series. CAM first uses channel global average pooling (CGAP) to aggregate the global location information of the input feature map x. The location aggregation information is represented as a. c ∈R 1×L a c The following formula is used for calculation:
[0069]
[0070] After a c Reconstructed as a′ c ∈R L×1 Based on the contribution of each channel, a one-dimensional convolution with a sigmoid activation function is used to assign weights to each channel. Finally, the weight calculation results for each channel are reconstructed to the original data size, F. C (a c )∈R 1×L The weight of each channel is calculated using the following formula:
[0071] F C (ac )=R2(σ(C1D(R1(a c (2)
[0072] In the formula, σ represents the sigmoid activation function, which compresses the importance of channels to [0, 1] and assigns them; C1D represents the one-dimensional convolution operation; R1 and R2 represent operations that change the data size; F C (a c The weights for each channel are calculated as follows: Each channel's weight is multiplied element-wise with the input feature map x, thus effectively allocating channel attention. Furthermore, residual connections are used to mitigate the gradient explosion problem that occurs in deeper networks. Finally, after the channel attention mechanism, each channel of the input feature map x is assigned a corresponding weight, i.e.
[0073] The specific working principle of positional attention mechanisms includes:
[0074] like Figure 5 As shown, firstly, the global information of each channel is aggregated using Location Global Average Pooling (PGAP) and Location Global Max Pooling (PGMP). The aggregated channel information is a. p ∈R 1×L and m p ∈R 1×L a p and m p Equations (3) and (4) can be used for calculation:
[0075]
[0076]
[0077] Then a p and m p The concatenation is performed along the channel dimension, and the concatenated result is fed into a one-dimensional convolution with a sigmoid activation function to generate the weights corresponding to each time point. The above calculation process is expressed as follows:
[0078] F P (a p m p )=σ(C1D([a p ;m p ])) (5)
[0079] In the formula, σ represents the sigmoid activation function; C1D represents a one-dimensional convolution operation. The positional attention allocation method is similar to channelal attention, by calculating the positional weights F... P (a p mp ) and channel recalibration feature map Perform dot product, that is Finally, after the positional attention mechanism is applied, the output feature map can be represented as follows:
[0080] Consider the structure such as Figure 6 The three-layer linear shear frame shown is assumed to have initial displacement and velocity of 0. The structural motion equations are expressed as follows:
[0081]
[0082] In the formula, The mass matrix represents the structure; and Let X(t) represent the damping matrix (viscous damping is used here) and stiffness matrix of the structure, respectively; X(t) = [x1(t) x2(t) x3(t)] T Represents the structural displacement vector; The velocity vector of the structure; The acceleration vector of the structure is represented by F(t) = [f1(t) f2(t) f3(t)]. T This represents the external load vector of the structure.
[0083] Using Gaussian function Simulate impact load, where a∈(0.09,1), γ=(0.009,0.02), μ ∈(0.3, 0.8). A large number of values for a, γ, and μ were randomly generated using the rand function in MATLAB. These three parameter values were then used to form a large number of random impact loads, and the Newmark-β method was used to calculate the acceleration response of the structure.
[0084] In practical engineering, noise is unavoidable when measuring structural response. Therefore, we add noise to the theoretically calculated acceleration response x to simulate the actual measured structural response. The acceleration response x after adding noise is shown below. mea The calculation formula is x mea =x + nl·rms(x)·N noise In the formula, nl represents the noise level, rms(·) represents the root mean square operation, and N noise This indicates the generation of a standard normal distribution noise vector with zero mean and unit standard deviation.
[0085] In this embodiment, a single accelerometer is placed on the bottom layer of the structure. Initially, the impact load is applied only to the bottom layer, with no external load applied to the other layers (i.e., f2(t) = f3(t) = 0). The sampling frequency is 1000Hz, and sampling is performed continuously for 1 second, repeated randomly 200 times to construct the dataset. The same method is used to apply the impact load sequentially to the second and third layers, generating a total of 600 sets of sample data. These 600 sets of sample data are divided into a 4:1:5 ratio: 240 training sets, 60 validation sets, and 300 test sets. Furthermore, to enrich the sample size and consider the impact of measurement noise on inversion accuracy, 21 different levels of noise (0%–20%, increasing by 1%) are added to the training and validation sets, expanding the training and validation sets to 5040 and 1260 sets, respectively. To test the model's generalization ability, 6 different levels of noise (0%–50%, increasing by 10%) are added to the test set, resulting in a final test set of 1800 sets.
[0086] First, the data fed into the network is preprocessed. Acceleration response data is normalized to between -1 and 1, and impact load data is normalized to between 0 and 1. The network model parameters are set in the same way as the network model hyperparameters, as shown in Table 1. An initial learning rate of 1e-4 is set, and the loss function is continuously optimized through error backpropagation. The Adam optimizer is used to find the optimal weight matrix and bias term of the joint attention mechanism encoder-decoder model. Finally, the joint attention mechanism encoder-decoder model obtains its optimal parameters through continuous training. The acceleration response data from the test set is input into the trained model for prediction, realizing the impact load inversion. A set of samples is randomly selected from the test set. The impact load inversion results of this set of samples at a 50% noise level are shown below. Figure 7 As shown in the figure, the method proposed in this invention can accurately invert impact loads with relatively small inversion errors.
[0087] Table 1
[0088]
[0089] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for impact load inversion based on a joint attention mechanism encoding / decoding model, characterized in that, Includes the following steps: Acquire initial data, which includes acceleration response data and impact load data; The initial data is normalized to obtain the normalized data; The normalized data is divided into a training set, a validation set, and a test set; Set training parameters, and based on the training parameters, input the training set and the validation set into a preset joint attention mechanism encoding and decoding model to obtain the optimal hyperparameter model; The preset joint attention mechanism encoding / decoding model includes an encoder and a decoder; The encoder includes an input layer, a one-dimensional convolutional layer, a joint attention mechanism layer, a long short-term memory neural network layer, and a bidirectional long short-term memory network layer. The decoder comprises a one-dimensional transposed convolutional layer, a joint attention mechanism layer, a long short-term memory network layer, a fully connected layer, and an output layer; The joint attention mechanism layer includes channel attention mechanism and position attention mechanism; Input the test set into the optimal hyperparameter model to obtain the predicted impact load; The predicted impact load is processed and evaluated using an error index to complete the impact load inversion based on the joint attention mechanism encoding / decoding model, including: The predicted impact load is inversely normalized to obtain the inverted impact load. The acceleration response data of the training set is input into the optimal hyperparameter model to obtain the inversion result; Set an actual impact load, and based on the inverted impact load and the actual impact load, quantitatively evaluate and analyze the inversion results based on error parameters to complete the impact load inversion based on the joint attention mechanism encoding and decoding model.
2. The impact load inversion method based on a joint attention mechanism encoding / decoding model as described in claim 1, characterized in that, Obtaining the initial data includes: obtaining the initial data based on the establishment of a finite element model of the actual structure or on-site measurement, wherein the actual structure is a three-layer frame structure.
3. The impact load inversion method based on a joint attention mechanism encoding / decoding model as described in claim 2, characterized in that, Acquiring the initial data also includes: the acceleration response data and the impact load data are constructed as a three-dimensional tensor of [batch size, number of time steps, number of channels].
4. The impact load inversion method based on a joint attention mechanism encoding / decoding model as described in claim 1, characterized in that, The process of normalizing the initial data to obtain the normalized data further includes: The normalized data includes normalized acceleration response data and normalized impact load data; The distribution range of the normalized acceleration response data is [-1, 1]; The distribution range of the normalized impact load data is [0, 1].
5. The impact load inversion method based on a joint attention mechanism encoding / decoding model as described in claim 1, characterized in that, The encoder includes: The input layer is an acceleration response sequence. Based on the first one-dimensional convolutional layer, feature extraction is performed on the acceleration response sequence to obtain a first feature extraction result. The first feature extraction result is input into the first joint attention mechanism layer, and weights are assigned based on the channel attention mechanism and the position attention mechanism to obtain the first weight assignment result; The first weight allocation result is input into the first long short-term memory network layer, and the effective features of the sequence are learned using several units to obtain the sequence processed by the long short-term memory network layer. Based on the second one-dimensional convolutional layer, feature extraction is performed on the sequence processed by the long short-term memory network layer to obtain the second feature extraction result; The second joint attention mechanism layer is used to assign weights to the second feature extraction result, and the bidirectional long short-term memory network layer is used to extract sequence features to obtain the extracted feature sequence.
6. The impact load inversion method based on a joint attention mechanism encoding / decoding model as described in claim 5, characterized in that, The decoder includes: The extracted feature sequence is initially restored based on the first one-dimensional transposed convolutional layer to obtain the initially restored sequence. The pre-restored sequence is input into the joint attention mechanism layer for weight allocation to obtain the second weight allocation result; The second weight allocation result is input into the second long short-term memory network layer, and the second one-dimensional transposed convolutional layer is used to restore the features and obtain the restored feature sequence. The feature reconstruction sequence is input into the joint attention mechanism layer, and the sequence is output using the fully connected layer and the output layer to obtain the predicted impact load sequence.
7. The impact load inversion method based on a joint attention mechanism encoding / decoding model as described in claim 1, characterized in that, The training parameters include the number of training epochs, the optimizer, and the loss function.
8. The impact load inversion method based on a joint attention mechanism encoding / decoding model as described in claim 7, characterized in that, Based on the training parameters, inputting the training set and the validation set into the preset joint attention encoding / decoding model to obtain the optimal hyperparameter model includes: Set an initial learning rate, optimize the loss function based on error backpropagation, and obtain the optimized loss function; Using the optimizer, the optimal weight matrix and bias terms are obtained; Based on the optimized loss function, the optimal weight matrix, and the bias term, the training set and the validation set are input into the preset joint attention mechanism encoding / decoding model for training to obtain the optimal hyperparameter model.
Citation Information
Patent Citations
Time series prediction method and system based on attention mechanism recurrent neural network
CN111860785A
Image-text multi-modal fusion method based on coding and decoding network
CN113887585A