Non-linear signal time-frequency spectrum generation method and system based on LSTM

By directly generating the time spectrum of nonlinear signals based on LSTM, the shortcomings of the signal time frequency domain analysis method in the prior art are solved in processing complex nonlinear signals, and more efficient and accurate time spectrum analysis is achieved.

CN119415936APending Publication Date: 2025-02-11GUANGXI BEIBU GULF INVESTMENT GROUP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411476079.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-22
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

The existing signal time-frequency domain analysis methods have problems such as insufficient time resolution and frequency resolution, modal aliasing, endpoint effect, and sensitivity to small signal fluctuations when processing complex nonlinear signals.

Method used

Using the nonlinear signal time spectrum generation method based on LSTM, nonlinear structural response is generated through MATLAB simulation, time-varying functions are constructed, and the structural response time spectrum and mixed pure structural response are generated. The LSTM model is built for training and verification until the model reaches the accuracy threshold. , generate the corresponding structural response time spectrum.

Benefits of technology

The rapid and precise investigation of the time spectrum of complex nonlinear signals is achieved, the cumbersome process of traditional methods is simplified, the problems of modal aliasing, endpoint effects and small signal fluctuations are avoided, and the accuracy and efficiency of time spectrum generation are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119415936A_ABST
    Figure CN119415936A_ABST
Patent Text Reader

Abstract

The invention relates to the field of signal analysis, in particular to a nonlinear signal time-frequency spectrum generation method and system based on LSTM. The method comprises the following steps: generating a nonlinear structure response based on MATLAB simulation, and constructing a time-varying function according to the randomly determined number and frequency of nonlinear structure response single-component signals; based on all single-component signals in the nonlinear structure response, generating a structure response time-frequency spectrum and a mixed pure structure response, and forming learning samples in pairs; carrying out training and verification on the LSTM model; using the test set to test the model precision, comparing the difference between the model prediction time-frequency spectrum and the real time-frequency spectrum, and generating a difference result; according to the difference result, judging whether the LSTM model reaches a precision threshold value or not until a trained LSTM model is obtained; and inputting the new mixed structure response into the trained LSTM model to generate a corresponding structure response time-frequency spectrum. According to the invention, the time-frequency spectrum generation efficiency and precision are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of signal analysis, and in particular to a method and system for generating a time-frequency spectrum of a nonlinear signal based on LSTM. Background Art

[0002] With the continuous advancement of my country's modernization infrastructure construction, the number of large structures such as high-rise buildings and long-span bridges is increasing. The response of large structures is usually non-stationary and nonlinear, especially under strong excitations such as earthquakes and typhoons, the structural response will show obvious non-stationary and nonlinear characteristics. Signal time-frequency domain processing methods can examine subtle changes in signal characteristics from the time domain and frequency domain respectively, so they are particularly suitable for processing non-stationary and nonlinear signals.

[0003] Common signal time-frequency domain processing methods include short-time Fourier transform (STFT), wavelet transform (WT), empirical mode decomposition (EMD) and variational mode decomposition (VMD). The basic idea of ​​STFT is to divide the signal into multiple small time windows and perform Fourier transform on each window to obtain the relationship between the signal frequency and time. However, the window size used by STFT is fixed, and it is impossible to obtain high time resolution and high frequency resolution at the same time.

[0004] Compared with STFT, WT uses a decaying finite-length wavelet basis function to replace the infinite-length triangular function in STFT, so that higher time and frequency resolution can be obtained at the same time. However, there are many styles of wavelet basis functions, and it is necessary to screen appropriate wavelet basis functions for signals with different characteristics.

[0005] EMD is an adaptive signal decomposition method in the time-frequency domain that does not require manual setting of algorithm parameters. However, modal aliasing and endpoint effects often occur when decomposing signals with low signal-to-noise ratio.

