The Ship Movement Trajectory Prediction Algorithm Using Navigational Data Fusion

It is essential for the marine navigator conducting maneuvers of his ship at sea to know future positions of himself and target ships in a specific time span to effectively solve collision situations. This article presents an algorithm of ship movement trajectory prediction, which, through data fusion, takes into account measurements of the ship’s current position from a number of doubled autonomous devices. This increases the reliability and accuracy of prediction. The algorithm has been implemented in NAVDEC, a navigation decision support system and practically used on board ships.


Introduction
It has been assumed herein that the term "navigational data fusion" (unlike the broader concept of navigational data integration [1][2][3][4][5][6][7]) is a fusion of data from different, duplicated sources, (navigational measuring instruments) describing the same physical quantity. The data obtained through fusion are based on information from all of the available sensors. Consequently, such data are characterized by greater precision than those from each separate sensor. In such cases the system safety level is enhanced, because in the absence of data from a specific source (device failure) the other still guarantees effective operation. This is particularly important in real-time systems. Data fusion, therefore, provides more reliable and more accurate information.
Practice shows that most sea-going vessels have autonomous position determining devices doubled. The navigator dealing with data on their own ship position from various sources may face difficulties in predicting the trajectory of their own ship and making the right decisions. On the other hand, relying on measurements from a single device only is an unreliable solution with a risk of vital information loss. It, therefore, seems justified to make use of the data fusion mechanism for navigational data prediction and synthesis.
The proposed navigational data fusion process is based on a multi-sensor Kalman filter. The filtered signals are weighted by a filtration error cross-covariance matrix, then the averaged output signal is calculated. This signal may be used in the further process of predicting a ship movement trajectory over a specified time.
The developed computing algorithm, in order to minimize prediction errors, makes use of artificial neural networks (like in [8][9][10][11]), trained by the adaptive method. This approach consists of using a large number of neural networks taught from data strings of different lengths. The network that learn from short data strings permitting better approximate movement parameters of a maneuvering ship. The function of the networks learning from longer data strings is the approximation of a steady movement (non-maneuvering vessels). Values of predicted movement parameters are determined based on the weighted responses of each network. It has been adopted that the values of weights for each network response are calculated on the basis of prediction errors and current values of the ship movement obtained through the navigational data fusion. This approach is effective for predicting

The Navigational Data Fusion
The fusion of navigation data obtained from measurements carried out by l sensors is expressed by the weighted average [26,27]: where: ( x(t), y(t)) fusion of Cartesian coordinates estimates of vessel position at an instant t; v x (t), v y (t) fusion of vessel speed estimates in the reference system at an instant t; A i (t) fusion weights' matrices; (x i (t),ŷ i (t)) estimates of Cartesian coordinates of vessel position at an instant t determined using a Kalman filter for a measurement by the i-th sensor (1 ≤ i ≤ l); and v xi (t),v yi (t) estimates of vessel speed in the reference system at an instant t determined using a Kalman filter for a measurement by the i-th sensor (1 ≤ i ≤ l).
Navigational data fusion weights matrices are determined from the formula [26,27]: where: P ij (t) matrix of cross-covariance of filtration errors between i-th and j-th sensor-specific subsystems.
Matrices of filtration error cross covariance are determined from this formula [26,27]: where: Sensors 2017, 17, 1432 is the matrix of the Kalman filter gain at an instant t for i-th (j-th) sensor-specific subsystem (1 ≤ i ≤ l,1 ≤ j ≤ l) [26,27]; and H, Φ constant matrices of the system: H = 1 0 0 0 Defined by Equations (1)-(3), the navigational data fusion process is optimal, because it minimizes the trace of the fusion estimator error matrix [28].
The vector of navigational data fusion may be used in the further process of predicting the ship trajectory for a specified time span. This procedure increases the reliability and accuracy of prediction.

