Radar data processing method, system and equipment based on FPGA (Field Programmable Gate Array)

Through the FPGA-based radar data processing method, the angle values ​​in the radar data packets are analyzed and converted, and coordinate conversion is combined with the CORDIC algorithm, the problem of the radar system recalibration needs to be recalibrated after replacing the equipment is solved, and rapid recovery and high-precision environmental perception is achieved, providing strong technical support for autonomous driving and mobile robots.

CN119644304APending Publication Date: 2025-03-18ADVANCED TECH RES INST OF BEIJING UNIV OF TECH +3
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411925424.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

Existing radar systems need to be re-calibrated after replacing equipment, resulting in increased computing resource consumption and delay, high maintenance costs, and differences in angle measurements between different radar devices, affecting the accuracy and stability of the system.

Method used

Using the radar data processing method based on FPGA, the DIFOP data packet is acquired and parsed, the angle value is converted to radian values, and the sine value and cosine value are calculated, and the coordinate conversion is combined with the CORDIC algorithm to achieve rapid processing and accurate correction of radar data.

Benefits of technology

It realizes rapid recovery and normal operation of the radar system after replacing the equipment, improves calibration speed and system real-time and accuracy, reduces maintenance costs, and enhances the stability and reliability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119644304A_ABST
    Figure CN119644304A_ABST
Patent Text Reader

Abstract

The invention provides a radar data processing method, system and device based on an FPGA. The method comprises the steps that a DIFOP data packet of a laser radar is acquired; analyzing the DIFOP data packet to obtain an angle value of the laser radar, converting the angle value into a radian value, calculating a sine value and a cosine value of the angle value of the laser radar, and storing the sine value and the cosine value; acquiring an MSOP data packet of the laser radar, performing header detection, parameter conversion and angle calculation on the MSOP data packet to acquire coordinate information, and then storing the coordinate information; and extracting a sine value and a cosine value of the stored laser radar angle value, carrying out coordinate conversion on the preprocessed MSOP data packet, and displaying a conversion result. Based on the method, the invention also provides a radar data processing system and equipment based on the FPGA. According to the invention, the parallel processing capability and the flexible hardware architecture of the FPGA are utilized to realize rapid processing and accurate correction of radar data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of radar data processing, and in particular relates to a radar data processing method, system and device based on FPGA. Background Art

[0002] In traditional radar systems, especially those used in autonomous vehicles and mobile robots, accurate calibration of radar equipment is crucial to ensure the reliability and safety of the system. Usually, radar equipment needs to be calibrated for vertical and horizontal angles to ensure the accuracy of its measurement results. However, different radars have different error coefficients. Once the radar equipment or radar module is replaced, the original calibration parameters will no longer apply, and a complex calibration procedure must be repeated to determine the new vertical and horizontal angle errors.

[0003] This recalibration process consumes computing resources and generates delays, increasing the maintenance cost of the system. In addition, due to the inherent angle measurement differences between different radar devices, careful adjustments are required after each radar replacement to compensate for the angle deviation caused by changes in hardware characteristics. In the application scenarios of autonomous driving and intelligent mobile robots, the accuracy of radar data is extremely high. Any slight angle error may cause deviations in environmental perception, which in turn affects the accuracy and stability of the system. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes a radar data processing method, system and device based on FPGA, which realizes rapid processing and precise correction of radar data, and ensures rapid recovery and normal operation of the radar system after equipment replacement.

[0005] To achieve the above object, the present invention adopts the following technical solutions:

[0006] A radar data processing method based on FPGA includes the following steps:

[0007] Obtaining a DIFOP data packet of the laser radar; parsing the DIFOP data packet to obtain an angle value of the laser radar, converting the angle value into a radian value, and calculating and storing a sine value and a cosine value of the laser radar angle value;

[0008] Obtaining the MSOP data packet of the laser radar, performing header detection, parameter conversion and angle calculation on the MSOP data packet to obtain coordinate information, and then storing it;

[0009] The sine and cosine values ​​of the stored lidar angle values ​​and the preprocessed MSOP data packets are extracted for coordinate conversion, and the converted results are displayed.

[0010] Furthermore, before obtaining the DIFOP data packet of the laser radar, the following steps are also included:

[0011] Connect the LiDAR to the FPGA unit to establish communication between the LiDAR and the FPGA unit; and check the power supply and configuration of the LiDAR to ensure the normal operation of the LiDAR.

[0012] Furthermore, the DIFOP data packet is parsed to obtain the angle value of the laser radar, and the process of converting the angle value into a radian value includes:

[0013] Extracting a channel vertical angle and a channel horizontal offset angle from the DIFOP data packet, wherein the channel vertical angle is represented by three bytes of data; and the channel horizontal offset angle is represented by three bytes of data;

[0014] Convert the vertical angle of the channel represented by the three-byte data into a decimal value, and then divide the decimal value by 100 to obtain the actual angle value in the vertical direction; convert the horizontal offset angle of the channel represented by the three-byte data into a decimal value, and then divide the decimal value by 100 to obtain the actual angle value in the horizontal direction;

[0015] The actual angle value in the horizontal direction is divided by 180 and multiplied by π to obtain the horizontal radian value; the actual angle value in the vertical direction is divided by 180 and multiplied by π to obtain the vertical radian value.

[0016] Further, the DIFOP packet data is parsed to obtain the angle value of the laser radar, and after the angle value is converted into a radian value, the following is further included:

[0017] Disassemble the DIFOP data packet through shift and addition operations;

[0018] In order to ensure that no data is lost during the bit shift operation, the number of bits of the angle data is expanded to the target bit width, and the required bit shift operation is performed on the expanded value;

[0019] Check whether the angle value after expansion is negative. If the angle value is negative, convert the angle value to the two's complement form.

[0020] Furthermore, the process of disassembling the DIFOP data packet through the shift and addition operation includes: converting the DIFOP data packet into a series of sums divided by a power of 2 by using a division operation, and disassembling the DIFOP data packet through the shift and addition operation.

[0021] Furthermore, the process of converting the angle value into a complement form includes:

[0022]

[0023] Wherein, D is the angle value after expansion.

[0024] Furthermore, the process of calculating the sine value and cosine value of the laser radar angle value includes: using a CORDIC algorithm to calculate the sine value and cosine value of the laser radar angle value.

[0025] Furthermore, the formula for coordinate transformation is:

[0026] X = r·cos(ω ch )·cos(α θ +λ ch -μ ch )+γ x ·cos(ω ch );

[0027] Y=-r·cos(ω ch )·sin(α θ +λ ch -μ ch )+γ x ·sin(ω ch );

[0028] Z = r·sin(ω ch )+γ z ·sin(ω ch );

[0029] Integrate the formula into:

[0030] X=(r·cos(α θ +λ ch -μ ch )+γ x )·cos(ω ch )

[0031] Y=(-r·sin(α θ +λ ch -μ ch )+γ x )·sin(ω ch )

[0032] Z=(r+γ z ).sin(ω ch )

[0033] Wherein, X represents the x-axis data of the point cloud data in the Cartesian coordinate system; Y represents the y-axis data of the point cloud data in the Cartesian coordinate system; Z represents the z-axis data of the point cloud data in the Cartesian coordinate system; ω ch Represents the longitudinal emission angle of different laser channels of the laser beam; α θ represents the horizontal offset angle under different θ; θ represents the horizontal deflection angle of the laser radar; λch is the vertical angle calibration, i.e. the vertical angle correction of different laser channels of the laser beam; μ ch Horizontal angle calibration, that is, the horizontal angle correction of different laser channels of the laser beam; ch represents the laser channel.

[0034] The present invention also proposes a radar data processing system based on FPGA, comprising: a first processing module, a second processing module and a conversion module;

[0035] The first processing module is used to obtain a DIFOP data packet of the laser radar; parse the DIFOP data packet to obtain an angle value of the laser radar, convert the angle value into a radian value, and calculate and store the sine value and cosine value of the laser radar angle value;

[0036] The second processing module is used to obtain the MSOP data packet of the laser radar, perform header detection, parameter conversion and angle calculation on the MSOP data packet to obtain coordinate information, and then store it;

[0037] The conversion module is used to extract the sine value and cosine value of the stored laser radar angle value and the preprocessed MSOP data packet to perform coordinate conversion, and display the converted results.

[0038] The present invention also proposes a radar data processing device based on FPGA, comprising:

[0039] Memory for storing computer programs;

[0040] A processor is used to implement the method steps described when executing the computer program.

[0041] The effects provided in the content of the invention are only the effects of the embodiments, not all the effects of the invention. One of the above technical solutions has the following advantages or beneficial effects:

[0042] The present invention proposes a radar data processing method, system and device based on FPGA, which includes the following steps: obtaining a DIFOP data packet of a laser radar; parsing the DIFOP data packet to obtain an angle value of the laser radar, converting the angle value into a radian value, and calculating and storing the sine and cosine values ​​of the laser radar angle value; obtaining an MSOP data packet of a laser radar, performing header detection, parameter conversion and angle calculation on the MSOP data packet to obtain coordinate information, and then storing the information; extracting the sine and cosine values ​​of the stored laser radar angle value and the pre-processed MSOP data packet for coordinate conversion, and displaying the converted result. Based on a radar data processing method based on FPGA, a radar data processing system and device based on FPGA are also proposed. The present invention can quickly calibrate the vertical angle and the horizontal angle after each replacement of the radar equipment. By utilizing the parallel processing capability and flexible hardware architecture of FPGA, rapid processing and precise correction of radar data are achieved, ensuring rapid recovery and normal operation of the radar system after equipment replacement.

[0043] The present invention improves the calibration speed and reduces the time and labor cost required for calibration by integrating a highly parallel calibration algorithm and an optimized data processing circuit, thereby improving the real-time performance and accuracy of the system. The present invention not only simplifies the maintenance process, but also enhances the stability and reliability of the radar system, ensuring that accurate environmental perception information can be provided under various conditions, and provides strong technical support for fields such as autonomous driving and mobile robots. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A flow chart of a radar data processing method based on FPGA proposed in Embodiment 1 of the present invention;

[0045] Figure 2 This is an architecture diagram of a radar data processing method based on FPGA proposed in Embodiment 1 of the present invention;

[0046] Figure 3 A schematic diagram of a radar data processing system based on FPGA proposed in Embodiment 1 of the present invention;

[0047] Figure 4 This is a schematic diagram of a radar data processing device based on FPGA proposed in Example 1 of the present invention. DETAILED DESCRIPTION