[0006] VMD limits the time-frequency decomposition results to narrowband signals with a center frequency, which theoretically avoids modal aliasing. However, VMD requires custom modal decomposition number k and penalty factor a. Different parameter settings will lead to significant deviations in the decomposition effect. In addition, the multiple modal components decomposed by the time-frequency decomposition method cannot directly examine their time-frequency characteristics. It is also necessary to use Hilbert Spectrum Analysis (HSA) to generate the signal time-frequency spectrum. However, HAS is extremely sensitive to small discontinuities in the signal, and the time-frequency spectrum often has serious divergence and ambiguity problems.

[0007] In recent years, the Deep Neural Network (DNN) algorithm has been continuously developed and improved, and has shown a strong learning ability when dealing with complex and nonlinear problems. Among them, Long-short Term Memory (LSTM) can comprehensively consider the intrinsic connection between the previous and next data, and is particularly suitable for processing nonlinear time series data. Based on this, the present invention proposes a time-frequency spectrum generation method based on LSTM, which is used to overcome the problems of the above-mentioned existing signal time-frequency domain analysis methods, directly generate time-frequency spectrum from structural response, and realize fast and accurate investigation of complex nonlinear signal time-frequency spectrum. Summary of the invention

[0008] In view of this, the purpose of an embodiment of the present invention is to provide a method and system for generating time-frequency spectra of nonlinear signals based on LSTM, so as to solve the problems existing in the existing signal time-frequency domain analysis methods, directly generate time-frequency spectra from structural responses, and realize fast and accurate examination of time-frequency spectra of complex nonlinear signals.

[0009] On the one hand, an embodiment of the present invention provides a method for generating a time-frequency spectrum of a nonlinear signal based on LSTM, the method comprising the following steps:

[0010] S1, based on MATLAB simulation, the nonlinear structural response is generated, and the time-varying function is constructed according to the number and frequency of the randomly determined single-component signals of the nonlinear structural response;

[0011] S2, generating a structural response time-frequency spectrum and a mixed pure structural response based on all single-component signals in the nonlinear structural response, and combining the mixed pure structural response and the structural response time-frequency spectrum into pairs to form learning samples;

[0012] S3, building an LSTM model and dividing the learning samples into a training set, a validation set, and a test set, and training and validating the LSTM model using the training set and the validation set respectively;

[0013] S4, if the LSTM model training is completed, the model accuracy is tested using the test set to compare the difference between the model predicted time spectrum and the actual time spectrum and generate a difference result;

[0014] S5, judging whether the LSTM model reaches the accuracy threshold according to the difference result; if the LSTM model does not reach the accuracy threshold, repeating S1 to S4, generating multiple samples and optimizing the model hyperparameter settings for retraining until the LSTM model reaches the accuracy threshold, thereby obtaining a trained LSTM model;

[0015] S6, input the new mixed structural response into the trained LSTM model to generate the corresponding structural response time-frequency spectrum.

[0016] Optionally, constructing a time-varying function according to the number and frequency of the randomly determined nonlinear structural response single-component signal comprises:

[0017] Generate N nonlinear structural responses based on MATLAB simulation, wherein each nonlinear structural response includes at least one nonlinear structural response single component signal;

[0018] After randomly determining the number of nonlinear structural response single component signals included in each nonlinear structural response within a first numerical threshold range, randomly determining the frequency of the nonlinear structural response single component signals within a second numerical threshold range;

[0019] The time-varying function is constructed so as to randomly simulate the frequency fluctuation and / or amplitude fluctuation of the nonlinear structure in response to the single-component signal.

[0020] Optionally, generating a structural response time-frequency spectrum and a mixed pure structural response based on all single component signals in the nonlinear structural response, and pairing the mixed pure structural response and the structural response time-frequency spectrum to form a learning sample comprises:

[0021] Acquire all nonlinear structural response single component signals contained in each of the nonlinear structural responses, and perform Hilbert transform to calculate the instantaneous frequency and instantaneous amplitude;

[0022] The time-frequency spectrum of the structural response is plotted based on the instantaneous frequency and the instantaneous amplitude, and the single-component signals of each nonlinear structural response are superimposed to obtain a mixed pure structural response. The mixed pure structural response is used as input and the time-frequency spectrum of the structural response is used as output to form a learning sample in pairs.

[0023] Optionally, building an LSTM model and dividing the learning samples into a training set, a validation set, and a test set includes:

[0024] An LSTM model was built based on the TensorFlow platform, and the learning samples were divided into a training set, a validation set, and a test set in a ratio of 8:1:1;

[0025] The LSTM model is trained and verified respectively by the training set and the verification set. Each time a sample is input during the model training process, white noise is randomly added to the sample data. Changes in model performance during the training process are tracked by at least one evaluation indicator.

[0026] Optionally, the using the test set to test the model accuracy to compare the difference between the model predicted time-frequency spectrum and the actual time-frequency spectrum and generate a difference result includes:

[0027] By adding random white noise to the test set input process and then feeding it into the LSTM model, the LSTM model directly predicts the corresponding time-frequency spectrum, and compares the difference between the time-frequency spectrum predicted by the LSTM model and the actual time-frequency spectrum to generate a difference result;

[0028] Among them, the evaluation model directly predicts the accuracy of the time-frequency spectrum from the noisy structural response.

[0029] Optionally, judging whether the LSTM model reaches an accuracy threshold according to the difference result includes:

[0030] Calculate the difference between two time-frequency spectra according to MAE;

[0031] If MAE≤0.1, the accuracy requirement is met;

[0032] If MAE>0.1, repeat S1 to S4, generate multiple samples and optimize the model hyperparameter settings for training again until the LST M model reaches the accuracy threshold.

[0033] Optionally, constructing a time-varying function to randomly simulate the frequency fluctuation and / or amplitude fluctuation of the nonlinear structure responding to a single-component signal comprises:

[0034] Randomly generate multiple sine waves of different frequencies, and construct a high-frequency envelope and a simple low-frequency envelope by controlling the amplitude ratio of the low-frequency and high-frequency components. These sine waves are superimposed to generate the final envelope. The formula is as follows:

[0035]

[0036] Where E is the envelope value, f i represents the frequency component of the envelope, t represents time; φ i Indicates the initial phase of the envelope.

[0037] On the other hand, an embodiment of the present invention provides a nonlinear signal time-frequency spectrum generation system based on LSTM, comprising:

[0038] at least one processor;

[0039] at least one memory for storing at least one program;

[0040] When the at least one program is executed by the at least one processor, the at least one processor implements any of the above-mentioned methods for generating time-frequency spectrum of nonlinear signals based on LSTM.

[0041] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, which stores a program executable by a processor, characterized in that the program executable by the processor is used to execute any of the above-mentioned LSTM-based nonlinear signal time-frequency spectrum generation methods when executed by the processor.

[0042] The embodiment of the present invention generates a nonlinear structural response based on MATLAB simulation, constructs a time-varying function according to the number and frequency of randomly determined single-component signals of the nonlinear structural response; generates a structural response time-frequency spectrum and a mixed pure structural response based on all single-component signals in the nonlinear structural response, and pairs the mixed pure structural response and the structural response time-frequency spectrum to form a learning sample; builds an LSTM model and divides the learning sample into a training set, a verification set and a test set, and trains and verifies the LSTM model through the training set and the verification set respectively; if the LSTM model training is completed, the test set is used to test the model accuracy to compare the difference between the model predicted time-frequency spectrum and the real time-frequency spectrum and generate a difference result; judges whether the LSTM model reaches the accuracy threshold according to the difference result, and if the LSTM model does not reach the accuracy threshold, repeats S1 to S4, generates multiple samples and optimizes the model hyperparameter settings for retraining until the LSTM model reaches the accuracy threshold. The present invention simplifies the tedious process of the traditional method of first decomposing the signal in time and frequency and then drawing the time-frequency spectrum. It also avoids the problems of modal aliasing and endpoint effect in the time-frequency decomposition process, overcomes the problem that Hilbert analysis is sensitive to small fluctuations of the signal, optimizes the analysis process, and improves the accuracy and efficiency of time-frequency spectrum generation. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0044] Figure 1 is a schematic diagram of a generation method provided by an embodiment of the present invention;

[0045] Figure 2 is a principle block diagram of a generation method provided by an embodiment of the present invention;

