A ship AIS situation solving method based on ship GPS time sequence synchronization and six-dimensional EKF

CN123012443APending Publication Date: 2026-10-30WUHAN CITY VOCATIONAL COLLEGE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611262474.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

该类方案虽引入灰色预测或恒速外推模型来补偿AIS长间隔报文,但运动模型维度不足,仅包含位置和航速二维状态,未纳入转向率和加速度等微分量

Benefits of technology

[0040]本发明提出一种融合本船GPS与时序外推的船舶AIS目标态势解算方法,仅依托船舶标配GPS模块、船载AIS接收机两类常规通航设备即可实现目标精细化态势解算,以本船GPS输出的统一UTC时间构建全局时间基准,搭配六维状态扩展卡尔曼滤波完成AIS目标时序插值、动态外推运算,并配套多维度加权置信度评价机制实现船舶态势分级输出。本发明利用本船GPS统一校准系统时间,消除本地设备时钟与AIS报文时间戳之间的时序偏移,克服传统解算方案时间基准不一致、目标位置与运动参数计算偏差较大的缺陷;同时采用包含转向率、加速度的CTRV完整运动模型描述船舶动态航行过程,弥补单一线性插值、低阶匀速外推模型难以适配船舶转向、加减速机动工况的不足,能够有效压制AIS信道干扰、报文丢包、多径反射造成的航迹抖动、轨迹断档现象。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012443A_ABST
    Figure CN123012443A_ABST
Patent Text Reader

Abstract

The present application relates to a kind of ship AIS situation resolving method based on ship GPS time sequence synchronization and six-dimensional EKF, comprising the following steps: step 1;Establish global unified time reference and data acquisition, the data include ship GPS data and surrounding ship AIS data, step 2;AIS data grouping, sequencing and cleaning pretreatment;Step 3;Define EKF six-dimensional state vector constructs prediction equation and completes filter initialization, step 4;Scene realization inquires time AIS target state time sequence complementation, step 5;Fusion ship GPS reference resolves relative situation and collision risk parameter, step 6;Complete ship navigation situation encapsulation data is pushed to shipborne electronic chart terminal, can improve ship navigation situation awareness reliability, reduce the probability of inland river ship collision accident, guarantee channel navigation safety.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent ship navigation situational awareness technology, specifically a ship AIS situational awareness calculation method based on ship GPS timing synchronization and six-dimensional EKF. Background Technology

[0002] During navigation, the ship's onboard AIS receiver continuously receives dynamic messages broadcast from surrounding vessels. These messages include parameters such as the target vessel's MMSI, latitude and longitude, speed over land, heading over land, timestamp, length, and width. Simultaneously, the ship's GPS receiver receives time signals and ephemeris orbit parameters from satellites, autonomously calculating navigation dynamic information such as latitude and longitude, speed over land, and heading over land. After receiving this navigation dynamic information, the ship's onboard AIS broadcasts it along with other AIS information. The industry commonly integrates the ship's GPS data with the target vessel's AIS data to calculate the relative motion between the two vessels, achieving navigation situation visualization and collision risk warning.

[0003] Existing related technical solutions mainly fall into two categories, both of which have obvious technical defects:

[0004] The first type is the spherical relative motion calculation based on the Haversine formula. This type of scheme uses the latitude and longitude provided by the ship's GPS and the target ship's AIS to calculate the relative position of the two ships using the Haversine spherical distance formula. The time alignment of the data between the ship and the target ship is achieved only by simple linear interpolation. Because a complete ship kinematic model is not established, when the target ship's AIS messages are lost, updated at long intervals, or the channel is congested, it is impossible to extrapolate the target ship's position with high accuracy. Data from unobserved times must be discarded, resulting in gaps in the situational awareness. At the same time, the lack of a confidence quantification mechanism makes it impossible to distinguish between short-term reliable extrapolated tracks and long-term invalid extrapolation results, which can easily generate a large number of false collision warnings in densely populated port scenarios.

[0005] The second category is simplified trajectory prediction schemes. Although these schemes introduce grey prediction or constant-speed extrapolation models to compensate for long-interval AIS messages, the motion model lacks dimensionality, only including two-dimensional states of position and speed, and failing to incorporate micro-components such as turning rate and acceleration. Under maneuvering conditions such as ship turning, acceleration, and deceleration, the model deviates significantly from the actual motion state, and the extrapolation error diverges rapidly. In addition, although some schemes involve filtering, they do not construct a six-dimensional model for the non-uniform interval characteristics of AIS, do not use extended Kalman filtering (EKF) to effectively suppress AIS positioning noise and heading jitter, and do not establish a unified time series reference based on the ship's own GPS second pulse, resulting in the time offset between the ship and the target ship further amplifying the relative position calculation error.

[0006] Other solutions use standard Kalman filtering to smooth the trajectory, but these solutions mostly rely on radar equipment, and the filtering is mainly used for correction of the fused trajectory. Under the low-cost constraint of relying only on the shipboard standard GPS and AIS and not on external sensors such as radar, no solution has yet systematically integrated six-dimensional EKF, standardized initialization and three-dimensional heterogeneous confidence evaluation.

[0007] In summary, existing technical solutions that only integrate the ship's GPS and the target ship's AIS have the following long-standing core pain points: inconsistent timing references, poor adaptability of extrapolation models to maneuvering conditions, lack of reliable quantification mechanisms, and non-standard filtering initialization. Summary of the Invention

[0008] This invention provides a ship AIS situational awareness calculation method based on ship GPS timing synchronization and six-dimensional EKF, which solves the technical defects of the prior art by using only GPS / AIS to achieve high-precision, continuous and reliable situational awareness.

[0009] To achieve the above objectives, the present invention provides the following technical solution: a method for ship AIS situational awareness calculation based on ship GPS timing synchronization and six-dimensional EKF, comprising the following steps:

[0010] Step 1: Establish a global unified time reference and data acquisition. The establishment of the global unified time reference is based on the GPS 1PPS second pulse disciplining the local system clock and the AIS message time is calculated with the standard UTC receiving time of the ship. The data includes the ship's GPS data and the AIS data of surrounding ships.