Prediction of other Ship Trajectories
One way of predicting the movement trajectory of a ship, i.e., regarded as a complex, dynamic, technical system, is the application of artificial neural networks. They make up a universal approximating system, mapping multidimensional datasets. They have an ability to learn and adapt to changing environmental conditions. They are also capable of generalizing in various areas, including the prediction of time series and the identification of control objects. They are an interesting alternative to traditional methods in the absence of a precise hydrodynamic model of the ship and in the case of difficulties and time constraints relating to the identification of analytical model parameters. Their speed of operation makes them applicable in real-time systems.
Typical applications of artificial neural networks for identification, prediction, and control require that a proper training set should be gathered. The training process is a one-time procedure based on the collected data that should include all situations likely to occur.
An alternative method would be the construction of adaptive systems, in which training processes take place repeatedly along with changing movement conditions. The adaptive approach is used in the proposed method of prediction of other ship movement parameters. This approach employs a large number of neural networks trained by data strings of different lengths. Networks that learn from short data strings permit better approximate movement parameters of manoeuvring ships. The function of networks trained from longer data strings is the approximation in the case of steady movement (ships that are not maneuvering). Values of predicted movement parameters are determined based on weighted responses of individual networks.
This approach eliminates the need to identify a manoeuvre (as is the case in solutions using two networks: for a manoeuvring ship and a ship not performing any rudder and/or engine manoeuvers). By changing the weights the system smoothly changes the predictions: for steady movement (no manoeuvring), or for a manoeuvring ship. In this connection it is important to properly assign weights to the responses of the particular networks. It was assumed that the values of weights for each network (prediction of movement parameters) are calculated based on prediction errors, which, in turn, are based on the current values of ship movements obtained via the navigational data fusion of Equations (1)-(3): where: m number of neural networks; i numeral of a network (1 ≤ i ≤ m); w i weight for the i-th network response; ε i i-th network prediction error; ε min minimum value of the prediction error made by a network; and ε max maximum value of the prediction error made by a network. The algorithm of other ship movement parameter prediction is as follows: 1.
Recording of training data strings using the process of navigation data fusion (Equations (1)- (3)).

3.
Determination of the prediction errors of the networks on the basis of the current values of ship movement parameters using the navigational data fusion process (Equations (1)- (3)).

4.
Determination of the weights for each network response.

5.
Determination of the network response for the current values of the movement parameters using the navigational data fusion process (Equations (1)- (3)). 6.
Determination of the values of predicted movement parameters based on weighted responses of each network.
The algorithm makes use of the generalized regression neural network (GRNN) with a structure containing four functionally-diversified layers: input, radial, regression, and output. The number of radial neurons is equal to the number of training data. The regression layer consists of two neurons, the output layer has one. Responses of the radial neuron layer are multiplied by values of desired responses, and the result is divided by the sum of the radial neuron responses. Radial neurons in regression networks may be trained using any self-learning technique, while the regression and output layers are trained by means of a specialized algorithm [29].
The proposed algorithm can be used for predicting the trajectory of both one's own and another ship. However, if we have a hydrodynamic model of one's own ship, its use in the prediction process is highly justified.