[0046] Figure 3 is a network mapping diagram of a generation method provided by an embodiment of the present invention;

[0047] Figure 4 is a schematic diagram of a frequency change curve provided by an embodiment of the present invention;

[0048] Figure 4Ais another frequency variation curve schematic diagram provided by an embodiment of the present invention;

[0049] Figure 4B is another frequency variation curve schematic diagram provided by an embodiment of the present invention;

[0050] Figure 4C is another frequency variation curve schematic diagram provided by an embodiment of the present invention;

[0051] Figure 5 is a schematic diagram of an envelope provided by an embodiment of the present invention;

[0052] Figure 5A is another envelope schematic diagram provided by an embodiment of the present invention;

[0053] Figure 5B is another envelope schematic diagram provided by an embodiment of the present invention;

[0054] Figure 5C is another envelope schematic diagram provided by an embodiment of the present invention;

[0055] Figure 5D is another envelope schematic diagram provided by an embodiment of the present invention;

[0056] Figure 5E is another envelope schematic diagram provided by an embodiment of the present invention;

[0057] Fig. 5F is another envelope schematic diagram provided by an embodiment of the present invention;

[0058] Figure 6 A Hilbert spectrum for training provided by an embodiment of the present invention

[0059] Figure 7 is an input mixed noise signal diagram provided by an embodiment of the present invention;

[0060] Figure 8 is a directly generated Hilbert spectrum provided by an embodiment of the present invention;

[0061] Fig. 9 It is a structural block diagram of a system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0065] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.

[0066] The block diagrams shown in the accompanying drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or in one or more hardware charging modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0067] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.

[0068] See also Figures 1 to 8 As shown, an embodiment of the present invention provides a method for generating a time-frequency spectrum of a nonlinear signal based on LSTM, and the method comprises the following steps:

[0069] S1, based on MATLAB simulation, the nonlinear structural response is generated, and the time-varying function is constructed according to the number and frequency of the randomly determined single-component signals of the nonlinear structural response;

[0070] In this step, N nonlinear structural responses are generated based on MATLAB simulation, wherein each nonlinear structural response includes at least one nonlinear structural response single component signal;

[0071] Specifically, MATLAB is used to simulate and generate multiple nonlinear structural responses, each of which contains multiple nonlinear structural response single component signals. The nonlinear structural response contains multiple order modal components. In order to consider this characteristic and ensure the diversity of generated data, each generated nonlinear structural response should contain multiple nonlinear structural response single components. The number of nonlinear structural response single components k is set to be randomly determined in the range of 1 to 10, and the data point length of a single component is set to 4096.

[0072] After randomly determining the number of nonlinear structural response single component signals included in each nonlinear structural response within a first numerical threshold range, randomly determining the frequency of the nonlinear structural response single component signals within a second numerical threshold range;

[0073] Specifically, the number of nonlinear structural response single components contained in each nonlinear structural response is randomly determined within the range of a first numerical threshold (ie, 1 to 10), and the frequency of the nonlinear structural response single component is randomly determined within the range of a second numerical threshold (ie, 0 to 20 Hz).

[0074] It can be understood that the frequency of the single component of the nonlinear structural response is not fixed, but fluctuates within a certain range. First, determine the frequency fluctuation interval of the single component of the nonlinear structural response, divide 0~20Hz into 20 intervals, and randomly select an interval with the number of components k in S1 from the 20 intervals. In order to avoid the nonlinear structural response single components being too dense, two closely adjacent intervals should be avoided during selection, that is, the minimum interval between the frequency fluctuation intervals of the nonlinear structural response single components is 1Hz. Then, determine the frequency fluctuation form of the single component of the nonlinear structural response, and randomly select three frequency values ​​f0, f1, and f2 in the frequency interval where the nonlinear structural response single component is located. m , f n As the starting time t0, any time in the middle t m and the end time t n The frequency fluctuation is fitted using a cubic spline curve, as shown in the following formula:

[0075] f i =at 3 +bt 2 +ct+d

[0076] In the formula, f i For the nonlinear structural response to single-component frequency fluctuations, the coefficients a, b, c, and d can be obtained by combining the coordinates of the three points and the zero boundary frequency derivative condition.

