UUV seabed three-dimensional simulation and obstacle avoidance method considering ocean current influence

By establishing a six-degree of freedom dynamic model and a fuzzy PID controller of UUV, combined with the improved three-dimensional A* obstacle avoidance algorithm, the problems of autonomous navigation and obstacle avoidance of UUV under the influence of sea currents in complex three-dimensional underwater environments are solved, and more efficient and flexible obstacle avoidance effects are achieved.

CN120335481APending Publication Date: 2025-07-18JIANGSU UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510424284.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the complex three-dimensional underwater environment, the autonomous navigation and obstacle avoidance systems of UUVs have failed to effectively cope with the impact of sea currents, especially in terms of obstacles and posture adjustments in depth dimensions.

Method used

Establish a six-degree-of-freedom dynamic model of UUV and an anti-current interference model of the fuzzy PID controller. Combined with the improved three-dimensional A* obstacle avoidance algorithm, it realizes virtual simulation and obstacle avoidance of UUV through sensor input and obstacle detection, path planning and A* search, multi-direction obstacle avoidance and path smoothing, and joint adjustment of depth and attitude.

Benefits of technology

It improves the efficiency and safety of UUVs in complex subsea environments, ensures navigation stability and accuracy, and shows more efficient and flexible obstacle avoidance capabilities in depth-direction obstacles and complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335481A_ABST
    Figure CN120335481A_ABST
Patent Text Reader

Abstract

The invention discloses a UUV seabed three-dimensional simulation and obstacle avoidance method considering ocean current influence, and the method comprises the following steps: building a dynamic model of a UUV, including a six-degree-of-freedom model, a stress analysis model of the UUV, and an ocean current interference resistance model of a fuzzy PID controller; establishing an ocean current model including dynamic ocean current force, dynamic changes of ocean current speed, fluid force and drag force; the improved three-dimensional A * obstacle avoidance algorithm comprises sensor input and obstacle detection, path planning and A * search, multi-direction obstacle avoidance and path smoothing, and depth and attitude combined adjustment; carrying out three-dimensional modeling based on UE5, wherein the three-dimensional modeling comprises a UUV static grid body and a control parameter, an ocean current static grid body and a control parameter, and scene modeling; three-dimensional seabed environment virtual simulation and obstacle avoidance experiment of the UUV under the ocean current influence based on the UE5; compared with a traditional two-dimensional obstacle avoidance algorithm, the method is more efficient and flexible.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of systems engineering, and particularly to a method for three-dimensional simulation and obstacle avoidance of an unmanned underwater vehicle (UUV) considering the influence of ocean currents on the seabed. Background Art

[0002] In recent years, unmanned underwater vehicles (UUVs) have received extensive attention due to their importance in deep-sea exploration, environmental monitoring, and military applications. As an important factor in the underwater environment, ocean currents can significantly affect the navigation path of UUVs. In recent years, many studies have proposed ocean current models and dynamic analyses of the interaction between UUVs and ocean currents, aiming to cope with the interference of ocean currents by optimizing control algorithms or increasing real-time feedback from sensors. The intensity and direction of ocean current forces vary with factors such as temperature, salinity, and depth, posing higher requirements for the autonomous navigation and obstacle avoidance systems of UUVs. Therefore, how to achieve efficient and stable autonomous navigation and obstacle avoidance in a complex three-dimensional underwater environment has become a technical problem to be solved urgently. The ocean environment is a highly complex and dynamic three-dimensional space with static and dynamic obstacles. Most traditional underwater navigation and obstacle avoidance technologies focus on the two-dimensional plane, ignoring the influence of the depth dimension (i.e., the depth dimension) in the underwater environment on navigation, which is very disadvantageous for UUVs performing tasks especially in coastal and shallow sea areas. Summary of the Invention

[0003] Object of the Invention: The object of the present invention is to provide a method for three-dimensional simulation and obstacle avoidance of an unmanned underwater vehicle (UUV) considering the influence of ocean currents, which adjusts its own attitude through a fuzzy control algorithm; and improves the efficiency and safety of the UUV passing through a complex seabed environment through an improved three-dimensional obstacle avoidance algorithm.

[0004] Technical Solution: A method for three-dimensional simulation and obstacle avoidance of an unmanned underwater vehicle (UUV) considering the influence of ocean currents according to the present invention includes the following steps:

[0005] S1: Establish a dynamic model of the UUV, including a six-degree-of-freedom model, a force analysis of the UUV, and an anti-ocean current interference model of a fuzzy PID controller;

[0006] S2: Establish an ocean current model, including dynamic ocean current forces, dynamic changes in ocean current velocity, and hydrodynamic forces and drag forces;

[0007] S3: Propose an improved three-dimensional A* obstacle avoidance algorithm, including sensor input and obstacle detection, path planning and A* search, multi-directional obstacle avoidance and path smoothing, and joint adjustment of depth and attitude;

[0008] S4: Perform three-dimensional modeling based on UE5, including UUV static meshes and control parameters, ocean current static meshes and control parameters, and scene modeling;

