Autonomous Underwater Vehicle Cruise Positioning and Docking Guidance Scheme

: The Autonomous Underwater Vehicle (AUV) is capable of autonomously conducting underwater cruising tasks. When combined with docking operations, the AUV can replenish its electric power after long-distance travel, enabling it to achieve long-range autonomous monitoring. This paper proposes a positioning method for the cruising and docking stages of AUVs. Firstly, a vision guidance algorithm based on monocular vision and threshold segmentation is studied to address the issue of regional noise that commonly occurs during underwater docking. A solution for regional noise based on threshold segmentation and proportional circle selection is proposed. Sec-ondly, in order to enhance the positioning accuracy during the cruising stage, a fusion positioning algorithm based on particle ﬁ ltering is presented, incorporating the Doppler Velocity Log (DVL) and GPS carried by the AUV. In simulation, this algorithm improves positioning accuracy by over 56.0% compared to using individual sensors alone. Finally, experiments for cruising and docking were conducted in Qingjiang, Hubei, China. The e ﬀ ectiveness of both methods is demonstrated, with successful docking achieved in four out of ﬁ ve a tt empts.


Introduction
Throughout the 21st century, human demand for Earth's resources has been steadily increasing.With mature land resource extraction technologies, significant amounts have been developed and utilized, prompting an urgent need to explore new resources.The ocean, covering approximately 3.6 million square kilometers, constitutes over 71% of the Earth's surface area, more than twice that of land.Furthermore, it harbors rich water, mineral, and oil and gas resources, making it a crucial reservoir of essential resources.Currently, Autonomous Underwater Vehicles (AUVs) and seabed observatories represent the primary methods for oceanic observation.Seabed observatories operate as a static observation system [1], utilizing watertight sea cables for power transmission and data exchange with onshore facilities or mother ships, enabling long-term real-time observation.However, their limited operational range and high geographical requirements are drawbacks.AUVs, on the other hand, are autonomous underwater robots equipped with their own energy and sensor systems, capable of independent navigation and task completion in seawater [2,3].
Due to constraints related to the AUV's internal space and battery technology, its current endurance is insufficient to support prolonged underwater operations, necessitating regular retrieval by mother ships and incurring significant costs.To maximize the advantages of both observation methods, current underwater observation systems typically combine AUVs and seabed observatories to form a three-dimensional seabed observation network.
In order to leverage the flexibility and extensive observation range of AUVs and the long-term stable observation capability of seabed observatories, researchers have proposed an underwater docking technology [4,5].This technology consists of several key components: AUVs autonomously returning to the underwater docking station after completing assigned tasks, the station providing underwater recharging using specific techniques, and data exchange between the AUVs and the station through a communication system.The resulting three-dimensional ocean observation system formed by the seabed observatory, the docking station, and AUVs fully exploits the strengths of both the seabed observatory and AUVs.The autonomous return of AUVs to the docking station during the docking process represents a challenging aspect of underwater docking technology and a crucial core technology.
Depending on the distance between the AUV and the docking station, the working stage of the AUV can be divided into the cruising stage and the docking stage.During the cruising stage, the AUV scans the target area based on predefined waypoints.Navigation is primarily performed using acoustics, Doppler Velocity Logs (DVLs), and inertial navigation.Acoustic sensors often rely on Ultra-Short Baseline (USBL) systems for navigation [6].However, these sensors typically have a slow update rate.The DVL serves as the speedometer for the AUV [7,8], while inertial navigation measures the AUV's acceleration and angular velocity [9,10].Inertial navigation is popular due to its independence from external environmental factors, but the low accuracy of inexpensive Inertial Measurement Units (IMUs) restricts their use to short distances.Both types of sensors require position derivation through integration, utilizing dead reckoning.As the distance increases, errors in dead reckoning accumulate.To address this issue, absolute positioning sensors are typically used periodically to update and correct the cumulative errors.The integration of these sensors is based on traditional Kalman filtering methods.In this study, we employ a GPS and DVL for particle-filtering fusion to update the positioning during the cruising phase.
During the docking stage, higher precision navigation methods are required to increase the success rate of docking.Acoustic guidance has a slow update rate and is susceptible to reflection interference from the docking station, making it unsuitable for closerange high-precision guidance.Additionally, electromagnetic guidance [11] and visual guidance [12][13][14] are utilized during the docking stage.Electromagnetic guidance has a high update rate, but due to rapid attenuation in underwater environments, its effective range is limited, and it is susceptible to interference from the magnetic field of the docking station, resulting in limited application in underwater docking.Visual guidance, on the other hand, offers a high update rate, real-time capabilities, and high accuracy, and is gradually becoming the primary choice for the docking stage.A visual guidance technique based on five lights has been proposed [15].When a single camera installed at the center of the AUV's bow captures all the lights on the docking station simultaneously, the visual guidance stage begins.However, due to limitations in the camera's field of view, when the AUV deviates significantly from the central axis or approaches the docking station closely, not all lights can be captured, leading to the initiation of posture control, relying on inertial motion for docking.A combination of monocular vision and binocular vision guidance has been proposed [16].This method symmetrically places four lights.Two cameras are installed at the front of the AUV, and a control algorithm is activated based on the number of guiding lights detected in the two images.This approach enhances the accuracy and reliability of the positioning results but requires higher processor performance and increases computational time.Another visual guidance method combining multiple lights and AR codes as beacons has been proposed [14].This method takes into account situations where the AUV is too close for all lights to be captured, using AR codes for positioning.A single-light monocular visual guidance technology has also been proposed [17], with a guiding light placed at the entrance of the docking station, and a visual guidance algorithm mounted on the AUV head that calculates the relative position of the AUV relative to the center of the station, using this angle as the input for the AUV control system, effectively avoiding the problem of losing multiple lights and minimizing anomalies.To mitigate issues such as bubbles on the lens or reflections from the docking station, corresponding solutions have been proposed.
The main contributions of this paper are outlined as follows: 1. To address irregular miscellaneous light interference in underwater visual guidance, a solution based on threshold segmentation and proportional circle screening is proposed to eliminate noise in the region.2. A particle-filtering fusion method based on the GPS and DVL is proposed for the positioning scheme during the cruising phase.In simulations, the accuracy is improved by over 56.0% compared to individual positioning systems.3. Experiments conducted in the Qingjiang River involving overall cruising and docking validate the effectiveness of the positioning method, with successful docking achieved four out of five times.
The remainder of this paper is organized as follows: in Section 2, we introduce the materials and methods.Section 3 discusses the results.Section 4 presents the discussion.

