Disclosure of Invention
The invention aims to overcome the defects of the prior art, provides an orbit prediction algorithm based on an Elman neural network and a storage medium thereof, and particularly designs an algorithm which is suitable for predicting the orbit coordinate of a ballistic missile in real time based on the scout information when the ballistic missile moves in a passive section.
In order to achieve the above object, the present invention provides an orbit prediction algorithm based on Elman neural network, including:
inputting the orbit coordinates of the ballistic missile to be predicted into an Elman neural network prediction model, and outputting the predicted orbit coordinates;
constructing an Elman neural network prediction model, which comprises the following steps:
constructing an Elman neural network model;
and substituting the obtained scouting data into the Elman neural network model for iterative training until the conditions are met, and outputting a final Elman neural network prediction model.
Preferably, the condition is one of a condition one and a condition two:
the method comprises the following steps that (1) under the condition of one, the iteration frequency reaches the set frequency;
substituting the test data into an Elman neural network prediction model to obtain the track coordinates of the predicted and output ballistic missile; and comparing the error between the orbit coordinate of the predicted and output ballistic missile and the orbit coordinate of the ballistic missile in the test data of the corresponding time with a set threshold value, if the error is within the range of the set threshold value, the Elman neural network prediction model is qualified, and otherwise, the Elman neural network model is trained again in an iterative manner.
Preferentially, the Elman neural network model is constructed:
y(k)=g(w3·x(k))
x(k)=f(w1·xc(k))+w2(u(k-1))
xc(k)=x(k-1),
wherein y (k) is an orbit coordinate set of the predicted and output ballistic missile, and m represents the orbit coordinate point number of the predicted and output ballistic missile; x (k) is a middle layer node unit vector input into the Elman neural network model, and n is the number of middle layer nodes; u (k-1) is an r-dimensional orbit coordinate set input into the Elman neural network model, and r represents the number of orbit coordinate points of the missile path missile in x (k); x is the number ofc(k) Is an n-dimensional feedback state vector; w is a3Connecting the weight from the middle layer to the output layer; w is a2Connecting the weight from the input layer to the middle layer; w is a1The connection weight from the receiving layer to the middle layer; g (—) is a linear combination of the intermediate layer outputs; f (—) is the transfer function of the intermediate layer neurons.
Preferentially, substituting the acquired scout data into the Elman neural network model for multiple iterative training, and updating w once after each iteration is finished1、w2And w3The values of (a) include:
the Elman neural network model adopts a BP algorithm to correct the weight, and a learning index function of the BP algorithm adopts an error sum of squares function:
in the formula (I), the compound is shown in the specification,
is the orbital coordinate vector of the actual ballistic missile target, y
k(W) is and
y (k) of the corresponding output of the Elman neural network model;
obtaining updated w based on1、w2And w3:
wi=wiold+dw
Wherein i is 1,2,3, wioldIs w1、w2And w3An initial value of (1); dw is an adjustment value of each iteration, and adjustment is carried out in the direction of negative gradient based on the strategy of a gradient descent method; wherein eta is learning rate and has a value range of [0, 1%];
W after update1、w2And w3And substituting the model into an Elman neural network model for iterative training.
Preferably, prior to constructing the Elman neural network model, the scout data is subjected to a normalization process comprising:
and (3) carrying out linear transformation on the X-axis coordinate of the missile path missile in the scout data by using a minimum-maximum normalization method:
wherein, minxIs the minimum value, max, of the X-axis coordinate of the missile path missile in the detection dataxThe maximum value of the X-axis coordinate of the missile path missile in the investigation data is shown, X' is the X-axis coordinate after linear transformation, and X is the X-axis coordinate of the missile path missile in the investigation data;
and (3) carrying out linear transformation on the Y-axis coordinate of the missile path missile in the scout data by using a minimum-maximum normalization method:
wherein, minyFor investigating missile-path missiles in dataMinimum value of Y-axis coordinate, maxyThe maximum value of the Y-axis coordinate of the missile path missile in the investigation data is shown, Y' is the Y-axis coordinate after linear transformation, and Y is the Y-axis coordinate of the missile path missile in the investigation data;
and (3) carrying out linear transformation on the Z-axis coordinate of the missile path missile in the scout data by using a minimum-maximum normalization method:
wherein, minZIs the minimum value, max, of the Z-axis coordinate of the missile path missile in the detection dataZThe maximum value of the Z-axis coordinate of the missile path missile in the detection data is shown, Z' is the Z-axis coordinate after linear transformation, and Z is the Z-axis coordinate of the missile path missile in the detection data.
Preferentially, in the first condition, the iteration frequency reaches the set frequency for one thousand times;
in the second condition, the sum of squares of errors e (w) between the orbit coordinates of the predicted and output ballistic missile and the orbit coordinates of the actual ballistic missile corresponding to the reconnaissance data reaches the specified accuracy.
Preferably, f (, x) employs an S function.
Preferentially, before normalization processing is carried out on the reconnaissance data, abnormal value elimination and missing value supplement are carried out on the reconnaissance data; the detection data and the test data are track coordinate sets of the ballistic missiles collected in advance, the track coordinate sets are collected sequentially according to fixed time intervals, and missing value supplement is obtained by averaging front and rear track coordinates of positions where missing coordinates are located in the track coordinate sets.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method described above.
The invention achieves the following beneficial effects:
the method utilizes the characteristic that the Elman neural network can approach any nonlinear mapping with any precision, and does not consider the specific form of influence of external noise such as gravity, air resistance and the like on the system, the Elman neural network model is constructed, and the prediction analysis is carried out on the trajectory of the ballistic missile based on the reconnaissance data; and based on the iteration times or the error precision, the construction of an Elman neural network prediction model is completed, and the predicted orbit coordinate of the ballistic missile is more accurate.
Detailed Description
The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present invention is not limited thereby.
An Elman neural network-based orbit prediction algorithm, comprising:
inputting the orbit coordinates of the ballistic missile to be predicted into an Elman neural network prediction model, and outputting the predicted orbit coordinates;
constructing an Elman neural network prediction model, which comprises the following steps:
constructing an Elman neural network model;
and substituting the obtained scouting data into the Elman neural network model for iterative training until the conditions are met, and outputting a final Elman neural network prediction model.
Further, the condition in this embodiment is one of the condition one and the condition two:
the method comprises the following steps that (1) under the condition of one, the iteration frequency reaches the set frequency;
substituting the test data into an Elman neural network prediction model to obtain the track coordinates of the predicted and output ballistic missile; and comparing the error between the orbit coordinate of the predicted and output ballistic missile and the orbit coordinate of the ballistic missile in the test data of the corresponding time with a set threshold value, if the error is within the range of the set threshold value, the Elman neural network prediction model is qualified, and otherwise, the Elman neural network model is trained again in an iterative manner.
Further, the Elman neural network model is constructed in this embodiment:
y(k)=g(w3·x(k))
x(k)=f(w1·xc(k))+w2(u(k-1))
xc(k)=x(k-1),
wherein y (k) is an orbit coordinate set of the predicted and output ballistic missile, and m represents the orbit coordinate point number of the predicted and output ballistic missile; x (k) is a middle layer node unit vector input into the Elman neural network model, and n is the number of middle layer nodes; u (k-1) is an r-dimensional orbit coordinate set input into the Elman neural network model, and r represents the number of orbit coordinate points of the missile path missile in x (k); x is the number ofc(k) Is an n-dimensional feedback state vector; w is a3Connecting the weight from the middle layer to the output layer; w is a2Connecting the weight from the input layer to the middle layer; w is a1The connection weight from the receiving layer to the middle layer; g (—) is a linear combination of the intermediate layer outputs; f (—) is the transfer function of the intermediate layer neurons.
Further, in this embodiment, the obtained scout data is substituted into the Elman neural network model to perform iterative training for multiple times, and w is updated once each iteration is completed1、w2And w3The values of (a) include:
the Elman neural network model adopts a BP algorithm to correct the weight, and a learning index function of the BP algorithm adopts an error sum of squares function:
in the formula (I), the compound is shown in the specification,
is the orbital coordinate vector of the actual ballistic missile target, y
k(W) is and
y (k) of the corresponding output of the Elman neural network model;
obtaining updated w based on1、w2And w3:
wi=wiold+dw
Wherein i is 1,2,3, wioldIs w1、w2And w3An initial value of (1); dw is an adjustment value of each iteration, and adjustment is carried out in the direction of negative gradient based on the strategy of a gradient descent method; wherein eta is learning rate and has a value range of [0, 1%];
W after update1、w2And w3And substituting the model into an Elman neural network model for iterative training.
Further, in this embodiment, before constructing the Elman neural network model, normalization processing is performed on the scout data, including: and (3) carrying out linear transformation on the X-axis coordinate of the missile path missile in the scout data by using a minimum-maximum normalization method:
wherein, minxIs the minimum value, max, of the X-axis coordinate of the missile path missile in the detection dataxThe maximum value of the X-axis coordinate of the missile path missile in the investigation data is shown, X' is the X-axis coordinate after linear transformation, and X is the X-axis coordinate of the missile path missile in the investigation data;
and (3) carrying out linear transformation on the Y-axis coordinate of the missile path missile in the scout data by using a minimum-maximum normalization method:
wherein, minyIs the minimum value, max, of the Y-axis coordinate of the missile path missile in the detection datayThe maximum value of the Y-axis coordinate of the missile path missile in the investigation data is shown, Y' is the Y-axis coordinate after linear transformation, and Y is the Y-axis coordinate of the missile path missile in the investigation data;
and (3) carrying out linear transformation on the Z-axis coordinate of the missile path missile in the scout data by using a minimum-maximum normalization method:
wherein, minZIs the minimum value, max, of the Z-axis coordinate of the missile path missile in the detection dataZThe maximum value of the Z-axis coordinate of the missile path missile in the detection data is shown, Z' is the Z-axis coordinate after linear transformation, and Z is the Z-axis coordinate of the missile path missile in the detection data.
Further, in the first condition of this embodiment, the number of iterations reaches the set number of times of one thousand times;
in the second condition, the sum of squares of errors e (w) between the orbit coordinates of the predicted and output ballistic missile and the orbit coordinates of the actual ballistic missile corresponding to the reconnaissance data reaches the specified accuracy.
Further, in the present embodiment, f (×) adopts an S function.
Further, in the embodiment, before normalization processing is performed on the scout data, abnormal value elimination and missing value supplement are performed on the scout data;
the detection data and the test data are track coordinate sets of the ballistic missiles collected in advance, the track coordinate sets are collected sequentially according to fixed time intervals, and missing value supplement is obtained by averaging front and rear track coordinates of positions where missing coordinates are located in the track coordinate sets.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method described above.
1. Radar data preprocessing
Due to the complexity of a battlefield test environment, the accuracy and the integrity of the reconnaissance data acquired by the radar are poor, and therefore abnormal value elimination and missing value supplement operation needs to be carried out on the reconnaissance data. Missing value supplementation may select the mean of the neighboring data of the missing value to replace. There are many ways in which outlier rejection can be used in the prior art, and the present embodiment does not describe the specific process in detail.
The reconnaissance data and the test data are both a pre-collected orbit coordinate set of the ballistic missile, and can be the orbit coordinate of the ballistic missile at the initial section in the passive section + the orbit coordinate of the ballistic missile at the tail section in the passive section. Let minx、maxxThe minimum value and the maximum value of missile X-axis data are respectively. Min-max normalization by calculation
And mapping the data on the X axis to a [0,1] interval, wherein X is the original data X axis data, X' is the normalized data, and the coordinates of other axes are processed similarly.
2. Neural network construction
Before network training, the parameters of the Elman neural network need to be set. The Elman neural network is generally divided into four layers: input layer, hidden layer (intermediate layer), accepting layer and output layer. As shown in figure 2 of the drawings, in which,
the connection of the input, hidden and output layers is similar to a feed-forward network, with the input layer only serving the signal transmission function and the output layer serving the linear weighting function. The transfer function of the hidden layer may take the form of a linear or non-linear function. The receiving layer, also called context layer or state layer, is used to memorize the output value of the hidden layer unit at the previous moment and return it to the input of the network, and can be regarded as a one-step delay operator.
The nonlinear state space expression of the Elman neural network is
y(k)=g(w3·x(k))
x(k)=f(w1·xc(k))+w2(u(k-1))
xc(k)=x(k-1)
Where y (k) is an m-dimensional output node vector, i.e., an orbit coordinate set of a prediction time period, which is an m × 3 matrix in the present invention, where m represents the number of coordinate points in the output prediction time period, and 3 represents the spatial dimension of the coordinate points; x (k) is an n-dimensional intermediate layer node unit vector, namely an orbit coordinate set of an input time period, which is an n x 3 matrix in the invention, wherein n represents the number of coordinate points in the input time period, and 3 represents the spatial dimension of the coordinate points; u (k-1) is an r-dimensional input vector; x is the number ofc(k) Is an n-dimensional feedback state vector; w is a3Connecting the weight from the middle layer to the output layer; w is a2Connecting the weight from the input layer to the middle layer; w is a1The connection weight from the receiving layer to the middle layer; g (— is the transfer function of the output neuron, which is a linear combination of the intermediate layer outputs; f (—) is the transfer function of the intermediate layer neurons, often using the S function.
The Elman neural network adopts a BP algorithm to correct the weight, and a learning index function of the BP algorithm adopts an error square sum function:
in the formula (I), the compound is shown in the specification,
is the position coordinate vector of the actual ballistic missile target, y
k(w) is and
y (k) of the corresponding Elman neural network output.
3. Neural network training
And setting the number of hidden layer layers and the number of hidden layer nodes, substituting the reconnaissance data subjected to normalization processing into the Elman neural network, performing cyclic iterative training until the training requirement is met (for example, the Elman neural network is executed for one thousand times in a cyclic manner or the error reaches the specified precision), and obtaining the neural network model.
4. Result generation
Selecting untrained reconnaissance data, substituting the selected untrained reconnaissance data into a trained neural network model according to the specified format of an n x 3 matrix to generate a prediction result, carrying out comparison error analysis on the prediction result and a position coordinate data set of an original missile motion orbit in the same time period, comparing X, Y, Z-axis data of three-dimensional coordinates, and respectively calculating a difference value or a standard deviation of the data.
To verify the algorithm feasibility, the following simulations were performed.
The input variable is a set of three-dimensional variables in a geocentric coordinate system, the reconnaissance data is normalized to have a coordinate range of [0,1] and a track of 3,
setting the number of hidden layers of an Elman neural network to be 5, the number of hidden layer nodes to be 7, 11, 14, 18 and 30 respectively, and setting the total data scale of missile motion tracks to be 9000 x 3(9000 groups of three-dimensional data), so that a 1000 th data point in a data set is selected as an input training data starting point, a 3000 th data point in the data set is selected as an input training data end point, a 2000 th data point in the data set is selected as an output training data starting point, a 4000 th data point in the data set is selected as an output training data end point, data is input into the Elman neural network for training, the whole network iterates 1000 times, and the error precision of the result is less than 1 e-4;
storing the trained neural network, selecting a 3000 th data point in the data set as an input data starting point, selecting a 3000 th data point in the data set as an input data end point, performing predictive analysis on the track position of which the 3000 th data point in the data set is an output data starting point and the 3000 th data point in the data set is an output data end point, wherein the simulation effect is shown as figure 4, and figures 4, 5 and 6 are schematic diagrams of an actual track X axis and a predicted track coordinate X axis of a ballistic missile target, an actual track Y axis and a predicted track coordinate Y axis of the ballistic missile target, and an actual track Z axis and a predicted track coordinate Z axis of the ballistic missile target.
The trained Elman neural network model can well predict the trajectory of the missile, the error map can be analyzed, the closer to the point of the training interval, the better the prediction effect is, the time sequence characteristic of the Elman neural network is also met, and the closer to the training set, the better the prediction effect is, otherwise, the worse the prediction effect is.
In conclusion, it can be concluded that the Elman neural network model can perform nonlinear function approximation on the motion model of the ballistic missile, the influence of relevant parameters such as dynamics, aerodynamics, geogravimetry and the like on the missile is not required to be considered, the trained network model can predict the motion of the ballistic missile in real time, and better prediction results can be achieved when the trained network model is closer to the training interval.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.