Prediction of One's Own Ship Trajectory
For the purposes of predicting the trajectory of one's own ship, an LQR regulator was used, similarly to the problem of course stabilization. This is possible if the ship model parameters, as well as planned course alterations, are known. This assumption is true for one's own ship.
The usual practice in designing algorithms for a complex dynamic object is an application of a simplified, mostly linear model, which makes up a basis for further synthesis of the system. Let the dynamics of a continuous stationary object be described by a linear equation of state: where: A a matrix with the size n × n and fixed elements independent of time; B a matrix with the size n × p and fixed elements independent of time; X n-dimensional vector of state; .
x n-dimensional vector of derivatives versus time (t); and u p-dimensional vector of control signals.
with the initial condition: while the control quality indicator has this form: where: R x symmetric, positive semidefinite matrix, with dimensions n × n and fixed elements being independent of time; and R u symmetric, positive definite matrix, with dimensions p × p and fixed elements being independent of time.
The problem to be considered is the determination of such a control vector u * that will meet Equation (5) and minimize the quality criterion defined by Equation (7). Optimally, the control takes this form: where matrix P is determined from the algebraic Riccati's equation: where: Let the model describing the dynamics of ship movement will be a Nomoto model [16] including a course deviation as a state component. Then, to be consistent with the form of Equation (5), the following denotations are made: where: ψ deviation from the vessel's course; r = . ψ rate of turn; δ rudder angle; and a, c parameters determined from ship model tests, always assumed to be known for one's own ship.
The control quality in the problem of ship course stabilization is mostly defined by this indicator [16]: where: λ a coefficient greater than zero, which is interpreted as a compromise between course deviation (yaw angle) and rudder angle (steering gear load); that, after introducing the matrices: will take the form of Equation (7). In the case of data: Equations (10) and (12) and the algebraic Riccati Equation (9) will lead to the following equations (taking into account the symmetry of matrix P): where: p ij element of matrix P in the i-th row and j-th column; After its solution, we obtain: Given that the parameter c may exceed the value of the expression a 2 √ λ 2 and bearing in mind the negative determination of the matrix P, out of the four solutions of Equation (14) we obtain: Therefore, for the data: Equations (10), (12), and (15) and the control law (Equation (8)) will take the form: where: Thanks to the assumption that parameters a, c are known, and so are future course alterations (course deviations) ψ, thereby knowing the rate of turn r, the control law of Equation (16) may be adopted as the main module of the algorithm for own ship trajectory prediction. The coefficient is λ, determined arbitrarily.
The algorithm of one's own ship trajectory prediction, apart from the module of control decision-making and the model of dynamics described by Equations (5) and (10), must also take into account the ship's movement kinematics model. To this end the following is assumed: where: (x, y) Cartesian coordinates (ship's position); u ship's longitudinal speed; and v transverse speed of the ship.
The model described by Equations (5) and (10) should also take into account the dynamics of the steering gear, which is an executive element with constraints on the rudder angle and rate of rudder deflection changes. We can do it by adding Equation (16) to the model dynamics: where δ z is the rudder angle setting. The relationships between Equations (5), (10), and (16)-(18) constitute one's own ship trajectory prediction algorithm (for which model parameters and future course alterations are known). The prediction is obtained as a result of the simulation of the course autopilot that operates based on the LQR regulator and linear model of ship movement dynamics. The algorithm takes into account measurement data obtained through the process of the fusion of Equations (1)-(3).

Implementation of the Proposed Algorithm in the Navigational Decision Support System NAVDEC
The proposed ship trajectory prediction algorithm (for one's own and other ships) using the navigational data fusion process has been implemented in the navigational decision support system NAVDEC [30,31].
The NAVDEC system is an addition and extension of the navigational bridge equipment onboard a ship. It is a real-time system operated by the navigator. To function properly, NAVDEC has to interact with standard shipboard equipment and systems: log, gyrocompass, ARPA (automatic radar plotting aid), GNSS (global navigational satellite system), AIS (automatic identification system), and ENC (electronic navigational chart), which deliver current navigational data (Figure 1).
The relationships between Equations (5), (10), and (16)-(18) constitute one's own ship trajectory prediction algorithm (for which model parameters and future course alterations are known). The prediction is obtained as a result of the simulation of the course autopilot that operates based on the LQR regulator and linear model of ship movement dynamics. The algorithm takes into account measurement data obtained through the process of the fusion of Equations (1)-(3).

Implementation of the Proposed Algorithm in the Navigational Decision Support System NAVDEC
The proposed ship trajectory prediction algorithm (for one's own and other ships) using the navigational data fusion process has been implemented in the navigational decision support system NAVDEC [30,31].
The NAVDEC system is an addition and extension of the navigational bridge equipment onboard a ship. It is a real-time system operated by the navigator. To function properly, NAVDEC has to interact with standard shipboard equipment and systems: log, gyrocompass, ARPA (automatic radar plotting aid), GNSS (global navigational satellite system), AIS (automatic identification system), and ENC (electronic navigational chart), which deliver current navigational data ( Figure 1). The NAVDEC system, like other navigation systems, has information and presentation functions. However, NAVDEC's innovative functionality is an analysis of a navigational situation taking into account the Collision Regulations, principles of good sea practice, and the criteria used by expert navigators. Where the situation is classified as a collision situation, the system generates suggested anti-collision manoeuvres. The collision situation is presented to the navigator in the form of a rosette, depicting the ranges of allowable courses, i.e., courses that enable one's own ship to pass all observed targets at a preset safe distance. The rosette also shows a recommended course. The solutions proposed by the system, along with their justification, do not relieve the navigator from responsibility, but facilitate them to take the right decision.
The NAVDEC system has been certified by the Polish Register of Shipping (certification no. TC/2026/901301/15), a globally-recognized classification society, and implemented on ships of different operators (e.g., Polferries).
Computing experiments were carried out in the real environment on board M/F Wolin ( Figure  2), the largest car/passenger ferry trading in the Baltic. These parameters were adopted as model The NAVDEC system, like other navigation systems, has information and presentation functions. However, NAVDEC's innovative functionality is an analysis of a navigational situation taking into account the Collision Regulations, principles of good sea practice, and the criteria used by expert navigators. Where the situation is classified as a collision situation, the system generates suggested anti-collision manoeuvres. The collision situation is presented to the navigator in the form of a rosette, depicting the ranges of allowable courses, i.e., courses that enable one's own ship to pass all observed targets at a preset safe distance. The rosette also shows a recommended course. The solutions proposed by the system, along with their justification, do not relieve the navigator from responsibility, but facilitate them to take the right decision.
The NAVDEC system has been certified by the Polish Register of Shipping (certification no. TC/2026/901301/15), a globally-recognized classification society, and implemented on ships of different operators (e.g., Polferries).
Computing experiments were carried out in the real environment on board M/F Wolin (Figure 2), the largest car/passenger ferry trading in the Baltic. These parameters were adopted as model coefficients: a = 0.023[1/s], c = 0.003 1/s 2 . The selected ship has the following characteristics: maximum rudder angle δ max = 35 [ • ], maximum rudder rate of turn . δ max = 3.5 [ • /s]. It was established arbitrarily that λ = 1.
The prediction of other ships' trajectories was based on three neural networks trained by properly prepared data strings (data obtained from fusion) with lengths, respectively, of 5, 10, and 15 elements. The prediction of other ships' trajectories was based on three neural networks trained by properly prepared data strings (data obtained from fusion) with lengths, respectively, of 5, 10, and 15 elements.  Figure 3 illustrates examples of ship position data recorded by the GNSS receivers, where measurements were made on a straight section of the track. In order to use the navigational data fusion process Equations (1)-(3) geographic coordinates were transformed into Cartesian coordinates (x, y) using Gauss-Krüger projection [34]. Notably, the measurements from the two GNSS receivers are not on a straight line, while the data resulting from fusion lie approximately on a straight line. This proves that the navigational data fusion works correctly. In Figure 3 a situation may also be noted where at some point there is a loss of signal from the GNSS1 receiver. The fusion signal is maintained thanks to the measurements from the GNSS2 receiver. It is essential from the viewpoint of the navigational decision support system, as signal loss can lead to system destabilization and invalid prediction of the ship's trajectory.  using Gauss-Krüger projection [34]. Notably, the measurements from the two GNSS receivers are not on a straight line, while the data resulting from fusion lie approximately on a straight line. This proves that the navigational data fusion works correctly. The prediction of other ships' trajectories was based on three neural networks trained by properly prepared data strings (data obtained from fusion) with lengths, respectively, of 5, 10, and 15 elements.  Figure 3 illustrates examples of ship position data recorded by the GNSS receivers, where measurements were made on a straight section of the track. In order to use the navigational data fusion process Equations (1)-(3) geographic coordinates were transformed into Cartesian coordinates (x, y) using Gauss-Krüger projection [34]. Notably, the measurements from the two GNSS receivers are not on a straight line, while the data resulting from fusion lie approximately on a straight line. This proves that the navigational data fusion works correctly. In Figure 3 a situation may also be noted where at some point there is a loss of signal from the GNSS1 receiver. The fusion signal is maintained thanks to the measurements from the GNSS2 receiver. It is essential from the viewpoint of the navigational decision support system, as signal loss can lead to system destabilization and invalid prediction of the ship's trajectory. In Figure 3 a situation may also be noted where at some point there is a loss of signal from the GNSS1 receiver. The fusion signal is maintained thanks to the measurements from the GNSS2 receiver. It is essential from the viewpoint of the navigational decision support system, as signal loss can lead to system destabilization and invalid prediction of the ship's trajectory.
The presented situations are typical of the research done. Not a single case was observed where the measurement data fusion would produce 'worse' results than the autonomoous signals from the GNSS receivers. The presented situations are typical of the research done. Not a single case was observed where the measurement data fusion would produce 'worse' results than the autonomoous signals from the GNSS receivers. Figures 4 and 5 illustrate example visualizations of own ship trajectory prediction (black line) and a selected other ship (blue line) in the NAVDEC interface. The time span of prediction was set to 15 min. A step alteration of own ship course from the present course to that recommended by the NAVDEC  3 . 357  7 . 247 system was always executed the moment the prediction was displayed.
The NAVDEC recommendation depended on the Closest Point of Approach (CPA) setting. In the former case the CPA was 1 Nm; in the latter, 2 Nm.   Table 1 lists the root mean square errors (RMSE) of prediction implemented through the proposed algorithm (without and with the use of the navigational data fusion) and by the Transas ECDIS [35]. The time span of prediction was set to 6 min. The table content confirms greater The presented situations are typical of the research done. Not a single case was observed where the measurement data fusion would produce 'worse' results than the autonomoous signals from the GNSS receivers. Figures 4 and 5 illustrate example visualizations of own ship trajectory prediction (black line) and a selected other ship (blue line) in the NAVDEC interface. The time span of prediction was set to 15 min. A step alteration of own ship course from the present course to that recommended by the NAVDEC  3 . 357  7 . 247 system was always executed the moment the prediction was displayed.
The NAVDEC recommendation depended on the Closest Point of Approach (CPA) setting. In the former case the CPA was 1 Nm; in the latter, 2 Nm.   Table 1 lists the root mean square errors (RMSE) of prediction implemented through the proposed algorithm (without and with the use of the navigational data fusion) and by the Transas ECDIS [35]. The time span of prediction was set to 6 min. The table content confirms greater  Table 1 lists the root mean square errors (RMSE) of prediction implemented through the proposed algorithm (without and with the use of the navigational data fusion) and by the Transas ECDIS [35]. The time span of prediction was set to 6 min. The table content confirms greater accuracy of prediction made on the basis of the proposed algorithm than the prediction obtained by the Transas ECDIS (the error is about 80% smaller). The study also confirms that: • the use of the navigational data fusion process increases the accuracy of prediction, • prediction for one's own ship is more accurate than the prediction for a target. The presented situations are typical of the research done. In all examined cases the prediction of ship movement trajectory was performed correctly. The accuracy of the proposed prediction is significantly higher than the commonly used prediction based on the extrapolation of current ship movement parameters that assumes that the ship movement conditions will not significantly change (unchanged settings of engines, thrusters, rudders, and unchanged external conditions-the parameters of the water area, wind, current, etc.).

Conclusions
Analysis of the marine accident investigating bodies' decisions indicates that human error is one of the main causes of accidents at sea. Elimination or reduction of human error, thereby assuring the highest possible level of navigational safety, may be achieved by introducing navigational decision support systems onboard ships. NAVDEC is one of the innovative systems of that type. An important function of the NAVDEC of vital importance to proper assessment and decision-making by the navigator is the reliable and accurate prediction of one's own ship and target ships' trajectories within a specified time.
This article presents an algorithm of ship movement trajectory prediction, which, through navigational data fusion, makes use of measurements of the ship's current position from a number of doubled autonomous devices. In addition, the algorithm takes into account the assumption of knowledge of both future course alterations and the parameters of the ship dynamics model, which takes place in the case of one's own ship. This increases the reliability and accuracy of prediction, which is desirable in the navigational decision support system. The research carried out under real conditions verifies the proper operation the proposed algorithm and confirms the implementation of the results presented herein.