[0009] S5: 3D virtual simulation and obstacle avoidance experiment of UUV under the influence of ocean current based on UE5 to verify the influence of ocean current on UUV, the effectiveness of fuzzy PID control algorithm for attitude adjustment, the superiority of 3D obstacle avoidance algorithm over 2D obstacle avoidance algorithm and its compatibility.

[0010] Further, the six-degree-of-freedom model in step S1 includes: translational degrees of freedom: forward / backward along the X-axis, left / right movement along the Y-axis, up / down movement along the Z-axis; rotational degrees of freedom: yaw around the Z-axis, pitch around the Y-axis, roll around the X-axis.

[0011] Further, the force analysis in step S1 includes the calculation of the following forces:

[0012] Thrust: The driving force generated by the UUV thruster:

[0013]

[0014] Drag: The resistance generated during underwater movement, usually proportional to the square of the speed:

[0015]

[0016] Buoyancy: The force caused by the buoyancy of water, related to the volume of the UUV and the density of water.

[0017] Fb uoyancy =ρ·V displaced ·g

[0018] Gravity: The influence of the earth's gravity on the UUV, related to the mass of the UUV and the acceleration due to gravity.

[0019] External force: Includes forces generated by external factors such as ocean current and turbulence, and the formula is as follows:

[0020] F external =F current =ρ water ·SA UUV ·(v current -v UUV ) 2

[0021] The acceleration of the unmanned underwater vehicle is calculated by the following formula:

[0022]

[0023] Where, is the sum of all forces, including thrust, drag, buoyancy, gravity and external force.

[0024]

[0025] Furthermore, the fuzzy PID controller in step S1 dynamically adjusts the parameters through the following formula:

[0026]

[0027] The error membership functions include: Negative Big (NB), Negative Small (NS), Zero (ZE), Positive Small (PS), Positive Big (PB), and their definitions are as follows:

[0028] Negative Big: It means that the attitude error is large and negative, and the system needs to make a large - scale correction to resist the influence of the ocean current.

[0029]

[0030] Negative Small: It means that the attitude error is small and negative, and the system needs a small - scale correction. Zero (ZE): It means that the error is zero, and the system is already close to the target attitude, and no further adjustment is required at this time.

[0031] μ NS (e(t)) = max(0, 1 - |e(t)|)

[0032] Zero: It means that the error is zero, and the system is already close to the target attitude, and no further adjustment is required at this time.

[0033] μ ZE (e(t)) = max(0, 1 - |e(t)|)

[0034] Positive Small: It means that the attitude error is small and positive, and the system needs a small - scale correction.

[0035]

[0036] Positive Big: It means that the attitude error is large and positive, and the system needs to make a large - scale correction.

[0037]

[0038] The error change rate membership functions include: Negative Big, Negative Small, Zero, Positive Small, Positive Big, and the formulas are as follows:

[0039] Negative Big: It means that the error change is fast and negative, and the system needs to quickly adjust the attitude to avoid deviation from the target.

[0040]

[0041] Negative Small: It means that the error change is small and negative, and the system needs a moderate adjustment.

[0042] μ NS (e(t)) = max(0, 1 - |e(t)|)

[0043] Zero: It indicates that the error change is close to zero, the system has tended to be stable, and no further adjustment is required.

[0044] μ ZE (e(t)) = max(0, 1 - |e(t)|)

[0045] Positive small: It indicates that the error change is small and positive, and the system requires moderate adjustment.

[0046]

[0047] Positive large: It indicates that the error change is fast and positive, and the system needs to quickly adjust its attitude to avoid further deviation.

[0048]

[0049] The fuzzy rule base contains at least 8 rules and is dynamically adjusted according to the combination of the error and the error change rate.

[0050] Furthermore, the dynamic ocean current force calculation formula in step S2 is:

[0051]

[0052] The dynamic change model of the ocean current speed is:

[0053]

[0054] Furthermore, the three-dimensional A* obstacle avoidance algorithm in step S3 includes: Sensor input and obstacle detection: Identifying obstacles in the three-dimensional space through ray detection; Path planning and A* search: Calculating the heuristic cost in the three-dimensional grid to generate the optimal path; Multi-directional obstacle avoidance strategy: When an obstacle is detected, generating multiple candidate paths within the range of ±45 degrees and selecting the optimal path through cost evaluation; Depth and attitude joint adjustment: Combining the fuzzy PID controller to adjust the depth Z-axis of the UUV in real time; Attitude pitch angle and roll angle to ensure a smooth path; Among them, calculating the heuristic cost includes the target distance and the obstacle density.

[0055] Furthermore, in step S4, the UE5 modeling includes: UUV blueprint class: Defining buoyancy, drag coefficient, thrust, and target depth parameters and exposing them to the UE editor for visual adjustment; Ocean current blueprint class: Defining ocean current direction, intensity, frequency, and phase parameters and applying the dynamic ocean current force through the box collision component; Scene modeling: Constructing a three-dimensional terrain containing underwater mountains and canyons, setting up a transparent water body and a visual ocean current area.

[0056] Furthermore, the control parameters of the UUV blueprint class also include fuzzy PID parameters: The target point coordinates are used for navigation path planning.

[0057] Furthermore, the parameters of the ocean current blueprint class also include: basic flow velocity and fluid density; the action area of the dynamic ocean current force is defined by the size and position of the box collision component.