[0048] In order to clearly illustrate the technical features of the present solution, the present invention is described in detail below through specific implementation methods and in conjunction with the accompanying drawings. The disclosure below provides many different embodiments or examples for realizing different structures of the present invention. In order to simplify the disclosure of the present invention, the components and settings of specific examples are described below. In addition, the present invention may repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed. It should be noted that the components illustrated in the accompanying drawings are not necessarily drawn to scale. The present invention omits the description of known components and processing techniques and processes to avoid unnecessary limitations on the present invention.

[0049] Example 1

[0050] Embodiment 1 of the present invention proposes a radar data processing method based on FPGA, which is used to solve the technical problems existing in radar data processing in the prior art. Figure 1 A flow chart of a radar data processing method based on FPGA proposed in Embodiment 1 of the present invention;

[0051] In step S100, the system is powered on and initialized. In this application, the laser radar is connected to the FPGA unit for communication, and the communication between the laser radar and the FPGA unit is established; and the power supply and configuration of the laser radar are checked to ensure the normal operation of the laser radar.

[0052] Figure 2 This is an architecture diagram of an FPGA-based radar data processing method proposed in Example 1 of the present invention; after the system is powered on, a series of initialization operations are performed, including the configuration of the clock and reset signals, to ensure that the data registers are correctly initialized during the reset. At the same time, the required laser radar is connected and initialized to ensure that it communicates correctly with the system. The specific steps include: connecting the laser radar to the interface box through an aviation plug, connecting the PC to the interface box through an RJ45 network port, checking whether the power indicator light of the laser radar is on normally, configuring the IP address of the PC to be in the same network segment as the laser radar, using the Web terminal or other software to connect to the laser radar, confirming that its firmware version and configuration parameters are correct, and ensuring that the laser radar operates normally without faults. After completing these steps, the system enters normal operating state.

[0053] In step S101, a DIFOP data packet is waited for.

[0054] The system enters the waiting mode until it receives a specific data packet from an external source, namely the DIFOP data packet. When receiving a data packet, the system first performs a header check to judge the data packet. After confirming that the DIFOP data packet has been received, the system will jump to the next state.

[0055] In step S102, the received raw DIFOP data packets are preprocessed. The main data stream output protocol (MSOP) is responsible for transmitting a continuous data stream, such as the results of each scan of the laser radar, which usually contains information such as distance and reflection intensity. The device information output protocol (DIFOP) provides device status information and calibration parameters, such as vertical angle calibration (λch), horizontal angle calibration (μch), and sine and cosine calculation results of installation errors (γx, γz). These parameters are crucial to the accuracy of the data after error correction, and because they are fixed, they can be calculated by formulas.

[0056] When processing the DIFOP raw data packet of the Helios 16 radar, both the vertical angle of the channel and the horizontal offset angle of the channel are composed of 3 bytes, of which the upper byte indicates the positive and negative signs, and the lower 2 bytes constitute the angle value, and the angle resolution is 0.01°. For example, if the value of the channel 1 register is byte1 = 0x01 (indicating a negative number), byte 2 = 0x00, and byte 3 = 0x04, it is converted to decimal 4, which means that the horizontal offset angle of channel 1 is -0.04°. In order to use these data in the CORDIC algorithm, these angle data need to be processed.

[0057] The preprocessing process includes: parsing the DIFOP data packet to obtain the angle value of the laser radar, and converting the angle value into radian value; after converting to radian value, disassembling the DIFOP data packet through shift and addition operations; in order to ensure that data loss is not caused during the shift operation, the number of bits of the angle data is expanded to the target bit width, and the required shift operation is performed on the expanded value; checking whether the expanded angle value is a negative value, if the angle value is a negative value, the angle value is converted into a complement code form.

[0058] The DIFOP data packet is parsed to obtain the angle value of the laser radar, and the process of converting the angle value into a radian value includes: extracting the channel vertical angle and the channel horizontal offset angle from the DIFOP data packet, the channel vertical angle is represented by three-byte data; the channel horizontal offset angle is represented by three-byte data; the channel vertical angle represented by the three-byte data is converted into a decimal value, and then the decimal value is divided by 100 to obtain the actual angle value in the vertical direction; the channel horizontal offset angle represented by the three-byte data is converted into a decimal value, and then the decimal value is divided by 100 to obtain the actual angle value in the horizontal direction; the actual angle value in the horizontal direction is divided by 180 multiplied by π to obtain the radian value in the horizontal direction; the actual angle value in the vertical direction is divided by 180 multiplied by π to obtain the radian value in the vertical direction.

[0059] Read the DIFOP data packet from the radar device, which contains the device status information and calibration parameters. Extract the data of the channel vertical angle and channel horizontal offset angle. These data consist of 3 bytes, of which the upper byte indicates the positive and negative signs, and the lower 2 bytes constitute the angle value. For example, if the value of the channel 1 register is byte 1 = 0x01 (indicating a negative number), byte 2 = 0x00, and byte 3 = 0x04, it is converted to decimal 4, which means that the horizontal offset angle of channel 1 is -0.04°.

[0060] Convert the extracted 3-byte data to a decimal value. For example, byte 1 = 0x01, byte 2 = 0x00, byte 3 = 0x04, which is converted to a decimal value of 4. Divide the decimal value by 100 to get the actual angle value. For example, 4 divided by 100 is 0.04°.

[0061] Divide the actual angle value by 180, and then multiply it by π (π≈3.141592653589793) to get the radian value. For example, -0.04° is converted to a radian value of -0.000698132 radians. Because the cordic module supports processing data in units of π radians. Therefore, the DIFOP data needs to be divided by 18000 and then multiplied by π.

