Research on Multi-Sensor Data Fusion Positioning Method of Unmanned Ships Based on Threshold-and Hierarchical-Capacity Particle Filter

: To improve the positioning accuracy of unmanned ships, a multi-sensor system including ZigBee, a Global Positioning System (GPS), and BeiDou Navigation Satellite System (BDS) is constructed, and an adaptive multi-sensor data fusion positioning method based on the threshold and hierarchical capacity particle ﬁlter (TCPF) is designed. First, the ZigBee-GPS/BDS multi-sensor measurement data is preprocessed to achieve a consistent space–time reference and transformed into the same coordinate system by projection. Then, the fault data is weighted and corrected through the consistency inspection of ZigBee-GPS/BDS multi-sensor positioning data, and the corresponding conﬁdence factor is given according to the conﬁdence distance of the positioning data; furthermore, the conﬁdence factor is associated with stratiﬁed sampling. After that, the multi-sensor positioning data is ﬁltered and denoised using a basic particle ﬁlter. Finally, a TCPF data fusion algorithm is designed, and the navigation positioning data of the unmanned ship is fused and ﬁltered to obtain its positioning information. Numerical tests show that compared with other ﬁltering algorithms, the mean square root error and standard deviation of the proposed TCPF algorithm decrease by an average of 25.0% and 28.0%, respectively, which veriﬁes its high ﬁltering accuracy and its advantages in suppressing particle degradation and avoiding sample scarcity. The experimental tests show that compared with other fusion algorithms, the proposed TCPF algorithm can not only realize the precise positioning during unmanned ship navigation, but also in the positioning and fault tolerance test, the average positioning error, root-mean-square error, and standard deviation of the former decrease by 36.0%, 38.0%, and 37.0%, respectively, and the corresponding performance indicators of the latter decrease by an average of 20.0%, 19.5%, and 17.5%, which veriﬁes that it has the advantages of high data reliability and good ﬁltering fault tolerance, and helps to improve the positioning accuracy of unmanned ships.


Introduction
The water quality of rivers directly affects people's lives.In the early days, traditional water quality testing mainly relied on manual testing and reporting methods.Currently, water quality testing still relies primarily on manual testing, but data is uploaded through the Internet.Both traditional and current water quality testing face the following problems: (1) high labor input and cost; (2) high manual collection intensity and low efficiency; (3) data easily influenced by subjective factors; and (4) untimely information transmission.In recent years, unmanned ships have been widely used in the field of water quality monitoring due to their strong maneuverability and good controllability [1].Based on this background, this paper conducts research on modern water quality testing based on unmanned ships.Unmanned ships carry various water quality sensors such as pH value, conductivity, turbidity, dissolved oxygen, etc., and can autonomously conduct regular water quality tests throughout the river area and transmit real-time data to a monitoring center via the Internet.This method has the following advantages: it (1) reduces labor costs; (2) improves detection efficiency; (3) unaffected by subjective factors, improves accuracy; and (4) ensures timely data availability.From the above analysis, it can be seen that unmanned ships play a key role in modern water quality monitoring, with their autonomous navigation positioning accuracy directly affecting safety and efficiency.
How to achieve accurate positioning of unmanned ships based on multiple combined sensors has been the focus of research [2].Shen et al. [3] used GNSS/GPS combination sensors to obtain coordinates of unmanned ship positions while reducing noise interference caused by long-distance nodes, but they suffer from signal loss due to external environmental interference leading to reduced positioning accuracy.Wu et al. [4] realized the positioning of the unmanned ship by solving its position information collected by the GPS/INS combined sensors, but the INS has the problem of mechanical fault jumping.As time goes by, the GPS/INS combined sensor is likely to cause a large positioning deviation of the unmanned ship.Deng et al. [5] obtained the position information of the unmanned ship by fusing the GPS/IMU combined sensor data, but in the fusion process, if the sensor data is lost at a certain moment, it will cause a large fusion deviation and affect the positioning accuracy.Data fusion based on two kinds of sensors is the current mainstream technology for unmanned ship positioning, but there is a deficiency in that the positioning accuracy and reliability are affected due to the weakening or loss of a certain sensor signal.In recent years, how to improve positioning accuracy by further fusing data from three or more types of sensors has become a research hotspot.Wang et al. [6] achieved the reliable positioning of trains by using the combined positioning method of PPP-GPS/IMU.However, the built multi-sensor positioning system is prone to environmental interference, which reduces the reliability of data samples.Tang et al. [7] realized the elimination of abnormal signals by setting outlier identification in the process of IMU/ODM/UWB multi-sensor data fusion, which improved the positioning accuracy of multi-sensors, but reduced the fault-tolerant performance of the algorithm because the fault data was not weighted.Sofia et al. [8] divided the observation information of different sensors into blocks according to the size of the scale to obtain a multi-scale system model, which effectively solved the problem of measurement delay, but the efficiency and accuracy of algorithm fusion were reduced because no data confidence assignment was performed during data processing.As can be seen from the above, adding sensors helps to improve the reliability and accuracy of positioning.However, there is still a lack of research on how to further enhance the accuracy and efficiency of algorithm fusion through data confidence interval testing, as well as how to achieve effective positioning under low-or weak-signal conditions through data correction.Therefore, a ZigBee-GPS/BDS multi-sensor positioning system is built in this paper, which realizes the accurate and reliable positioning of unmanned ships by complementing and weighted-correcting signals from three types of sensors, as well as assigning confidence values.In multi-sensor data fusion, filtering algorithms are crucial, and particle filtering has been widely used due to its ability to handle various probability distribution models, but it has also become the focus of research due to its heavy dependence on initial state estimation and particle degradation.Ha et al. [9] expanded the search space of particle states by designing crossover operators and mutation operators in the particle filter calculation module, which improved the filtering accuracy of multi-sensor data but also reduced the computational efficiency.Alam et al. [10] processed the prefetched value in the weight storage of the particle-filter algorithm in parallel with the value in the random function generator, which reduced the time required for resampling and improved the fusion efficiency of sensor data, but it did not suppress the degradation of particle samples very well.Wu et al. [11] used the unscented particle-filter algorithm with constrained residuals to fuse the two sets of sensor positioning data, which effectively overcomes external environmental disturbances.However, the filtering accuracy is prone to divergence after multiple iterations.A large number of studies have shown that although the existing multi-sensor data fusion algorithms have improved the positioning accuracy of moving targets to a certain extent, their fault-tolerant performance is not good.In addition, they did not carry out pre-judgment processing on the collected data, and the problem of low filtering accuracy has not been solved when the data collected by the multi-sensor combined positioning system is fused and filtered.Therefore, a multi-sensor data fusion positioning method based on adaptive threshold and hierarchical capacity particle filter is designed in this paper.Firstly, the basic particle filter is introduced to denoise multisensor data.Then, the latest multi-sensor positioning data is incorporated into the proposal distribution using unscented transformation.After that, the Gaussian mixture model is constructed and the adaptive threshold is set, and the data confidence factor is associated with hierarchical sampling to further improve the fusion filtering accuracy of the algorithm.Finally, the validity of the method is verified by the numerical test of the model and the experimental test of unmanned ship navigation.

Unmanned Ship Positioning System and Its Multi-Sensor Data Fusion Framework 2.1. Construction of Unmanned Ship Positioning System
In order to realize the information complementarity among the multi-sensor measurement data, reduce the interference of the surrounding environment on the working state of the positioning system, improve the reliability of the multi-sensor data samples, and then improve the positioning accuracy of an unmanned ship for water quality detection, a ZigBee-GPS/BDS multi-sensor combined positioning system, as shown in Figure 1, was constructed.The entire positioning system includes a ZigBee multi-node positioning system, GPS positioning system, BDS positioning system, PC communication system, etc.
Appl.Sci.2023, 13,10390 3 of 29 which effectively overcomes external environmental disturbances.However, the filtering accuracy is prone to divergence after multiple iterations.A large number of studies have shown that although the existing multi-sensor data fusion algorithms have improved the positioning accuracy of moving targets to a certain extent, their fault-tolerant performance is not good.In addition, they did not carry out pre-judgment processing on the collected data, and the problem of low filtering accuracy has not been solved when the data collected by the multi-sensor combined positioning system is fused and filtered.Therefore, a multi-sensor data fusion positioning method based on adaptive threshold and hierarchical capacity particle filter is designed in this paper.Firstly, the basic particle filter is introduced to denoise multi-sensor data.Then, the latest multi-sensor positioning data is incorporated into the proposal distribution using unscented transformation.After that, the Gaussian mixture model is constructed and the adaptive threshold is set, and the data confidence factor is associated with hierarchical sampling to further improve the fusion filtering accuracy of the algorithm.Finally, the validity of the method is verified by the numerical test of the model and the experimental test of unmanned ship navigation.

