A Q-learning-based underwater glider path planning method
Through the path planning method based on Q-learning, combined with the motion characteristics and environmental feedback of the underwater glider, the state representation and action strategy are designed, which solves the problem of poor underwater glider path planning in the existing technology and achieves the goal of navigating in complex oceans. Safe,shortest path planning in environments.
Patent Information
- Application Number
- CN202210476840.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-30
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-04-30
AI Technical Summary
Existing underwater glider path planning methods are not effective in complex ocean environments. In particular, they fail to effectively consider the glider's motion characteristics and environmental changes, making it difficult to plan a safe and shortest path.
Using a path planning method based on Q-learning, by designing the state representation, action set, reward function and action selection strategy of the underwater glider, combined with a two-dimensional grid to represent the environment, initializing the Q-value table to reduce blindness, and using environmental feedback to continuously Optimize the path.
It achieves adaptive planning of safe and shortest paths in complex environments, avoids local optimal solutions, improves the efficiency and accuracy of path planning, and is suitable for the "V"-shaped motion characteristics of underwater gliders.
Smart Images

Figure CN115202373B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of underwater glider mission planning, and in particular relates to an underwater glider path planning method based on Q-learning. Background Art
[0002] Autonomous Underwater Glider is a new type of underwater vehicle that can dive and float by adjusting its own center of gravity and buoyancy. With its low cost, low power consumption and long endurance, it has become an important ocean observation platform. Due to the complex and changeable marine environment, the path planning technology is very important to ensure the safe navigation of underwater gliders.
[0003] Underwater glider path planning refers to planning an optimal path from the starting point to the target point in the mission area that satisfies a given objective function (such as the shortest path length, etc.) and meets constraints such as avoiding obstacles. Path planning is the prerequisite for ensuring that the glider can successfully perform its mission underwater and is a key technology to improve navigation safety. At present, there are many underwater glider path planning methods, but most of them require the establishment of an environmental model in advance. When environmental information cannot be obtained in advance or the problem model is too complex, these methods are often ineffective. The Q-learning algorithm in reinforcement learning does not require advance knowledge of environmental information or any pre-given data. Instead, it updates the model parameters by continuously interacting with the environment and obtaining cumulative behavioral rewards from the environment, thereby seeking the optimal solution. This method has strong adaptability, high operating efficiency, and can avoid falling into a local optimal solution.
[0004] The operating environment of underwater gliders is complex and changeable, with constraints such as unknown obstacles and complex terrain, making it difficult to establish an accurate environmental model. The current path planning method does not take into account the motion characteristics of the application platform. The existing technology uses the Q-learning method for drone path planning, using 8 adjacent grids to represent the drone's action set, or using the four directions of up, down, left, and right to represent the drone's action set. This regards the platform's movement as horizontal plane movement and the action step length is fixed, which will cause some problems in practical applications. For underwater gliders, which are underwater vehicles that move in a "V" shape, it is necessary to design a path planning method based on the movement characteristics of underwater gliders. Summary of the invention
[0005] Technical issues to be solved:
[0006] In order to avoid the shortcomings of the prior art, the present invention provides an underwater glider path planning method based on Q-learning, which includes two parts: underwater glider Q learning element design and algorithm process design. The underwater glider Q learning element mainly consists of five parts: underwater glider state, action set, reward function, action selection strategy, and Q value table initialization. The algorithm process design is given in detail in the steps.
[0007] The technical solution of the present invention is: a Q-learning-based underwater glider path planning method, characterized by the following specific steps:
[0008] Step 1: Establish the underwater glider state representation;
[0009] Step 2: Action set design;
[0010] According to the depth value h, pitch angle θ and heading angle ψ set when the underwater glider performs the mission, n typical heading action selection sets {ψ1,ψ2 …ψ n};
[0011] Step 3: Reward function design;
[0012] Get the maximum cumulative reward from the starting point to the target point through environmental feedback and establish a reward function;
[0013] Step 4: Action selection strategy design;
[0014] First, determine the size of the pitch angle θ, where the selection range of θ is the set m typical pitch angles {θ1, θ2, ... θm}; according to the size of the pitch angle, select the corresponding n typical heading action selection set a i ={ψ i1 ,ψ i2 ,…ψ in}; Then set a greedy value ε, and generate a random value p∈(0,1) each time an action is selected, which is used to determine whether the next action is a random selection or a strategy selection, so as to prevent the algorithm from falling into a local optimum; when p is less than ε, randomly select the action value; when p is greater than ε, select the action with the largest Q value in the action set as the action selected this time;
[0015] Step 5: Design of Q value table initialization method;
[0016] The Q value is initialized using the straight-line distance between the underwater glider coordinate point and the target point, that is, the farther the point is from the target point, the smaller the initial Q value;
[0017] Step 6: Given the initial position S of the underwater glider, the depth h, the pitch angle θ = θ1, and the heading action set {ψ1, ψ2 …ψn};
[0018] Step 7: Assign initial values to the Q value table according to the Q value table initialization method;
[0019] Step 8: According to the action selection strategy, select the action set a corresponding to the pitch angle i Select action a;
[0020] Step 9: Obtain the immediate reward value Reward and the new glider position S' after executing action a according to the reward function;
[0021] Step 10: Update the Q value corresponding to state S and action a according to the following Q value update function;
[0022] Q(S,a)←(1-α)Q(S,a)+α[r+γmaxQ(S',a)]
[0023] Step 11: Determine whether the underwater glider hits an obstacle. If yes, end this round of learning and go to the starting step 6. Otherwise, proceed to the next step.
[0024] Step 12: Determine whether the underwater glider has reached the target area. If not, continue to select the next action according to the action selection strategy; otherwise, proceed to the next step.
[0025] A further technical solution of the present invention is: in step 1, a two-dimensional grid is used to represent the horizontal plane of the underwater mission environment, and the state of the underwater glider in the environment is represented by the coordinate point position S (x, y) of the glider in the grid at that moment.
[0026] A further technical solution of the present invention is: in step 2, the coordinates and step length are obtained by the pitch angle θ, the heading angle ψ, and the depth h, and the calculation formula is:
[0027]
[0028]
[0029]
[0030] Among them, θ, ψ, and h represent the pitch angle, heading angle, and depth respectively, x and y represent the horizontal and vertical coordinates, and step represents the step size.
[0031] A further technical solution of the present invention is: in step 3, the reward function is as follows:
[0032] When reaching the destination:
[0033] Reward=500 (4)
[0034] When colliding with any obstacle:
[0035] Reward=-500 (5)
[0036] When moving in the free zone:
[0037] Reward=Ω[(x Aug -x T arget ) 2 +(y Aug -y T arget ) 2 ] (6)
[0038] Among them, x Aug ,y Aug is the horizontal and vertical coordinates of the current position of the underwater glider in the grid environment; x T arget ,y T arget are the horizontal and vertical coordinates of the target point; Ω is the scaling factor, which is used to adjust the range of reward values during free area movement, so that the absolute value of the reward value is much smaller than the absolute value of the reward value when reaching the target point or colliding with an obstacle. Usually, the larger the task area, the smaller the value of Ω.
[0039] A further technical solution of the present invention is: in the step 4, the algorithm flow of the underwater glider Q learning action selection strategy is given by Algorithm 1;
[0040] Algorithm 1:
[0041]
[0042] A further technical solution of the present invention is: in the step 5, the straight-line distance between the coordinate point of the underwater glider and the target point in the grid environment is used to initialize the Q value; the method of initializing the Q value table according to the distance to the target point makes the underwater glider have a tendency to move toward the target point, reduces the blindness of the search training, and can improve the learning speed of the Q learning method; the formula for calculating the initial value of different positions of the Q value table is as follows:
[0043]
[0044] Among them, S is the initial coordinate of the glider, a i is the action selection set, x s ,y s is the grid coordinate, x T arget ,y T arget is the target point coordinate.
[0045] Beneficial Effects
[0046] The beneficial effect of the present invention is that: the method proposes a Q-learning-based underwater glider path planning method, in which the underwater glider selects the optimal action according to the reward value of environmental feedback during the continuous exploration and learning process, and finally plans a safe shortest path. Compared with the traditional path planning method, this method does not need to know the environmental information in advance, so the method has excellent migration ability under different environmental conditions.
[0047] 1. The present invention can solve the underwater glider path planning problem and improve the algorithm. The directional distance between the individual coordinate point and the target point is used as prior knowledge to initialize the Q value table, thereby improving the convergence of the algorithm. Figure 4 The left figure in the middle shows the change in path length during the learning process when the distance is used as prior knowledge to initialize the Q value table, and the right figure shows the change in path length during the learning process without Q value table initialization. Obviously, the left one converges faster and has less oscillation.
[0048] 2. According to the motion characteristics of underwater gliders, a new action selection set and action selection strategy are established based on the "V"-shaped motion mode, taking into account pitch, roll, and yaw, to ensure the applicability of the algorithm to underwater glider platforms;
[0049] 3. An algorithm flow of the underwater glider path planning method based on Q-learning was designed. The planned path has the characteristics of obstacle avoidance and short range. The following table shows the planning results under three pitch angle settings. The shortest path length is the length of the path planned by this method. The straight-line distance between the starting point and the end point is taken as the theoretical shortest distance. It can be obtained that the difference between the length of the path planned by this method and the theoretical shortest distance is very small.
[0050] BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a diagram showing the state of the underwater glider according to the method of the present invention.
[0052] Figure 2 The following is a design diagram of an action set in the method of the present invention.
[0053] Figure 3 The figure is a flow chart of the algorithm in the method of the present invention.
[0054] Figure 4 The figure is a comparison chart of the change in path length of the learning process when the Q value table is used for initialization. DETAILED DESCRIPTION
[0055] The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, but should not be construed as limiting the present invention.
[0056] In order to overcome the deficiency of the traditional path planning method that an environment model needs to be established in advance, this embodiment provides an underwater glider path planning method based on Q-learning.
[0057] Taking into account that the pitch angle and depth parameters of underwater gliders are given in advance when performing some specific tasks, and the heading angle selection range is usually several discrete angle values, this method designs several typical heading action selection sets for several typical pitch angle situations under certain depth conditions. According to the external constraints of the goal and obstacles of the shortest path of the underwater glider, the reward function and action selection strategy are designed, so that the underwater glider can adapt to the complex ocean environment and reach the target point safely.
[0058] The technical solution adopted by the present invention to solve the technical problem comprises the following steps:
[0059] Step 1: Create an underwater glider state representation
[0060] In solving the path planning problem, rasterization of the environment space is a common method. This method uses a two-dimensional grid to represent the horizontal plane of the underwater mission environment. The rasterization of the environment space is to simulate the feedback of the environment on the underwater glider's actions. The method itself does not need to establish an environmental model in advance. The state of the underwater glider in the environment is represented by the coordinate point position S(x,y) of the glider in the grid at that moment.
[0061] Step 2: Action set design
[0062] Considering that the underwater glider will be given a pitch angle θ and a depth value h in advance when performing some specific tasks, and the selection range of the heading angle ψ is usually several discrete angle values. Therefore, assuming that the depth value is h, for m typical pitch angles {θ1, θ2, ... θm}, n typical heading action selection sets {ψ1, ψ2 ... ψ n}. The step length calculation formula for these actions is:
[0063]
[0064]
[0065]
[0066] Among them, θ, ψ, and h represent the pitch angle, heading angle, and depth respectively, x and y represent the horizontal and vertical coordinates, and step represents the step size.
[0067] Step 3: Reward Function Design
[0068] The goal is to obtain the maximum cumulative reward from the starting point to the target point. This reward is obtained through environmental feedback and directly affects the speed and effect of learning. Therefore, it is very important to design a reasonable and efficient reward function. The reward function designed by this method is as follows:
[0069] When reaching the destination:
[0070] Reward=500 (4)
[0071] When colliding with any obstacle:
[0072] Reward=-500 (5)
[0073] When moving in the free zone:
[0074] Reward=Ω[(x Aug -x T arget ) 2 +(y Aug -y T arget ) 2 ] (6)
[0075] where x Aug ,y Aug is the horizontal and vertical coordinates of the current position of the underwater glider in the grid environment; x T arget ,y T arget are the horizontal and vertical coordinates of the target point; Ω is the scaling factor, which is used to adjust the range of reward values during free area movement, so that the absolute value of the reward value is much smaller than the absolute value of the reward value when reaching the target point or colliding with an obstacle. Usually, the larger the task area, the smaller the value of Ω.
[0076] Step 4: Action selection strategy design
[0077] This method designs a new action selection strategy based on the ε-greedy algorithm and the characteristics of underwater glider motion. Algorithm 1 gives the algorithm flow of the underwater glider Q learning action selection strategy. First, determine the size of the pitch angle θ, and the selection range of θ is the set m typical pitch angles {θ1, θ2, ... θm}. According to the size of the pitch angle, select the corresponding n typical heading action selection sets {ψ i1 ,ψ i2 …ψ in}. Then set a greedy value ε, and randomly generate a p each time an action is selected. When p is less than ε, the action value is randomly selected. When p is greater than ε, the action with the largest Q value in the action set is selected as the action selected this time.
[0078] Algorithm 1:
[0079]
[0080] Step 5: Design of Q value table initialization method
[0081] In the initial learning stage of Q learning, the system knows basically nothing about the state of the environment, and the choice of action is random and blind. Therefore, it is very important to use prior knowledge to initialize the Q value table to improve the convergence speed of the Q learning algorithm. This method uses the straight-line distance between the coordinate point of the underwater glider and the target point in the grid environment to initialize the Q value, that is, the farther the point is from the target point, the smaller the initial Q value. This method of initializing the Q value table based on the distance to the target point makes the underwater glider tend to move toward the target point, reduces the blindness of the search training, and can improve the learning speed of the Q learning method:
[0082]
[0083] Step 6: Given the initial position S of the underwater glider, the depth h, the pitch angle θ = θ1, and the heading action set {ψ1, ψ2 …ψ n}.
[0084] Step 7: Assign initial values to the Q value table according to the Q value table initialization method.
[0085] Step 8: According to the action selection strategy, select action a from the action selection set corresponding to the pitch angle.
[0086] Step 9: According to the reward function, get the immediate reward value r and the new glider position S' after executing action a.
[0087] Step 10: Update the Q value corresponding to state S and action a according to the Q value update function.
[0088] Q(S,a)←(1-α)Q(S,a)+α[r+γmaxQ(S',a)] (8)
[0089] Step 11: Determine whether the underwater glider hits an obstacle. If yes, end this round of learning and go to the starting step 6. Otherwise, proceed to the next step.
[0090] Step 12: Determine whether the underwater glider has reached the target area. If not, continue to select the next action according to the action selection strategy; otherwise, proceed to the next step.
[0091] Step 13: Determine whether the path planning under m different pitch angle settings is completed. If yes, output the planned path point of the shortest path among the m paths. Otherwise, re-set the pitch angle and conduct a new round of learning. Specific embodiment:
[0093] The embodiment of the present invention takes an underwater glider avoiding obstacles and reaching its target point in a shorter distance as an example to verify the underwater glider path planning method based on Q-learning:
[0094] 1. Establish the underwater glider state representation. Figure 1 , the state of the underwater glider is represented by the position coordinates S(x,y).
[0095] 2. Design action set. Given a depth value h, design n typical heading action selection sets {ψ1, ψ2 …ψ n}.like Figure 2 As shown in the figure, given a depth value h, the number of pitch angles m = 3, and the value is {θ1 = 20°, θ2 = 30°, θ3 = 40°}. Assume that the heading action selection set contains the number of actions n = 8, and the action selection set {0, 1, 2, 3, 4, 5, 6, 7} represents the actions corresponding to the heading angles {315°, 270°, 225°, 180°, 135°, 90°, 45°, 360°} when the pitch angle is θ1 = 20°. The action selection set {8, 9, 10, 11, 12, 13, 14, 15} represents the actions corresponding to the heading angles {315°, 270°, 225°, 180°, 135°, 90°, 45°, 360°} when the pitch angle is θ2 = 30°. The action selection set {16, 17, 18, 19, 20, 21, 22, 23} represents the actions corresponding to the heading angles {315°, 270°, 225°, 180°, 135°, 90°, 45°, 360°} respectively when the pitch angle θ3=40°.
[0096] 3. Use the Q-learning algorithm to plan effective path points in a complex obstacle environment. The algorithm uses the distance between the underwater glider and the target point as the optimization target. The reward function of the underwater glider when moving in the free area is:
[0097] Reward=Ω[(x Aug -x T arget ) 2 +(y Aug -y T arget ) 2 ]
[0098] To ensure that the planning method can quickly converge to the optimal solution, a large reward value is obtained when the target point is reached:
[0099] Reward=500
[0100] To ensure that the planned path is safe and reliable, a penalty value is added when the path passes through an obstacle. The penalty function is:
[0101] Reward=-500
[0102] 4. According to Figure 3 The method flow shown is used for learning optimization. The learning rate α and the decay rate γ, the random factor ε, and the number of iterations N are set. After N iterations, the algorithm outputs the optimal solution for underwater glider path planning.
[0103] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations on the present invention. A person skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and intent of the present invention.
Claims
1. A Q-learning-based underwater glider path planning method, Features The specific steps are as follows: Step 1: Establish the underwater glider state representation; Step 2: Action set design; According to the depth value h, pitch angle θ and heading angle ψ set when the underwater glider performs the mission, m typical pitch angles {θ 1 ,θ 2 , …θm} respectively design n typical heading action selection sets {ψ 1 ,ψ 2 …ψ n }; Step 3: Reward function design; Get the maximum cumulative reward from the starting point to the target point through environmental feedback and establish a reward function; Step 4: Action selection strategy design; First, determine the size of the pitch angle θ. The selection range of θ is the set m typical pitch angles {θ 1 ,θ 2 ,…θm}; According to the pitch angle, select the corresponding n typical heading action selection set a i ={ψ i1 ,ψ i2 ,…ψ in }; Then set a greedy value ε, and generate a random value p∈(0,1) each time an action is selected, which is used to determine whether the next action is a random selection or a strategy selection, so as to prevent the algorithm from falling into a local optimum; when p is less than ε, randomly select the action value; when p is greater than ε, select the action with the largest Q value in the action set as the action selected this time; Step 5: Design of Q value table initialization method; The Q value is initialized using the straight-line distance between the underwater glider coordinate point and the target point, that is, the farther the point is from the target point, the smaller the initial Q value; Step 6: Given the initial position S of the underwater glider, given the depth h, the pitch angle θ = θ 1 , the heading action set {ψ 1 ,ψ 2 …ψ n }; Step 7: Assign initial values to the Q value table according to the Q value table initialization method; Step 8: According to the action selection strategy, select the action set a corresponding to the pitch angle i Select action a; Step 9: Obtain the immediate reward value Reward and the new glider position S' after executing action a according to the reward function; Step 10: Update the Q value corresponding to state S and action a according to the following Q value update function; Q(S,a)←(1-α)Q(S,a)+α[r+γmaxQ(S',a)] Step 11: Determine whether the underwater glider hits an obstacle. If yes, end this round of learning and go to the starting step 6. Otherwise, proceed to the next step. Step 12: Determine whether the underwater glider has reached the target area. If not, continue to select the next action according to the action selection strategy; otherwise, proceed to the next step.
2. According to claim 1, a Q-learning-based underwater glider path planning method, Features: In step 1, a two-dimensional grid is used to represent the horizontal plane of the underwater mission environment, and the state of the underwater glider in the environment is represented by the coordinate point position S (x, y) of the glider in the grid at that moment.
3. According to the Q-learning-based underwater glider path planning method of claim 1, Features: In step 2, the coordinates and step length are obtained by the pitch angle θ, the heading angle ψ, and the depth h, and the calculation formula is: Among them, θ, ψ, and h represent the pitch angle, heading angle, and depth respectively, x and y represent the horizontal and vertical coordinates, and step represents the step size.
4. According to claim 1, a Q-learning-based underwater glider path planning method, Features: In step 3, the reward function is as follows: When reaching the destination: Reward=500 (4) When colliding with any obstacle: Reward=-500 (5) When moving in the free zone: Reward=Ω[(x Aug -x Target ) 2 +(y Aug -y Target ) 2 ] (6) Among them, x Aug ,y Aug is the horizontal and vertical coordinates of the current position of the underwater glider in the grid environment; x Target ,y Target are the horizontal and vertical coordinates of the target point; Ω is the scaling factor, which is used to adjust the range of reward values during free area movement, so that the absolute value of the reward value is much smaller than the absolute value of the reward value when reaching the target point or colliding with an obstacle. Usually, the larger the task area, the smaller the value of Ω.
5. According to claim 1, a Q-learning-based underwater glider path planning method, Features: In the step 4, the algorithm flow of the underwater glider Q learning action selection strategy is given through Algorithm 1; Algorithm 1:
6. According to claim 1, a Q-learning-based underwater glider path planning method, Features: In the step 5, the Q value is initialized using the straight-line distance between the coordinate point of the underwater glider and the target point in the grid environment; the method of initializing the Q value table according to the distance from the target point makes the underwater glider have a tendency to move toward the target point, reduces the blindness of the search training, and can improve the learning speed of the Q learning method; The formula for calculating the initial values of different positions in the Q value table is as follows: Among them, S is the initial coordinate of the glider, a i is the action selection set, x s ,y s is the grid coordinate, x Target ,y Targe t is the coordinate of the target point.
Citation Information
Patent Citations
Planning method for behavior system structure of intelligent underwater robot based on deep Q learning
CN108873687A
Mobile body control method, mobile body controller, and program
JP2018198031A