[0077] After fitting, the frequency variation in the entire time range is obtained. Examples of different frequency fluctuations are as follows: Figure 4-4C shown.

[0078] The time-varying function is constructed so as to randomly simulate the frequency fluctuation and / or amplitude fluctuation of the nonlinear structure in response to the single-component signal.

[0079] Randomly generate multiple sine waves of different frequencies, and construct a high-frequency envelope and a simple low-frequency envelope by controlling the amplitude ratio of the low-frequency and high-frequency components. These sine waves are superimposed to generate the final envelope. The formula is as follows:

[0080]

[0081] Where E is the envelope value, f i represents the frequency component of the envelope, t represents time; φ i Indicates the initial phase of the envelope.

[0082] Specifically, examples such as Figure 5-5F As shown in the figure, the amplitude of the real structural response changes randomly with time, and an envelope that changes with time is used to simulate this characteristic. The envelope is formed by the superposition of multiple randomly generated sine waves. The higher the frequency of the signal component, the more sine waves it corresponds to, and the more complex the envelope is. Since the low-order components of the structure correspond to low frequencies and concentrated energy, the envelope value of the low-order components is set large; conversely, the envelope value of the high-order components is small.

[0083] S2, generating a structural response time-frequency spectrum and a mixed pure structural response based on all single-component signals in the nonlinear structural response, and combining the mixed pure structural response and the structural response time-frequency spectrum into pairs to form learning samples;

[0084] In this step, all nonlinear structural response single component signals contained in each of the nonlinear structural responses are obtained, and Hilbert transform is performed to calculate the instantaneous frequency and instantaneous amplitude;

[0085] The time-frequency spectrum of the structural response is plotted based on the instantaneous frequency and the instantaneous amplitude, and the single-component signals of each nonlinear structural response are superimposed to obtain a mixed pure structural response. The mixed pure structural response is used as input and the time-frequency spectrum of the structural response is used as output to form a learning sample in pairs.

[0086] Specifically, all nonlinear structural response single components contained in a structural response are Hilbert transformed to calculate the instantaneous frequency and instantaneous amplitude, and the structural response time-frequency spectrum is plotted from the instantaneous frequency and instantaneous amplitude. The nonlinear structural response single components are superimposed to obtain a mixed pure structural response. The mixed pure structural response is used as input and the structural response time-frequency spectrum is used as output to form a learning sample in pairs.

[0087] It can be understood that the k nonlinear structural response single components contained in a structural response are processed in sequence using Hilbert transform to obtain the corresponding k groups of instantaneous frequencies and instantaneous amplitudes. The k groups of instantaneous frequencies and instantaneous amplitudes are plotted in a graph to obtain the time-frequency spectrum corresponding to a structural response. For example, Figure 6 shown.

[0088] S3, building an LSTM model and dividing the learning samples into a training set, a validation set, and a test set, and training and validating the LSTM model using the training set and the validation set respectively;

[0089] An LSTM model was built based on the TensorFlow platform, and the learning samples were divided into a training set, a validation set, and a test set in a ratio of 8:1:1;

[0090] The LSTM model is trained and verified respectively by the training set and the verification set. Each time a sample is input during the model training process, white noise is randomly added to the sample data. Changes in model performance during the training process are tracked by at least one evaluation indicator.

[0091] Specifically, repeat the above steps S1-S2 to generate multiple groups of structural response single components and corresponding time-frequency spectra, and superimpose k single components in a group to generate a mixed structural response. For example, Figure 7 As shown in the figure, the mixed structural response is used as input and the time-frequency spectrum is used as output. They are assembled into learning samples in pairs, and 2000 samples are generated in each batch. All samples are divided into training set, validation set and test set in a ratio of 8:1:1.

[0092] It is understandable that the LSTM model is built using the TensorFlow platform. The model contains 1 input layer, 1 output layer, 1 fully connected layer, a certain number of LSTM layers and a certain number of fully connected layers. The model is trained using the training set and the validation set. In each training cycle, white noise is randomly added to the sample input to improve the model's ability to resist noise interference. The changes in model performance during the training process are tracked through multiple indicators. The hyperparameters such as the number of hidden layers, the number of hidden layer units, and the random dropout rate of the model are fine-tuned to enable the model to converge quickly and stably.