[0058] A UUV three-dimensional underwater simulation and obstacle avoidance system considering ocean current effects according to the present invention includes:

[0059] A dynamics modeling module: used to construct a six-degree-of-freedom model of the UUV and calculate the forces acting on it;

[0060] An ocean current simulation module: used to generate a periodically changing dynamic ocean current force;

[0061] A three-dimensional path planning module: used to execute an improved A* algorithm and output a multi-directional obstacle avoidance path;

[0062] A UE5 virtual environment: used to integrate the UUV and the ocean current model, supporting real-time parameter adjustment and scene visualization;

[0063] A simulation verification module: used to compare and analyze the UUV motion trajectory, control algorithm performance, and obstacle avoidance success rate under ocean current interference.

[0064] Beneficial effects: Compared with the prior art, the present invention has the following remarkable advantages: By combining the three-dimensional A* algorithm, the UUV can effectively cope with complex underwater environments and avoid multi-dimensional obstacles, not only improving the accuracy of obstacle avoidance but also ensuring the stability and safety of navigation. This three-dimensional obstacle avoidance design has significant advantages, especially in terms of obstacles in the depth direction, complex environments, and attitude adjustment, being more efficient and flexible than traditional two-dimensional obstacle avoidance algorithms. BRIEF DESCRIPTION OF THE DRAWINGS

[0065] Figure 1 It is a schematic diagram of the obstacle avoidance algorithm process of the present invention;

[0066] Figure 2 It is a static mesh model diagram of the UUV of the present invention;

[0067] Figure 3 It is an ocean current model diagram of the present invention;

[0068] Figure 4 It is a three-dimensional obstacle avoidance scene diagram of the present invention;

[0069] Figure 5 It is a comparison diagram of whether the UUV of the present invention passes through the ocean current track;

[0070] Figure 6 It is a schematic diagram of the track of the UUV of the present invention driving towards the target point after adjusting the attitude;

[0071] Figure 7 It is a comparison diagram of the two-dimensional and three-dimensional obstacle avoidance tracks of the present invention;

[0072] Figure 8 It is a scenario diagram for verifying that the 3D obstacle avoidance algorithm of the present invention is compatible with the 2D obstacle avoidance algorithm;

[0073] Figure 9 It is a track comparison diagram of 3D obstacle avoidance and 2D obstacle avoidance of the present invention;

[0074] Figure 10 It is a track comparison diagram of 2D obstacle avoidance and 3D obstacle avoidance of the present invention;

[0075] Figure 11 It is a scenario diagram for verifying that the 3D obstacle avoidance algorithm of the present invention is compatible with the 2D obstacle avoidance algorithm;

[0076] Figure 12 It is a track comparison diagram of the present invention compatible with 3D obstacle avoidance and 2D obstacle avoidance. Detailed implementation manners

[0077] The technical solution of the present invention will be further described below with reference to the accompanying drawings.

[0078] As Figures 1-12 shown, an embodiment of the present invention provides a method for 3D simulation and obstacle avoidance of a UUV considering the influence of ocean currents, including the following steps:

[0079] (1) A dynamic model of the UUV is established, including a six-degree-of-freedom model, force analysis of the UUV, and an anti-ocean current interference model of a fuzzy PID controller;

[0080] (2) An ocean current model is established, including dynamic ocean current forces, dynamic changes in ocean current velocity, and hydrodynamic forces and drag forces;

[0081] (3) An improved 3D A* obstacle avoidance algorithm is proposed, including sensor input and obstacle detection, path planning and A* search, multi-directional obstacle avoidance and path smoothing, and joint adjustment of depth and attitude;

[0082] (4) 3D modeling is carried out based on UE5 for subsequent simulation verification, including UUV static meshes and control parameters, ocean current static meshes and control parameters, and scene modeling;

[0083] (5) Simulation verification is carried out, including virtual simulation and obstacle avoidance experiments of the 3D seabed environment of the UUV under the influence of ocean currents based on UE5, verifying the influence of ocean currents on the UUV, verifying the effectiveness of the fuzzy PID control algorithm for UUV attitude adjustment, verifying that the 3D obstacle avoidance algorithm is superior to the 2D obstacle avoidance algorithm, and verifying that the 3D obstacle avoidance algorithm is compatible with the 2D obstacle avoidance algorithm.

[0084] Among them, the six-degree-of-freedom model of the UUV. The UUV model includes three translational degrees of freedom and three rotational degrees of freedom. The translational degrees of freedom include forward / backward (along the X-axis), left / right movement (along the Y-axis), and up / down movement (along the Z-axis). The rotational degrees of freedom include yaw (about the Z-axis), pitch (about the Y-axis), and roll (about the X-axis).

[0085] Force analysis of the UUV: When modeling the UUV, force analysis is an important part to ensure the accuracy of the model and achieve dynamic behavior. The movement of the unmanned underwater vehicle is affected by various forces, including buoyancy, gravity, drag, propulsion force, and forces caused by ocean currents, etc. The following is an analysis of these main forces:

[0086] Thrust: The driving force generated by the UUV thruster:

[0087]