[0011] Step 2; AIS data grouping, sorting, and cleaning preprocessing;

[0012] Step 3; Define the EKF six-dimensional state vector to construct the prediction equation and complete the filter initialization. The six-dimensional state vector is defined as follows: Where Lat is latitude, Lon is longitude, SOG is ship speed above ground, COG is ship heading above ground, ROT is ship turning rate, and a is ship acceleration along the heading; the six-dimensional state prediction equation is:

[0013]

[0014] Among them, the latitude of f1 is updated. f2 Longitude update, f3 Speed ​​update, f4 Heading update, f5 Turn rate, f6 Acceleration, R Mean radius of Earth, ΔN Northward displacement, ΔE Eastward displacement, Δt Time interval, k conv The unit conversion factor, for every minute instant τ from 0 to Δt, the covariance update formula is as follows:

[0015] ,

[0016] Where P k+1 / k Prior covariance, P k / k Posterior covariance, F state transition Jacobian matrix, Q process noise covariance matrix, the filtering initialization is when the first AIS is received, the latitude, longitude, ground speed, and ground heading data in the AIS are assigned to the corresponding components of the state vector; the initial turning rate and initial acceleration are set to zero; and the initial state covariance matrix is ​​assigned at the same time;

[0017] Step 4; Implement time-series completion of the target AIS status at the time of query in different scenarios. Scenario 1: Interpolation completion; If the query time is between two adjacent AIS values, use linear interpolation to calculate the target ship's current Lat, Lon, SOG, and COG, and use time-series difference between adjacent times to solve for the current turning rate and acceleration; the covariance matrix is ​​taken from the nearest covariance matrix. Scenario 2: EKF model extrapolation completion; If the query time is later than the ship's latest AIS value, calculate the extrapolation time difference, execute the prediction stage of extended Kalman filtering, and output the predicted value if no new AIS value arrives; if a new AIS value arrives, perform Kalman update based on the predicted value and output the updated value.

[0018] Step 5: Integrate the relative situation and collision risk parameters of the ship's GPS reference. Using the ship as the spatial reference, and combining the target ship's Lat, Lon, SOG, and COG at the unified UTC time after time-series completion, calculate the straight-line distance and relative bearing of the target ship relative to the ship using the Haversine spherical distance formula. Based on the ground speed and ground heading of the two ships, calculate the relative motion relationship and solve for the closest encounter distance (CPA) and shortest encounter time (DCPA). At the same time, bind the target ship's MMSI, length, and beam static dimension information to complete the complete ship navigation situation encapsulation.

[0019] Step 6: Push the complete ship navigation status encapsulated data to the shipborne electronic chart terminal.

[0020] Specifically, the Kalman update described in step 4 includes Lat, Lon, SOG, and COG updates, rate of turn and acceleration updates, and covariance matrix updates; the Lat, Lon, SOG, and COG updates include step 4a calculating the residuals; subtracting the corresponding terms from the predicted values ​​using the latitude, longitude, speed, and heading of the AIS message; and step 4b calculating the gain K; K = P pred H T HP pred H T + R) -1 , where P predThe predicted covariance matrix, H is the observation matrix, which is constructed by extracting the four observable quantities from the AIS message: latitude, longitude, speed, and heading. R is the observation noise covariance matrix. Step 4c corrects the state. The updated value equals the predicted value plus the product of the gain K and the residual. The rate of turn and acceleration updates are: rate of turn update value = predicted rate of turn + rate of turn correction ΔROT, acceleration update value = predicted acceleration + acceleration correction Δa, where ΔROT = k 51 ΔLat + k 52 ΔLon + k 53 ΔSOG + k 54 ΔCOG, Δa = k 61 ΔLat + k 62 ΔLon + k 63 ΔSOG + k 64 ΔCOG, where k 51、 k 52、 k 53、 k 54、 k 61、 k 62、 k 63、 k 64 Taken from the gain K matrix,

[0021] Observation 1 Observation 2 Observation 3 Observation 4

[0022] (Lat) (Lon) (SOG) (COG)

[0023] State 1 Lat [k11 k12 k13 k14 ]

[0024] State 2 Lon [k21 k22 k23 k24]

[0025] State 3 SOG [k31 k32 k33 k34]

[0026] State 4 COG [k41 k42 k43 k44]

[0027] State 5 ROT [k51 k52 k53 k54]

[0028] State 6 a [k61 k62 k63 k64 ]

[0029] Where k ij : Represents the contribution weight of the j-th observation residual to the correction of the i-th state variable.

[0030] The covariance matrix update is P 更新 = (I - KH) P pred,Where I is the identity matrix.

[0031] Specifically, the linear interpolation method in step 4 is: Xq is the target status value at the time of query, Xm is the status value in the AIS packet at the previous moment, Xm+1 is the status value in the AIS packet at the next moment, tq is the current query time, tm is the Unix timestamp of the previous AIS packet, tm+1 is the Unix timestamp of the next AIS packet, and the time sequence difference between adjacent moments is:

[0032]

[0033] Among them, ROT steering ratio, COG m+1 The ship's heading towards the ground a moment later, COG m The ship's heading relative to the ground a moment ago, t m+1 The timestamp of the next moment, t m The previous time stamp, α acceleration, SOG m+1 The ship's ground speed at the next moment, SOG m The ship's speed over land a moment ago.

[0034] Specifically, in step 4, the predicted and updated values ​​are evaluated using a three-dimensional weighted comprehensive confidence assessment. These three dimensions include extrapolation duration, EKF position covariance comprehensive error, and AIS message reception signal-to-noise ratio. Each indicator is normalized, weighted coefficients are assigned, and the results are summed to obtain the comprehensive confidence level of the ship's situation at the current query time. Covariance, time, and signal-to-noise ratio are evaluated from three completely independent dimensions: inherent algorithm uncertainty, pure time penalty, and physical signal quality, forming a complementary closed loop.

