Real-time prediction method of UAV flight path based on bidirectional long short-term memory network
Through data preprocessing and PID compensator based on Bessel geodetic coordinate transformation and BiLSTM model, the error problem of flight path prediction in autonomous UAV operation is solved, and high-precision path monitoring and correction in complex environments are achieved to ensure mission success.
Patent Information
- Application Number
- CN202211387463.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-07
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-11-07
AI Technical Summary
When drones are operating autonomously, flight control errors may occur due to external disturbances such as wind and electromagnetic interference. Existing technologies make it difficult to achieve accurate flight path predictions, especially in complex environments where satellite positioning signals are unstable. The inability to adjust control signals in a timely manner may lead to mission failure.
Abstract: In order to improve the flight path of UAV, a bidirectional long short-term memory (BiLSTM) model was constructed based on data preprocessing by Bessel geodetic coordinate transformation and least squares fitting. The model was combined with a prediction model compensator based on PID principle to monitor and correct the flight path of UAV in real time. The data association features were extracted through the Bessel-BiLSTM network, and the prediction error was corrected using the compensator. The experimental results show that the proposed model can meet the requirements of the UAV flight path in real time and has a good effect on the flight path of UAV. The proposed model can meet the requirements of the UAV flight path in real time.
The accuracy of drone flight path prediction has been improved, ensuring that drones can accurately monitor and correct flight paths in complex environments, achieving the safety of autonomous operations and the success rate of missions.
Smart Images

