A path planning method for unmanned ship based on hull dynamics constraint model
By introducing the hull dynamics constraint model and obstacle softening processing into the path planning of the unmanned ship, combined with the ship stabilization and deflection strategy, the dynamic constraint problem of the path planning of the unmanned ship in the real environment is solved and the path fit is improved. and safety, reducing equipment costs and control difficulty.
Patent Information
- Application Number
- CN202210568321.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-19
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2042-05-19
AI Technical Summary
Existing unmanned ship path planning methods fail to effectively consider the hull dynamics constraints, resulting in inability to fit the path in the real environment, and it is easy to sail into dangerous areas and deviate from the planned path, affecting work efficiency and safety.
The improved A* algorithm based on the hull dynamics constraint model is used to establish a kinematic model by replacing and softening equivalent standard graphics for obstacles, and combines the modeling of obstacles and threat areas to adjust path planning and increase ship stability. Deflection strategies to counteract current and wind speed effects.
It significantly shortens path planning time, reduces equipment costs, improves the efficiency and safety of unmanned ships in water quality sampling, ensures that the path is closer to the preset path, and reduces control difficulty and the possibility of danger.
Smart Images

Figure CN115129045B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of lake water quality sampling and path planning, and specifically is an unmanned boat path planning method based on a hull dynamics constraint model. Background Art
[0002] With the progress of the times and the development of science and technology, people's quality of life has been qualitatively improved, but the living environment is much worse than before. Water, as the source of life, runs through the history of biological development, but in recent years, human beings have been destroying water resources more and more seriously. Therefore, the protection of water resources has become a top priority in the long-term sustainable development of mankind. Among them, the sampling and monitoring of water resources is an important part of water resource protection. With the development of artificial intelligence, most people now choose to use unmanned boats to sample water quality.
[0003] The path planning problem of unmanned boats has always been a difficult problem that many scholars in this field have paid attention to. Most existing path planning methods do not take into account the inertia of the hull in the real environment. If they are applied to the actual hull sampling work, many problems will arise. Finding a path planning method that can fit the hull dynamics model can significantly improve the efficiency of water quality sampling by unmanned boats in reality, and at the same time avoid the danger of the hull due to excessive deviation from the planned path.
[0004] There are many traditional and intelligent methods to solve the path planning problem of unmanned ships, such as genetic algorithm, ant colony algorithm and LPA* algorithm. A* algorithm is a classic heuristic search algorithm based on Dijkstra algorithm and combined with Breadth First Search (BFS). It is mainly used to solve the optimal path problem from the starting point to the target point in global path planning. This method continuously approaches the target point by retrieving nodes, and finally achieves the purpose of finding the optimal path. Summary of the invention
[0005] Aiming at the path planning needs of unmanned ships under dynamic constraints in real environments, the present invention proposes an unmanned ship path planning method based on the hull dynamic constraint model by improving the traditional A* algorithm. The method effectively solves the problems that unmanned ships cannot fit the path, easily enter dangerous areas, and deviate from the path during traversal in real environments, significantly shortens the time consumed by path planning, and reduces equipment costs.
[0006] The unmanned ship path planning method based on the hull dynamics constraint model has the following specific steps:
[0007] Step 1: collect images of the environment of the monitored lake surface, replace each obstacle in the lake surface environment with an equivalent standard graphic, and obtain the boundary envelope of each standard graphic as an obstacle representation in path planning.
[0008] The specific steps are as follows:
[0009] Step 101: for each obstacle, evenly distribute N sampling points on the boundary contour of the entire obstacle according to the circumference, perform equal-angle sampling, and save the coordinates of all sampling points in the z set;
[0010] The formula is as follows:
[0011] z={z0,z1,z2,.....,z N}
[0012] z k =(x k ,y k ),{k=1,2,3,...,N}
[0013] In the above formula, z0,z1,z2,...,z N Represents each sampling point, x k and k Represents the kth sampling point z k In terms of the position on the horizontal plane coordinate, the larger the N value is, the more accurate the initial model is.
[0014] Step 102: among the obstacles, select an obstacle with a large local depth difference, and soften the coordinates of each sampling point on its boundary;
[0015] First, select the most convex sampling point or the most concave sampling point z with the largest depth difference in the obstacle k , select two adjacent sampling points on both sides in order, and adjust the sampling point z based on the sum and ratio of these five points k The coordinate value of is as follows:
[0016]
[0017] Step 103: using the processed sampling point coordinates of each obstacle, respectively calculate the projection coordinates of the centroid of each obstacle on the horizontal plane;
[0018] The formula is as follows:
[0019]
[0020]
[0021] in, and The coordinates of the center of mass of the obstacle correspond to the x-axis and y-axis values; the sampling point z i The coordinates of (x i ,y i );
[0022] 104: Based on the coordinates of the center of mass of each obstacle, establish the boundary envelope equation of the equivalent standard figure of each obstacle / threat;
[0023] The formula is as follows:
[0024]
[0025] Among them, R s is the inertial safety range of the unmanned cruise ship, q, p, a, and b are parameters that determine the shape of the projection of the obstacle on the horizontal plane after it is equivalent, where x is the x-axis coordinate value of the boundary of the obstacle equivalent standard figure on the horizontal plane, and y is the y-axis coordinate value of the boundary of the obstacle equivalent standard figure on the horizontal plane.
[0026] Step 2: Establish a kinematic model to ensure the control of the ship's posture and speed, which is used as the kinematic model of the unmanned ship during path planning;
[0027] The formula is as follows:
[0028] x'=Vcosγcosχ
[0029] y'=Vcosγsinχ
[0030]
[0031] V'=g(n x -sinγ)
[0032]
[0033]
[0034] Where P = [x, y, z] T represents the three-dimensional position of the unmanned boat; V is the navigation speed of the unmanned boat; γ and χ are the track inclination and track deviation of the unmanned boat respectively; ρ is the water density of the monitored lake surface; V 排 is the volume of the unmanned ship under the horizontal plane; G is the gravity of the unmanned ship; g is the gravity constant; m is the weight of the unmanned ship; n as the control input x ,n y ,n z represents the overload along the x, y, and z axes of the unmanned track system, n z Divided into n zf and n zb , n zfrepresents the overload of the front half of the unmanned ship along the z-axis, n zb Represents the overload of the rear half of the unmanned ship along the z-axis.
[0035] The above kinematic model also needs to satisfy the following constraints:
[0036] n i ∈[n imin ,n imax ],i=x,y,z
[0037] γ'∈[-γ' min ,γ' max ]
[0038] χ'∈[-χ' min ,χ' max ]
[0039] γ∈[γ min ,γ max ]
[0040] Among them, γ' is the rate of change of the unmanned ship's track inclination angle, that is, the unmanned ship's tilt angular velocity; χ' is the rate of change of the unmanned ship's track deflection angle, that is, the unmanned ship's yaw angular velocity.
[0041] Step 3: Model the dangerous areas in the monitored lake surface excluding obstacles or the dangerous areas in the known map as threat areas for path planning.
[0042] The specific process is:
[0043] Step 301: For the current dangerous area in the lake, discretize it into squares with a side length of 1 meter, and preset the danger coefficient ψ of each square and store it in the matrix D;
[0044] The specific formula is as follows:
[0045]
[0046] Among them, the size of matrix D is n×m, the size of the danger coefficient ψ is 0 to 100, when the danger coefficient ψ exceeds 20, the square is an impassable area, if the danger coefficient ψ is lower than 20, the area is a passable area.
[0047] Step 302: According to the obstacles existing around the current dangerous area, adjust the danger coefficient of each element in the matrix D.
[0048] The formula is as follows:
[0049]
[0050] Among them, i centre and j centrerepresents the row and column values of the elements in the matrix D, μ is the self-adjusting coefficient, the larger its value is, the higher the sensitivity of the dangerous area to obstacles is, and vice versa. ρ(q,q o ) is the Euclidean distance between the current dangerous area and the surrounding obstacles, ρ o is the influence range of the obstacle, is the self-adjustment coefficient. The larger its value is, the larger the influence range of the obstacle will be, and it will affect more distant dangerous areas. On the contrary, the influence range will become smaller, and only the nearby areas will be affected.
[0051] Step 4: The unmanned boat uses the improved A* algorithm to plan the path from the starting point to the target point, combines the modeling of obstacles and threat areas, and uses turning strategies to adjust the posture of the unmanned boat at the turning points in the path.
[0052] Specifically, first, the ship starts from the starting point and determines whether there are turning points and obstacles between the current path point and the next path point;
[0053] When there is no turning point between two adjacent path points, the unmanned ship moves directly along the path planned by the A* algorithm;
[0054] When there is an inflection point m between two adjacent path points, the following judgment is made:
[0055] 1) On the route from the current i-th path point to the turning point m, there are no obstacles on both sides of the path that is less than or equal to fix(n / N) squares before and after the turning point m. The fix(n / N)-th square after the turning point m is regarded as the i+1-th path point, and the traversal of this path point continues;
[0056] n is a parameter set according to the minimum turning radius R of the hull, and n=3R; N is the side length of a grid during path planning.
[0057] The range of the fix(n / N) grid before and after the inflection point m refers to: the center is the inflection point m, and the side length is 2R s The square range of
[0058] 2) On the route from the current path point i to the turning point m, there are obstacles on both sides of the path less than or equal to fix(n / N) squares before and after the turning point m, that is, the midpoint of the path from the ship to the turning point m is taken as the center, and the side length is R s If there is an obstacle within the square range of , the unmanned boat will first go straight to the turning point m, and then follow the path direction of the turning point m at an angle of 45 degrees. The grid is regarded as the i+1th path point, and then the path direction after reaching the i+1th path point is inclined at 30 degrees. The grid is regarded as the i+2th path point, and then the path direction after reaching the i+2th path point is inclined at 30 degrees. The grid is regarded as the i+3th path point; and so on, the subsequent ones are the path points with an angle of 30 degrees after reaching the previous path point. grid as the next waypoint, until it passes the current turning point m and reaches the next waypoint of the route.
[0059] 3) If there are obstacles on both sides of the path from the inflection point m to the inflection point that is less than or equal to fix(n / N) squares, the midpoint of the path from the inflection point m to the inflection point m is taken as the center, and the side length is R s If there is an obstacle within the square range, first turn the boat diagonally forward at a 45-degree angle. The grid is regarded as the i+1th path point for traversal, with a 45-degree deflection angle opposite to the direction of the turning point m. After driving to the i+1th path point, the turning point m is regarded as the i+2th path point for traversal.
[0060] If the pre-traversed path point does not reach the fix(n / N)th grid after the turning point, it will directly drive to the farthest point after the turning point.
[0061] If the route planned by the A* algorithm is deviated during the process, the current path point is used as the starting point, and the A* algorithm is used again to plan the path from the current point to the target point until the final target point is reached.
[0062] Step 5: During the actual traversal of the unmanned boat, in the face of the influence of water flow or wind speed on the unmanned boat, a ship stabilization and deflection strategy is added to ensure that the unmanned boat always sails on the planned path.
[0063] The specific steps are as follows:
[0064] First: Using the navigation speed V in the kinematic modeling of the unmanned ship o , combined with the pressure sensors on both sides of the hull to identify the direction and velocity of the water flow V w , calculate the angle α of the hull deflecting in the opposite direction of the water flow;
[0065] The value of α is:
[0066]
[0067] Then, the deflection angle α is used to calculate the component velocity V in the opposite direction of the water flow when the unmanned boat deflects. f ;
[0068] It satisfies the following formula:
[0069] V f =V o ·cos(90°-α)
[0070] V f =V w
[0071] Component speed V f It is used to offset the impact of water flow speed and ensure that the unmanned ship sails on the planned path.
[0072] The advantages of the present invention are:
[0073] (1) The present invention provides an unmanned ship path planning method based on a hull dynamics constraint model, which discretizes obstacles first and then builds them into an equivalent simple model, thereby simplifying the map and shortening the path planning time of the unmanned ship in the field of water quality sampling.
[0074] (2) The present invention provides an unmanned ship path planning method based on a hull dynamic constraint model, which establishes a dynamic model for the unmanned ship and applies dynamic constraints, so that the path of the unmanned ship is closer to the preset path during the traversal process, while reducing the control difficulty of the unmanned ship and the loss of equipment cost.
[0075] (3) The present invention provides an unmanned ship path planning method based on a hull dynamics constraint model, which models dangerous areas in a map and uses obstacle potential fields to adjust the risk factor, so that the unmanned ship can safely pass through or directly bypass unknown areas, rare animal protection areas and other dangerous areas in the map, effectively reducing the possibility of danger.
[0076] (4) The present invention provides an unmanned ship path planning method based on a hull dynamics constraint model, which re-plans a turning path with a large turning angle in the planned path, so that the unmanned ship can turn smoothly and reach the target point, eliminating the process of smoothing the path, greatly reducing the time for unmanned ship path planning, and reducing the control difficulty of the unmanned ship. BRIEF DESCRIPTION OF THE DRAWINGS
[0077] Figure 1 This is a flow chart of an unmanned ship path planning method based on a hull dynamics constraint model of the present invention;
[0078] Figure 2 It is a diagram of the process of establishing an equivalent model based on obstacles in the present invention;
[0079] Figure 3 It is a diagram of the traversal strategy for maintaining the stability of the ship's posture when planning the turning point of the path according to the present invention;
[0080] Figure 4 It is a diagram of the traversal strategy for maintaining the stability of the ship's posture when there are obstacles on both sides of the path between the ship and the turning point at the planned path turning point of the present invention;
[0081] Figure 5It is a diagram of the traversal strategy for maintaining the stability of the ship's posture when there are obstacles on both sides of the path between the turning point of the planned path and the distance between the turning point and the turning point is equal to the distance between the ship and the turning point;
[0082] Figure 6 It is a diagram of the traversal strategy of the present invention for a short distance path after an inflection point and when encountering continuous inflection points;
[0083] Figure 7 It is a diagram illustrating the deflection hull traversal strategy adopted in the present invention for the influence of wind speed and water current. DETAILED DESCRIPTION
[0084] The present invention is described in detail below with reference to the accompanying drawings.
[0085] The present invention aims at the path planning demand of unmanned boats subject to dynamic constraints in real environment, proposes an unmanned boat path planning method based on hull dynamic constraint model by improving the traditional A* algorithm, makes full use of the advantages of the traditional A* algorithm in global path planning, and aims at the disadvantage that the unmanned boat cannot accurately follow the path in the process of traversing the path planned by the A* algorithm, the problem that the unmanned boat traversal fails due to the existence of dangerous areas in the lake, and the problem that the unmanned boat cannot follow the path in areas with large water flow or wind speed, and proposes a smooth traversal strategy for curves with excessive turning angles using the constraint equations of the hull dynamic model. At the same time, a traversal strategy for avoiding or traversing dangerous areas in the lake by adjusting the danger coefficient using the obstacle potential field is added, as well as a coping strategy for offsetting the areas with large influence of water flow or wind speed by deflecting the hull, which effectively solves the problems that the unmanned boat cannot fit the path in the real environment, is easy to enter the dangerous area, and deviates from the path during the traversal process, significantly shortens the time consumed by path planning, and reduces equipment costs.
[0086] The unmanned ship path planning method based on the hull dynamics constraint model is as follows: Figure 1 As shown, the specific steps are as follows:
[0087] Step 1: collect images of the environment of the monitored lake surface, replace each obstacle in the lake surface environment with an equivalent standard graphic, and obtain the boundary envelope of each standard graphic as an obstacle representation in path planning.
[0088] The specific steps are as follows:
[0089] Step 101: for each obstacle, evenly distribute N sampling points on the boundary contour of the entire obstacle according to the circumference, perform equal-angle sampling, and save the coordinates of all sampling points in the z set;
[0090] The formula is as follows:
[0091] z={z0,z1,z2,.....,zN}
[0092] z k =(x k ,y k ),{k=1,2,3,...,N}
[0093] In the above formula, z0,z1,z2,...,z N Represents each sampling point, x k and k Represents the kth sampling point z k In terms of the position on the horizontal plane coordinate, the larger the N value is, the more accurate the initial model is.
[0094] Step 102: among the obstacles, select an obstacle with a large local depth difference, and soften the coordinates of each sampling point on its boundary;
[0095] First, select the most convex sampling point or the most concave sampling point z with the largest depth difference in the obstacle k , select two adjacent sampling points on both sides in order, and adjust the sampling point z based on the sum and ratio of these five points k The coordinate value of is as follows:
[0096]
[0097] Step 103: Using the processed sampling point coordinates of each obstacle, calculate the projection coordinates of the center of mass of each obstacle on the horizontal plane; assuming that the density of each obstacle is uniform, the formula is as follows:
[0098]
[0099]
[0100] in, and The coordinates of the center of mass of the obstacle correspond to the x-axis and y-axis values; the sampling point z i The coordinates of (x i ,y i );
[0101] 104: Based on the coordinates of the center of mass of each obstacle, establish the boundary envelope equation of the equivalent standard figure of each obstacle / threat;
[0102] The formula is as follows:
[0103]
[0104] Among them, R sis the inertial safety range of the unmanned cruise ship, q, p, a, and b are parameters that determine the shape of the projection of the obstacle on the horizontal plane after it is equivalent, where x is the x-axis coordinate value of the boundary of the obstacle equivalent standard figure on the horizontal plane, and y is the y-axis coordinate value of the boundary of the obstacle equivalent standard figure on the horizontal plane.
[0105] Step 2: Establish a kinematic model to ensure the control of the ship's posture and speed, which is used as the kinematic model of the unmanned ship during path planning;
[0106] The formula is as follows:
[0107] x'=Vcosγcosχ
[0108] y'=Vcosγsinχ
[0109]
[0110] V'=g(n x -sinγ)
[0111]
[0112]
[0113] Where P = [x, y, z] T represents the three-dimensional coordinate position of the unmanned boat; V is the navigation speed of the unmanned boat; γ and χ are the track inclination and track deviation of the unmanned boat respectively; ρ is the water density of the monitored lake surface; V 排 is the volume of the unmanned ship under the horizontal plane; G is the gravity of the unmanned ship; g is the gravity constant; m is the weight of the unmanned ship; n as the control input x ,n y ,n z represents the overload along the x, y, and z axes of the unmanned track system, n z Divided into n zf and n zb , n zf represents the overload of the front half of the unmanned ship along the z-axis, n zb Represents the overload of the rear half of the unmanned ship along the z-axis.
[0114] The above kinematic model also needs to satisfy the following constraints:
[0115] n i ∈[n imin ,n imax ],i=x,y,z
[0116] γ'∈[-γ' min ,γ' max ]
[0117] χ'∈[-χ' min ,χ' max ]
[0118] γ∈[γ min ,γ max ]
[0119] Among them, γ' is the rate of change of the unmanned ship's track inclination angle, that is, the unmanned ship's tilt angular velocity; χ' is the rate of change of the unmanned ship's track deflection angle, that is, the unmanned ship's yaw angular velocity.
[0120] Step 3: Model the dangerous areas that exist in the monitored lake surface except for obstacles or the dangerous areas that exist in the known map as threat areas for path planning.
[0121] The specific process is:
[0122] Step 301: For the current dangerous area in the lake, discretize it into squares with a side length of 1 meter, and preset the danger coefficient ψ of each square and store it in the matrix D;
[0123] The specific formula is as follows:
[0124]
[0125] Among them, the size of matrix D is n×m, the size of the danger coefficient ψ is 0 to 100, when the danger coefficient ψ exceeds 20, the square is an impassable area, if the danger coefficient ψ is lower than 20, the area is a passable area.
[0126] Step 302: According to the obstacles existing around the current dangerous area, an obstacle potential field is introduced to adjust the danger coefficient of each element in the matrix D.
[0127] The formula is as follows:
[0128]
[0129] Among them, i centre and j centre represents the row and column values of the elements in the matrix D, μ is the self-adjusting coefficient, the larger its value is, the higher the sensitivity of the dangerous area to obstacles is, and vice versa. ρ(q,q o ) is the Euclidean distance between the current dangerous area and the surrounding obstacles, ρ o is the influence range of the obstacle, is the self-adjustment coefficient. The larger its value is, the larger the influence range of the obstacle will be, and it will affect more distant dangerous areas. On the contrary, the influence range will become smaller, and only the nearby areas will be affected.
[0130] Step 4: The unmanned boat uses the improved A* algorithm to plan the path from the starting point to the target point, combines the modeling of obstacles and threat areas, and uses turning strategies to adjust the posture of the unmanned boat for the small bends, i.e., turning points, in the path.
[0131] Specifically, first, the ship starts from the starting point and determines whether there are turning points and obstacles between the current path point and the next path point;
[0132] When there is no turning point between two adjacent path points, the unmanned ship moves directly along the path planned by the A* algorithm;
[0133] When there is an inflection point m between two adjacent path points, the following judgment is made:
[0134] 1) On the route from the current i-th path point to the turning point m, there are no obstacles on both sides of the path that is less than or equal to fix(n / N) squares before and after the turning point m. The fix(n / N)-th square after the turning point m is regarded as the i+1-th path point, and the traversal of this path point continues;
[0135] n is a parameter set according to the minimum turning radius R of the hull, and n=3R; N is the side length of a grid during path planning.
[0136] The range of the fix(n / N) grid before and after the inflection point m refers to: the center is the inflection point m, and the side length is 2R s The square range of
[0137] 2) On the route from the current path point i to the turning point m, there are obstacles on both sides of the path less than or equal to fix(n / N) squares before and after the turning point m, that is, the midpoint of the path from the ship to the turning point m is taken as the center, and the side length is R s If there is an obstacle within the square range of , the unmanned boat will first go straight to the turning point m, and then follow the path direction of the turning point m at an angle of 45 degrees. The grid is regarded as the i+1th path point, and then the path direction after reaching the i+1th path point is inclined at 30 degrees. The grid is regarded as the i+2th path point, and then the path direction after reaching the i+2th path point is inclined at 30 degrees. The grid is regarded as the i+3th path point; and so on, the subsequent ones are the path points with an angle of 30 degrees after reaching the previous path point. grid as the next waypoint, until it passes the current turning point m and reaches the next waypoint of the route.
[0138] 3) If there are obstacles on both sides of the path from the inflection point m to the inflection point that is less than or equal to fix(n / N) squares, the midpoint of the path from the inflection point m to the inflection point m is taken as the center, and the side length is R sIf there is an obstacle within the square range, first turn the boat diagonally forward at a 45-degree angle. The grid is regarded as the i+1th path point for traversal, with a 45-degree deflection angle opposite to the direction of the turning point m. After driving to the i+1th path point, the turning point m is regarded as the i+2th path point for traversal.
[0139] If the pre-traversed path point does not reach the fix(n / N)th grid after the turning point, it will directly drive to the farthest point after the turning point.
[0140] If the route planned by the A* algorithm is deviated during the process, the current path point is used as the starting point, and the A* algorithm is used again to plan the path from the current point to the target point until the final target point is reached.
[0141] Step 5: During the actual traversal of the unmanned boat, in the face of the influence of water flow or wind speed on the unmanned boat, a ship stabilization and deflection strategy is added to ensure that the unmanned boat always sails on the planned path.
[0142] The specific steps are as follows:
[0143] First: Using the navigation speed V in the kinematic modeling of the unmanned ship o , combined with the pressure sensors on both sides of the hull to identify the direction and velocity of the water flow V w , calculate the angle α of the hull deflecting in the opposite direction of the water flow;
[0144] The value of α is:
[0145]
[0146] Then, the deflection angle α is used to calculate the component velocity V in the opposite direction of the water flow when the unmanned boat deflects. f ;
[0147] It satisfies the following formula:
[0148] V f =V o ·cos(90°-α)
[0149] V f =V w
[0150] Component speed V f It is used to offset the impact of water flow speed and ensure that the unmanned ship sails on the planned path.
[0151] Example:
[0152] Firstly, images of the lake environment are collected, and obstacles are represented by simple graphics through equivalent replacement.
[0153] like Figure 2 As shown in the figure, the obstacles are sampled at equal angles, N sampling points are evenly distributed on the boundary contour of the entire obstacle, and the coordinates of the sampling points are saved in the z set; the boundary coordinates of obstacles with large local depth differences are softened, and the formula is as follows:
[0154]
[0155] In order to further soften the position with large depth difference, at the most convex or concave point with large depth difference, k Take a sampling point on each side in sequence, and perform summation and ratio adjustment.
[0156] Since obstacle avoidance only considers the shape of obstacles, we assume that the density of obstacles is uniform and find the projection coordinates of their center of mass on the horizontal plane. and Based on the obtained centroid coordinates, the boundary envelope equation of the equivalent standard cylinder of the obstacle / threat is established, and the formula is as follows:
[0157]
[0158] Among them, R s is the inertial safety range of the unmanned cruise ship. q, p, a, and b can determine the projection shape of the obstacle on the horizontal plane after it is equivalent to a cylinder. For example, when q = p and a = b, it is a circle, and the obstacle is equivalent to a cylinder. The area of the equivalent model function should be larger than the area occupied by the original obstacle, which is used for expansion processing.
[0159] Then, since only the path planning problem is considered, the ship control system is set up to control the ship's attitude and speed, and the kinematic model is established;
[0160] There are some dangerous areas in the actual lake surface (for example, unknown areas, rare animal protection areas, ancient tree areas, areas with dense reeds or aquatic plants, etc.). When the hull scans a dangerous area or a dangerous area exists in a known map, it is modeled.
[0161] Specifically:
[0162] 301: Discretize the dangerous area in the lake into squares with a side length of 1 meter, and store the danger coefficient ψ in each square into a matrix D of size n×m. The specific formula is as follows:
[0163]
[0164] The danger coefficient ranges from 0 to 100. When the danger coefficient exceeds 20, the square is an impassable area. If the danger coefficient is less than 20, the area is a passable area. The danger coefficient ψ can be obtained by preset or by determining its value through image recognition technology.
[0165] 302: Since there may be obstacles around the danger zone, if the unmanned ship enters the danger zone, it may encounter danger. However, due to the excessive number of obstacles around the danger zone, the local map situation is relatively complicated, which may eventually lead to collision or grounding. Therefore, an obstacle potential field is introduced to adjust the danger factor.
[0166] The formula is as follows:
[0167]
[0168] Among them, i centre and j centre represents the row and column values of the elements in the matrix D, μ is the self-adjusting coefficient, the larger its value is, the higher the sensitivity of the dangerous area to obstacles is, and vice versa. ρ(q,q o ) is the Euclidean distance between the current dangerous area and the surrounding obstacles, ρ o is the influence range of the obstacle, is the self-adjustment coefficient. The larger its value is, the larger the influence range of the obstacle will be, and it will affect more distant dangerous areas. On the contrary, the influence range will become smaller, and only the nearby areas will be affected.
[0169] Finally, after building the lake surface model, we obtained the two-dimensional coordinate map of the lake surface and the three-dimensional motion model of the ship, and set the starting point and the target point. The improved A* algorithm was used to calculate the optimal path between the starting point and the target point in the map and traverse it.
[0170] The specific process is:
[0171] 401: Use the A* algorithm to plan a path from the starting point to the target point.
[0172] Introducing a heuristic function into the A* algorithm to guide the search direction and omit the search of irrelevant areas has a higher search efficiency. Its expression is:
[0173] f(n)=g(n)+h(n)
[0174] Among them, f(n) represents the estimated cost from the initial point via node n to the target point, g(n) represents the actual cost from the starting point to the current node n, and h(n) represents the estimated cost of the optimal path from the current node n to the target point. Among them, h(n) is usually represented by Euclidean distance, and its formula is as follows:
[0175]
[0176] Among them, (x n ,y n ) is the coordinate of node n in the two-dimensional grid graph, (x goal ,ygoal ) are the coordinates of the target point.
[0177] 402: Since there are small bends in the path, in order to prevent the unmanned ship from deviating from the path due to the turning inertia of the hull, a turning strategy is required to adjust the posture of the unmanned ship.
[0178] Assume N is a grid length, set parameter n = 3R, where R is the minimum turning radius of the hull, and its value is obtained according to the hull dynamics model. When the hull has fix (n / N) steps to reach the turning point, the turning optimization process is performed. The following steps are all performed after the obstacle is expanded. When the hull is traveling at the i-th path point:
[0179] 40201: Set parameter n according to the turning radius R of the hull.
[0180] 40202: If there are still fix(n / N) steps to reach the inflection point, execute the subsequent steps, otherwise traverse along the original path.
[0181] 40203: If there are no obstacles on both sides of the path of fix(n / N) grids before and after the turning point, the fix(n / N)th grid after the turning point is regarded as the i+1th path point, such as Figure 3 shown.
[0182] If there are obstacles on both sides of the path between the ship and the turning point, the ship will first drive to the turning point, and then follow the path after the turning point at an angle of 45 degrees. The grid is regarded as the i+n+1th path point for traversal, and then the 30-degree inclined path point after the turning point is The grid is regarded as the i+n+2th path point for traversal, and finally the 30-degree inclined path point after the turning point is The grid is considered as the i+n+3th path point for traversal, such as Figure 4 shown.
[0183] If there are obstacles on both sides of the path from the turning point to the fix(n / N) after the turning point, first turn the boat 45 degrees diagonally forward. The grid is regarded as the i+1th path point for traversal, where the 45-degree deflection angle is opposite to the direction of the turning point. After driving to the i+1 path point, the turning point is regarded as the i+2th path point for traversal, such as Figure 5 shown.
[0184] If the pre-traversed path point does not reach the fix(n / N)th grid after the turning point, it will directly drive to the farthest point after the turning point, such as Figure 6 shown.
[0185] 403: Since the unmanned boat may be affected by water flow or wind speed in real environment, in order to stabilize the boat, a stable boat deflection strategy is added to the unmanned boat traversal process for adjustment. The specific steps are as follows:
[0186] 40301: The water flow direction and velocity are identified by the pressure sensors on both sides of the hull, where the water flow velocity is V w , the speed of the unmanned ship is V o .
[0187] 40302: Deflect the hull α degrees in the opposite direction of the water flow, where the value of α is:
[0188]
[0189] Among them, the unmanned boat will provide a component velocity in the opposite direction of the water flow due to the deflection, which satisfies the following formula:
[0190] V f =V o ·cos(90°-α)
[0191] V f =V w
[0192] The above steps are Figure 7 Presented in.
Claims
1. A path planning method for an unmanned ship based on a hull dynamics constraint model, characterized in that: The specific steps are as follows: First, collect images of the environment of the monitored lake surface, replace each obstacle in the lake surface environment with an equivalent standard graphic, and obtain the boundary envelope of each standard graphic as the obstacle representation in path planning; The specific steps are as follows: Step 101: for each obstacle, evenly distribute N sampling points on the boundary contour of the entire obstacle according to the circumference, perform equal-angle sampling, and save the coordinates of all sampling points in the z set; The formula is as follows: z={z0,z1,z2,.....,z N } z k (x k ,y k ),k=1,2,3,…,N In the above formula, z0,z1,z2,...,z N Represents each sampling point, x k and k Represents the kth sampling point z k Position in horizontal plane coordinates; Step 102: among the obstacles, select an obstacle with a large local depth difference, and soften the coordinates of each sampling point on its boundary; First, select the most convex sampling point or the most concave sampling point z with the largest depth difference in the obstacle k , select two adjacent sampling points on both sides in order, and adjust the sampling point z based on the sum and ratio of these five points k The coordinate value of is as follows: Step 103: using the processed sampling point coordinates of each obstacle, respectively calculate the projection coordinates of the centroid of each obstacle on the horizontal plane; The formula is as follows: in, and The coordinates of the center of mass of the obstacle correspond to the x-axis and y-axis values; the sampling point z i The coordinates of (x i ,y i ); 104: Based on the coordinates of the center of mass of each obstacle, establish the boundary envelope equation of the equivalent standard figure of each obstacle / threat; The formula is as follows: Among them, R s is the inertial safety range of the unmanned cruise ship, q, p, a, and b are parameters that determine the shape of the projection of the obstacle on the horizontal plane after the obstacle is equivalent, where x is the x-axis coordinate value of the boundary of the obstacle equivalent standard figure on the horizontal plane, and y is the y-axis coordinate value of the boundary of the obstacle equivalent standard figure on the horizontal plane; Then, a kinematic model for controlling the ship's attitude and speed is established as the kinematic model of the unmanned ship during path planning. Next, the dangerous areas existing in the monitored lake surface except for obstacles or the dangerous areas existing in the known map are modeled as threat areas for path planning; Finally, the unmanned boat uses an improved A* algorithm to plan the path from the starting point to the target point, combines the modeling of obstacles and threat areas, and uses turning strategies to adjust the posture of the unmanned boat for the turning points in the path; and in the actual traversal process of the unmanned boat, in the face of the influence of water flow or wind speed on the unmanned boat, a stabilizing ship deflection strategy is added to ensure that the unmanned boat always sails on the planned path.
2. The unmanned ship path planning method based on the hull dynamics constraint model according to claim 1 is characterized in that: The kinematic model of the unmanned ship is as follows: x'=Vcosγcosχ y'=Vcosγsinχ V'=g(n x -sinγ) Where P = [x, y, z] T represents the three-dimensional position of the unmanned boat; V is the navigation speed of the unmanned boat; γ and χ are the track inclination and track deviation of the unmanned boat respectively; ρ is the water density of the monitored lake surface; V 排 is the volume of the unmanned ship under the horizontal plane; G is the gravity of the unmanned ship; g is the gravity constant; m is the weight of the unmanned ship; n as the control input x ,n y ,n z represents the overload along the x, y, and z axes of the unmanned track system, n z Divided into n zf and n zb , n zf represents the overload of the front half of the unmanned ship along the z-axis, n zb represents the overload of the rear half of the unmanned ship along the z-axis; The above kinematic model also needs to satisfy the following constraints: n i ∈[n imin ,n imax ],i=x,y,z γ'∈[-γ' min ,c' max ] x'∈[-x' min ,x' max ] γ∈[γ min ,c max ] Among them, γ' is the rate of change of the unmanned ship's track inclination angle, that is, the unmanned ship's tilt angular velocity; χ' is the rate of change of the unmanned ship's track deflection angle, that is, the unmanned ship's yaw angular velocity.
3. The unmanned ship path planning method based on the hull dynamics constraint model according to claim 1 is characterized in that: The specific process of the hazardous area modeling is as follows: Step 301: For the current dangerous area in the lake, discretize it into squares with a side length of 1 meter, and preset the danger coefficient ψ of each square and store it in the matrix D; The specific formula is as follows: Among them, the size of matrix D is n×m, and the size of the danger coefficient ψ is 0 to 100. When the danger coefficient ψ exceeds 20, the square is an impassable area. If the danger coefficient ψ is less than 20, the area is a passable area. Step 302: adjusting the risk coefficient of each element in the matrix D according to the obstacles existing around the current risk area; The formula is as follows: Among them, i centre and j centre represents the row and column values of the elements in the matrix D, μ is the self-adjustment coefficient, the larger its value is, the higher the sensitivity of the dangerous area to obstacles is, and vice versa; ρ(q,q o ) is the Euclidean distance between the current dangerous area and the surrounding obstacles, ρ o is the influence range of the obstacle, is the self-adjustment coefficient. The larger its value is, the larger the influence range of the obstacle will be, and it will affect more distant dangerous areas. On the contrary, the influence range will become smaller, and only the nearby areas will be affected.
4. The unmanned ship path planning method based on the hull dynamics constraint model according to claim 1 is characterized in that: The improved A* algorithm is used to adjust the posture of the unmanned ship when it passes the turning point, specifically: First, the ship starts from the starting point and determines whether there are turning points and obstacles between the current path point and the next path point. When there is no turning point between two adjacent path points, the unmanned ship moves directly along the path planned by the A* algorithm; When there is an inflection point m between two adjacent path points, the following judgment is made: 1) On the route from the current i-th path point to the turning point m, there are no obstacles on both sides of the path that is less than or equal to fix(n / N) squares before and after the turning point m. The fix(n / N)-th square after the turning point m is regarded as the i+1-th path point, and the traversal of this path point continues; n is a parameter set according to the minimum turning radius R of the hull, and n = 3R; N is the side length of a grid during path planning; The range of the fix(n / N) grid before and after the inflection point m refers to: the center is the inflection point m, and the side length is 2R s The square range of 2) On the route from the current path point i to the turning point m, there are obstacles on both sides of the path less than or equal to fix(n / N) squares before and after the turning point m, that is, the midpoint of the path from the ship to the turning point m is taken as the center, and the side length is R s If there is an obstacle within the square range of , the unmanned boat will first go straight to the turning point m, and then follow the path direction of the turning point m at an angle of 45 degrees. The grid is regarded as the i+1th path point, and then the path direction after reaching the i+1th path point is inclined at 30 degrees. The grid is regarded as the i+2th path point, and then the path direction after reaching the i+2th path point is inclined at 30 degrees. The grid is regarded as the i+3th path point; and so on, the subsequent ones are the path points with an angle of 30 degrees after reaching the previous path point. grid as the next path point, until it passes the current turning point m and reaches the next path point of the route; 3) If there are obstacles on both sides of the path from the inflection point m to the inflection point that is less than or equal to fix(n / N) squares, the midpoint of the path from the inflection point m to the inflection point m is taken as the center, and the side length is R s If there is an obstacle within the square range, first turn the boat diagonally forward at a 45-degree angle. The grid is regarded as the i+1th path point for traversal, where the 45-degree deflection angle is opposite to the direction of the turning point m. After driving to the i+1th path point, the turning point m is regarded as the i+2th path point for traversal; If the pre-traversed path point does not reach the fix(n / N)th grid after the turning point, it will directly drive to the farthest point after the turning point; If the route planned by the A* algorithm is deviated during the process, the current path point is used as the starting point, and the A* algorithm is used again to plan the path from the current point to the target point until the final target point is reached.
5. The unmanned ship path planning method based on the hull dynamics constraint model according to claim 1 is characterized in that: The specific steps of the unmanned ship stabilization and deflection strategy are as follows: First: Using the navigation speed V in the kinematic modeling of the unmanned ship o , combined with the pressure sensors on both sides of the hull to identify the direction and velocity of the water flow V w , calculate the angle α of the hull deflecting in the opposite direction of the water flow; The value of α is: Then, the deflection angle α is used to calculate the component velocity V in the opposite direction of the water flow when the unmanned boat deflects. f ; It satisfies the following formula: V f =V o ·cos(90°-a) V f =V w Component speed V f It is used to offset the impact of water flow speed and ensure that the unmanned ship sails on the planned path.