[0035] Step 4 states that the extrapolation duration = current observation time - last received observation time. The EKF position covariance composite error is directly extracted from the updated covariance matrix, extracting the variances corresponding to latitude and longitude to synthesize a position error. The AIS message reception signal-to-noise ratio is directly obtained from the receiver hardware. The normalization process maps each original value of the extrapolation duration, EKF position covariance composite error, and AIS message reception signal-to-noise ratio to a dimensionless number between 0 and 1. The weighted summation yields the overall confidence level of the ship's situation at the current query time:

[0036] Among them, Conf represents the overall confidence level, and S represents the overall confidence level. Δt Extrapolation duration normalized score, S p Normalized score of location covariance, S SNR Signal-to-noise ratio normalized score, w1 is S Δt Weights, w2 is S p Weights, w3 is S SNRWeights are assigned and categorized based on the overall confidence level. The categorization rules are as follows: It is determined to be a high-confidence valid target at that time; It was determined to be a low-confidence reference target at that time; The target is determined to be invalid at that time.

[0037] Specifically, for high-confidence targets, the electronic chart renders the ship's outline in full with solid lines, simultaneously displaying all ship information such as MMSI, speed, and heading. When the CPA and DCPA values ​​exceed the preset safety thresholds, the system simultaneously triggers an audible and visual collision warning. For low-confidence reference targets, the ship's graphic is rendered with a semi-transparent dashed line to weaken its appearance, and the system disables the collision warning function, using it only as an auxiliary reference for the overall situation. For targets deemed invalid, the corresponding ship's graphic is directly hidden in the electronic chart.

[0038] Specifically, after data acquisition in step 1, a unified time reference step is added, whereby the calculated AIS message time is the ship's standard UTC reception time minus the message's transmission delay.

[0039] Compared with existing technologies, the advantages of this solution are as follows:

[0040] This invention proposes a ship AIS target situation calculation method that integrates shipboard GPS and time-series extrapolation. It achieves refined target situation calculation using only two conventional navigation equipment: the ship's standard GPS module and the shipboard AIS receiver. A global time reference is constructed using the unified UTC time output by the shipboard GPS. A six-dimensional state-extended Kalman filter is used to complete AIS target time-series interpolation and dynamic extrapolation calculations. A multi-dimensional weighted confidence evaluation mechanism is also provided to achieve graded output of ship situation. This invention utilizes the shipboard GPS to uniformly calibrate the system time, eliminating the time-series offset between the local device clock and the AIS message timestamp, overcoming the shortcomings of traditional calculation schemes such as inconsistent time references and large deviations in target position and motion parameter calculations. Simultaneously, a complete CTRV motion model including turning rate and acceleration is used to describe the ship's dynamic navigation process, compensating for the shortcomings of single linear interpolation and low-order uniform velocity extrapolation models, which are difficult to adapt to ship turning, acceleration, and deceleration maneuvers. This effectively suppresses track jitter and track gaps caused by AIS channel interference, packet loss, and multipath reflection.

[0041] This invention addresses two types of time-series completion logic: interval interpolation for query time and location, and model extrapolation. While ensuring the accuracy of target state estimation, it controls the computational load of the algorithm, adapting to the low-computing-power real-time operation requirements of shipborne embedded terminals. The filtering stage employs a standardized fixed-value initialization strategy, determining the initial differential components based on the ship's straight-line prior characteristics, abandoning random numerical initialization modes, significantly accelerating filtering convergence speed, and improving the stability of track tracking throughout the entire time period. This invention calculates the target's comprehensive confidence level based on a weighted average of three indicators: extrapolation duration, filter position covariance, and AIS signal-to-noise ratio. Based on the confidence level, it implements differentiated chart rendering and graded collision warning control for ships, effectively filtering false alarms caused by long-term AIS disconnection during extrapolation. This solution requires no additional radar, optical camera, or other sensing equipment, resulting in low hardware modification costs. In complex inland waterways and densely trafficked port environments, it can continuously improve the accuracy of surrounding vessel situational awareness calculations and track tracking continuity, optimize the accuracy of vessel encounter risk (CPA) and DCPA assessments, comprehensively enhance the reliability of vessel navigation situational awareness, reduce the probability of inland waterway collisions, and ensure waterway navigation safety. Attached Figure Description

[0042] Figure 1 This is a flowchart of a basic embodiment of the present invention;

[0043] Figure 2 This is a flowchart of an optimized embodiment of the present invention;

[0044] Figure 3 This is a block diagram of the internal operational logic of the six-dimensional extended Kalman filter model of this invention;

[0045] Figure 4 This is a schematic diagram of the timing completion dual-branch logic of the present invention;

[0046] Figure 5 This is a block diagram of the three-dimensional confidence level control logic of the present invention. Detailed Implementation

[0047] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0048] Under actual inland waterway navigation conditions, this application uses a shipborne embedded processor as the core computing unit to construct a closed-loop situational awareness pipeline integrating "time calibration, motion filtering, branch completion, and reliability grading." Please refer to [link to relevant documentation]. Figure 1 , Figure 2 , Figure 3 , Figure 4, Figure 5 The present invention provides the following technical solution: a method for ship AIS situation calculation based on ship GPS timing synchronization and six-dimensional EKF, comprising the following steps:

[0049] Step 1: Establish a globally unified time reference and collect data. This global unified time reference is established based on GPS 1PPS second pulse disciplining the ship's system clock. The AIS message time is calculated using the ship's standard UTC reception time, which is the ship's standard UTC reception time minus the message's transmission delay. The data includes the ship's GPS data and AIS data from surrounding vessels.

[0050] Step 2; AIS data grouping, sorting and cleaning preprocessing; The grouping is to group and collect AIS messages that have undergone preliminary time calibration based on the ship's unique identifier MMSI; The sorting is to sort the messages in ascending order according to the UnixTime transmission timestamp built into the messages for different MMSI ships; The cleaning is to filter out invalid messages with duplicate content, missing signals or incomplete fields, and, in combination with the actual physical constraints of the ship's navigation, to remove abnormal data with latitude, longitude, speed and heading exceeding reasonable thresholds.