Figure CN115759498B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of unmanned aerial vehicle (UAV) path monitoring, and in particular to a real-time prediction method for UAV flight paths based on a bidirectional long short-term memory network. Background Art
[0002] With the rapid development of autonomous drone control technology, unmanned drone operations in areas such as power inspection, traffic monitoring, target tracking, and military strikes have become a reality in recent years. Using drones for autonomous operations not only saves significant labor costs, but also, compared to traditional manual operations, autonomous drones, unrestricted by remote control distance, can operate over a wider range while offering higher control speed and precision. For planned or repetitive tasks like data collection and crop spraying, it's often necessary to design a flight path for the drone based on mission requirements and environmental information. For example, planning a path that allows the drone to traverse a selected area or avoid obstacles is crucial. A crucial prerequisite for autonomous drone control is obtaining navigation information. For these types of tasks, the most widely used navigation method is to obtain the drone's real-time geographic coordinates using satellite positioning systems such as the Global Positioning System, Beidou, and GLONASS. These coordinates are then compared with the target point's coordinates to determine the drone's flight direction and speed.
[0003] However, during actual drone operations, external disturbances such as wind and electromagnetic interference can cause flight control errors or errors, resulting in deviations between the actual flight path and the pre-planned path. Due to a lack of human intervention, drones are unable to accurately assess potential operational anomalies. Consequently, due to a failure to adjust control signals in a timely manner, the target point may be missed, leading to mission failure or even serious consequences. To ensure operational safety, drones must be able to monitor and correct their flight paths. This is crucial for the successful completion of autonomous drone missions. Furthermore, when drones operate in complex environments such as urban areas and forests, satellite positioning signals may exhibit significant errors or even be unreceivable. Obtaining accurate positioning information in such situations is an urgent issue.
[0004] A widely used and effective method for monitoring autonomous drone operations is to predict the drone's future location based on its actual flight path. If the error between the predicted value and the set target point exceeds a certain threshold, the drone's operation is considered abnormal.
[0005] Neural networks are able to extract relationships between data through their powerful ability to learn data features. This characteristic makes them widely used in motion trajectory prediction problems, with significant advantages in both prediction effectiveness and performance. Most prediction models are based on classic neural networks such as multi-layer perception, recurrent neural networks, long short-term memory networks, and convolutional neural networks. Prior art has proposed a constrained long short-term memory network for flight trajectory prediction. Constraints at different stages are proposed based on the dynamic characteristics of the aircraft, and the model is able to maintain long-term dependencies through dynamic physical constraints. Although research on object motion path prediction is relatively mature, limited research on using deep neural networks to predict drone flight paths is limited by the sudden change and complexity of drone motion. Summary of the Invention
[0006] To overcome the above problems, the purpose of the present invention is to provide a real-time prediction method for UAV flight paths based on a bidirectional long short-term memory network, which improves the accuracy of the prediction.
[0007] The present invention adopts the following scheme to achieve: a real-time prediction method for the flight path of an unmanned aerial vehicle based on a bidirectional long short-term memory network, the method comprising the following steps:
[0008] Step S1: collect GPS positioning data sequences of several autonomous UAVs flying along the same path, and use Bessel-based geodetic coordinate transformation and least squares fitting to perform data preprocessing to generate a model training data set;
[0009] Step S2: constructing a bidirectional long short-term memory path prediction model, and using the model training data set to train the path prediction model;
[0010] Step S3: Use the trained path prediction model in combination with the prediction model compensator based on the PID principle to predict the UAV flight path in real time.
[0011] Furthermore, the step S1 is further specifically as follows: step S11, using j complete UAV operation paths to form the original flight path dataset D used for the training model = {D1, D2, D i ...,D j}, where D i represents a sequence of coordinate sampling points arranged in chronological order along the i-th path; each GPS sampling point includes data in three dimensions, namely, latitude, longitude, and elevation; further, in step S12, the position of any point P on the earth is represented by the coordinates (B, L, H) in the geographic coordinate system, where B and L represent latitude and longitude, and H represents elevation; the coordinates of the drone in the geographic coordinate system obtained when using GPS positioning are represented by (B el ,L el ,H el)Indicate; use the Bessel geodetic coordinate transformation formula to convert the coordinates of the UAV in the geodetic coordinate system (B el , L el , H el ) into coordinates (x el , y el , z el ) in the navigation coordinate system in meters to achieve the unification of the data unit of each dimension of the three-dimensional position coordinates, and obtain the data set D′ = {D′1, D′2,..., d′ j}; where the Bessel geodetic coordinate transformation formula is:
[0012]
[0013] where a el , b el are the major axis and minor axis lengths of the earth respectively; B el , L el , H el are the latitude, longitude, and altitude of the UAV in the geodetic coordinate system;
[0014] Let e0 be the eccentricity of the earth, and its specific expression is:
[0015]
[0016] Then
[0017] Step S13: Divide D′ into D′ Train = {D′1, D′2,..., D′ q} and D′ Validation = {D′ q+1 , D′ q+2 ,..., D′ j} (q < j) according to the set ratio to generate the training set D′ Train for model training and the validation set D′ Validation for verifying the model performance;
[0018] Step S14: Assume that the path prediction model uses the nearest m position coordinates of the UAV flight to estimate the next n position coordinates, that is, the model input is [P k-m+1 ,..., P k-1 , P k , and the output is [P k+1 , P k+2 ,..., P k+n , P i (x i , y i , z i) represents the coordinates of the i-th frame GPS positioning information received by the drone after Bessel transformation, and the current moment corresponds to the k-th frame drone position coordinates, which is P k ; In order to obtain tensor data in the same form as the model input and output, a sliding window of size 3×(m+n) is set to traverse the coordinate point sequence of each path, and the sequence D′ of length l i We can get lm-n+1 matrices of the same size as the sliding window, and further get the model input matrix of shape 3×m and the model output matrix of shape 1×3n. Train and D′ Validation The matrices generated by the internal sequence constitute the training data set and the validation data set respectively. Furthermore, when the GPS module carried by the drone cannot be received normally and in a timely manner due to interference or communication delay, the model input sequence is missing data, or the positioning accuracy is poor, and the positioning information obtained has errors, which will affect the model prediction accuracy. The least squares fitting method is used to supplement and correct the position coordinate observation data; considering the balance between fitting error and calculation time, the quadratic function is used as the fitting objective function; at the same time, the calibration threshold ε is set to obtain the difference between the position coordinate observation value obtained by the positioning module and the fitting objective function value. When the difference is greater than ε, the observation value has an error, so it is replaced by the fitting objective function value, which can correct the abnormal value of the data to a certain extent.
[0019] Normalize the data of each dimension according to the following formula:
[0020]
[0021] Among them, v i Represents the i-th data in one dimension, v max and v min is the maximum and minimum value of the data in this dimension, Normalize the data; normalization can ensure that the features of each dimension contribute equally to the prediction results, thereby improving the accuracy of model prediction.
[0022] Furthermore, step S2 is further specifically as follows: the bidirectional long short-term memory network is composed of a BiLSTM layer, a Dropout layer, a fully connected layer, and an activation layer. The BiLSTM layer is used to extract the correlation features between the data at different time steps of the path time series; the Dropout layer can remove some network units according to a certain probability during each training to reduce the dependency between different units, thereby preventing the model from overfitting the path data used for training and improving the generalization ability of the flight path under different operating conditions each time; the fully connected layer integrates the extracted sequence features, and the activation layer completes the nonlinear mapping from the features to the prediction results; using the rectified linear unit as the activation function in the activation layer helps to accelerate the convergence speed and calculation speed of the model;
[0023] The prediction model is trained using the error back propagation algorithm. The training data is input into the model according to the set batch size, and the model's predicted value is obtained through forward calculation. The predicted value is used to calculate the loss function value together with the true value of the data. On this basis, the network weight parameters are updated according to the gradient size obtained by the error back propagation algorithm. The training data set is trained in this way in a loop until the set training cycle is completed. The training optimizer uses the Adam optimizer, and the mean square error is used as the loss function of the model. The loss function formula is:
[0024]
[0025] Among them, DL is the dataset size, y i is the true value of the data, is the data prediction value. Furthermore, the step S3 is further specified as follows: according to the output characteristics of the bidirectional long short-term memory network, a prediction model compensator based on the proportional integral differential error control theory is set to provide a compensation value for the model prediction result; in order to obtain the prediction error, it is necessary to record each output result of the model and compare it with the subsequently received observation value; set the model prediction period to be the same as the GPS signal sampling period, that is, a prediction is made every time a frame of positioning information is obtained; the model uses the most recently obtained m position coordinates to estimate the next n position coordinates, so during the operation of the drone, the model receives the coordinates P. m Start prediction, from receiving coordinates P m+n When , the predicted value can be compared with the true value to obtain the prediction error at each time step; Represents the coordinate point P obtained by the prediction model i Initial prediction value; when the ground station receives the coordinate P k (k≥m+n), calculate the predicted values of the nearest m coordinates obtained by the prediction model Its true value [P k-n+1 ,...,P k-1 ,P kThe difference between ] k ; then the compensation value CV of the model prediction result k The calculation formula is expressed as:
[0026] CV k =K P ·e k +K I ·(e k +e k-1 )·δ+K D ·(e k -e k-1 ) / δ
[0027] Where K P , K I and K D are proportional, integral, and differential coefficients respectively; see CV k It consists of three parts; the first part is the proportional coefficient K P and error e k The product of is used to generate the reference compensation value; the second part is the integral coefficient K I The product of the accumulated error value within a certain period of time is used to eliminate the steady-state error of the prediction model; and the last part is the differential coefficient K D The product of the two most recent prediction error change rates is used to adjust the compensation value according to the error change to avoid too large a compensation amplitude. This plays an important role in accelerating the response speed of the prediction model compensator when the error information is delayed. The model output result and the compensation value are added to obtain the final coordinate prediction sequence. These predicted coordinate sequences are the flight paths of the UAV.
[0028] The beneficial effects of the present invention are as follows: To address the issue of flight safety monitoring during autonomous drone operations, the present invention proposes an error-compensated BiLSTM network path prediction model based on Bessel geodetic coordinate transformation. The monitoring system is deployed at a ground station with high hardware computing power. By using the Bessel geodetic coordinate transformation formula, the latitude, longitude, and elevation positioning information collected by GPS is converted into a navigation coordinate system with a unified unit, which facilitates the neural network's extraction of correlation features between data of various dimensions. When processing data, a least squares fitting method is used to address the problems of missing data and large errors. On this basis, a Bessel-BiLSTM network and a prediction model compensator based on the PID principle are designed. The output of the Bessel-BiLSTM network serves as the baseline value for the prediction result. The compensator corrects the model prediction result based on the observed prediction error, thereby obtaining a more accurate coordinate prediction sequence. Experimental results based on a dataset consisting of actual drone flight paths show that the prediction model proposed in the present invention can accurately predict the drone's flight path within a certain period of time using only GPS positioning information. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a schematic flow chart of the method of the present invention.
[0030] Figure 2 It is a schematic diagram of the position relationship of the UAV of the present invention in the geographic coordinate system and the navigation coordinate system.
[0031] Figure 3 1 is a framework diagram of a UAV operation monitoring system according to one embodiment of the present invention.
[0032] Figure 4 1 is a schematic diagram of a bidirectional long short-term memory network according to an embodiment of the present invention.
[0033] Figure 5 It is a schematic diagram of the process of implementing the back propagation algorithm for training the prediction model of the present invention.
[0034] Figure 6 It is a flow chart of the present invention combining a prediction model compensator based on PID principle to predict the flight path of a UAV in real time. DETAILED DESCRIPTION
[0035] The present invention will be further described below with reference to the accompanying drawings.
[0036] See also Figure 1 As shown, a real-time prediction method for UAV flight path based on a bidirectional long short-term memory network is provided, and the method comprises the following steps:
[0037] Step S1: collect GPS positioning data sequences of several autonomous UAVs flying along the same path, and use Bessel-based geodetic coordinate transformation and least squares fitting to perform data preprocessing to generate a model training data set;
[0038] The step S1 is further specifically as follows: Step S11, using j complete UAV operation paths to form the original flight path dataset D used for the training model = {D1, D2, D i ...,D j}, where D i Represents the sequence of coordinate sampling points of the i-th path arranged in time order; each GPS sampling point includes three-dimensional data, namely latitude, longitude and elevation;
[0039] Step S12: The position of any point P on the earth is represented by the coordinates (B, L, H) in the geographic coordinate system, where B and L represent latitude and longitude, and H represents elevation. The coordinates of the drone in the geographic coordinate system obtained when using GPS positioning are represented by (b el ,L el ,H el ) represents; the coordinates of the UAV in the geographic coordinate system (B el ,L el ,H el ) is converted to the coordinates in meters in the navigation coordinate system (x el ,y el ,z el ) to achieve the unification of the data units of each dimension of the three-dimensional position coordinates, and obtain the data set D′={D′1,D′2,...,D′ j}; Among them, the Bessel geodetic coordinate transformation formula is:
[0040]
[0041] like Figure 2 As shown, where a el 、b el are the lengths of the Earth's major and minor axes respectively; B el ,L el ,H el It is the latitude, longitude and elevation of the UAV in the geographic coordinate system;
[0042] Let e0 be the eccentricity of the Earth, its specific expression is:
[0043]
[0044] but
[0045] Step S13: Divide D' into D' Train ={D'1, D'2,..., D' q} and D' Validation ={D' q+1 , D' q+2 ,..., D' j} (q < j) in accordance with the set ratio to generate a training set D' Train for model training and a validation set D' Validation for validating the model performance; when using the model for coordinate prediction, the ground station sets a window of corresponding size to select the positioning information of several recent sampling moments, and uses the tensor data that has undergone data fitting supplementation and correction, Bessel transformation, and normalization processing as the input of the prediction model. It should be noted that the ground station needs to update the maximum and minimum values of each dimension of the data in real time according to the newly obtained position observation information to ensure that the data normalization result is within the interval (0, 1).
[0046] Step S14: Assume that the path prediction model uses the nearest m position coordinates of the UAV flight to estimate the next n position coordinates, that is, the model input is [P k-m+1 ,..., P k-1 , P k , and the output is [P k+1 , P k+2 ,..., P k+n , where P i (x i , y i , z i ) represents the coordinates obtained by Bessel transformation of the i-th frame of GPS positioning information received by the UAV, and the position coordinates of the UAV at the current moment corresponding to the k-th frame are P<00 / / k ; to obtain tensor data in the same form as the model input and output, a sliding window of size 3×(m + n) is set to traverse the coordinate point sequence of each path, and a sequence D' i of length l can obtain l - m - n + 1 matrices of the same size as the sliding window, and further obtain a model input with a shape of 3×m and a model output matrix with a shape of 1×3n. The matrices generated from the sequences in D' Train and D' Validation respectively form the training data set and the validation data set.
[0047] Due to the limited computing power of the UAV on-board processor, which cannot meet the computing power requirements of deep learning tasks, the UAV path prediction is completed at the ground station. The ground station deploys a database for storing the planned path and flight data of the UAV, as well as a path prediction model. The framework of the UAV operation monitoring system designed in this patent is as Figure 3The process of UAV path prediction can be described as follows: the UAV sends the received positioning information to the ground station through the data transmission module. The ground station sorts the coordinate points according to the timestamp of the data frame to obtain the UAV flight path observation value, and uses this sequence as the model input data to obtain the UAV position prediction value.
[0048] Furthermore, when the GPS module onboard the drone cannot be received in a timely and normal manner due to interference or communication delay, resulting in missing data in the model input sequence or poor positioning accuracy, the obtained positioning information has errors, which will affect the model prediction accuracy. In this case, the least squares fitting method is used to supplement and correct the position coordinate observation data; considering the balance between fitting error and calculation time, the quadratic function is used as the fitting objective function; at the same time, a calibration threshold ε is set to obtain the difference between the position coordinate observation value obtained by the drone positioning module and the fitting objective function value. When the difference is greater than ε, the observation value has an error, so it is replaced by the fitting objective function value, which can correct the data abnormalities to a certain extent.
[0049] Normalize the data of each dimension according to the following formula:
[0050]
[0051] Among them, v i Represents the i-th data in one dimension, v max and v min is the maximum and minimum value of the data in this dimension, Normalize the data; normalization can ensure that the features of each dimension contribute equally to the prediction results, thereby improving the accuracy of model prediction.
[0052] Step S2: constructing a bidirectional long short-term memory path prediction model, and using the model training data set to train the path prediction model;
[0053] like Figure 4 As shown, step S2 is further specifically as follows: the bidirectional long short-term memory network is composed of a BiLSTM layer, a Dropout layer, a fully connected layer, and an activation layer. The BiLSTM layer is used to extract the correlation features between the data at different time steps of the path time series; the Dropout layer can remove some network units according to a certain probability during each training to reduce the dependency between different units, thereby preventing the model from overfitting the path data used for training and improving the generalization ability of the flight path under different operating conditions each time; the fully connected layer integrates the extracted sequence features, and the activation layer completes the nonlinear mapping from the features to the prediction results; the activation layer uses the rectified linear unit (ReLU) as the activation function, which helps to accelerate the convergence speed and calculation speed of the model;
[0054] The ReLU function expression is:
[0055] f(x)=max(0,x)
[0056] The training of the prediction model is implemented using the error back propagation algorithm. The training data is input into the model according to the set batch size, and the predicted value of the model is obtained through forward calculation. The predicted value is used to calculate the loss function value together with the true value of the data. On this basis, the network weight parameters are updated according to the gradient size obtained by the error back propagation algorithm, such as Figure 5 As shown, the training data set is trained in the above manner (the above manner is: the training data is input into the model according to the set batch size, the predicted value of the model is obtained through forward calculation, the predicted value is used to calculate the loss function value together with the true value of the data, and the network weight parameters are updated based on the gradient size obtained by the error back propagation algorithm) until the set training cycle is completed; the training optimizer adopts the Adam optimizer, and the mean square error is used as the loss function of the model. The loss function formula is:
[0057]
[0058] Among them, DL is the dataset size, y i is the true value of the data, The predicted value of the data.
[0059] Step S3: Use the trained path prediction model in combination with the prediction model compensator based on the PID principle to predict the UAV flight path in real time.
[0060] like Figure 6 As shown, the step S3 is further specifically as follows: according to the output characteristics of the bidirectional long short-term memory network, a prediction model compensator based on the proportional integral differential error control theory is set to provide a compensation value for the model prediction result; in order to obtain the prediction error, it is necessary to record each output result of the model and compare it with the subsequently received observation value; set the model prediction period to be the same as the GPS signal sampling period, that is, a prediction is made every time a frame of positioning information is obtained; the model uses the most recently obtained m position coordinates to estimate the next n position coordinates, so during the operation of the drone, the model receives the coordinates P. m Start prediction, from receiving coordinates P m+n When , the predicted value can be compared with the true value to obtain the prediction error at each time step; Represents the coordinate point P obtained by the prediction model i Initial prediction value; when the ground station receives the coordinate P k (k≥m+n), calculate the predicted values of the nearest m coordinates obtained by the prediction model Its true value [Pk-n+1 ,...,P k-1 ,P k The difference between ] k ; then the compensation value CV of the model prediction result k The calculation formula is expressed as:
[0061] CV k =K P ·e k +K I ·(e k +e k-1 )·δ+K D ·(e k -e k-1 ) / δ
[0062] Where K P , K I and K D are proportional, integral, and differential coefficients respectively; see CV k It consists of three parts; the first part is the proportional coefficient K P and error e k The product of is used to generate the reference compensation value; the second part is the integral coefficient K I The product of the accumulated error value within a certain period of time is used to eliminate the steady-state error of the prediction model; and the last part is the differential coefficient K D The product of the two most recent prediction error change rates is used to adjust the compensation value according to the error change to avoid too large a compensation amplitude. This plays an important role in accelerating the response speed of the prediction model compensator when the error information is delayed. The model output result and the compensation value are added to obtain the final coordinate prediction sequence. These coordinate prediction sequences are the flight paths of the UAV. During the operation, the UAV obtains positioning information at a sampling frequency of δ.
[0063] In summary, this paper addresses the issue of flight safety monitoring for autonomous drones and proposes an error-compensated BiLSTM network path prediction model based on Bessel geodetic coordinate transformation. The monitoring system is deployed at a ground station with high hardware computing power. Using the Bessel geodetic coordinate transformation formula, the latitude, longitude, and elevation positioning information collected by GPS is converted to a navigation coordinate system with a unified unit, which facilitates the neural network's extraction of correlation features between data of various dimensions. When processing data, a least-squares fitting method is used to address the issues of missing data and large errors. On this basis, a Bessel-BiLSTM network and a prediction model compensator based on the PID principle are designed. The output of the Bessel-BiLSTM network serves as the baseline value for the prediction result. The compensator corrects the model prediction result based on the observed prediction error, thereby obtaining a more accurate coordinate prediction sequence. Experimental results based on a dataset consisting of actual drone flight paths show that the prediction model proposed in this paper can accurately predict the drone's flight path within a certain period of time using only GPS positioning information.
[0064] The above description is only a preferred embodiment of the present invention. All equivalent changes and modifications made according to the scope of the patent application of the present invention should fall within the scope of the present invention.
Claims
1. A real-time prediction method for UAV flight paths based on a bidirectional long short-term memory network, characterized by: The method comprises the following steps: Step S1: Collect GPS positioning data sequences from several autonomous UAV flights along the same path, and use Bessel-based geodetic coordinate transformation and least squares fitting to perform data preprocessing to generate a model training data set; the least squares fitting is used for data preprocessing only when the GPS module on the UAV cannot receive data in a timely and normal manner due to interference or communication delay; When the GPS module receives data normally, it directly uses Bessel-based geodetic coordinate transformation for data preprocessing; Step S2: constructing a bidirectional long short-term memory path prediction model, and using the model training data set to train the path prediction model; Step S3: Use the trained path prediction model and the prediction model compensator based on the PID principle to predict the UAV flight path in real time; The step S3 is further specifically as follows: setting a prediction model compensator based on proportional integral differential error control theory according to the output characteristics of the bidirectional long short-term memory network to provide a compensation value for the model prediction result; recording each output result of the model and comparing it with the subsequently received observation value; setting the model prediction period to be the same as the GPS signal sampling period, that is, performing a prediction once each frame of positioning information is obtained; The model uses the most recently acquired m position coordinates to estimate the next n position coordinates, so during the drone operation, the model receives the coordinates P m Start prediction, from receiving coordinates P m+n When , we can compare the predicted value with the true value to obtain the prediction error at each time step; Represents the coordinate point P obtained by the prediction model i Initial prediction value; when the ground station receives the coordinate P k When k≥m+n, calculate the predicted values of the latest m coordinates obtained by the prediction model Its true value [P k-n+1 ,...,P k-1 ,P k The difference between ] k ; then the compensation value CV of the model prediction result k The calculation formula is expressed as: CV k =K P ·e k +K I ·(e k +e k-1 )·δ+K D ·(e k -e k-1 ) / δ Where K P , K I and K D are proportional, integral and differential coefficients respectively; among which CV k It consists of three parts; the first part is the proportional coefficient K P and error e k The product of is used to generate the reference compensation value; the second part is the integral coefficient K I The product of the accumulated error value within a certain period of time is used to eliminate the steady-state error of the prediction model; and the last part is the differential coefficient K D The product of the change rate of the two most recent prediction errors is used to adjust the compensation value according to the error change to avoid too large a compensation amplitude. The model output result and the compensation value are added to obtain the final coordinate prediction sequence. These predicted coordinate sequences are the flight paths of the UAV.
2. The method for real-time prediction of UAV flight paths based on a bidirectional long short-term memory network according to claim 1 is characterized by: The step S1 is further specifically as follows: Step S11, using j complete UAV operation paths to form the original flight path dataset D used for the training model = {D1, D2, D i ...,D j }, where D i Represents the sequence of coordinate sampling points of the i-th path arranged in time order; each GPS sampling point includes three-dimensional data, namely latitude, longitude and elevation; Step S12: The position of any point P on the earth is represented by the coordinates (B, L, H) in the geographic coordinate system, where B and L represent latitude and longitude, and H represents elevation; The coordinates of the UAV in the geographic coordinate system obtained when using GPS positioning are (B el ,L el ,H el ) represents; the coordinates of the UAV in the geographic coordinate system (B el ,L el ,H el ) is converted to the coordinates in meters in the navigation coordinate system (x el ,y el ,z el ) to achieve the unification of the data units of each dimension of the three-dimensional position coordinates, and obtain the data set D′={D′1,D′2,...,D′ j }; Among them, the Bessel geodetic coordinate conversion formula is: where a el 、b el are the lengths of the Earth's major and minor axes respectively; B el ,L el ,H el It is the latitude, longitude and elevation of the UAV in the geographic coordinate system; Let e0 be the eccentricity of the Earth, its specific expression is: but Step S13: Divide D' into D' Train ={D'1, D'2,..., D' q} and D' Validation ={D' q+1 , D' q+2 ,..., D' j}(q < j) to generate a training set D' Train for model training and a validation set D' Validation for validating the model performance; Step S14: Assume that the path prediction model uses the most recent m position coordinates of the UAV to estimate the next n position coordinates, that is, the model input is [P k-m+1 ,...,P k-1 ,P k ], the output is [P k+1 ,P k+2 ,...,P k+n ], P i (x i ,y i ,z i ) represents the coordinates of the i-th frame GPS positioning information received by the drone after Bessel transformation, and the current moment corresponds to the k-th frame drone position coordinates, which is P k ; In order to obtain tensor data in the same form as the model input and output, a sliding window of size 3×(m+n) is set to traverse the coordinate point sequence of each path, and the sequence D′ of length l i We can get lm-n+1 matrices of the same size as the sliding window, and further get the model input matrix of shape 3×m and the model output matrix of shape 1×3n. Train and D′ Validation The matrices generated by the inner sequence constitute the training data set and the validation data set respectively.
3. The method for real-time prediction of UAV flight paths based on a bidirectional long short-term memory network according to claim 2 is characterized by: When the GPS module onboard the drone is unable to receive data in a timely and normal manner due to interference or communication delay, resulting in missing data in the model input sequence or poor positioning accuracy, resulting in errors in the obtained positioning information, the least squares fitting method is used to supplement and correct the position coordinate observation data; considering the balance between fitting error and calculation time, the quadratic function is used as the fitting objective function; at the same time, a calibration threshold ε is set to obtain the difference between the position coordinate observation value obtained by the positioning module and the fitting objective function value. When the difference is greater than ε, the observation value has an error, so the fitted objective function value is used instead; Normalize the data of each dimension according to the following formula: Among them, v i Represents the i-th data in one dimension, v max and v min is the maximum and minimum value of the data in this dimension, is the normalized data.
4. The method for real-time prediction of UAV flight paths based on a bidirectional long short-term memory network according to claim 1 is characterized by: The step S2 is further specifically as follows: the bidirectional long short-term memory network is composed of a BiLSTM layer, a Dropout layer, a fully connected layer and an activation layer, wherein the BiLSTM layer is used to extract correlation features between data at different time steps of the path time series; The Dropout layer can remove some network units with a certain probability during each training to reduce the dependencies between different units, thereby preventing the model from overfitting the path data used in training. The fully connected layer integrates the extracted sequence features, and the activation layer completes the nonlinear mapping from features to prediction results. The rectified linear unit is used as the activation function in the activation layer. The prediction model is trained using the error back propagation algorithm. The training data is input into the model according to the set batch size. The predicted value of the model is obtained through forward calculation. The predicted value is used to calculate the loss function value together with the true value of the data. On this basis, the network weight parameters are updated according to the gradient size obtained by the error back propagation algorithm. The above method is repeated to train the training data set until the set training cycle is completed. The training optimizer uses the Adam optimizer and the mean square error is used as the loss function of the model. The loss function formula is: Among them, DL is the dataset size, y i is the true value of the data, Predicted value for the data.
Citation Information
Patent Citations
Unmanned plane remote measurement parameter correction method based on on-line calibration
CN105180963A
An unmanned aerial vehicle flight state prediction method and system based on LSTM
CN109034376A