A GPU-accelerated sensor fusion method based on data segmentation

By processing lidar and millimeter-wave radar data in segments on the GPU and using the Kalman filter algorithm for parallel processing, the fast and accurate fusion of lidar and millimeter-wave radar data is achieved, solving the problem of slow processing speed in the existing technology. question.

CN118962663BActive Publication Date: 2025-01-24北京麟卓信息科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411437660.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-15
Publication Date
2025-01-24
Estimated Expiration
2044-10-15

AI Technical Summary

Technical Problem

When the existing CPU serial method processes large data volumes, it has the problem of slow processing speed, making it difficult to achieve the rapid and accurate integration of lidar and millimeter wave radar data.

Method used

A GPU-accelerated sensor fusion method based on data segmentation is adopted. By acquiring measurement data of lidar and millimeter wave radar, the data is segmented according to the number of stream processor SPs in the GPU, and the Kalman filter tracking algorithm is used to process each data segment in parallel. Achieve rapid data integration.

Benefits of technology

While satisfying the tracking accuracy, it effectively improves the fusion speed and solves the problem of slow processing speed in existing technologies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118962663B_ABST
    Figure CN118962663B_ABST
Patent Text Reader

Abstract

The present invention discloses a GPU accelerated sensor fusion method based on data segmentation. The method comprises the following steps: obtaining measurement results of a laser radar and a millimeter wave radar to construct measurement data including a measurement state vector; determining a segmentation method according to the number of stream processors SP in a GPU and the measurement data; segmenting the measurement data according to the segmentation method and establishing first data including a true value state vector; creating threads by the GPU to process each data segment in parallel; using a linear regression prediction method in each thread to determine the value of a first true value state vector of each data segment in the first data; using a Kalman filter tracking algorithm to predict the state of each data segment in the first data based on the first true value state vector and the difference in data types; and taking the average value of the true value state vectors of different data types as the output state vector to complete the fusion within the data segment. The output state vectors of all data segments constitute the final tracking result data, which effectively improves the fusion speed while meeting the tracking accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer software development, and in particular relates to a GPU accelerated sensor fusion method based on data segmentation. Background Art

[0002] ‌Lidar and millimeter-wave radar are two main types of sensors in modern autonomous driving and remote perception systems. Lidar has high measurement accuracy, but cannot obtain speed information; on the contrary, millimeter-wave radar can obtain speed information of obstacles, but the position measurement accuracy is lower than that of lidar. Therefore, the data of the two types of sensors, lidar and millimeter-wave radar, are fused to form a tracking result, which can achieve better tracking accuracy. The existing fusion method is to use the CPU for serial tracking. Specifically, after reading the sensor data, the first frame measurement value is selected as the initial value. For subsequent data frames, the Kalman filter tracking algorithm is used for state prediction, and then the data is updated according to the sensor type, and finally the tracked state vector is obtained. However, when the amount of data is large, the existing CPU serial fusion method has the problem of slow processing speed. Summary of the invention

[0003] In view of this, the present invention provides a GPU accelerated sensor fusion method based on data segmentation, which realizes the rapid and accurate fusion of the measurement results of LiDAR and millimeter wave radar.

[0004] The present invention provides a GPU-accelerated sensor fusion method based on data segmentation, which specifically includes the following steps:

[0005] Step 1, obtain the measurement data generated by the sensor. The amount of measurement data is the number of measurement state vectors contained therein, recorded as data_size. The measurement state vector is a frame of measurement data. The measurement state vector is composed of a frame of measurement data obtained by the laser radar and a frame of measurement data obtained by the millimeter wave radar at the same time;

[0006] Step 2, obtaining the number of stream processors SP in the GPU, setting the number of segments and the segment size of the data segment according to the amount of measured data and the number of SPs, where the segment size is the number of data frames contained in the data segment; segmenting the measured data according to the determined number of segments and the segment size of the data segment;

