Optimisation of the Position of Navigational Aids for the Purposes of SLAM technology for Accuracy of Vessel Positioning

The geometric distribution of navigational aids is one of the most important elements to be taken into account in the planning of maritime terrestrial navigation systems. It determines to a large extent the capability of vessels to obtain high-precision position coordinates. Therefore, the optimisation of their location is a key element at the planning stage, in particular on port approach fairways. This article attempts to use computer simulation methods to assess the positioning accuracy of a vessel that follows a constant course and speed on a port approach fairway. The analysis uses a technique based on the Extended Kalman Filter (EKF) Two-Dimensional (2D) Range-Bearing Simultaneous Location and Mapping (SLAM) method. In the simulation experiment conducted, the research object determined its position based on bearing and distance to fixed position beacons, which changed their locations in subsequent passages of the vessel. A geometrically optimal configuration of the terrestrial navigation marking system guaranteeing the highest positioning accuracy was identified as a result of the deliberations. The study analysed more than 20,000 cases of different configurations (locations) of the fixed position beacons, demonstrating that the adopted algorithm can be used successfully in the planning of their deployment in the context of ensuring minimum accuracy requirements for the positioning of navigational signs on port approach fairways and under restricted conditions by navigational marking services, as set out in International Maritime Organization (IMO) Resolutions A915 (21) and A953(22).