Materials and Methods
This section provides an overview of the positioning methods utilized in the AUV system.The AUV's tasks encompass both cruising and docking stages.During the cruising stage, we employ a particle-filtering-based positioning method.For the docking stage, we utilize a single-light monocular configuration scheme to determine the AUV's orientation relative to the docking station.

Monocular Single Lamp Tracking Algorithm
There are primarily two methods for camera pose estimation: monocular and binocular [18].Currently, the mainstream underwater vehicles have a cylindrical shape with limited space at the head, making it challenging to meet the baseline distance requirements for binocular pose estimation cameras.Therefore, in this section, we adopt an AUV docking guidance method based on monocular vision.The primary task of terminal visual guidance is to guide the AUV to dock with the base station, ensuring that the AUV continuously travels towards the base station during its return trip and meets the guidance requirements.The AUV used in this section has a cylindrical shape, and the docking base station has a wide trumpet-like mouth.Therefore, there are no special requirements for the AUV's posture during docking.Based on this, we present a visual guidance algorithm based on a single light and monocular vision, utilizing the relative orientation information between the AUV and the underwater docking base station to achieve visual guidance.
The guidance process, as shown in Figure 1, involves the underwater camera carried by the AUV capturing videos, which are then transformed into images at a specific frame rate.These images undergo feature extraction through image preprocessing.The process begins by converting the image to grayscale, followed by image filtering to eliminate noise caused by water flow or the movement of suspended particles.Subsequently, the image undergoes threshold segmentation, where it is transformed into a grayscale image, filtered, and then processed using a threshold segmentation algorithm to calculate the image's segmentation threshold, addressing regional noise.Lastly, the process involves extracting image contours and obtaining centroid positions.After converting the image into a binary image, it is essential to determine the coordinates of the image features on the image pixel plane, necessitating contour feature extraction to obtain the coordinates of the target features on the image plane.In order to facilitate subsequent azimuth angle calculation and more intuitive representation, the origin of the image pixel coordinate system is translated to the main point of the image plane to form the    pixel coordinate system, as shown in Figure 3.After the origin translation, the centroid coordinates of the guidance light can be expressed as follows: where L and W are the length and width of the pixel plane, in pixels, and  ,  is the gray value at the pixel point ,  .Suppose the horizontal field of view angle of the horizontal camera is 2 , the vertical field of view angle is 2 , α is the horizontal angle between the AUV heading angle and the centerline of the connecting base station, and β is the vertical angle between the AUV heading angle and the connecting base station centerline, then the following relation can be obtained from the similarity theorem: The orientation angle will not exceed the range of the camera's field of view angle, and we can obtain  ∈  ,  and  ∈  ,  .
The directional declination angle of AUV on the horizontal plane and vertical plane describes the relative orientation between AUV and the connecting base station.After obtaining α and β, α and β are input into the motion control system as the control quantity, and 0 is taken as the output expectation value of the control system.AUV guides it to approach the center line of the connecting base station by controlling the rudder plate and propeller.In the whole process, the absolute pose is not solved, but the relative orientation is solved to achieve guidance; it can be seen that this is a pure tracking guidance algorithm.