Construction of Unmanned Ship Positioning System
In order to realize the information complementarity among the multi-sensor measurement data, reduce the interference of the surrounding environment on the working state of the positioning system, improve the reliability of the multi-sensor data samples, and then improve the positioning accuracy of an unmanned ship for water quality detection, a ZigBee-GPS/BDS multi-sensor combined positioning system, as shown in Figure 1, was constructed.The entire positioning system includes a ZigBee multi-node positioning system, GPS positioning system, BDS positioning system, PC communication system, etc.A GPS/BDS positioning system is mainly composed of space, ground monitoring, and user receiver.First, the ground monitoring part monitors and controls the operation of each satellite through the main control station and monitoring station, traverses the navigation message, and maintains the system time.Then, the GPS and BD satellites in space continuously send their own ephemeris and time information to the GPS/BDS dual module installed in the unmanned ship.Finally, the GPS/BDS dual module calculates the latitude and longitude coordinates of the unmanned ship in real time by analyzing the signal messages sent by the respective satellites [12].
A ZigBee multi-node positioning system is mainly composed of blind nodes, reference nodes, and wireless gateway nodes.First, the communication environment of the full A GPS/BDS positioning system is mainly composed of space, ground monitoring, and user receiver.First, the ground monitoring part monitors and controls the operation of each satellite through the main control station and monitoring station, traverses the navigation message, and maintains the system time.Then, the GPS and BD satellites in space continuously send their own ephemeris and time information to the GPS/BDS dual module installed in the unmanned ship.Finally, the GPS/BDS dual module calculates the latitude and longitude coordinates of the unmanned ship in real time by analyzing the signal messages sent by the respective satellites [12].
A ZigBee multi-node positioning system is mainly composed of blind nodes, reference nodes, and wireless gateway nodes.First, the communication environment of the full grid network is constructed according to the reference nodes with known position coordinates.Then, a blind node installed on the unmanned ship is placed in a communication network Appl.Sci.2023, 13, 10390 4 of 28 composed of reference nodes [13].After that, the wireless gateway node is connected to the PC through the serial port.On the one hand, it receives the configuration data of each reference node and mobile node from the monitoring software and forwards them to the corresponding nodes.On the other hand, it receives the valid data fed back by each node and transmits them to the monitoring software.Finally, the RSSI technology is used to determine the distance or direction from the unknown node to the beacon node, and the maximum likelihood estimation method is used to calculate the position of the blind node on the unmanned ship during navigation in the river.
Figure 2 shows the self-developed unmanned ship for water quality testing.The unmanned ship is equipped with a detector with multiple water quality detection sensors connected to the launch and recovery device, as well as a positioning system including Zigbee, GPS, and BDS modules.The controller of the unmanned ship is an industrial computer with a Linux system, which is responsible for receiving and processing the data of each sensor, issuing control instructions, and transmitting signals with the PC.
dinates.Then, a blind node installed on the unmanned ship is placed in a communication network composed of reference nodes [13].After that, the wireless gateway node is connected to the PC through the serial port.On the one hand, it receives the configuration data of each reference node and mobile node from the monitoring software and forwards them to the corresponding nodes.On the other hand, it receives the valid data fed back by each node and transmits them to the monitoring software.Finally, the RSSI technology is used to determine the distance or direction from the unknown node to the beacon node, and the maximum likelihood estimation method is used to calculate the position of the blind node on the unmanned ship during navigation in the river.
Figure 2 shows the self-developed unmanned ship for water quality testing.The unmanned ship is equipped with a detector with multiple water quality detection sensors connected to the launch and recovery device, as well as a positioning system including Zigbee, GPS, and BDS modules.The controller of the unmanned ship is an industrial computer with a Linux system, which is responsible for receiving and processing the data of each sensor, issuing control instructions, and transmitting signals with the PC.
The lidar of Silan A3 is responsible for collecting the environmental information around the unmanned ship.The ATK1218-GPS-BDS dual-positioning module is selected in the GPS/BDS positioning system to obtain the latitude and longitude information of the unmanned ship.The CC2530 wireless module is selected in the ZigBee positioning system to obtain the plane coordinate information of the unmanned ship.The Hikvision DS-2 camera is selected in the vision system to be responsible for the collection of environmental information of the unmanned-ship channel.

Framework of Multi-Sensor Data Fusion
In order to improve the reliability, fault tolerance, and accuracy of multi-sensor data fusion for the unmanned ship for water quality detection, a new multi-sensor-data-fusion positioning framework based on particle filtering as, shown in Figure 3, was designed.From the figure, it can be seen that the longitude and latitude information of the unmanned ship was first unified in time and space, and projected into the local coordinate system constructed by the ZigBee multi-node module through coordinate transformation, so as to realize mutual complementarity among sensor data.Then, through the consistency inspection of the multi-sensor data, the fault data are weighted and corrected to improve the fault-tolerant performance of the data fusion algorithm.At the same time, the corresponding confidence factor was given according to the confidence distance of the positioning data, and the confidence factor was associated with hierarchical sampling to improve the fusion efficiency and accuracy of the data fusion algorithm.After that, the basic particle filter was used to de-noise the multi-sensor positioning data to improve the The lidar of Silan A3 is responsible for collecting the environmental information around the unmanned ship.The ATK1218-GPS-BDS dual-positioning module is selected in the GPS/BDS positioning system to obtain the latitude and longitude information of the unmanned ship.The CC2530 wireless module is selected in the ZigBee positioning system to obtain the plane coordinate information of the unmanned ship.The Hikvision DS-2 camera is selected in the vision system to be responsible for the collection of environmental information of the unmanned-ship channel.

Framework of Multi-Sensor Data Fusion
In order to improve the reliability, fault tolerance, and accuracy of multi-sensor data fusion for the unmanned ship for water quality detection, a new multi-sensor-data-fusion positioning framework based on particle filtering as, shown in Figure 3, was designed.From the figure, it can be seen that the longitude and latitude information of the unmanned ship was first unified in time and space, and projected into the local coordinate system constructed by the ZigBee multi-node module through coordinate transformation, so as to realize mutual complementarity among sensor data.Then, through the consistency inspection of the multi-sensor data, the fault data are weighted and corrected to improve the fault-tolerant performance of the data fusion algorithm.At the same time, the corresponding confidence factor was given according to the confidence distance of the positioning data, and the confidence factor was associated with hierarchical sampling to improve the fusion efficiency and accuracy of the data fusion algorithm.After that, the basic particle filter was used to de-noise the multi-sensor positioning data to improve the reliability of the data samples.Finally, an improved particle-filter algorithm was designed to fuse and filter the multi-sensor positioning data to achieve accurate positioning of the unmanned ship.
Appl.Sci.2023, 13, 10390 5 of 29 reliability of the data samples.Finally, an improved particle-filter algorithm was designed to fuse and filter the multi-sensor positioning data to achieve accurate positioning of the unmanned ship.The measurement equation of GPS/BDS consists of nonlinear pseudorange measurement equations [14].The measurement equations of the BDS pseudorange p B and the GPS pseudorange p G are expressed as follows: where X j (k), Y j (k) and Z j (k) are the position coordinates of the receiver at time k; X   The measurement equation of GPS/BDS consists of nonlinear pseudorange measurement equations [14].The measurement equations of the BDS pseudorange p B and the GPS pseudorange p G are expressed as follows: where X j (k), Y j (k) and Z j (k) are the position coordinates of the receiver at time k; X B i (k), Y B i (k) and Z B i (k) are the position coordinates of the ith BDS satellite at time k; X G j (k), Y G j (k) and Z G j (k) are the position coordinates of the jth GPS satellite at time k; r(k) is the position vector of the receiver; r B i (k) and r G j (k) are the position vectors of the ith BDS and the jth GPS satellite at time k, respectively; p B i (k) and p G j (k) are the pseudoranges of the ith BDS and the jth GPS satellite at time k, respectively; δt B , δt G is the error of the BDS-and GPS-receiving clock, respectively; ε i (k) is the non-white noise error of channel i at time k; ν i (k) is the measurement noise of channel i at time k, i = 1, 2, . .., n l , j = 1, 2, . .., n 2 , k = 1, 2, . .., T. n 1 and n 2 are the number of BDS and GPS satellites received, respectively.T is the maximum duration.
When the signals of n satellites (n = n 1 + n 2 ≥ 5) are received, the observation variables of the system are Assuming that the number of GPS and BDS satellites observed at time k are equal (namely n 1 = n 2 ), the observation equation of the GPS/BDS satellite positioning system is established as where is the GPS pseudorange, and R is the covariance matrix of observation noise.