[0088] Drag: The resistance generated during movement in water, usually proportional to the square of the speed:

[0089]

[0090] Buoyancy: The force caused by the buoyancy of water, related to the volume of the UUV and the density of water.

[0091] F b uoyancy = ρ·V displaced ·g

[0092] Gravity: The influence of the earth's gravitational force on the UUV, related to the mass of the UUV and the acceleration due to gravity.

[0093] External Forces: External forces include forces generated by external factors such as ocean currents and turbulence. In this article, an external force is applied to the unmanned underwater vehicle according to the changes in the external environment. For example, when simulating ocean currents, a thrust of the water flow is applied to the unmanned underwater vehicle according to the direction and intensity of the ocean current, SA UUV is the cross-sectional area of the UUV's force-receiving surface, and the formula is as follows:

[0094] F external = F current = ρ water ·SA UUV ·(v current - v UUV ) 2

[0095] According to Newton's second law, the acceleration of an object is the sum of the forces divided by the mass of the object. Therefore, the acceleration of the unmanned underwater vehicle can be calculated by the following formula:

[0096]

[0097] Among them, is the sum of all forces, including thrust, drag, buoyancy, gravity, and external forces.

[0098]

[0099] Anti-ocean current interference model of fuzzy PID controller: To improve the control accuracy and robustness of UUV in different environments, fuzzy PID control dynamically adjusts the three parameters of the PID controller through a fuzzy inference mechanism, enabling UUV to better cope with complex water currents, obstacles, and other unpredictable environmental factors. The output of fuzzy PID control (i.e., depth adjustment force) is calculated by the following formula:

[0100]

[0101] By combining the motion equation of UUV and the ocean current model, a fuzzy PID controller is designed. In the simulation environment, the motion state of UUV and the influence of ocean currents will be used as input signals. The fuzzy PID controller calculates the PID gains in real time according to the heading error and the error change rate through the fuzzy rule base.

[0102] Among them, the fuzzy sets include: Negative Big (NB), Negative Small (NS), Zero (ZE), Positive Small (PS), Positive Big (PB).

[0103] The membership function includes: Negative Big (NB): indicating that the attitude error is large and negative, and the system needs to make a large correction to resist the influence of ocean currents.

[0104]

[0105] Negative Small (NS): indicating that the attitude error is small and negative, and the system needs a small correction. Zero (ZE): indicating that the error is zero, and the system is already close to the target attitude, and no further adjustment is required at this time.

[0106] μ NS (e(t)) = max(0, 1 - |e(t)|)

[0107] Zero (ZE): indicating that the error is zero, and the system is already close to the target attitude, and no further adjustment is required at this time.

[0108] μ ZE (e(t)) = max(0, 1 - |e(t)|)

[0109] Positive Small (PS): indicating that the attitude error is small and positive, and the system needs a small correction.

[0110]

[0111] Positive Big (PB): It indicates that the attitude error is large and positive, and the system needs to make a large - scale correction.

[0112]

[0113] Membership function of the error change rate Δe(t): The error change rate reflects the speed and trend of the attitude error change. Under the influence of ocean currents, when the error changes rapidly, the attitude needs to be adjusted quickly. The following is the design of the membership function of the error change rate:

[0114] Negative Big (NB): It indicates that the error change is fast and negative, and the system needs to quickly adjust the attitude to avoid deviation from the target.

[0115]

[0116] Negative Small (NS): It indicates that the error change is small and negative, and the system needs to make a moderate adjustment.

[0117] μ NS (e(t)) = max(0, 1 - |e(t)|)

[0118] Zero (ZE): It indicates that the error change is close to zero, and the system has tended to be stable and does not require further adjustment.

[0119] μ ZE (e(t)) = max(0, 1 - |e(t)|)

[0120] Positive Small (PS): It indicates that the error change is small and positive, and the system needs to make a moderate adjustment.

[0121]

[0122] Positive Big (PB): It indicates that the error change is fast and positive, and the system needs to quickly adjust the attitude to avoid further deviation.

[0123]

[0124] The fuzzy rule base includes:

[0125] Rule 1: The attitude error is "Negative Big" (NB) and the error change rate is "Positive Small" (PS). When the attitude error of the UUV is large and negative, and the error change rate is small and positive, the system needs to make a large - scale correction to quickly restore the target attitude.

[0126] Rule 2: The attitude error is "Zero" (ZE) and the error change rate is "Zero" (ZE). When the attitude error of the UUV is close to zero and the error change is close to zero, the system is stable and does not require any adjustment.

[0127] Rule 3: The attitude error is "Positive Big" (PB) and the error change rate is "Negative Big" (NB). When the attitude error of the UUV is large and positive, and the error changes rapidly and negatively, the system needs to correct it quickly to prevent the attitude from deviating further from the target.

[0128] Rule 4: The attitude error is "Negative Small" (NS) and the error change rate is "Negative Small" (NS). When the attitude error of the UUV is small and negative, and the error changes slightly and negatively, the system needs to make a moderate adjustment for a small correction.

[0129] Rule 5: The attitude error is "Positive Small" (PS) and the error change rate is "Positive Small" (PS). When the attitude error of the UUV is small and positive, and the error changes slightly and positively, the system needs to make a moderate adjustment to ensure that the attitude returns to the target value.