[0093] Exemplarily, multiple evaluation indicators are used to evaluate the stability and convergence speed of the network, and the network learning effect is optimized through strategies such as noise interference and hyperparameter tuning. The evaluation indicator tracking, noise interference, and hyperparameter tuning steps are as follows:

[0094] (1) Evaluation indicator tracking: It is crucial to track the learning performance of the model during training and make timely adjustments. Therefore, two evaluation functions are used: the loss function is the mean squared error (MSE) and the evaluation function is the mean absolute error (MAE).

[0095] The loss function calculation formula is:

[0096]

[0097] The evaluation function calculation formula is:

[0098]

[0099] Where n is the number of samples, y i is the target value of the ith sample, is the corresponding model prediction value.

[0100] During a single-cycle training process, white noise with a signal-to-noise ratio of 5dB to 10dB is randomly added to the input of the training set and validation set samples, forcing the model to obtain accurate time-frequency spectrum under noise interference, enhancing the model's ability to resist noise interference, and improving the model's generalization ability for unknown samples.

[0101] The model's hyperparameters include the number of LSTM layers and units, the number of fully connected layers and units, the batch size, and the learning rate. The network's hyperparameters are manually tuned based on the learning performance during network training. The number of LSTM layers is optimized between 2 and 4, and the number of units in each layer is optimized between 8 and 32; the number of fully connected layers is optimized between 1 and 3, and the number of units in each layer is optimized between 32 and 128; the batch size is optimized between 16 and 64; and the training learning rate is optimized between 0.001 and 0.01.

[0102] S4, if the LSTM model training is completed, the model accuracy is tested using the test set to compare the difference between the model predicted time spectrum and the actual time spectrum and generate a difference result;

[0103] By adding random white noise to the test set input process and then feeding it into the LSTM model, the LSTM model directly predicts the corresponding time-frequency spectrum, and compares the difference between the time-frequency spectrum predicted by the LSTM model and the actual time-frequency spectrum to generate a difference result;

[0104] Among them, the evaluation model directly predicts the accuracy of the time-frequency spectrum from the noisy structural response.

[0105] Specifically, after the LSTM model is trained, the model accuracy is tested using the test set. Random white noise is added to the input of the test set and then substituted into the model. The predicted time-frequency spectrum can be directly obtained by inputting the test set samples into the model. The model-predicted time-frequency spectrum is compared with the actual time-frequency spectrum to evaluate the accuracy of the model in directly predicting the time-frequency spectrum from the noisy structural response.

[0106] S5, judging whether the LSTM model reaches the accuracy threshold according to the difference result; if the LSTM model does not reach the accuracy threshold, repeating S1 to S4, generating multiple samples and optimizing the model hyperparameter settings for training again, until the LSTM model reaches the accuracy threshold, thereby obtaining a trained LSTM model.

[0107] Calculate the difference between two time-frequency spectra according to MAE;

[0108] If MAE≤0.1, the accuracy requirement is met;

[0109] If MAE>0.1, repeat S1 to S4, generate multiple samples and optimize the model hyperparameter settings for training again until the LST M model reaches the accuracy threshold.

[0110] Specifically, MAE is used to calculate the difference between two time-frequency spectra. If MAE ≤ 0.1, the accuracy requirement is met. If MAE > 0.1, S1 to S4 are repeated to generate more samples and further adjust the LSTM model hyperparameters, and train again until the LSTM model meets the accuracy requirement.

[0111] S6, input the new mixed structural response into the trained LSTM model to generate the corresponding structural response time-frequency spectrum.

[0112] After obtaining a model that meets the accuracy requirements, the new hybrid structure response is input into the model, and the model can directly plot the time-frequency spectrum, such as Figure 8 shown.

