ASF prediction method and system based on LSTM and RF fusion model
Through the ASF prediction method of dynamically adjusting weights through the LSTM and RF fusion model, the problem of low positioning accuracy of eLoran system in complex environments is solved, and high-precision and stable ASF prediction is achieved, which is suitable for real-time navigation tasks.
Patent Information
- Application Number
- CN202510464443.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-08-08
AI Technical Summary
The existing eLoran system has low positioning accuracy in complex environments, especially affected by multipath effect, ionosphere disturbance and meteorological conditions, making it difficult to accurately predict ASF values, affecting navigation accuracy.
ASF prediction method based on LSTM and RF fusion models is adopted, and the model weight is dynamically adjusted, combined with the timing model modeling ability of LSTM and the characteristic robustness of RF, the model fusion effect is optimized in real time, and the ASF prediction accuracy and stability are improved.
It realizes high accuracy and stability of ASF prediction in complex scenarios, is suitable for tasks with high real-time requirements, can dynamically adjust the contribution of the model and improve the system navigation accuracy and reliability.
Smart Images

Figure CN120449081A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of radio navigation technology, and in particular to an ASF prediction method and system based on an LSTM and RF fusion model. Background Art
[0002] eLoran (Enhanced Long Range Navigation) is a terrestrial broadcast-based radio navigation system and an enhanced version of the traditional Loran-C system. Unlike satellite navigation systems (such as the Global Positioning System (GPS) and the GLONASS satellite navigation system), eLoran provides positioning and navigation services to users at sea, on land, and in the air via longwave signals transmitted from ground-based base stations. Its low signal frequency (typically 100kHz) offers strong penetration and wide coverage, capable of penetrating some ground and ocean layers. This complements the limitations of GNSS signals in dense obstructions, inclement weather, or interference.
[0003] The eLoran system is particularly suitable for positioning and navigation applications in areas where GNSS (Global Navigation Satellite System) signals are difficult to cover or interfere with. Due to its strong anti-interference capabilities, eLoran has been listed as a backup solution for GNSS systems to improve the security of critical infrastructure. However, the eLoran system also faces its own challenges, such as lower positioning accuracy than GNSS. Especially in complex maritime environments, eLoran's positioning accuracy is easily affected by multipath effects, ionospheric disturbances, and meteorological conditions. Compared with satellite navigation systems such as GPS, the eLoran system has stronger anti-interference capabilities and higher reliability, especially showing obvious advantages in complex environments such as urban canyons, indoors, and underground.
[0004] In the eLoran system, the Additional Secondary Phase Factor (ASF) value is one of the key factors affecting positioning accuracy. ASF is a core performance metric in the eLoran system, representing the system's adaptability to varying environmental conditions. In practical applications, the signal quality and stability of the eLoran system are affected by a variety of factors, such as weather changes, terrain undulations, and device technical limitations. These factors can lead to reduced navigation accuracy, making dynamic prediction of these factors particularly important.
[0005] In this context, establishing an ASF prediction model can proactively identify potential signal degradation issues, enabling the eLoran system to adjust parameters in real time, improving navigation accuracy and reliability. Predicting ASF allows the system to react promptly and optimize navigation signals, ensuring optimal operation. Therefore, accurately predicting ASF has become a critical issue that needs to be addressed. Summary of the Invention
[0006] The present invention provides an ASF prediction method and system based on an LSTM and RF fusion model, which are used to solve the defects of the existing technology in requiring accurate ASF prediction and realize accurate ASF prediction based on the LSTM and RF fusion model.
[0007] The present invention provides an ASF prediction method based on an LSTM and RF fusion model, comprising:
[0008] Determine the allocation weight of the LSTM model at the current moment according to the prediction error corresponding to the pre-trained LSTM model at the current moment, and determine the allocation weight of the RF model at the current moment according to the prediction error corresponding to the pre-trained RF model at the current moment;
[0009] Inputting the feature data of the eLoran system at the current moment into the LSTM model and the RF model respectively, to obtain the ASF prediction values output by the LSTM model and the RF model;
[0010] According to the allocated weights of the LSTM model and the RF model at the current moment, the ASF prediction values output by the LSTM model and the RF model are weighted and added to obtain the final ASF prediction value.
[0011] The present invention also provides an ASF prediction system based on an LSTM and RF fusion model, comprising:
[0012] An allocation module, configured to determine an allocation weight of the LSTM model at the current moment according to the prediction error corresponding to the pre-trained LSTM model at the current moment, and to determine an allocation weight of the RF model at the current moment according to the prediction error corresponding to the pre-trained RF model at the current moment;
[0013] A prediction module is used to input the feature data of the eLoran system at the current moment into the LSTM model and the RF model respectively, to obtain the ASF prediction values output by the LSTM model and the RF model;
[0014] A fusion module is used to add the weighted ASF prediction values output by the LSTM model and the RF model according to the allocated weights of the LSTM model and the RF model at the current moment to obtain a final ASF prediction value.
[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and runnable on the processor. When the processor executes the program, an ASF prediction method based on the LSTM and RF fusion model as described above is implemented.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described ASF prediction methods based on the LSTM and RF fusion models.
[0017] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned ASF prediction methods based on the LSTM and RF fusion model.
[0018] The ASF prediction method and system based on the LSTM and RF fusion model provided by the present invention determines the contribution of each model in the prediction according to the prediction errors of the LSTM model and the RF model at each moment, thereby dynamically adjusting the allocation weight of each model in real time according to the changes in the prediction error. By combining the time series modeling capability of the LSTM model with the feature robustness of the random forest model, it is possible to dynamically optimize the model fusion effect according to the actual performance of the model, thereby improving the accuracy and stability of ASF prediction in complex scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 It is a flowchart of the ASF prediction method based on the LSTM and RF fusion model provided by the present invention;
[0021] Figure 2 This is a schematic diagram of the real sequences of ASF1 and ASF2 in the dataset of the ASF prediction method based on the LSTM and RF fusion model provided by the present invention;
[0022] Figure 3 It is a schematic diagram of the normalized sequences of ASF1 and ASF2 in the dataset of the ASF prediction method based on the LSTM and RF fusion model provided by the present invention;
[0023] Figure 4It is a block diagram of the design of a dynamic weight fusion model and parameter configuration in the ASF prediction method based on the LSTM and RF fusion model provided by the present invention;
[0024] Figure 5 This is a schematic diagram of prediction comparison in the ASF prediction method based on the LSTM and RF fusion model provided by the present invention;
[0025] Figure 6 It is a schematic diagram of dynamic weight changes in the ASF prediction method based on the LSTM and RF fusion model provided by the present invention;
[0026] Figure 7 It is a structural diagram of the ASF prediction system based on the LSTM and RF fusion model provided by the present invention. DETAILED DESCRIPTION
[0027] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0028] The following combination Figure 1 The present invention describes an ASF prediction method based on a fusion model of LSTM (Long Short-Term Memory) and RF (Random Forest), including:
[0029] Step 101: determining the allocation weight of the LSTM model at the current moment based on the prediction error corresponding to the pre-trained LSTM model at the current moment, and determining the allocation weight of the RF model at the current moment based on the prediction error corresponding to the pre-trained RF model at the current moment;
[0030] Step 102: Input the current feature data of the eLoran system into the LSTM model and the RF model respectively to obtain the ASF prediction values output by the LSTM model and the RF model;
[0031] Step 103: According to the current weights of the LSTM model and the RF model, the ASF prediction values output by the LSTM model and the RF model are weighted and added to obtain a final ASF prediction value.
[0032] The prediction errors of the two models can be determined based on the prediction error indicators of the LSTM model and the RF model at each moment, such as the mean absolute error (MAE).
[0033] The current characteristic data of the eLoran system can be derived from the system's actual marine measurement data. This data mainly includes signal strength, signal-to-noise ratio, positioning accuracy, GNSS (Global Navigation Satellite System) positioning data, and the timestamp of the data collection time. After preprocessing the characteristic data, it is used to predict the ASF value.
[0034] The overall implementation process of this embodiment is as follows:
[0035] (1) Base model training stage:
[0036] Use historical data to train LSTM and random forest models independently;
[0037] Generate prediction sequence on the validation set and
[0038] (2) Dynamic weight optimization stage:
[0039] Select a dynamic strategy based on the application scenario. Dynamic strategies include sliding window and online learning.
[0040] The allocation weights of the LSTM model and the RF model are determined based on their prediction errors.
[0041] (3) Real-time prediction stage:
[0042] For time t, get the prediction results of the base model
[0043] Calculating dynamic weights
[0044] Output the final ASF prediction value:
[0045] This embodiment is verified using a piece of experimental data and compares five different prediction models: multiple linear regression (Physical), long short-term memory network (LSTM), random forest (RF), fusion model (Fusion) and dynamic weight model (DW). The experimental results show that the DW model maintains high computational efficiency while improving prediction accuracy, and is particularly suitable for tasks with high real-time requirements. The LSTM model can better capture the temporal dependencies in the data, but the computational overhead is large; the Fusion model improves prediction accuracy by combining the advantages of LSTM and RF, but the training time is long. The DW model dynamically adjusts the weights of LSTM and RF to flexibly respond to different data characteristics, further improving the prediction effect and significantly improving computational efficiency. Especially in the prediction of the ASF2 dataset, the DW model performed well, providing a high-precision and efficient solution.
[0046] In summary, the DW model offers many significant advantages. First, it boasts efficient computing power, with an extremely short training time of just 0.02 seconds, far exceeding other complex models and making it suitable for tasks requiring high real-time performance. Second, the DW model boasts high prediction accuracy, performing exceptionally well on both the ASF1 and ASF2 datasets, effectively fitting the data and capturing its inherent trends. Furthermore, the DW model dynamically adjusts weights, flexibly adjusting the contributions of the LSTM and random forest models based on the model's performance at each moment, thereby improving overall prediction performance. This dynamic adjustment mechanism makes the DW model more flexible in handling diverse data characteristics and further optimizes prediction results. Finally, the DW model has demonstrated significant value in practical applications, particularly in the eLoran system, where it can adjust signal transmission power based on predicted ASF values, select optimal signal paths, adjust navigation accuracy requirements in real time, and provide fault prediction and early warning, demonstrating broad application prospects. In summary, the DW model, with its efficiency, high accuracy, and flexibility, is an excellent choice for time series prediction tasks, particularly for applications requiring high real-time performance and accuracy.
[0047] This embodiment determines the contribution of each model to the prediction based on the prediction errors of the LSTM model and the RF model at each moment, thereby dynamically adjusting the allocation weight of each model in real time according to changes in the prediction error. By combining the time series modeling capabilities of the LSTM model with the feature robustness of the random forest model, the model fusion effect can be dynamically optimized based on the actual performance of the model. This is particularly suitable for situations where one model performs better in certain time periods and the other model performs better in other time periods, thereby improving the accuracy and stability of ASF prediction in complex scenarios.
[0048] On the basis of the above embodiment, in this embodiment, the allocation weight of the LSTM model at the current moment is determined according to the prediction error corresponding to the pre-trained LSTM model at the current moment, and the allocation weight of the RF model at the current moment is determined according to the prediction error corresponding to the pre-trained RF model at the current moment by the following formula:
[0049]
[0050] in, is the weight assigned to the LSTM model at time t, is the distribution weight of the RF model at time t, is the prediction error corresponding to the LSTM model at time t, is the prediction error corresponding to the RF model at the current moment.
[0051] On the basis of the above embodiment, before determining the allocation weight of the LSTM model at the current moment according to the prediction error corresponding to the pre-trained LSTM model at the current moment and determining the allocation weight of the RF model at the current moment according to the prediction error corresponding to the pre-trained RF model at the current moment, this embodiment further includes:
[0052] Inputting the characteristic data of the eLoran system at each moment in a time window before the current moment into the LSTM model and the RF model, and obtaining the ASF prediction value at each moment output by the LSTM model and the RF model;
[0053] Determine the allocation weight of the LSTM model at the current moment according to the mean absolute error between the ASF predicted value and the ASF actual value at each moment output by the LSTM model;
[0054] The allocation weight of the RF model at the current moment is determined according to the mean absolute error between the ASF predicted value and the ASF actual value at each moment output by the RF model.
[0055] Based on the above embodiment, the prediction errors corresponding to the LSTM model and the RF model at the current moment in this embodiment are calculated using the following formula:
[0056]
[0057] in, is the prediction error corresponding to the LSTM model at time t, is the prediction error corresponding to the RF model at time t, T w is the time window length, and The ASF prediction values obtained by inputting the feature data of the i-th moment in the time window before time t into the LSTM model and the RF model, y i is the actual ASF value of the eLoran system at the i-th moment.
[0058] In this embodiment, the process of determining the allocation weights of the LSTM model and the RF model based on the prediction errors of the LSTM model and the RF model includes:
[0059] (1) Input: Historical data D train , verification window length T w , base models (LSTM and random forest).
[0060] (2) Initialization:
[0061] Training base model: M lstm ←LSTM(D train ),M rf ←RandomForest(D train );
[0062] Initial weight Determined via validation set grid search.
[0063] (3) Sliding update:
[0064] For each time window t=1,2,...:
[0065] (a) Get new data window
[0066] (b) Calculate the prediction error:
[0067]
[0068] (c) Update weights:
[0069]
[0070] (4) Output: Dynamic weight sequence
[0071] Features: Balance computational efficiency and model adaptability through regular local reoptimization.
[0072] The process of preprocessing historical data includes:
[0073] (1) Data cleaning
[0074] Check for missing values: Use linear interpolation to fill missing values. Remove data segments with more than 10 consecutive missing values.
[0075] Outlier removal: Based on the 3σ principle, data points outside the mean ±3 standard deviations are removed. Extreme outliers (such as signal strength of 0 or negative signal-to-noise ratio) are directly removed.
[0076] (2) Data alignment
[0077] Align the station field strength, signal-to-noise ratio, packet cycle difference, signal arrival time, ASF1, and ASF2 data by timestamp to ensure data consistency in the temporal dimension. For data with mismatched timestamps, use the nearest neighbor interpolation method for alignment. ASF1 and ASF2 are the target variables for prediction.
[0078] (3) Normalization
[0079] The difference in the dimensions (units) of different features will lead to an imbalance in the distribution of model weights. Z-Score maps features to a unified scale (mean 0, standard deviation 1) through standardization, eliminating the interference of dimensional differences on model training. Therefore, Z-Score standardization is performed on all features, the formula is:
[0080]
[0081] Where x is the original data value; μ is the mean of the data set; σ is the standard deviation of the data set; and z is the normalized value. After normalization, all feature values range from 0 to 1. Figure 2 and Figure 3 Comparison chart of ASF1 and ASF2 before and after normalization.
[0082] Through descriptive analysis of the data, it was found that the ASF values fluctuated within a certain range, but most of the data were concentrated in a specific interval. During the data cleaning stage, the data were first processed for missing values. There was a small amount of missing data in the ASF1 and ASF2 columns (149 and 164 records, respectively), and linear interpolation was used to fill the missing values. In addition, for outliers (detected by the Z-score method), outliers exceeding 3 times the standard deviation were corrected and replaced with near-normal values. At the same time, in order to eliminate the influence of different feature dimensions, all features were Z-score standardized. For each feature, its mean was subtracted and divided by the standard deviation so that each feature had the same scale, thereby ensuring that the model training process would not be affected by differences in the feature value range.
[0083] Based on the above embodiment, this embodiment also includes:
[0084] Determining an objective function based on the prediction losses of the LSTM model and the RF model;
[0085] The allocation weights of the LSTM model and the RF model at the current moment are updated so that the objective function is minimized.
[0086] Based on the above embodiment, in this embodiment, the weights of the model are optimized by online gradient descent:
[0087] (1) Mathematical formalization: Dynamic weight optimization is defined as a constrained online learning problem, and the objective function is to minimize the cumulative prediction loss. The formula is:
[0088]
[0089] stw1+w2=1,w1≥0,w2≥0
[0090] Where T is the time window length, and The ASF prediction values obtained by inputting the feature data of the kth moment in the time window before the current moment into the LSTM model and the RF model, y k is the actual ASF value of the eLoran system at the kth moment, w1 and w2 are the allocation weights of the LSTM model and RF model respectively;
[0091] (2) Update the allocation weights of the LSTM model and the RF model:
[0092] (a) Initialize weights:
[0093] (b) For each time step k=1,...,K:
[0094] ① Receive the predicted value of the base model
[0095] ②Calculate the fusion prediction value:
[0096] ③Calculate the gradient:
[0097] ④Update weights:
[0098] ⑤Projection to the feasible region:
[0099]
[0100] Where S = {(w1,w2)|w1+w2=1,w i ≥0}, is the ASF fusion value, and are the allocation weights corresponding to the LSTM model and the RF model at the kth moment respectively; and are the gradients of w1 and w2 respectively; and are the weights assigned to the LSTM model and the RF model at the k+1th moment, η is the learning rate, Proj s Indicates that and Project to the feasible region S.
[0101] (3) Parameter setting: The learning rate η is selected through cross-validation, and the recommended initial value η = 0.01.
[0102] Based on the above embodiment, this embodiment further includes: before weighting and adding the ASF prediction values output by the LSTM model and the RF model according to the allocated weights of the LSTM model and the RF model at the current moment to obtain the final ASF prediction value:
[0103] Combining the allocation weight of the LSTM model at the current moment with the allocation weight at the previous moment through a smoothing factor, and constraining the combined weight to be within a preset value range;
[0104] The allocation weight of the RF model at the current moment and the allocation weight at the previous moment are combined through a smoothing factor, and the combined weight is constrained within a preset value range.
[0105] By setting the smoothing factor, the model can balance computational efficiency and prediction accuracy. Compared with relying on fixed weights of a single model, the dynamic weight model provides a more flexible and adaptable prediction method, which is suitable for situations where patterns and errors in time series data change over time. The dynamic weight fusion model design and parameter configuration block diagram is shown in the figure. Figure 4 shown.
[0106] The dataset used in this study contains 20 features and two target variables. Data preprocessing steps involved separating the features and target variables into a training set (70%), a validation set (15%), and a test set (15%), all in chronological order. The feature and target data were converted to a format suitable for model training, and appropriate training and evaluation steps were designed for each model.
[0107] This study designed five prediction models: multiple linear regression (Physical), long short-term memory network (LSTM), random forest (RF), fusion model (Fusion) and dynamic weight model (DW) for comparison.
[0108] The multivariate linear regression model is used to establish a linear relationship between input features and the target variable. Training is performed using the MATLAB fitlm function, with evaluation criteria including mean squared error (MSE), mean absolute error (MAE), and correlation coefficient (R). This model trains quickly but performs poorly for complex time series data.
[0109] The LSTM model is a deep learning model based on recurrent neural networks (RNNs) and is suitable for modeling and predicting sequence data. In this study, LSTM was used to model time series data and predict the target variable.
[0110] (1) Model structure:
[0111] a) Input layer: receives time series data with 20 features.
[0112] b) LSTM layer: An LSTM layer with 128 units is used to process time series information.
[0113] c) Dropout layer: To prevent overfitting, set to 0.3.
[0114] d) Fully connected layer: outputs a single prediction value.
[0115] e) Regression layer: used for regression tasks and outputs continuous values.
[0116] (2) Training configuration:
[0117] a) Optimizer: Adam optimizer.
[0118] b) Maximum training cycle: 100 rounds.
[0119] c) Validation data: Use the validation set for validation.
[0120] d) Batch size: adaptive.
[0121] Random forest is an ensemble learning method that builds predictions by building multiple regression trees. This article uses a random forest model with 200 trees and enables out-of-bag (OOB) predictions to avoid overfitting. This model performs well when dealing with nonlinear relationships.
[0122] The fusion model combines the deep learning features of LSTM and the ensemble learning advantages of random forest. LSTM is used to extract features, and random forest is used for regression prediction.
[0123] (1) Model structure:
[0124] LSTM layer: Same as the above LSTM model.
[0125] Random Forest: A random forest regression model is trained on the features extracted by LSTM.
[0126] (2) Training process:
[0127] a) Train an LSTM model to extract features.
[0128] b) Train a random forest regression model on the features extracted by LSTM for prediction.
[0129] The Dynamic Weight model (DW) combines the advantages of LSTM and Random Forest (RF) models by dynamically adjusting the weights of the fused predictions. Its key idea is to determine the contribution of each model to the prediction based on its performance at each moment (typically measured by error metrics such as MAE). Specifically, this model dynamically adjusts the weight of each model based on the change in error (particularly the mean absolute error (MAE) of each model), thereby improving the accuracy of the final prediction.
[0130] (1) Error calculation: At each time step, the MAE (Mean Absolute Error) of the LSTM and RF models is calculated. MAE reflects the average difference between the predicted value and the true value. Generally, the model with smaller error is given a higher weight.
[0131] (2) Weight update: By comparing the MAE of the LSTM and RF models, the weight of each model is dynamically calculated. The specific formula is as follows:
[0132]
[0133] Among them, w new is the new weight. MAE LSTM and MAE RF are the mean absolute errors of LSTM and RF models respectively.
[0134] (3) Exponentially Weighted Moving Average (EWMA): To avoid drastic fluctuations in model weights, an exponentially weighted moving average (EWMA) is used to smooth changes in weights. The smoothing factor is used to control the combination of the current weight and the weight at the previous moment. The update formula is as follows:
[0135] w t =α·w+(1-α)·w previous
[0136] Among them, w t is the weight of the current time step; α is the smoothing factor, whose value is between 0 and 1; w previous is the weight at the previous moment.
[0137] (4) Weight constraint: In order to avoid excessive weight changes or a model taking up too much weight, constraints are used to limit the range of weight values. For example, the minimum weight value is set to 0.2 and the maximum weight is set to 0.8, that is, 0.2≤w t ≤0.8.
[0138] Final prediction: Based on the calculated weights, the prediction values of LSTM and RF are combined to generate the final fusion prediction value:
[0139]
[0140] in, is the final predicted value; y LSTM and y RF are the predicted values of LSTM and RF.
[0141] (5) Smoothing Factor (α\alphaα):
[0142] Controls the smoothness of the current weight relative to the previous weight. A higher α value (e.g., close to 1) makes the current weight more dependent on the most recently calculated weight, resulting in more drastic weight adjustments; a lower α value (e.g., close to 0) makes weight changes more stable. This article sets this value between 0.1 and 0.3, adjusting it based on experimental results to balance model stability and responsiveness to error fluctuations.
[0143] (6) Window Size:
[0144] The window size is adjusted according to the characteristics of the time series. A larger window can smooth out fluctuations, while a smaller window can reflect changes more sensitively.
[0145] (7)Weight Constraints:
[0146] Ensure that the weights vary within a reasonable range to avoid overweighting one model or underweighting the other, which can lead to unstable predictions. In this article, we set the minimum value to 0.2 and the maximum value to 0.8 to ensure that the contributions of the two models are relatively balanced.
[0147] In a dynamic weight model, by adjusting the weights of each sub-model in real time, the advantages of both LSTM and RF models are combined, dynamically optimizing the model fusion effect based on actual performance. This approach is particularly suitable for situations where one model performs better in certain periods of time, while another performs better in other periods.
[0148] By setting a smoothing factor, the model can balance computational efficiency and forecast accuracy. Compared to relying solely on a model's fixed weights, dynamic weight models provide a more flexible and adaptable forecasting approach, suitable for situations where patterns and errors in time series data change over time.
[0149] In this study, the performance of five different prediction models was evaluated on ELORAN system time series data. By comparing a physical model (Physical), a long short-term memory network (LSTM), a random forest (RF), a fusion model (Fusion), and a dynamic weight model (DW), multiple evaluation metrics were used, including mean squared error (MSE), mean absolute error (MAE), correlation coefficient (R), and training time (Time). Furthermore, to further demonstrate model performance, plots comparing each model's predictions to the true values were presented, along with visualizations of the dynamic weight changes in the LSTM model.
[0150] According to the experimental results, the prediction results are shown in Table 1 and Table 2.
[0151] Table 1 ASF1 prediction accuracy comparison table
[0152] Row Physical LSTM RF Fusion DW MAE 30.20 0.73 0.47 0.50 0.46 R 0.13 0.44 0.68 0.69 0.73 Time 0.06 73.91 7.28 99.76 0.02
[0153] Table 2 ASF2 prediction accuracy comparison table
[0154] Row Physical LSTM RF Fusion DW MSE 37.62 0.84 0.34 0.24 0.23 MAE 0.95 0.37 0.25 0.25 0.26 R 0.16 0.61 0.79 0.84 0.87 Time 0.06 73.91 7.28 99.76 0.02
[0155] The table lists the evaluation indicators of each model on ASF1 and ASF2. First, the physical model (Physical) has poor prediction results on all target variables. In particular, on the ASF1 dataset, the mean square error (MSE) of the physical model is as high as 168265.57, and the correlation coefficient (R) is only 0.13, indicating that the model has a poor fitting effect and cannot capture the effective patterns in the data. On the ASF2 dataset, although the MSE has improved slightly, decreasing to 37.62, it still performs poorly compared to other models and fails to achieve high prediction accuracy. In summary, although the physical model has high computational efficiency, it fails to effectively meet the needs of practical applications in terms of prediction accuracy.
[0156] The LSTM model demonstrates advantages in processing time series data, effectively capturing long-term dependencies. On the ASF1 dataset, the LSTM model achieved an MSE of 2.21, a MAE of 0.73, and a correlation coefficient (R) of 0.44. While these improvements compare favorably to the physical model, they still exhibit some error and instability. On the ASF2 dataset, the LSTM model's MSE dropped to 0.84, MAE to 0.37, and R increased to 0.61, demonstrating its superiority in capturing long-term dependencies in time series data. Although the LSTM's prediction accuracy significantly improves compared to the physical model, its error remains greater than that of the random forest (RF) and fusion models.
[0157] The Random Forest (RF) model performs particularly well in handling nonlinear relationships, particularly in regression tasks. On the ASF1 dataset, the RF model achieved an MSE of 0.37, a MAE of 0.46, and an R value of 0.73, demonstrating its excellent performance in regression tasks. For the ASF2 dataset, the RF model's MSE further decreased to 0.24, MAE of 0.27, and R value of 0.87, demonstrating that RF can effectively capture complex data patterns and has strong generalization capabilities, particularly in fitting complex data patterns.
[0158] The fusion model combines the features extracted by LSTM with the regression capabilities of RF, thereby improving prediction accuracy. On the ASF1 dataset, the fusion model achieved an MSE of 0.51, a MAE of 0.50, and an R value of 0.69. Despite the relatively long training time, its prediction performance was significantly better than that of the individual LSTM and RF models. On the ASF2 dataset, the MSE of the fusion model further decreased to 0.21, the MAE of 0.25, and the R value of 0.87, achieving the best prediction results. By combining the advantages of both models, the fusion model improved prediction accuracy on the ASF2 dataset and demonstrated strong regression capabilities.
[0159] The Dynamic Weight model (DW) balances prediction accuracy and computational efficiency by dynamically adjusting the weights of LSTM and RF. On the ASF1 dataset, the DW model achieved an MSE of 0.48, a MAE of 0.47, and an R value of 0.68, outperforming all models. Although its MSE and MAE were lower than those of RF, it exhibited higher computational efficiency. On the ASF2 dataset, the DW model's MSE dropped to 0.35, MAE to 0.26, and R value to 0.79, demonstrating improved prediction accuracy and efficient data processing. By dynamically adjusting prediction weights, the DW model combines the advantages of LSTM and RF, further improving prediction accuracy. The DW model performed particularly well in terms of computational efficiency.
[0160] Computational efficiency is another key evaluation metric, especially when processing large datasets and performing real-time prediction tasks, where model training time becomes a crucial consideration. The following is a detailed analysis of the computational efficiency of each model.
[0161] The greatest advantage of the physical model lies in its simplicity, with an extremely short training time of just 0.055 seconds. This efficient computation makes the physical model suitable for tasks requiring high real-time performance, especially when computing resources are limited, as the physical model can still provide results quickly. However, despite its computational efficiency, the physical model's prediction accuracy is relatively poor, making it unsuitable for tasks requiring high precision.
[0162] Due to the complexity of its deep learning architecture, the LSTM model takes a long time to train, reaching 73.91 seconds. The large number of parameters required to train LSTMs for processing time series data makes them computationally expensive, especially on large datasets, where training time can increase significantly. Although LSTMs are advantageous in capturing the long-term dependencies of time series data, their long training time makes them ineffective in certain real-time prediction tasks.
[0163] The training time for the Random Forest (RF) model is 7.28 seconds, which is shorter than that of LSTM. RF builds multiple decision trees and integrates their results. Although computationally intensive, it has a relatively short training time. Therefore, RF strikes a good balance between computational efficiency and prediction accuracy, making it a highly efficient regression model.
[0164] The fusion model combines the LSTM and RF models, resulting in a long training time of 99.76 seconds. The need to train two models simultaneously significantly increases the computational workload, particularly due to the complexity of the LSTM model. While the fusion model demonstrates excellent prediction accuracy, its lengthy training time makes it difficult to apply in scenarios requiring real-time predictions and where computing resources are limited.
[0165] The dynamic weight model (DW) demonstrates exceptional computational efficiency, with a training time of just 0.02 seconds, significantly lower than other models. This demonstrates that DW, by dynamically adjusting weights, significantly improves computational efficiency while maintaining high prediction accuracy. The DW model not only approaches the RF and fusion models in prediction accuracy, but also outperforms all other methods in computational efficiency, making it ideal for applications requiring real-time predictions.
[0166] In order to more intuitively demonstrate the prediction effects of different models, the predicted values are compared with the true values, such as Figure 5 As shown. Through the prediction comparison chart ( Figure 5), we can see that the relationship between the predicted values of the Physical model and the true values is very weak. The points in the scatter plot hardly form any pattern, and most of the predicted values are very different from the true values, showing very low predictive ability.
[0167] The scatter plots between the predicted values and the true values for the LSTM and random forest models are relatively close, especially for ASF2 predictions, where the random forest model provides a better fit. The fusion model and dynamic weight model further improve prediction accuracy. In particular, for ASF2 predictions, the predicted points are more closely clustered near the diagonal. Furthermore, the scatter plot for the dynamic weight model has fewer outliers and displays a more stable linear trend, while the other models may exhibit significant fluctuations. This indicates that the DW model exhibits greater stability in predictions and is better able to handle outliers.
[0168] Figure 6 The dynamic weight change diagram shows how the LSTM model's weights are dynamically adjusted over time during the prediction process. The LSTM weights fluctuate significantly over time, indicating that the dynamic weight mechanism plays a significant role in adjusting the contributions of the LSTM and RF models.
[0169] The above evaluation results show that the Dynamic Weight model (DW) is the best performing model in this study in terms of both prediction accuracy and computational efficiency. It achieves comparable MSE and MAE scores to the RF and Fusion models, while also exhibiting a high R value, demonstrating its ability to effectively fit the data and capture its inherent trends. More importantly, the DW model boasts extremely high computational efficiency, requiring significantly less training time than other models, making it suitable for real-time prediction tasks. In this study, the DW model achieved the best balance between excellent prediction accuracy and computational efficiency, making it the most suitable model for practical applications.
[0170] While RF and Fusion models offer excellent prediction accuracy, their computational efficiency is low and training time is long, limiting their applicability to large datasets or real-time prediction tasks. LSTM and physical models perform generally well, particularly with large errors in Mean Sequence Error (MSE) and Mean Average Estimation (MAE), failing to meet high-precision requirements. Therefore, the DW model is currently the best choice in terms of both accuracy and efficiency, and is particularly suitable for scenarios requiring efficient real-time predictions.
[0171] The above evaluation results show that the Dynamic Weight model (DW) is the best performing model in this study in terms of both prediction accuracy and computational efficiency. It achieves comparable MSE and MAE scores to the RF and Fusion models, while also exhibiting a high R value, demonstrating its ability to effectively fit the data and capture its inherent trends. More importantly, the DW model boasts extremely high computational efficiency, requiring significantly less training time than other models, making it suitable for real-time prediction tasks. In this study, the DW model achieved the best balance between excellent prediction accuracy and computational efficiency, making it the most suitable model for practical applications.
[0172] While RF and Fusion models offer excellent prediction accuracy, their computational efficiency is low and training time is long, limiting their applicability to large datasets or real-time prediction tasks. LSTM and physical models perform generally well, particularly with large errors in Mean Sequence Error (MSE) and Mean Average Estimation (MAE), failing to meet high-precision requirements. Therefore, the DW model is currently the best choice in terms of both accuracy and efficiency, and is particularly suitable for scenarios requiring efficient real-time predictions.
[0173] This study proposes a time series forecasting method based on multiple machine learning models, focusing on the eLoran system dataset. It combines LSTM (Long Short-Term Memory) networks, random forests (RFs), fusion models, and dynamic weighting models (DWs), and conducts a detailed comparison of these models in terms of prediction accuracy, computational efficiency, and overall performance. Experimental results demonstrate that random forests and dynamic weighting models improve prediction accuracy while also offering high computational efficiency, making them particularly suitable for real-time applications.
[0174] The following are the main findings and conclusions of this paper:
[0175] 1. Model Performance Comparison
[0176] By comparing five models (physical model, LSTM, random forest, fusion model and dynamic weight model), the research results show that although the physical model (Physical) performs well in computational efficiency, its prediction accuracy is much lower than that of other machine learning models.
[0177] In contrast, the LSTM model effectively models long-term dependencies in time series data through deep learning, demonstrating superior forecasting accuracy. While LSTM can significantly improve accuracy when processing complex time series data, its high computational overhead limits its practical application.
[0178] The Random Forest (RF) model performed particularly well, outperforming the LSTM model in terms of prediction accuracy. In particular, for the ASF2 target variable, it effectively captured nonlinear relationships in the data. In predicting ASF1, the RF model outperformed the LSTM model. More importantly, the RF model's computational efficiency surpassed that of the LSTM model, with a training time of 7.28 seconds, significantly shorter than that of the LSTM.
[0179] The fusion model further improves prediction accuracy by combining the feature extraction capabilities of LSTM with the regression capabilities of RF. Although the fusion model takes 99.76 seconds to train, significantly longer than RF and LSTM, it provides more accurate prediction results, especially for complex time series data.
[0180] Finally, the Dynamic Weight model (DW) combines the advantages of LSTM and RF, optimizing prediction results by dynamically adjusting the prediction weights of both. Although DW is computationally efficient, requiring only 0.02 seconds to train, far less than the fusion model and LSTM, it demonstrates exceptional computational efficiency while maintaining high prediction accuracy, making it particularly suitable for tasks with high real-time requirements.
[0181] 2. Computational efficiency analysis
[0182] In terms of computational efficiency, the physical model has the shortest training time, at just 0.055 seconds, making it suitable for applications with high real-time requirements. However, its prediction accuracy falls short of actual requirements, and therefore it is generally not the preferred model in practical applications. Conversely, the LSTM model takes a relatively long training time of 73.91 seconds. While it can effectively model long-term dependencies in time series, its computational cost is high for real-time prediction tasks.
[0183] The random forest model offers a compromise, significantly reducing training time while maintaining high accuracy. Its training time is 7.28 seconds, making it suitable for scenarios requiring fast response times. In contrast, the fusion model, which incorporates both LSTM and RF training, has a training time of 99.76 seconds. While computationally complex, it provides more accurate predictions through feature fusion.
[0184] The dynamic weight model provides an efficient solution for time series forecasting, with a training time of only 0.02 seconds, significantly lower than other models. By dynamically adjusting the weights of the LSTM and RF algorithms, the DW model improves forecasting accuracy while maintaining extremely high computational efficiency, making it particularly suitable for applications with strong real-time requirements.
[0185] 3. Forecast and comparative analysis
[0186] By comparing the predictions ( Figure 5 ) and dynamic weight change graph ( Figure 6 ) visualizations provide a more intuitive assessment of model performance. The prediction comparison chart shows the scatterplot distribution of predictions from different models against the true values. The predictions of the LSTM and RF models are closer to the true values, with the random forest model providing a better fit, especially in ASF2 predictions. The fusion model and dynamic weight model were further optimized in ASF2 predictions, with predictions closer to the diagonal, demonstrating their excellent fitting capabilities.
[0187] Dynamic weight change diagram ( Figure 6 ) shows the weight changes of the LSTM and RF. As can be seen, the weights of the LSTM and RF change dynamically over time, demonstrating that the DW model plays an important role in adjusting the weights based on the current prediction error. This dynamic weighting mechanism enables the DW model to flexibly adjust the contributions of the LSTM and RF based on different data characteristics, thereby improving overall prediction performance.
[0188] 4. Application scenarios of prediction results
[0189] This study validated the effectiveness of various machine learning models on the eLoran system dataset, particularly the superiority of the dynamic weighting model. By dynamically adjusting the weights of the LSTM and RF layers, the DW model not only improved prediction accuracy but also maintained computational efficiency, demonstrating broad potential for practical applications. The DW model provides a highly effective solution for systems that require real-time processing of large amounts of data and accurate predictions, such as the eLoran system.
[0190] In actual eLoran systems, based on the aforementioned methods (LSTM, random forest, fusion model, dynamic weight model, etc.), historical data (including system features and target variables) can be used to predict future ASF values. This allows the system to perform the following operations based on the predicted ASF values:
[0191] (1) Adjusting signal transmission power: If the predicted ASF value indicates that the system may face signal attenuation or distortion, the system can automatically increase the signal transmission power to ensure the coverage of the navigation signal.
[0192] (2) Selecting the optimal signal path: The eLoran system may face multiple signal paths to choose from. Based on ASF prediction, the system can intelligently select a path to optimize the quality and stability of signal transmission.
[0193] (3) Real-time adjustment of navigation accuracy requirements: If the prediction results indicate that the ASF may fluctuate significantly in the future, the system can lower the navigation accuracy requirements in advance to avoid inaccurate navigation results due to sudden fluctuations.
[0194] (4) Fault prediction and early warning: Through continuous monitoring and prediction of ASF, the system can issue an alarm in advance when an abnormality occurs, prompting maintenance personnel to perform inspections or adjustments.
[0195] In summary, this study compared and analyzed the performance of various machine learning models for time series forecasting in the eLoran system. The results show that random forest and dynamic weight models offer significant advantages in both prediction accuracy and computational efficiency, particularly in real-time forecasting tasks. While the fusion model offers higher accuracy, its longer training time makes it less efficient in practical applications. The dynamic weight model, by flexibly adjusting the weights of the LSTM and RF layers, further optimizes prediction results and offers high computational efficiency, making it a highly suitable forecasting model for real-time applications.
[0196] The ASF prediction system based on the LSTM and RF fusion model provided by the present invention is described below. The ASF prediction system based on the LSTM and RF fusion model described below and the ASF prediction method based on the LSTM and RF fusion model described above can refer to each other.
[0197] like Figure 7 As shown, the system includes an allocation module 701, a prediction module 702 and a fusion module 703, wherein:
[0198] The allocation module 701 is used to determine the allocation weight of the LSTM model at the current moment according to the prediction error corresponding to the pre-trained LSTM model at the current moment, and determine the allocation weight of the RF model at the current moment according to the prediction error corresponding to the pre-trained RF model at the current moment;
[0199] The prediction module 702 is used to input the characteristic data of the eLoran system at the current moment into the LSTM model and the RF model respectively, and obtain the ASF prediction values output by the LSTM model and the RF model;
[0200] The fusion module 703 is used to weight the ASF prediction values output by the LSTM model and the RF model according to the allocated weights of the LSTM model and the RF model at the current moment, and then add them to obtain the final ASF prediction value.
[0201] This embodiment determines the contribution of each model to the prediction based on the prediction errors of the LSTM model and the RF model at each moment, thereby dynamically adjusting the allocation weight of each model in real time according to changes in the prediction error. By combining the time series modeling capabilities of the LSTM model with the feature robustness of the random forest model, the model fusion effect can be dynamically optimized based on the actual performance of the model, thereby improving the accuracy and stability of ASF prediction in complex scenarios.
[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.
Claims
1. An ASF prediction method based on LSTM and RF fusion model, characterized in that: include: Determine the allocation weight of the LSTM model at the current moment according to the prediction error corresponding to the pre-trained LSTM model at the current moment, and determine the allocation weight of the RF model at the current moment according to the prediction error corresponding to the pre-trained RF model at the current moment; Inputting the feature data of the eLoran system at the current moment into the LSTM model and the RF model respectively, to obtain the ASF prediction values output by the LSTM model and the RF model; According to the allocated weights of the LSTM model and the RF model at the current moment, the ASF prediction values output by the LSTM model and the RF model are weighted and added to obtain the final ASF prediction value.
2. The ASF prediction method based on the LSTM and RF fusion model according to claim 1 is characterized in that: The following formula is used to determine the allocation weight of the LSTM model at the current moment according to the prediction error corresponding to the pre-trained LSTM model at the current moment, and to determine the allocation weight of the RF model at the current moment according to the prediction error corresponding to the pre-trained RF model at the current moment: in, is the weight assigned to the LSTM model at time t, is the distribution weight of the RF model at time t, is the prediction error corresponding to the LSTM model at time t, is the prediction error corresponding to the RF model at the current moment.
3. The ASF prediction method based on the LSTM and RF fusion model according to claim 1 is characterized in that: Before determining the allocation weight of the LSTM model at the current moment according to the prediction error corresponding to the pre-trained LSTM model at the current moment, and determining the allocation weight of the RF model at the current moment according to the prediction error corresponding to the pre-trained RF model at the current moment, the method further includes: Inputting the characteristic data of the eLoran system at each moment in a time window before the current moment into the LSTM model and the RF model, and obtaining the ASF prediction value at each moment output by the LSTM model and the RF model; Determine the allocation weight of the LSTM model at the current moment according to the mean absolute error between the ASF predicted value and the ASF actual value at each moment output by the LSTM model; The allocation weight of the RF model at the current moment is determined according to the mean absolute error between the ASF predicted value and the ASF actual value at each moment output by the RF model.
4. The ASF prediction method based on the LSTM and RF fusion model according to claim 3 is characterized in that: The prediction errors of the LSTM model and the RF model at the current moment are calculated using the following formula: in, is the prediction error corresponding to the LSTM model at time t, is the prediction error corresponding to the RF model at time t, T w is the time window length, and The ASF prediction values obtained by inputting the feature data of the i-th moment in the time window before time t into the LSTM model and the RF model, y i is the actual ASF value of the eLoran system at the i-th moment.
5. The ASF prediction method based on the LSTM and RF fusion model according to claim 1 is characterized in that: Also includes: Determining an objective function based on the prediction losses of the LSTM model and the RF model; The allocation weights of the LSTM model and the RF model at the current moment are updated so that the objective function is minimized.
6. The ASF prediction method based on the LSTM and RF fusion model according to claim 5 is characterized in that: The formula of the objective function is: stw1+w2=1,w1≥0,w2≥0 Where T is the time window length, and The ASF prediction values obtained by inputting the feature data of the kth moment in the time window before the current moment into the LSTM model and the RF model, y k is the actual ASF value of the eLoran system at the kth moment, w1 and w2 are the allocation weights of the LSTM model and RF model respectively; The allocation weights of the LSTM model and the RF model at the current moment are updated using the following formula: in, is the ASF fusion value, and are the allocation weights corresponding to the LSTM model and the RF model at the kth moment respectively; and are the gradients of w1 and w2 respectively; and are the weights assigned to the LSTM model and the RF model at the k+1th moment, η is the learning rate, Proj s Indicates that and Project to the feasible region S.
7. The ASF prediction method based on the LSTM and RF fusion model according to claim 1 is characterized in that: Before obtaining a final ASF prediction value by weighting and adding the ASF prediction values output by the LSTM model and the RF model according to the weights allocated to the LSTM model and the RF model at the current moment, the method further includes: Combining the allocation weight of the LSTM model at the current moment with the allocation weight at the previous moment through a smoothing factor, and constraining the combined weight to be within a preset value range; The allocation weight of the RF model at the current moment and the allocation weight at the previous moment are combined through a smoothing factor, and the combined weight is constrained within a preset value range.
8. An ASF prediction system based on LSTM and RF fusion model, characterized by: include: An allocation module, configured to determine an allocation weight of the LSTM model at the current moment according to the prediction error corresponding to the pre-trained LSTM model at the current moment, and to determine an allocation weight of the RF model at the current moment according to the prediction error corresponding to the pre-trained RF model at the current moment; A prediction module is used to input the feature data of the eLoran system at the current moment into the LSTM model and the RF model respectively, to obtain the ASF prediction values output by the LSTM model and the RF model; A fusion module is used to add the weighted ASF prediction values output by the LSTM model and the RF model according to the allocated weights of the LSTM model and the RF model at the current moment to obtain a final ASF prediction value.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the ASF prediction method based on the LSTM and RF fusion model as described in any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the ASF prediction method based on the LSTM and RF fusion model according to any one of claims 1 to 7 is implemented.