[0130] Rule 6: The attitude error is "Negative Big" (NB) and the error change rate is "Zero" (ZE). When the attitude error is large and negative, but the error change rate is zero, the system needs to quickly correct the large error to prevent it from persisting.

[0131] Rule 7: The attitude error is "Positive Big" (PB) and the error change rate is "Zero" (ZE). When the attitude error is large and positive, and the error change rate is zero, the system needs to make a relatively large correction to restore the target attitude.

[0132] Rule 8: The attitude error is "Zero" (ZE) and the error change rate is "Positive Small" (PS). When the attitude error is zero and the error change rate is positive, the system needs to make a moderate adjustment to the attitude to ensure that the UUV remains stable and avoid unnecessary attitude fluctuations.

[0133] Specific implementation of the UUV model: In the Unreal Engine UE5, a UUV class named AUUV is created based on the Actor class to simulate the dynamic behavior and control of the Unmanned Underwater Vehicle (UUV). This class inherits from Actor and uses the physical engine of the Unreal Engine for motion simulation. Through per-frame updates, the AUUV class processes the dynamics of the UUV, PID depth control, propulsion force, buoyancy, drag, and the effects of external forces (such as ocean currents, etc.). The following parameters are defined for the UUV and exposed to the Unreal Editor, allowing the UUV control parameters to be adjusted directly in the Unreal Engine at any time without having to compile the code multiple times.

[0134] BuoyancyForce: The magnitude of the buoyancy force, which determines the ability of the UUV to float up and down in water. By balancing the buoyancy and mass, the floating behavior of the UUV in water is simulated.

[0135] Drag Coefficient: The drag coefficient determines the hydrodynamic drag force that the UUV experiences while moving in water. The drag force is proportional to the square of the UUV's velocity and affects its acceleration and deceleration performance.

[0136] Thrust Force: The thrust force determines the magnitude of the forward thrust of the UUV in water and is usually generated by the UUV's thrusters.

[0137] Fuzzy Depth Kp, Fuzzy Depth Ki, and Fuzzy Depth Kd are the proportional, integral, and derivative parameters of the fuzzy PID controller, respectively, which control the attitude of the UUV. By adjusting these parameters, the UUV can accurately maintain or reach the target depth.

[0138] Target Depth: The target depth is the depth that the UUV will adjust to and maintain through PID control.

[0139] Target Point is used to define the target position of the UUV, and the UUV will automatically navigate towards this point.

[0140] After implementing the AUUV class, blueprint the AUUV class in the Unreal Engine UE5. Create a seacurrent blueprint BP-UUV based on the AUUV class, add a static mesh component, and import a UUV model. Then, parameter settings for the UUV can be performed in the editor.

[0141] Dynamic Seacurrent Force: To simulate the influence of seacurrents, the article introduces a dynamic seacurrent force based on the basic formulas of hydrodynamics. The magnitude of the seacurrent force is related to the difference between the relative velocity of the UUV and the velocity of the seacurrent. The formula for the seacurrent force is as follows (Cd is the drag coefficient):

[0142]

[0143] Dynamic Variation of Seacurrent Velocity: The seacurrent velocity changes over time. To more realistically simulate the effect of seacurrents, the article incorporates a periodically varying seacurrent model to simulate the fluctuations of seacurrents within a certain time range. The dynamic variation of the seacurrent velocity is expressed by the following formula:

[0144]

[0145] Fluid Drag and Drag Force: Fluid drag is a factor that cannot be ignored when the UUV moves in seawater. Seacurrents not only affect the velocity and direction of the UUV but also generate drag on it through the drag force. The fluid drag is closely related to the velocity of the UUV and usually shows a quadratic relationship with the velocity. Therefore, the formula for the drag force is:

[0146]

[0147] The drag force is proportional to the square of the speed of the UUV. Therefore, when the speed of the UUV increases, the resistance it encounters will also increase significantly. The drag force calculated by this formula, together with the influence of the ocean current, determines the movement trajectory and control strategy of the UUV.

[0148] Specific implementation of the ocean current model: In the Unreal Engine UE5, an ocean current class named AOceanCurrentZone was created based on Actor, and this class inherits from AActor. This class contains multiple properties to describe the basic characteristics of the ocean current, such as direction, intensity, frequency, etc. Through the Tick() function, the speed of the ocean current is updated every frame, and the ocean current force and drag force are calculated and applied. The following parameters are defined for the ocean current and exposed to the Unreal Editor, allowing the ocean current control parameters to be adjusted directly in the Unreal Engine at any time without having to compile the code multiple times.

[0149] Ocean current direction and intensity: CurrentForceDirection and CurrentForceMagnitude define the basic direction of the ocean current and the intensity of the force.

[0150] Dynamic ocean current: The speed of the ocean current is represented by the BaseCurrentVelocity property and fluctuates over time, forming a periodic change.

[0151] Periodic change frequency of the ocean current speed: Frequency controls how fast the ocean current speed changes, with the unit being the number of fluctuations per second.

[0152] Drag force calculation: The drag force is calculated every frame based on the relative speed between the UUV and the ocean current and applied to the UUV.