Measurement Equation of ZigBee
According to the principle of ZigBee positioning networking in this paper, and taking the sampling time T k of basic particle filter (BPF) as the time reference, the measurement equation of RSSI signal collected by the ZigBee positioning system was defined [15].The specific steps were as follows: Step 1 Establish the signal strength power model P R i of the ith reference node according to the path loss principle. where is the coordinate of the ith reference node; P 0 is the received power of the reference node at d 0 from the unmanned ship; ϑ is the path loss coefficient, and (x z , y z ) is the blind node coordinate.
Step 2 Establish the covariance matrix R RSSI of the observation equation. where is the initial variance of the signal strength of the ith ZigBee reference node.
Step 3 Define the observation equation for RSSI measurements collected by ZigBee. where is the signal strength power model; v is the covariance matrix of the observed noise.

Multi-Sensor Data Definition for the Unmanned Ship
In order to facilitate the description of the subsequent algorithm, the following data definition was carried out in this paper: The data collected by the sensor or the known data was defined as the measurement data, which involves the reference node coordinates (x R , y R ) in the ZigBee system and the geodetic coordinates (B, L) collected by the GPS/BD system.The data obtained by calculation and conversion was defined as positioning data, which involves the coordinates of blind nodes (x z , y z ) in ZigBee system, and the plane positioning coordinates (x G , y G ) and (x B , y B ) in GPS/BDS system.The GPS positioning data set was defined as n }, and the ZigBee blind node positioning data set as are the ith positioning data in the ZigBee, GPS, and BDS data sets, respectively, i = 1, 2, . .., n.

Unification of GPS/BDS Space-Time Reference
In order to obtain the trajectory information of the unmanned ship collected by the GPS/BDS dual-module sensor, it is necessary to unify the time of the GPS and BDS satellite systems.Due to the jump error between GPS time (GPST) and UTC time (UTCT) [16], as time goes by, the deviation between the two gradually increases, and at present the deviation has reached 16 s, that is BDS time (BDST) takes the national standard unit system s as the basic unit for time accumulation.Because there is no jump second in BDST, it is continuous time.The start time of BDST is converted into the number of weeks of GPST and the count of seconds in a week is 1356 weeks-14.000s.Therefore, the following relationship exists between BDST and GPST BDST week number = GPST week number + 1356 BDST Seconds of the week count = GPST Seconds of the week count + 14 (10) Each country has established different spatial benchmarks according to its own satellite navigation system, so it is necessary to unify the spatial benchmarks when performing combined positioning of different satellite systems.WGS-84 was used for GPS, and the 2000 National Geodetic Coordinate System (NGCS2000) was used for the BDS.The origin, scale, orientation, and the scale evolved from the orientation defined by the two coordinate systems were the same, and both are closely related to the Earth Reference System (ERS).After multiple optimizations, the difference between the two is only at the centimeter level [17].For most non-precision positioning applications such as navigation, the WGS-84 and NGCS2000 coordinate systems do not need to be converted, so they are considered as unified coordinate systems in this paper.

Network Positioning of Zigbee System
In order to meet the multi-node effective communication of the unmanned-ship Zigbee positioning system, n reference nodes were set in the positioning network coordinate system in this paper, so that the blind node on the unmanned ship is in a network composed of n reference nodes with a known signal strength and position coordinates [18].The specific steps are as follows: Step 1 Define the RSSI theoretical value of the signal strength indication of the received power, and calculate the distance between the blind node and the reference node.
From Equation (11), we can obtain where ϑ is the path loss coefficient, d is the distance between the blind node and the reference node, RSSI is the signal strength value, and A is the strength of the initial signal at the transmitter.
Step 2 Establish the following distance equations among the blind node and the reference nodes in the plane: where ∀ i ∈ [1, n], d i is the distance between the blind node and the ith reference node.
Step 3 Based on the reference node's distance equation set established by Equation ( 13), the linear transformation equation 2A x z y z = B of the blind node coordinates of the unmanned ship was constructed, where A and B are expressed as follows: Step 4 The coordinates (x z , y z ) of the blind node in the ZigBee system network are obtained by the least-squares method.

Coordinate Transformation
In order to perform data fusion filtering on GPS/BDS positioning data and ZigBee blind node location information, it is necessary to transform the WGS-84/NGCS2000 coordinate system [19] and unify it to the local plane coordinates of the unmanned-ship navigation test with the ZigBee multi-node networking coordinate system.For this reason, the existing geodetic coordinates (B, L) were used in this paper to transform them into plane coordinates through Gauss-Kruger projection, and translate and rotate them to make them unified with the local plane coordinates of the unmanned ship navigation.The specific steps are as follows: Step 1 convert WGS-84/NGCS2000 geodetic coordinates (B, L) to WGS-84/NGCS2000 Gaussian plane coordinates (x s , y s ): where m 0 = ∆L γ cos(B), t = tan(B), η 2 = (e ) 2 cos 2 B and ∆L are the difference between the longitude (L) of the desired point and the longitude (L 0 ) of the central meridian, namely ∆L = L − L 0 .γ is the positioning coefficient error, B is the latitude of the desired point, and its unit is radians, and e is the second eccentricity of the ellipsoid.
N p is the curvature radius of the primary vertical circle passing through this point, which can be described as where a is the long radius of the ellipsoid, e is the first eccentricity of the ellipsoid, and ϕ is the geodetic dimension.X B 0 is the arc length from the equator to the central meridian cut by a parallel circle passing through this point and can be described as where C 0 , C 1 , C 2 , C 3 and C 4 are ellipsoid parameters.
Appl.Sci.2023, 13, 10390 9 of 28 Step 2 transform the Gaussian coordinates of the unmanned ship navigation collected by GPS/BDS into the local coordinate system of the unmanned ship test through translation and rotation.
where (x G, B , y G, B ) are the GPS/BDS plane positioning coordinates of the unmanned ship, ∆x and ∆y are the translation amount of the coordinate system, m is the scale factor, and θ is the rotation angle of the two coordinate systems.

Confidence Determination of Multi-Sensor Data
In order to improve the fusion efficiency and filtering accuracy of multi-sensor data of the unmanned ship, the confidence distance judgment and credibility assignment of ZigBee-GPS/BDS multi-sensor data was carried out in this paper.Firstly, the credibility of the positioning data was determined by performing a confidence interval test on the sensor positioning data.Then, the credibility was divided into the corresponding confidence intervals according to its size, and the corresponding confidence factors were assigned.Finally, the confidence factor was associated with the TCPF algorithm to improve the filtering accuracy of the algorithm.

Judgement of Confidence Distance
When the location information of the unmanned ship is positioned based on the ZigBee-GPS/BDS multi-sensor positioning system, its sensor characteristic function can be described by the Gaussian distribution curve p (x i ) [20], and the positioning data x i follows the normal distribution N(µ, σ), namely where x i is the ith positioning data of the sensor, µ is the true value of the positioning data, θ is the measurement accuracy of the sensor information, and σ is the measurement error of the sensor information, i = 1, 2, . .., n.
x ZGB i ∈ X: the confidence distance of the sensor positioning data is determined using the defined p(x i ).The specific steps are as follows: Step 1 calculate the confidence distance among the positioning data of the ZigBee-GPS/BDS unmanned-ship positioning system at different times.Step 2 determine the credibility of the sensor information at time k according to the confidence level ε of the preset sensor support.

High data credibility
Step 3 Divide the positioning data into corresponding confidence intervals according to the confidence distance of the positioning data [21].
where ι is the variable coefficient of the sampling sample in the probability interval.In this paper, the credibility between sensor information at different times was determined by calculating the ZigBee-GPS/BDS confidence distance, and the determined data was divided into corresponding confidence intervals according to the probabilistic measurement value between the positioning data, which caused the credible data to be close to the region with higher confidence.Giving priority to the confidence factors of the sensor positioning data is helpful in improving the efficiency of data fusion.The set confidence level ε corresponded to the mean value τ of the sensor measurement variance, which was used to represent the change in the confidence degree of the multi-sensor positioning data at different times.The classification of the corresponding confidence interval also changed when the mean value τ of the measurement variance was different, which improved the assignment accuracy of the data fusion algorithm to the sensor positioning data.

