Heading angle determination method and device based on at-lstm
Patent Information
- Application Number
- CN202610941204.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-27
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]然而,在实际复杂环境中,GNSS信号的脆弱性严重制约了姿态角融合的可靠性
[0019]与现有技术相比,本发明提供的基于AT-LSTM的航向角确定方法及装置,通过携带有航向角增量标签的至少一个训练样本,对AT-LSTM训练得到的增量预测模型,其中,训练样本包括基于INS采集的历史原始传感数据确定的历史INS航向角,航向角增量标签为历史INS航向角与历史INS航向角对应的历史GNSS航向角的差值,可以使增量预测模型凭借AT-LSTM的时序特征提取与关键信息处理能力的优势,能够提高增量预测模型预测GNSS航向角的鲁棒性与精确性,进而在GNSS与卫星通信中断的情况下,通过当前时刻的INS航向角和训练好的增量预测模型,构建伪GNSS姿态信号,即目标设备当前时刻的GNSS航向角,进而基于当前时刻的INS航向角和当前时刻的GNSS航向角确定目标设备的实际航向角,实现了更精准地对INS航向角误差进行补偿,抑制航向角等姿态角的发散,在复杂环境下更稳定地恢复出高精度的载体姿态角信息。
Smart Images

Figure CN122590794A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of integrated navigation technology, and in particular to a method and apparatus for determining heading angle based on AT-LSTM. Background Technology
[0002] In fields such as unmanned aerial vehicles (UAVs), autonomous vehicles, and mobile robots, the stable acquisition of high-precision attitude angles (heading, pitch, and roll) is a core prerequisite for achieving autonomous navigation and mission execution. The combined navigation technology of Global Navigation Satellite System (GNSS) and Inertial Navigation System (INS), leveraging the absolute attitude reference provided by GNSS and the high-frequency dynamic calculation capabilities of INS, has become the mainstream attitude angle calculation solution.
[0003] However, in complex real-world environments, the vulnerability of GNSS signals severely restricts the reliability of attitude angle fusion. In typical scenarios such as urban canyons, forest cover, tunnel travel, or man-made electromagnetic interference, satellite signals are prone to obstruction, multipath reflection, or complete interruption, leading to jumps, delays, or even failures in GNSS attitude observation data. In these situations, the integrated navigation system degenerates into an independent INS-dominated mode, where attitude angle errors, especially heading angle errors, rapidly diverge due to the "error amplification effect" of integration. Under strong maneuvers, the random noise errors from UAV sharp turns can further cause drastic fluctuations in attitude angles, ultimately leading to navigation system inaccuracies or even loss of control. For UAVs, a heading angle error exceeding 2° can cause excessive course deviation, and exceeding 5° can lead to obstacle avoidance failure. Therefore, how to suppress the divergence of INS attitude angle errors during GNSS signal interruptions has become a critical bottleneck that integrated navigation technology urgently needs to overcome. Summary of the Invention
[0004] To address the aforementioned technical problems, this invention provides a method and apparatus for determining heading angle based on AT-LSTM.
[0005] In a first aspect, the present invention provides a method for determining heading angle based on AT-LSTM, comprising: Based on the raw sensor data collected by the inertial navigation system (INS) at the current moment, the heading angle is predicted to obtain the INS heading angle of the target device at the current moment; In the event of a GNSS communication interruption, the GNSS heading angle of the target device at the current moment is determined based on the INS heading angle at the current moment and the trained incremental prediction model. The incremental prediction model is obtained by training a long short-term memory network (AT-LSTM) based on a self-attention mechanism on at least one training sample carrying a heading angle increment label. The training sample includes historical INS heading angles determined based on historical raw sensor data collected by the INS. The heading angle increment label is the difference between the historical INS heading angle and the historical GNSS heading angle corresponding to the historical INS heading angle. Based on the INS heading angle and the GNSS heading angle at the current time, the actual heading angle of the target device is determined.
[0006] In some embodiments, determining the GNSS heading angle of the target device at the current moment based on the INS heading angle at the current moment and the trained incremental prediction model includes: Based on the INS heading angle at the current moment, incremental prediction is performed using the incremental prediction model to obtain the GNSS heading angle increment; Based on the GNSS heading angle increment and the GNSS heading angle of the target device at the previous moment, the GNSS heading angle of the target device at the current moment is determined.
[0007] In some embodiments, the step of obtaining the GNSS heading angle increment by performing incremental prediction using a trained incremental prediction model based on the INS heading angle at the current moment includes: Based on the INS heading angle at the current moment, the gyroscope measurement data and accelerometer measurement data in the raw sensor data at the current moment, the predicted data for the current moment is constructed. A prediction dataset is constructed based on the prediction data from the n times prior to the current time and the prediction data at the current time, where n is a natural number; The predicted dataset is input into the incremental prediction model to perform incremental prediction, thereby obtaining the GNSS heading angle increment.
[0008] In some embodiments, inputting the prediction dataset into the incremental prediction model to perform incremental prediction and obtain the GNSS heading angle increment includes: The prediction dataset is input into the long short-term memory network of the incremental prediction model. The prediction data at each time step in the prediction dataset is processed by the k cascaded hidden layers in the long short-term memory network to obtain the hidden vector corresponding to each time step, k=n+1. The hidden vectors corresponding to each time point are input into the self-attention mechanism of the incremental prediction model for attention weight calculation and normalization processing to obtain the attention weight coefficients corresponding to each time point. Based on the attention weight coefficients corresponding to each time point, the hidden vectors corresponding to each time point are weighted and summed to obtain the GNSS heading angle increment.
[0009] In some embodiments, the training process of the incremental prediction model includes: Acquire the historical heading information collected by the GNSS and the historical raw sensor data of the target device collected by the INS; Based on the historical heading information, at least one historical GNSS heading angle is determined, and based on the historical raw sensor data, at least one historical INS heading angle, at least one historical gyroscope measurement data, and at least one historical accelerometer measurement data are determined. From the at least one historical GNSS heading angle, the at least one historical INS heading angle, the at least one historical gyroscope measurement data, and the at least one historical accelerometer measurement data, at least one data set is obtained, wherein the data set contains historical GNSS heading angle, historical INS heading angle, historical gyroscope measurement data, and historical accelerometer measurement data collected at the same time; For any of the data sets, based on the historical INS heading angle, the historical gyroscope measurement data, and the historical accelerometer measurement data in the data set, a training sample corresponding to the data set is constructed, and the deviation between the historical GNSS heading angle and the historical INS heading angle in the data set is determined as the heading angle increment label carried by the training sample. Based on each training sample carrying the heading angle increment label, the AT-LSTM is trained in multiple rounds to obtain the trained incremental prediction model.
[0010] In some embodiments, determining the actual heading angle of the target device based on the INS heading angle and the GNSS heading angle at the current time includes: Based on the INS heading angle and the GNSS heading angle at the current time, determine the first heading angle error; The second heading angle error is determined based on the first heading angle error and the Kalman filter; The actual heading angle is determined based on the second heading angle error and the INS heading angle.
[0011] In some embodiments, determining the second heading angle error based on the first heading angle error and the Kalman filter includes: Based on the first heading angle error, the gyroscope three-axis zero bias and the accelerometer three-axis zero bias in the INS, the initial state vector at the current moment is constructed; The initial state vector at the current moment is input into the Kalman filter for noise and drift suppression to obtain the second heading angle error.
[0012] In some embodiments, the step of inputting the initial state vector at the current moment into the Kalman filter for noise and drift suppression to obtain the second heading angle error includes: Based on the initial state vector at the current moment and the state equation corresponding to the Kalman filter, the state transition matrix from the previous moment to the current moment is determined, and based on the initial state vector at the current moment and the measurement equation corresponding to the Kalman filter, the observation matrix at the current moment is determined. Based on the state transition matrix and the state vector of the previous time step in the Kalman filter, the one-step state vector of the current time step is determined, and based on the mean square error of the state transition matrix and the mean square error of the previous time step in the Kalman filter, the one-step state prediction mean square error of the current time step is determined. Based on the mean square error of the one-step state prediction at the current time and the observation matrix at the current time, the gain of the Kalman filter at the current time is determined; Based on the gain at the current moment and the one-step state vector at the current moment, the target state vector at the current moment is determined, and the target state vector at the current moment includes the second heading angle error.
[0013] In some embodiments, after determining the gain of the Kalman filter at the current time based on the mean square error of the one-step state prediction at the current time and the observation matrix at the current time, the method further includes: The mean square error at the current moment is determined based on the mean square error of the one-step state prediction at the current moment, the observation matrix at the current moment, and the gain at the current moment.
[0014] In some embodiments, the process of predicting the heading angle based on the raw sensor data acquired by the INS at the current moment to obtain the INS heading angle of the target device at the current moment includes: Error correction is performed on the original sensing data at the current moment to obtain the corrected original sensing data; Based on the corrected original sensor data, a mechanical arrangement algorithm is used to predict the heading angle, and the INS heading angle at the current moment is obtained.
[0015] Secondly, the present invention also provides a heading angle determination device based on AT-LSTM, comprising: The prediction module is configured to predict the heading angle based on the raw sensor data collected by the INS at the current moment, and obtain the INS heading angle of the target device at the current moment. The first determining module is configured to, in the event of GNSS and satellite communication interruption, determine the GNSS heading angle of the target device at the current moment based on the INS heading angle at the current moment and a trained incremental prediction model. The incremental prediction model is obtained by training an AT-LSTM based on at least one training sample carrying a heading angle increment label. The training sample includes historical INS heading angles determined based on historical raw sensor data collected by the INS. The heading angle increment label is the difference between the historical INS heading angle and the historical GNSS heading angle corresponding to the historical INS heading angle. The second determining module is configured to determine the actual heading angle of the target device based on the INS heading angle and the GNSS heading angle at the current time.
[0016] Thirdly, the present invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to implement the AT-LSTM-based heading angle determination method described in the first aspect above.
[0017] Fourthly, 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 the AT-LSTM-based heading angle determination method described in the first aspect above.
[0018] Fifthly, the present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the AT-LSTM-based heading angle determination method described in the first aspect above.
[0019] Compared with existing technologies, the AT-LSTM-based heading angle determination method and apparatus provided by this invention uses at least one training sample carrying a heading angle increment label to train an incremental prediction model obtained by AT-LSTM. The training sample includes historical INS heading angles determined based on historical raw sensor data collected by INS. The heading angle increment label is the difference between the historical INS heading angle and the corresponding historical GNSS heading angle. This allows the incremental prediction model to leverage the advantages of AT-LSTM's temporal feature extraction and key information processing capabilities, improving the robustness and accuracy of the incremental prediction model in predicting GNSS heading angles. Furthermore, even in the event of GNSS and satellite communication interruption, a pseudo-GNSS attitude signal, i.e., the target device's current GNSS heading angle, is constructed using the current INS heading angle and the trained incremental prediction model. Based on the current INS and GNSS heading angles, the actual heading angle of the target device is determined, achieving more accurate compensation for INS heading angle errors, suppressing divergence in heading angles and other attitude angles, and more stably recovering high-precision carrier attitude angle information in complex environments.
[0020] Details of one or more embodiments of the present invention are set forth in the following drawings and description to make other features, objects and advantages of the invention more readily apparent. Attached Figure Description
[0021] The accompanying drawings, which are provided to further illustrate the invention, constitute a part of this invention. Those skilled in the art will recognize that other drawings can be derived from these drawings without any inventive effort. The illustrative embodiments and descriptions of the invention are used to explain the invention and do not constitute an undue limitation thereof.
[0022] Figure 1 This is one of the flowcharts illustrating the heading angle determination method based on AT-LSTM provided by this invention.
[0023] Figure 2 This is a schematic diagram of the incremental prediction model provided by the present invention.
[0024] Figure 3 This is a flowchart illustrating the training incremental prediction model provided by the present invention.
[0025] Figure 4 This is the second flowchart of the heading angle determination method based on AT-LSTM provided by the present invention.
[0026] Figure 5 This is the third flowchart of the heading angle determination method based on AT-LSTM provided by this invention.
[0027] Figure 6 This is a schematic diagram illustrating the effect of the present invention in verifying the accuracy of incremental prediction.
[0028] Figure 7 This is a schematic diagram illustrating the effect of the ablation experiment provided by the present invention.
[0029] Figure 8 This is a schematic diagram illustrating the effect of the interruption simulation experiment provided by the present invention.
[0030] Figure 9 This is a comparison chart of the effects of multi-model compensation provided by the present invention.
[0031] Figure 10 This is a schematic diagram of the heading angle determination device based on AT-LSTM provided by the present invention.
[0032] Figure 11 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0033] To more clearly understand the objectives, technical solutions, and advantages of this invention, the technical solutions of this invention will be clearly and completely described and explained below with reference to the accompanying drawings and embodiments. Obviously, the described embodiments are only some embodiments of this invention, not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0034] Unless otherwise defined, the technical or scientific terms used in this invention shall have the general meaning understood by one of ordinary skill in the art to which this invention pertains. Words such as “a,” “an,” “an,” “the,” “the,” and “these” used in this invention do not indicate quantitative limitation and may be singular or plural. The terms “comprising,” “including,” “having,” and any variations thereof used in this invention are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or modules (units) is not limited to the listed steps or modules (units) but may include steps or modules (units) not listed, or may include other steps or modules (units) inherent to these processes, methods, products, or devices. The terms “connected,” “linked,” and “coupled” used in this invention are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. “A plurality” used in this invention refers to two or more. “And / or” describes the relationship between related objects, indicating that three relationships may exist; for example, “A and / or B” can represent: A alone, A and B simultaneously, and B alone. Normally, the character " / " indicates that the objects before and after it are in an "or" relationship. The terms "first," "second," "third," etc., used in this invention are merely for distinguishing similar objects and do not represent a specific ordering of the objects.
[0035] First, a brief description of the relevant content involved in this invention will be given.
[0036] GNSS provides absolute heading angles through differential or carrier phase observation of satellite signals, with an accuracy of 0.1° to 1°. INS, on the other hand, relies on angular velocity and linear acceleration measurements from gyroscopes and accelerometers, and outputs the real-time rate of change of attitude angles through integration calculations, possessing millisecond-level update frequencies and short-term high-dynamic tracking capabilities. Theoretically, the fusion of the two can achieve the dual advantages of "absolute accuracy + dynamic response," meeting the attitude angle requirements in complex scenarios.
[0037] To suppress INS attitude angle error divergence during GNSS signal interruptions, traditional GNSS / INS attitude angle fusion relies heavily on Kalman filters (KF) and their variants (such as extended Kalman filters and unscented Kalman filters) for error estimation and compensation.
[0038] However, the above methods, which are based on linearization assumptions and noise statistical characteristics modeling, can effectively fuse multi-source information when GNSS signals are continuous, but they expose two major limitations in complex scenarios: First, when GNSS signals are interrupted, the filter measurement update link is missing, and only open-loop prediction can be performed through the prior information of the INS error model, which cannot dynamically correct model mismatch and deviation between the actual sensor error and the assumed statistical characteristics; Second, traditional methods are insufficient in modeling nonlinear errors, attitude coupling errors under strong maneuvers, and time-varying characteristics of gyroscope zero bias caused by temperature drift, making it difficult to accurately describe the dynamic evolution of INS attitude increment error, resulting in limited heading angle compensation effect.
[0039] In addition, existing research attempts to improve robustness by introducing auxiliary sensors such as magnetometers, vision, or odometers. However, magnetometers are susceptible to ferromagnetic interference, vision fails in low light / texture-deficient environments, and odometers are significantly affected by slippage. These studies have not fundamentally solved the core problem of INS attitude angle error divergence when GNSS is interrupted.
[0040] To address the above problems, this invention provides a heading angle determination method based on AT-LSTM.
[0041] The heading angle determination method and apparatus based on AT-LSTM of the present invention are described below with reference to the accompanying drawings.
[0042] Figure 1 This is one of the flowcharts illustrating the heading angle determination method based on AT-LSTM provided by this invention, such as... Figure 1 As shown, the AT-LSTM-based heading angle determination method includes the following steps 101 to 104.
[0043] Step 101: Based on the raw sensor data collected by the INS at the current moment, predict the heading angle to obtain the INS heading angle of the target device at the current moment.
[0044] It should be noted that the implementing entity of this invention can be a combined navigation system, which includes INS and GNSS. The combined navigation system can be installed on the target device.
[0045] Specifically, the target device can be an unmanned aerial vehicle, an autonomous vehicle, or a mobile robot.
[0046] In practical applications, the target device is equipped with onboard INS and GNSS, so relevant data of the target device can be obtained through the INS and GNSS installed on the target device.
[0047] Specifically, the current time can be the k-th time, and the raw sensor data of the target device collected by the INS at time k can be obtained, i.e., INS data.
[0048] Then, the initial attitude angle of the target device at time k can be calculated based on the INS data, where the initial attitude angle includes the INS heading angle, INS roll angle and INS pitch angle.
[0049] It should be noted that the present invention can be used not only to determine the heading angle of a target device, but also to determine the roll angle and / or pitch angle of the target device. The process of determining the roll angle and / or pitch angle is similar to that of determining the heading angle, and will not be described in detail here.
[0050] Step 102: In the event of an interruption of GNSS communication with the satellite navigation system, determine the GNSS heading angle of the target device at the current moment based on the INS heading angle at the current moment and the trained incremental prediction model; The incremental prediction model is trained on a long short-term memory network AT-LSTM based on a self-attention mechanism, using at least one training sample carrying a heading angle increment label. The training sample includes the historical INS heading angle determined based on historical raw sensor data collected by INS. The heading angle increment label is the difference between the historical INS heading angle and the historical GNSS heading angle corresponding to the historical INS heading angle.
[0051] It should be noted that in recent years, deep learning has provided new approaches for attitude angle error compensation in complex environments. Long Short-Term Memory (LSTM) networks, with their ability to model long-range dependencies in time-series data, have been attempted for INS attitude angle error prediction; however, the original LSTM treats all time-step information "equally," making it difficult to highlight key time periods, such as the feature contribution of the last valid observation before GNSS signal interruption, resulting in a lag in the model's response to abrupt errors. The introduction of attention mechanisms offers a possible solution to this problem—by dynamically calculating the weights of input information at different times, such as INS angular velocity, acceleration, and historical attitude angle sequences, the representation ability of key features is enhanced. The attention-based LSTM (AT-LSTM), formed by combining attention mechanisms with LSTM, can capture the long-term evolution of INS attitude increment errors and focus on effective observation information when GNSS is available. Theoretically, it can more accurately establish the nonlinear mapping relationship between INS attitude angle errors and motion state and environmental characteristics, thereby generating more reliable pseudo-attitude observations (i.e., "pseudo-GNSS attitude signals") when GNSS is interrupted, and realize attitude angle compensation and error divergence suppression of the integrated navigation system.
[0052] It is evident that traditional filtering methods suffer from limitations in nonlinear modeling and dynamic adaptability when addressing the challenge of INS attitude angle error divergence caused by GNSS signal interruption in complex environments. AT-LSTM, with its advantages in temporal feature extraction and key information processing, provides an innovative approach to improving the attitude angle accuracy and robustness of GNSS / INS fusion navigation in extreme scenarios, possessing significant theoretical value and application prospects. Therefore, this embodiment of the invention utilizes AT-LSTM to acquire relevant data when GNSS and satellite communication are interrupted.
[0053] Specifically, when the GNSS satellite navigation system is communicating normally with the satellite, the target equipment's current heading information can be obtained by receiving satellite signals through a GNSS receiver. Then, the target equipment's current GNSS heading angle, i.e., the absolute heading angle observation value, can be calculated through GNSS calculation.
[0054] When the GNSS communication between the satellite navigation system and the satellite is normal, the GNSS heading angle at the current moment cannot be determined by the satellite signal. Therefore, the pseudo GNSS attitude signal, i.e. the GNSS heading angle of the target device at the current moment, can be determined by the pre-trained incremental prediction model and the INS heading angle at the current moment.
[0055] Step 103: Determine the actual heading angle of the target device based on the current INS heading angle and the current GNSS heading angle.
[0056] In practical applications, the actual heading angle of the target device can be determined by obtaining the current INS heading angle and the current GNSS heading angle.
[0057] In addition, the target equipment's actual heading angle, INS roll angle, and INS pitch angle constitute the target equipment's current attitude angle.
[0058] The heading angle determination method based on AT-LSTM provided by this invention uses at least one training sample carrying a heading angle increment label to train an incremental prediction model obtained by AT-LSTM. The training sample includes historical INS heading angles determined based on historical raw sensor data collected by INS. The heading angle increment label is the difference between the historical INS heading angle and the corresponding historical GNSS heading angle. This allows the incremental prediction model to leverage the advantages of AT-LSTM's temporal feature extraction and key information processing capabilities to improve the robustness and accuracy of the incremental prediction model in predicting GNSS heading angles. Furthermore, even when GNSS and satellite communication are interrupted, a pseudo-GNSS attitude signal, i.e., the target device's current GNSS heading angle, can be constructed using the current INS heading angle and the trained incremental prediction model. Then, based on the current INS heading angle and the current GNSS heading angle, the actual heading angle of the target device can be determined. This achieves more accurate compensation for INS heading angle errors, suppresses the divergence of heading angles and other attitude angles, and more stably recovers high-precision carrier attitude angle information in complex environments.
[0059] In some embodiments, the heading angle is predicted based on the raw sensor data collected by the INS at the current moment to obtain the INS heading angle of the target device at the current moment, including: Error correction is performed on the raw sensor data at the current moment to obtain the corrected raw sensor data; Based on the corrected original sensor data, a mechanical arrangement algorithm is used to predict the heading angle and obtain the INS heading angle at the current moment.
[0060] In practical applications, the Micro-Electro-Mechanical Systems-Inertial Measurement Unit (MEMS-IMU) of INS contains accelerometers and gyroscopes. The accelerometers and gyroscopes measure the linear acceleration data and angular velocity data of the target device, respectively, which are the raw sensing data.
[0061] Then, the original sensing data at the current moment can be initially corrected to eliminate the influence of deterministic errors such as zero bias and scale factor, thereby obtaining the corrected original sensing data.
[0062] Specifically, a static rotation method can be used for calibration to correct the inherent biases of the accelerometer and gyroscope. For example, for the gyroscope, the data collected by the gyroscope can be rotated 90 degrees around the x, y, and z axes of the gyroscope, three times each time, with an interval of 2-3 seconds between each rotation, to obtain the calibrated data of the gyroscope.
[0063] Furthermore, the corrected original sensor data is input into the mechanical arrangement algorithm, and through mathematical operations such as integration, the initial attitude angles of the target device at the current moment are finally calculated in real time, namely the INS pitch angle, INS roll angle and INS heading angle.
[0064] It should be noted that the data used in the mechanical orchestration algorithm to determine the initial attitude angle in real time only uses the data collected by the gyroscope in the original sensor data; the data collected by the accelerometer in the original sensor data does not participate in the attitude update, but only gives the initial attitude during the initial correction.
[0065] The input data for the mechanical orchestration algorithm is the angular velocity ω of the gyroscope along the x-axis from the raw sensor data. x angular velocity ω along the y-axis y and the angular velocity ω along the z-axis z Based on ω x ω y and ω z Update the attitude quaternion and integrate it to obtain the quaternion at the current time step; then convert the quaternion into a direction cosine matrix and solve the direction cosine matrix to obtain the INS pitch angle, INS roll angle and INS yaw angle.
[0066] In this embodiment of the invention, by performing error correction on the original sensing data, the influence of deterministic errors such as zero bias and scale factor can be eliminated, thereby improving the accuracy of the original sensing data. Furthermore, based on the mechanical arrangement algorithm and the corrected original sensing data, the INS heading angle at the current moment is determined, which greatly ensures the accuracy and reliability of the INS heading angle.
[0067] In some embodiments, the GNSS heading angle of the target device at the current moment is determined based on the INS heading angle at the current moment and the trained incremental prediction model, including: Based on the INS heading angle at the current moment, incremental prediction is performed using an incremental prediction model to obtain the GNSS heading angle increment; The GNSS heading angle of the target device at the current moment is determined based on the GNSS heading angle increment and the GNSS heading angle of the target device at the previous moment.
[0068] Specifically, the incremental prediction model is mainly used to predict the increment of the GNSS heading angle between the previous moment and the current moment, i.e., the GNSS heading angle increment.
[0069] In practical applications, the input data for the incremental prediction model can be constructed based on the INS heading angle at the current moment. Then, the incremental prediction model can perform error prediction based on the input data to obtain the GNSS heading angle increment.
[0070] Furthermore, the GNSS heading angle of the target device at the (k-1)th time can be obtained, which is the GNSS heading angle of the previous time. Then, the GNSS heading angle of the previous time is added to the GNSS heading angle increment output by the incremental prediction model to obtain the pseudo GNSS attitude signal, which is the GNSS heading angle of the target device at the current time.
[0071] In this invention, a trained incremental prediction model is used to predict the increment of the GNSS heading angle based on the INS heading angle, thereby obtaining the GNSS heading angle increment. This improves the efficiency and accuracy of obtaining the GNSS heading angle increment. Then, the GNSS heading angle increment is added to the GNSS heading angle of the previous moment to obtain the GNSS heading angle of the current moment, thus improving the accuracy and reliability of the constructed GNSS heading angle.
[0072] In some of these embodiments, based on the INS heading angle at the current moment, incremental prediction is performed using an incremental prediction model to obtain the GNSS heading angle increment, including: Based on the current INS heading angle, gyroscope measurement data and accelerometer measurement data in the current raw sensor data, predictive data for the current moment is constructed. A prediction dataset is constructed based on the prediction data from n time points prior to the current time and the prediction data at the current time, where n is a natural number. The predicted dataset is input into the incremental prediction model to perform incremental prediction, and the GNSS heading angle increment is obtained.
[0073] Specifically, forecast data refers to data used for incremental forecasting. The input to an incremental forecasting model can be the forecast dataset.
[0074] In practical applications, the raw sensor data at the current moment includes gyroscope measurement data (data collected by the gyroscope) and accelerometer measurement data (data collected by the accelerometer). The INS heading angle at the current moment, the gyroscope measurement data at the current moment, and the accelerometer measurement data at the current moment can be arranged in a set order to form the predicted data for the current moment. The set order refers to the pre-set arrangement order of the INS heading angle, gyroscope measurement data, and accelerometer measurement data.
[0075] It should be noted that both gyroscope and accelerometer measurement data include data along three axes: x, y, and z. Therefore, both gyroscope and accelerometer measurement data are three-dimensional data, while the INS heading angle is one-dimensional data. Thus, the predicted data is seven-dimensional data.
[0076] Specifically, the current time is time k, and the n times before the current time are "time 1, time 2, ..., time n", where n = k - 1.
[0077] Furthermore, the prediction data at the current moment and the prediction data at the n moments prior to the current moment are combined to form a prediction dataset containing k moments.
[0078] For example, the step size of the time window is set to k. The predicted data for all times can be arranged in chronological order. By sliding the rightmost side of the time window to the current time, the predicted data from time 1 to time k is displayed in the time window. The predicted data from time 1 to time k is the entire predicted dataset.
[0079] After obtaining the prediction dataset, the prediction dataset can be input into the incremental prediction model to perform incremental prediction and obtain the GNSS heading angle increment.
[0080] In this embodiment of the invention, by inputting multiple prediction data including the INS heading angle into the incremental prediction model, the incremental prediction model outputs the GNSS heading angle increment when the GNSS signal is interrupted based on the dynamic evolution law of the INS heading angle increment error, and predicts the GNSS heading angle increment, thereby improving the accuracy and reliability of the GNSS heading angle increment, and thus improving the accuracy of heading angle determination.
[0081] In some embodiments, the prediction dataset is input into an incremental prediction model to perform incremental prediction, obtaining the GNSS heading angle increment, including: The prediction dataset is input into the long short-term memory network of the incremental prediction model. The prediction data at each time step in the prediction dataset is processed by the k cascaded hidden layers in the long short-term memory network to obtain the hidden vector corresponding to each time step, k=n+1. The hidden vectors corresponding to each time step are input into the self-attention mechanism of the incremental prediction model for attention weight calculation and normalization to obtain the attention weight coefficients corresponding to each time step. Based on the attention weight coefficients corresponding to each time moment, the hidden vectors corresponding to each time moment are weighted and summed to obtain the GNSS heading angle increment.
[0082] See Figure 2 , Figure 2 This is a schematic diagram of the incremental prediction model provided by the present invention: The incremental prediction model includes a long short-term memory network (layer) and a self-attention mechanism (layer), wherein the long short-term memory network (layer) contains k cascaded hidden layers, namely the first hidden layer Cell1, the second hidden layer Cell2, the third hidden layer Cell3, ..., the (k-1)th hidden layer Cell k-1 and k hidden layers Cell k .
[0083] In practical applications, see Figure 2 The prediction dataset (Inputs) contains prediction data for k time points, namely, prediction data u1 at time point 1, prediction data u2 at time point 2, prediction data u3 at time point 3, ..., prediction data u at time point (k-1). k-1 The predicted data u at time k k The predicted dataset can be input into a Long Short-Term Memory (LSTM) network (layer) for iterative computation to obtain the hidden layer state vector: Predicted data u1 is input into Cell1 for processing to obtain the hidden vector h1 corresponding to the first time step; hidden vector h1 and predicted data u2 are input into Cell2 for processing to obtain the hidden vector h2 corresponding to the second time step; hidden vector h2 and predicted data u3 are input into Cell3 for processing to obtain the hidden vector h3 corresponding to the third time step; and so on, until the hidden vector h1 is obtained. k-2 and predicted data u k-1 Input to Cell k-1 The process is performed to obtain the hidden vector h corresponding to the (k-1)th time step. k-1 , the hidden vector h k-1 and predicted data u k Input to Cell k The process is performed to obtain the hidden vector h corresponding to the k-th time step. k .
[0084] Wherein, the hidden vector h k It includes the temporal correlation of the output of the Long Short-Term Memory Network (layer) between different time steps.
[0085] Furthermore, valuable information is continuously forgotten during forward propagation as the prediction dataset is fed into the LSTM network. Therefore, an attention mechanism can be introduced to extract this information from the hidden states, and the connection weights can be adjusted for each hidden layer output.
[0086] See Figure 2 The self-attention mechanism (layer) calculates the attention weights (scores) using a function, targeting the hidden vectors (h1 to h2) at each time step. k Calculate the attention weight (score) for each time step, i.e., obtain the attention weight (score) L1 for the first time step, L2 for the second time step, L3 for the third time step, ..., L4 for the (k-1)th time step. k-1 Attention weight (score) L at time k k The formula for calculating the attention weight (score) is as follows: Li =W L tanh(W s h i +b s ); Among them, L i To predict the attention weight at time i in the dataset, where i ranges from 1 to k; h i W is the hidden vector at time i; L and W s For different attention weight matrices; b s This is a deviation.
[0087] Furthermore, the attention weights (scores) at each time step are normalized using the softmax function to obtain the attention weight coefficients at each time step.
[0088] Specifically, see Figure 2 The self-attention mechanism (layer) normalizes the attention weights (scores) L1 at time 1 using the softmax function to obtain the attention weight coefficients a1 at time 1; and normalizes the attention weights (scores) L2 at time 2 to obtain the attention weight coefficients a1 at time 2. 2; Normalize the attention weight (score) L3 at time 3 to obtain the attention weight coefficient a3 at time 3; ...; normalize the attention weight (score) L at time (k-1). k-1 After normalization, the attention weight coefficient a at time (k-1) is obtained. k-1 Attention weight (score) L at time k k After normalization, the attention weight coefficient a at time k is obtained. k The normalization process uses the following formula: ; Among them, L i To predict the attention weight corresponding to the i-th time step in the dataset; L j To predict the attention weight at time j in the dataset, where j ranges from 1 to k; exp is the natural exponential function; a i Let be the attention weight coefficient at time i.
[0089] Finally, see Figure 2 The GNSS heading angle increments (Outputs) can be obtained by weighting and summing the hidden vectors at each time step according to the attention weight coefficients at each time step, using the following formula: .
[0090] Among them, Out k This refers to the GNSS heading angle increment corresponding to the k-th time (the current time); a i h represents the attention weight coefficient at time i; i Let be the hidden vector at time i.
[0091] In this embodiment of the invention, by inputting multiple prediction data including the INS heading angle into the incremental prediction model, the incremental prediction model outputs the GNSS heading angle increment when the GNSS signal is interrupted based on the dynamic evolution law of the INS heading angle increment error, and predicts the GNSS heading angle increment, thereby improving the accuracy and reliability of the GNSS heading angle increment, and thus improving the accuracy of heading angle determination.
[0092] In some embodiments, the training process of the incremental prediction model includes: Acquire historical heading information collected by GNSS and historical raw sensor data of the target device collected by INS; Based on historical heading information, at least one historical GNSS heading angle is determined, and based on historical raw sensor data, at least one historical INS heading angle, at least one historical gyroscope measurement data, and at least one historical accelerometer measurement data are determined. From at least one historical GNSS heading angle, at least one historical INS heading angle, at least one historical gyroscope measurement data and at least one historical accelerometer measurement data, obtain at least one data set, the data set containing historical GNSS heading angle, historical INS heading angle, historical gyroscope measurement data and historical accelerometer measurement data collected at the same time; For any data set, based on the historical INS heading angle, historical gyroscope measurement data and historical accelerometer measurement data in the data set, a training sample corresponding to the data set is constructed, and the deviation between the historical GNSS heading angle and the historical INS heading angle in the data set is determined as the heading angle increment label carried by the training sample. Based on each training sample carrying a heading angle increment label, the AT-LSTM is trained in multiple rounds to obtain a trained incremental prediction model.
[0093] In practical applications, in environments with good GNSS signal, raw INS data (historical raw sensor data of the target device acquired by the INS) and high-precision GNSS heading information (historical heading information acquired by GNSS) can be acquired simultaneously. Then, error correction can be performed on the historical raw sensor data of the target device acquired by the INS.
[0094] Since INS data includes gyroscope three-axis angular velocity and accelerometer three-axis specific force, its sampling frequency is usually 100 Hz, while GNSS data has a lower sampling frequency of 10 Hz. Therefore, after error correction, the historical raw sensor data of the target device acquired by INS can be aligned with the historical heading information acquired by GNSS through timestamps.
[0095] Then, based on the historical heading information acquired by GNSS, GNSS-related data is obtained, namely at least one historical GNSS heading angle; and based on the historical raw sensor data of the target device acquired by INS, INS-related data is obtained, namely at least one historical INS heading angle, at least one historical gyroscope measurement data, and at least one historical accelerometer measurement data. Next, by using the sampling time of each of the at least one historical INS heading angle, at least one historical gyroscope measurement data, at least one historical accelerometer measurement data, and at least one historical GNSS heading angle, at least one data set can be obtained. The data set contains historical GNSS heading angle, historical INS heading angle, historical gyroscope measurement data, and historical accelerometer measurement data acquired at the same time.
[0096] Furthermore, based on any data set, construct the training samples corresponding to the data set and the heading angle increment labels corresponding to the training samples: arrange the historical INS heading angle, historical gyroscope measurement data and historical accelerometer measurement data in the data set in a set order to form the training samples corresponding to the data set, and calculate the deviation between the historical GNSS heading angle and the historical INS heading angle in the data set, and use this deviation as the heading angle increment label carried by the training sample.
[0097] After obtaining all training samples, they can be arranged in chronological order according to their sampling time to obtain a sample sequence. Then, starting from the beginning of the sample sequence using a time window, k training samples are extracted each time. These k training samples are then input into the AT-LSTM to obtain the predicted GNSS heading angle increments corresponding to the k training samples. This is the predicted GNSS heading angle increment corresponding to the sampling time of the last training sample among the k training samples. The heading angle increment label carried by the last training sample among the k training samples is then used as the heading angle increment label corresponding to the k training samples.
[0098] After traversing all training samples, the loss value is calculated based on the predicted GNSS heading angle increment and heading angle increment label corresponding to each k training samples, and the hyperparameters of AT-LSTM are adjusted based on the loss value.
[0099] Then, based on the sample sequence, the AT-LSTM with adjusted parameters is trained for multiple rounds until the training stopping condition is met. It can be considered that the AT-LSTM learns the complex nonlinear mapping relationship from INS data to heading angle increments, and at this point, the AT-LSTM is determined as an incremental prediction model. The training stopping condition can be at least one of the following: the loss value is less than a set value, the number of iterations reaches a threshold, or the rate of change of the loss value is less than a threshold.
[0100] For example, see Figure 3 , Figure 3 This is a flowchart illustrating the training incremental prediction model provided by the present invention: Under normal GNSS and satellite communication conditions, AT-LSTM can be trained based on data collected from GNSS and INS. Specifically, raw sensor data of the target device can be obtained from the INS. This raw sensor data includes the sampling frequency f and / or digital angular frequency ω. The raw sensor data is then mechanically arranged to obtain the INS heading angle Yaw. INS INS Roll Angle Poll INS and INS tilt angle Pitch INS ; and obtain the GNSS heading angle (Yaw) from GNSS. GNSS This allows the AT-LSTM to be trained while simultaneously determining the actual heading angle.
[0101] Figure 3 In this process, determining the actual heading angle involves: calculating the yaw angle. INS With Yaw GNSS The first heading angle error is obtained by inputting the first heading angle error into a Kalman filter (KF) to obtain the second heading angle error δYaw. The actual heading angle is determined based on YawINS and the second heading angle error δYaw. The actual heading angle and Poll are then compared. INS and Pitch INS Combined, the output attitude angle is the target attitude angle of the target device.
[0102] Figure 3 In this process, the training of AT-LSTM involves aligning the raw sensor data with the GNSS-acquired data based on the sampling frequency f and / or digital angular frequency ω; then, based on yaw... INS ,Yaw GNSS The AT-LSTM is trained using the raw sensor data.
[0103] In this embodiment of the invention, by constructing an AT-LSTM to learn the dynamic evolution law of INS attitude increment error and the effective observation characteristics when GNSS is available, the incremental prediction model learns the complex nonlinear mapping relationship from INS data to heading angle increment. When GNSS signal is interrupted, pseudo-GNSS attitude signal can be output to assist navigation, thereby more accurately compensating for INS heading angle, suppressing the divergence of attitude angles such as heading angle, and more stably recovering high-precision carrier attitude angle information in complex environments.
[0104] In some embodiments, the actual heading angle of the target device is determined based on the current INS heading angle and the current GNSS heading angle, including: Based on the current INS heading angle and the current GNSS heading angle, determine the first heading angle error; The second heading angle error is determined based on the first heading angle error and the Kalman filter; The actual heading angle is determined based on the second heading angle error and the INS heading angle.
[0105] In practical applications, the INS heading angle at the current moment can be subtracted from the GNSS heading angle at the current moment to obtain the first heading angle error. Then, based on the first heading angle error, a Kalman filter can be applied to obtain the second heading angle error.
[0106] Furthermore, the error between the INS heading angle and the second heading angle is subtracted to obtain the actual heading angle. Then, based on the actual heading angle, INS roll angle, and INS pitch angle, the target attitude angle of the target device can be output.
[0107] In this embodiment of the invention, the error is roughly determined by the INS heading angle and the GNSS heading angle to obtain the first heading angle error. The first heading angle error is then finely calibrated by a Kalman filter to obtain the second heading angle error. Based on the second heading angle error, the INS heading angle is calibrated to obtain the accurate actual heading angle, thereby improving the accuracy of the actual heading angle.
[0108] In some embodiments, the second heading angle error is determined based on the first heading angle error and the Kalman filter, including: Based on the first heading angle error, the three-axis zero bias of the gyroscope and the three-axis zero bias of the accelerometer in the INS, the initial state vector at the current moment is constructed; The initial state vector at the current moment is input into the Kalman filter for noise and drift suppression to obtain the second heading angle error.
[0109] In practical applications, the first heading angle error φ and the three-axis zero bias of the gyroscope can be used as the reference values. g and accelerometer triaxial zero bias b aConstruct an initial state vector X, i.e., X = [φ b g b a Since both gyroscope and accelerometer measurement data include data along the x, y, and z axes, the gyroscope's three-axis zero bias (b) is valid. g and accelerometer triaxial zero bias b a All data are three-dimensional, while the first heading angle error φ is one-dimensional. Therefore, the initial state vector X is seven-dimensional.
[0110] After obtaining the initial state vector at the current moment, it is input into a Kalman filter for noise and drift suppression, thereby obtaining the second heading angle error.
[0111] In this embodiment of the invention, the initial state vector at the current moment is constructed by using the first heading angle error, the three-axis zero bias of the gyroscope in the INS, and the three-axis zero bias of the accelerometer. Compared with using only the first heading angle error as the initial state vector, the comprehensiveness and accuracy of the initial state vector are improved. Furthermore, the second heading angle error is determined based on the initial state vector using a Kalman filter, which improves the efficiency of obtaining the second heading angle error.
[0112] In some embodiments, the initial state vector at the current moment is input into a Kalman filter for noise and drift suppression to obtain the second heading angle error, including: Based on the initial state vector at the current moment and the state equation corresponding to the Kalman filter, determine the state transition matrix from the previous moment to the current moment, and based on the initial state vector at the current moment and the measurement equation corresponding to the Kalman filter, determine the observation matrix at the current moment. Based on the state transition matrix and the state vector of the previous time step in the Kalman filter, determine the state vector of the current time step, and based on the mean square error of the state transition matrix and the mean square error of the previous time step in the Kalman filter, determine the mean square error of the state prediction of the current time step. Based on the mean square error of the one-step state prediction at the current time and the observation matrix at the current time, determine the gain of the Kalman filter at the current time; Based on the gain at the current moment and the one-step state vector at the current moment, the target state vector at the current moment is determined, and the target state vector at the current moment includes the second heading angle error.
[0113] In practical applications, the state equation and measurement equation of a Kalman filter can be expressed as: ; ; Among them, X k Let Φ be the state vector at time k, which is the state vector at the current time. k / k-1Let Γ be the state transition matrix from the (k-1)th time step to the kth time step, i.e., the state transition matrix from the previous time step to the current time step; k-1 Assign a noise matrix to the system, W k-1 Z is the system noise matrix at time (k-1); k H is the observation vector at time k; k V is the observation matrix at time k, which is the observation matrix at the current time. k Let be the observation noise matrix at time k.
[0114] The Kalman filter consists of two parts: time update and measurement update. Its calculation is a continuous prediction and correction process, and its discrete linear equation is as follows: One-step state prediction: ; in, Let be the target state vector at the (k-1)th time step; For based on The predicted state vector at the k-th time step; Mean squared error of state prediction in one step: ; Among them, P k-1 P is the mean square error at time (k-1); k / k-1 For P-based k-1 The mean squared error of the one-step state prediction at the k-th time step; Indicates transpose; Filter gain: ; Among them, K k R represents the gain of the Kalman filter at time k, which is the gain at the current time. k Let be the measurement noise covariance matrix at time k; State estimation: ; in, Let be the target state vector at time k.
[0115] It should be noted that one-step state prediction and mean square error of one-step state prediction belong to time updates, while filter gain and state estimation belong to measurement updates.
[0116] In this embodiment of the invention, the second heading angle error can be accurately and quickly determined using a Kalman filter.
[0117] In some embodiments, after determining the current-time gain of the Kalman filter based on the mean square error of the one-step state prediction and the current-time observation matrix, the method further includes: The mean square error at the current time is determined based on the mean square error of the one-step state prediction at the current time, the observation matrix at the current time, and the gain at the current time.
[0118] It should be noted that the measurement update also includes the mean square error of the state estimation, specifically: ; Among them, P k Let I be the mean square error at time k, which is the mean square error at the current time; I is the identity matrix.
[0119] In this embodiment of the invention, by determining the mean square error at the current moment, the Kalman filter can use the mean square error at the current moment to determine the second heading angle error when the next moment arrives, thereby improving the determination efficiency of the second heading angle error.
[0120] The following is combined Figure 4 and Figure 5 The method for determining the heading angle involved in this invention will be further described.
[0121] See Figure 4 , Figure 4 This is the second flowchart illustrating the heading angle determination method based on AT-LSTM provided by this invention: Under normal GNSS and satellite communication conditions, GNSS calculations are performed based on the data collected by GNSS to obtain the GNSS heading angle Yaw. GNSS And based on the gyroscope's three-axis zero bias b g and accelerometer triaxial zero bias b a The raw sensor data collected by the INS via accelerometers and gyroscopes is corrected for errors. Then, the corrected raw sensor data is mechanically arranged to obtain the INS heading angle (Yaw). INS INS Roll Angle Poll INS and INS tilt angle Pitch INS Then calculate Yaw. INS With Yaw GNSS The first heading angle error is input into a Kalman filter to obtain the second heading angle error δYaw. The actual heading angle is determined based on YawINS and the second heading angle error δYaw. The actual heading angle and Poll are then compared. INS and Pitch INSCombined, the output attitude angles are the target attitude angles (pitch, roll, and yaw) of the target device. The mechanical choreography can be updated using the target attitude angles, and b can be updated using a Kalman filter. g and b a .
[0122] See Figure 5 , Figure 5 This is the third flowchart of the heading angle determination method based on AT-LSTM provided by this invention: When GNSS and satellite communication are disconnected, raw sensor data of the target device is acquired from the INS. The raw sensor data includes the sampling frequency f and / or digital angular frequency ω. The raw sensor data is then mechanically arranged to obtain the INS heading angle Yaw. INS INS Roll Angle Poll INS and INS tilt angle Pitch INS .
[0123] Then, based on the sampling frequency f and / or digital angular frequency ω, the raw sensor data is compared with the INS heading angle Yaw. INS Align; then INS heading angle Yaw INS The gyroscope and accelerometer measurements from the raw sensor data are input into a trained AT-LSTM (incremental prediction model) to obtain the GNSS heading angle increment ΔYaw. GNSS Then ΔYaw GNSS Compared to the previous moment, Yaw GNSS Add them together to get the Yaw at the current moment. GNSS .
[0124] Furthermore, calculate Yaw INS With Yaw GNSS The first heading angle error is obtained by inputting the first heading angle error into a Kalman filter (KF) to obtain the second heading angle error δYaw. The actual heading angle is determined based on YawINS and the second heading angle error δYaw. The actual heading angle and Poll are then compared. INS and Pitch INS Combined, the output attitude angles are the target attitude angles (pitch angle, roll angle, and yaw angle) of the target device.
[0125] It should be noted that when GNSS communication with satellites is lost, the incremental prediction model's output GNSS heading angle increment can be accumulated at each epoch, starting from the first epoch when GNSS signals become unavailable, to obtain the pseudo-GNSS heading angle. The current yaw angle is... GNSS ,Right now: ; Where 0 represents the moment when GNSS communication with the satellite is lost; i represents the i-th moment starting from 0 when GNSS communication with the satellite is lost; k represents the k-th moment starting from 0 when GNSS communication with the satellite is lost, i.e., the current moment. The YawGNSS at time k is the Yaw at the current time. GNSS ; YawGNSS when GNSS communication with satellite is lost; Let ΔYawGNSS be the value at time i.
[0126] See Figure 6 , Figure 6 This is a schematic diagram illustrating the effect of verifying the incremental prediction accuracy provided by this invention: To verify the accuracy of the AT-LSTM model in predicting heading errors in GNSS signal-available scenarios, a model generalization ability evaluation method is used. A validation set outside the training set is selected as input data to run the model. The predicted heading error output by the model is compared with the actual heading error calculated using GNSS and INS heading angles at each time step. By calculating the deviation between the predicted and actual errors, the root mean square error of the predicted and actual errors is controlled within 2.3651 degrees, and the average absolute error is 2.2618 degrees, indicating that the model can effectively learn and track the main trend of INS heading error divergence over time. The model successfully captures the macroscopic pattern of error changes in different dynamic motion stages such as rapid rotation and sinusoidal oscillation, verifying the basic effectiveness of the AT-LSTM architecture in time-varying error modeling. In the diagram, the pink line represents the AT-LSTM prediction error (increment); the blue line represents the actual INS error. The horizontal axis represents time (minutes), and the vertical axis represents the heading angle error (increment), with the unit being degrees.
[0127] See Figure 7 , Figure 7This is a schematic diagram illustrating the ablation experiment results provided by this invention: To verify the necessity and performance contribution of the attention mechanism, a key component in the proposed model, the experiment designed and constructed multiple comparative model architectures, including a standard LSTM model without an attention mechanism and a recurrent neural network (RNN) model with temporal modeling capabilities, which were compared and evaluated with the complete AT-LSTM model. All models were validated under the same dataset and training conditions, using root mean square error and mean absolute error as quantitative indicators of heading error prediction accuracy. By systematically comparing the prediction errors, dynamic response characteristics, and adaptability of each model to different motion stages (rapid rotation, sinusoidal oscillation, etc.) on the validation set, the specific contribution of the attention mechanism to the model's temporal modeling and error compensation effects was analyzed. The experimental results clearly show that the accuracy of AT-LSTM is improved compared to the baseline model. In the diagram, the black line represents the true INS error, the green line represents the RNN prediction (increment), the blue line represents the standard LSTM prediction (increment), and the pink line represents the AT-LSTM prediction (increment). The horizontal axis represents time (minutes), and the vertical axis represents the heading angle error (increment), with the unit being degrees.
[0128] See Figure 8 , Figure 8 This is a schematic diagram illustrating the effect of the interruption simulation experiment provided by this invention: A GNSS interruption simulation experiment was conducted on a test set for a scenario with no GNSS signal (15 minutes) and relying solely on IMU data. The aim was to verify whether the compensation model could effectively suppress INS error divergence and to compare the heading error of pure inertial navigation (INS) with that of AT-LSTM-compensated INS. The experiment used the actual INS error as a reference benchmark, where zero bias, scale error, and angle random walk caused the error to accumulate naturally to approximately 15 degrees within 15 minutes. The heading error of uncompensated pure INS showed a continuous accumulation trend, while the heading error after compensation by AT-LSTM was constrained to a small range of fluctuations, with a significantly reduced mean error. The error in the rapid rotation segment did not diverge significantly due to changes in angular velocity, and the periodic fluctuations in the sinusoidal oscillation segment were effectively suppressed. The overall error level was far lower than that of pure INS, verifying the compensation capability of AT-LSTM for INS heading error. In the diagram, the blue line represents pure inertial navigation (INS), the red line represents AT-LSTM compensation (prediction increment), the horizontal axis represents time (minutes), and the vertical axis represents the heading angle error (increment), with the unit being degrees.
[0129] See Figure 9 , Figure 9This is a comparison chart of the effects of multi-model compensation provided by this invention: To verify the superiority of AT-LSTM in INS heading error compensation within the scope of machine learning, LSTM and RNN were selected as comparison methods. Under the same test set, the three models were used to predict and compensate for the heading angle error of the pure inertial navigation output. By comparing the heading error curves after compensation, Figure 9 This paper presents a comparison of heading errors using four methods under a 15-minute GNSS interruption environment. The heading error of pure inertial navigation (INS) accumulates and diverges over time due to the combined effects of zero bias, scale error, and random angle walk, reaching approximately 12 degrees within 15 minutes. While RNN compensation reduces error fluctuations, it still exhibits dynamic changes, with a maximum error of approximately 6-7 degrees. LSTM further suppresses the error divergence trend, but still exhibits lag in response to rapid rotation segments, with a maximum error of approximately 5-6 degrees. AT-LSTM achieves optimal compensation through an adaptive time attention mechanism, strictly confining the error to the range of 4-5 degrees. It effectively suppresses sudden changes in angular velocity during rapid rotation segments and periodic fluctuations during sinusoidal oscillation segments, verifying its accurate compensation capability for INS heading errors under dynamic motion modes. In the diagram, blue lines represent pure inertial navigation (INS), green lines represent RNN compensation (prediction increment), pink lines represent standard LSTM compensation (prediction increment), and red lines represent AT-LSTM compensation (prediction increment). The horizontal axis represents time (minutes), and the vertical axis represents heading angle error (increment), with the unit being degrees.
[0130] See Table 1, which shows the statistical results of heading errors for the three methods under a 15-minute GNSS interruption environment. The heading error of pure inertial navigation continues to diverge over time. After RNN compensation, the mean decreased to 4.75 degrees, an improvement of 40.1%, but the standard deviation of 3.72 degrees remained relatively large, offering limited suppression of dynamic errors. Standard LSTM further reduced the mean to 2.93 degrees, an improvement of 63.1%, with a standard deviation of 2.64 degrees, and its time-series modeling capability improved error stability. AT-LSTM achieved the best compensation effect, with a mean of 1.09 degrees, an improvement of 86.3%, a standard deviation of 1.80 degrees, and a maximum value of 2.21 degrees. Its adaptive time attention mechanism effectively suppressed multi-scale dynamic errors caused by linear drift, rapid rotation, and sinusoidal oscillation, verifying its superior performance under complex motion modes.
[0131]
[0132] The heading angle determination method based on AT-LSTM provided in this invention addresses the problems of rapid divergence of INS attitude angle errors and a sharp decline in heading angle accuracy caused by GNSS signal interruption in complex environments, which seriously affect the navigation reliability of unmanned aerial vehicles and other carriers in GNSS denied scenarios. This disclosure proposes a GNSS / INS heading angle error compensation method based on AT-LSTM. By constructing an attention-enhanced long short-term memory network model, it learns the dynamic evolution law of INS attitude increment error and the effective observation characteristics when GNSS is available. When GNSS signal is interrupted, it outputs pseudo-GNSS attitude signal to assist the fusion navigation system, thereby more accurately compensating for INS attitude angle errors, suppressing the divergence of attitude angles such as heading angle, and more stably recovering high-precision carrier attitude angle information in complex environments.
[0133] Furthermore, the AT-LSTM-based heading angle determination method has a simple network structure. Compared with the traditional Kalman filter-based GNSS / INS attitude angle fusion method, it does not rely on an accurate sensor noise statistical model, has low time complexity, and fast network training speed. It can quickly generate reliable pseudo-GNSS attitude signals when GNSS signals are interrupted, thereby more accurately compensating for INS attitude angle errors, effectively suppressing the divergence of attitude angles such as heading angle, and more stably recovering high-precision carrier attitude angle information in complex environments.
[0134] It should be noted that the steps shown in the above process or in the flowchart of the accompanying figures can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0135] This invention also provides an AT-LSTM-based heading angle determination device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. The terms "module," "unit," "subunit," etc., used below refer to combinations of software and / or hardware that perform a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0136] The AT-LSTM-based heading angle determination device provided by the present invention will be described below. The AT-LSTM-based heading angle determination device described below and the AT-LSTM-based heading angle determination method described above can be referred to in correspondence with each other.
[0137] Figure 10 This is a schematic diagram of the heading angle determination device based on AT-LSTM provided by the present invention, as shown below. Figure 10As shown, the AT-LSTM-based heading angle determination device includes: The prediction module 1001 is configured to predict the heading angle based on the raw sensor data collected by the INS at the current moment, and obtain the INS heading angle of the target device at the current moment. The first determining module 1002 is configured to determine the GNSS heading angle of the target device at the current moment based on the INS heading angle at the current moment and the trained incremental prediction model when GNSS and satellite communication is interrupted. The incremental prediction model is obtained by training AT-LSTM based on at least one training sample carrying a heading angle increment label. The training sample includes the historical INS heading angle determined based on historical raw sensor data collected by INS. The heading angle increment label is the difference between the historical INS heading angle and the historical GNSS heading angle corresponding to the historical INS heading angle. The second determining module 1003 is configured to determine the actual heading angle of the target device based on the INS heading angle and the GNSS heading angle at the current time.
[0138] The AT-LSTM-based heading angle determination device provided by this invention uses at least one training sample carrying a heading angle increment label to train an incremental prediction model obtained by AT-LSTM. The training sample includes historical INS heading angles determined based on historical raw sensor data collected by INS. The heading angle increment label is the difference between the historical INS heading angle and the corresponding historical GNSS heading angle. This allows the incremental prediction model to leverage the advantages of AT-LSTM's temporal feature extraction and key information processing capabilities to improve the robustness and accuracy of the incremental prediction model in predicting GNSS heading angles. Furthermore, even when GNSS and satellite communication are interrupted, a pseudo-GNSS attitude signal, i.e., the target device's current GNSS heading angle, can be constructed using the current INS heading angle and the trained incremental prediction model. Based on the current INS heading angle and the current GNSS heading angle, the actual heading angle of the target device can be determined. This achieves more accurate compensation for INS heading angle errors, suppresses the divergence of heading angles and other attitude angles, and more stably recovers high-precision carrier attitude angle information in complex environments.
[0139] In some embodiments, the first determining module 1002 is specifically configured as follows: Based on the INS heading angle at the current moment, incremental prediction is performed using an incremental prediction model to obtain the GNSS heading angle increment; The GNSS heading angle of the target device at the current moment is determined based on the GNSS heading angle increment and the GNSS heading angle of the target device at the previous moment.
[0140] In some embodiments, the first determining module 1002 is specifically configured as follows: Based on the current INS heading angle, gyroscope measurement data and accelerometer measurement data in the current raw sensor data, predictive data for the current moment is constructed. A prediction dataset is constructed based on the prediction data from n time points prior to the current time and the prediction data at the current time, where n is a natural number. The predicted dataset is input into the incremental prediction model to perform incremental prediction, and the GNSS heading angle increment is obtained.
[0141] In some embodiments, the first determining module 1002 is specifically configured as follows: The prediction dataset is input into the long short-term memory network of the incremental prediction model. The prediction data at each time step in the prediction dataset is processed by the k cascaded hidden layers in the long short-term memory network to obtain the hidden vector corresponding to each time step, k=n+1. The hidden vectors corresponding to each time step are input into the self-attention mechanism of the incremental prediction model for attention weight calculation and normalization to obtain the attention weight coefficients corresponding to each time step. Based on the attention weight coefficients corresponding to each time moment, the hidden vectors corresponding to each time moment are weighted and summed to obtain the GNSS heading angle increment.
[0142] In some embodiments, the AT-LSTM-based heading angle determination device further includes a training module configured to: Acquire historical heading information collected by GNSS and historical raw sensor data of the target device collected by INS; Based on historical heading information, at least one historical GNSS heading angle is determined, and based on historical raw sensor data, at least one historical INS heading angle, at least one historical gyroscope measurement data, and at least one historical accelerometer measurement data are determined. From at least one historical GNSS heading angle, at least one historical INS heading angle, at least one historical gyroscope measurement data and at least one historical accelerometer measurement data, obtain at least one data set, the data set containing historical GNSS heading angle, historical INS heading angle, historical gyroscope measurement data and historical accelerometer measurement data collected at the same time; For any data set, based on the historical INS heading angle, historical gyroscope measurement data and historical accelerometer measurement data in the data set, a training sample corresponding to the data set is constructed, and the deviation between the historical GNSS heading angle and the historical INS heading angle in the data set is determined as the heading angle increment label carried by the training sample. Based on each training sample carrying a heading angle increment label, the AT-LSTM is trained in multiple rounds to obtain a trained incremental prediction model.
[0143] In some embodiments, the second determining module 1003 is specifically configured as follows: Based on the current INS heading angle and the current GNSS heading angle, determine the first heading angle error; The second heading angle error is determined based on the first heading angle error and the Kalman filter; The actual heading angle is determined based on the second heading angle error and the INS heading angle.
[0144] In some embodiments, the second determining module 1003 is specifically configured as follows: Based on the first heading angle error, the three-axis zero bias of the gyroscope and the three-axis zero bias of the accelerometer in the INS, the initial state vector at the current moment is constructed; The initial state vector at the current moment is input into the Kalman filter for noise and drift suppression to obtain the second heading angle error.
[0145] In some embodiments, the second determining module 1003 is specifically configured as follows: Based on the initial state vector at the current moment and the state equation corresponding to the Kalman filter, determine the state transition matrix from the previous moment to the current moment, and based on the initial state vector at the current moment and the measurement equation corresponding to the Kalman filter, determine the observation matrix at the current moment. Based on the state transition matrix and the state vector of the previous time step in the Kalman filter, determine the state vector of the current time step, and based on the mean square error of the state transition matrix and the mean square error of the previous time step in the Kalman filter, determine the mean square error of the state prediction of the current time step. Based on the mean square error of the one-step state prediction at the current time and the observation matrix at the current time, determine the gain of the Kalman filter at the current time; Based on the gain at the current moment and the one-step state vector at the current moment, the target state vector at the current moment is determined, and the target state vector at the current moment includes the second heading angle error.
[0146] In some embodiments, the second determining module 1003 is further configured to: The mean square error at the current time is determined based on the mean square error of the one-step state prediction at the current time, the observation matrix at the current time, and the gain at the current time.
[0147] In some embodiments, the prediction module 1001 is specifically configured as follows: Error correction is performed on the raw sensor data at the current moment to obtain the corrected raw sensor data; Based on the corrected original sensor data, a mechanical arrangement algorithm is used to predict the heading angle and obtain the INS heading angle at the current moment.
[0148] It should be noted that the above modules can be functional modules or program modules, and can be implemented through software or hardware. For modules implemented through hardware, the above modules can reside in the same processor; or the above modules can be located in different processors in any combination.
[0149] Figure 11 This is a schematic diagram of the structure of the electronic device provided by the present invention, such as... Figure 11 As shown, the electronic device may include: a processor 1110, a communications interface 1120, a memory 1130, and a communications bus 1140, wherein the processor 1110, the communications interface 1120, and the memory 1130 communicate with each other through the communications bus 1140. The processor 1110 can call logic instructions in the memory 1130 to execute an AT-LSTM-based heading angle determination method. This method includes: predicting the heading angle based on the raw sensor data acquired by the inertial navigation system (INS) at the current moment to obtain the INS heading angle of the target device at the current moment; in the event of an interruption of communication between the GNSS and the satellite navigation system (GNSS), determining the GNSS heading angle of the target device at the current moment based on the INS heading angle at the current moment and a trained incremental prediction model. The incremental prediction model is trained on an AT-LSTM network based on a self-attention mechanism, using at least one training sample carrying a heading angle increment label. The training samples include historical INS heading angles determined based on historical raw sensor data acquired by the INS, and the heading angle increment label is the difference between the historical INS heading angle and the corresponding historical GNSS heading angle; and determining the actual heading angle of the target device based on the current INS heading angle and the current GNSS heading angle.
[0150] Furthermore, the logical instructions in the aforementioned memory 1130 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0151] The present invention also provides an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0152] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0153] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program: Step 1: Based on the raw sensor data collected by the inertial navigation system (INS) at the current moment, predict the heading angle to obtain the INS heading angle of the target device at the current moment; Step 2: In the event of GNSS communication interruption, determine the GNSS heading angle of the target device at the current moment based on the INS heading angle and the trained incremental prediction model. The incremental prediction model is trained on a long short-term memory network AT-LSTM based on a self-attention mechanism, using at least one training sample carrying a heading angle increment label. The training sample includes the historical INS heading angle determined based on historical raw sensor data collected by the INS. The heading angle increment label is the difference between the historical INS heading angle and the historical GNSS heading angle corresponding to the historical INS heading angle. Step 3: Determine the actual heading angle of the target device based on the current INS heading angle and the current GNSS heading angle.
[0154] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementations, and will not be repeated in this embodiment.
[0155] On the other hand, in conjunction with the AT-LSTM-based heading angle determination method provided in the above embodiments, the present invention also provides a non-transitory computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above embodiments of the AT-LSTM-based heading angle determination method.
[0156] In another aspect, in conjunction with the AT-LSTM-based heading angle determination method provided in the above embodiments, the present invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above method embodiments.
[0157] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0158] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for determining heading angle based on AT-LSTM, characterized in that, include: Based on the raw sensor data collected by the inertial navigation system (INS) at the current moment, the heading angle is predicted to obtain the INS heading angle of the target device at the current moment; In the event of a GNSS communication interruption, the GNSS heading angle of the target device at the current moment is determined based on the INS heading angle at the current moment and the trained incremental prediction model. The incremental prediction model is obtained by training a long short-term memory network (AT-LSTM) based on a self-attention mechanism on at least one training sample carrying a heading angle increment label. The training sample includes historical INS heading angles determined based on historical raw sensor data collected by the INS. The heading angle increment label is the difference between the historical INS heading angle and the historical GNSS heading angle corresponding to the historical INS heading angle. Based on the INS heading angle and the GNSS heading angle at the current time, the actual heading angle of the target device is determined.
2. The heading angle determination method based on AT-LSTM according to claim 1, characterized in that, The determination of the target device's GNSS heading angle at the current moment based on the INS heading angle and the trained incremental prediction model includes: Based on the INS heading angle at the current moment, incremental prediction is performed using the incremental prediction model to obtain the GNSS heading angle increment; Based on the GNSS heading angle increment and the GNSS heading angle of the target device at the previous moment, the GNSS heading angle of the target device at the current moment is determined.
3. The heading angle determination method based on AT-LSTM according to claim 2, characterized in that, The incremental prediction of the GNSS heading angle based on the INS heading angle at the current moment, using the incremental prediction model, to obtain the GNSS heading angle increment includes: Based on the INS heading angle at the current moment, the gyroscope measurement data and accelerometer measurement data in the raw sensor data at the current moment, the predicted data for the current moment is constructed. A prediction dataset is constructed based on the prediction data from the n times prior to the current time and the prediction data at the current time, where n is a natural number; The predicted dataset is input into the incremental prediction model to perform incremental prediction, thereby obtaining the GNSS heading angle increment.
4. The heading angle determination method based on AT-LSTM according to claim 3, characterized in that, The step of inputting the prediction dataset into the incremental prediction model to perform incremental prediction and obtain the GNSS heading angle increment includes: The prediction dataset is input into the long short-term memory network of the incremental prediction model. The prediction data at each time step in the prediction dataset is processed by the k cascaded hidden layers in the long short-term memory network to obtain the hidden vector corresponding to each time step, k=n+1. The hidden vectors corresponding to each time point are input into the self-attention mechanism of the incremental prediction model for attention weight calculation and normalization processing to obtain the attention weight coefficients corresponding to each time point. Based on the attention weight coefficients corresponding to each time point, the hidden vectors corresponding to each time point are weighted and summed to obtain the GNSS heading angle increment.
5. The heading angle determination method based on AT-LSTM according to claim 1, characterized in that, The training process of the incremental prediction model includes: Acquire the historical heading information collected by the GNSS and the historical raw sensor data of the target device collected by the INS; Based on the historical heading information, at least one historical GNSS heading angle is determined, and based on the historical raw sensor data, at least one historical INS heading angle, at least one historical gyroscope measurement data, and at least one historical accelerometer measurement data are determined. From the at least one historical GNSS heading angle, the at least one historical INS heading angle, the at least one historical gyroscope measurement data, and the at least one historical accelerometer measurement data, at least one data set is obtained, wherein the data set contains historical GNSS heading angle, historical INS heading angle, historical gyroscope measurement data, and historical accelerometer measurement data collected at the same time; For any of the data sets, based on the historical INS heading angle, the historical gyroscope measurement data, and the historical accelerometer measurement data in the data set, a training sample corresponding to the data set is constructed, and the deviation between the historical GNSS heading angle and the historical INS heading angle in the data set is determined as the heading angle increment label carried by the training sample. Based on each training sample carrying the heading angle increment label, the AT-LSTM is trained in multiple rounds to obtain the trained incremental prediction model.
6. The heading angle determination method based on AT-LSTM according to any one of claims 1-5, characterized in that, Determining the actual heading angle of the target device based on the INS heading angle and the GNSS heading angle at the current time includes: Based on the INS heading angle and the GNSS heading angle at the current time, determine the first heading angle error; The second heading angle error is determined based on the first heading angle error and the Kalman filter; The actual heading angle is determined based on the second heading angle error and the INS heading angle.
7. The heading angle determination method based on AT-LSTM according to claim 6, characterized in that, The determination of the second heading angle error based on the first heading angle error and the Kalman filter includes: Based on the first heading angle error, the gyroscope three-axis zero bias and the accelerometer three-axis zero bias in the INS, the initial state vector at the current moment is constructed; The initial state vector at the current moment is input into the Kalman filter for noise and drift suppression to obtain the second heading angle error.
8. The heading angle determination method based on AT-LSTM according to claim 7, characterized in that, The step of inputting the initial state vector at the current moment into the Kalman filter for noise and drift suppression to obtain the second heading angle error includes: Based on the initial state vector at the current moment and the state equation corresponding to the Kalman filter, the state transition matrix from the previous moment to the current moment is determined, and based on the initial state vector at the current moment and the measurement equation corresponding to the Kalman filter, the observation matrix at the current moment is determined. Based on the state transition matrix and the state vector of the previous time step in the Kalman filter, the one-step state vector of the current time step is determined, and based on the mean square error of the state transition matrix and the mean square error of the previous time step in the Kalman filter, the one-step state prediction mean square error of the current time step is determined. Based on the mean square error of the one-step state prediction at the current time and the observation matrix at the current time, the gain of the Kalman filter at the current time is determined; Based on the gain at the current moment and the one-step state vector at the current moment, the target state vector at the current moment is determined, and the target state vector at the current moment includes the second heading angle error.
9. The heading angle determination method based on AT-LSTM according to claim 8, characterized in that, After determining the gain of the Kalman filter at the current time based on the mean square error of the one-step state prediction at the current time and the observation matrix at the current time, the method further includes: The mean square error at the current moment is determined based on the mean square error of the one-step state prediction at the current moment, the observation matrix at the current moment, and the gain at the current moment.
10. A heading angle determination device based on AT-LSTM, characterized in that, include: The prediction module is configured to predict the heading angle based on the raw sensor data collected by the INS at the current moment, and obtain the INS heading angle of the target device at the current moment. The first determining module is configured to, in the event of GNSS and satellite communication interruption, determine the GNSS heading angle of the target device at the current moment based on the INS heading angle at the current moment and a trained incremental prediction model. The incremental prediction model is obtained by training an AT-LSTM based on at least one training sample carrying a heading angle increment label. The training sample includes historical INS heading angles determined based on historical raw sensor data collected by the INS. The heading angle increment label is the difference between the historical INS heading angle and the historical GNSS heading angle corresponding to the historical INS heading angle. The second determining module is configured to determine the actual heading angle of the target device based on the INS heading angle and the GNSS heading angle at the current time.