[0062] In order to implement the division by 18000 operation in FPGA, the DIFOP data packet is disassembled through bit shift and addition operations. The specific process includes: converting the DIFOP data packet into a series of sums divided by a power of 2 by the division operation, and disassembling the DIFOP data packet through bit shift and addition operations.

[0063] Use the formula: Disassemble.

[0064] The specific disassembly method can be selected according to the error requirements. For example, 1 / 18000 can be approximated as:

[0065]

[0066] To ensure that no data is lost during the bit shift operation, expand the 24-bit angle data to a wider data type (for example, 32 bits). Load the input value unsigned into the 32-bit data type and ensure that it fits within the input bit width. Shift the input value left by the number of bits of the target bit width minus the input bit width to expand to the target bit width. For example, shift 24-bit data left by 8 bits to expand to 32 bits. Perform the desired bit shift operation on the expanded value. For example, shift 32-bit data right by 14 bits, which is equivalent to dividing by 16384.

[0067] If the original data needs to be restored, the result can be restored to the original input bit width by right shift and truncation operations. This not only solves the problem of data loss, but also provides a reliable data basis for subsequent bit operations.

[0068] The process of converting an angle value to two's complement form involves:

[0069]

[0070] Wherein, D is the angle value after expansion.

[0071] In this step, check whether the expanded 32-bit angle value is negative. If the angle value is negative, convert it to the two's complement form. This is because the CORDIC algorithm needs to use the two's complement form when processing negative numbers to ensure the correctness of the calculation.

[0072] The specific steps are as follows:

[0073] If the angle value is positive, it is used directly.

[0074] If the angle is negative, calculate its complement:

[0075]

[0076] In step S103, the fixed rotation angle values ​​of the mechanical radar are obtained from the external device at the same time. These angle values ​​are one of the necessary conditions for calculating the three-dimensional coordinates of the target object. These fixed values ​​can be calculated in advance and stored in the BRAM for standby use.

[0077] In step S104, the fixed rotation angle value of the mechanical radar obtained from the external device is format-converted and then input into the CORDIC kernel.

[0078] In step S105, it is input into the CORDIC kernel.

[0079] In step S106, the sine value and cosine value of the laser radar angle value are calculated. The sine and cosine values ​​of these pre-processed angle values ​​are calculated using the CORDICIP core in the FPGA.

[0080] The CORDIC (Coordinate Rotation Digital Computer) algorithm is an effective method for calculating trigonometric functions, hyperbolic functions, and basic mathematical operations such as multiplication and division. It approximates complex mathematical operations through a series of simple shifts and addition and subtraction operations, and is particularly suitable for implementation in hardware. The core idea of ​​the CORDIC algorithm is to approximate the required large-angle rotation through a series of small-angle rotations. Each small-angle rotation can be achieved through shifts and addition and subtraction operations, thus avoiding complex multiplication and division operations. The specific process includes:

[0081] initialization

[0082] x0=1

[0083] y0=0

[0084] z0 = θ (the radian value of the target angle)

[0085] Iterative Calculation

[0086] For i=0, 1, 2, ..., N-1 (N is the number of iterations):

[0087] x i+1 =x i -d i ·y i 2 -i

[0088] y i+1 =y i +d i ·x i 2 -i

[0089] z i+1 =z i -d i α i

[0090] in:

[0091] d i =sign(z i )(If z i ≥0, then d i =1; otherwise d i =-1)

[0092] a i =tan -1 (2 -i )(pre-calculated angle value)

[0093] Precomputed angle values

[0094] a i=tan -1 (2 -i )

[0095] These values ​​can be pre-calculated and stored in a lookup table to speed up the calculation. For example, the first few angle values ​​are:

[0096] α0=tan -1 (2 -0 )≈0.785398163rad

[0097] α1=tan -1 (2 -1 )≈0.463647609rad

[0098] α2=tan -1 (2 -2 )≈0.244978663rad

[0099] α3=tan -1 (2 -3 )≈0.124354994rad

[0100] Normalization factor

[0101] Since each iteration introduces a scaling factor, the final result needs to be multiplied by a normalization factor K:

[0102]

[0103] Usually K can be approximated as 0.607252935.

[0104] After N iterations, the final result is:

[0105] cos(θ)≈k·x N

[0106] sin(θ)≈k·y N

[0107] Mathematical principle of CORDIC algorithm

[0108] The CORDIC algorithm implements rotation using the following formula:

[0109] x i+1 =x i -d i ·y i 2 -1

[0110] y i+1 =y i -d i ·x i 2 -i

[0111] z i+1 =z i -d i α i

[0112] Among them, d i is the sign of the direction of rotation, depending on the current z i value:

[0113]

[0114] In each iteration, x i and i Through a small angle a i Rotate so that z i gradually approaches zero. Finally, when z i When x approaches zero, i and i will approach the values ​​of cos(θ) and sin(θ), respectively.

[0115] A brief description of the CORDIC algorithm implemented in Verilog

[0116] Initialize the module:

[0117] Define input and output signals, including clock signal, reset signal, start signal, angle input, sine output, cosine output, and completion signal. Initialize x, y, z, and iteration counters.

[0118] Precompute the angle values:

[0119] Angle values ​​are precomputed using the initial block and stored in a lookup table.

[0120] State Machine:

[0121] Use a state machine to control the execution flow of the CORDIC algorithm. When the start signal is high, initialize x, y, z and iteration counters. In each clock cycle, perform iterative calculations based on the current iteration counter. When the iteration counter reaches N, output the final result and set the completion signal.