[0007] Step 3, establish the first data, the first data includes N data segments, each data segment includes data_size / N true value state vectors, each true value state vector is a frame of data of the first data, the true value state vector St is {x, y, vx, vy}, x is the true value of the position in the X direction, y is the true value of the position in the Y direction, vx is the true value of the speed in the X direction, and vy is the true value of the speed in the Y direction; establish a linear regression prediction equation for each state quantity and a timestamp, let the value of the first true value state vector of the first data segment be the first measured state vector of the measured data, and each thread in the GPU substitutes the timestamp of the first true value state vector in other data segments into the linear regression prediction equation to obtain the value of the first true value state vector of other data segments;

[0008] Step 4: Each thread in the GPU uses the Kalman filter tracking algorithm to perform state prediction on the true value state vectors in each data segment in the first data except the first true value state vector in parallel, and updates the true value state vector according to the sensor type to obtain the output state vector of each data segment;

[0009] Step 5: The final output state vectors of all data segments obtained by each thread in the GPU constitute the final tracking result data.

[0010] Furthermore, the method of setting the number of segments and the size of the segments according to the amount of measured data and the number of SPs in step 2 is:

[0011] Step 2.1, call the clGetDeviceInfo function to obtain the number of computing units contained in the GPU, call the clGetKernelWorkGroupInfo function to obtain the number of stream processors contained in each computing unit, and the total number of stream processors contained in all computing units is recorded as SP_num;

[0012] Step 2.2: If the ratio of data_size to SP_num is greater than the threshold T, the value of the segment number N is SP_num, otherwise the value of N is data_size / T; the value of the segment size n of each data segment is data_size / N.

[0013] Furthermore, the threshold T is 100.

[0014] Furthermore, the method of establishing the linear regression prediction equation of each state quantity and the timestamp in step 3 is:

[0015] Step 3.1, using the position and speed in the first data segment of the measured data as the initial value of the first data segment of the first data;

[0016] Step 3.2: Construct the linear regression prediction equation of the state quantity based on the state quantity and timestamp in the initial value of the first data segment, expressed as A=a A +b A t, where A is any state variable among x, y, vx and vy, and a A and b A are the regression coefficients corresponding to A, and t is the timestamp;

[0017] Step 3.3: Based on the true value state vector of the last M frames of the initial value of the first data segment, construct a data set represented as {(t1,A1),(t2,A2),…,(t M ,A M )}, establish the relationship A = a A +b A t +ε, ε is the error term, and the error and square formula is constructed:

[0018]

[0019] Solve the function f(a A ,b A ), use the partial derivative method to solve for a A and b A , mean(A) represents the average value of M A, mean(t) represents the average value of M t; i is the frame number of the true value state vector, and satisfies ; Calculated:

[0020]

[0021]

[0022] Thus, the linear regression prediction equation of each state quantity is obtained.

[0023] Furthermore, in step 4, each thread in the GPU uses a Kalman filter tracking algorithm to perform state prediction on the true value state vectors in each data segment in the first data except the first true value state vector in parallel, and updates the true value state vector according to the sensor type to obtain the output state vector of each data segment, including:

[0024] Step 4.1, each thread in the GPU initializes the data segment it processes, including initializing the state transfer matrix F, the state covariance matrix P and the process covariance matrix Q;

[0025] Step 4.2: If the current data frame is data acquired by a laser radar, execute step 4.3; if the current data frame is data acquired by a millimeter-wave radar, execute step 4.4;

[0026] Step 4.3, the current data frame satisfies St′=F*St, St is the true value state vector of the previous data frame in the first data, St′ is the predicted state vector of the current data frame in the first data, and P′=F*P*FT+Q, P is the state covariance matrix calculated for the previous data frame, P′ is the state covariance matrix predicted for the current data frame, and FT is the transpose of the state transfer matrix F; then use YL=ZL-HL*St′ to calculate the difference between the measured value ZL and the predicted value St′, YL is the calculation intermediate variable, ZL is the measurement data ZL={x, y} obtained by the laser radar in the current data frame in the measurement data except the timestamp, HL is the measurement matrix; then according to the formula SL=HL*P′*HLT+R, KL=P′*HLT*SL -1 , calculate the Kalman gain KL, where HLT is the transpose of the measurement matrix HL, SL -1 is the inverse of SL, R is the measurement covariance matrix; finally, according to the formula St=St′+KL*YL, P=(I-KL*HL)*P′, calculate and update the true state vector St and state covariance matrix P of the current data frame, where I is the unit matrix; according to the true state vector St and state covariance matrix P of the current data frame, calculate the true state vector of the next data frame again, until the calculation of all data frames in the current data segment is completed to obtain the laser radar related true state vector recorded as StL, and execute step 4.5;