𝑐 , 𝑐
Guidance beacon leading to reflections.Although the brightness of underwater lights is greater than the reflection from the docking station, in the absence of underwater lights within the camera's field of view, the AUV may easily misinterpret parts of the docking station as light sources.In these circumstances, the AUV's determination of the relative orientation may experience some deviation.3. Surface reflections.When the base station is located close to the water surface, images of the underwater guiding lights captured by the camera may contain surface reflections, as illustrated in Table 1.This aspect can be addressed by removing the reflections caused by the upper layer of the water surface.Based on the previous section, it is evident that after image preprocessing and binarization, regional noise often consists of irregularly shaped spots, while the main target spots generated by underwater lights tend to have a more regular and well-defined shape compared to the regional noise.In response to these characteristics, this paper proposes a method for removing regional noise based on threshold segmentation and proportional circle screening.
The current common approach for extracting guiding light spots involves using Hough circle detection to screen circles.However, Hough circle detection requires the predefinition of multiple parameters [19], and due to the diversity of each spot at different distances, the same parameters may yield varying detection results for spots at different distances, leading to suboptimal performance.This paper introduces the concept of the circumscribed proportional circle, and experimental results have shown that this method effectively filters out regional spot noise.
Figure 4 illustrates the flow chart of the regional noise filtering algorithm proposed in this paper.Firstly, the camera captures the image, which then undergoes preprocessing such as grayscale conversion and image filtering.Subsequently, a binary image is obtained through threshold segmentation, followed by the extraction of the contours of all spots in the binary image.If the number of contours is 0, it indicates that the AUV has not captured any guiding lights, and a new image should be obtained.If the number of contours is not 0, the area  of each spot is calculated.If the spot area is less than the specified spot size threshold  , it is labeled as an invalid spot and removed.Otherwise, if  >  , all spots that meet the regional size criteria are retained.Following the aforementioned regional area filtering, the minimum circumscribed circle is drawn around all the retained spots, and the area  of each minimum circumscribed circle is calculated.After obtaining the area  of the minimum circumscribed circle, the actual spot and the proportion of size of the minimum circumscribed circle  are calculated as follows: where  ∈ 0,  1 . represents the number of contours after region area selection on the current frame image.
After obtaining  , a comparison is made between  and the predefined proportional circle threshold  .When   , it indicates that the spot size relative to its minimum circumscribed circle area is small, suggesting an irregular shape with a substantial amount of empty space, thus, leading to the removal of the spot as invalid.Conversely, when   , the spot is retained as a valid feature input to the guidance algorithm in the previous section, thereby determining the relative pose of the AUV.
Prior to the proportional circle screening, image binarization segmentation is required, which can be categorized into edge-based detection and threshold-based image segmentation methods based on different principles [20,21].The former method is relatively sensitive to noise and involves a large amount of computation, making it less suitable for real-time processing, especially given the high level of noise in underwater images.Therefore, this paper adopts a threshold-based image segmentation algorithm.
Threshold-based image segmentation methods can be further divided into adaptive local thresholding and global thresholding.The former is commonly used for images with strong brightness gradients, but due to the high level of noise in underwater scenarios, this paper opts for a global thresholding segmentation algorithm.Let  ,  represent the grayscale value of a pixel v on the original image, and let δ denote the global segmentation threshold during binarization.The global threshold δ is determined using the efficient OTSU algorithm.The grayscale value  ,  after threshold segmentation is calculated as follows: where ,  , and  are within the range of [0, 255].A grayscale value of 0 for  ,  corresponds to a black pixel, while a value of 255 corresponds to a white pixel.In order to extract image features more effectively, this paper sets the grayscale value of all pixels with a value less than δ to 0, and the grayscale value of all pixels with a value greater than δ to 255.

