Method for predicting strong wind along high-speed rail based on multi-scale modeling and time-frequency feature fusion
By using an improved whale optimization algorithm and a multi-scale time-frequency fusion TCN-LSTM-Transformer network, the problem of multimodal feature processing of wind speed signals along high-speed railways was solved, achieving high-precision wind speed prediction and improving the real-time performance and accuracy of gale warnings.
Patent Information
- Application Number
- CN202511464029.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-14
- Publication Date
- 2025-11-21
AI Technical Summary
Existing high-speed rail wind forecasting methods lack frequency sensing capabilities and multi-scale modeling when dealing with wind speed signals that have superimposed multimodal features and strong non-stationarity, resulting in insufficient prediction accuracy and robustness, making it difficult to achieve high-precision multi-time interval prediction.
An improved whale optimization algorithm is used to optimize the empirical mode decomposition algorithm of time-varying filters. Combined with a multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network, an adaptive multi-scale time-frequency domain feature fusion model is constructed to achieve both high-frequency fluctuations and low-frequency trends of wind speed signals and accurate prediction.
It significantly improves the real-time performance and accuracy of high-speed rail line gale warnings, enabling progressively advanced predictions of 1 to 4 minutes, providing a more reliable basis for high-speed rail dispatching decisions.
Smart Images