[0027] Step 4.4, the current data frame satisfies St′=F*St, and P′=F*P*FT+Q; then YR=ZR-HR*St′ is used to calculate the difference between the measured value ZR and the predicted value St′, YR is the calculation intermediate variable, ZR is the measurement data except the timestamp obtained by the millimeter-wave radar in the current data frame in the measurement data, expressed as ZR={ro, phi, ro_dot}, ro is the distance in the polar coordinate system, phi is the angle in the polar coordinate system, ro_dot is the radial velocity in the polar coordinate system, and HR is the measurement matrix expressed as:

[0028] ;

[0029] According to the formula SR=HR*P′*HRT+R, KR=P′*HT*SR -1 , calculate the Kalman gain KR, HRT is the transpose of the measurement matrix HR, calculate and update the true state vector St and state covariance matrix P of the current data frame according to St=St′+KR*YR, P=(I-KR*HR)*P′, SR is the calculation intermediate variable; calculate the true state vector of the next data frame according to the true state vector St and state covariance matrix P of the current data frame, until the calculation of all data frames in the current data segment is completed to obtain the millimeter-wave radar related true state vector recorded as StR, and execute step 4.5;

[0030] Step 4.5: Calculate the average value of StL and StR with the same timestamp in each data segment to obtain the fused true state vector St of each data segment. The true state vector St of all data segments is the output state vector of each data segment.

[0031] Furthermore, the state transfer matrix F, the state covariance matrix P and the process covariance matrix Q are initialized in step 4.1 as follows: the state transfer matrix F is initialized as , the state covariance matrix P is initialized as , the process covariance matrix Q is initialized as .

[0032] Further, the HL in step 4.3 is .

[0033] Further, in step 4.3, R is .

[0034] Beneficial effects:

[0035] The present invention constructs measurement data including measurement state vectors by acquiring measurement results of laser radar and millimeter wave radar, determines a segmentation method according to the number of stream processors SP in a GPU and the measurement data, segments the measurement data according to the segmentation method and establishes first data including a true value state vector, creates threads by the GPU to process each data segment in parallel, uses a linear regression prediction method in each thread to determine the value of a first true value state vector of each data segment in the first data, uses a Kalman filter tracking algorithm based on the first true value state vector and data types to perform state prediction on each data segment in the first data, and then uses the average value of the true value state vectors of different data types as the output state vector to complete the fusion within the data segment, and the output state vectors of all data segments constitute the final tracking result data, which effectively improves the fusion speed while meeting the tracking accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 The figure is a schematic diagram of measurement data acquired by using a GPU accelerated sensor fusion method based on data segmentation provided by the present invention in an embodiment. DETAILED DESCRIPTION

[0037] The present invention is described in detail below with reference to the accompanying drawings and with reference to the embodiments.

[0038] The present invention provides a GPU accelerated sensor fusion method based on data segmentation, the core idea of ​​which is: constructing measurement data containing measurement state vectors by acquiring measurement results of laser radar and millimeter wave radar, determining the segmentation method according to the number of stream processors SP in the GPU and the measurement data, segmenting the measurement data according to the segmentation method and establishing first data containing true value state vectors, creating threads by the GPU to process each data segment in parallel, using a linear regression prediction method in each thread to determine the value of the first true value state vector of each data segment in the first data, using a Kalman filter tracking algorithm based on the first true value state vector and the difference in data types to predict the state of each data segment in the first data, and then using the average value of the true value state vectors of different data types as the output state vector to complete the fusion within the data segment, and the output state vectors of all data segments constitute the final tracking result data.

[0039] The present invention provides a GPU-accelerated sensor fusion method based on data segmentation, which specifically includes the following steps:

[0040] Step 1: Obtain the measurement data generated by the sensor. The amount of measurement data is the number of measurement state vectors contained therein, which is recorded as data_size. The sensor includes a laser radar and a millimeter wave radar. Each measurement state vector is a frame of measurement data. The measurement state vector is composed of a frame of measurement data obtained by the laser radar and a frame of measurement data obtained by the millimeter wave radar at the same time.

[0041] The measurement state vector Z is expressed as {(x, y, timestamp), (ro, phi, ro_dot, timestamp)}, where (x, y, timestamp) is the measurement data obtained by the lidar, x is the measurement value of the obstacle position in the X direction, y is the measurement value of the obstacle position in the Y direction, and timestamp is the timestamp of the measurement moment; (ro, phi, ro_dot, timestamp) is the measurement data obtained by the millimeter-wave radar, ro is the distance measurement value of the obstacle in the polar coordinate system, phi is the angle measurement value of the obstacle in the polar coordinate system, and ro_dot is the radial velocity measurement value of the obstacle in the polar coordinate system.

[0042] Step 2, obtain the number of stream processors SP in the GPU, recorded as the number of SPs; set the number of segments and the segment size of the data segment according to the data volume data_size of the measured data and the number of SPs, the segment size being the number of data frames contained in the data segment, so that each computing unit in the GPU can be fully utilized, there are no idle resources, thereby improving the execution performance of the program; segment the measured data according to the determined number of segments and the segment size of the data segment.

[0043] A GPU is a dedicated, highly parallel processor that typically contains multiple computing units, each of which contains multiple stream processors.

[0044] The number of SPs of the GPU is obtained, and the number and size of the data segments are set according to the data volume data_size and the number of SPs. The specific method is as follows:

[0045] Step 2.1, call the clGetDeviceInfo function to obtain the number of computing units contained in the GPU, and call the clGetKernelWorkGroupInfo function to obtain the number of stream processors contained in each computing unit. The sum of the number of stream processors contained in all computing units is the number of SPs, recorded as SP_num.

[0046] Step 2.2, set the number of segments N according to the data volume data_size and SP_num of the measured data. If the ratio of data_size to SP_num is greater than the threshold T, the value of the number of segments N is SP_num, otherwise the value of N is data_size / T. This can prevent the data segment calculated by each thread from having too little segment data when the data volume is very small; the segment size n of each data segment is data_size / N.

[0047] Step 3, establish the first data, the first data includes N data segments, each data segment includes data_size / N true value state vectors, each true value state vector is a frame of data of the first data, the true value state vector St is expressed as {x, y, vx, vy}, x is the true value of the position in the X direction, y is the true value of the position in the Y direction, vx is the true value of the speed in the X direction, vx=ro_dot*cos(phi), vy is the true value of the speed in the Y direction, vy=ro_dot*sin(phi); establish a linear regression prediction equation for each state quantity and timestamp, let the value of the first true value state vector of the first data segment be the first measured state vector of the measured data, and each thread in the GPU then substitutes the timestamp of the first true value state vector in other data segments into the linear regression prediction equation to obtain the value of the first true value state vector of other data segments.

[0048] Among them, the method of establishing the linear regression prediction equation of each state quantity is:

[0049] Step 3.1: Use the position and speed data in the first data segment of the measurement data as the initial value of the first data segment of the first data.

[0050] Step 3.2: Construct the linear regression prediction equation of the state quantity based on the state quantity and timestamp in the initial value of the first data segment, expressed as A=a A +b At, where A is any state variable among x, y, vx and vy, and a A and b A is the regression coefficient corresponding to A.

[0051] Step 3.3: Based on the true value state vector of the last M frames of the initial value of the first data segment, construct a data set represented as {(t1,A1),(t2,A2),…,(t M ,A M )}, where t is the independent variable and A is the dependent variable, which can be expressed mathematically as A= a A +b A t+ε, ε is the error term. In order to make the fitting more accurate, the error term ε needs to be minimized, so the least squares method is used to construct the error and square formula as follows:

[0052]

[0053] Solve the function f(a A ,b A ), and use the partial derivative method to solve for the parameter a A and b A , mean(A) represents the average value of M A, mean(t) represents the average value of M t, and the calculation results are:

[0054] ,

[0055] ,

[0056] Thus, the linear regression prediction equation of each state quantity x, y, vx and vy is obtained.