Credibility Assignment
After the confidence distance was determined for the ZigBee-GPS/BDS positioning data, the multi-sensor positioning data was divided into corresponding confidence intervals.In order to improve the filtering accuracy of the data fusion algorithm, the confidence factor was given according to the confidence distance of the positioning data, and the confidence factor was associated with the hierarchical sampling of the proposed TCPF algorithm.The higher the confidence of the positioning data, the higher the corresponding fusion bias, which helps to improve the filtering accuracy of the TCPF algorithm for the location information of the unmanned ship.The specific steps are as follows: Step 1 define β i as the comprehensive support degree of the ith positioning data, which is composed of several confidence weight coefficients [22].
where ω i is the confidence weight coefficient of the ith positioning data, n is the numericized amount of information collected by multiple sensors, and a is the adjustment parameter and can be expressed as a = (n − 1)/2.y 1 , y 2 , . .., y n are a set of non-negative numbers.
Step 2 according to the comprehensive support degree of the defined positioning data, the norm equation of the dynamic support factor β o i (k) for multi-sensor information and the probability model p r (x ZGB i (k)) for the positioning data is constructed.
Step 3 Calculate the multi-sensor measurement error w ZGB i according to the dynamic support factor β o i (k): where A is the state transition matrix.
Step 4 The credibility of the positioning data of the unmanned ship positioning system is assigned using w ZGB i : where ς ZGB i (k) is the confidence factor of the ZigBee-GPS/BDS multi-sensor positioning data.

Inspection and Weighted Compensation of Multi-Sensor Data
In the data set collected by the ZigBee-GPS/BDS multi-sensor system of the unmanned ship, some data were valid, but some data may have caused measurement deviation due to environmental or noise interference.In order to improve the fault-tolerant performance of the data fusion algorithm, the consistency inspection of the positioning data set collected by the multi-sensor positioning system was carried out in this paper, and the inconsistency fault data was corrected by weighting.

Consistency Inspection of Sensor Data
For the multi-sensor positioning system composed of ZigBee-GPS/BDS, the ith positioning data x ZGB i can be expressed as where x t i is the true value, and ξ i is the measurement noise, i = 1, 2, . .., n.The obtained multi-sensor positioning data were arithmetically averaged and inspected for consistency [23].The specific steps were as follows: Step 1 the arithmetic mean of the positioning data, x, k = 1, 2, . .., T, was calculated: Step 2 according to the arithmetic mean value of the positioning data, the consistency inspection of the multi-sensor positioning data was carried out.
x ZGB (k) where } is the multi-sensor positioning data, and τ is the system requirement error.
Through the set system error requirements, the consistency inspection of the multisensor positioning data was carried out.If the difference between the sensor positioning data and the arithmetic mean value was less than the error required by the system, the positioning data was determined to be consistent, that is, credible data, and could be denoised using basic particle filtering.On the contrary, the variance of the sampled data needed weighted correction to meet the sampling requirements of the basic particle filter for data samples.

Weighted Correction for Variance
When the ZigBee-GPS/BDS multi-sensor positioning system was used to locate the navigation path of the unmanned ship at different positions in the same space, the measurement noise of each sensor followed Gaussian distribution [24].The variance of the ith positioning data can be expressed as In the real navigation situation of the multi-sensor positioning system of the unmanned ship, since the true positioning value x t i in Equation ( 34) is unknown, the arithmetic mean value x i of the positioning data in Equation ( 32) was taken as the unbiased estimate of the true value x T i , namely In order to improve the credibility of data samples, the multi-sensor positioning system in this paper measured the position of the unmanned ship m times, and integrated the m times of positioning data into a data set.The jth positioning value of the ith sensor information was x ij , and the sensor positioning data x ZGB i was replaced in Equation ( 35) with x ij to obtain the information variance of the data set, which can be expressed as where j = 1, 2, . .., m.
According to the variance of the data collected by the sensor, the fusion weight κ i of the fault data was defined as follows: According to the obtained fusion weight κ i , the multi-sensor fault data was weighted and fused. x where is the multi-sensor fault data, and κ = {κ 1 , κ 2 ,. .., κ n } is the fusion weight, i = 1, 2, . .., n.
By weighting the variance of the fault data, a certain amount of information correction was realized, and the fault-tolerant performance of the data fusion algorithm was improved.Even if the ZigBee signal had measurement deviation due to environmental interference, or the GPS/BDS signal was weakened or lost due to environmental occlusion, data samples with high credibility based on the proposed method could still be obtained.

Denoising Processing of Positioning Data Based on Particle Filter
In order to improve the reliability of the information collected by the ZigBee-GPS/BDS multi-sensor positioning system and reduce external noise interference, the multi-sensor data after the consistency inspection and variance weighting were filtered and denoised using the basic particle-filter algorithm [25].

Principle of Particle-Filter Algorithm
The design idea of the standard particle-filter algorithm is to approximate the probability density function of the system with some discrete random sampling points and replace the integration operation with the sample mean to obtain the minimum variance estimate of the state.First, a set of random particle samples was generated according to the prior condition of the system state vector, and the weight of each sampled particle was calculated.Then, according to the system observation information, the particle weights and positions were continuously corrected, and the corrected particles were used to approximate the posterior probability density function of the target state, so that the approximate posterior probability density function can be used to estimate the target state.Finally, the particle filter state was output, namely where x i (k) is the state of ith particle iterated at time k, xi (k) is the weighted estimation state of the particle, P i (k) is the estimated variance, and ω i (k) is the particle weight, k = 1, 2, . .., T, i = 1, 2, . .., n.

Denoising Processing of Sampling Data Based on Particle Filter
Particle propagation was achieved by sampling the ZigBee-GPS/BDS multi-sensor state-transition model q(x(k) x(k − 1), z(k)) and generating new particle states x i (k).In order to reduce the interference of environmental noise on the positioning data, BPF was used to filter and denoise the multi-sensor positioning data [26], and the latest data collected by sensors was substituted into the observation equation to establish a new particle filter observation equation, which improves the reliability of multi-sensor data samples.The specific steps were as follows: Step 1 The filtering model of the multi-sensor of the unmanned ship was established, and the state and measurement model of the multi-sensor system was defined as follows: where x(k) is the system state, z(k) is the sensor recursive positioning data, f (•) is the state transition function, h(•) is the measurement function, x(k − 1) is the system state at the last moment, x ZGB (k) is the sensor positioning data at time k, x(k) is the sensor positioning data weighted by the variance at time k, λ(k − 1) is the estimation noise, and ν(k) is the measurement noise.
Step 2 initialization: the prior density p(x 0 ) was randomly sampled and the initialization particle set x(0) was generated.
Step 3 importance sampling.(a) Randomly select n particle samples that satisfy the following distribution from the importance density function: (b) Calculate the weights of the sampled particles and update them as follows: where ω i (k) is the ith particle weight at time k.
(c) Normalized the importance weights.
Calculate the effective particle number If N eff is less than the threshold value N th , the particle set {x i (k), ω i (k)} is resampled; otherwise, no resampling is required.
Step 5 Output the local estimation and covariance matrix of the filtered multi-sensor positioning data: where xi (k) is the local estimation of particle information, and P i (k) is the covariance matrix, k = 1, 2, . .., T, i = 1, 2, . .., n.

Sensor Data Fusion Based on TCPF
When the basic particle-filter algorithm is used to filter the ZigBee-GPS/BDS sensor state-transition function q(x(k) x(k − 1), z(k)), BPF can obtain a posterior probability that is close to the real state estimation because it is based on the Bayesian recursion of the sensor state prediction information according to the sampling idea.However, when filtering and fusing three or more input data, BPF will suffer from a low operating efficiency and lack of particle samples in the resampling process [25].In order to meet the requirements of fusion filtering processing of the multi-input data model based on ZigBee-GPS/BDS, a particlefilter algorithm based on adaptive threshold and hierarchical capacity was proposed to perform fusion filtering processing of the multi-input data, so as to realize the precise positioning of the unmanned ship.