[0122] Iterative calculation:

[0123] In each clock cycle, the rotation direction d is determined according to the current z value i . Update the values ​​of x, y, and z. Increment the iteration counter.

[0124] Output:

[0125] When the iteration is complete, x and y are multiplied by the normalization factor to obtain the final cos(θ) and sin(θ) values. The sine and cosine values ​​are output and the completion signal is asserted.

[0126] In step S107, the estimated data is placed in the BRAM. After the CORDIC algorithm completes the sine and cosine value calculations on the angle values ​​in the pre-processed DIFOP data packet, the calculation results are stored in the block RAM (BRAM) for use in subsequent processing steps.

[0127] Assign a unique address to each storage unit in the BRAM. Store in order of angle size or in different areas according to data type (sine value and cosine value) to quickly locate and access data.

[0128] Use 24-bit fixed-point numbers to store sine and cosine values, with the high bit representing the integer part and the low bit representing the decimal part, ensuring data accuracy and storage efficiency.

[0129] The write enable signal is managed by a state machine to ensure that the BRAM is updated when new data is ready. After the CORDIC algorithm completes one iteration, it checks whether the data is ready and then triggers the write enable signal to write the data to the BRAM.

[0130] Thresholds are set to check whether the sine and cosine values ​​are within a reasonable range ([-1,1]). Parity checks and other methods are used to detect data transmission errors to ensure that the data stored in the BRAM is accurate.

[0131] Preload some data into cache or partition BRAM according to data access patterns to reduce access latency and improve system performance.

[0132] Through the above methods, the sine and cosine values ​​calculated by the CORDIC algorithm can be safely and efficiently stored in the BRAM, providing a solid data foundation for subsequent coordinate transformation and other processing tasks. These measures can ensure the accuracy and integrity of the data and improve the performance and reliability of the entire system.

[0133] In step S108, the MSOP data packet of the laser radar is obtained, and the coordinate information is obtained after header detection, parameter conversion and angle calculation of the MSOP data packet, and then stored;

[0134] The header detection process includes: receiving the MSOP data packet through a communication interface (such as Ethernet, USB or SPI); reading and parsing the header information of the data packet, including the packet type, packet length, sequence number, etc.; using CRC or other verification methods to verify the integrity of the data packet to ensure correct data transmission.

[0135] The parameter conversion process includes: distance resolution: converting the received distance encoding value into the actual distance unit; reflection intensity decoding: converting the received reflection intensity encoding value into the actual reflectivity; other parameter processing: processing other parameters as needed, such as angle, speed, etc.

[0136] Use the CORDIC algorithm to calculate angle information, or use the CORDIC algorithm to perform vector rotation calculation to obtain accurate coordinate information.

[0137] When storing to BRAM, perform data structure design: design data structures such as ring buffers to ensure efficient data storage and retrieval. Perform storage management: allocate BRAM space reasonably to avoid overflow, use mechanisms such as timestamps to manage data, and ensure that new data overwrites the oldest data. Multitasking: use lock mechanisms or DMA to manage data read and write operations to prevent conflicts.

[0138] In step S109, the sine value and cosine value of the stored laser radar angle value and the preprocessed MSOP data packet are extracted for coordinate conversion, and the converted result is displayed.

[0139] The formula for coordinate transformation is:

[0140] X = r·cos(ω ch )·cos(α θ +λ ch -μ ch )+γ x ·cos(ω ch );

[0141] Y=-r·cos(ω ch )·sin(α θ +λ ch -μ ch )+γ x ·sin(ω ch );

[0142] Z = r·sin(ω ch )+γ z ·sin(ω ch );

[0143] Integrate the formula into:

[0144] X=(r·cos(α θ +λ ch -μ ch )+γ x )·cos(ω ch )

[0145] Y=(-r·sin(α θ+λ ch -μ ch )+γ x )·sin(ω ch )

[0146] Z=(r+γ z ).sin(ω ch )

[0147] Wherein, X represents the x-axis data of the point cloud data in the Cartesian coordinate system; Y represents the y-axis data of the point cloud data in the Cartesian coordinate system; Z represents the z-axis data of the point cloud data in the Cartesian coordinate system; ω ch Represents the longitudinal emission angle of different laser channels of the laser beam; α θ represents the horizontal offset angle under different θ; θ represents the horizontal deflection angle of the laser radar; λ ch is the vertical angle calibration, i.e. the vertical angle correction of different laser channels of the laser beam; μ ch Horizontal angle calibration, that is, the horizontal angle correction of different laser channels of the laser beam; ch represents the laser channel.

[0148] In step S110, X, Y, and Z are output.

[0149] The radar data processing method based on FPGA proposed in Embodiment 1 of the present invention can quickly calibrate the vertical angle and horizontal angle after each radar device is replaced. By utilizing the parallel processing capability and flexible hardware architecture of FPGA, rapid processing and accurate correction of radar data are achieved, ensuring rapid recovery and normal operation of the radar system after device replacement.

[0150] The radar data processing method based on FPGA proposed in Example 1 of the present invention improves the calibration speed and reduces the time and labor cost required for calibration by integrating a highly parallel calibration algorithm and an optimized data processing circuit, thereby improving the real-time performance and accuracy of the system. The present invention not only simplifies the maintenance process, but also enhances the stability and reliability of the radar system, ensuring that accurate environmental perception information can be provided under various conditions, and provides strong technical support for fields such as autonomous driving and mobile robots.