[0057] When actually tracking sensor measurement data, there is usually a dependency between the measurement data. If the data is simply segmented, the accuracy of the final tracking result data will be affected. Therefore, in order to solve this problem, the present invention constructs a linear regression prediction equation to associate the value of the first true state vector of each data segment with the timestamp of the measurement moment, thereby improving the computational efficiency while ensuring the integrity and accuracy of the data.

[0058] Step 4: Each thread in the GPU uses the Kalman filter tracking algorithm to perform state prediction on the true value state vectors in each data segment in the first data except the first true value state vector in parallel, and updates the true value state vector according to the sensor type to obtain the output state vector of each data segment.

[0059] Step 4.1: Initialize each thread in the GPU and initialize the data segment it processes, including initializing the state transfer matrix F, the state covariance matrix P, and the process covariance matrix Q.

[0060] Step 4.2: If the current data frame is data acquired by a laser radar, execute step 4.3; if the current data frame is data acquired by a millimeter-wave radar, execute step 4.4.

[0061] Step 4.3, the current data frame satisfies St′=F*St, St is the true value state vector of the previous data frame in the first data, St′ is the predicted state vector of the current data frame in the first data, and P′=F*P*FT+Q, P is the state covariance matrix calculated for the previous data frame, P′ is the state covariance matrix predicted for the current data frame, and FT is the transpose of the state transfer matrix F; then use YL=ZL-HL*St′ to calculate the difference between the measured value ZL and the predicted value St′, ZL is the measurement data ZL={x, y} obtained by the laser radar in the current data frame in the measurement data except the timestamp, HL is the measurement matrix; then according to the formula SL=HL*P′*HLT+R, KL=P′*HLT*SL -1 , calculate the Kalman gain KL, where HLT is the transpose of the measurement matrix HL, SL -1 is the inverse of SL, R is the measurement covariance matrix; finally, according to the formula St=St′+KL*YL, P=(I-KL*HL)*P′, calculate and update the true state vector St and state covariance matrix P of the current data frame, where I is the unit matrix. According to the true state vector St and state covariance matrix P of the current data frame, calculate the true state vector of the next data frame again, until all data frames in the current data segment are calculated, the relevant true state vector of the lidar is recorded as StL, and execute step 4.5.

[0062] Step 4.4, the current data frame satisfies St′=F*St, St is the true value state vector of the previous data frame in the first data, St′ is the predicted state vector of the current data frame in the first data, and P′=F*P*FT+Q, P is the state covariance matrix calculated for the previous data frame, P′ is the state covariance matrix predicted for the current data frame, and FT is the transpose of the state transfer matrix F; then YR=ZR-HR*St′ is used to calculate the difference between the measured value ZR and the predicted value St′, ZR is the measurement data other than the timestamp obtained by the millimeter-wave radar in the current data frame in the measurement data, expressed as ZR={ro, phi, ro_dot}, and HR is the measurement matrix expressed as:

[0063] ,

[0064] Among them, x, y, vx, and vy are the four values ​​in the predicted state vector St′ of the current data frame; then according to the formula SR=HR*P′*HRT+R, KR=P′*HT*SR -1, calculate the Kalman gain KR, HRT is the transpose of the measurement matrix HR; finally, according to the formula St=St′+KR*YR, P=(I-KR*HR)*P′, calculate and update the true state vector St and state covariance matrix P of the current data frame, where I is the unit matrix. According to the true state vector St and state covariance matrix P of the current data frame, calculate the true state vector of the next data frame again, until all data frames in the current data segment are calculated, the millimeter-wave radar related true state vector is obtained and recorded as StR, and execute step 4.5.

[0065] Step 4.5: Calculate the average value of StL and StR with the same timestamp in each data segment to obtain the fused true state vector St of each data segment. The output state vector formed by tracking is composed of the true state vectors St of all data segments.

[0066] Step 5: The final output state vectors of all data segments obtained by each thread in the GPU constitute the final tracking result data.

[0067] Example:

[0068] In this embodiment, a GPU-accelerated sensor fusion method based on data segmentation provided by the present invention is used to realize the fusion of measurement data of laser radar and millimeter wave radar in a system with CPU and GPU, which specifically includes:

[0069] S1. The CPU in the system reads the measurement data of the laser radar and millimeter wave radar, such as Figure 1 As shown, L represents lidar and R represents millimeter wave radar.

[0070] The data format set for the laser radar is that each data frame contains 7 data, which are: L_px, L_py, timestamp, x_gt, y_gt, vx_gt, vy_gt, where x_gt is the true value of the obstacle position in the X direction, y_gt is the true value of the obstacle position in the Y direction, vx_gt is the true value of the obstacle speed in the X direction, and vy_gt is the true value of the obstacle speed in the Y direction.

[0071] The data format set for the millimeter-wave radar is that each data frame contains 8 data, namely: ro, phi, ro_dot, timestamp, x_gt, y_gt, vx_gt, vy_gt.

[0072] S2. The system transfers all the measurement data obtained by the LiDAR and millimeter-wave radar from the CPU to the GPU.

[0073] S3. Obtain the number of stream processors SP in the GPU, and set the number and size of the data segments according to the number of SPs.

[0074] S3.1. Call the clGetDeviceInfo function to obtain the number of computing units contained in the GPU, and call the clGetKernelWorkGroupInfo function to obtain the number of stream processors contained in each computing unit. The sum of the number of stream processors contained in all computing units is the number of SPs, recorded as SP_num.

[0075] S3.2. Set the number of segments N according to the data volume data_size and SP_num of the measured data. If the ratio of data_size to SP_num is greater than 100, the value of the number of segments N is SP_num, otherwise the value of N is data_size / 100. This can prevent the data segment calculated by each thread from having too little segment data when the data volume is very small. The segment size n of each data segment is data_size / N.

[0076] S4. Use linear regression prediction method to initialize the first value of the first true state vector in each data segment, the state vector St={x,y,vx,vy}.

[0077] S4.1. Let the initial value of the true state vector of the first data frame in the first data segment be the measured value, that is, St1={x1,y1,vx1,vy1}. Starting from the second data segment, the true state vector of the first data frame of each data segment is calculated by the true state vectors of the last 30 frames in the previous data segment using the linear regression prediction method.

[0078] S4.2. Construct a univariate linear regression model x=a+bt based on x and t in the true value state vector of the last 30 frames of the first data segment, and then substitute the timestamp t of the first data frame in the second data segment into the formula x=a+bt to calculate the value of x2.

[0079] S4.3. Similarly, according to the linear regression prediction method, the y2 value, vx2 value and vy2 value of the first frame of the second segment are calculated, and the state vector of the first frame of the second segment is initialized to St2={x2,y2,vx2,vy2}.

[0080] S4.4. Repeat S4.2 and S4.3 until the calculation of the true value state vector Sti={xi,yi,vxi,vyi} of the first data frame in each data segment after segmentation is completed.

[0081] S5. Each thread in the GPU uses the Kalman filter tracking algorithm to perform state prediction on the true value state vectors in each data segment in the first data except the first true value state vector in parallel, and updates the true value state vector according to the sensor type, and finally obtains the output state vector after tracking.

[0082] S5.1. Initialize each thread in the GPU and initialize the data segment it processes, including initializing the state transfer matrix F, the state covariance matrix P, and the process covariance matrix Q.

[0083] Among them, the state transfer matrix F is initialized as , the state covariance matrix P is initialized as , the process covariance matrix Q is initialized as .

[0084] S5.2. If the current data frame is data acquired by a laser radar, execute S5.3; if the current data frame is data acquired by a millimeter-wave radar, execute S5.4.

[0085] S5.3, the current data frame satisfies St′=F*St, and P′=F*P*FT+Q; then YL=ZL-HL*St′ is used to calculate the difference between the measured value ZL and the predicted value St′, HL is ; Then according to the formula SL=HL*P′*HLT+R, KL=P′*HLT*SL -1 , calculate the Kalman gain KL, R is ; Finally, according to the formula St=St′+KL*YL, P=(I-KL*HL)*P′, calculate and update the true value state vector St and state covariance matrix P of the current data frame. According to the true value state vector St and state covariance matrix P of the current data frame, calculate the true value state vector of the next data frame again, until all data frames in the current data segment are calculated to obtain the relevant true value state vector of the laser radar, which is recorded as StL, and execute S5.5.