[0051] Step 3; Define the EKF six-dimensional state vector to construct the prediction equation and complete the filter initialization. The six-dimensional state vector is defined as follows:

[0052] Where Lat is latitude, Lon is longitude, SOG is ship speed above ground, COG is ship heading above ground, ROT is ship turning rate, and a is ship acceleration along the heading; the six-dimensional state prediction equation is:

[0053]

[0054] Among them, the latitude of f1 is updated. f2 Longitude update, f3 Speed ​​update, f4 Heading update, f5 Turn rate, f6 Acceleration, R Mean radius of Earth, ΔN Northward displacement, ΔE Eastward displacement, Δt Time interval, k conv The unit conversion factor, for every minute instant τ from 0 to Δt, the covariance update formula is as follows:

[0055] ,

[0056] Where P k+1 / k Prior covariance, P k / kThe posterior covariance, F (state transition Jacobian matrix), and Q (process noise covariance matrix) are used for filtering initialization. When the first AIS is received, the latitude, longitude, ground speed, and ground heading data from the AIS are assigned to the corresponding components of the state vector; the initial turning rate and initial acceleration are set to zero; and the initial state covariance matrix is ​​assigned. When two or more consecutive AISs are received, further initialization is performed: the latitude, longitude, ground speed, and ground heading data from the most recent AIS are assigned to the state vector; the two closest and unused AISs are used to solve for the current turning rate and acceleration using temporal difference analysis of adjacent time points; and the initial state covariance matrix is ​​adjusted.

[0057] Step 4; Implement time-series completion of the AIS target status at the time of query in different scenarios. Scenario 1: Interpolation completion; If the query time is between two adjacent AIS values, use linear interpolation to calculate the target ship's current Lat, Lon, SOG, and COG, and use time-series difference analysis between adjacent times to solve for the current turning rate and acceleration; The covariance matrix is ​​taken as the nearest covariance matrix; The linear interpolation method is: Xq is the target status value at the time of query, Xm is the status value in the AIS packet at the previous moment, Xm+1 is the status value in the AIS packet at the next moment, tq is the current query time, tm is the Unix timestamp of the previous AIS packet, tm+1 is the Unix timestamp of the next AIS packet, and the time sequence difference between adjacent moments is:

[0058]

[0059] Among them, ROT steering ratio, COG m+1 The ship's heading towards the ground a moment later, COG m The ship's heading relative to the ground a moment ago, t m+1 The timestamp of the next moment, t m The previous time stamp, α acceleration, SOG m+1 The ship's ground speed at the next moment, SOG m The ship's speed over land a moment ago.

[0060] Scenario 2: EKF model extrapolation and completion; if the query time is later than the ship's latest AIS, the extrapolation time difference is calculated, and the prediction stage of the extended Kalman filter is executed. If no new AIS arrives, the predicted value is output; if a new AIS arrives, a Kalman update is performed based on the predicted value, and the updated value is output. The Kalman update includes Lat, Lon, SOG, and COG updates, turning rate and acceleration updates, and covariance matrix updates. The Lat, Lon, SOG, and COG updates include step 4a calculating the residuals; subtracting the corresponding items in the predicted value from the latitude, longitude, speed, and heading of the AIS message; step 4b calculating the gain K; K = P pred HT HP pred H T + R) -1 , where P pred The predicted covariance matrix, H is the observation matrix, which is constructed by extracting the four observable quantities from the AIS message: latitude, longitude, speed, and heading. R is the observation noise covariance matrix. Step 4c corrects the state. The updated value equals the predicted value plus the product of the gain K and the residual. The rate of turn and acceleration updates are: rate of turn update value = predicted rate of turn + rate of turn correction ΔROT, acceleration update value = predicted acceleration + acceleration correction Δa, where ΔROT = k 51 ΔLat + k 52 ΔLon + k 53 ΔSOG + k 54 ΔCOG, Δa = k 61 ΔLat + k 62 ΔLon + k 63 ΔSOG + k 64 ΔCOG, where k 51、 k 52、 k 53、 k 54、 k 61、 k 62、 k 63、 k 64 Taken from the gain K matrix,

[0061] Observation 1 Observation 2 Observation 3 Observation 4

[0062] (Lat) (Lon) (SOG) (COG)

[0063] State 1 Lat [k11 k12 k13 k14 ]

[0064] State 2 Lon [k21 k22 k23 k24]

[0065] State 3 SOG [k31 k32 k33 k34]

[0066] State 4 COG [k41 k42 k43 k44]

[0067] State 5 ROT [k51 k52 k53 k54]

[0068] State 6 a [k61 k62 k63 k64 ]

[0069] Where k ij: Represents the contribution weight of the j-th observation residual to the correction of the i-th state variable.

[0070] The covariance matrix update is P 更新 = (I - KH) P pred, Where I is the identity matrix.

[0071] Step 5: Perform a three-dimensional weighted comprehensive confidence evaluation on the predicted and updated values ​​mentioned in Step 4. The three dimensions include extrapolation duration, EKF position covariance comprehensive error, and AIS message reception signal-to-noise ratio. After normalizing each indicator, weighting coefficients are assigned and the results are weighted and summed to obtain the comprehensive confidence of the ship's situation at the current query time. The extrapolation duration = current observation time - last received observation time. The EKF position covariance comprehensive error is directly extracted from the updated new covariance matrix, extracting the variances corresponding to latitude and longitude to synthesize a position error. The AIS message reception signal-to-noise ratio is directly obtained from the receiver hardware. The normalization process refers to mapping each original value of the extrapolation duration, EKF position covariance comprehensive error, and AIS message reception signal-to-noise ratio to a unified dimensionless number. The weighted summation yields the comprehensive confidence of the ship's situation at the current query time: Among them, Conf represents the overall confidence level, and S represents the overall confidence level. Δt Extrapolation duration normalized score, S p Normalized score of location covariance, S SNR Signal-to-noise ratio normalized score, w1 is S Δt Weights, w2 is S p Weights, w3 is S SNR Weights are assigned and categorized based on the overall confidence level. The categorization rules are as follows: It is determined to be a high-confidence valid target at that time; It was determined to be a low-confidence reference target at that time; The target is determined to be invalid at that time.