Principle of TCPF Algorithm
The proposed TCPF algorithm first used unscented transformation [27] to integrate the latest observation information into the proposal distribution, so that the proposal distribution was close to the real distribution of the probability density function: ).Then, a Gaussian mixture model was constructed and an adaptive threshold was set to reduce the operation steps of clustering similar components in the Gaussian mixture and improve the clustering efficiency.Finally, the stratified sampling proportion capacity was set, the continuous probability density function was layered, and the combination of particle weights from the inferior layer was optimized to improve particle diversity.The specific steps are as follows: Step 1 integrate the latest observation information into the proposal distribution.(a) Extract the particle state and covariance matrix processed by the basic particle-filter algorithm, and calculate the sigma point set: where x i(a) (k − 1) is the sigma point set, x i(a) (k − 1) is the sigma point set after the unscented transformation, P i(a) (k − 1) is the covariance matrix of the sigma point set, n a is the dimension of the sigma point set, and λ is the scale parameter.(b) Integrate ZigBee-GPS/BDS multi-sensor positioning data into the obtained Sigma sampling point set, and update the system status and covariance.
where x i (k) is the update state of the system, p i (k) is the update covariance of the system, k k is the Kalman gain, and p i(z(k−1)) (k − 1) is the covariance matrix of the positioning data.
(c) Construct a proposal distribution that is closer to the target probability function using the system state and covariance, and sample from it.
where N(•) is the Gaussian function.
Step 2 construct a Gaussian mixture model.(a) Generate a posterior probability density function p h (x(k)|z(k)) with time step k according to the Gaussian mixture components. where where h = 0.5N −2/n x (53) .. .. .
p(k) is the covariance of the discrete particle filter distribution, ..
x i (k) is the mean value of the discrete particle filter distribution, h is the normalized constant, and n x is the particle distribution dimension.
(c) Merge similar units of the Gaussian mixture in p g (x(k)|z(k)) using cluster analysis.
Step 3 set the adaptive threshold T c for merging similar units in cluster analysis.(a) Take the particle x m with the largest weight in the discrete particle sample set as the cluster center, and calculate the Mahalanobis distance D i between the other particles i and x m after selecting the importance sampling process.
where β i c is the probability density of particle i, and S is the covariance matrix.(b) Calculate the number of effective particle samples N e in the cluster unit.
where n is the number of particle samples and σ 2 βc is the covariance of particle probability density.
(c) Construct threshold T: where T 0 is the initial value of the threshold, k e is the proportion coefficient, and R is the classification times.(d) Substitute Equation (57) into Equation (58) to obtain the adaptive threshold T c .
(e) Compare D i with the adaptive threshold T c .If D i is less than or equal to T c , the particle is classified into the component unit related to its probabilistic mass; on the contrary, skip the particle and cluster other particles.
(f) Select the particle with the largest weight from the remaining particle samples as the cluster center, and repeat step (e) until the clustering ends.
(g) Substitute the clustered component units into the continuous probability density function p(x(k)|z(k)) of the constructed particle set.The p(x(k)|z(k)) is expressed as follows: where β i is the probability mass of the similar component i, γ i is the mean of component i, and p i is the covariance of component i, i = 1, 2, . .., n.
Step 4 set the hierarchical sampling proportional capacity.(a) According to the layering theory [28], the continuous probability density function p(x(k)|z(k)) is divided into l layers, and the probability density function of each layer is defined as p i (x).According to its probability quality, the component layers are divided into a group of weight advantage layers and two groups of disadvantage layers, and are defined as l a , l b and l c , respectively.
(b) Set the proportional capacity of the particle number in layers l a , l b and l c as n/4, n/3 and n/3, respectively.
(c) The particles whose weights are less than the average value (k) in l b and l c layers are optimized and combined to obtain the optimized particle weights ψ i (k), and the sample data is sampled hierarchically.The (k) and ψ i (k) are calculated as follows: where η is the proportional coefficient.
(d) Output the sampling results of multi-sensor data fusion.
In the process of importance sampling, the current positioning data was integrated into the design of the proposal distribution of particle sets, which made the proposal distribution closer to the real posterior probability density and improved the estimation performance of the algorithm.By constructing Gaussian mixture probability density function instead of resampling, and constructing adaptive threshold in the cluster analysis of Gaussian mixture, the discrete particle samples were merged into similar component units, which reduces the complexity of clustering operation, and improves the real-time performance and operational efficiency of system signal processing.In addition, the continuous probability density function was stratified and the proportional capacity was set to ensure that there are enough particles in the inferior layer for weight optimization combination, which improved the diversity of particles, effectively suppressed the lack of particle samples, and improved the fusion processing accuracy of the TCPF algorithm for multi-input data.

Association of Stratified Sampling with Sensor Confidence
In order to further improve the fusion filtering accuracy of the algorithm, a new design was made for the hierarchical sampling step of the TCPF algorithm in this paper.The confidence factor ς ZGB i (k) of Equation ( 30) was associated with the hierarchical sampling of the TCPF algorithm, and a new weight optimization equation was obtained.The specific steps are as follows: Step 1 substitute the confidence factor into the calculation of the weight optimization.
Step 2 the data samples are stratified according to the weights of multi-sensor sampling particles after optimized combination.
The confidence factor of the positioning data was associated with the stratified sampling in the TCPF algorithm, so that the sensor positioning data with a large confidence factor would be sampled first when the TCPF algorithm was used to sample and fuse the positioning data, which would improve the sampling efficiency of the TCPF algorithm.The larger the confidence factor data, the higher the credibility, which improved the reference value of samples from sensor information fusion, further improved the fusion filtering accuracy of the TCPF algorithm, and finally realized the precise positioning of the unmanned ship.
Step 2 perform basic UPF operations: Step 3 sample particles from the proposal distribution N( x i (k), p i (k)): Step 4 construct an adaptive threshold T c , and a Gaussian mixture continuous probability density function p(x(k)|z(k)) using cluster analysis.
Step 5 the continuous probability density function is sampled hierarchically, and the sampling space is divided into l a , l b , and l c layers.
Step 6 set the proportional capacity, and divide the particles into l a , l b , and l c layer groups according to the weight of the confidence factor ς ZGB i of the sampled particles.At the same time, the weights of particles in the inferior layer l b and l c layer groups are combined and optimized, and they are added to the l a layer to participate in sampling after the optimized particle weight ψ i (k) is obtained.
Step 7 output the fusion sampling results.

Numerical Simulation and Experimental Testing 8.1. Simulation of Data Fusion Algorithm Based on TCPF
In order to verify the performance of the proposed fusion positioning algorithm, 30 independent tests were carried out on the simulation model shown in Equations ( 63)-( 65), and the test results were compared with the results of an Extended Kalman Filter (EKF) [29], Unscented Kalman Filter (UKF) [30], Unscented Particle Filter (UPF) [31] and Basic Particle Filter (BPF) [32] in terms of root-mean-square error (RMSE) and standard deviation (Std).
The remaining parameters of TCPF were set as follows: N was 100, σ was 0.75, τ was 2; the process noise variance Q and measurement noise variance R were separately set according to different models, that is, the Q of the f 1 , f 2 and f 3 test models were Q 1 ~N (0,0.5),Q 2 ~N (0,1) and Q 3 ~N(0,5), respectively; and the R of the f 1 , f 2 and f 3 test models were R 1 ~N(0,1), R 2 ~N(0,5) and R 3 ~N(0,10), respectively.The parameters of the algorithm to be compared were taken from the corresponding references.
Table 1 shows the model test results of five algorithms.From the table, it can be seen that the mean and maximum values of RSME and Std from the proposed TCPF are smaller than the corresponding performances from the other four algorithms, which indicates that the filter fusion accuracy of TCPF was the highest.The superior performances were mainly due to the fact that in the process of importance sampling in this paper, the latest positioning data were integrated into the importance function through unscented transformation, which improved the credibility of particle samples.In addition, the algorithm in this paper clustered discrete particles by constructing an adaptive threshold in the Gaussian mixture and optimized the weights of particles in the inferior layer, which improved the diversity of data samples.The performance comparison shows that compared with the other four algorithms, the mean values of RMSE and Std of data fusion based on the proposed TCPF decreased by 25.0% and 28.0%, respectively, which fully shows that the TCPF data fusion algorithm can effectively suppress the particle shortage problem and improve the filtering accuracy.Figure 4 shows the results of 30 RSME and Std tests of five algorithms against three types of models (f 1 , f 2 , f 3 ).From the figure, it can be seen that when the noise variance was small, the RMSE and Std values of the TCPF data fusion algorithm were smaller than the values of the other four algorithms in each independent simulation experiment.When the noise variance increased, the RMSE and Std values of the five algorithms increased, which indicates that the filtering performance of the algorithms decreased, but the estimation accuracy of TCPF was still significantly higher than those of the other four algorithms.The test results in Figure 4 also verify that the filtering optimization performance of the TCPF data fusion algorithm was the best, and the filtering accuracy was the highest.(e) (f)