Confirmatory Experiment
To validate the effectiveness of the monocular visual guidance algorithm and the region noise filtering method based on threshold segmentation and proportional circle screening studied in this chapter, separate experiments were conducted to verify the accuracy of the monocular visual guidance algorithm and to test the region noise filtering.
The initial experiment involved the precision verification of the monocular visual guidance algorithm.The experiment used the UWC325 camera (Outland Technology Inc., Slidell, LA, USA) with 412,000 pixels, a resolution of 750 × 560, a fixed-focus lens with a As shown in Figure 5, the experimental setup included the distance ΔL between the guiding light and the camera, the horizontal offset ΔX, and the vertical offset ΔY.During the experiment, the vertical offset was initially kept constant while the camera was moved horizontally to calculate the camera's horizontal orientation angle relative to the guiding light using the guidance algorithm.Similarly, keeping the horizontal offset constant, the camera was moved vertically to calculate the vertical orientation angle.
The experimental results are illustrated in Figures 6 and 7.The overall distribution of ∆ and ∆ ranged from 0° to 5°.At a distance of 6 m, the deviations were mostly between 0° and 1°, while at 4 m, the deviations were mainly between 0° and 2°.As the cursor approached the camera, the range of angular deviation increased.This outcome was mainly attributed to the scattering nature of the guidance spot.When ΔL was small, the spot was larger, resulting in more conspicuous scattering in the image and larger calculation deviations in the centroid position.Conversely, when ΔL was large, the spot became more concentrated, leading to more accurate centroid position calculations.
In actual docking operations, AUV typically activates visual guidance at distances of 10 m or more, resulting in minimal fluctuations in the azimuth angle deviation.When the AUV is closer to the base station, the azimuth angle calculation at close range is already relatively large, and the fluctuations at this point have minimal impact on the success rate of docking.  .These two parameters directly determine the effectiveness of region noise removal.The global segmentation threshold δ is chosen using the same method as in reference [7].
Table 2 shows several typical proportion circles that enclose region spots generated by lens bubbles.The  values of the main guidance spots are generally above 0.9, while the  values of region spot noise generated by lens bubbles range from 0.35 to 0.75.Therefore, for this experiment, the proportional circle threshold  is set between 0.75 and 0.9, which effectively filters out all region spot noise caused by lens bubbles.Table 3 displays several typical proportion circles that enclose region spots generated by base station reflections.After binary processing, the shape of base station reflection spots becomes highly irregular.Using the method proposed in this paper, the proportional circle  for each spot is calculated, and  generally ranges from 0.1 to 0.6.By setting the proportional circle threshold  between 0.6 and 0.9, all region noise caused by base station reflections can be effectively filtered out.Table 3.When there is a docking station reflection in the image, the external proportional circle under image binarization.

Fusion Localization Algorithm Based on Particle Filter
This section investigates a fusion localization algorithm based on particle filtering which fully utilizes data from sensors such as the DVL, electronic compass, and GPS to provide positioning information for the cruising phase of the AUV.