[0072] Step 6: Integrate the relative situation and collision risk parameters of the ship's GPS reference. Using the ship as the spatial reference, and combining the target ship's Lat, Lon, SOG, and COG at the unified UTC time after time-series completion, calculate the straight-line distance and relative bearing of the target ship relative to the ship using the Haversine spherical distance formula. Based on the ground speed and ground heading of the two ships, calculate the relative motion relationship and solve for the closest encounter distance (CPA) and shortest encounter time (DCPA). At the same time, bind the target ship's MMSI, length, and beam static dimension information to complete the complete ship navigation situation encapsulation.

[0073] Step 7: Push the complete ship navigation situation encapsulated data to the shipborne electronic chart terminal. For high-confidence targets, the electronic chart renders the ship outline as a solid line, simultaneously displaying all ship information such as MMSI, speed, and heading. When the CPA and DCPA values ​​exceed the preset safety threshold, the system simultaneously triggers an audible and visual collision warning. For low-confidence reference targets, the ship graphic is rendered with a semi-transparent dashed line to weaken the image, and the system disables the collision warning function, using it only as a global situational auxiliary reference. For targets deemed invalid, the corresponding ship graphic is directly hidden in the electronic chart.

[0074] To make the technical means, inventive features, objectives, and effectiveness in solving technical problems of this invention clearer and easier to understand, the implementation process of this invention is fully explained using a typical navigation scenario in inland waterways as an example. This embodiment only uses the ship's own GPS module and AIS receiver, without requiring additional radar or visual sensors. The core innovation of this invention lies in: establishing a globally unified time reference using the ship's GPS UTC second pulse, constructing a six-dimensional state extended Kalman filter model including latitude, longitude, ground speed, ground heading, turning rate, and acceleration, distinguishing between linear interpolation and EKF model extrapolation two types of time-series completion logic, and combining it with a three-dimensional index weighted confidence level output mechanism, thereby effectively solving the technical defects of traditional GPS+AIS joint situational awareness calculation, such as time-series asynchrony, large extrapolation errors of maneuver conditions, track jitter, lack of reliability level warning, and susceptibility to false collision alarms. The hardware system of this embodiment mainly includes a shipborne GPS positioning module, an AIS receiver terminal, an embedded processing unit, and an electronic chart display terminal.

[0075] First, the system clock is disciplined based on the GPS 1PPS second pulse to establish a globally unified time reference. The ship's GPS module outputs a 1PPS second pulse signal through a hardware pin, with the rising edge of this pulse strictly aligned to the global UTC standard integer second. This pulse signal is connected to the hardware interrupt capture interface of the embedded processor. When the processor captures the rising edge of the 1PPS pulse, it immediately triggers a hardware interrupt and simultaneously reads the complete UTC date and time synchronization information output from the GPS serial port. The millisecond and microsecond counting units of the embedded system are reset to the UTC integer second node. At the same time, the system counts the difference in the local crystal oscillator within adjacent pulse intervals and dynamically corrects the timer frequency division parameters to calibrate the local clock. This effectively reduces the cumulative timing deviation caused by the long-term operation of the passive crystal oscillator on the motherboard, ensuring that the system time is always synchronized with the globally unified UTC standard, and using this as the sole reference time scale for the entire device. Then, the GPS module outputs the ship's positioning data in real time, including WGS84 latitude and longitude, the ship's SOG, the ship's COG, and the UTC standard second pulse time signal. This second pulse synchronizes the system's local clock once per second, effectively eliminating the time offset between the embedded motherboard's local time and the AIS message's UnixTime timestamp. Upon receiving each valid AIS message, the ship's standard UTC reception time is immediately recorded, and the message's transmission delay ΔT (equal to the ship's reception time minus the message's built-in UnixTime) is calculated. For multiple consecutive messages from the same MMSI ship, a sliding average window is used to calculate the average transmission delay, offsetting random delay fluctuations caused by maritime wireless propagation, channel congestion, and receiver buffering. Subsequently, the calculated average delay is used to perform preliminary time correction on the ship's AIS observation records, establishing an "equivalent transmission time" under the ship's unified time system, providing a preliminary unified time reference for subsequent processing.

[0076] Secondly, the AIS receiving terminal continuously receives dynamic messages broadcast by surrounding Class A and Class B vessels. Each message contains fixed fields such as MMSI, UnixTime, Lat, Lon, SOG, COG, Length, and Width. The hardware layer of the receiving terminal first performs signal integrity filtering and verification, eliminating invalid messages that are incomplete or have verification errors, and only transmitting complete and valid messages to the embedded processing unit. In addition, the embedded single-frame operation has a short processing time and is "real-time". The embedded processing unit caches the ship's GPS data stream and the raw data of AIS messages from multiple vessels in real time, and sets a 120-second overall sliding timing buffer window to store all recent vessel observation data, providing sufficient historical data support for subsequent EKF filtering, extrapolation calculation, and confidence assessment. It continuously collects the ship's GPS observation data after clock calibration, synchronously driving the shipborne AIS receiver to continuously listen for and demodulate dynamic messages broadcast by surrounding vessels, and extracts valid information after completing message integrity verification. After initial time calibration, AIS messages are grouped and aggregated based on the ship's unique identifier (MMSI) to form independent observation sequences for each ship. For each ship's sequence, it is sorted in ascending order according to the UnixTime transmission timestamp embedded in the message to construct a continuous time-series observation sequence, avoiding time logic confusion caused by out-of-order reception by the receiver. Based on this, multi-level data cleaning is performed: invalid messages with duplicate content, missing signals, or incomplete fields are filtered out, and abnormal data with latitude, longitude, speed, and heading exceeding reasonable thresholds are removed, taking into account the actual physical constraints of ship navigation. Finally, a clean, well-organized, and time-continuous AIS observation dataset for each target ship is generated, providing a high-quality data source for subsequent filtering modeling and track extrapolation.