Establishment of Unmanned-Ship Experimental Environment
In order to further verify the effectiveness of the multi-sensor data fusion positioning method of the unmanned ship for water quality testing based on the proposed TCPF, the ZigBee-GPS/BDS multi-sensor combined positioning system test platform as shown in Figures 1 and 2 was established with the three-body unmanned ship as the carrier, and the unmanned ship navigation positioning experiment was carried out in the river channel of Zhangjiagang Campus of Jiangsu University of Science and Technology.In order to facilitate the experimental analysis and calculation, the starting point coordinate was subtracted from the preprocessed unmanned ship coordinate data, and the relative coordinate was used for testing.After calculation, the starting point coordinate of the unmanned ship was set to (3.8941, 0).
In order to evaluate the filtering accuracy of the unmanned-ship position information based on the proposed TCPF data fusion algorithm, first, the industrial computer equipped with the Linux system collected the position information of the unmanned ship using multiple sensors and outputted it from the serial port to the PC in the form of a log file through the wireless communication module.Then, the PC integrated the received position information of the unmanned ship into a data set [33].After that, the designed TCPF data fusion algorithm was used to fuse and filter the position information data set of the unmanned ship, and finally realize the precise positioning of the unmanned ship.Figure 5 shows the experimental environment for the unmanned-ship positioning.

Establishment of Unmanned-Ship Experimental Environment
In order to further verify the effectiveness of the multi-sensor data fusion positioning method of the unmanned ship for water quality testing based on the proposed TCPF, the ZigBee-GPS/BDS multi-sensor combined positioning system test platform as shown in Figures 1 and 2 was established with the three-body unmanned ship as the carrier, and the unmanned ship navigation positioning experiment was carried out in the river channel of Zhangjiagang Campus of Jiangsu University of Science and Technology.In order to facilitate the experimental analysis and calculation, the starting point coordinate was subtracted from the preprocessed unmanned ship coordinate data, and the relative coordinate was used for testing.After calculation, the starting point coordinate of the unmanned ship was set to (3.8941, 0).
In order to evaluate the filtering accuracy of the unmanned-ship position information based on the proposed TCPF data fusion algorithm, first, the industrial computer equipped with the Linux system collected the position information of the unmanned ship using multiple sensors and outputted it from the serial port to the PC in the form of a log file through the wireless communication module.Then, the PC integrated the received position information of the unmanned ship into a data set [33].After that, the designed TCPF data fusion algorithm was used to fuse and filter the position information data set of the unmanned ship, and finally realize the precise positioning of the unmanned ship.Figure 5 shows the experimental environment for the unmanned-ship positioning.
In order to verify the validity and superiority of the ZigBee-GPS/BDS multi-sensor positioning system for unmanned-ship navigation in different environments, the test river was divided into two sections, A and B, and two groups of ZigBee reference nodes were set along the A/B river according to the ZigBee networking principle.Among them, section A was located on the west side of the school library, which has an open water surface and was easy for the unmanned ship to navigate.However, the B section of the river was located on the west side of the school gymnasium, with dense vegetation and narrow channels, which had a certain environmental disturbance effect on the signal transmission of the ZigBee-GPS/BDS sensors.Figure 6 shows the schematic diagram of the node layout and navigation trajectory on the A/B river.In order to verify the validity and superiority of the ZigBee-GPS/BDS multi-s positioning system for unmanned-ship navigation in different environments, the test was divided into two sections, A and B, and two groups of ZigBee reference nodes set along the A/B river according to the ZigBee networking principle.Among them tion A was located on the west side of the school library, which has an open water su and was easy for the unmanned ship to navigate.However, the B section of the rive located on the west side of the school gymnasium, with dense vegetation and na channels, which had a certain environmental disturbance effect on the signal transm of the ZigBee-GPS/BDS sensors.Figure 6 shows the schematic diagram of the node l and navigation trajectory on the A/B river.

Unmanned-Ship Positioning Test Based on Multi-Sensor Data Fusion
In order to verify the superior performance of the proposed TCPF algorithm, unmanned-ship navigation and positioning experiments based on the multi-sensor tioning system were carried out.According to the unmanned-ship positioning dat lected by the sensors in the A/B experimental river, the test results of the six algori  In order to verify the validity and superiority of the ZigBee-GPS/BDS multi-se positioning system for unmanned-ship navigation in different environments, the test was divided into two sections, A and B, and two groups of ZigBee reference nodes set along the A/B river according to the ZigBee networking principle.Among them tion A was located on the west side of the school library, which has an open water su and was easy for the unmanned ship to navigate.However, the B section of the river located on the west side of the school gymnasium, with dense vegetation and na channels, which had a certain environmental disturbance effect on the signal transmis of the ZigBee-GPS/BDS sensors.Figure 6

Unmanned-Ship Positioning Test Based on Multi-Sensor Data Fusion
In order to verify the superior performance of the proposed TCPF algorithm, s unmanned-ship navigation and positioning experiments based on the multi-sensor tioning system were carried out.According to the unmanned-ship positioning data lected by the sensors in the A/B experimental river, the test results of the six algorit