[0113] Exemplarily, the structural vibration signal components are generated by MATLAB simulation, and the frequency and envelope of the components are functions that vary with time. Then, each component is superimposed to synthesize a mixed signal and Gaussian white noise is added as input. The signal components are converted into instantaneous frequency and instantaneous amplitude using Hilbert transform, and the instantaneous frequency and instantaneous amplitude are plotted into Hilbert spectrograms as output, and the input and output are assembled into learning samples in pairs. Then, an LSTM model is established on the TensorFlow platform, the model is trained and verified, and the training effect is optimized by strategies such as noise interference and hyperparameter tuning. Finally, the signal in the test set is input into the trained LSTM to test the accuracy of the model-generated time-frequency spectrum. The present invention directly draws the time-frequency spectrum from the mixed signal, simplifies the cumbersome process of the traditional method that must first decompose the signal time-frequency and then draw the time-frequency spectrum, and avoids the problems of modal aliasing and endpoint effect in the time-frequency decomposition process, while overcoming the problem that the Hilbert analysis is sensitive to small fluctuations in the signal, and has a simpler analysis process and accuracy.

[0114] The embodiment of the present invention generates a nonlinear structural response based on MATLAB simulation, constructs a time-varying function according to the number and frequency of randomly determined single-component signals of the nonlinear structural response; generates a structural response time-frequency spectrum and a mixed pure structural response based on all single-component signals in the nonlinear structural response, and pairs the mixed pure structural response and the structural response time-frequency spectrum to form a learning sample; builds an LSTM model and divides the learning sample into a training set, a verification set and a test set, and trains and verifies the LSTM model through the training set and the verification set respectively; if the LSTM model training is completed, the test set is used to test the model accuracy to compare the difference between the model predicted time-frequency spectrum and the real time-frequency spectrum and generate a difference result; judges whether the LSTM model reaches the accuracy threshold according to the difference result, and if the LSTM model does not reach the accuracy threshold, repeats S1 to S4, generates multiple samples and optimizes the model hyperparameter settings for retraining until the LSTM model reaches the accuracy threshold. The present invention simplifies the tedious process of the traditional method of first decomposing the signal in time and frequency and then drawing the time-frequency spectrum. It also avoids the problems of modal aliasing and endpoint effect in the time-frequency decomposition process, overcomes the problem that Hilbert analysis is sensitive to small fluctuations of the signal, optimizes the analysis process, and improves the accuracy and efficiency of time-frequency spectrum generation.

[0115] See also Fig. 9 The embodiment of the present invention provides a nonlinear signal time-frequency spectrum generation system based on LSTM, including:

[0116] at least one processor;

[0117] at least one memory for storing at least one program;

[0118] When the at least one program is executed by the at least one processor, the at least one processor implements the LSTM-based nonlinear signal time-frequency spectrum generation method as described in any one of the above items.

[0119] It can be seen that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0120] In addition, the embodiment of the present application also discloses a computer program product or a computer program, and the computer program product or the computer program is stored in a computer-readable storage medium. The processor of the computer device can read the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the computer device performs the above method. Similarly, the contents in the above method embodiment are all applicable to the storage medium embodiment, and the functions specifically implemented by the storage medium embodiment are the same as those in the above method embodiment, and the beneficial effects achieved are also the same as those achieved by the above method embodiment.

[0121] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the charging modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0122] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0123] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0124] Each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0125] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0126] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A method for generating time-frequency spectrum of nonlinear signal based on LSTM, characterized in that: include: S1, based on MATLAB simulation, the nonlinear structural response is generated, and the time-varying function is constructed according to the number and frequency of the randomly determined single-component signals of the nonlinear structural response; S2, generating a structural response time-frequency spectrum and a mixed pure structural response based on all single-component signals in the nonlinear structural response, and combining the mixed pure structural response and the structural response time-frequency spectrum into pairs to form learning samples; S3, building an LSTM model and dividing the learning samples into a training set, a validation set, and a test set, and training and validating the LSTM model using the training set and the validation set respectively; S4, if the LSTM model training is completed, the model accuracy is tested using the test set to compare the difference between the model predicted time spectrum and the actual time spectrum and generate a difference result; S5, judging whether the LSTM model reaches the accuracy threshold according to the difference result; if the LSTM model does not reach the accuracy threshold, repeating S1 to S4, generating multiple samples and optimizing the model hyperparameter settings for retraining until the LSTM model reaches the accuracy threshold, thereby obtaining a trained LSTM model; S6, input the new mixed structural response into the trained LSTM model to generate the corresponding structural response time-frequency spectrum.