[0086] S5.4, the current data frame satisfies St′=F*St, and P′=F*P*FT+Q; then use YR=ZR-HR*St′ to calculate the difference between the measured value ZR and the predicted value St′; then according to the formula SR=HR*P′*HRT+R, KR=P′*HT*SR -1 , calculate the Kalman gain KR, HRT is the transpose of the measurement matrix HR; finally, according to the formula St=St′+KR*YR, P=(I-KR*HR)*P′, calculate and update the true state vector St and state covariance matrix P of the current data frame, where I is the unit matrix. According to the true state vector St and state covariance matrix P of the current data frame, calculate the true state vector of the next data frame again, until all data frames in the current data segment are calculated, and the millimeter-wave radar related true state vector is obtained, recorded as StR, and execute S5.5.

[0087] S5.5. Calculate the average value of StL and StR with the same timestamp in each data segment to obtain the fused true state vector St of each data segment. The final output state vector formed by tracking is formed by the true state vector St of all data segments.

[0088] In summary, the above are only preferred embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A GPU accelerated sensor fusion method based on data segmentation, characterized in that: The specific steps include: Step 1, obtain the measurement data generated by the sensor. The amount of measurement data is the number of measurement state vectors contained therein, recorded as data_size. The measurement state vector is a frame of measurement data. The measurement state vector is composed of a frame of measurement data obtained by the laser radar and a frame of measurement data obtained by the millimeter wave radar at the same time. Step 2, obtaining the number of stream processors SP in the GPU, setting the number of segments and the segment size of the data segment according to the amount of measured data and the number of SPs, where the segment size is the number of data frames contained in the data segment; segmenting the measured data according to the determined number of segments and the segment size of the data segment; Step 3, establish the first data, the first data includes N data segments, each data segment includes data_size / N true value state vectors, each true value state vector is a frame of data of the first data, the true state vector St is {x, y, vx, vy}, x is the true value of the position in the x direction, y is the true value of the position in the y direction, vx is the true value of the speed in the x direction, and vy is the true value of the speed in the y direction; establish a linear regression prediction equation for each state quantity and a timestamp, let the value of the first true value state vector of the first data segment be the first measured data vector of the measured data, and each thread in the GPU substitutes the timestamp of the first true value state vector in other data segments into the linear regression prediction equation to obtain the value of the first true value state vector of other data segments; Step 4: Each thread in the GPU uses the Kalman filter tracking algorithm to perform state prediction on the true value state vectors in each data segment in the first data except the first true value state vector in parallel, and updates the true value state vector according to the sensor type to obtain the output state vector of each data segment; Step 5: The final output state vectors of all data segments obtained by each thread in the GPU constitute the final tracking result data; In step 4, each thread in the GPU uses the Kalman filter tracking algorithm to perform state prediction on the true value state vectors in each data segment in the first data except the first true value state vector in parallel, and updates the true value state vector according to the sensor type to obtain the output state vector of each data segment, including: Step 4.1, each thread in the GPU initializes the data segment it processes, including initializing the state transfer matrix F, the state covariance matrix P and the process covariance matrix Q; Step 4.2: If the current data frame is data acquired by a laser radar, execute step 4.3; if the current data frame is data acquired by a millimeter-wave radar, execute step 4.4; Step 4.3, the current data frame satisfies St′=F*St, St is the true value state vector of the previous data frame in the first data, St′ is the predicted state vector of the current data frame in the first data, and P′=F*P*FT+Q, P is the state covariance matrix calculated for the previous data frame, P′ is the state covariance matrix predicted for the current data frame, and FT is the transpose of the state transfer matrix F; then use YL=ZL-HL*St′ to calculate the difference between the measured value ZL and the predicted value St′, ZL is the measurement data ZL={x, y} acquired by the laser radar in the current data frame in the measurement data except the timestamp, HL is the measurement matrix; then according to the formula SL=HL*P′*HLT+R, KL=P′*HLT*SL -1 , calculate the Kalman gain KL, where HLT is the transpose of the measurement matrix HL, SL -1 is the inverse of SL, R is the measurement covariance matrix; finally, according to the formula St = St'+KL*YL, P = (I-KL*HL)*P', calculate and update the true state vector St and state covariance matrix P of the current data frame, where I is the unit matrix; according to the true state vector St and state covariance matrix P of the current data frame, calculate the true state vector of the next data frame again, until the calculation of all data frames in the current data segment is completed to obtain the laser radar related true state vector recorded as StL, and execute step 4.5; Step 4.4, the current data frame satisfies St′=F*St, and P′=F*P*FT+Q; then YR=ZR-HR*St′ is used to calculate the difference between the measured value ZR and the predicted value St′, where ZR is the measurement data except the timestamp obtained by the millimeter-wave radar in the current data frame in the measurement data, expressed as ZR={ro,phi,ro_dot}, and HR is the measurement matrix expressed as: According to the formula SR = HR * P' * HRT + R, KR = P' * HT * SR -1 , calculate the Kalman gain KR, HRT is the transpose of the measurement matrix HR, and calculate and update the true state vector St and state covariance matrix P of the current data frame according to St = St'+KR*YR, P = (I-KR*HR)*P'; calculate the true state vector of the next data frame according to the true state vector St and state covariance matrix P of the current data frame, until the calculation of all data frames in the current data segment is completed to obtain the millimeter-wave radar related true state vector, recorded as StR, and execute step 4.5; Step 4.5: Calculate the average value of StL and StR with the same timestamp in each data segment to obtain the fused true state vector St of each data segment. The true state vector St of all data segments is the output state vector of each data segment.