[0153] Phase of the ocean current: Phase controls the initial time offset of the ocean current fluctuation, used to simulate the starting position of the fluctuation.

[0154] Drag coefficient of the water flow on the UUV: DragCoefficient affects the drag force generated by the ocean current, and the drag force is proportional to the square of the speed.

[0155] Density of seawater: FluidDensity usually has an impact on the calculation of the drag force.

[0156] In addition, the ocean current area is implemented through the UBoxComponent component to detect the entry and exit of the UUV. When the UUV enters this area, the ocean current force will be applied, and when it leaves, the acting force will be removed.

[0157] Ocean current collision body: CurrentRegion is used to define the range of the ocean current influence area. When the UUV enters this area, the ocean current force will be applied to the UUV.

[0158] The key functions used in the code include:

[0159] OnBeginOverlap and OnEndOverlap: Used to detect whether the UUV enters or leaves the ocean current area.

[0160] ApplyExternalForce: Applies the calculated ocean current force to the UUV to simulate the physical effect of the ocean current on the UUV.

[0161] After implementing the ocean current class, blueprint the ocean current class in the Unreal Engine UE5, and create an ocean current blueprint BP - OceanCurrentZone based on the ocean current class, then parameter adjustments can be made in the editor to affect the UUV.

[0162] Sensor input and obstacle detection: Obtain obstacle information in front of and around the UUV through ray detection (LineTrace). Use the CheckForObstacles function to detect obstacles in the target direction, and this process relies on ray detection in three - dimensional space (rays along the X, Y, and Z axes). If an obstacle is detected, the system will enter the obstacle avoidance logic.

[0163] Path planning and A* search: When an obstacle is detected, the UUV will re - plan the path through the A* algorithm. The A* algorithm searches in a three - dimensional grid, considering each dimension of the underwater environment, and calculates the heuristic cost of each point (such as the distance to the target, obstacle density, etc.). Different from the traditional two - dimensional A* algorithm, three - dimensional A* needs to consider a grid composed of three dimensions, not only the search on the horizontal plane, but also the change in the Z - axis depth and possible attitude adjustments.

[0164] Multi - direction obstacle avoidance and path smoothing: The UUV will not only choose the optimal path ahead, but also choose multiple directions for obstacle avoidance based on the current obstacle position. Specifically, after detecting an obstacle in the target direction, the algorithm will try different directions within a range (±45 degrees) around this direction and calculate the optimal obstacle avoidance path. Through multi - direction search, the algorithm can provide a flexible obstacle avoidance path in three - dimensional space, rather than simply bypassing the obstacle.

[0165] Joint adjustment of depth and attitude: In addition to lateral obstacle avoidance of the path, the article also adjusts the depth (Z - axis control) of the UUV through a fuzzy PID controller and adjusts the attitude in real - time according to the change of the obstacle avoidance path to ensure the stable navigation of the vehicle in a three - dimensional environment.

[0166] UUV Static Mesh and Control Parameters: Create a blueprint BP_UUV based on the AUUV class, add a staticMesh component to store the 3D model of the UUV. Then, define the appearance of the UUV by setting the mesh and adjusting the mesh scale. When writing the AUUV class, the control parameters of the UUV have been exposed to the editor and can be directly modified in the editor. Set the buoyancy, drag, gravity, propulsion, fuzzy PID controller, and target point coordinates of the UUV to the following parameters.

[0167] Ocean Current Static Mesh and Control Parameters: Blueprint the ocean current class in Unreal Engine UE5, create an ocean current blueprint BP - OceanCurrentZone based on the ocean current class, and adjust the parameters in the editor to affect the UUV. When writing the ocean current class, the control parameters of the ocean current have been exposed to the editor and can be directly modified in the editor. Set the direction and intensity, flow velocity, change frequency, phase, drag coefficient, and density of the ocean current to the following parameters.

[0168] Scene Modeling: The seabed terrain is one of the core elements in the seabed scene. Create a complex seabed terrain through UE5 for the simulation and verification of the UUV, including underwater mountains, canyons, etc. To better observe the running track of the UUV, set the overall water body color to transparent and the ocean current area color to blue for clear observation of the results.

[0169] Reference Figure 2 As shown, create a blueprint BP_UUV based on the AUUV class, add a staticMesh component to store the 3D model of the UUV. Import Figure 2 the 3D model of the UUV shown, and then define the appearance of the UUV by setting the mesh and adjusting the mesh scale.

[0170] Reference Figure 3 As shown, blueprint the ocean current class in Unreal Engine UE5, create an ocean current blueprint BP - OceanCurrentZone based on the ocean current class, then add a static mesh component to create the 3D model of the ocean current as shown, and define the appearance of the ocean current and adjust the control parameters to affect the UUV in the editor.

[0171] Reference Figure 4 As shown, the seabed terrain is one of the core elements in the seabed scene. Create a complex seabed terrain through the UE5 tool, including underwater mountains, canyons, etc. To better observe the running track of the UUV, set the overall water body color to transparent and the ocean current area color to blue for clear observation of the results, including the positions of the UUV, ocean current, starting point, and target point.