[0151] Example 2

[0152] Based on the FPGA-based radar data processing method proposed in Embodiment 1 of the present invention, Embodiment 2 of the present invention further proposes an FPGA-based radar data processing system. Figure 3 This is a schematic diagram of a radar data processing system based on FPGA proposed in Embodiment 1 of the present invention; the system comprises: a first processing module, a second processing module and a conversion module;

[0153] The first processing module is used to obtain a DIFOP data packet of the laser radar; parse the DIFOP data packet to obtain an angle value of the laser radar, convert the angle value into a radian value, and calculate and store the sine value and cosine value of the laser radar angle value;

[0154] The second processing module is used to obtain the MSOP data packet of the laser radar, perform header detection, parameter conversion and angle calculation on the MSOP data packet to obtain coordinate information, and then store it;

[0155] The conversion module is used to extract the sine and cosine values ​​of the stored lidar angle values ​​and the preprocessed MSOP data packets for coordinate conversion, and display the converted results.

[0156] During the execution of the first processing module, the DIFOP data packet is parsed to obtain the angle value of the laser radar, and the process of converting the angle value into a radian value includes:

[0157] Extracting a channel vertical angle and a channel horizontal offset angle from the DIFOP data packet, wherein the channel vertical angle is represented by three bytes of data; and the channel horizontal offset angle is represented by three bytes of data;

[0158] Convert the vertical angle of the channel represented by the three-byte data into a decimal value, and then divide the decimal value by 100 to obtain the actual angle value in the vertical direction; convert the horizontal offset angle of the channel represented by the three-byte data into a decimal value, and then divide the decimal value by 100 to obtain the actual angle value in the horizontal direction;

[0159] The actual angle value in the horizontal direction is divided by 180 and multiplied by π to get the horizontal radian value; the actual angle value in the vertical direction is divided by 180 and multiplied by π to get the vertical radian value

[0160] The DIFOP packet data is parsed to obtain the angle value of the laser radar, and after converting the angle value into a radian value, the following steps are further included:

[0161] Disassemble the DIFOP data packet through shift and addition operations;

[0162] In order to ensure that no data is lost during the bit shift operation, the number of bits of the angle data is expanded to the target bit width, and the required bit shift operation is performed on the expanded value;

[0163] Check whether the angle value after expansion is negative. If the angle value is negative, convert the angle value to the two's complement form.

[0164] The process of disassembling the DIFOP data packet through the shift and addition operation includes: converting the DIFOP data packet into a series of sums divided by a power of 2 by using the division operation, and disassembling the DIFOP data packet through the shift and addition operation.

[0165] The process of converting an angle value to two's complement form involves:

[0166]

[0167] Wherein, D is the angle value after expansion.

[0168] The process of calculating the sine value and cosine value of the laser radar angle value includes: using the CORDIC algorithm to calculate the sine value and cosine value of the laser radar angle value.

[0169] In the second processing module, the MSOP data packet of the laser radar is obtained, the coordinate information is obtained after header detection, parameter conversion and angle calculation of the MSOP data packet, and then stored;

[0170] The header detection process includes: receiving the MSOP data packet through a communication interface (such as Ethernet, USB or SPI); reading and parsing the header information of the data packet, including the packet type, packet length, sequence number, etc.; using CRC or other verification methods to verify the integrity of the data packet to ensure correct data transmission.

[0171] The parameter conversion process includes: distance resolution: converting the received distance encoding value into the actual distance unit; reflection intensity decoding: converting the received reflection intensity encoding value into the actual reflectivity; other parameter processing: processing other parameters as needed, such as angle, speed, etc.

[0172] Use the CORDIC algorithm to calculate angle information, or use the CORDIC algorithm to perform vector rotation calculation to obtain accurate coordinate information.

[0173] When storing to BRAM, perform data structure design: design data structures such as ring buffers to ensure efficient data storage and retrieval. Perform storage management: allocate BRAM space reasonably to avoid overflow, use mechanisms such as timestamps to manage data, and ensure that new data overwrites the oldest data. Multitasking: use lock mechanisms or DMA to manage data read and write operations to prevent conflicts.

[0174] In the transformation module, the formula for coordinate transformation is:

[0175] X = r·cos(ω ch )·cos(α θ +λ ch -μ ch )+γ x·cos(ω ch );

[0176] Y=-r·cos(ω ch )·sin(α θ +λ ch -μ ch )+γ x ·sin(ω ch );

[0177] Z = r·sin(ω ch )+γ z ·sin(ω ch );

[0178] Integrate the formula into:

[0179] X=(r·cos(α θ +λ ch -μ ch )+γ x )·cos(ω ch )

[0180] Y=(-r·sin(α θ +λ ch -μ ch )+γ x )·sin(ω ch )

[0181] Z=(r+γ z ).sin(ω ch )

[0182] Wherein, X represents the x-axis data of the point cloud data in the Cartesian coordinate system; Y represents the y-axis data of the point cloud data in the Cartesian coordinate system; Z represents the z-axis data of the point cloud data in the Cartesian coordinate system; ω ch Represents the longitudinal emission angle of different laser channels of the laser beam; α θ represents the horizontal offset angle under different θ; θ represents the horizontal deflection angle of the laser radar; λ ch is the vertical angle calibration, i.e. the vertical angle correction of different laser channels of the laser beam; μ ch Horizontal angle calibration, that is, the horizontal angle correction of different laser channels of the laser beam; ch represents the laser channel.