Sensor Reading
The electronic compass obtains the current orientation by measuring the Earth's magnetic field, and the angles in the navigational coordinate system can be defined as follows: where  is roll angle,  is pitch angle, and  is heading angle.
DVL is an acoustic Doppler profiler that measures and records underwater velocity using the Doppler effect.It calculates the speed relative to the seafloor by measuring the Doppler frequency shift between the transmitted sound waves and the received seafloor reflection waves.The obtained velocities can be defined as follows, corresponding to the three directional velocities in the carrier coordinate system.
Our proposed algorithm requires a sensor that provides absolute positioning to correct the accumulated errors from dead reckoning.For an AUV, when the GPS antenna is exposed, absolute positioning can be provided by GPS.When the AUV is fully submerged, absolute positioning is provided by USBL.For the sake of experimental convenience, we used GPS as an example.The fusion positioning experiments were also conducted using GPS and DVL.GPS, as a global positioning system, provides the latitude and longitude of the AUV.Through empirical formulas, these coordinates can be converted into planar coordinates.
Based on the above introduction, there exists a distinction between the carrier coordinate system and the inertial coordinate system (used here as the navigation coordinate system) in the data collected by each instrument.Therefore, in the actual application of AUVs, it is necessary to unify these two coordinate systems.The carrier coordinate system is centered on the AUV, while the navigation coordinate system is constructed with the origin at the latitude and longitude, following the order of north, east, and down.In order to use particle filtering to filter the positioning information of the AUV, it is first necessary to convert the relevant information from the carrier coordinate system to the navigation coordinate system for uniformity. ,  , and  represent the rotation angles of the car- rier coordinate system relative to the navigation coordinate system, while p, q, and r represent the rotational angular velocities of the AUV itself in the carrier coordinate system.
The complete transformation matrix from the carrier coordinate system to the inertial coordinate system is given by the following equation.
where cos( ) c   and sin( ) s   .
According to the previous introduction, the conversion formula for transforming the velocity data collected in the carrier coordinate system by the DVL to the navigation coordinate system is as follows: where t R represents the rotation matrix derived from the real-time electronic compass angle information, while t V and t V denote the velocity of the AUV in the navigation frame and body frame at time t, respectively.Therefore, the change in coordinates over time t  can be expressed as follows: The DVL system obtains the AUV's global positioning through continuous integration, leading to the accumulation of certain errors.
Once the AUV is equipped with positioning capabilities, it requires a navigation algorithm to track the target point and complete autonomous cruising tasks.In this regard, the line-of-sight (LOS) method [22] is considered as a planar navigation algorithm.It calculates the desired heading angle based on the current position and the coordinates of the target point, and then controls the heading angle to achieve planar navigation.The formula for calculating the desired heading angle is presented below.represents the current coordinates of the AUV.

Data Fusion Based on Particle Filter
The DVL, in combination with the electronic compass angle, obtains positioning by integrating velocity, leading to the issue of cumulative errors in this positioning method.As the navigation time increases, the positioning error also increases.Typical GPS positioning suffers from insufficient update frequency and has an error margin of several meters.Therefore, a positioning method with sufficient update frequency and no accumulated errors is needed.In this context, the fusion of DVL and electronic compass positioning data with GPS positioning data using particle filtering is considered.
In addressing the AUV's positioning problem, the observable values are the sensor readings, while the estimated state represents the AUV's global positioning.If we define the sensor observation at time k as z k and the AUV position estimation at time k as k x , the transformation relationship can be expressed as follows: ( , ) where k f denotes the state transition function at time k, and k h represents the observa- tion transformation function at time k.Hence, the variation process of the particle filtering can be illustrated as shown in Figure 8. From the Bayesian perspective, given the observation data 1:k x obtained by the sen- sor, and assuming that the initial probability density function of the system state k z at time k is calculated recursively.This process can be divided into two parts: prediction and update, with the mathematical expressions as follows: 1: 1 1: 1: The ultimate goal is to determine the expectation of k z .For a continuous variable z , its mathematical expectation is as follows.However, due to the lack of constraints on the linear state space and the Gaussian distribution of noise in particle filtering, it is not possible to obtain an analytical solution for the mathematical expectation ( ) E z of the variable z .
Therefore, a numerical solution is obtained using the Monte Carlo method.The Monte Carlo method holds that by continuously random sampling the probability density of a random variable, the weighted sum of the samples can represent the variable's expectation.
Assuming that the variable z follows the probability density function ( ) p z , and  is a sample obtained based on ( ) p z through random sampling, the following can be derived.
Based on the Monte Carlo concept and the Law of Large Numbers, the mathematical expectation of the state k z can be represented as follows: ( | ) k k p z x cannot be obtained, a transformation of ( 22) yields the following equation, which is the importance sampling in particle filtering.
In order to calculate the weight i k w , the expression of i k w is simplified, and two as- sumptions are used during the simplification process.One is the assumption of observation independence, that is, the observation at time k is only related to the state at time k, expressed as ; the other is the assumption of Markov process, that is, the state at time k is only related to the state at time k − 1, expressed as . The process is as follows: 1: 1: By substituting the above two equations into the expression of i k w , the following can be obtained.
Observing that Since the q distribution is a self-selected distribution, q distribution can be chosen to satisfy , thus, obtaining the recursive expression of i k w as fol- lows: In addition, after importance sampling, the weights are normalized as follows: Therefore, the simplified weight expression can be obtained as follows: After obtaining the weights of the particles, the estimation of the state is calculated using the Law of Large Numbers, thereby completing the update of the state estimation, with the expression as follows: According to the above formula reasoning, with the continuous update of the particles, the weights of the particles with larger weights will continue to increase, while the weights of the particles with smaller weights will continue to decrease.This will lead to the problem of weight degeneracy, causing the particles to not effectively reflect the overall distribution of the sampling points, hence the introduction of resampling.Setting the particle degeneracy index eff N is as follows: When its value is less than the set threshold th N , resampling is conducted, discard- ing low-weight particles and replicating high-weight particles, thereby mitigating the problem of particle degeneracy.Thus, the entire process of particle filtering is completed.