[0172] Reference Figure 5As shown, they are the UE virtual simulation trajectories of the UUV passing through the ocean current and the UUV not passing through the ocean current respectively. It can be found that when the UUV encounters the impact of ocean current force, it will be significantly affected, and the heading angle and trajectory will change significantly.

[0173] Reference Figure 6 As shown, although the UUV is affected by the ocean current force when passing through the ocean current, due to the AUUV class implementing an anti-interference and attitude adjustment mechanism through the combination of mechanical calculations and fuzzy PID control in the physics engine, the stability of the trajectory and attitude is guaranteed to the greatest extent. After the UUV adjusts its own attitude, it continues to sail to the target point under the three-dimensional path.

[0174] Reference Figure 7 As shown, when facing ocean current disturbances of different intensities, the fuzzy PID controller has a shorter response time compared to the traditional PID controller. This shows that the fuzzy PID controller exhibits stronger adaptability and robustness in dynamically adjusting parameters, can recover the target attitude more quickly, and thus improves the navigation stability and accuracy of the UUV.

[0175] Reference Figure 8 As shown, under the influence of the ocean current, the PID controller shows a slow response and still fails to stably recover to the desired attitude even after a long time. Due to the inflexible gain of the PID controller, it takes a long time to adjust and stabilize the attitude, resulting in a large attitude error. The response speed of the fuzzy PID controller is significantly faster than that of the traditional PID controller, and the error converges rapidly within a short time.

[0176] Reference Figure 9 As shown, when using the PID controller, the response lag of the PID controller is large and it fails to adjust in time, resulting in the pitch angle deviating from the target value. As time goes by, the PID controller gradually converges the error, but the speed is slow and the error only stabilizes, and the stable value is still some distance from 0. In the case of the fuzzy PID controller, the initial large fluctuations are quickly corrected and quickly approach zero, showing a faster attitude recovery ability.

[0177] Reference Figure 10 As shown, in the comparative experiment of the three-dimensional A* and two-dimensional A* obstacle avoidance algorithms based on UE5, the propulsion force of the UUV is set to 1000000.0f. The trajectory results of the virtual three-dimensional simulation of the experiment are as follows. (a) uses the two-dimensional obstacle avoidance strategy, and (b) uses the three-dimensional obstacle avoidance strategy.

[0178] Please refer to Figure 11As shown, the 3D A* obstacle avoidance algorithm does not only prioritize 3D obstacle avoidance. Instead, after detecting an obstacle, it determines which is more efficient to avoid in the XY plane direction or the Z-axis direction. If there is an optimal obstacle avoidance path in the 2D plane, the 3D A* obstacle avoidance algorithm will automatically reduce the dimension to obtain the same path planning result as the 2D algorithm. A UUV obstacle avoidance scenario with a relatively complex Z-axis obstacle and a relatively high height was created.

[0179] Please refer to Figure 12 As shown, the trajectory comparison between the 3D A* obstacle avoidance algorithm and the 2D obstacle avoidance algorithm in the second verification scenario. Through the trajectory comparison, it can be found that the path planning results of the two algorithms are the same. Therefore, when the depth of the Z-axis obstacle is relatively large, the UUV will automatically select a more reasonable obstacle avoidance from the XY plane direction according to the algorithm analysis, thus verifying that the 3D A* obstacle avoidance algorithm is compatible with the 2D obstacle avoidance.

Claims

1. A three-dimensional undersea simulation and obstacle avoidance method for UUV considering the influence of ocean currents, characterized in that, It includes the following steps: S1: Establish the dynamic model of the UUV, including the six-degree-of-freedom model, the force analysis of the UUV, and the anti-sea current interference model of the fuzzy PID controller; S2: Establish the sea current model, including the dynamic sea current force, the dynamic change of the sea current velocity, and the hydrodynamic force and drag force; S3: Propose an improved three-dimensional A* obstacle avoidance algorithm, including sensor input and obstacle detection, path planning and A* search, multi-directional obstacle avoidance and path smoothing, and joint adjustment of depth and attitude; S4: Conduct three-dimensional modeling based on UE5, including the UUV static mesh body and control parameters, the sea current static mesh body and control parameters, and scene modeling; S5: Conduct three-dimensional virtual simulation and obstacle avoidance experiment of the UUV under the influence of sea current based on UE5.

2. The method for three-dimensional simulation and obstacle avoidance of a UUV on the seabed considering the influence of ocean currents according to claim 1, characterized in that The six-degree-of-freedom model in step S1 includes: translational degrees of freedom: forward / backward along the X-axis, left / right movement along the Y-axis, and up / down movement along the Z-axis; rotational degrees of freedom: yaw around the Z-axis, pitch around the Y-axis, and roll around the X-axis.

3. The method for three-dimensional simulation and obstacle avoidance of a UUV under the sea considering the influence of ocean currents according to claim 1, wherein The force analysis in step S1 includes the calculation of the following forces: Thrust: The driving force generated by the UUV propeller: Drag: The resistance generated during movement in water, usually proportional to the square of the speed: Buoyancy: The force caused by the buoyancy of water, related to the volume of the UUV and the density of water. F buoyancy = ρ·V displaced ·g Gravity: The influence of the earth's gravity on the UUV, related to the mass of the UUV and the acceleration due to gravity. External force: Includes the forces generated by external factors such as sea current and turbulence, and the formula is as follows: F external = F current = ρ water ·SA UUV ·(v current - v UUV ) 2 The acceleration of the unmanned submersible is calculated by the following formula: Among them, is the sum of all forces, including thrust force, drag force, buoyancy force, gravity force, and external force.