[0077] Then, a six-dimensional state vector is constructed to adapt to all operating conditions of the ship, including straight-line travel, turning, acceleration, and deceleration: Lat, Lon, SOG, COG, ROT (ship turning rate), and a (acceleration along the heading). For the first valid AIS observation data of each ship group, filtered normalization initialization is performed: the Lat, Lon, SOG, and COG of the first message are directly assigned to the corresponding state components, assuming the ship is initially in a uniform straight-line state, and the turning rate and acceleration are initialized to zero to avoid using random numerical initialization of the state micro-components. When a single ship's time series contains two or more consecutive AIS observation points, the current turning rate and acceleration are solved in real time using the time series difference between adjacent time points: the turning rate is calculated after a 0°~360° circular jump correction of the heading difference, and a reasonable ship physical motion threshold is set to limit the turning rate and acceleration, filtering out abnormal motion parameters caused by AIS noise. During model calculations, the original latitude, longitude, and heading angle data are uniformly converted into radians for trigonometric function calculations to avoid calculation errors caused by inconsistent angle dimensions. The ground speed is stored in the native AIS knot (kt) unit and is only temporarily converted to meters per second during the displacement integral calculation stage to balance the general maritime data standards with the self-consistency of dynamic calculation dimensions. The turning rate is in rad / s and the acceleration is in m / s².

[0078] It is worth noting that this embodiment does not use a fixed set of Q and R matrices. The process noise covariance matrix Q and the observation noise covariance matrix R in this step can dynamically switch between multiple preset values ​​based on the navigation waterway (inland waterway / port / coastal) or the AIS signal quality. For example, when the vessel enters a winding inland waterway, the processor automatically increases the covariance value corresponding to the ROT (ratio of turning) in the process noise Q to enhance the filter's tracking sensitivity to rapid changes in course; while in open, straight channels, this value is decreased to enhance the smooth noise reduction effect. This setting method eliminates the need for online iterative optimization and noise identification calculations, reducing algorithm computational overhead while ensuring filtering and noise reduction effects, and adapting to the real-time computing needs of shipborne embedded devices.

[0079] The filtering initialization adopts standardized fixed assignment rules to avoid filter divergence and initial trajectory distortion problems caused by random initialization. The first valid AIS observation message from a single ship is parsed, and the latitude, longitude, speed to ground, and heading to ground data within the message are directly assigned to the corresponding components of the state vector. Considering the ship's normal navigation characteristics, it is assumed that the ship is initially in a uniform straight-line state, and the initial turning rate and initial acceleration are set to zero to ensure that the initial differential state quantities conform to the ship's steady-state navigation laws. Simultaneously, based on the normal GPS positioning error range and the inherent jitter characteristics of AIS data, the initial state covariance matrix P0 is assigned to quantify the uncertainty of the initial state, providing stable initial constraints for the convergence of the filtering iteration. When two or more consecutive valid AIS observation data are acquired, the ship's acceleration and turning rate are solved in real time using a time-series difference method, and amplitude limiting corrections are applied based on the ship's physical navigation characteristics to filter out abnormal noise caused by AIS channel interference and data jumps. A speed unit conversion factor is set. This function is used to convert the ship's speed (kt) to m / s units. Based on the observed speed values ​​at adjacent times and the sampling time interval Δt, it calculates the ship's real-time acceleration. To avoid false acceleration / deceleration states, an acceleration value range is set in conjunction with the dynamic performance of inland waterway vessels, and values ​​exceeding the limit are truncated. Addressing the differential calculation error caused by the circular jumps between 0° and 360° in the AIS heading, angle over-limit compensation correction is applied to the heading difference. The corrected heading difference is converted to radians, and the real-time turning rate is calculated based on the sampling interval. Simultaneously, a physical constraint range for the ship's maximum turning rate is set, and abnormally large angle jump data is truncated to ensure that the calculated turning rate matches the ship's actual navigation state.

[0080] This solution employs a constant-speed, constant-steering CTRV motion model as the state transition model, adapting to ship navigation conditions of uniform speed, uniform steering, and uniform acceleration. By decomposing the ship's real-time speed into northward and eastward components and performing time-series integration, a complete six-dimensional state prediction equation is constructed, enabling accurate deduction of the ship's position and motion state. For scenarios involving short-term AIS signal loss, the system executes a pure model prediction mechanism, predicting the ship's state based on the CTRV motion model. It also dynamically updates the state covariance matrix by combining the Jacobian matrix and a preset process noise matrix, quantifying the uncertainty changes in the ship's state during signal loss. During periods without effective AIS observations, the system continuously deduces state error changes, providing a quantitative basis for target state reliability assessment. When a new effective AIS observation message is received, the system fully executes the Kalman gain calculation, state residual correction, and posterior covariance update process, fusing model prediction prior information with measured observation information. This effectively smooths out AIS observation noise and heading jump problems, outputting a continuous, stable, and high-precision six-dimensional ship motion state, meeting the practical application requirements of inland waterway vessel target situational awareness. The electronic chart and ship collision warning module issues ship status query commands at a 1-second cycle. For a single ship time series observation sequence, it distinguishes two types of time series completion logic to adapt to different query time positions.

[0081] For any situation query time issued by the electronic chart or collision warning module, the system combines the single-ship AIS time-series observation interval and uses the following two types of logic to complete the target ship's complete state: Scenario 1: Interpolation completion. If the query time is between two adjacent valid AIS observation times, linear interpolation is used to calculate the target ship's current Lat, Lon, SOG, and COG. This method is applicable to times within the observation interval and has the advantages of high accuracy and low computational cost. Scenario 2: EKF model extrapolation completion. If the query time is later than the ship's latest AIS observation time, the extrapolation time difference is calculated, and only the prediction stage of extended Kalman filtering is performed. Based on the constant velocity and constant steering (CTRV) nonlinear motion model, SOG and COG are decomposed into northward and eastward velocity components through trigonometric functions to complete the state recursive prediction, and a first-order Taylor expansion is used to locally linearize the nonlinear elements, finally outputting the complete six-dimensional target state at the query time.