Confirmatory Experiment
Figure 9 illustrates the specific fusion framework, which uses GPS positioning data as the observation value, DVL output velocity values, and electronic compass output heading angles as the state transition values to construct the particle-filtering framework.The corresponding expressions are then deduced from a theoretical perspective.Using the data from DVL and the electronic compass as input k v , it is defined as follows: Taking the AUV's three-dimensional position coordinates as the state variable, it is defined as follows: Based on the principles of kinematics and discretizing the expressions, the state transition equation for the AUV can be derived as shown below.Here, k v includes sensor noise and 1 k R  represents the rotation matrix at time k − 1.
  Simultaneously, the observation function is expressed as follows: where k x represents the true value at time k, k n represents the noise at time k, and  k x represents the noisy observed value at time k.
The implementation process of the fusion positioning algorithm is then introduced as follows: 1. Determine the number of particles: N .
2. Particle initialization: all particles are distributed near the origin in a standard distribution manner.3. Weight update: utilize the observed coordinates input by GPS to calculate the new weights of the particles using a two-dimensional Gaussian distribution for calculation.The specific calculation formula is as follows: This completes the theoretical reasoning of the fusion positioning algorithm.
To validate the effectiveness of this method, the navigation positioning of the AUV was simulated using the ROS (Robot Operating System) [23] and Gazebo [24] simulation platform and the corresponding DVL velocity data, electronic compass angle data, and GPS positioning information were recorded.In the simulation, appropriate noise was added to each sensor, and true value data were retained for comparison.The simulator used in the simulation is the AUV Simulator [25] developed as part of the European ECSEL project, which can simulate multiple underwater robots and intervention tasks using robot manipulators.It can also simulate underwater hydrostatic and hydrodynamic effects, thrusters, sensors, external disturbances, etc.This study combined AUV parameters and experimental requirements to conduct simulation experiments in the simulator.In the simulation environment, based on the actual sensor data, random errors ranging from −0.5 to 0.5 m/s were assigned to the DVL velocity data in each direction, random errors ranging from −0.2 to 0.2 radians were assigned to the angles of the electronic compass, and random errors ranging from −4.2 to 4.2 m were assigned to the two-dimensional GPS positioning.In the simulation environment, a series of waypoints were set so that the AUV would follow a certain trajectory.Starting from the origin, the designated points were Under the condition that all the aforementioned variables contain noise similar to real-world situations, the AUV's positioning state values were obtained through particle filtering.Figure 10 presents a comparison of pure DVL velocity integration, GPS positioning state values, AUV filtered state values, and the true AUV positioning recorded in the simulation environment.Figure 11 shows the positioning error for various methods.The qualitative comparison of the actual positioning results and the ground truth, as well as the error plots for the three positioning methods, reveals that the fusion positioning algorithm effectively reduces the positioning errors.To quantitatively demonstrate the effectiveness of the fusion positioning algorithm, the average errors of the three positioning methods were calculated, and the results are presented in Table 4 below.Calculation of the average errors shows that despite the presence of significant errors in GPS, electronic compass, and DVL velocity measurements, the fusion positioning algorithm still achieves relatively accurate positioning, with an average error of only 1.404 m.This represents a 56.0%decrease compared to the unfiltered GPS positioning with an average error of 3.190 m, and a 63.6% decrease compared to the dead reckoning positioning with an average error of 3.861 m.Additionally, it is important to note that the error in DVL measurements accumulates over time.
Therefore, the simulation results demonstrate that the fusion positioning algorithm significantly improves accuracy compared to dead reckoning or standalone GPS positioning methods.