Unmanned-Ship Positioning Test Based on Multi-Sensor Data Fusion
In order to verify the superior performance of the proposed TCPF algorithm, some unmanned-ship navigation and positioning experiments based on the multi-sensor positioning system were carried out.According to the unmanned-ship positioning data collected by the sensors in the A/B experimental river, the test results of the six algorithms, namely TCPF, EKF, UKF, UPF, KF, and BPF, were compared against the three performance indicators of average positioning error, RMSE and Std.The filtering data of the proposed TCPF algorithm was ZigBee-GPS/BDS positioning data, and the sensor positioning data of the other five algorithms were all ZigBee-GPS. Figure 7 shows the filtering results of the unmanned-ship navigation trajectory based on six filtering algorithms.
namely TCPF, EKF, UKF, UPF, KF, and BPF, were compared against the three performance indicators of average positioning error, RMSE and Std.The filtering data of the proposed TCPF algorithm was ZigBee-GPS/BDS positioning data, and the sensor positioning data of the other five algorithms were all ZigBee-GPS. Figure 7 shows the filtering results of the unmanned-ship navigation trajectory based on six filtering algorithms.From Figure 7b, it can be seen that when the unmanned ship sailed on the experimental river in section B, the sensor signal transmission was affected to a certain extent by environmental disturbances, such as dense trees and a narrow river.Except for the TCPF algorithm, the filtering and positioning results of other algorithms seriously deviated from the expected trajectory of the unmanned ship in some places; in particular, at the turning of the river, the positioning results were prone to large jumps, which caused the unmanned ship to gradually deviate from the expected trajectory and reduced the positioning accuracy and reliability.From Figure 7a, it can be seen that because the water surface of the experimental river in section A was more open than that in section B, and there were fewer shelters along the river, the positioning results of the other five algorithms showed that the unmanned ship could basically navigate according to the expected trajectory, but there was still a certain jump at the turning.
Combining Figure 7a,b, it can be seen that compared with the other five algorithms, the positioning accuracy of the unmanned ship based on the proposed TCPF algorithm was significantly higher.No matter whether at the turning of the river or in a straight line, the unmanned ship could basically navigate along the expected trajectory.This was mainly because the TCPF data fusion algorithm achieves the weighted correction of multisensor fault data through consistency inspection, which improves the fault-tolerant performance of the algorithm, and makes the TCPF algorithm have a high-reliability data sample for filtering.If the data are not inspected and corrected, when a type of sensor is subjected to a large environmental disturbance, the positioning data will be deviated, which will reduce the credibility of the data sample, and then reduce the positioning accuracy of the unmanned ship.Thus, this shows that the proposed TCPF algorithm of ZigBee-GPS/BDS not only ensures the accuracy of fault data inspection but also improves the fault-tolerant performance of the algorithm.
Tables 2 and 3 show the comparison results of trajectory positioning for six algorithms.From the tables, it can be seen that the test results of the proposed TCPF algorithm were smaller than those of the other five algorithms, regardless of the average positioning From Figure 7b, it can be seen that when the unmanned ship sailed on the experimental river in section B, the sensor signal transmission was affected to a certain extent by environmental disturbances, such as dense trees and a narrow river.Except for the TCPF algorithm, the filtering and positioning results of other algorithms seriously deviated from the expected trajectory of the unmanned ship in some places; in particular, at the turning of the river, the positioning results were prone to large jumps, which caused the unmanned ship to gradually deviate from the expected trajectory and reduced the positioning accuracy and reliability.From Figure 7a, it can be seen that because the water surface of the experimental river in section A was more open than that in section B, and there were fewer shelters along the river, the positioning results of the other five algorithms showed that the unmanned ship could basically navigate according to the expected trajectory, but there was still a certain jump at the turning.
Combining Figure 7a,b, it can be seen that compared with the other five algorithms, the positioning accuracy of the unmanned ship based on the proposed TCPF algorithm was significantly higher.No matter whether at the turning of the river or in a straight line, the unmanned ship could basically navigate along the expected trajectory.This was mainly because the TCPF data fusion algorithm achieves the weighted correction of multi-sensor fault data through consistency inspection, which improves the fault-tolerant performance of the algorithm, and makes the TCPF algorithm have a high-reliability data sample for filtering.If the data are not inspected and corrected, when a type of sensor is subjected to a large environmental disturbance, the positioning data will be deviated, which will reduce the credibility of the data sample, and then reduce the positioning accuracy of the unmanned ship.Thus, this shows that the proposed TCPF algorithm of ZigBee-GPS/BDS not only ensures the accuracy of fault data inspection but also improves the fault-tolerant performance of the algorithm.
Tables 2 and 3 show the comparison results of trajectory positioning for six algorithms.From the tables, it can be seen that the test results of the proposed TCPF algorithm were smaller than those of the other five algorithms, regardless of the average positioning error or the maximum positioning error of the A/B section, which indicates that the proposed method has the highest filtering and fusion accuracy.This is mainly because the posterior probability density function representing the state was approximated as a Gaussian mixture distribution in this paper, and particle samples were extracted on it instead of resampling, which ensured the diversity of ZigBee-GPS/BDS multi-sensor sampling particles, and avoided a lack of samples.From the performances of Std and RMSE in the A/B section, compared with the other five algorithms, the value of the TCPF algorithm was also the smallest, which shows that the estimation performance of the TCPF algorithm is also the best.This is mainly due to the fact that the proposed TCPF algorithm integrated the latest multi-sensor positioning data collected by the unmanned-ship positioning system into the proposal distribution of the particle set in the importance sampling process, which made the proposal distribution closer to the real posterior probability density and improved the estimation performance of the algorithm.In addition, the integration operation in Bayesian estimation was solved according to the Monte Carlo method adopted by the basic particle-filter algorithm, which reduced the interference of environmental noise on the information collected by multisensors, and improved the credibility of multi-sensor positioning data samples.
The calculation shows that, compared with the other five algorithms, when the unmanned ship navigated based on TCPF in section A, the average positioning error, RMSE and, Std performances of its trajectory decreased by 35.0%, 36.0%, and 35.0%, respectively.In addition, the average positioning error, RMSE and, Std performance of its trajectory in section B decreased by 37.0%, 40.0%, and 39.0%, respectively.In the experiment involving the whole river, the three performances of TCPF decreased by an average of 36.0%,38.0%, and 37.0%, respectively, which fully shows that the proposed TCPF algorithm had a high estimation performance and fault-tolerant performance, and the positioning accuracy of the unmanned ship's navigation trajectory was improved.

Fault-Tolerance Test of the Unmanned-Ship Positioning Algorithm
In order to further verify the fault tolerance and filtering performance of the TCPF data fusion algorithm, two sets of fault-tolerance tests were carried out.One set of test data was from ZigBee-GPS, and the other set of selected test data was from ZigBee-BDS.In addition, the BPF algorithm was selected as the comparison algorithm for the performance test, and the positioning error, RMSE, and Std were used as performance indicators.The test data set of BPF was from ZigBee-GPS/BDS.Figure 8 shows the trajectory fusion results of the unmanned ship based on different algorithms in the A/B river.
From Figure 8, it can be seen that although the positioning results of the unmanned ship, based on the TCPF algorithm for different data sets, basically fitted the expected trajectory, the positioning accuracy of the TCPF algorithm for the ZigBee-GPS/BDS data set was significantly higher, and the positioning jump error at the river turn was also smaller, because the TCPF algorithm realized the information complementarity between the GPS and BDS data set.When a signal in the positioning system was lost, another sensor could supplement the collected position information of the unmanned ship to the sampling data set; thus, the sensor signal-loss problem caused by the large deviation in the unmanned ship position has been effectively overcome, which verifies that the constructed ZigBee-GPS/BDS multi-sensor positioning system performed the function of information complementarity between the data.From Figure 8, it can be seen that although the positioning results of the unmanned ship, based on the TCPF algorithm for different data sets, basically fitted the expected trajectory, the positioning accuracy of the TCPF algorithm for the ZigBee-GPS/BDS data set was significantly higher, and the positioning jump error at the river turn was also smaller, because the TCPF algorithm realized the information complementarity between the GPS and BDS data set.When a signal in the positioning system was lost, another sensor could supplement the collected position information of the unmanned ship to the sampling data set; thus, the sensor signal-loss problem caused by the large deviation in the unmanned ship position has been effectively overcome, which verifies that the constructed ZigBee-GPS/BDS multi-sensor positioning system performed the function of information complementarity between the data.
Combining the performance indicators of the average positioning error in Figure 8 and Tables 4 and 5, it can be seen that the BPF algorithm using the ZigBee-GPS/BDS data set improved the positioning accuracy of the unmanned ship to a certain extent, but there was still a certain gap compared with the positioning accuracy of the TCPF algorithm, which was mainly due to the optimization performance of the TCPF algorithm itself.Firstly, the adaptive threshold was constructed in the cluster analysis of Gaussian mixture units, and the discrete particle samples were merged into similar component units, which reduces the complexity of clustering operations and improves the real-time performance of data fusion algorithms for signal processing.Secondly, the samples of the continuous probability density function of the constructed weighted point set were stratified, and the proportional capacity of each sampling layer was set, which ensured the reasonable distribution of the number of sampling particles in the stratification.Next, the layer group la was sampled, and the particle weights in the layer group lb and lc were optimally combined, which increased the probability quality and prevented the lack of samples.Combining the performance indicators of the average positioning error in Figure 8 and Tables 4 and 5, can be seen that the BPF algorithm using the ZigBee-GPS/BDS data set improved the positioning accuracy of the unmanned ship to a certain extent, but there was still a certain gap compared with the positioning accuracy of the TCPF algorithm, which was mainly due to the optimization performance of the TCPF algorithm itself.Firstly, the adaptive threshold was constructed in the cluster analysis of Gaussian mixture units, and the discrete particle samples were merged into similar component units, which reduces the complexity of clustering operations and improves the real-time performance of data fusion algorithms for signal processing.Secondly, the samples of the continuous probability density function of the constructed weighted point set were stratified, and the proportional capacity of each sampling layer was set, which ensured the reasonable distribution of the number of sampling particles in the stratification.Next, the layer group l a was sampled, and the particle weights in the layer group l b and l c were optimally combined, which increased the probability quality and prevented the lack of samples.From Tables 4 and 5, it can be seen that the RMSE and Std performance indicators of the TCPF algorithm were better than those of the BPF algorithm.This was mainly because the confidence factor of multi-sensor positioning data is associated with hierarchical sampling in the TCPF algorithm, so when using the TCPF algorithm to filter and fuse ZigBee-GPS/BDS multi-sensor positioning data, the sensor positioning data with a large confidence factor will be fused and sampled first, which improves the sampling efficiency of the TCPF algorithm.Because the confidence factor reflects the credibility of the data, the larger the confidence factor was, the higher the reliability of the data sample was, which further improved the reference value of the sensor-information fusion sample, and further improved the fusion filtering accuracy of the TCPF algorithm for multi-input data, and finally achieved the accurate positioning of the unmanned ship.The calculations show that, compared with the other three algorithms, the average positioning error, RMSE and Std performances of the unmanned ship, based on the TCPF algorithm during navigation in river A, decreased by 22.0%, 20.0%, and 17.0%, respectively, and the average positioning error, RMSE, and Std in river B decreased 18.0%, 19.0%, and 18.0%, respectively.The three performances of the unmanned ship in the whole experimental river decreased by an average of 20.0%, 19.5%, and 17.5%, respectively, which fully demonstrates that the TCPF algorithm has a better optimization performance and fault-tolerant performance compared with the basic particle-filter algorithm, and improves the ship's positioning accuracy under the interference of the unmanned-ship environment.

