Railway rainfall early warning method based on VMD-PSO-LSTM
Through the VMD-PSO-LSTM combination model decomposition and optimization of rainfall data along the railway, the problem of insufficient accuracy in the prediction of heavy rainfall by traditional models is solved, and higher accuracy and robust prediction are achieved to ensure railway safety.
Patent Information
- Application Number
- CN202510562586.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-30
- Publication Date
- 2025-08-15
AI Technical Summary
It is difficult for the prior art to accurately predict heavy rainfall disasters along the railway line. Traditional models lack prediction accuracy when dealing with harmonic and nonlinear features, which affects railway safety operations.
The combined prediction model based on VMD-PSO-LSTM is used to decompose the rainfall data into multiple IMF sequences through variational modal decomposition (VMD). The LSTM model parameters are optimized in combination with the particle swarm optimization algorithm (PSO), and the prediction values are superimposed to obtain accurate rainfall prediction results.
It improves the accuracy and robustness of rainfall prediction, can effectively capture the dynamic characteristics of rainfall, reduce the workload of manual parameter adjustment, enhances prediction performance, and ensures safe operation along the railway.
Smart Images

Figure CN120492838A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of railway heavy rainfall disaster risk warning, and in particular relates to a rainfall warning method along railways based on VMD-PSO-LSTM. Background Art
[0002] Heavy rainfall disasters refer to the damage caused by heavy rainfall in a short period of time to the natural environment and human activities. These disasters typically manifest as floods, landslides, and mudslides triggered by sustained torrential rain. These weather phenomena can damage infrastructure (such as railways, roads, and bridges), inundate farmland, cause urban waterlogging, and even cause casualties. The frequency and severity of heavy rainfall disasters vary depending on regional climatic conditions and are particularly common in mountainous areas with complex terrain.
[0003] China's railway system is developing rapidly, but the increased speed of high-speed rail inevitably leads to more severe railway disasters. In terms of meteorology, heavy rainfall, strong winds, heavy snow, and lightning all pose a significant threat to normal train operations. Therefore, it is crucial to study the characteristics of heavy rainfall disasters along railway lines, explore the evolution of surrounding natural disasters, and provide timely risk warnings. This will enable people to effectively avoid disasters and ensure the safety of passengers.
[0004] Heavy rainfall generally shows obvious harmonics and nonlinearity. The harmonic characteristics reflect the seasonal or periodic changes of rainfall, while the nonlinear characteristics are caused by the complexity of the weather system. In the field of heavy rainfall prediction, traditional models are already difficult to predict accurately. Therefore, the use of models that can capture harmonics and nonlinear characteristics (such as VMD decomposition, Hilbert transform, etc.) is very critical in rainfall prediction. These models can effectively extract patterns at different time scales, thereby improving the accuracy of the prediction. At the same time, hybrid models and methods such as metaheuristic algorithm optimization have also been widely used in time series prediction of various data in recent years, which has greatly improved the disadvantages of low prediction accuracy of traditional models. Among them, the optimization of parameters by metaheuristic algorithms is also an important factor in improving prediction robustness. Based on this, the present invention designs a railway rainfall warning method based on VMD-PSO-LSTM. Summary of the Invention
[0005] The purpose of the present invention is to solve the problems in the prior art and propose a rainfall early warning method along the railway based on VMD-PSO-LSTM.
[0006] In response to the above problems, the purpose of the present invention is to provide a rainfall warning method along the railway based on VMD-PSO-LSTM, which combines modal decomposition technology, metaheuristic algorithm and neural network to obtain a combined prediction model that can accurately predict the magnitude of future heavy rainfall.
[0007] Technical solution: A railway rainfall warning method based on VMD-PSO-LSTM includes the following steps:
[0008] Step S1: Obtain monthly rainfall data measured by meteorological stations along the railway and perform preprocessing.
[0009] Step S2: Determine the number k of VMD decompositions and decompose the monthly rainfall data to obtain k intrinsic mode functions (IMFs).
[0010] Step S3: For each IMF sequence, the PSO algorithm is used to optimize the parameters of the LSTM model.
[0011] Step S4: Use the PSO-LSTM optimization model to train and predict the IMF sequence respectively.
[0012] Step S5: The sequence obtained by superimposing k predicted values is the prediction result of the original rainfall sequence.
[0013] Step S6: Root mean square error (RMSE) and coefficient of determination (R 2 Score) is used as the evaluation indicator.
[0014] Step S7: Use the trained VMD-PSO-LSTM model to predict the rainfall at each meteorological station in the next year.
[0015] Step S8: Based on the predicted value, the natural breakpoint method is used to classify the risk of heavy rainfall disasters on the entire line and issue an early warning.
[0016] Furthermore, in step S1, the monthly rainfall data is provided by the Beijing Research Institute of Railway Sciences in the form of a csv file.
[0017] Furthermore, in step S2, the mathematical model of VMD decomposition of monthly rainfall series is:
[0018]
[0019] Where w k is the center frequency of the kth modal component, δ(t) is the unit pulse function, f is the original sequence, {u k}={u1…u k}; {w k}={w1…w k}.
[0020] The value of k is determined by comparing the entropy of IMF samples under different k values.
[0021] Furthermore, in step S3, the specific steps are as follows:
[0022] S31: Set the PSO algorithm parameters: number of particles, search dimension, position and speed of all particles, best position experienced by individuals and global best position, and historical best fitness value of each individual;
[0023] S32: Establish k PSO-LSTM models;
[0024] S33: In each PSO-LSTM model, the “batch size” and “number of training rounds” are optimized so that the position X of each particle in the PSO i =[x i1 ,x i2 ] corresponds to the LSTM hyperparameters (batch size and number of training rounds), and the speed is V i =[v i1 ,v i2 ]. The particle update follows formulas 2 and 3:
[0025]
[0026] Where ω is the inertia weight, which controls the balance between exploration and development of the particle; c1 and c2 are acceleration factors, which guide the particle to its historical optimal position. and the global optimal position g t Close; r1, r2~U(0,1) are random factors.
[0027] Furthermore, in step S6, the root mean square error (RMSE) and the coefficient of determination (R 2 The calculation formulas for Score are:
[0028]
[0029] Where:
[0030] The beneficial effects of the present invention are as follows: through VMD decomposition, the original rainfall sequence is broken down into multiple sub-components with different frequencies and characteristics, making the temporal characteristics of each component clearer, thereby improving the accuracy of the overall prediction. At the same time, LSTM, with its powerful nonlinear modeling capabilities and ability to capture long-term and short-term dependencies, can fully exploit the dynamic characteristics of the signal when combined with the decomposed sub-sequences, further enhancing the prediction effect. In addition, particle swarm optimization (PSO) automatically optimizes LSTM hyperparameters through global search, which not only reduces the workload of manual parameter adjustment, but also effectively avoids the impact of suboptimal parameters on model performance, enabling the model to achieve better prediction performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] Figure 1 This is a flowchart of rainfall warning along the railway based on VMD-PSO-LSTM.
[0032] Figure 2 It is a line graph of the average sample entropy of IMF under different k values.
[0033] Figure 3 It is the VMD decomposition diagram of the monthly rainfall series.
[0034] Figure 4 This is a schematic diagram of the spectrum inspection mode for rainfall warning along the railway based on VMD-PSO-LSTM.
[0035] Figure 5 It is the prediction graph of the combined model after superimposing the sub-modal prediction values.
[0036] Figure 6 It is a map of the railway trends and weather station distribution in a certain place. DETAILED DESCRIPTION
[0037] Reference Figure 1-6 ,A rainfall early warning method along railway based ,VMD-PSO-LSTM,
[0038] For the convenience of description, the railway line will be analyzed by taking a certain railway as an example.
[0039] Step S1: Obtain monthly rainfall data measured by meteorological stations along the railway and perform preprocessing.
[0040] Step S2: Determine the number k of VMD decompositions and decompose the monthly rainfall data to obtain k IMF series.
[0041] Step S3: The value of k is determined by comparing the IMF sample entropy under different k values. Calculating the sample entropy is a statistical method used to measure the complexity and disorder of time series. Sample entropy quantitatively describes the regularity and self-similarity between data points in a time series. The larger the sample entropy value, the more complex or disordered the sequence is; conversely, the smaller the sample entropy value, the simpler or more regular the sequence is. The average sample entropy of each IMF under different k values is as follows: Figure 2 shown.
[0042] The selection of the k value must adhere to the principle of "ensuring that the sample entropy is small while the k value is not too large." Considering the ease of subsequent prediction using the LSTM model, when the broken line shows a significant change in curvature at a certain k value, the previous value is selected as the critical value. Therefore, the most suitable k value is 6.
[0043] The specific implementation parameter values of VMD are shown in Table 1.
[0044] Table 1 VMD parameter values
[0045]
[0046] like Figure 3 As shown in the figure, the monthly rainfall series is decomposed into six IMF components and one residual series. Among them, IMF1 to IMF6 all have certain periodicity. After calculation, the Peel correlation coefficient between IMF2 and the original series is the highest, which is 0.51, indicating that it is the main model of rainfall in the region. The rainfall in most periods can conform to the trend of this component. Figure 4 The diagram below shows the mode diagram of the spectrum inspection of the sequence after decomposition. It can be seen that the spectrum range of each mode is clearly separated, and there is no frequency band overlap, which shows that the decomposition effect is good and the parameter setting is appropriate.
[0047] Step S3: For each IMF sequence, the PSO algorithm is used to optimize the parameters of the LSTM model.
[0048] S31: Establish k PSO-LSTM models
[0049] S32: Set the PSO algorithm parameters: number of particles, search dimension, position and speed of all particles, best position experienced by individuals and global best position, and historical best fitness value of each individual;
[0050] S33: Let each particle in PSO represent a solution, and its position X i =[x i1 ,x i2 ] corresponds to the LSTM hyperparameters (batch size and number of training rounds), and the speed is V i =[v i1 ,v i2 ]. The particles follow the following update formula:
[0051]
[0052] In each iteration, the particles train the LSTM network based on the current hyperparameter configuration and evaluate the fitness using the loss function. The particles adjust their speed and position using the above formula, gradually converging to the global optimal solution.
[0053] Step S4: Optimize and train the parameters of the PSO-LSTM model for each IMF sub-mode after VMD decomposition. Set the population size of the PSO algorithm to 10, the maximum number of iterations to 5, the optimization target parameter "batch size" (batch_size) to a range of 1-100, the "number of training rounds" (epochs) to a range of 1-50, and the initial learning rate to 0.001.
[0054] Table 2 shows the most appropriate batch size and number of training rounds required for the sub-modalities obtained after the PSO algorithm is optimized. The number of neurons in the other two hidden layers is set to 50.
[0055] Table 2 LSTM parameters determined by PSO algorithm
[0056]
[0057] Step S5: The sequence obtained by superimposing k predicted values is the prediction result of the original rainfall sequence.
[0058] The prediction of the combined model after superposition is as follows Figure 5 As shown in the figure, although the average value of the original rainfall series fluctuates significantly and the periodic distribution is ambiguous, the forecast results closely match the true values. The forecast curve not only closely follows the actual data in terms of overall trend, but also remains nearly consistent with the observed values in details such as the distribution, shape, and direction of burrs. This demonstrates that the VMD-PSO-LSTM combined model demonstrates excellent forecasting capabilities and accuracy when processing this complex, nonlinear, and highly volatile rainfall time series data.
[0059] Step S6: Root mean square error (RMSE) and coefficient of determination (R 2 Score) as the evaluation index, RMSE and R 2 The smaller the Score value, the higher the prediction accuracy. 2 The score values were calculated to be 33.51 and 0.91 respectively.
[0060] Step S7: Use the trained VMD-PSO-LSTM model to predict the rainfall at each meteorological station in the next year.
[0061] like Figure 6 Shown is a map of railway lines and meteorological stations in a certain region. Many of these stations pass through tropical monsoon climate zones with abundant rainfall. The area along the line is mostly mountainous, making natural disasters frequent. Meteorological stations are represented by gray dots in the image.
[0062] A univariate VMD-PSO-LSTM open-loop model was used for short-term forecasting. The regional disaster risk index was evaluated using the natural breakpoint method: the entire route was divided into several sections based on topographic features. The risk of heavy rainfall disasters was then determined based on predicted rainfall data. The risk indicators were primarily based on the monthly maximum and average rainfall. Table 4 shows the 11 station numbers and forecast results.
[0063] Table 4 Precipitation forecast for stations along a certain railway line
[0064]
[0065] Step S8: Based on the predicted values, the natural breakpoint method is used to classify the risk of heavy rainfall disasters along the entire line and issue a warning: The prediction results show that the average monthly rainfall at the four stations 115055, 151291, 210499, and 42640 has reached more than 120, and the highest rainfall also constitutes the conditions for the formation of disasters such as mudslides and floods. The surrounding areas have become high-risk disaster areas, and it is recommended that the local government establish better early warning and rescue facilities.
[0066] It is understood from common technical knowledge that the present invention may be implemented by other embodiments that do not depart from its spirit or essential features. Therefore, the embodiments disclosed above are, in all respects, merely illustrative and not exclusive. All modifications within the scope of the present invention or equivalent to the scope of the present invention are intended to be encompassed by the present invention.
Claims
1. A rainfall warning method along railways based on VMD-PSO-LSTM, characterized by: The steps include: S1: Obtain monthly rainfall data measured by meteorological stations along the railway and perform preprocessing; S2: Determine the number of VMD decompositions k and decompose the monthly rainfall data to obtain k IMF series; S3: For each IMF sequence, the PSO algorithm is used to optimize the parameters of the LSTM model; S4: Use the PSO-LSTM optimization model to train and predict the IMF series respectively; S5: The sequence obtained by superimposing k predicted values is the prediction result of the original rainfall sequence.
2. The railway rainfall early warning method based on VMD-PSO-LSTM according to claim 1 is characterized in that: In step S2, the mathematical model of VMD decomposition of monthly rainfall series is: Where w k is the center frequency of the kth modal component, δ(t) is the unit pulse function, f is the original sequence, {u k }={u1…u k };{w k }={w1…w k }. The value of k is determined by comparing the entropy of IMF samples under different k values.
3. The railway rainfall early warning method based on VMD-PSO-LSTM according to claim 1 is characterized in that: Step S3 further includes: S31: Set the PSO algorithm parameters: number of particles, search dimension, position and speed of all particles, best position experienced by individuals and global best position, and historical best fitness value of each individual; S32: Establish k PSO-LSTM models; S33: Take the LSTM hyperparameters "batch size" and "number of training rounds" as optimization objects, so that the position X of each particle in PSO i =[x i1 ,x i2 ] corresponds to "batch size" and "number of training rounds", and the speed is V i =[v i1 ,v i2 ], the particle update follows formulas 2 and 3: Where ω is the inertia weight, which controls the balance between exploration and development of the particle; c1 and c2 are acceleration factors, which guide the particle to its historical optimal position. and the global optimal position g t Close; r1, r2~U(0,1) are random factors.
4. The railway rainfall early warning method based on VMD-PSO-LSTM according to claim 1 is characterized in that: The method further comprises step S6: using the root mean square error RMSE and the determination coefficient R 2 Score is used as the evaluation indicator, RMSE and R 2 The smaller the Score value, the higher the prediction accuracy.
5. The railway rainfall early warning method based on VMD-PSO-LSTM according to claim 1 is characterized in that: In step S6, the coefficient of determination is a measure of the model's ability to explain data changes. Its range is (-∞,1]. The closer its value is to 1, the better the model fitting effect is. The calculation formulas are shown in Equations (4) and (5).
6. The railway rainfall early warning method based on VMD-PSO-LSTM according to claim 1 is characterized in that: The method also includes step S7: using the trained VMD-PSO-LSTM model to predict the rainfall at each meteorological station in the future.
7. The railway rainfall early warning method based on VMD-PSO-LSTM according to claim 1 is characterized in that: The early warning method also includes step S8: based on the predicted value, using the natural breakpoint method to classify the risk of heavy rainfall disasters on the entire line and issue an early warning.