Results
To validate the effectiveness of the research approach in this chapter, experiments on AUV visual guidance and cruise positioning were conducted in the Qingjiang region of Hubei, China.The underwater vehicle used in the experiment is a long cylindrical AUV, as shown in Figure 12.The underwater camera is positioned in the head compartment to enable visual guidance.The second section from the head is the docking compartment, responsible for wireless charging and signal transmission between the base station and the AUV.The third section houses the power and control unit, responsible for supplying power to various AUV functional modules and monitoring the energy status.This section also incorporates the main controller for the vehicle, which handles motion control and visual algorithm computation.The fourth section is the acoustic compartment, responsible for remote attitude determination and acoustic signal processing.Further back is the tail section, containing rudders and motors, responsible for the underwater vehicle's maneuvering function.Additionally, the AUV is equipped with side-scan sonar for underwater terrain scanning and target detection tasks.The docking station, as shown in Figure 13, has an underwater guiding light arranged above it.In the experiment, the docking station was placed at a designated GPS coordinate origin point, at a depth of 0.6 m.The AUV was released from the surface platform and underwent cruising and visual guidance stages before docking.During the cruising stage, a particle-filter-based method was utilized.Visual guidance in the horizontal direction and depth measurement using the AUV's depth gauge were employed for the docking stage.As depicted in Figure 14, the DVL, functioning as an acoustic device, encounters situations where it cannot resolve velocity when underwater terrain is complex and no echo signals are received.Under such abnormal conditions, the DVL outputs a value of 0. Therefore, during usage, the velocity data from the DVL need to undergo outlier detection, replacement, and filtering.The most recent valid value before the occurrence of the outlier is used as a substitute.Examination of the preprocessed yaw data reveals occasional spikes and minor fluctuations in the heading angle data from the electronic compass, necessitating similar processing.The postprocessed velocity and heading angle data are illustrated in Figure 14, denoted as postprocessed vx, vy, and yaw, representing the sensor-measured velocities along the x and y axes, as well as the heading angle, respectively.A comparison between the pre-and postprocessed data indicates that the processing effectively eliminates outliers to a significant extent, resulting in smoother data, aligning with the overall trends.Subsequently, the particle fusion positioning algorithm is applied to the positioning data, and a comparison is made between GPS positioning data, DVLintegrated positioning data, and fused positioning data.The comparative positioning data results are depicted in Figure 15.In Figure 15, the red stars represent the target waypoints set during the actual operational process.Observations reveal that the AUV's navigation is substantially based on the designated target waypoints, demonstrating autonomous exploration capabilities.Furthermore, the fused positioning algorithm exhibits reduced cumulative errors compared to DVL-integrated positioning, effectively tracking GPS positioning data while offering smoother results without significant jumps, thus, ensuring accurate positioning data overall.Consequently, the effectiveness of the fused positioning algorithm is validated, presenting the potential to provide high-precision positioning data for AUV cruising.

Docking Experiment
During the docking phase, our objective is not to achieve absolute positioning, but rather to provide guidance using relative orientation.If absolute positioning is required, multiple lights need to be installed at the docking station.In fact, the relative orientation provided by a single light can enable successful docking of the AUV.Five visual guidance tasks were conducted, with four successful dockings.Throughout the docking process, the AUV only utilized the horizontal deviation angle from the visual guidance algorithm, while depth data measured by the depth sensor were used to maintain a consistent depth with the center of the docking station.
The effective range of the navigation lights varies with changes in ambient light and water quality.In dim conditions, the camera's recognizable distance reaches 16-20 m, but diminishes to 5-12 m in brighter ambient light.The horizontal field of view of the camera used in the experiment is 110°, while the vertical field of view is 70°.When the AUV is more than 10 m away from the base station, the lateral correction distance for optical guidance exceeds 5 m.
Figure 16 illustrates the temporal variation in the visual guidance heading angle during typical end-point visual docking tasks in the experiment.Tasks one, two, three, and four all achieved successful docking.Throughout successful docking processes, the resolved heading angle from visual guidance continually adjusted the AUV's heading.As the AUV approached the docking station, the polarity of the heading angle continuously changed, indicating that the AUV control system constantly adjusted its own posture under the guidance of the resolved angle from visual guidance to achieve docking.As the AUV continued to approach the docking station, the pixel deviation obtained in the horizontal direction gradually increased, as shown by the increasing trend in the angle curve in the graph, which aligns with the actual situation.However, task five did not result in successful docking, as the AUV grazed past the right side of the base station due to reverse flow in the Qing River during the task.At the moment of switching from acoustic to visual guidance, the AUV's heading angle was approximately 15.6°, whereas during successful docking tasks, the heading angle at the time of the switch was generally within 10°.This indicates that during task four, at the beginning of visual guidance, the AUV deviated significantly from the axis of the base station, and the AUV motion control system did not have sufficient time to adjust, resulting in the missed docking and failure.The variation in heading angle for task five is depicted in Figure 17.