[0082] A confidence evaluation system was established, comprising three quantitative indicators: extrapolation duration, EKF position covariance comprehensive error, and AIS message reception signal-to-noise ratio. After normalizing each indicator, weighting coefficients were assigned, and the results were weighted and summed to obtain the comprehensive confidence level of the ship's status at the current query time. The system sets two-level duration thresholds to mark targets as high-confidence valid targets, low-confidence reference targets, or those deemed invalid, respectively.

[0083] Three independent dimensions of ship situation confidence evaluation indicators are constructed. All indicators can be calculated based on existing AIS time-series data and the iterative output results of the six-dimensional extended Kalman filter mentioned above. The original quantitative indicators of each dimension are uniformly normalized and then weighted and summed to obtain the target comprehensive confidence score. The matching weight coefficients of each dimension are offline calibrated based on multiple sets of inland waterway vessel real-time navigation data. The formula for calculating the comprehensive confidence score is as follows:

[0084]

[0085] In the formula, These are the extrapolation duration, EKF position covariance comprehensive error, and fixed weights corresponding to the AIS received signal-to-noise ratio, respectively. The score is normalized to reflect the extrapolation time; the longer the ship's status is extrapolated, the lower the corresponding score. The EKF position covariance comprehensive error normalization score is obtained by synthesizing the latitude and longitude corresponding to the diagonal variances in the filtered posterior covariance matrix P. The greater the uncertainty of the position estimation, the lower the score. The AIS receive signal-to-noise ratio (SNR) normalization score is used; the worse the ship's AIS receive signal quality, the lower the corresponding score. When AIS packet loss exceeds X seconds (e.g., 30 seconds), the confidence level is forcibly reset to zero. The target credibility level is determined based on the overall confidence level value, with the grading rule fixed as: Overall Confidence Level. It is determined to be a high-confidence valid target at that time; It was determined to be a low-confidence reference target at that time; The target is determined to be invalid at that time.

[0086] Using the ship's real-time GPS output of its WGS84 latitude and longitude as a spatial reference, and combining the target ship's Lat, Lon, SOG, and COG at a unified UTC time after time-series completion, the Haversine spherical distance formula is used to calculate the straight-line distance and relative bearing of the target ship relative to the ship. Based on the ground speed and ground heading of the two ships, the relative motion relationship is calculated, and the two core collision risk parameters of closest encounter distance (CPA) and shortest encounter time (DCPA) are solved. At the same time, the static dimensional information of the target ship, such as MMSI, length, and beam, is bound to complete the encapsulation of the ship's navigation status.

[0087] The system pushes the overall navigation situation of ships with comprehensive confidence levels to the shipborne electronic chart terminal: high-confidence targets are marked normally and completely, displaying ship information and triggering collision warnings when CPA / DCPA limits are exceeded; low-confidence targets are displayed with a semi-transparent dashed line to weaken the display, shielding risk warning prompts and serving only as a situational reference; failed targets are directly hidden, thereby avoiding a large number of false alarms in scenarios where AIS is disconnected for a long time or the channel is congested, and ultimately achieving continuous, stable and high-precision situational awareness of ships in inland waterways, ports and coastal waters.

Claims

1. A method for ship AIS situational awareness calculation based on ship-to-ship GPS timing synchronization and six-dimensional EKF, characterized in that... Includes the following steps: Step 1; Establish a global unified time reference and data acquisition. The establishment of the global unified time reference is based on GPS 1PPS second pulse disciplined local system clock, and the AIS message time is calculated with the standard UTC receiving time of the ship. The data includes the ship's GPS data and the AIS data of surrounding ships. Step 2; AIS data grouping, sorting, and cleaning preprocessing; Step 3; Define the EKF six-dimensional state vector to construct the prediction equation and complete the filter initialization. The six-dimensional state vector is defined as follows: Where Lat is latitude, Lon is longitude, SOG is ship speed above ground, COG is ship heading above ground, ROT is ship turning rate, and a is ship acceleration along the heading; the six-dimensional state prediction equation is: , Among them, f1 latitude update, f2 longitude update, f3 speed update, f4 heading update, f5 turning rate, f6 acceleration, R mean radius of the Earth, ΔN northward displacement, ΔE eastward displacement, Δt time interval, and k conv The unit conversion factor is used, and the covariance update formula is as follows for every tiny instant between 0 and Δt: , Where P k+1 / k Prior covariance, P k / k Posterior covariance, F state transition Jacobian matrix, Q process noise covariance matrix; the filtering initialization is, when the first AIS is received, assigning the latitude, longitude, ground speed, and ground heading data in the AIS to the corresponding components of the state vector; setting the initial turning rate and initial acceleration to zero; and simultaneously assigning the initial state covariance matrix. Step 4; Implement time-series completion of the target AIS status at the time of query in different scenarios. Scenario 1: Interpolation completion; If the query time is between two adjacent AIS values, use linear interpolation to calculate the target ship's current Lat, Lon, SOG, and COG, and use time-series difference between adjacent times to solve for the current turning rate and acceleration; the covariance matrix is ​​taken from the nearest covariance matrix. Scenario 2: EKF model extrapolation completion; If the query time is later than the ship's latest AIS value, calculate the extrapolation time difference, execute the prediction stage of extended Kalman filtering, and output the predicted value if no new AIS value arrives; if a new AIS value arrives, perform Kalman update based on the predicted value and output the updated value. Step 5; By integrating the relative situation and collision risk parameters of the ship's GPS reference, and using the ship as the spatial reference, and combining the target ship's Lat, Lon, SOG, and COG at the unified UTC time after time-series completion, the Haversine spherical distance formula is used to calculate the straight-line distance and relative bearing of the target ship relative to the ship. Based on the ground speed and ground heading of the two ships, the relative motion relationship is calculated, and the nearest encounter distance (CPA) and shortest encounter time (DCPA) are solved. At the same time, the static dimensional information of the target ship's MMSI, length, and beam is bound to complete the encapsulation of the ship's navigation situation. Step 6: Push the complete ship navigation status encapsulated data to the shipborne electronic chart terminal.