Ł U K A S Z M A R C H E L A N D O T H E R S
1. INTRODUCTION. Since the beginning of the twentieth century, work has been carried out on automation of processes in many branches of industry including maritime transport. One of the first milestones in the automation of navigation was the proliferation of autopilots, which made the vessel's control function partially independent from humans (Bruno and Lützhöft, 2009). Another significant contribution to the automation of the navigation process was the prevalence of Global Navigation Satellite Systems (GNSS) and their differential versions (Dziewicki and Specht, 2009) and the development of Electronic Chart Display and Information Systems (ECDIS) (Naus, 2015). The combination of GNSS and ECDIS allow the planning and monitoring of the position and movement of a vessel during a sea journey. Other systems such as the Automatic Identification System, Radar (including Automatic Radar Plotting Aids (ARPA) and Vessel Traffic Services (VTS) are also contributing to an increase in the level of automation in maritime navigation processes (Naus and Wąż, 2016). The efforts made so far have made it possible to achieve a near-constant precise positioning of objects on the surface of the Earth. It may be considered that the world is now at the dawn of an era of navigation robotization, where the achievements made so far in the field of automation will find opportunities for more comprehensive use.
In the near future, Unmanned Autonomous Surface Vehicles (UASV) will gradually become more prevalent and operate independently of humans (Jokioinen et al., 2016). The current state of knowledge allows for the free manoeuvring of autonomous vessels along man-made waypoints (Blaich et al., 2015). However, UASV currently require additional control of an operator (navigator) when making decisions, for example, when mooring, approaching a berth, leaving/entering ports, manoeuvring in congested waters or in areas with heavy traffic for other vessels. However, one should consider whether the value of the system availability mentioned in International Maritime Organization (IMO) resolutions (IMO 2001;IMO 2003), as well as the minimum permitted positioning at 10 m probability (p) = 95%, is sufficient to operate autonomous vessels using only GNSS for positioning. Jamming and spoofing are equally important and a more and more frequent threat to autonomous vessels (Grant et al., 2009). These phenomena adversely affect the decisionmaking process of a vessel dependent on GNSS. The development of Light Directions and Ranging (LIDAR)-type devices in the last decade, and in particular the extension of their working range to values exceeding 1,000 metres, allow the conclusion that this measuring equipment may be used in maritime navigation in port areas and confined waters in the future. It is expected that the range of laser equipment will further increase and will be applied to the increasing scope of solutions (Manhar and Nikolas, 2016;Hess, 2016;Schaefer et al., 2017). The modern Two-Dimensional (2D) Range-Bearing Simultaneous Localisation and Mapping (SLAM) positioning method used in robotics can be used as an alternative to GNSS solutions. It is expected that it will be possible to use this positioning technique on areas equipped with aids to navigation, in port areas, closed areas, rivers, etc. As a rule, SLAM will not operate on the open sea, where there is no easily identifiable navigational infrastructure.
2. RELATED WORKS. SLAM is a technique that allows the creation of a map of a previously unknown environment, which is then used for navigation during further operations in the area. This positioning method was first recognised in 1986 (Durrant-Whyte and Bailey, 2006). During this time, preliminary attempts were made to implement the elements 3 of probability theory for robot navigation. It was at that time that it was established that mapping the space around the object and then using it for auto-location was a fundamental problem that would have to be tackled in the future (Cadena et al., 2016). The vast majority of the work on the subject related to SLAM is based on the Extended Kalman Filter (EKF) (López et al., 2017;Thrun et al., 2005;Gérossier et al., 2009) or its modifications (Yuan et al., 2017;. For the purpose of this positioning technique, a range of environment mapping sensors can be used, ranging from cameras through ultrasonic distance sensors to laser scanners. Currently, there is a strong emphasis on the processing of image data from single or circular cameras (Li, 2008;Lu, 2016) in order to obtain an image of the environment, which is the point cloud. This trend continues due to availability of Intel's Open source Computer Vision (OpenCV) and Mobile Robot Programming Toolkit (MRPT) image processing libraries, which are open source libraries enabling the fusion of data from a variety of sensors. The optimisation of development tools in terms of performance enabled the processing of graphic elements in almost real time, which solves the problem of online work. The visualisation of the measured model of the environment is then used to build a Three-Dimensional (3D) map of the robot's operating environment. This use of the 3D model enables the distinguishing of many more special points and environmental features as compared to 2D mapping. These points -landmarks -are later used in finding the location of the vehicle using EKF methods (Aguilar-Gonzáles, 2016;Paz, 2008;Castellanos et al., 1998), Unscented Kalman Filter (UKF) (Montemerlo et al., 2002) and MonteCarlo (Dissanayake, 2001).
Since the beginning of this decade, the emphasis has been put on the use of the only sensor in SLAM that maps the surroundings available on the majority of seagoing vessels, namely the navigational radar (Rouveure et al., 2010). Previous work on the use of SLAM technology based on radar indicates a drift of both the vessel's position and the estimates of its course and speed over time, as it moves away from the location where positioning started. This is the result of the characteristics of the EKF. The phenomenon of drift of position coordinates is related to the characteristics of an error in dead reckoning, the precision of which decreases in time. The EKF tries to establish a trade-off between the estimated observed position and the coordinates resulting from mathematical calculations in dead reckoning. How the elements related to the cumulative mathematical error will affect the positioning errors should be considered. Another problem worth considering is the appropriate configuration of the navigational infrastructure. It is assumed that the appropriate location of the navigational marking would allow for positioning based on the EKF SLAM method in accordance with the IMO accuracy criteria for navigation in port approach waters.
3. THE MATHEMATICAL MODEL. While determining a location based on the SLAM EKF method, a robot tries to determine its location and orientation ξ k as well as a discrete map of the surrounding landmarks (in this paper, beacons) M k at the current moment k. This is usually done on a regular basis, in a previously set up discrete moment k ≥ 0. This paper assumes that the environment in which the vessel's motion has been simulated is a two-dimensional plane in the local reference system, and therefore ξ k (x k y k θ k ) T , where the vessel's position (xs k ys k ) ∈ R 2 and the vessel's COG value is θ k ∈< 0, 2 >. The map of the environment in the computer simulation M k = (x 1 y 1 · · · x i y i ) T will be represented as a vector storing the positions of the navigational aids (beacons), where their number will be i ∈ Z and i ∈< 1, 2 >, 4 depending on the test variant.

Ł U K A S Z M A R C H E L A N D O T H E R S
It has been assumed that the starting position xs k=0 , ys k=0 , from which the vessel starts navigating has a zero mean directional error.
During the movement on the fairway, the vessel starts its journey at a constant speed over the ground V k = const in time and at a constant rate of increase of change of course over ground ROT k = const. The motion model of a vessel at a discrete time can be expressed in the following function (motion control u k is assumed to be known): The value of the increase in the course of the vessel over ground ROT k and velocity V k are affected by a random error with a normal distribution of σ ROT , σ V : The EKF SLAM method requires the estimation of the position of the observed beacons. In order to determine the position of the j th beacon, a series of measurements must be taken to determine the distance z r and bearing z β to the aid. The measurement vector is indicated by z = (z r , z β ) T . It was assumed that both the vessel and the navigational aids are objects with dimensions 1 m × 1 m. The centroid of the square representing the object was assumed to be the location of the beacon. The position of the object was fixed and did not move (float) during a pass of a simulated vessel. The measurements have a random error z r , z β of normal distribution with the standard deviation previously assumed and typical for the radar/LIDAR type device: σ r for distance measurement, σ β for bearing measurement. The measurement model to i of this aid is expressed in the following function: 4. EKF IN SLAM. As is generally known, the movement of a vessel is not linear. We can observe that in most cases a generalisation of the shape of the vessel's trajectory when t → 0 can be the section of a circle. That is why the Extended Kalman Filter has been used to estimate the position of the ship. It linearizes processes considered to be non-linear in the local area. The Taylor series of the first order is used for this purpose. The general algorithm of the Extended Kalman Filter is very similar to the basic Kalman Filter (KF) version and is as follows: Extended Kalman filter (x k−1 , P k−1 , u k , z k ): where x k is the state vector storing the positions of the vessel and the navigational aids, P k is the covariance matrix of position errors of the vessel and navigational aids, K k is the EKF-specific weight matrix, Q k is the covariance matrix of the measurement model, R k is the covariance matrix of the motion model errors, G k is the Jacobian of the function g(·) with respect to system state and I is the identity matrix.
5. ALGORITHM. In the simulation study, the algorithm of the SLAM Extended Kalman Filter was divided into three data processing phases. The first phase was the initialisation of the filter. In the simulation made for the purposes of the article, it takes place once at the beginning of the study and after changing the location of at least one navigational aid. The initial values are assigned to matrices, vectors and all variables in this step. The following are determined as assumed in the study: the speed over ground V 0 , the number of navigational aids (beacons) i, the initial course over ground θ 0 , the number of calculation steps j sufficient to travel the distance constituting the entire waterway at a fixed speed xs 0 , the initial location of the vessel ys 0 and the actual positions of the navigational aids x 0 , y 0 , . . . , x i , y i , which are required for estimating the coordinates of the position of the vessel. In addition, the initial values of the covariance matrix P 0 are determined: The covariance matrix P k is a block matrix. Elements of the matrix P 0 ∈ R 3×3 are related to mean errors of coordinates of the vessel's position and course, as well as with mutual covariations of coordinates of the position and course. During initialisation, the block is filled with zeroes, which is due to the lack of uncertainty regarding the initial values of the course and the location of the ship. The values of the remaining elements of the matrix are set at very high values, so that they go to infinity. This is due to the fact that the positions of the navigational aids are not known at the time of filter initialisation, so the error of their positions is infinitely great. In fact, the error value was assumed at 10 6 m for the purpose of the simulation. After the initial values of the covariance matrix have been determined, the 6 Ł U K A S Z M A R C H E L A N D O T H E R S initial state vector x 0 is also initialised: The error values of average distance and bearing measurements and speed of the vessel are determined, as well as changes in the course in matrices M and Q: where σ r is the mean error of distance measurement to the navigational aid, σ β is the mean error of the bearing measurement to the navigational aid, σ v is the mean error of Speed Over Ground (SOG) measurement and σ ROT is the mean error of the Rate Of Turn (ROT) measurement.
The next step is prediction. During this step, the position of the vessel ξ k is estimated based on the readings of course over ground, speed above ground and its last position ξ k−1 . The determination of the dead reckoning position and course is based on the Equation (9) state transition model equation of the system. This equation refers to the model of motion of the vessel contained in Equation (3). The prediction stage uses the function g(·) to incorporate the control u k into the estimated coordinates of the positionx 0·3 k .
Next, the function's Jacobian is created g(·), with respect to the system state: Once the required matrix has been determined, the current values of the covariance matrix P k are calculated. The first part of the G k P k−1 G T k equation is intended to propagate the uncertainty of the estimate of the items from the state k − 1 to the state k. On the other hand, the matrix R causes the inclusion of additional uncertainty caused by noisy, errorprone indications of the value of the assumed motion control u k into the filter system and is defined as: Designation of the matrix R k requires the calculation of Jacobian g (·), with respect to noisy control input: The entire equation on the covariance matrix P k is represented as follows: The next step of the EKF operation is the correction phase. The filtration algorithm incorporates a set of randomly errored measurements z k into the observed navigational aids Equation (12). The prediction step starts the determination of the weight matrix. Based on the current covariance matrix determined at an earlier stage, it indicates how much the results of measurement z k will affect ξ k . The weight matrix K k is defined as: where H k is a Jacobian of the measurement model function h (·) with respect to system state: The corrected covariance matrix is generated as follows: 26) and the state vector x k is corrected based on the series of measurements for the navigation (beacons) aids according to the formula: The last two steps of filtration, that is, prediction and correction phases, take place in a loop. The number of repetitions j depends on the value of time assumed in the study, which will allow the vessel to cover the assumed distance. This route is the same throughout the simulation study, which affects the unchanging value of the variable j .
6. EXHAUSTIVE SEARCH METHOD. For many problems, finding the algorithm which directly constructs a solution is impossible or too difficult. In this case, an exhaustive search method may be used to analyse all potential solutions and select those that fulfil the conditions of the task. An exhaustive search can be time-consuming, as the number of potential solutions often increases exponentially with the size of the input data (Czech et al., 2010).
The exhaustive search method is an iterative way to find a correct solution to a research problem by considering all possible combinations of data (Figure 1). For the described research problem, the time-consuming nature of the solution can be negligible to some extent, because the test takes place only once. However, assuming too many combinations of locations for navigational aids can result in a very long calculation time even on a computer with a high processing power. In order to reduce the number of combinations, zones were delimited in which the navigational aids do not appear. For the positioning of the navigational aids at every possible point of the considered area, chosen by the author of the study, it was assumed: The range of positions for one beacon: x 1 ∈< 0, 1000 m >, y 1 ∈< 0, 195 m > ∧ < 205, 400 m >; which is the value 390, 000 combinations with the value of displacement of a single aid by res = 1 m.
The range of positions for two beacons:  In order to reduce the number of cases, it was found that the following resolution values should be adopted between the two locations of the navigational aid during the simulation study: for i = 1: res = 10 m; for i = 2: res = 50 m; for i = 4: res = 100 m. 7. SIMULATION STUDY. It was assumed that the examined area would be the approach to the Main Entrance of the Port of Gdynia located in Gdańsk Bay. The water area is oriented in relation to the course Kr = 271·5 • and its length is set at 1,000 m along the course and the width is 400 m perpendicular to its direction (Figure 2). It was assumed that the navigational aids will be set in a different place in each test using the brute force method.
The following settings were used: speed of the vessel over ground V k = 10 m s , the number of steps in a single fairway crossing j = 200, the time of the measurement step 10 Ł U K A S Z M A R C H E L A N D O T H E R S error of measurement of the bearing to the navigational aid σ β = 0·5 • and mean error of measurement of the distance to the navigational aid σ r = 0·5 m.
The optimisation criterion of the positioning accuracy of an autonomous vessel will be the value of the mean position error M xy and mean distance error M x , M y : The study assumed a simulated passage of the vessel on a designated traffic lane. Assuming that the autonomous vessel position is maintained on the track within the port and starboard Cross-Track Distance (XTD) of 5 m (width of the XTD corridor is 10 m) and the length of the track equals 1,000 m. The passage was carried out separately for three quantitative variants of the navigational aids (i = 1, i = 2, i = 4). The task was performed with an iterative change of location for one navigational aid (i = 1) in the range of: x 1 ∈< 0, 1000 m >, y 1 ∈< 0, 195 m > ∧ < 205, 400 m >; Another option was to change the location of two navigational aids (i = 2) in the range of: x 1 ∈< 0, 1000 m >, y 1 ∈< 0, 195 m >; x 2 ∈< 0, 1000 m >, y 2 ∈< 205, 400 m >; The third option was to change the location of four navigational aids (i = 4) in the range of: x 1 ∈< 0, 500 m >, y 1 ∈< 0, 195 m >; x 2 ∈< 500, 1000 m >, y 2 ∈< 0, 195 m >; x 3 ∈< 0, 500 m >, y 3 ∈< 205, 400 m >; x 4 ∈< 500, 1000 m >, y 4 ∈< 205, 400 m > .
Mean errors of the vessel's position and directional errors depending on the location of navigational aids were analysed during the test. The optimisation criterion was to minimise the mean error of the position. It is the most common error measure used in scientific studies regarding terrestrial navigation systems at sea. Depending on the change of the beacon or beacons positions the error value of the average position during the passage of the track was varied. Finally, such a configuration was chosen, where the mean error of position coordinates over time in the transition was the smallest. The assumption of the research is the application of the presented method in regions where there is a permanent beacons system, for example, Traffic Separation System (TSS) zones intended for managing ship traffic. This research assumes that the elements of the considered system have been deployed in the locations where they do not pose a threat to ship's traffic.
When analysing Figures 3(a)-(c) it is possible to determine the decrease in the error value of the location at the time when the navigational aid is on traverse angles in relation to the vessel. This is particularly noticeable in Figures 4(a)-(c). The initial non-zero value of the position error is due to the fine-tuning of the EKF filter and results from the infinite value assumed in the study on the diagonal parts of the covariance matrix P  maximum value of error occurs at the end of the fairway. This pattern is related to the increasing error of dead reckoning.
The study tested different configurations of navigational aid location, and the movement of the vessel was in all cases subject to the same patterns. It is possible to generate a graphical distribution of the error depending on the location of the aid for the variant i = 1 ( Figure 5). This shows the range of positions for which the best results were obtained in order to optimise the precision of the SLAM EKF positioning. It is easy to notice the dependence of the symmetry of distribution in relation to the fairway. The imperfections of this symmetry are due to the random value of the errors in the motion of the vessel and the observations generated in the Gaussian distribution. Consequently, identified coordinates were never the same, even for beacons that would not change their position. The highest accuracy was obtained when the aid was placed at 3/5 of the width of the fairway close to its external borders. The distribution also shows that positioning using the aid located close to the initial position of the vessel can degrade the quality of the positioning process.
8. CONCLUSION. The analysis presented in this article points to the problem of navigation of ships with the use of EKF SLAM. It has been demonstrated that an appropriate choice of location and number of navigational aids can guarantee the independent, safe passage of the vessel without the support of a satellite positioning system (Table 1). Simulation studies have shown that the increase in the number of easily recognisable navigational aids results in a significant increase in positioning accuracy during passage through the fairway based on the EKF SLAM range -bearing method. The positioning accuracy test is based on an algorithm based on the exhaustive search method. Thanks to the software developed for the purpose of this study, more than 20,000 configurations of navigational aids were analysed. An increase in positioning accuracy from M xy = 9·06 m to M xy = 0·94 m was observed by comparing the mean values of the mean errors of the position coordinates for one and four beacons and from M xy = 3·46 m to M xy = 0·54 m when considering the most optimal configuration in both cases. All three options used in the study indicated that the algorithm used could be utilised by a ship to navigate on the fairway in the light of   Table 1. Configuration of aids for the most optimal mean error value of the position coordinates for the three test variants.
The location of aid for the minimum mean error value of the position coordinates for i = 1 x 1 = 650 m y 1 = 370 m The location of aids for the minimum mean error value of the position coordinates for i = 2 x 1 = 750 y 1 = 0 x 2 = 150 y 2 = 355 The location of aids for the minimum mean error value of the position for i = 4 x 1 = 200 y 1 = 0 x 2 = 800 y 2 = 0 x 3 = 100 y 3 = 400 x 4 = 700 y 4 = 400 the accuracy requirements adopted in the IMO resolutions for approach areas to ports and restricted waters. Placement of four aids guarantees accuracy in excess of the requirements for navigation in a port approach. However, it should be remembered that the article omits the problems of data association and the extraction of characteristic objects, which are characteristic of SLAM, and the value of the initial location error was set to 0 m. Further analysis and research on this topic is necessary. However, the correctness of the configuration of the navigational aids indicated in the article cannot be denied, which can certainly be used for further research in this area. High values of measurement errors for the devices used were adopted in the tests. In fact, one should expect that the obtained accuracy will be higher than presented. Due to the values adopted, the results of studies show more clearly the tendencies and the nature of the position coordinate errors under consideration. In the conducted tests, additional features, for example information about the direction of the fairway, were not considered. The only criterion was the accuracy of positioning based on the given configuration of the beacons. In the future, the authors will make further studies with the consideration of additional navigational information.