2. The method according to claim 1, characterized in that The step of constructing a time-varying function according to the number and frequency of the randomly determined nonlinear structural response single-component signal comprises: Generate N nonlinear structural responses based on MATLAB simulation, wherein each nonlinear structural response includes at least one nonlinear structural response single component signal; After randomly determining the number of nonlinear structural response single component signals included in each nonlinear structural response within a first numerical threshold range, randomly determining the frequency of the nonlinear structural response single component signals within a second numerical threshold range; The time-varying function is constructed so as to randomly simulate the frequency fluctuation and / or amplitude fluctuation of the nonlinear structure in response to the single-component signal.

3. The method according to claim 1, characterized in that The generating of a structural response time-frequency spectrum and a mixed pure structural response based on all single component signals in the nonlinear structural response, and pairing the mixed pure structural response and the structural response time-frequency spectrum to form a learning sample comprises: Acquire all nonlinear structural response single component signals contained in each of the nonlinear structural responses, and perform Hilbert transform to calculate the instantaneous frequency and instantaneous amplitude; The time-frequency spectrum of the structural response is plotted based on the instantaneous frequency and the instantaneous amplitude, and the single-component signals of each nonlinear structural response are superimposed to obtain a mixed pure structural response. The mixed pure structural response is used as input and the time-frequency spectrum of the structural response is used as output to form a learning sample in pairs.

4. The method according to claim 1, characterized in that: The construction of the LSTM model and the division of the learning samples into a training set, a validation set, and a test set include: An LSTM model was built based on the TensorFlow platform, and the learning samples were divided into a training set, a validation set, and a test set in a ratio of 8:1:1; The LSTM model is trained and verified respectively by the training set and the verification set. Each time a sample is input during the model training process, white noise is randomly added to the sample data. Changes in model performance during the training process are tracked by at least one evaluation indicator.

5. The method according to claim 1, characterized in that The using the test set to test the model accuracy and compare the difference between the model predicted time spectrum and the real time spectrum and generate the difference result includes: By adding random white noise to the test set input process and then feeding it into the LSTM model, the LSTM model directly predicts the corresponding time-frequency spectrum, and compares the difference between the time-frequency spectrum predicted by the LSTM model and the actual time-frequency spectrum to generate a difference result; among them, the accuracy of the model in directly predicting the time-frequency spectrum from the noisy structural response is evaluated.

6. The method according to claim 1, characterized in that The determining whether the LSTM model reaches the accuracy threshold according to the difference result includes: Calculate the difference between two time-frequency spectra according to MAE; If MAE≤0.1, the accuracy requirement is met; If MAE>0.1, repeat S1 to S4, generate multiple samples and optimize the model hyperparameter settings for training again until the LST M model reaches the accuracy threshold.

7. The method according to claim 2, characterized in that The constructing of a time-varying function to randomly simulate the frequency fluctuation and / or amplitude fluctuation of a nonlinear structure responding to a single-component signal comprises: Randomly generate multiple sine waves of different frequencies, and construct a high-frequency envelope and a simple low-frequency envelope by controlling the amplitude ratio of the low-frequency and high-frequency components. These sine waves are superimposed to generate the final envelope. The formula is as follows: Where E is the envelope value, f i represents the frequency component of the envelope, t represents time; φ i Indicates the initial phase of the envelope.

8. A nonlinear signal time-frequency spectrum generation system based on LSTM, characterized in that: The system comprises: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements the LSTM-based nonlinear signal time-frequency spectrum generation method as described in any one of claims 1 to 7.

9. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor-executable program is used to execute the LSTM-based nonlinear signal time-frequency spectrum generation method as described in any one of claims 1 to 7 when executed by the processor.