Figure CN120995885A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of wind speed time series prediction, specifically involving a method for predicting strong winds along high-speed railway lines based on multi-scale modeling and time-frequency feature fusion. Background Technology
[0002] High-speed rail operation faces numerous risks, with wind hazards being one of the primary ones. Due to their high speed and light weight, sudden strong gusts of wind can force trains to slow down or stop immediately. Failure to respond promptly to wind warnings can cause severe swaying, impacting the rails and track, reducing the lifespan of equipment, affecting passenger comfort, and in severe cases, leading to derailment and injuries. Current high-wind warning policies along high-speed rail lines employ a monitoring and alarm system. Wind speed detectors are installed every few kilometers along the line. An alarm is triggered when the wind speed exceeds the threshold for ten consecutive seconds, prompting the train to implement appropriate braking measures, and the dispatcher instructs the train crew to decelerate. This entire response process often takes tens of seconds. Considering the varying levels of wind warnings, the required braking time typically ranges from 30 to 180 seconds. This could result in trains entering windy areas without sufficient braking, creating safety hazards.
[0003] In recent years, some research has been conducted on wind forecasting and early warning methods for railways. Existing methods are either single deep learning algorithms, combinations of traditional optimization algorithms and machine learning methods, or combinations of modal decomposition algorithms and deep learning algorithms. Their prediction time intervals are all on the order of minutes, which can solve some wind speed forecasting scenarios along railway lines. However, when dealing with complex signals such as wind speed signals along railway lines, which have superimposed multimodal features and strong non-stationarity, the following technical bottlenecks are faced:
[0004] First, prediction models often use fixed-interval sampling, which lacks the ability to adapt to the frequency characteristics of the signal, and is prone to information redundancy or signal distortion. Second, the model structure fails to effectively integrate features of different scales and types, making it difficult to characterize the multi-level dynamic evolution process of wind speed fluctuations. Third, frequency domain information is not systematically introduced into the modeling process, making it difficult for the model to perceive high-frequency disturbances or periodic features in the wind speed data, thus affecting the prediction accuracy and robustness.
[0005] Therefore, how to construct a wind speed prediction method with frequency sensing capabilities, multi-scale modeling mechanisms, and time-frequency information fusion structures to improve the model's ability to perceive and predict sudden changes and fluctuations in wind speed is a key technical problem that high-speed rail gale warning systems urgently need to overcome. A review of existing literature and patents reveals that no relevant solution has yet proposed a frequency-driven multi-scale feature modeling and fusion method for high-speed rail wind speed data, which has clear research and application value. Summary of the Invention
[0006] Objective: The technical problem this invention aims to solve is to address the shortcomings of existing technologies by providing a method for predicting strong winds along high-speed railway lines based on multi-scale modeling and time-frequency feature fusion. Specifically, this invention proposes a TCN-LSTM-Transformer hybrid prediction model based on multi-scale modeling and time-frequency fusion, achieving high-precision, multi-time-distance prediction of future wind speeds along high-speed railway lines. This effectively improves the early warning capability for strong winds during high-speed railway operations and ensures the safe operation of high-speed railways.
[0007] This method includes the following steps: Step 1: Collect historical data from wind speed monitoring stations along the railway line and perform preprocessing; Step 2: The preprocessed data is decomposed and downsampled. First, the improved whale optimization algorithm is used to optimize the parameters of the time-varying filter empirical mode decomposition (TVF-EMD) algorithm, and an adaptive multi-level downsampling module is designed. Then, based on the TVF-EMD algorithm and the adaptive multi-level downsampling module, two or more components and their corresponding multi-scale sequences are obtained as the original input of the network. Step 3: Construct a multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network (TCN stands for Temporal Convolutional Network; LSTM stands for Long Short-Term Memory; Transformer is a self-attention model). The multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network includes a TCN network layer, an LSTM network layer, a cross-attention mechanism, a Transformer network, a time-frequency domain feature fusion module, a hierarchical feature fusion module, and a decoder. Step 4: Train the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network; Step 5: Use the trained multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network to predict future wind speed.
[0008] Beneficial effects: The adaptive multi-scale time-frequency domain feature fusion prediction model constructed in this invention can not only take into account both high-frequency fluctuations and low-frequency trends, accurately restore the complex change process of wind speed signals, but also achieve progressive advance prediction from 1 to 4 minutes, significantly improving the real-time performance and accuracy of strong wind warnings along high-speed rail lines, and providing a more reliable decision-making basis for high-speed rail scheduling. Attached Figure Description
[0009] Figure 1 This is a flowchart illustrating the overall implementation of the present invention.
[0010] Figure 2 This is a flowchart of the data feature extraction process of the present invention.
[0011] Figure 3 This is the overall prediction flowchart of the prediction model of this invention.
[0012] Figure 4 This is a flowchart of the TVF-EMD mode decomposition algorithm based on the improved whale algorithm of the present invention.
[0013] Figure 5 This is a flowchart of the time-frequency fusion module in the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network of the present invention.
[0014] Figure 6 This is a flowchart of the hierarchical fusion module in the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network structure of the present invention.
[0015] Figure 7 This is a flowchart of the decoder in the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network structure of the present invention.
[0016] Figure 8 This is a structural diagram of the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network model of the present invention.
[0017] Figure 9 This is a flowchart of the overall wind speed prediction process of the present invention.
[0018] Figure 10 This is a test result diagram of the wind speed prediction model at station K1005 in an embodiment of the present invention.
[0019] Figure 11 This is a test result diagram of the wind speed prediction model at station K1050 in an embodiment of the present invention.
[0020] Figure 12 This is a test result diagram of the wind speed prediction model at station K1056 in an embodiment of the present invention. Detailed Implementation
[0021] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments, and the advantages of the present invention in the above and / or other aspects will become clearer.
[0022] like Figure 1 As shown, this embodiment of the invention provides a method for predicting strong winds along high-speed railway lines based on multi-scale modeling and time-frequency feature fusion, including the following steps: Step 1: Collect historical data from wind speed monitoring stations along the railway line and perform preprocessing; Step 2 involves decomposing and downsampling the preprocessed data. First, an improved whale optimization algorithm is used to optimize the parameters of the Time-varying Filter Empirical Mode Decomposition (TVF-EMD) algorithm. An adaptive multi-level downsampling module is then designed. Next, based on the TVF-EMD algorithm and the adaptive multi-level downsampling module, two or more components and their corresponding multi-scale sequences are obtained and used as the network's original input. Figure 2 As shown; Step 3: Construct a multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network (TCN stands for Temporal Convolutional Network; LSTM stands for Long Short-Term Memory; Transformer is a self-attention model). The multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network includes a TCN network layer, an LSTM network layer, a cross-attention mechanism, a Transformer network, a time-frequency domain feature fusion module, a hierarchical feature fusion module, and a decoder. Step 4: Train the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network; Step 5: Use the trained multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network to predict future wind speed.
[0023] Step 1 includes the following steps: Step 1-1: Select wind speed monitoring data from three wind speed monitoring stations (K1005, K1050, and K1056) along the high-speed railway in Jiangsu Province from January 1, 2019 to December 31, 2019, measured by anemometers at a height of 4m above the ground at the target stations. The time resolution is in the second range, and the data includes strong wind monitoring data. Step 1-2: Use moving average to process the data collected in step 1-1 and remove outliers. This better reflects the overall trend and changes of the dataset and avoids information loss that may result from directly deleting outliers. At the same time, use ridge regression to fill in the missing data.
[0024] Steps 1-3: While the raw, second-by-second wind speed monitoring data can reflect fine-grained changes, its strong random fluctuations can easily interfere with the model's learning process, significantly reducing prediction accuracy, especially when making multi-minute lead predictions. Therefore, a 30-second average is taken from the raw, second-level wind speed monitoring data to obtain the final wind speed data. The 30-second average of the second-level data is based on the following considerations: 1. The effective advance prediction time for railway wind speed forecasting is calculated to be approximately 0.5 minutes (30s) to 4 minutes (8*30s). Using 30s average data, the prediction step size can be set to 1 to 8 steps, which is easier to implement in engineering than the 30 to 240 steps for 1s data.
[0025] 2. Although raw, second-by-second monitoring wind speed data can reflect fine-grained changes, its strong random fluctuations can easily interfere with the model's learning process, significantly reducing prediction accuracy, especially when making multi-minute advance predictions, which are more difficult.
[0026] like Figure 3 As shown, step 2 includes the following steps: Step 2-1: Establish a whale population for optimizing the parameters of the empirical mode decomposition algorithm for time-varying filters, serving as the search space for the optimization process. The optimization objectives are the number of intrinsic mode functions (imf) obtained from the decomposition. and parameter penalty factor Let the position of each individual whale be represented as a parameter vector. : , in, Let m be the parameter vector of the m-th individual whale; Let be the number of decomposed intrinsic mode functions (IMF) of the m-th whale; This is a penalty factor used for regularization calculations during mode decomposition. Initialize parameter vector : , in, It is the upper limit vector. The lower bound vector, ; It is a uniformly distributed random vector; Step 2-2: For the current parameter combination, execute the time-varying filter empirical mode decomposition algorithm once to extract... Each intrinsic mode function imf; Based on the obtained Calculate the total envelope entropy using the eigenmode functions imf. : , , , in This represents the envelope amplitude value at point j; The probability of the j-th point is defined as the ratio of the envelope amplitude of the j-th point to the total envelope amplitude. For the first The envelope entropy of each intrinsic mode function imf; Next, the kurtosis of each component is calculated. Utilizing kurtosis To measure the thickness of the tail of wind speed distribution along a railway line, especially the extreme wind speed anomalies that occur when railway wind speed signals encounter strong winds: , in, It is the fourth moment, representing the deviation of the wind speed value from the mean. It is the second moment, representing the variance of the wind speed value; The objective function of the improved whale optimization algorithm for: , in, For the first The standard deviation of each intrinsic mode function imf; For the first The mean of the intrinsic mode functions imf For the first The kurtosis of the intrinsic mode functions (imf) To optimize the control factors, it is based on The degree of fluctuation is dynamically adjusted; Steps 2-3: Based on the objective optimization function and the current optimal whale individual position, perform whale individual position updates. First, calculate the control vector: , in, Indicates the first The optimal solution found in the time step; Indicates the first The solution for the current position of the whale; This represents the distance vector between the current position and the optimal solution; Indicates the first The whale's position is updated in the next iteration; It is a randomly generated vector. It is related to the number of iterations A factor that is inversely proportional indicates that the search intensity gradually decreases; It is a parameter that controls the magnitude of position updates; It is the gravitational coefficient that controls the whale's relationship with the optimal solution; It is the maximum number of iterations; Then, based on the probability factor p and the coefficient vector Based on the given value, select the corresponding search method to complete the initial position update. : , in, Indicates the first Let b represent a randomly selected whale position; l represents a constant between -1 and 1; e represents the natural constant. Steps 2-4: After completing the initial position update, evaluate the current optimization state. Use the multi-generation optimization function to determine whether global perturbation optimization needs to be added in this iteration. Set the following expression to calculate the iteration number. The change of the objective function over multiple iterations at the next iteration : , in, It is the optimal solution in the w-th iteration; Finally, to determine whether a global perturbation is introduced in this iteration, a parameter inversely proportional to the number of iterations is introduced. The criteria for determining local optima are dynamically adjusted, and the specific determination method is as follows: , in, It is the initial judgment threshold; A constant is used to control the relaxation rate of the decision criteria; the specific decision criteria are: when When, global perturbation optimization is introduced; when At that time, make minor adjustments in certain areas; Based on the calculation results according to the judgment criteria, either global perturbation optimization or local fine-tuning is selected for further position updates to obtain the final result. The update method is as follows: , in, This is the best solution in the past. The value is Random numbers between; Steps 2-5 are complete. After several optimization iterations, the number of intrinsic mode functions (IMF) decomposed is obtained. The optimal solution k, and the parameter penalty factor optimal solution ; Steps 2-6: Use optimal parameters For the original signal The empirical mode decomposition algorithm for time-varying filters is executed, and the decomposition expression is: , in, For the first Each intrinsic mode function imf, The remaining residual signal; Finally, the wind speed dataset is obtained after applying the time-varying filter empirical mode decomposition algorithm to the wind speed. ; Steps 2-7, for the wind speed dataset Regarding the first eigenmode functions Calculate the autocorrelation function and the main cycle Defined as: , in, For the lagged variables of the autocorrelation function, The maximum lag order; Periodic intensity Defined as: , in, The value of the zero-order autocorrelation function; Based on the sliding window length L and the main period Define the number of sampling points N in each period: , Assume that at least one is expected per period Calculate the matching degree function for each sampling point. : , in, It is a smoothing factor; In the time domain, The sliding window energy change rate analysis is performed, and the calculation formula is as follows: , in, It is the wind speed value at point n in the discrete sequence. It is the instantaneous energy of the sliding window at time point t. It is the rate of energy change at time point t; Calculate the average instantaneous rate of change of energy : , Construct a scale determination function to determine Multiplication factor during downsampling : , in, These are the weights for periodic intensity, the matching degree function, and the instantaneous rate of change of energy, respectively. express The multiplication factor, It also possesses dynamic adaptability to the frequency, energy distribution, and temporal fluctuations of the component signal; Steps 2-8, targeting Extract the corresponding main frequency : , in , For the first The main frequency of each component; To be The first frequency domain after Fourier transform A discrete frequency point; For the first Each component at frequency Spectral intensity at that location; According to Nyquist's theorem, the signal is guaranteed to be undistorted. The maximum sampling interval after downsampling should not be greater than ,therefore, downsampling depth The following constraints need to be met: , in, It is the original sampling interval; Steps 2-9, based on the multiplication factor Determine the sampling interval for each downsampling step, and then determine the sampling depth based on the downsampling depth. Constraints, Determine The number of downsampling steps is determined, and the multi-scale sequence obtained after multi-level downsampling is finally calculated. The relationship between each downsampled sequence and the original component sequence is expressed as follows: , in , for The calculated downsampling depth, i.e. The maximum number of downsampling times is ,but The total number of multi-scale sequences obtained after calculation is , Indicates to The first after downsampling A scale sequence, express The original sequence that has not been downsampled; get Multiscale sequence set : , in, To Conduct the first The sequence obtained after downsampling; Step 2-10: Repeat steps 2-7 to 2-9 to obtain a set of multi-scale sequences of all k intrinsic mode functions (IMFs), and summarize them into a set. : , in, They are respectively The multi-scale sequence set obtained after adaptive multi-scale downsampling.
[0027] like Figure 4 As shown, step 3 includes the following steps: Step 3-1: Design the cross-domain feature fusion block (CDFFB) in the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network structure. Step 3-2: Design the cross-scale feature fusion block (CSFFB) in the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network. Step 3-3, Design the decoder; Steps 3-4: Design a complete multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network.
[0028] In step 3-1, as Figure 5 As shown, the time-frequency domain feature fusion module is used to perform the following steps: Step 3-1-1, let the input of the time-frequency domain feature fusion module be... First, the input Perform a Fourier transform (FFT) to obtain the transformed features. : ; Step 3-1-2, Calculate Amplitude M and phase P: ; in, Expressing the request Modulus of a complex number; Expressing the request The angle of the argument; Step 3-1-3: Let the length of the amplitude M and phase P obtained in 3-1-2 be L. To remove feature symmetry redundancy, retain the first half of the amplitude M and phase P. Then, the length of the amplitude M and phase P after retaining the first half is... The amplitude and phase are concatenated to obtain the spectral feature matrix. Then, a linear layer is used to match the length of the time-frequency domain features. The padded frequency-domain features are embedded into the same dimension as the time-domain features to obtain the frequency-domain features. The calculation formula is: ; in, This indicates that the amplitude of the first half, with a length of L / 2, is retained. This indicates that the first half of the phase, with a length of L / 2, is retained.
[0029] Step 3-1-4: After completing the frequency domain embedding, a gating unit is used to control the input weights of the time-domain and frequency-domain features to obtain the adjusted frequency-domain features. and adjusted time domain features The calculation formula is: , , in, It is a Sigmoid gated unit. and Here is the weight matrix of the gated unit. and For bias terms; Step 3-1-5: Utilize the CrossAttention mechanism to fuse temporal features. Frequency domain characteristics , obtain fusion features : ; Among them, the first input As the Q (query) input in the cross-attention mechanism, the second input As the K (key) input in the cross-attention mechanism, the third input As the V (value) input in the cross-attention mechanism.
[0030] Step 3-1-6, fusion features Normalization is performed, and features are further extracted using TCN, LSTM, and cross-attention layers. Finally, the feature format is adjusted using a linear layer to obtain the module output. The process is represented as follows: , , , , , in, These are the features after normalization; The features are first calculated by the TCN network and then by the LSTM network before being output. These are the features output after computation by the Feedforward layer in the Transformer network. These are the features output after being calculated using a cross-attention mechanism, where the first input... As the Q (query) input in the cross-attention mechanism, the second input As the K (key) input in the cross-attention mechanism, the third input As the V (value) input in the cross-attention mechanism; These are the features output after computation by a linear layer; Step 3-1-7, the time-frequency domain feature fusion module is represented by the following mapping: , in, This indicates that steps 3-1-1 to 3-1-6 will be executed.
[0031] In step 3-2, such as Figure 6 As shown, the hierarchical feature fusion module performs the following steps: Step 3-2-1, the hierarchical feature fusion module has two input features, the first input feature is set to The second input feature is set as The hierarchical feature fusion module first performs... Perform a deconvolution (Deconv) operation to... Dimensional adjustment and Consistent, resulting in dimension-adjusted features. : ; Step 3-2-2: Calculate the input features respectively. Information entropy Input features Information entropy : , , in, Representative input features The value of z is the probability. Representative input features The probability that the value is z; Based on the information entropy calculation results, corresponding weight factors are generated: , , Where exp represents the natural exponential function. Input features Weighting factors Input features Weighting factors; Step 3-2-3, input features Compared with dimension-adjusted input features The features are fused using the query Q in the CrossAttention mechanism, respectively, to obtain the features. and characteristics The calculated weighting factors are then used to perform weighted calculations, outputting time-frequency fusion features. : , , ; The first input of the first cross-attention mechanism As the Q (query) input in this cross-attention mechanism, the second input As the K (key) input in this cross-attention mechanism, the third input As the input V (value) in this cross-attention mechanism; the first input of the second cross-attention mechanism. As the Q (query) input in this cross-attention mechanism, the second input As the K (key) input in this cross-attention mechanism, the third input This serves as the V (value) input in this cross-attention mechanism.
[0032] Step 3-2-4: After fusion, obtain the output features using linear mapping. : ; Step 3-2-5, the hierarchical feature fusion module is represented by the following mapping: , in, This indicates that the calculations from step 3-2-1 to step 3-2-4 are performed.
[0033] In step 3-3, such as Figure 7 As shown, the decoder performs the following steps: Step 3-3-1, let the decoder input features be... ,Will Input a convolution with a 1×1 kernel Conv to obtain filtered feature information. : , in This indicates a convolutional layer with a 1×1 convolutional kernel Conv; Step 3-3-2, filter the feature information Input a multilayer perceptron (MLP) layer and output the decoder prediction result. : ; Step 3-3-3, the decoder is represented by the following mapping: , in, This indicates that the calculations from step 3-3-1 to step 3-3-2 are performed.
[0034] like Figure 8 As shown, steps 3-4 include the following steps: Step 3-4-1: After completing the module design of the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network in steps 3-1 to 3-3, the complete multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network is built. The specific process includes: For the eigenmode functions ,Will Multiscale sequence set The computation is performed within a multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network structure, based on the known set of inputs. Total If a sequence of scale n is required, and each sequence needs to be processed by a network layer, then the nth sequence... eigenmode functions The corresponding multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network has Layer, using To indicate the current network layer number; First, in the i=0 layer of the network, for the... Sub-sampling sequence Perform embedding processing to obtain the embedding representation. : ; Step 3-4-2, embedding representation Input the time-frequency domain feature fusion module to obtain the fused feature representation. : ; Step 3-4-3: In the i=0th layer of the network, where there are no features from the upper layers, inter-layer feature fusion is required to represent the features. After adjusting the format using a linear transformation, the first-layer output features are obtained. : , After obtaining the output features of layer i=0, starting from layer i=1, a hierarchical feature fusion module is introduced to fuse the features of adjacent layers. The specific calculation process includes the following steps: Step 3-4-4, in the i-th layer of the network, the th Sub-sampling sequence Perform an embedding operation to obtain the embedded representation. : ; Steps 3-4-5, embedding representation The input time-frequency domain feature fusion module performs time-frequency feature fusion, and the output is... : ; Steps 3-4-6, will The feature dimensions are adjusted by using a linear layer to obtain the feature output of the linear layer. : ; Steps 3-4-7, will The input layer feature fusion module, along with the output features of the i-1 layer network After fusion, the i-th layer features are output. : ; Steps 3-4-8, repeat steps 3-4-4 through 3-4-7, until... Ultimately, they won the first prize. Layer output features And obtain the first digit through the decoder. Component prediction results : ; The prediction results of all intrinsic mode functions (IMFs) are combined into the final wind speed prediction result Y: .
[0035] In step 4, the data obtained in step 1 is processed in step 2 to obtain the original network input. The model is then trained within the network established in step 3. Specific steps include: Step 4-1: Use the historical 30-second average wind speeds of the three wind speed monitoring stations K1005, K1050, and K1056 processed in Step 2 as input to the training model. The model is the training architecture designed in Step 3.
[0036] Step 4-2: Update the model's learning rate using the Adam optimizer. The learning rate is 1e-4, the batch size is 64, and the number of iterations is set to 300. The first 80% of the dataset is used for training, and the last 20% is used for testing.
[0037] Step 4-3: Train models with multiple prediction step sizes for the wind speed data from the three stations, with prediction step sizes set to 2, 4, 6, and 8 steps respectively. These correspond to predicting wind speed 1 minute, 2 minutes, 3 minutes, and 4 minutes in advance, respectively.
[0038] Step 4-4: Save the wind speed prediction models corresponding to the three trained stations.
[0039] Step 5 is the model prediction process. Using the network model trained in Step 4 for the corresponding stations, wind speed predictions are made for the three stations in the future. The overall prediction process is as follows: Figure 9 As shown, the specific content includes: Step 5-1: The three stations use the network model trained in Step 4 to predict wind speed 1 minute, 2 minutes, 3 minutes, and 4 minutes in advance, respectively.
[0040] Step 5-2 uses the average absolute error (MAE) and mean squared error (MSE) as evaluation metrics to assess the accuracy of each model's predictions and compares them with commonly used existing models. The results are shown in Table 1.
[0041] like Figure 10 , Figure 11 , Figure 12As shown in Table 1 (SVR stands for Support Vector Machine, MLP for Multilayer Perceptron, T for TCN model, L for LSTM model, and TF for Transformer model), the method proposed in this invention can achieve accurate, reliable, and hysteresis-free wind speed prediction at multiple sites. Even under sudden wind speed changes, it can still guarantee real-time dynamic power point tracking capabilities. As shown in Table 1, the method proposed in this invention exhibits excellent and stable performance.
[0042] Table 1 Comparison of Results
[0043]
[0044] As shown in Table 1, the method proposed in this invention significantly improves the accuracy of wind speed prediction along railway lines compared to traditional methods. In tests at different stations, the wind speed prediction error proposed in this invention is significantly reduced compared to various traditional wind speed prediction methods. Furthermore, the method proposed in this invention exhibits superior prediction performance in tasks with different lead prediction step lengths.
[0045] The present invention also provides an electronic device, including a processor and a memory, the memory storing program code that, when executed by the processor, causes the processor to perform the steps of the method.
[0046] The present invention also provides a storage medium storing a computer program or instructions that, when the computer program or instructions are run on a computer, execute the steps of the method described.
[0047] This invention is based on the following research and practical results: Wind speed signals have strong non-stationarity and significant multi-scale temporal characteristics. Their volatility is reflected not only in the overall trend, but also in instantaneous disturbances and local frequency changes. Wind disasters are one of the primary risks during train operation. If the instantaneous wind speed exceeds the train's maximum speed limit, it can cause the train to overturn within seconds. This invention uses the K1050, K1250, and K1256 wind speed monitoring stations along the high-speed railway in Jiangsu Province as the research object to establish a prediction model. Research indicates that the current wind speed forecasting work along high-speed railway lines faces the following problems that need to be addressed: Problem 1: Algorithms such as Empirical Mode Decomposition (EMD) can obtain sequence decomposition results based on frequency modes, serving as a supplement to the global frequency view. However, their main limitation is their inability to characterize the frequency variation trend of wind signals across different time segments, thus failing to reflect the dynamic evolution of local frequency characteristics. Given that the key to effectively utilizing frequency domain information lies in the correlation and consistency between global frequency characteristics and local wind speed frequency changes, more refined frequency domain analysis methods need to be introduced based on the decomposition algorithms.
[0048] Question 2: Different models have their own advantages in prediction. Fusion models can combine the advantages of different models to improve prediction accuracy, and are widely used in time series forecasting in fields such as wind power. However, most existing high-speed rail wind speed prediction studies use single-model methods, which are difficult to simultaneously capture short-term fluctuations, medium-term trends, and long-term dependencies in wind speed sequences. This results in insufficient learning of the complex evolutionary relationships of wind speed sequences over time, affecting prediction performance.
[0049] Question 3: Wind conditions along railway lines are complex, with wind speed exhibiting various fluctuation patterns. Existing studies using data at minute or longer intervals may result in the loss of second-level fluctuation characteristics. High-speed rail operations are extremely sensitive to second-level changes in wind speed along the line, and the lack of high-frequency features directly impacts prediction accuracy. Furthermore, wind signals exhibit significant volatility and intermittency over time; data at different time scales contain different variation characteristics, making it difficult to comprehensively characterize the complex features of wind signals using wind speed data from a single time interval. Therefore, to accurately describe wind speed variation patterns and improve prediction performance, it is necessary to comprehensively consider feature information from different time scales.
[0050] This invention proposes the following innovations to address the three problems mentioned above: Innovation 1: A novel time-frequency domain fusion module is constructed, which, based on existing mode decomposition methods, fully explores the local frequency domain features of different components under multi-scale conditions. The fusion module achieves deep integration of frequency and time domain features by introducing an attention mechanism, enabling the model to use local fluctuation patterns in time segments as the core identification basis, effectively improving prediction performance under complex fluctuation backgrounds.
[0051] Innovation 2: An innovative hybrid decoder architecture was designed. In this architecture, the Temporal Convolutional Network (TCN) can analyze the temporal linear feature correlations between data, the Long Short-Term Memory Network (LSTM) excels in modeling long-term dependencies in time series, and the Transformer performs excellently in extracting global contextual features. By fusing these models, the model's ability to represent the complex fluctuations in wind speed data and its adaptability to long-sequence prediction tasks are significantly enhanced.
[0052] Innovation 3: The innovative use of multi-scale downsampling technology effectively avoids feature loss issues that may occur in traditional minute-level time interval data, as well as random fluctuations in second-level data, while preserving high temporal resolution information. Furthermore, a hierarchical fusion module is introduced between adjacent scales to achieve collaborative integration of features across multiple scales and modeling of evolutionary patterns, thereby significantly improving the model's prediction accuracy and generalization ability.
[0053] This invention provides a method for predicting strong winds along high-speed railway lines based on multi-scale modeling and time-frequency feature fusion. Many methods and approaches exist for implementing this technical solution; the above description is merely a preferred embodiment of the invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this invention, and these improvements and modifications should also be considered within the scope of protection of this invention. All components not explicitly stated in this embodiment can be implemented using existing technologies.
Claims
1. A method for predicting strong winds along high-speed railway lines based on multi-scale modeling and time-frequency feature fusion, characterized in that, Includes the following steps: Step 1: Collect historical data from wind speed monitoring stations along the railway line and perform preprocessing; Step 2: The preprocessed data is decomposed and downsampled. First, the improved whale optimization algorithm is used to optimize the parameters of the time-varying filter empirical mode decomposition algorithm, and an adaptive multi-level downsampling module is designed. Then, based on the time-varying filter empirical mode decomposition algorithm and the adaptive multi-level downsampling module, two or more components and their corresponding multi-scale sequences are obtained as the original input of the network. Step 3: Construct a multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network; the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network includes a TCN network layer, an LSTM network layer, a cross-attention mechanism, a Transformer network, a time-frequency domain feature fusion module, a hierarchical feature fusion module, and a decoder; Step 4: Train the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network; Step 5: Use the trained multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network to predict future wind speed.
2. The method according to claim 1, characterized in that, Step 1 includes the following steps: Step 1-1: Select wind speed monitoring data measured by anemometers at height above ground level of the target station from wind speed monitoring stations along the high-speed railway line. The time resolution is on the order of seconds, and the data includes strong wind monitoring data. Step 1-2: Process the data collected in Step 1-1 using moving average, remove outliers, and use ridge regression to fill in missing data. Steps 1-3: Take the average value of the original second-level wind speed monitoring data to obtain the final wind speed data.
3. The method according to claim 2, characterized in that, Step 2 includes the following steps: Step 2-1: Establish a whale population for optimizing the parameters of the empirical mode decomposition algorithm for time-varying filters, serving as the search space for the optimization process. The optimization objectives are the number of intrinsic mode functions (IMFs) obtained from the decomposition. and parameter penalty factor Let the position of each individual whale be represented as a parameter vector. : , in, Let m be the parameter vector of the m-th individual whale; Let be the number of decomposed intrinsic mode functions (IMF) of the m-th whale; This is a penalty factor used for regularization calculations during mode decomposition. Initialize parameter vector : , in, It is the upper limit vector. The lower bound vector, ; It is a uniformly distributed random vector; Step 2-2: For the current parameter combination, execute the time-varying filter empirical mode decomposition algorithm once to extract... Each intrinsic mode function imf; Based on the obtained Calculate the total envelope entropy using the eigenmode functions imf. : , , , in This represents the envelope amplitude value at point j; The probability of the j-th point is defined as the ratio of the envelope amplitude of the j-th point to the total envelope amplitude. For the first The envelope entropy of each intrinsic mode function imf; Next, the kurtosis of each component is calculated. Utilizing kurtosis Assess the thickness of the tail end of the wind speed distribution along the railway line: , in, It is the fourth moment, representing the deviation of the wind speed value from the mean. It is the second moment, representing the variance of the wind speed value; The objective function of the improved whale optimization algorithm for: , in, For the first The standard deviation of each intrinsic mode function imf; For the first The mean of the intrinsic mode functions imf For the first The kurtosis of the intrinsic mode functions (imf) To optimize the control factors, it is based on The degree of fluctuation is dynamically adjusted; Steps 2-3: Based on the objective optimization function and the current optimal whale individual position, perform whale individual position updates. First, calculate the control vector: , in, Indicates the first The optimal solution found in the time step; Indicates the first The solution for the current position of the whale; This represents the distance vector between the current position and the optimal solution; Indicates the first The whale's position is updated in the next iteration; It is a randomly generated vector. It is related to the number of iterations Factors that are inversely proportional; It is a parameter that controls the magnitude of position updates; It is the gravitational coefficient that controls the whale's relationship with the optimal solution; It is the maximum number of iterations; Then, based on the probability factor p and the coefficient vector Based on the given value, select the corresponding search method to complete the initial position update. : , in, Indicates the first Let b represent a randomly selected whale position; l represents a constant between -1 and 1; e represents the natural constant. Steps 2-4: After completing the initial position update, evaluate the current optimization state. Use the multi-generation optimization function to determine whether global perturbation optimization needs to be added in this iteration. Set the following expression to calculate the iteration number. The change of the objective function over multiple iterations at the next iteration : , in, It is the optimal solution in the w-th iteration; Finally, to determine whether a global perturbation is introduced in this iteration, a parameter inversely proportional to the number of iterations is introduced. The criteria for determining local optima are dynamically adjusted, and the specific determination method is as follows: , in, It is the initial judgment threshold; A constant is used to control the relaxation rate of the decision criteria; the specific decision criteria are: when When, global perturbation optimization is introduced; when At that time, make minor adjustments in certain areas; Based on the calculation results according to the judgment criteria, either global perturbation optimization or local fine-tuning is selected for further position updates to obtain the final result. The update method is as follows: , in, This is the best solution in the past. The value is Random numbers between; Steps 2-5 are complete. After several optimization iterations, the number of intrinsic mode functions (IMF) decomposed is obtained. The optimal solution k, and the parameter penalty factor optimal solution ; Steps 2-6: Use optimal parameters For the original signal The empirical mode decomposition algorithm for time-varying filters is executed, and the decomposition expression is: , in, For the first Each intrinsic mode function imf, The remaining residual signal; Finally, the wind speed dataset is obtained after applying the time-varying filter empirical mode decomposition algorithm to the wind speed. ; Steps 2-7, for the wind speed dataset Regarding the first eigenmode functions Calculate the autocorrelation function and the main cycle Defined as: , in, For the lagged variables of the autocorrelation function, The maximum lag order; Periodic intensity Defined as: , in, The value of the zero-order autocorrelation function; Based on the sliding window length L and the main period Define the number of sampling points N in each period: , Assume that at least one is expected per period Calculate the matching degree function for each sampling point. : , in, It is a smoothing factor; In the time domain, The sliding window energy change rate analysis is performed, and the calculation formula is as follows: , in, It is the wind speed value at point n in the discrete sequence. It is the instantaneous energy of the sliding window at time point t. It is the rate of energy change at time point t; Calculate the average instantaneous rate of change of energy : , Construct a scale determination function to determine Multiplication factor during downsampling : , in, These are the weights for periodic intensity, the matching degree function, and the instantaneous rate of change of energy, respectively. express The multiplication factor, ; Steps 2-8, targeting Extract the corresponding main frequency : , in , For the first The main frequency of each component; To be The first frequency domain after Fourier transform A discrete frequency point; For the first Each component at frequency Spectral intensity at that location; downsampling depth The following constraints need to be met: , in, It is the original sampling interval; Steps 2-9, based on the multiplication factor Determine the sampling interval for each downsampling step, and then determine the sampling depth based on the downsampling depth. Constraints, Determine The number of downsampling steps is determined, and the multi-scale sequence obtained after multi-level downsampling is finally calculated. The relationship between each downsampled sequence and the original component sequence is expressed as follows: , in , for The calculated downsampling depth, i.e. The maximum number of downsampling times is ,but The total number of multi-scale sequences obtained after calculation is , Indicates to The first after downsampling A scale sequence, express The original sequence that has not been downsampled; get Multiscale sequence set : , in, To Conduct the first The sequence obtained after downsampling; Step 2-10: Repeat steps 2-7 to 2-9 to obtain a set of multi-scale sequences of all k intrinsic mode functions (IMFs), and summarize them into a set. : , in, They are respectively The multi-scale sequence set obtained after adaptive multi-scale downsampling.
4. The method according to claim 3, characterized in that, Step 3 includes the following steps: Step 3-1: Design the time-frequency domain feature fusion module CDFFB in the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network structure; Step 3-2: Design the hierarchical feature fusion module CSFFB in the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network; Step 3-3, Design the decoder; Steps 3-4: Design a complete multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network.
5. The method according to claim 4, characterized in that, In step 3-1, the time-frequency domain feature fusion module is used to perform the following steps: Step 3-1-1, let the input of the time-frequency domain feature fusion module be... First, the input Perform a Fourier transform (FFT) to obtain the transformed features. : ; Step 3-1-2, Calculate Amplitude M and phase P: ; in, Expressing the request Modulus of a complex number; Expressing the request The angle of the argument; Step 3-1-3: Let the length of the amplitude and phase obtained in 3-1-2 be L. To remove characteristic symmetry redundancy, retain the first half of the amplitude M and phase P. The length of the amplitude M and phase P after retaining the first half is... The amplitude and phase are concatenated to obtain the spectral feature matrix. Then, a linear layer is used to match the length of the time-frequency domain features. The padded frequency-domain features are embedded into the same dimension as the time-domain features to obtain the frequency-domain features. The calculation formula is: ; in, This indicates that the amplitude of the first half, with a length of L / 2, is retained. This indicates that the phase of the first half, with a length of L / 2, is retained; Step 3-1-4: After completing the frequency domain embedding, a gating unit is used to control the input weights of the time-domain and frequency-domain features to obtain the adjusted frequency-domain features. and adjusted time domain features The calculation formula is: , , in, It is a Sigmoid gated unit. and Here is the weight matrix of the gated unit. and For bias terms; Step 3-1-5: Utilize the CrossAttention mechanism to fuse temporal features. Frequency domain characteristics , obtain fusion features : ; Among them, the first input The second input serves as the Q-query input in the cross-attention mechanism. As the K-key input in the cross-attention mechanism, the third input As the V-value input in the cross-attention mechanism; Step 3-1-6, fusion features Normalization is performed, and features are further extracted using TCN, LSTM, and cross-attention layers. Finally, the feature format is adjusted using a linear layer to obtain the module output. The process is represented as follows: , , , , , in, These are the features after normalization; The features are first calculated by the TCN network and then by the LSTM network before being output. These are the features output after computation by the Feedforward layer in the Transformer network. These are the features output after being calculated using the cross-attention mechanism; These are the features output after computation by a linear layer; Step 3-1-7, the time-frequency domain feature fusion module is represented by the following mapping: , in, This indicates that steps 3-1-1 to 3-1-6 will be executed.
6. The method according to claim 5, characterized in that, In step 3-2, the hierarchical feature fusion module performs the following steps: Step 3-2-1, the hierarchical feature fusion module has two input features, the first input feature is set to The second input feature is set as The hierarchical feature fusion module first performs... Perform a deconvolution (Deconv) operation to... Dimensional adjustment and Consistent, resulting in dimension-adjusted features. : ; Step 3-2-2: Calculate the input features respectively. Information entropy Input features Information entropy : , , in, Representative input features The value of z is the probability. Representative input features The probability that the value is z; Based on the information entropy calculation results, corresponding weight factors are generated: , , Where exp represents the natural exponential function. Input features Weighting factors Input features Weighting factors; Step 3-2-3, input features Compared with dimension-adjusted input features The features are fused using the query Q in the CrossAttention mechanism, respectively, to obtain the features. and characteristics The calculated weighting factors are then used to perform weighted calculations, outputting time-frequency fusion features. : , , ; Step 3-2-4: After fusion, obtain the output features using linear mapping. : ; Step 3-2-5, the hierarchical feature fusion module is represented by the following mapping: , in, This indicates that the calculations from step 3-2-1 to step 3-2-4 are performed.
7. The method according to claim 6, characterized in that, In step 3-3, the decoder performs the following steps: Step 3-3-1, let the decoder input features be... ,Will Input a convolution with a 1×1 kernel Conv to obtain filtered feature information. : , in This indicates a convolutional layer with a 1×1 convolutional kernel Conv; Step 3-3-2, filter the feature information Input a multilayer perceptron (MLP) layer and output the decoder prediction result. : ; Step 3-3-3, the decoder is represented by the following mapping: , in, This indicates that the calculations from step 3-3-1 to step 3-3-2 are performed.
8. The method according to claim 7, characterized in that, Steps 3-4 include the following steps: Step 3-4-1: After completing the module design of the multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network in steps 3-1 to 3-3, the complete multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network is built. The specific process includes: For the eigenmode functions ,Will Multiscale sequence set The computation is performed within a multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network structure, based on the known set of inputs. Total If a sequence of scale n is required, and each sequence needs to be processed by a network layer, then the nth sequence... eigenmode functions The corresponding multi-scale time-frequency fusion TCN-LSTM-Transformer prediction network has Layer, using To indicate the current network layer number; First, in the i=0 layer of the network, for the... Sub-sampling sequence Perform embedding processing to obtain the embedding representation. : ; Step 3-4-2, embedding representation Input the time-frequency domain feature fusion module to obtain the fused feature representation. : ; Step 3-4-3: In the i=0th layer of the network, where there are no features from the upper layers, inter-layer feature fusion is required to represent the features. After adjusting the format using a linear transformation, the first-layer output features are obtained. : , After obtaining the output features of layer i=0, starting from layer i=1, a hierarchical feature fusion module is introduced to fuse the features of adjacent layers. The specific calculation process includes the following steps: Step 3-4-4, in the i-th layer of the network, the th Sub-sampling sequence Perform an embedding operation to obtain the embedded representation. : ; Steps 3-4-5, embedding representation The input time-frequency domain feature fusion module performs time-frequency feature fusion, and the output is... : ; Steps 3-4-6, will The feature dimensions are adjusted by using a linear layer to obtain the feature output of the linear layer. : ; Steps 3-4-7, will The input layer feature fusion module, along with the output features of the i-1 layer network After fusion, the i-th layer features are output. : ; Steps 3-4-8, repeat steps 3-4-4 through 3-4-7, until... Ultimately, they won the first prize. Layer output features And obtain the first digit through the decoder. Component prediction results : ; The prediction results of all intrinsic mode functions (IMFs) are combined into the final wind speed prediction result Y: 。 9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the method of any one of claims 1 to 8.
Citation Information
Patent Citations
Multi-source heterogeneous data fusion-based gale prediction algorithm along high-speed rail
CN117150430A
TCN-LSTM wind power generation capacity prediction method combining time-frequency analysis and attention mechanism
CN119382103A
Wind speed and direction prediction method based on improved TCN-LSTM
CN120234763A
Wind speed prediction method and system based on hybrid convolutional network and parallel prediction model
CN120408238A
Offshore wind speed prediction method based on TVFEMD-FE-TCN-Transform model
CN120470265A
Cited By
High-speed rail second-level wind speed prediction and early warning method based on wind process dynamic division and physical guidance
CN122021483A
High-speed rail second-level wind speed prediction and early warning method based on wind process dynamic division and physical guidance
CN122021483B