Figure 1 .
Figure 1.Flow chart of monocular single light guidance algorithm.Based on the camera imaging model, a monocular vision guidance model with a single light source is established, as depicted in Figure 2. In the diagram, the camera located at the top captures images of a blue spherical beacon, which serves as the underwater guiding light and is positioned in front of the camera.The image pixel plane is denoted as    , with the coordinate origin  located at the top left corner of the image.The camera's focal length is represented by f, and the spatial coordinates of the beacon  ,  ,  project onto the image plane as imaging coordinates  ,  .

Figure 3 .
Figure 3. Origin translation of the pixel coordinate system.

Figure 4 .
Figure 4. Region noise removal algorithm based on threshold segmentation and proportional circle screening.
of view, and a power consumption of 12 V/0.11 A. The camera outputted PALformat AV analog video data, which needed to be converted into a USB-readable format through a data conversion board.The data conversion board used was the AV to USB converter (Jinyan Electronics Co., Ltd., Shenzhen, China), with a frame rate of 30FPS, MJPEG output format, and power consumption of <0.7 W. The guiding light used was the SXDZ-056K-03 underwater illumination light, (WEIEN Electronic Technology Co., Ltd., Hangzhou, China) with an underwater light field angle of 90° × 90° and powered by 24 V at 50 W.

Figure 5 .
Figure 5. Confirmatory experiment.The experiments were repeated at distances ΔL of 2 m, 4 m, and 6 m from the camera.Due to the limited field of view of the camera, horizontal and vertical displacements were restricted to a certain range, with ΔX and ΔY ∈ [0, 2000] mm.To verify the accuracy of the guidance algorithm, angular deviations ∆ and ∆ were introduced, representing the differences between the experimental calculated values and the theoretical true values for horizontal and vertical displacements, as shown below.∆   ∆   (6)

Figure 7 .
Figure 7.The angular deviation when ΔY changes.In this study, actual docking data images were used to conduct experiments on region noise removal.The effectiveness of threshold segmentation and proportional circle filtering depends on the selection of global segmentation threshold δ and circle filtering proportion  .These two parameters directly determine the effectiveness of region noise removal.The global segmentation threshold δ is chosen using the same method as in reference[7].Table2shows several typical proportion circles that enclose region spots generated by lens bubbles.The  values of the main guidance spots are generally above 0.9, while the  values of region spot noise generated by lens bubbles range from 0.35 to 0.75.Therefore, for this experiment, the proportional circle threshold  is set between 0.75 and 0.9, which effectively filters out all region spot noise caused by lens bubbles.

Figure 8 .
Figure 8. Flow chart of particle-filter changes.

20 )
In particle filtering, N represents the number of sampled particles, k z represents the system state at time k, and i k z represents the sample generated by fied, samples can be relatively easily collected from 1:

Figure 10 .
Figure 10.GPS positioning data, pure DVL integration data, fusion positioning data, and positioning truth value simulation comparison.

Figure 11 .
Figure 11.Error comparison diagram of three positioning methods.

Figure 12 .
Figure 12.The underwater autonomous vehicle used.

Figure 13 .
Figure 13.Layout of the docking station.

Figure 14 .
Figure 14.Comparison before and after treatment with vx, vy, and yaw.

Figure 15 .
Figure 15.Comparison of three methods.

Figure 16 .
Figure 16.Diagram of successful docking and change in orientation angle.

Table 1 .
Typical area noise types of connection process.
2.1.2.Regional Noise Removal Method Based on Threshold Segmentation and Proportional Circle Screening

Table 2 .
When there is a lens bubble in the image, the external proportional circle under image binarization.

Table 4 .
The average error of the three positioning methods.