2. The GPU accelerated sensor fusion method according to claim 1, characterized in that: The method of setting the number and size of data segments according to the amount of measured data and the number of SPs in step 2 is: Step 2.1, call clGetDeviceInfo to obtain the number of computing units contained in the GPU, and call clGetKernelWorkGroupInfo to obtain the number of stream processors contained in each computing unit. The sum of the number of stream processors contained in all computing units is the number of SPs, recorded as SP_num; Step 2.2: If the ratio of data_size to PE_num is greater than the threshold T, the value of the segment number N is PE_num; otherwise, the value of N is data_size / T; the value of the segment size n of each data segment is data_size / N.

3. The GPU accelerated sensor fusion method according to claim 2, characterized in that: The threshold T is 100.

4. The GPU accelerated sensor fusion method according to claim 1, characterized in that: The method of establishing the linear regression prediction equation of each state quantity and time stamp in step 3 is: Step 3.1, using the position and speed in the first data segment of the measured data as the initial value of the first data segment of the first data; Step 3.2: Construct a linear regression prediction equation for the state quantity based on the state quantity and timestamp in the initial value of the first data segment, expressed as A=a A +b A t, where A is any state variable among x, y, vx and vy, and a A and b A are the regression coefficients corresponding to A, and t is the timestamp; Step 3.3: Based on the true value state vector of the last M frames of the initial value of the first data segment, construct a data set represented as {(t1,A1),(t2,A2),…,(t M ,A M )}, establish the relationship A=a A +b A t+ε, ε is the error term, and the error and square formula is constructed: Solve the function f(a A ,b A ), use the partial derivative method to solve for a A and b A , mean(A) represents the average value of M A, mean(t) represents the average value of M t, and the calculation results are: a A =mean(A)-b A *mean(t) Thus, the linear regression prediction equation of each state quantity is obtained.

5. The GPU accelerated sensor fusion method according to claim 1, characterized in that: The method of initializing the state transfer matrix F, the state covariance matrix P and the process covariance matrix Q in step 4.1 is: the state transfer matrix F is initialized as The state covariance matrix P is initialized as The process covariance matrix Q is initialized as 6. The GPU accelerated sensor fusion method according to claim 1, characterized in that: The HL in step 4.3 is 7. The GPU accelerated sensor fusion method according to claim 1, characterized in that: In step 4.3, R is

Citation Information

Patent Citations

  • Maneuvering target tracking method based on fusion of laser radar and millimeter wave radar

    CN112285700A

  • Pre-observation overall fusion tracking method for Doppler measurement

    CN117784064A