Real-time Ship Trajectory Prediction Method Based on the Combination of Linear and Nonlinear Filters
Through the combination of linear and nonlinear filters, noise and prediction curves are processed and the prediction curve is optimized, and the noise processing and data dependence problems of ship trajectory prediction in the prior art are solved, and low-cost and high-precision ship trajectory prediction is achieved, which is suitable for intelligent water cannon systems.
Patent Information
- Application Number
- CN202111292868.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-03
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2041-11-03
AI Technical Summary
The existing ship trajectory prediction method has a general effect when the data volume is small, requiring a large number of ship's inherent parameters and external environmental parameters, and it is impossible to effectively process real-time tracking data with noise, resulting in insufficient strike accuracy of smart water cannons.
Using a method based on the combination of linear and nonlinear filters, noise is removed through Gaussian filtering, the optimal prediction curve is selected using N-order polynomial fitting and K-fold cross-validation, and the nonlinear noise is processed in combination with median filtering to achieve ship trajectory prediction.
It realizes that under low-cost conditions, the prediction model can be updated in real time, accurately predict ship trajectory, adapt to motion and stationary targets, and improves the strike accuracy of smart water cannons.
Smart Images

Figure CN114118528B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ship trajectory prediction, and particularly to a real-time prediction method for ship trajectories based on a combination of linear and non-linear filters. Background Art
[0002] In recent years, with the development of computer technology, the water cannon strike system has developed from manual control to intelligent control. The intelligent water cannon automatically adjusts its strike angle according to the position of the strike target. At present, intelligent water cannons are mostly applied to fire fighting and law enforcement. When the intelligent water cannon is applied to fire fighting, since the position of the fire source does not change, the function it realizes is to strike a stationary target, and the movement of the jet in the air often does not affect the strike effect. When the intelligent water cannon is applied to law enforcement, the target ship is in a moving state when avoiding strikes. The time consumed by the movement of the jet in the air will cause the strike to miss the target, and the strike landing point always lags behind the target position. It is necessary to correct the strike point by calculating the lead. Therefore, real-time prediction of the target ship's trajectory is a key step to improve the strike accuracy of the intelligent water cannon. The intelligent water cannon predicts the target position according to the prediction model and calculates the strike lead to solve the problem of strike miss.
[0003] Existing target estimation and prediction methods can be divided into statistics-based methods and deep learning-based methods. However, some prediction methods require a large amount of data, and the prediction effect is average when the data volume is small. Moreover, the establishment of some models requires many ship inherent parameters and external environment parameters, and there is no good generalization performance. Or a short-term trajectory prediction model is established by combining the respective advantages of the CNN and LSTM networks, which has a better effect in a specific environment compared with traditional mathematical statistics methods, but requires a large-scale training set. Or a ship trajectory prediction model with strong real-time performance is established relying on binocular vision ranging, but the cost is high. Or a polynomial Kalman filter model is used to model ship AIS data, but it does not consider the processing of real-time tracking data with a large amount of noise. Summary of the Invention
[0004] In view of the above problems, the present invention proposes a real-time prediction method for ship trajectories based on a combination of linear and non-linear filters to predict the future trajectory of a target ship. According to the historical trajectory data in the short term, the combined filter prediction model is updated in real time, with low cost, no need for ship inherent parameters and external environment parameters of the intelligent water cannon equipment, and good generalization performance.
[0005] The present invention provides a real-time ship track prediction method based on a combination of linear and non-linear filters, including: S1, collecting the target historical trajectory as a data set and performing data preprocessing to obtain a data set with noise removed; S2, using an N-order polynomial fitting to fit the data set to obtain N + 1 polynomials for prediction, and using K-fold cross-validation to select the optimal prediction curve from the N + 1 prediction polynomials to obtain a preliminary prediction result; S3, using median filtering to process the prediction result to obtain a prediction result with non-linear noise removed.
[0006] Further, step S1 specifically includes: S11, using an intelligent water cannon system to track the target ship and collecting the yaw angle and pitch angle information therein to describe the target trajectory; S12, the noise of the collected data is a random variable X, where X follows a one-dimensional Gaussian distribution, and the probability density function is where μ is the expected value of the random variable X, and σ is the standard deviation of X; S13, taking the probability density function as the prototype of the Gaussian function G(x) for calculating the Gaussian template, setting its expected value μ as the value x0 of the convolution element of the current template, then the Gaussian template where x is the value of the element in the neighborhood of x0. If the width of the one-dimensional Gaussian template is N, then the Gaussian template Use the Gaussian template to traverse the collected data and perform convolution to obtain the filtering result
[0007] Perform Gaussian filtering on a large amount of noise in the collected data, which is linear filtering. The larger the standard deviation σ of the Gaussian function, the better the smoothing effect after filtering. By adjusting σ, a good smoothing effect can be obtained.
[0008] Further, using an N-order polynomial fitting to fit the data set in step S2 specifically includes: using the least squares method to fit the sample set to obtain polynomials of order 0 to N where N is the highest order of the polynomial, t is time, b is the bias constant, a is the polynomial coefficient, and m is the order.
[0009] The prediction effects of different prediction curves with different m values are different. If m is too large, overfitting problems will occur, and if m is too small, underfitting problems will occur. Therefore, it is necessary to standardize the order m to obtain a suitable m value.
[0010] Further, using K-fold cross-validation to select the optimal prediction curve from the N + 1 prediction polynomials in step S2 specifically includes: S21, equally spaced sampling the sample set S into k parts, and respectively using (k - 1) of them as the training set to calculate F(m,t), and one part as the cross-validation set. S22, calculate the error value e = (p - r) between the predicted value and the true value on the validation set 2, take the F(m,t) with the smallest average error value e as the optimal prediction curve, where m is the K-fold cross-validation specification order, p is the predicted value, and r is the true value; S23, if there are multiple F(m,t) with the same average error value e, then take the F(m,t) with the smallest order m among them as the optimal prediction curve.
[0011] K-fold cross-validation is applicable to scenarios with a small dataset, can effectively prevent overfitting and underfitting, find appropriate model parameters, and use the K-fold cross-validation specification order m.
[0012] Further, step S3 specifically includes: S31, using the optimal prediction curve to calculate multiple prediction results within the neighborhood of the prediction time point to obtain a set of prediction results; S32, using median filtering to filter out the non-linear noise in the prediction results to obtain the final prediction result.
[0013] Further, it also includes preset parameters for fitting linear filtering and non-linear filtering parameter values based on several target trajectory data. The preset parameters include the standard deviation σ of the Gaussian function, the width N of the Gaussian template, the highest order D of the polynomial, the number of samples k, and the sample data L of the median filtering.
[0014] Further, it also includes quantitatively evaluating the prediction results based on the mean square error MSE.
[0015] The beneficial technical effects of the present invention are as follows:
[0016] 1. First, process the Gaussian noise and the predicted target trajectory through a linear filter, and then use a non-linear filter to process the non-linear noise in the prediction results, so that the prediction curve has no obvious non-linear noise and has good smoothness.
[0017] 2. The coincidence degree between the predicted trajectory and the original trajectory is good. The real-time prediction and prevention of ship trajectories using a combination of linear and non-linear filters can focus on stationary targets and accurately hit moving targets when attacking moving targets.
[0018] 3. It can update the combined filter prediction model in real time based on short-term historical trajectory data, with low cost, and does not require the inherent parameters of the ship where the intelligent water cannon equipment is located and the external environment parameters, and has good generalization performance. Description of the Drawings
[0019] Figure 1 It is a schematic flowchart of an embodiment of the real-time ship trajectory prediction method based on the combination of linear and non-linear filters of the present invention;
[0020] Figure 2 It is a schematic diagram of the convolution filtering of the original data in the embodiment of the present invention;
[0021] Figure 3Schematic diagram of the median filtering process in the embodiments of the present invention;
[0022] Figure 4 Decomposition diagram of the target trajectory in the embodiments of the present invention;
[0023] Figure 5 Schematic diagram of the yaw trajectory sample in the embodiments of the present invention;
[0024] Figure 6 Effect diagram of linear filtering prediction;
[0025] Figure 7 Effect diagram of the real-time ship trajectory prediction method based on the combination of linear and nonlinear filters in the embodiments of the present invention;
[0026] Figure 8 Schematic diagram of the target trajectory in the embodiments of the present invention; Detailed implementation manners
[0027] To further understand the present invention, the preferred implementation manners of the present invention will be described below in conjunction with embodiments. However, it should be understood that these descriptions are only for further explaining the features and advantages of the present invention, rather than limiting the claims of the present invention.
[0028] As Figure 1 shown, the purpose of the present invention is to propose a schematic diagram of the process of the real-time ship trajectory prediction method based on the combination of linear and nonlinear filters. The linear filtering algorithm is divided into Gaussian filtering and N - order polynomial fitting, and the nonlinear filtering algorithm uses median filtering. First, use Gaussian filtering to smooth the historical trajectory data and filter out the Gaussian noise in the dataset. Then, use N - order polynomial fitting to calculate the set of prediction curves for calculating the predicted values. Next, use the K - fold cross - validation algorithm to evaluate the prediction effect, determine the prediction curve according to the evaluation effect, and finally use median filtering to filter out the non - linear noise in the result sequence predicted by the prediction curve to obtain the effective predicted values. In the illustrated embodiments of the present invention, the method steps of the present invention are described one by one.
[0029] S1. Collect the target historical trajectory as a dataset and perform data pre - processing to obtain a dataset with noise removed.
[0030] Use an intelligent water cannon system to track the target ship, and describe the position of the target according to the yaw angle and pitch angle information therein. Due to reasons such as the roll of the equipment - loaded ship and the occlusion of water mist, a large amount of noise will appear during the process of collecting the target position information, and Gaussian filtering needs to be used for data pre - processing. Assume that the noise is a random variable X. Through experiments, it is found that X basically follows a one - dimensional Gaussian distribution, and its probability density function p(x) is as shown in Equation (1).
[0031]
[0032] where μ is the expected value of the random variable X, and σ is the standard deviation of X.
[0033] Gaussian filtering is a linear filtering method. The Gaussian function G(x) prototype used to calculate the Gaussian template is given by Equation (1), and its expected value is set to the value of the current template convolution element. Let μ = x0, where x0 is the element of the current template convolution. Then the Gaussian template G(x) is shown in Equation (2).
[0034]
[0035] where x is the value of the element in the neighborhood of x0. The larger the standard deviation σ of the Gaussian function, the better the smoothing effect after filtering. By adjusting σ, a good smoothing effect can be obtained.
[0036] Let the width of the one-dimensional Gaussian template be N. Then the Gaussian template G(x1, x2, Λ, x N ) is shown in Equation (3).
[0037]
[0038] Use the Gaussian template to filter the data. As Figure 2 shown, X is the original data and Y is the filtering result. Use the Gaussian template to traverse the original data from left to right and perform convolution to obtain the filtering result Y. Among them, the method of convolving the original data X to obtain the filtering result Y is shown in Equation (4).
[0039]
[0040] S2. Use N-order polynomial fitting to fit the data set to obtain N + 1 polynomials for prediction. Use K-fold cross-validation to select the optimal prediction curve from the N + 1 prediction polynomials to obtain the preliminary prediction result.
[0041] Polynomial fitting is a linear filtering method. A polynomial can approximate the mapping relationship between any differentiable independent variable and dependent variable. Therefore, it can be used to predict the ship's trajectory. Let the highest order of the polynomial be N, and the set of data preprocessing results be the sample set S. Use the least squares method to fit the sample set to obtain polynomials F(m, t) of order 0 to N, as shown in Equation (5).
[0042]
[0043] where t is time, b is the bias constant, a is the polynomial coefficient, and m is the order. The prediction effects of different prediction curves with different m values are different. If m is too large, overfitting problems will occur; if m is too small, underfitting problems will occur. Therefore, it is necessary to standardize the order m to obtain a suitable m value.
[0044] K-fold cross-validation is applicable to scenarios with a small dataset, which can effectively prevent overfitting and underfitting and find appropriate model parameters. In this paper, K-fold cross-validation is used to standardize the order m.
[0045] The sample set S is equally-spaced sampled and divided into k parts. (k - 1) of them are respectively used as the training set to calculate F(m, t), and the remaining 1 part is used as the cross-validation set. Finally, the average error is taken to evaluate the prediction effect of F(m, t). The error calculation method between the predicted value and the true value is shown in Equation (6).
[0046] e = (p - r) 2 (6)
[0047] Where e is the error value, p is the predicted value, and r is the true value. The larger the e value, the greater the error. Calculate all the errors on the validation set, and finally take the F(m, t) with the smallest average value of e as the optimal prediction curve.
[0048] In some embodiments, if there are multiple F(m, t) with the same mean value of e, then take the F(m, t) with the smallest order m among them as the optimal prediction curve.
[0049] S3, use median filtering to process the prediction results to obtain the prediction results with non-linear noise removed.
[0050] As Figure 3 shown, it is the flow chart of using the median filtering algorithm. In the collected target trajectory information, the Gaussian filtering method in the preprocessing process can only process linear noise. However, in the dataset after preprocessing, there is still non-linear noise generated due to reasons such as the target being temporarily lost. These noises will be scaled during the prediction process, so there is non-linear noise in the prediction result set, and there are spiky protrusions in the plotted result curve. It is necessary to filter the non-linear noise in the result set. Median filtering is a non-linear filter. By sorting the set of input data elements and taking the median of the data as the filtering result, it can effectively filter non-linear noise data. Where Z is the set of predicted values, L is the length of the dataset for one median filtering, and Z(L / 2) is the predicted value.
[0051] In some embodiments of the present invention, it also includes preset parameters for fitting linear filtering and non-linear filtering parameter values based on several target trajectory data.
[0052] In an embodiment of the present invention, the intelligent water cannon system collects target position information at a rate of 10 hz. The system needs to predict the target trajectory within the time period [t, t + 2], where t is the current time. The specific parameters are as follows: the standard deviation σ of the Gaussian function is 1.5, the width N of the Gaussian template is 20; according to the fitting results of multiple target trajectory data, the highest order D of the polynomial fitting curve is set to 6, and the number of samples k used in each cross-validation is 3; the number of samples L used in each median filtering is 10.
[0053] In some embodiments of the present invention, it further includes quantitatively evaluating the prediction result based on the mean square error MSE.
[0054] To quantitatively evaluate the embodiments of the present invention, the mean square error MSE (Mean Square Error) is used to evaluate the prediction effect, as shown in Equation (7).
[0055]
[0056] Where is the predicted value, and y i is the true value. The smaller the MSE, the closer the predicted value is to the true value, and the more accurate the prediction result.
[0057] In an embodiment of the present invention, the real-time ship track prediction method based on the combination of linear and non-linear filters of the present invention is applied to the intelligent water cannon system for experiments, and a remote control model ship is used as the target. In the intelligent water cannon system, the target movement can be decomposed into movements in the horizontal and vertical directions, as Figure 4 shown. Point P is the current position of the target ship, the x direction is the yaw direction, and the y direction is the pitch direction. In the experiment, the yaw angle value of the intelligent water cannon system is collected to describe the target position in the horizontal direction, and the pitch angle describes the target position in the vertical direction.
[0058] Taking the yaw direction as an example, a prediction experiment is carried out on the target yaw direction trajectory. About 800 pieces of optoelectronic yaw direction data are collected and plotted in a matlab graph as Figure 5 shown. The horizontal axis is the data collection time, and the vertical axis is the yaw angle, obtaining the yaw trajectory sample. And the collected samples are predicted using linear filtering and compared with the real-time ship track prediction method based on the combination of linear and non-linear filters in the embodiment of the present invention. The effect is as Figure 7 shown. Where Figure 6 is the prediction effect diagram of linear filtering, Figure 7 is the prediction effect diagram of the real-time ship track prediction method based on the combination of linear and non-linear filters. It can be seen that only using linear filtering prediction cannot effectively process non-linear noise, while the curve using combined filtering prediction has no obvious non-linear noise and has good smoothness.
[0059] Calculate the MSE in multiple yaw directions. The MSE range of the linear filtering prediction method is 1.2165 - 3.0027, while the MSE range of the real-time ship track prediction method based on the combination of linear and nonlinear filters of the present invention is 0.3025 - 1.4832. The combined filtering with the addition of a nonlinear filter is significantly higher than the prediction method using only linear filtering in terms of prediction effect.
[0060] Use the same model as in the horizontal direction to predict the trajectory in the pitch direction, and display the prediction results in the yaw and pitch directions on the video frame. The effect is as Figure 8 shown, where the rectangular frame is the intelligent water cannon tracking frame, curve a is the original trajectory curve, and curve b is the prediction curve obtained by using the real-time ship track prediction method based on the combination of linear and nonlinear filters of the present invention. Use the equidistant sampling method to collect 100 sample points from curve a and curve b respectively to calculate the coincidence degree to intuitively reflect the prediction effect. Let the sample set be A, and the reasonable pixel distance error between the predicted point and the real point is 10. If the straight-line distance between the sample points of curve a and the corresponding sample points of curve b is within the reasonable error range, the prediction is determined to be correct, otherwise the prediction is determined to be incorrect. Let the number of correctly predicted sample points in the sample set A be y, and the number of incorrectly predicted sample points be n, then the coincidence degree = y / (y + n). After calculation, the coincidence degree between the predicted trajectory and the original trajectory is 88.71%, and the predicted trajectory basically fits the original trajectory.
[0061] The real-time ship track prediction method based on the combination of linear and nonlinear filters proposed by the present invention first processes Gaussian noise and the predicted target trajectory through a linear filter, and then uses a nonlinear filter to process the nonlinear noise in the prediction result. It effectively solves the problem of hitting lag when the jet device strikes a moving target in engineering, and predicts the target position in real time according to the historical trajectory information and the prediction time. It provides effective target position information for the target locking method.
[0062] The description of the above embodiments is only used to help understand the method and its core idea of the present invention. It should be noted that for those of ordinary skill in the art of this technology, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the claims of the present invention.
Claims
1. A real-time ship track prediction method based on the combination of linear and non-linear filters, characterized in that Including: S1. Collect the target historical trajectory as a data set, and perform data preprocessing to obtain a data set with noise removed; S2. Use Nth-order polynomial fitting to fit the data set to obtain N + 1 polynomials for prediction. Use K-fold cross-validation to select the optimal prediction curve from the N + 1 prediction polynomials to obtain a preliminary prediction result; S3. Use median filtering to process the prediction result to obtain a prediction result with non-linear noise removed; Step S1 specifically includes: S11. Use an intelligent water cannon system to track the target ship, and collect the yaw angle and pitch angle information therein to describe the target trajectory; S12. Let the noise of the collected data be a random variable X, where X follows a one-dimensional Gaussian distribution, and the probability density function is where μ is the expected value of the random variable X, and σ is the standard deviation of X; S13. Take the probability density function as the prototype of the Gaussian function G(x) for calculating the Gaussian template. Set its expected value μ to the value x0 of the current template convolution element, then the Gaussian template where x is the value of the element in the neighborhood of x0. If the width of the one-dimensional Gaussian template is N, then the Gaussian template Use the Gaussian template to traverse the acquired data for convolution to obtain the filtering result 2. The real-time ship track prediction method based on the combination of linear and non-linear filters according to claim 1, characterized in that, In step S2, the data set is fitted using an Nth-order polynomial fitting, which specifically includes: fitting the sample set using the least squares method to obtain polynomials of order 0 to N where N is the highest order of the polynomial, t is time, b is the bias constant, a is the polynomial coefficient, and m is the order.
3. The real-time ship track prediction method based on the combination of linear and non-linear filters as claimed in claim 2, wherein In step S2, using K-fold cross-validation to select the optimal prediction curve from the N + 1 prediction polynomials specifically includes: S21. Sample the sample set S at equal intervals and divide it into k parts. Respectively use (k - 1) of them as the training set to calculate F(m, t), and one part as the cross-validation set; S22. Calculate the error value e=(p - r) between the predicted value and the true value on the validation set. 2 Take F(m,t) with the smallest average value of the error value e as the optimal prediction curve, where m is the K-fold cross-validation specification order, p is the predicted value, and r is the true value. S23. If there are multiple F(m, t) with the same mean value of the error value e, then take the F(m, t) with the smallest order m among them as the optimal prediction curve.
4. The real-time ship track prediction method based on the combination of linear and non-linear filters according to claim 1, characterized in that, Step S3 specifically includes: S31. Use the optimal prediction curve to calculate multiple prediction results within the neighborhood of the prediction time point to obtain a set of prediction results; S32. Use median filtering to filter the non-linear noise in the prediction result to obtain the final prediction result.
5. The real-time ship track prediction method based on the combination of linear and non-linear filters according to claim 3, characterized in that, It also includes preset parameters for fitting linear filtering and non-linear filtering parameter values based on several target trajectory data. The preset parameters include the standard deviation σ of the Gaussian function, the width N of the Gaussian template, the highest order D of the polynomial, the number of sample parts k, and the sample data L of the median filtering.
6. The real-time ship track prediction method based on the combination of linear and non-linear filters according to any one of claims 1-5, characterized in that, It also includes quantitatively evaluating the prediction result based on the mean square error MSE.
Citation Information
Patent Citations
Track predication method based on Gauss mixture time series model
CN107610464A
Moving target detection and track prediction method based on image processing
CN110223317A