[0183] The radar data processing system based on FPGA proposed in Embodiment 2 of the present invention can quickly calibrate the vertical angle and horizontal angle each time the radar equipment is replaced. By utilizing the parallel processing capability and flexible hardware architecture of FPGA, rapid processing and accurate correction of radar data are achieved, ensuring rapid recovery and normal operation of the radar system after equipment replacement.

[0184] The radar data processing system based on FPGA proposed in Example 2 of the present invention improves the calibration speed and reduces the time and labor cost required for calibration by integrating a highly parallel calibration algorithm and an optimized data processing circuit, thereby improving the real-time performance and accuracy of the system. The present invention not only simplifies the maintenance process, but also enhances the stability and reliability of the radar system, ensuring that accurate environmental perception information can be provided under various conditions, and provides strong technical support for fields such as autonomous driving and mobile robots.

[0185] Example 3

[0186] The present invention also proposes a radar data processing device based on FPGA. Figure 4 A schematic diagram of a radar data processing device based on FPGA proposed in Embodiment 1 of the present invention, comprising:

[0187] Memory for storing computer programs;

[0188] The processor is used to implement the following method steps when executing the computer program:

[0189] In step S100, the system is powered on and initialized.

[0190] In step S101, a DIFOP data packet is waited for.

[0191] In step S102, the received original DIFOP data packet is pre-processed

[0192] In step S103, the fixed rotation angle values ​​of the mechanical radar are obtained from the external device at the same time. These angle values ​​are one of the necessary conditions for calculating the three-dimensional coordinates of the target object. These fixed values ​​can be calculated in advance and stored in the BRAM for standby use.

[0193] In step S104, the fixed rotation angle value of the mechanical radar obtained from the external device is format-converted and then input into the CORDIC kernel.

[0194] In step S105, it is input into the CORDIC kernel.

[0195] In step S106, the sine value and cosine value of the laser radar angle value are calculated. The sine and cosine values ​​of these pre-processed angle values ​​are calculated using the CORDICIP core in the FPGA.

[0196] In step S107, the estimated data is placed in the BRAM.

[0197] In step S108, the MSOP data packet of the laser radar is obtained, and the coordinate information is obtained after header detection, parameter conversion and angle calculation of the MSOP data packet, and then stored;

[0198] In step S109, the sine value and cosine value of the stored laser radar angle value and the preprocessed MSOP data packet are extracted for coordinate conversion, and the converted result is displayed.

[0199] The formula for coordinate transformation is:

[0200] X = r·cos(ω ch )·cos(α θ +λ ch -μ ch )+γ x ·cos(ω ch );

[0201] Y=-r·cos(ω ch )·sin(α θ +λ ch -μ ch )+γ x ·sin(ω ch );

[0202] Z = r·sin(ω ch )+γ z ·sin(ω ch );

[0203] Integrate the formula into:

[0204] X=(r·cos(α θ +λ ch -μ ch )+γ x )·cos(ω ch )

[0205] Y=(-r·sin(α θ +λ ch -μ ch )+γ x )·sin(ω ch )

[0206] Z=(r+γ z ).sin(ω ch ).

[0207] In step S110, X, Y, and Z are output.

[0208] Wherein, X represents the x-axis data of the point cloud data in the Cartesian coordinate system; Y represents the y-axis data of the point cloud data in the Cartesian coordinate system; Z represents the z-axis data of the point cloud data in the Cartesian coordinate system; ω ch Represents the longitudinal emission angle of different laser channels of the laser beam; α θrepresents the horizontal offset angle under different θ; θ represents the horizontal deflection angle of the laser radar; λ ch is the vertical angle calibration, i.e. the vertical angle correction of different laser channels of the laser beam; μ ch Horizontal angle calibration, that is, the horizontal angle correction of different laser channels of the laser beam; ch represents the laser channel.

[0209] The FPGA-based radar data processing device proposed in Embodiment 3 of the present invention can quickly calibrate the vertical angle and horizontal angle each time the radar device is replaced. By utilizing the parallel processing capability and flexible hardware architecture of the FPGA, rapid processing and accurate correction of radar data are achieved, ensuring rapid recovery and normal operation of the radar system after replacing the device.

[0210] The FPGA-based radar data processing device proposed in Example 3 of the present invention improves the calibration speed and reduces the time and labor cost required for calibration by integrating a highly parallel calibration algorithm and an optimized data processing circuit, thereby improving the real-time performance and accuracy of the system. The present invention not only simplifies the maintenance process, but also enhances the stability and reliability of the radar system, ensuring that accurate environmental perception information can be provided under various conditions, and provides strong technical support for fields such as autonomous driving and mobile robots.

[0211] It should be noted that the technical solution of the present invention also provides an electronic device, including: a communication interface capable of information exchange with other devices such as network devices; a processor connected to the communication interface to realize information exchange with other devices, and used to execute a radar data processing method based on FPGA provided by one or more of the above technical solutions when running a computer program, and the computer program is stored in a memory. The description of the relevant parts of the radar data processing device based on FPGA provided in Example 3 of the present application can refer to the detailed description of the corresponding parts of the radar data processing method based on FPGA provided in Example 1 of the present application, and will not be repeated here.

[0212] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment that includes a series of elements are inherent to the elements. In the absence of more restrictions, the elements limited by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or equipment that includes the elements. In addition, the above-mentioned technical solution provided in the embodiment of the present application is consistent with the corresponding technical solution in the prior art in principle, and the part is not described in detail, so as not to repeat too much.