2. The ship AIS situation assessment method according to claim 1, characterized in that, The Kalman update in step 4 includes Lat, Lon, SOG, and COG updates, rate of turn and acceleration updates, and covariance matrix updates. The Lat, Lon, SOG, and COG updates include step 4a calculating the residuals; subtracting the corresponding terms from the predicted values ​​using the latitude, longitude, speed, and heading of the AIS message; and step 4b calculating the gain K; K = P. pred H T HP pred H T + R) -1 , where P pred Predict the covariance matrix, H is the observation matrix, which is constructed by extracting the four observable quantities from the AIS message: latitude, longitude, speed, and heading, R is the observation noise covariance matrix, and step 4c is the state correction. The updated value equals the predicted value plus the product of the gain K and the residual; the steering rate and acceleration updates are: steering rate update value = predicted steering rate value + steering rate correction ΔROT, acceleration update value = predicted acceleration value + acceleration correction Δa, where ΔROT = k 51 ΔLat + k 52 ΔLon + k 53 ΔSOG + k 54 ΔCOG, Δa = k 61 ΔLat +k 62 ΔLon + k 63 ΔSOG + k 64 ΔCOG, where k 51、 k 52、 k 53、 k 54、 k 61、 k 62、 k 63、 k 64 Taken from the gain K matrix, , Where k ij : represents the contribution weight of the j-th observation residual to the correction of the i-th state variable, and the covariance matrix update is P 更新 = (I - KH) P pred, Where I is the identity matrix.

3. The ship AIS situation assessment method according to claim 1, characterized in that... The linear interpolation method in step 4 is: Xq is the target status value at the time of query, Xm is the status value in the AIS packet at the previous moment, Xm+1 is the status value in the AIS packet at the next moment, tq is the current query time, tm is the Unix timestamp of the previous AIS packet, tm+1 is the Unix timestamp of the next AIS packet, and the time difference between adjacent moments is: , Among them, ROT steering ratio, COG m+1 The ship's heading towards the ground a moment later, COG m The ship's heading relative to the ground a moment ago, t m+1 The timestamp of the next moment, t m The previous time stamp, α acceleration, SOG m+1 The ship's ground speed at the next moment, SOG m The ship's speed over land a moment ago.

4. The ship AIS situation assessment method according to claim 1, characterized in that, The predicted and updated values ​​in step 4 are evaluated using a three-dimensional weighted comprehensive confidence assessment. The three dimensions include extrapolation duration, EKF position covariance comprehensive error, and AIS message reception signal-to-noise ratio. After normalizing each indicator, weighting coefficients are assigned and the values ​​are summed to obtain the comprehensive confidence of the ship's status at the current query time.

5. The ship AIS situation assessment method according to claim 4, characterized in that, Step 4 states that the extrapolation duration = current observation time - last received observation time. The EKF position covariance composite error is directly extracted from the updated covariance matrix, extracting the variances corresponding to latitude and longitude to synthesize a position error. The AIS message reception signal-to-noise ratio is directly obtained from the receiver hardware. The normalization process maps each original value of the extrapolation duration, EKF position covariance composite error, and AIS message reception signal-to-noise ratio into a unified dimensionless number. The weighted summation yields the overall confidence level of the ship's situation at the current query time: Among them, Conf represents the overall confidence level, and S represents the overall confidence level. Δt Extrapolation duration normalized score, S p Normalized score of location covariance, S SNR Signal-to-noise ratio normalized score, w1 is S Δt Weights, w2 is S p Weights, w3 is S SNR Weights are assigned and categorized based on the overall confidence level. The categorization rules are as follows: It is determined to be a high-confidence valid target at that time; It was determined to be a low-confidence reference target at that time; The target is determined to be invalid at that time.

6. The ship AIS situation assessment method according to claim 5, characterized in that... For high-confidence targets, the electronic chart renders the ship's outline in full with solid lines, simultaneously displaying all ship information such as MMSI, speed, and heading. When the CPA and DCPA values ​​exceed the preset safety thresholds, the system simultaneously triggers an audible and visual collision warning. For low-confidence reference targets, the ship's graphic is rendered with a semi-transparent dashed line to weaken its appearance, and the system disables the collision warning function, using it only as an auxiliary reference for the overall situation. For targets deemed invalid, the corresponding ship's graphic is directly hidden in the electronic chart.

7. The ship AIS situation assessment method according to claim 1, characterized in that, In step 1, establishing a global unified time reference and data acquisition, the calculation of the AIS message time is the ship's standard UTC reception time minus the transmission delay of the message.

8. The ship AIS situation calculation method according to claim 1, characterized in that, After the filtering initialization described in step 3, when two or more consecutive AISs are received, further initialization is performed. The latitude, longitude, ground speed, and ground heading data of the most recent AIS are assigned to the state vector. The current turning rate and acceleration of the two closest in time that have not yet been used are solved by temporal difference between adjacent time points. At the same time, the initial state covariance matrix is ​​adjusted.

9. The ship AIS situation assessment method according to claim 1, characterized in that, The grouping in step 2 refers to grouping and aggregating AIS messages that have undergone preliminary time calibration based on the ship's unique identifier MMSI. The sorting is performed for different MMSI ships, sorting them in ascending order according to the UnixTime transmission timestamp built into the message. The cleaning is to filter out invalid messages with duplicate content, missing signals, or incomplete fields, and, in conjunction with the ship's actual navigation physical constraints, to remove abnormal data with latitude, longitude, speed, and heading exceeding reasonable thresholds.