4. The method for three-dimensional underwater simulation and obstacle avoidance of a UUV considering ocean current influence according to claim 1, wherein The fuzzy PID controller in step S1 dynamically adjusts parameters through the following formula: The error membership function includes: Negative Big (NB), Negative Small (NS), Zero (ZE), Positive Small (PS), Positive Big (PB), and their definitions are: Negative Big: Indicates that the attitude error is large and negative, and the system needs to make a large correction to resist the influence of the sea current. Negative Small: Indicates that the attitude error is small and negative, and the system needs a small correction. Zero (ZE): Indicates that the error is zero, and the system is already close to the target attitude, and no further adjustment is required at this time. μ NS (e(t)) = max(0, 1 - |e(t)|) Zero: Indicates that the error is zero, and the system is already close to the target attitude, and no further adjustment is required at this time. μ ZE (e(t)) = max(0, 1 - |e(t)|) Positive Small: Indicates that the attitude error is small and positive, and the system needs a small correction. Positive Big: Indicates that the attitude error is large and positive, and the system needs to make a large correction. The error change rate membership function includes: Negative Big, Negative Small, Zero, Positive Small, Positive Big, and the formula is as follows: Negative Big: Indicates that the error change is fast and negative, and the system needs to quickly adjust the attitude to avoid deviation from the target. Negative Small: Indicates that the error change is small and negative, and the system needs a moderate adjustment. μ NS (e(t)) = max(0, 1 - |e(t)|) Zero: Indicates that the error change is close to zero, and the system has tended to be stable and no further adjustment is required. μ ZE (e(t)) = max(0, 1 - |e(t)|) Positive Small: Indicates that the error change is small and positive, and the system needs a moderate adjustment. Positive Big: Indicates that the error change is fast and positive, and the system needs to quickly adjust the attitude to avoid further deviation. The fuzzy rule base contains at least 8 rules and is dynamically adjusted according to the combination of the error and the error change rate.

5. The method for three-dimensional simulation and obstacle avoidance of a UUV on the seabed considering the influence of ocean currents according to claim 1, characterized in that The calculation formula for the dynamic sea current force in step S2 is: The dynamic change model of the sea current velocity is:

6. The method for three-dimensional simulation and obstacle avoidance of a UUV on the seabed considering the influence of ocean currents according to claim 1, wherein The 3D A* obstacle avoidance algorithm in step S3 includes: Sensor input and obstacle detection: Identify obstacles in 3D space through ray detection; Path planning and A* search: Calculate heuristic costs in a 3D grid to generate an optimal path; Multi-directional obstacle avoidance strategy: When an obstacle is detected, generate multiple candidate paths within the range of ±45 degrees and select the optimal path through cost evaluation; Depth and attitude joint adjustment: Combine a fuzzy PID controller to adjust the depth Z-axis of the UUV in real time; The pitch angle and roll angle of the attitude to ensure a smooth path; Among them, calculating the heuristic cost includes the target distance and obstacle density.

7. The method for three-dimensional simulation and obstacle avoidance of a UUV on the seabed considering the influence of ocean currents according to claim 1, characterized in that In step S4, the UE5 modeling includes: UUV blueprint class: Define buoyancy, drag coefficient, thrust, and target depth parameters, and expose them to the UE editor for visual adjustment; Ocean current blueprint class: Define ocean current direction, intensity, frequency, and phase parameters, and apply dynamic ocean current forces through a box collision component; Scene modeling: Construct a 3D terrain containing underwater mountains and canyons, and set up a transparent water body and a visual ocean current area.

8. A method for three-dimensional simulation and obstacle avoidance of a UUV on the seabed considering the influence of ocean currents, characterized in that, The control parameters of the UUV blueprint class also include fuzzy PID parameters: The target point coordinates are used for navigation path planning.

9. A method for three-dimensional simulation and obstacle avoidance of a UUV on the seabed considering the influence of ocean currents, characterized in that, The parameters of the ocean current blueprint class also include: Basic flow velocity, fluid density; The action area of the dynamic ocean current force is defined by the size and position of the box collision component.

10. A three-dimensional UUV seabed simulation and obstacle avoidance system considering the influence of ocean currents, characterized in that, Include: Dynamics modeling module: Used to construct a six-degree-of-freedom model of the UUV and calculate the forces acting on it; Ocean current simulation module: Used to generate periodically changing dynamic ocean current forces; 3D path planning module: Used to execute the improved A* algorithm and output a multi-directional obstacle avoidance path; UE5 virtual environment: Used to integrate the UUV and ocean current models, support real-time parameter adjustment and scene visualization; Simulation verification module: Used to compare and analyze the UUV motion trajectory, control algorithm performance, and obstacle avoidance success rate under ocean current interference.