Discussion
Accurate positioning is the key to achieving the high-precision autonomous navigation of unmanned ships, and the positioning of unmanned ships based on multiple combined sensors has always been the focus of research by scholars.Data fusion based on two types of sensors is the current mainstream technology for unmanned-ship positioning, but there are shortcomings in affecting positioning accuracy and reliability due to the weakening or loss of certain sensor signals.In recent years, how to improve positioning accuracy by further fusing the data of three or more types of sensors has become a research hotspot.Adding sensors can help improve the reliability and accuracy of unmanned-ship positioning, but there is still a lack of research on how to further improve the accuracy and efficiency of data fusion through testing the confidence distance of data, as well as how to achieve effective localization under low or weak signals through data correction.In view of this, for the positioning of unmanned ships, in this paper, a multi-sensor positioning system incorporating ZigBee, GPS, and BDS was first built.Then, the particle-filter algorithm was introduced for denoising multi-sensor data.Next, the latest positioning data from multiple sensors were integrated into the proposed distribution using unscented transform to cause the proposed distribution to be close to the real distribution of the probability density function.Finally, the Gaussian mixture model was constructed, the adaptive threshold was set, and the data-confidence factor was associated with the hierarchical sampling to further improve the fusion filtering accuracy of the positioning data.The numerical test results of the three groups of models and the experimental test results of the navigation path all show that the proposed method not only realizes the mutual complementation, weighted correction, and confidence assignment of multi-sensor signals, but also significantly reduces their root-mean-square error and standard deviation compared with other filtering algorithms, which verifies that the proposed method has the advantages of high data reliability and a good filtering-fault-tolerance performance, and achieves the accuracy and reliable positioning of unmanned ships.

Conclusions and Future Work
In this paper, a multi-sensor data fusion positioning method for unmanned ships based on a threshold-and hierarchical-capacity particle filter was proposed to address the issues of significant deviation in data fusion accuracy caused by signal weakening and loss in conventional integrated positioning systems in unmanned ships.Through algorithm simulation and experimental testing, the following conclusions could be obtained: (1) The positioning data collected by the ZigBee-GPS/BDS multi-sensor is used to complement the information, which effectively overcomes the problem of sensor signal weakening or loss caused by environmental masking, and improves the accuracy and effectiveness of multi-sensor data fusion.(2) By conducting consistency checks on the positioning data and weighted correction of the faulty data, not only does it enhance the fault-tolerance performance of the data fusion algorithm but also strengthens the credibility of the data set samples.(3) The latest positioning data of multiple sensors are integrated into the proposal distribution of the particle set, which causes the suggested distribution to be closer to the true posterior probability density and improves the estimation performance of the algorithm.At the same time, the adaptive threshold is constructed in the cluster analysis of Gaussian mixing units, and the discrete particle samples are merged into similar component units, which improves the real-time performance and computing efficiency of the system's signal processing.(4) Through stratified sampling and the setting of proportional capacity, a sufficient number of particles in the disadvantage layer are ensured for weight optimization and combination, and the diversity of particles is improved.Simultaneously, associating confidence factors with the TCPF algorithm's layered sampling prioritizes the selection of positioning data with larger confidence factors for sample fusion during the fusion filtering process of the unmanned ships position information to enhance the efficiency and accuracy of the data fusion algorithm.
The multi-sensor data fusion method in this paper was mainly oriented to unmanned ships that conduct water quality detection in inland rivers.In recent years, unmanned ships have also been applied in various fields such as maritime rescue, maritime monitoring, and maritime cargo transportation.The marine environment is much more complex than inland rivers.Whether the multi-sensor fusion algorithm proposed in this paper is suitable for the marine environment will be the next research topic.

Figure 1 .
Figure 1.ZigBee-GPS/BDS multi-sensor combined positioning system for an unmanned ship.

Figure 1 .
Figure 1.ZigBee-GPS/BDS multi-sensor combined positioning system for an unmanned ship.

Figure 2 .
Figure 2. Test platform for unmanned-ship positioning system.

Figure 2 .
Figure 2. Test platform for unmanned-ship positioning system.

Figure 3 .
Figure 3. Particle filter-based multi-sensor data fusion positioning framework for unmanned ships.

3 .
Pre-Processing of Multi-Sensor Data from the Unmanned Ship 3.1.System Modeling 3.1.1.Measurement Equation of GPS/BDS and Z B i (k) are the position coordinates of the ith BDS satellite at time k; X G j (k), Y G j (k) and Z G j (k) are the position coordinates of the jth GPS satellite at time k; r(k) is the position vector of the receiver; r B i (k) and r G j (k) are the position vectors of the ith BDS and the jth GPS satellite at time k, respectively; p B i (k) and p G j (k) are the pseudoranges of the ith BDS and the jth GPS satellite at time k, respectively; δtB, δtG is the error of the BDS-and GPS-receiving

Figure 3 .
Figure 3. Particle filter-based multi-sensor data fusion positioning framework for unmanned ships.

3 .
Pre-Processing of Multi-Sensor Data from the Unmanned Ship 3.1.System Modeling 3.1.1.Measurement Equation of GPS/BDS are the observation values of the ith positioning data at time k and k + 1, respectively, τ ZGB i (k) and τ ZGB i (k + 1) are the measurement variances of the ith positioning data at time k and k + 1, and τ is the mean of the measurement variance, k = 1, 2, . .., T.
is the ith component in the mixed Gaussian model, C(k) is the number of component units of discrete samples, and ξ is the number of component units for discrete samples, k = 1, 2, . .., T, i = 1, 2, . .., n.(b) Integrate the discrete sampling points sampled by Equation (50) and their corresponding weight { x i (k), ω i (k)} into the Gaussian mixture component unit of Equation (51), and use the reconstructed continuous posterior probability density function p g (x(k)|z(k)) to resample the discrete particles: Appl.Sci.2023, 13, 10390 20 of 29 small, the RMSE and Std values of the TCPF data fusion algorithm were smaller than the values of the other four algorithms in each independent simulation experiment.When the noise variance increased, the RMSE and Std values of the five algorithms increased, which indicates that the filtering performance of the algorithms decreased, but the estimation accuracy of TCPF was still significantly higher than those of the other four algorithms.The test results in Figure4also verify that the filtering optimization performance of the TCPF data fusion algorithm was the best, and the filtering accuracy was the highest.

Figure 5 .
Figure 5. Experimental environment for unmanned ship positioning: (a) Communication no PC terminal.

Figure 6 .
Figure 6.Schematic diagram of node layout and navigation trajectory on A/B river: (a) ZigBee layout; (b) navigation trajectory of unmanned ship.

Figure 5 .
Figure 5. Experimental environment for unmanned ship positioning: (a) Communication nod PC terminal.

Figure 6 .
Figure 6.Schematic diagram of node layout and navigation trajectory on A/B river: (a) ZigBee layout; (b) navigation trajectory of unmanned ship.

Figure 6 .
Figure 6.Schematic diagram of node layout and navigation trajectory on A/B river: (a) ZigBee node layout; (b) navigation trajectory of unmanned ship.

Figure 7 .
Figure 7. Filtering results of the unmanned-ship navigation trajectory based on five filtering algorithms: (a) positioning trajectories on section A; (b) positioning trajectories on section B.

Figure 7 .
Figure 7. Filtering results of the unmanned-ship navigation trajectory based on five filtering algorithms: (a) positioning trajectories on section A; (b) positioning trajectories on section B.

Figure 8 .
Figure 8. Trajectory fusion results of the unmanned ship based on different algorithms in the A/B river: (a) section A positioning trajectory; (b) section B positioning trajectory.

Figure 8 .
Figure 8. Trajectory fusion results of the unmanned ship based on different algorithms in the A/B river: (a) section A positioning trajectory; (b) section B positioning trajectory.

Table 1 .
Model test results of five algorithms.

Table 2 .
Trajectory positioning test results in section A.

Table 3 .
Trajectory positioning test results in section B.

Table 4 .
Data positioning test results in section A.

Table 5 .
Data positioning test results in section B.