[0213] Although the above describes the specific implementation of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. For those skilled in the art, other different forms of modifications or deformations can be made on the basis of the above description. It is not necessary and impossible to list all the implementation methods here. On the basis of the technical solution of the present invention, various modifications or deformations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.

Claims

1. A radar data processing method based on FPGA, characterized in that: The following steps are involved: Obtaining a DIFOP data packet of the laser radar; parsing the DIFOP data packet to obtain an angle value of the laser radar, converting the angle value into a radian value, and calculating and storing a sine value and a cosine value of the laser radar angle value; Obtaining the MSOP data packet of the laser radar, performing header detection, parameter conversion and angle calculation on the MSOP data packet to obtain coordinate information, and then storing it; The sine and cosine values ​​of the stored lidar angle values ​​and the preprocessed MSOP data packets are extracted for coordinate conversion, and the converted results are displayed.

2. The radar data processing method based on FPGA according to claim 1, characterized in that: Before obtaining the DIFOP data packet of the laser radar, it also includes: Connect the LiDAR to the FPGA unit to establish communication between the LiDAR and the FPGA unit; and check the power supply and configuration of the LiDAR to ensure the normal operation of the LiDAR.

3. The radar data processing method based on FPGA according to claim 1, characterized in that: The DIFOP data packet is parsed to obtain the angle value of the laser radar, and the process of converting the angle value into a radian value includes: Extracting a channel vertical angle and a channel horizontal offset angle from the DIFOP data packet, wherein the channel vertical angle is represented by three bytes of data; and the channel horizontal offset angle is represented by three bytes of data; Convert the vertical angle of the channel represented by the three-byte data into a decimal value, and then divide the decimal value by 100 to obtain the actual angle value in the vertical direction; convert the horizontal offset angle of the channel represented by the three-byte data into a decimal value, and then divide the decimal value by 100 to obtain the actual angle value in the horizontal direction; The actual angle value in the horizontal direction is divided by 180 and multiplied by π to obtain the horizontal radian value; the actual angle value in the vertical direction is divided by 180 and multiplied by π to obtain the vertical radian value.

4. The radar data processing method based on FPGA according to claim 1, characterized in that: The DIFOP packet data is parsed to obtain the angle value of the laser radar, and after converting the angle value into a radian value, the following steps are further included: Disassemble the DIFOP data packet through shift and addition operations; In order to ensure that no data is lost during the bit shift operation, the number of bits of the angle data is expanded to the target bit width, and the required bit shift operation is performed on the expanded value; Check whether the angle value after expansion is negative. If the angle value is negative, convert the angle value to the two's complement form.

5. The radar data processing method based on FPGA according to claim 4, characterized in that: The process of disassembling the DIFOP data packet through the shift and addition operation includes: converting the DIFOP data packet into a series of sums divided by a power of 2 by using the division operation, and disassembling the DIFOP data packet through the shift and addition operation.

6. The radar data processing method based on FPGA according to claim 4, characterized in that: The process of converting the angle value into the two's complement form includes: Wherein, D is the angle value after expansion.

7. The radar data processing method based on FPGA according to claim 1, characterized in that: The process of calculating the sine value and cosine value of the laser radar angle value includes: using the CORDIC algorithm to calculate the sine value and cosine value of the laser radar angle value.

8. The radar data processing method based on FPGA according to claim 1, characterized in that: The formula for coordinate transformation is: X=r·cos(ω ch )·cos(α θ +λ ch -m ch )+c x ·cos(ω ch ); Y=-r·cos(ω ch )·sin(α θ +λ ch -m ch )+c x ·sin(ω ch ); Z=r·sin(ω ch )+c z ·sin(ω ch ); Integrate the formula into: X=(r·cos(α) θ +λ ch -m ch )+c x )·cos(ω ch ) Y=(-r·sin(α θ +λ ch -m ch )+c x )·sin(ω ch ) Z=(r+γ z ).sin(ω ch ) Wherein, X represents the x-axis data of the point cloud data in the Cartesian coordinate system; Y represents the y-axis data of the point cloud data in the Cartesian coordinate system; Z represents the z-axis data of the point cloud data in the Cartesian coordinate system; ω ch Represents the longitudinal emission angle of different laser channels of the laser beam; α θ represents the horizontal offset angle under different θ; θ represents the horizontal deflection angle of the laser radar; λ ch is the vertical angle calibration, i.e. the vertical angle correction of different laser channels of the laser beam; μ ch Horizontal angle calibration, that is, the horizontal angle correction of different laser channels of the laser beam; ch represents the laser channel.

9. A radar data processing system based on FPGA, characterized in that: include: A first processing module, a second processing module and a conversion module; The first processing module is used to obtain a DIFOP data packet of the laser radar; parse the DIFOP data packet to obtain an angle value of the laser radar, convert the angle value into a radian value, and calculate and store the sine value and cosine value of the laser radar angle value; The second processing module is used to obtain the MSOP data packet of the laser radar, perform header detection, parameter conversion and angle calculation on the MSOP data packet to obtain coordinate information, and then store it; The conversion module is used to extract the sine value and cosine value of the stored laser radar angle value and the preprocessed MSOP data packet to perform coordinate conversion, and display the converted results.

10. A radar data processing device based on FPGA, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method steps according to any one of claims 1 to 8 when executing the computer program.