Water transport ship trajectory generation method based on radar data
By using a radar-based method for generating waterway vessel trajectories, and employing improved DBSCAN and KM algorithms for clustering and matching, combined with Kalman filtering for state estimation, the problem of poor vessel detection accuracy within waterways is solved, enabling efficient and accurate monitoring of vessels within waterways.
Patent Information
- Application Number
- CN202510814469.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-11-18
AI Technical Summary
Existing methods for detecting ships in waterways suffer from poor accuracy. Traditional manual patrols cannot provide comprehensive and efficient monitoring of large water areas, while AIS systems have limited coverage and are susceptible to malfunctions or human interference.
The method for generating waterway vessel trajectories based on radar data generates the waterway range on a global coordinate system, cleans the data, uses an improved DBSCAN algorithm to cluster and generate target clusters, combines the KM algorithm and Kalman filtering to perform vessel object matching and state estimation, and finally uses a heuristic algorithm to optimize the state components and output vessel trajectory data.
It has improved the accuracy of ship detection within waterways, enabling real-time and efficient monitoring of large areas of water, and enhancing the accuracy and stability of detection.
Smart Images

Figure CN120972157A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of waterway transportation information processing technology, and in particular relates to a method for generating waterway vessel trajectories based on radar data. Background Technology
[0002] With the continuous development of the global economy and the increasing volume of international trade, water transportation, as an efficient, environmentally friendly, and cost-effective mode of transport, has gradually become an important pillar of the economies of various countries. As the shipping industry continues to develop, the number of vessels in waterways is constantly increasing, the transport density is growing year by year, and the types of vessels are becoming increasingly diversified. Therefore, the pressure on waterway management is also constantly increasing, and traditional waterway transport management models can no longer meet the needs of modern water transport development.
[0003] Currently, the main methods for detecting vessels in waterways include traditional manual inspections and AIS (Automatic Identification System) monitoring. Manual inspections rely on human observation and are suitable for localized and real-time checks, but cannot comprehensively and efficiently monitor large areas of water. AIS systems are widely used for automatic vessel position reporting and trajectory monitoring, providing relatively accurate vessel dynamic information, but they also have limited coverage and are susceptible to malfunctions or human interference. Overall, existing methods for detecting vessels in waterways suffer from poor accuracy. Summary of the Invention
[0004] This application provides a method for generating waterway vessel trajectories based on radar data, which can solve the problem of poor accuracy in existing methods for detecting vessels in waterways.
[0005] In a first aspect, embodiments of this application provide a method for generating waterway vessel trajectories based on radar data, comprising: S1, generating the effective range of the waterway in a global coordinate system according to the location of the radar base station and the relative coordinate relationship between the waterway and the radar; S2, acquiring each frame of radar data output by the radar and cleaning the radar data according to a preset filtering rule; S3, clustering the radar data according to the improved DBSCAN algorithm to generate multiple target clusters, and determining each target cluster as a detection target; S4, matching the vessel object with multiple detection targets according to the KM algorithm to generate matching results; S5, performing optimal state estimation on the vessel object based on the matching results; S6, optimizing the state components of the vessel object after optimal state estimation using a heuristic algorithm; S7, outputting the trajectory data of the vessel object, wherein the trajectory data includes the real-time position and vehicle status of the vessel object.
[0006] In one possible implementation of the first aspect, the preset filtering rules in step S2 above include removing radar data outside the effective range of the channel, removing detection points in radar data that remain stationary for more than a preset time, removing detection points in radar data with a negative velocity relative to the channel direction, and removing point cloud data in radar data with a detection intensity lower than a preset threshold.
[0007] Optionally, in another possible implementation of the first aspect, in step S3 above, the radar data is clustered according to the improved DBSCAN algorithm to generate multiple target clusters, and each target cluster is identified as a detection target, including:
[0008] Collect point cloud data from multiple consecutive frames;
[0009] Position correction is performed on point cloud data assuming uniform target motion;
[0010] Based on the channel direction, density clustering of point cloud data is performed using a rectangular search area and a dynamically maintained point cloud distance table to generate multiple target clusters. The long side of the rectangular search area is the longitudinal direction of the channel, and the short side is the transverse direction of the channel.
[0011] Each target cluster is identified as a detection target.
[0012] Optionally, in another possible implementation of the first aspect, the above-mentioned dynamic maintenance of the point cloud distance table includes:
[0013] At the initial moment, all point cloud data are arranged in chronological order, and the two-dimensional Euclidean distance between each pair of point clouds is calculated and recorded to form a two-dimensional distance table.
[0014] During each iteration of density clustering, the point cloud pair data of the first frame in the two-dimensional distance table is deleted, and the point cloud pair data of the current frame in the current iteration is added to the end of the two-dimensional distance table.
[0015] Calculate the Euclidean distance between the current frame point cloud pair data and the point cloud pair data retained after the end of the previous frame, and fill it into the two-dimensional distance table.
[0016] Optionally, in another possible implementation of the first aspect, after determining each target cluster as a detection target as described above, the following is included:
[0017] For the target clusters generated by clustering, the point cloud data is weighted according to the radar cross section (RCS) intensity to calculate the attributes of the detected targets;
[0018] The straight line that is parallel to the waterway and detects the target coordinates will be used as the reference line;
[0019] Taking the reference line as a benchmark, select the point cloud with the largest absolute value of the difference between the vertical coordinates among the target coordinates in the target cluster, and determine the absolute value as the length of the detection target;
[0020] Taking the reference line as a benchmark, select the point cloud with the largest absolute value of the difference between the horizontal coordinates among the target coordinates in the target cluster, and determine the absolute value as the width of the detection target.
[0021] Optionally, in another possible implementation manner of the first aspect, in the above step S4, the ship object and multiple detection targets are matched according to the KM algorithm to generate a matching result, including:
[0022] Construct a weighted bipartite graph of the ship object and multiple detection targets, where the weight of the edge of the weighted bipartite graph is the Euclidean distance between the ship object and multiple detection targets;
[0023] Remove the edges of the weighted bipartite graph whose Euclidean distance is greater than the preset threshold;
[0024] Solve the maximum augmenting path of the weighted bipartite graph to obtain the matching result.
[0025] Optionally, in another possible implementation manner of the first aspect, in the above step S5, according to the matching result, an optimal state estimation of the ship object is performed, including:
[0026] When the matching result is a successful match, obtain the Kalman gain of the current state estimation measurement value on the state of the ship object, and perform weighted calculation according to the Kalman gain to obtain the optimal estimation of the ship state;
[0027] When the matching result is an unsuccessful match, perform a linear state prediction on the ship object to obtain a predicted value, and use the predicted value as the optimal estimation of the ship state.
[0028] Optionally, in another possible implementation manner of the first aspect, in the above step S6, a heuristic algorithm is used to optimize the state components after the optimal state estimation of the ship object, including:
[0029] Optimization of the ship length state: Set the counting parameter n and the ranking parameter m, m < n, obtain the ship trajectory length estimation results of the first n frames, and perform a descending order sorting to select the data value l ranked at the mth place m , let the currently unoptimized length estimation value be l k , the optimized ship length value l is:
[0030]
[0031] Optimization of the ship height state: Set the counting upper limit parameter p, and count the ship height state estimation values (h1, h2, h3,..., hp ), and calculate the mean as h. avg ; Obtain the optimized ship stability height value h from the previous frame. c If the current time is the first frame, its initial value is the radar detection target corresponding to the first frame of the ship object; the stable threshold parameter δ for the ship's height is set, and the optimization formula for the ship's height h at the current time is as follows:
[0032]
[0033] State optimization of ship speed: Extracting the estimated optimal speed value v of the ship in its optimal state. kalman Calculate the variable range of ship speed [v] min ,v max The optimal value of ship speed v opt Calculate using the following formula:
[0034]
[0035] State optimization of ship position is based on the variable range of ship speed [v] min ,v max If the ship's forward heading angle is w, then the calculation method for ship position optimization is as follows:
[0036]
[0037] Where, x opt y opt These are the optimized x and y coordinates of the ship's position at the current moment, x kalman y kalman This is the Kalman filter state estimation result of the ship in the current frame, x pre y pre These are the optimized horizontal and vertical coordinates of the ship's position at the previous moment.
[0038] Optionally, in another possible implementation of the first aspect, the aforementioned variable range of ship speed [v] min ,v max v in ] max It is calculated based on the ship's maximum acceleration 'a':
[0039] v max =v pre +aΔt (5)
[0040] v min It is obtained based on statistical data of the ship's historical minimum estimated speed. min It is the g-th smallest estimated velocity value in the (T-α,T) time interval, where α is the preset time range and g is the lowest priority selection parameter.
[0041] In this technical solution, the effective range of the waterway is first generated in a global coordinate system based on the location of the radar base station and the relative coordinate relationship between the waterway and the radar. Then, each frame of radar data output by the radar is acquired, and the radar data is cleaned according to preset filtering rules. Next, the radar data is clustered into multiple target clusters using an improved DBSCAN algorithm, and each target cluster is identified as a detection target. Then, the ship object is matched with multiple detection targets using the KM algorithm to generate matching results. Based on the matching results, the optimal state of the ship object is estimated. A heuristic algorithm is used to optimize the state components after the optimal state estimation, and the trajectory data of the ship object is output. Thus, trajectory information including the real-time position and state of the ship target can be obtained, thereby improving the detection accuracy of ships within the waterway. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0043] Figure 1 This is a flowchart illustrating a method for generating waterway vessel trajectories based on radar data, provided in an embodiment of this application.
[0044] Figure 2 This is a schematic flowchart of the "distance table windowing method" used in a clustering algorithm provided in an embodiment of this application;
[0045] Figure 3 This is a schematic diagram of the ship trajectory data provided in the embodiments of this application. Detailed Implementation
[0046] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0047] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0048] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0049] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0050] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0051] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0052] The following is a detailed description of a method for generating waterway vessel trajectories based on radar data, provided in this application, with reference to the accompanying drawings.
[0053] Figure 1 The illustration shows a flowchart of a method for generating waterway vessel trajectories based on radar data, provided in an embodiment of this application.
[0054] like Figure 1 As shown, the method for generating waterway vessel trajectories based on radar data includes the following steps:
[0055] S1. Based on the location of the radar base station and the relative coordinate relationship between the waterway and the radar, generate the effective range of the waterway in the global coordinate system.
[0056] S2. Acquire each frame of radar data output by the radar and clean the radar data according to preset filtering rules;
[0057] It should be noted that the preset filtering rules in step S2 above include removing radar data outside the effective range of the channel, removing detection points in radar data that remain stationary for more than a preset time, removing detection points in radar data with a negative velocity relative to the channel direction, and removing point cloud data in radar data with a detection intensity lower than a preset threshold.
[0058] S3. Based on the improved DBSCAN algorithm, the radar data is clustered to generate multiple target clusters, and each target cluster is identified as a detection target.
[0059] Furthermore, in this embodiment of the application, step S3 includes:
[0060] S31. Collect point cloud data from multiple consecutive frames;
[0061] S32. Perform position correction on the point cloud data assuming the target is moving at a constant speed;
[0062] S33. Based on the channel direction, use a rectangular search area and dynamically maintain a point cloud distance table to perform density clustering on the point cloud data to generate multiple target clusters. The long side of the rectangular search area is the longitudinal direction of the channel, and the short side is the transverse direction of the channel.
[0063] S34. Each target cluster is identified as a detection target.
[0064] It should be noted that the method for dynamically maintaining the point cloud distance table in step S33 above is as follows:
[0065] At the initial moment, all point cloud data are arranged in chronological order, and the two-dimensional Euclidean distance between each pair of point clouds is calculated and recorded to form a two-dimensional distance table.
[0066] During each iteration of density clustering, the point cloud pair data of the first frame in the two-dimensional distance table is deleted, and the point cloud pair data of the current frame in the current iteration is added to the end of the two-dimensional distance table.
[0067] Calculate the Euclidean distance between the current frame point cloud pair data and the point cloud pair data retained after the end of the previous frame, and fill it into the two-dimensional distance table.
[0068] Furthermore, in this embodiment of the application, after step S34, the following step is also included:
[0069] For the target clusters generated by clustering, the point cloud data is weighted according to the radar cross section (RCS) intensity to calculate the attributes of the detected targets;
[0070] The straight line that is parallel to the waterway and detects the target coordinates will be used as the reference line;
[0071] Taking the reference line as a benchmark, select the point cloud with the largest absolute value of the difference between the vertical coordinates among the target coordinate points in the target cluster, and determine the absolute value as the detected target length;
[0072] Taking the reference line as a benchmark, select the point cloud with the largest absolute value of the difference between the horizontal coordinates among the target coordinate points in the target cluster, and determine the absolute value as the detected target width.
[0073] S4. Match the ship object with multiple detection targets according to the KM algorithm to generate a matching result;
[0074] Furthermore, in the embodiment of the present application, the above step S4 includes:
[0075] Construct a weighted bipartite graph of the ship object and multiple detection targets, and the weight of the edge of the weighted bipartite graph is the Euclidean distance between the ship object and multiple detection targets;
[0076] Remove the edges of the weighted bipartite graph whose Euclidean distance is greater than the preset threshold;
[0077] Solve the maximum augmenting path of the weighted bipartite graph to obtain the matching result.
[0078] S5. Perform optimal state estimation on the ship object according to the matching result;
[0079] [[ID=2State optimization for ship height: Set an upper limit parameter p for counting, and count the estimated ship height state values (h1, h2, h3, ..., h) for the first p frames. p ), and calculate the mean as h. avg ; Obtain the optimized ship stability height value h from the previous frame. c If the current time is the first frame, its initial value is the radar detection target corresponding to the first frame of the ship object; the stable threshold parameter δ for the ship's height is set, and the optimization formula for the ship's height h at the current time is as follows:
[0087]
[0088] State optimization of ship speed: Extracting the estimated optimal speed value v of the ship in its optimal state. kalman Calculate the variable range of ship speed [v] min ,v max The optimal value of ship speed v opt Calculate using the following formula:
[0089]
[0090] State optimization of ship position is based on the variable range of ship speed [v] min ,v max If the ship's forward heading angle is w, then the calculation method for ship position optimization is as follows:
[0091]
[0092] Where, x opt y opt These are the optimized x and y coordinates of the ship's position at the current moment, x kalman y kalman This is the Kalman filter state estimation result of the ship in the current frame, x pre y pre These are the optimized horizontal and vertical coordinates of the ship's position at the previous moment.
[0093] It should be noted that the above-mentioned range of ship speed variation [v] min ,v max v in ] max It is calculated based on the ship's maximum acceleration 'a':
[0094] v max =v pre +aΔt (5)
[0095] v min It is obtained based on statistical data of the ship's historical minimum estimated speed. minIt is the g-th smallest estimated velocity value in the (T-α,T) time interval, where α is the preset time range and g is the lowest priority selection parameter.
[0096] S7. Output the trajectory data of the ship object, which includes the real-time position and vehicle status of the ship object.
[0097] For example, the technical solution of this application will be described below using an embodiment.
[0098] P1. Generate the effective navigation channel range.
[0099] The technical solution of this embodiment is based on the fact that the inland waterway has already established a waterway boundary range in a certain coordinate system. This range is the effective two-dimensional horizontal space for ships to travel within the waterway. Specifically, there are several methods to construct the effective boundary range of the waterway. First, using raw radar data over a period of time, a statistical heat map of point cloud data is generated based on the data points of each frame. The approximate boundary line of the inland waterway can be drawn based on the heat map. Then, the approximate effective range of the waterway is drawn based on the boundary line. In addition, if there are relevant topographic maps of the waterway and radar installation location maps, the boundary line range of the waterway can be corrected by combining the maps.
[0100] P2. Acquire each frame of radar data output by the radar used for ship detection in the waterway, and clean the data according to the set filtering rules.
[0101] Radar data refers to the data output by one or more radars installed at a certain location on the bank of the inland waterway or at a base station to detect ships. Because radar data is output frame by frame in chronological order, the data acquisition here is also to acquire each frame of radar data in chronological order and send it to the memory of the electronic computing device system for real-time processing.
[0102] The purpose of radar data filtering is to eliminate interference from invalid data and obtain valid radar data from the original radar data through filtering. The specific filtering scheme is as follows:
[0103] First, the ray method is used to determine whether there are any original radar detection points outside the effective range of the channel in the original radar data. The original radar detection points located outside the channel boundary line are filtered out, leaving only the original radar detection points located inside the lane line. This is because radar points outside the channel are mostly invalid data such as reefs and shore buildings that are not ship points, and these points need to be removed.
[0104] Secondly, the velocity vector of the original radar detection point within the channel is calculated as a component vector relative to the longitudinal direction of the channel. This component vector represents the velocity of the original radar detection point relative to the channel. This component vector is then evaluated to determine if any original radar detection point has a negative vector value. If such a negative vector exists with an absolute value greater than 2 m / s, it is filtered out. In other words, these filtered-out original radar detection points move in the opposite direction along the channel. Considering that in reality, the number of reverse-direction false targets detected by radar due to multipath effects when ships travel in the opposite direction along the channel is much lower than the number of such targets detected by radar, this filtering rule can effectively filter out false radar targets.
[0105] Then, the original radar detection points that are stationary for a long time within the channel, but are actually moving targets, are filtered out as they pass through and cover the hull area. Due to the influence of isolated reefs and reflections from fixed navigation marks within the channel, the radar often detects false targets that have been stationary for a long time. The duration of this "long-term stationary" period can be determined through field experiments, such as one hour or one day. In reality, ships in motion cannot overlap and pass through stationary ships. Therefore, the method of using moving targets to pass through stationary targets is used to distinguish between real ship targets that have stopped within the channel due to malfunctions or other factors and stationary false targets, thus filtering out the stationary false targets.
[0106] Finally, radar point cloud data with detection intensity below a set threshold are filtered out. The detection intensity of radar point cloud can be represented by the radar cross-section (RCS) attribute. Radar point cloud with excessively low detection intensity is likely clutter points of non-ship targets and needs to be removed.
[0107] P3. Cluster the filtered radar data and generate detection targets.
[0108] Clustering refers to the process of grouping a large number of discrete spatial point clouds acquired by radar according to their spatial location, density, shape, and other characteristics. Each group is considered to represent an independent object or structure. Clustering the point cloud of radar-detected waterborne vessels can filter out isolated points and noise, selecting the vessel targets. The clustered results can be used for subsequent continuous tracking of dynamic targets. DBSCAN is a commonly used unsupervised clustering algorithm. This algorithm determines whether a "cluster" can be formed by judging whether the number of points in a certain region exceeds a certain threshold. It is suitable for processing irregularly shaped and noisy data, such as radar point clouds. However, due to the limitations of radar performance, in many cases, the number of point clouds detected by radar at a certain moment is small. The quantity and quality of such point clouds are difficult to support target clustering. Therefore, a variant clustering method based on the DBSCAN algorithm is proposed here.
[0109] Let the cumulative frame parameter m be set, and assume that the original point cloud set detected by radar K at each time step is clusterList. K Then, at time T, the cluster list of all point clouds detected by radar at time points (T-m+1, T-m+2, ..., T) for a total of m times is generated. T-m+1 ∪clusterList T-m+2 ∪......∪clusterList T This serves as the set of data points applied to the clustering algorithm at the current moment. However, since radar detection points are mobile, it is necessary to make corresponding corrections to the information of data points at different times. For example, the interval between millimeter-wave radar data detection and transmission is approximately 50 to 100 milliseconds. Within such a short time, it can be assumed that the point cloud target moves at a constant speed from the previous frame to the current frame. Therefore, the correction equation for the original point cloud data at a certain time K, applied to the coordinate values at the current time T, is as follows:
[0110] x T,K =x K +vx K ×Δt
[0111] y T,K =y K +vy K ×Δt
[0112] In the formula x T,K y T,K It is the positional correction coordinate of the point cloud data collected at time K at the current time T, x K y K It is the location information of the point cloud data collected at time K, vx K vy K This represents the velocity information of the point cloud data collected at time K, where Δt is the time difference between time K and time T. After correcting the coordinate information of the point cloud data, clustering is performed on the data set of m frames. Since the direction of the channel is defined, the longitudinal direction of the channel is used as the long side of the rectangular search, and the transverse direction of the channel is used as the short side of the rectangular search clustering, performing DBSCAN rectangular search clustering.
[0113] DBSCAN clustering has high computational complexity, primarily because it requires calculating the distance between each pair of point cloud data. For a set of m frames of point cloud data, the computational cost of clustering is approximately m times the cost of clustering a single frame of point cloud data. 2 To reduce computational costs without affecting the core logic of the DBSCAN clustering algorithm, a "distance table windowing method" is proposed to reduce the number of times the clustering algorithm calculates the distances between point cloud pairs. The specific steps are as follows:
[0114] The distances of the initial clustered point clouds are divided and arranged in chronological order, and plotted into a "two-dimensional distance table," which is then retained. Figure 2 As shown;
[0115] Each time clustering is repeated in an iteration cycle, the point cloud distance pair 301 data related to the first frame of the "two-dimensional distance table" timeline is deleted to obtain a new table 302 after deletion. This table retains the distance data results of point cloud pairs from previous frames except for the first frame.
[0116] Add the point cloud pair data 303 from the current iteration period to the end of the new table, and only calculate the distance between the current frame's point cloud pair itself and the distance to the data from previous frames, filling this table. Since the current frame only calculates the point cloud distance pairs between itself and the data from previous frames, the distance results of other frames are retained from the distance table of the previous frame, thus saving most of the computational overhead. This new distance table, 302+303, formed by deleting the data from the first frame and adding the data from the current frame, can be retained and applied to the clustering of the next time frame using the same method, as detailed below. Figure 2 As shown.
[0117] After applying the clustering algorithm, the RCS weighted method is used to calculate the attributes of the generated detection targets and generate the corresponding detection targets. For example, the following formula is used to calculate the coordinates and velocity of the detection points:
[0118]
[0119] All other attributes of the detected target can be calculated using this method. However, it should be noted that the length and width of the detected target need to be calculated separately. The recommended calculation method is to use the principle of selecting the maximum bounding box. That is, based on the coordinates of the detection point, find a straight line that passes through the coordinate point and is parallel to the channel. Using this straight line as a reference line, select the point that is furthest from the detection coordinates in the vertical direction among all cluster points. Its vertical distance is the length of the detected target. Correspondingly, select the point that is furthest from the detection coordinates in the horizontal direction. Its horizontal distance is the width of the detected target.
[0120] P4. Match ship objects with clustered targets detected by radar.
[0121] The KM matching algorithm and the Kalman filter algorithm are used to estimate the state of ship objects and cluster targets. Specifically, the KM matching algorithm is a matching algorithm with the goal of minimizing the global total cost. A matching threshold parameter is set, and a weighted bipartite graph of ship object points and target points is established. The weight is the matching degree between ship object points and target points, which is generally directly represented by distance. A distance threshold parameter is set, and the optimal matching result is obtained by solving the maximum augmenting path of the weighted bipartite graph.
[0122] P5. Perform optimal state estimation for the ship object.
[0123] Kalman filtering is a trajectory tracking method for estimating and predicting the state of an object (such as position and speed). By fusing measurement data and the system motion model, it improves the accuracy and stability of trajectory tracking. The Kalman filtering algorithm is used to optimally estimate the state of ship targets. First, a one-step linear state prediction is applied to all ship objects. Then, the clustering targets are KM-matched with the predicted ship targets, and the real-time position and information of the ship targets at the current moment are updated according to the matching results.
[0124] Specifically, if a ship target matches a clustering target generated from radar point clouds, the radar measurement noise and state prediction noise are set according to the channel environment, the noise covariance matrix is updated, and the Kalman gain of the radar measurement value at the current moment for the state of the ship object is obtained, and the optimal state estimate of the ship object at the current moment is obtained by weighting.
[0125] If a ship target does not match any clustering targets generated from radar point clouds, only a one-step linear state prediction is performed. Since there is no corresponding observation value, the information gain of the observation data for this ship target is 0, and the detection data of this frame does not affect the state estimate of the ship. Therefore, the predicted value is used as the optimal state estimate of the ship state at the current moment.
[0126] P6. A heuristic algorithm is used to optimize the ship state components.
[0127] After the optimal state estimate of the ship trajectory, due to the complex conditions of the channel, the physical characteristics of the radar detection targets, and environmental noise, the accuracy of the ship state estimate still needs to be further improved. Here, a heuristic method is proposed to optimize each typical state component of the ship.
[0128] For the optimization of the state estimate of the ship length, due to the characteristics of radar detection of objects, when the orientation of the object changes relative to the radar direction or is blocked by other objects, it is easy to cause a decrease in the number of detected point clouds, resulting in a large underestimation error in the calculation of the target length. Therefore, the following method is used for the optimization and correction of the length estimate: Set the counting parameter n and the ranking parameter m, where m < n. Obtain the length state estimate results of the ship trajectory in the previous n frames. Note that this length value is the state estimate result of the Kalman filtering algorithm. Sort these n length data in descending order, and select the m-th data as the reference value, denoted as l m , the unoptimized length estimate value of the current frame is l k , then the current optimized ship length value l is:
[0129]
[0130] Ship height is a crucial indicator for radar data acquisition of ships, as waterways and bridges impose specific height restrictions on vessels. The optimization of ship height state estimation employs the following method: A counting upper limit parameter p is set, and the estimated ship height state values (h1, h2, h3, ..., h) for the previous p frames, including the current frame, are statistically analyzed. p ), and calculate the mean as h. avg At the same time, a ship stability height value h is set. c Its initial value can be set to the radar detection target corresponding to the first frame of the ship target. If it is not the initial value, then the optimized stable ship height value of the previous frame is used, and a stable threshold parameter δ for the ship height is set. Then the optimization formula for the ship height h at the current moment is as follows:
[0131]
[0132] The state estimation of ship speed and position sometimes exhibits oscillations. This is because the clustering results of detection points are easily affected by the radar's detection intensity of ship targets. If the quality of the current radar target point cloud is low, it will cause a significant error in the position and size of the clustered bounding box compared to the actual target position. Therefore, it is necessary to optimize the ship's speed and position state. Optimizing the ship speed state estimation first involves extracting the optimal estimated speed value v of the ship at the current moment obtained from the previous tracking step. kalman Next, the variable range of ship speed [v] is calculated. min ,v max ], v max Based on the ship's maximum acceleration 'a', the optimized ship speed at the previous moment was v. pre If the time difference between the previous moment and the current moment is Δt, then v max =v pre +aΔt. v min Based on statistical data of the ship's historical minimum state estimated speed, and selecting a time range α and a minimum selection parameter g, then v min The value is the g-th smallest estimated velocity value in time (T-α,T). v is obtained. min and v max Then, the optimal value of the ship's speed v opt Calculate using the following formula:
[0133]
[0134] The optimization of the ship's position is based on the aforementioned speed variation range [v] min ,v maxThe ship's position change within a frame is constrained by its speed. Therefore, if the ship's forward heading angle is w (in radians), the ship's position optimization is calculated as follows:
[0135]
[0136] In the formula x opt y opt These are the optimized x and y coordinates of the ship's position at the current moment, x kalman y kalman This is the Kalman filter state estimation result of the ship in the current frame, x pre y pre These are the optimized horizontal and vertical coordinates of the ship's position at the previous moment.
[0137] P7. Output the trajectory data of the ship target. The ship trajectory data includes the real-time position of the ship target and the vehicle status.
[0138] That is, after obtaining the real-time position and status of all vessels within the waterway through the above processing, the trajectory data of all vessels is output. This trajectory data includes the real-time position and vessel status, such as... Figure 3 As shown.
[0139] This application provides a method for generating waterway vessel trajectories based on radar data. First, the effective range of the waterway is generated in a global coordinate system based on the radar base station location and the relative coordinate relationship between the waterway and the radar. Then, each frame of radar data output by the radar is acquired, and the radar data is cleaned according to preset filtering rules. Next, the radar data is clustered into multiple target clusters using an improved DBSCAN algorithm, and each target cluster is identified as a detection target. Then, the vessel object is matched with multiple detection targets using the KM algorithm to generate matching results. Based on the matching results, the optimal state of the vessel object is estimated. A heuristic algorithm is used to optimize the state components after the optimal state estimation, and the trajectory data of the vessel object is output. Thus, trajectory information including the real-time position and state of the vessel target can be obtained, thereby improving the detection accuracy of vessels within the waterway.
[0140] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0141] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0142] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for generating waterway vessel trajectories based on radar data, characterized in that, The method includes: S1. Based on the location of the radar base station and the relative coordinate relationship between the waterway and the radar, generate the effective range of the waterway in the global coordinate system. S2. Acquire each frame of radar data output by the radar and clean the radar data according to preset filtering rules; S3. Based on the improved DBSCAN algorithm, the radar data is clustered to generate multiple target clusters, and each target cluster is identified as a detection target. S4. Match the ship object with multiple detection targets according to the KM algorithm to generate matching results; S5. Based on the matching results, perform optimal state estimation for the ship object; S6. Optimize the state components of the ship object after optimal state estimation using a heuristic algorithm; S7. Output the trajectory data of the ship object, which includes the real-time position and vehicle status of the ship object.
2. The method for generating waterway vessel trajectories as described in claim 1, characterized in that, The preset filtering rules in step S2 include removing radar data outside the effective range of the waterway, removing detection points in radar data that remain stationary for more than a preset time, removing detection points in radar data with a negative velocity relative to the waterway direction, and removing point cloud data in radar data with a detection intensity lower than a preset threshold.
3. The method for generating waterway vessel trajectories as described in claim 2, characterized in that, In step S3, the radar data is clustered according to the improved DBSCAN algorithm to generate multiple target clusters, and each target cluster is identified as a detection target, including: Collect point cloud data from multiple consecutive frames; Position correction is performed on point cloud data assuming uniform target motion; Based on the channel direction, density clustering of point cloud data is performed using a rectangular search region and a dynamically maintained point cloud distance table to generate multiple target clusters. The long side of the rectangular search region is the longitudinal direction of the channel, and the short side is the transverse direction of the channel. Each target cluster is identified as a detection target.
4. The method for generating waterway vessel trajectories as described in claim 3, characterized in that, The dynamically maintained point cloud distance table includes: At the initial moment, all point cloud data are arranged in chronological order, and the two-dimensional Euclidean distance between each pair of point clouds is calculated and recorded to form a two-dimensional distance table. During each iteration of density clustering, the point cloud pair data of the first frame in the two-dimensional distance table is deleted, and the point cloud pair data of the current frame in the current iteration is added to the end of the two-dimensional distance table. Calculate the Euclidean distance between the current frame point cloud pair data and the point cloud pair data retained after the end of the previous frame, and fill it into the two-dimensional distance table.
5. The method for generating waterway vessel trajectories as described in claim 4, characterized in that, After determining each target cluster as a detection target, the process includes: For the target clusters generated by clustering, the point cloud data is weighted according to the radar cross section (RCS) intensity to calculate the attributes of the detected targets; The straight line that is parallel to the waterway and detects the target coordinates will be used as the reference line; Using the reference line as a benchmark, select the point cloud with the largest absolute value of the difference between the ordinates of the target coordinate points in the target cluster, and determine the absolute value as the length of the detected target; Using the reference line as a baseline, select the point cloud in the target cluster that has the largest absolute value of the difference between the horizontal coordinates of the target coordinate points, and determine the absolute value as the width of the detected target.
6. The method for generating waterway vessel trajectories as described in claim 5, characterized in that, In step S4, the ship object is matched with multiple detection targets according to the KM algorithm to generate matching results, including: Construct a weighted bipartite graph of the ship object and multiple detection targets, wherein the weight of the edge of the weighted bipartite graph is the Euclidean distance between the ship object and the multiple detection targets; Remove edges from a weighted bipartite graph where the Euclidean distance is greater than a preset threshold; Find the maximum augmenting path in the weighted bipartite graph and obtain the matching result.
7. The method for generating waterway vessel trajectories as described in claim 6, characterized in that, In step S5, based on the matching results, the optimal state of the ship object is estimated, including: When the matching result is successful, obtain the Kalman gain of the current state estimate measurement on the ship object state, and calculate the optimal estimate of the ship state based on the weighted Kalman gain. When the matching result is unsuccessful, linear state prediction is performed on the ship object to obtain the predicted value, and the predicted value is used as the optimal estimate of the ship's state.
8. The method for generating waterway vessel trajectories as described in claim 7, characterized in that, In step S6, a heuristic algorithm is used to optimize the state components of the ship object after optimal state estimation, including: State optimization of ship length: Set the counting parameter n and the ranking parameter m, where m < n. Obtain the estimated results of the ship trajectory lengths for the first n frames, sort them in descending order, and select the data value l ranked at the m-th position. m Let the current unoptimized length estimate be l. k The optimized ship length value l is: State optimization for ship height: Set an upper limit parameter p for counting, and count the estimated ship height state values (h1, h2, h3, ..., h) for the first p frames. p ), and calculate the mean as h. avg ; Obtain the optimized ship stability height value h from the previous frame. c If the current time is the first frame, its initial value is the radar detection target corresponding to the first frame of the ship object; the stable threshold parameter δ for the ship's height is set, and the optimization formula for the ship's height h at the current time is as follows: State optimization of ship speed: Extracting the estimated optimal speed value v of the ship in its optimal state. kalman Calculate the variable range of ship speed [v] min ,v max The optimal value of ship speed v opt Calculate using the following formula: State optimization of the ship's position is based on the variable range of the ship's speed [v] min ,v max If the ship's forward heading angle is w, then the calculation method for ship position optimization is as follows: Where, x opt y opt These are the optimized x and y coordinates of the ship's position at the current moment, x kalman y kalman This is the Kalman filter state estimation result of the ship in the current frame, x pre y pre These are the optimized horizontal and vertical coordinates of the ship's position at the previous moment.
9. The method for generating waterway vessel trajectories as described in claim 8, characterized in that, The variable range of the ship's speed [v min ,v max v in ] max It is calculated based on the ship's maximum acceleration 'a': v max =v pre +aΔt (5) v min It is obtained based on statistical data of the ship's historical minimum estimated speed. min It is the g-th smallest estimated velocity value in the (T-α,T) time interval, where α is the preset time range and g is the lowest priority selection parameter.