Interactive Ultrasonic Radar Drive Test Method and System
By dynamically configuring the ultrasonic radar model identification code matching scheme, parsing the configuration frame and combining it with calibration data for interactive calibration and drive testing, the problem of insufficient testing flexibility in the existing technology is solved, and efficient adaptation of multiple radar models and improved reliability of test results are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING JUNGE ELECTRONICS TECH CO LTD
- Filing Date
- 2025-07-24
- Publication Date
- 2026-06-30
AI Technical Summary
Existing ultrasonic radar testing methods cannot respond to user or system adjustment needs in real time, resulting in insufficient testing flexibility and difficulty in efficiently switching and reusing between multiple models or multi-channel radars, thus affecting testing efficiency and accuracy.
By matching the ultrasonic radar model identification code with the configuration scheme, the sensor connection channel is dynamically configured. The configuration frame is parsed to obtain the communication type, electrical parameters and calibration parameters. Combined with the calibration data, interactive calibration and drive tests are performed to form a dynamic calibration curve to correct the test results.
It enables automatic adaptation of ultrasonic radars from different manufacturers and models, reduces manual configuration costs, improves the universality and efficiency of the testing process, reduces testing errors, and enhances the reliability and standardization of test results.
Smart Images

Figure CN120871094B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of sensor testing technology, and in particular relates to an interactive ultrasonic radar driving test method and system. Background Technology
[0002] With the development of intelligent sensor technology, ultrasonic radar testing technology has emerged, which enables the monitoring of radar operating status and basic response testing by driving and verifying ultrasonic radar sensors.
[0003] Traditional testing methods typically employ dedicated ultrasonic radar testing equipment. This equipment sends drive commands to the radar under test through a fixed test procedure and interface protocol, and collects its response waveforms or digital return values. The testing process relies on a pre-configured set of parameters, such as frequency range, echo gating time, and voltage threshold, to control the behavior of signal generation and echo resolution. Some methods also introduce basic result comparison mechanisms, using manually set judgment thresholds to determine the reasonableness of the sensor output.
[0004] However, the aforementioned methods rely heavily on pre-loaded test parameters, failing to respond in real-time to user or system adjustments, resulting in insufficient testing flexibility. Current methods primarily use static configuration, leading to a disconnect between calibration data and the testing process, hindering efficient switching and reuse across various radar models or channels, impacting testing efficiency and accuracy. Furthermore, when dealing with different communication protocols, hardware interfaces, or sensor versions, manual configuration modifications or redevelopment of test logic are often required, lacking a unified parameter parsing and driving mechanism. Summary of the Invention
[0005] Therefore, it is necessary to provide an interactive ultrasonic radar-driven testing method and system that can dynamically configure calibration and testing parameters to address the aforementioned technical problems.
[0006] Firstly, this application provides an interactive ultrasonic radar-driven testing method, including:
[0007] In response to the obtained ultrasonic radar model identification code, the corresponding configuration scheme is matched according to the ultrasonic radar model identification code to obtain a configuration frame; the configuration frame includes the sensor connection channel;
[0008] Parse the configuration frame to obtain configuration data and configuration status frame; the configuration data includes communication type, electrical parameters, sensor calibration parameters, and test cut threshold; the configuration status frame includes configuration success and configuration failure.
[0009] In response to the received calibration start command, interactive calibration is performed based on the sensor connection channel and configuration data to obtain calibration data and calibration status frames. The calibration data includes calibration curves, error indicators, and anomaly flags. The calibration start command is generated when the configuration status frame indicates successful configuration. The calibration status frame includes calibration waiting state and calibration completed state.
[0010] In response to the acquired test start command, the test is driven based on the sensor connection channel and the configuration data, and the test results are obtained by combining the calibration data. The test start command is generated when the calibration status frame is in the calibration completion state.
[0011] In one embodiment, based on the sensor connection channel, interactive calibration is performed according to configuration data to obtain calibration data and a calibration status frame, including:
[0012] Determine the communication protocol based on the communication type;
[0013] Based on the calibration function corresponding to the communication protocol, standard test excitations are sent to the sensor connection channel according to the sensor calibration parameters.
[0014] Obtain the response data corresponding to the standard test stimulus, and calculate the actual and theoretical output deviation based on the response data to obtain the calibration data;
[0015] If the error index in the calibration data is within the preset threshold, then the calibration status frame is determined to be the calibration completed state.
[0016] If the error index in the calibration data exceeds the preset threshold, the calibration status frame is determined to be in the calibration waiting state.
[0017] In one embodiment, the method further includes:
[0018] If the calibration status frame is in the calibration waiting state, a recalibration instruction is generated; the recalibration instruction is used to instruct the rematch of the configuration scheme to obtain a new configuration frame.
[0019] In one embodiment, based on the sensor connection channel, a drive test is performed according to configuration data, and corrections are made in conjunction with calibration data to obtain test results, including:
[0020] The detection stimulus is sent to the sensor connection channel at a preset cycle to obtain the raw response data corresponding to each round of detection stimulus;
[0021] The original response data is mapped and corrected in real time based on the calibration curve to obtain the true response data.
[0022] The test results are obtained by judging each real response data according to the test cut-off threshold.
[0023] In one embodiment, the configuration frame is parsed to obtain configuration data and a configuration status frame, including:
[0024] The configuration frame is restored according to its data structure definition to obtain the frame header identifier, checksum, and configuration fields. The data structure definition of the configuration frame includes the data frame header, data type, data length, function code, data content, checksum, and data frame trailer.
[0025] Frame synchronization is performed based on the frame header identifier, and data integrity is verified based on the checksum to obtain the verification result;
[0026] If the verification result indicates that the data is complete, the configuration fields will be mapped to obtain the configuration data, and the configuration status frame will be determined as successful.
[0027] In one embodiment, a configuration frame is obtained by matching the corresponding configuration scheme according to the ultrasonic radar model identification code, including:
[0028] Based on a pre-set sensor adapter template library, the corresponding configuration scheme is obtained by matching the ultrasonic radar model identification code as the index; the sensor adapter template library includes various communication protocol templates, electrical parameter ranges, calibration parameter default values, and test logic rules;
[0029] Fill in the fields of the adaptation template according to the configuration scheme to obtain the configuration frame.
[0030] In one embodiment, the method further includes:
[0031] Based on configuration data, calibration data, and test results, pass / fail statistics and anomaly analysis are performed to generate a visual test report; the visual test report includes anomaly type statistics.
[0032] Secondly, this application also provides an interactive ultrasonic radar-driven testing system, comprising:
[0033] The configuration module is used to respond to the obtained ultrasonic radar model identification code, match the corresponding configuration scheme according to the ultrasonic radar model identification code, and obtain a configuration frame; the configuration frame includes the sensor connection channel.
[0034] The parsing module is used to parse the configuration frame to obtain the configuration data and configuration status frame.
[0035] The calibration module, in response to the acquired calibration start command, performs interactive calibration based on the sensor connection channel and configuration data to obtain calibration data and calibration status frames.
[0036] The testing module, in response to the acquired test start command, drives the test based on the sensor connection channel and configuration data, and corrects it by combining calibration data to obtain the test results.
[0037] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-described interactive ultrasonic radar driving test methods.
[0038] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described interactive ultrasonic radar driving test methods.
[0039] The aforementioned interactive ultrasonic radar drive testing method and system, in its configuration phase, uses the model identification code as an index to match preset templates, solving the problem of current test drivers' inability to support multiple models and sensors from different manufacturers, thus improving equipment reusability and scalability. During testing, calibration data is incorporated for correction, significantly reducing test errors caused by individual radar deviations and improving the reliability and reference value of test results. Data frame control is used for calibration and test settings, avoiding human intervention errors and improving overall testing efficiency. A state-driven mechanism establishes clear dependencies and feedback between different test stages, possessing excellent interactive closed-loop capabilities, effectively improving test standardization and process security. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments or related technologies of this application, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a schematic diagram illustrating the application environment of the interactive ultrasonic radar driving test method of the present invention;
[0042] Figure 2 This is a flowchart illustrating the interactive ultrasonic radar driving test method of the present invention.
[0043] Figure 3 This is a flowchart illustrating the steps of step S203.
[0044] Figure 4 This is a structural diagram of the interactive ultrasonic radar-driven testing system of the present invention. Detailed Implementation
[0045] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0046] The interactive ultrasonic radar driving test method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the host computer 101 establishes a communication connection with the ultrasonic radar driver 102 via USB-CDC (Universal Serial Bus-Communication Device Class Virtual Serial Port). The data storage system can store the data that the ultrasonic radar driver 102 needs to process. The data storage system can be integrated into the ultrasonic radar driver 102. The ultrasonic radar driver 102 consists of an embedded microprocessor, programmable logic circuits, a signal conditioning module, a communication interface module, a power supply module, and interface circuits. Multiple interfaces of the interface circuits can externally access the ultrasonic radar sensor under test and collect the response data returned by the ultrasonic radar sensor. The signal conditioning module generates an excitation signal that meets the operating requirements of the ultrasonic radar under test, such as a pulse drive waveform with a specific frequency, pulse width, and amplitude, based on the control parameters issued by the host computer. The communication interface module supports multiple physical protocol interfaces such as UART (Asynchronous Communication), SPI (Serial Communication), LIN (Serial Communication), and CAN (Serial Communication) for protocol-level interaction with radar sensors from different manufacturers. The host computer 101 can be, but is not limited to, various personal computers, laptops, tablets, etc.
[0047] In one exemplary embodiment, such as Figure 2 As shown, an interactive ultrasonic radar driving test method is provided, which can be applied to... Figure 1 Taking China as an example, the explanation includes:
[0048] S201. In response to the obtained ultrasonic radar model identification code, match the corresponding configuration scheme according to the ultrasonic radar model identification code to obtain a configuration frame; the configuration frame includes the sensor connection channel.
[0049] This is illustrative of identifying the model of the ultrasonic radar currently connected to the ultrasonic radar driver to determine its specific parameters regarding communication protocol, electrical specifications, and calibration mode. Optionally, the host computer actively scans the connection ports of the ultrasonic radar driver. The ultrasonic radar driver assigns a unique identification number to each connection port (channel). The host computer sends handshake requests to each channel via detection commands, and passively connected ultrasonic radar sensors return their model identification codes. Optionally, the ultrasonic radar has an internal read-only memory area that actively broadcasts model information upon power-on. The ultrasonic radar driver reads the model information and transmits it to the host computer.
[0050] Furthermore, the ultrasonic radar model identification code is a unique string or hexadecimal identifier used to mark the sensor's production model and series, and is usually written by the sensor firmware. After obtaining the model identification code, the host computer can retrieve the corresponding configuration scheme from the built-in model configuration library, and then generate the corresponding configuration frame. The configuration frame is a structured data packet that embeds multiple fields, including communication type, electrical parameters, sensor calibration parameters, test cut thresholds, etc., and indicates which sensor connection channel the configuration frame is applicable to.
[0051] Optionally, when the ultrasonic radar driver device is connected to multiple external ultrasonic radar sensors for testing simultaneously, the host computer can send configuration frames for each sensor through polling or concurrent methods. Specifically, the host computer can send configuration frames to each sensor sequentially, or it can allocate an independent thread or process for each sensor and send configuration frames to multiple connection ports simultaneously. Furthermore, the configuration frames are sent to the ultrasonic radar driver device as a hexadecimal array with verification. The ultrasonic radar driver device maintains the communication status of each sensor, achieving isolated driving and parallel processing.
[0052] S202. Parse the configuration frame to obtain configuration data and configuration status frame; the configuration data includes communication type, electrical parameters, sensor calibration parameters and test cutting threshold; the configuration status frame includes configuration success and configuration failure.
[0053] This illustration shows how the ultrasonic radar-driven device extracts various information from the configuration frame bit-by-bit or field-by-field. The communication type in the configuration data can cover protocols such as CAN, LIN, UART, single-bus, and DSI 3. Electrical parameters mainly refer to the sensor's power supply voltage, input current, and signal level, ensuring the sensor won't be damaged or fail due to parameter mismatch. The configuration data also includes sensor calibration parameters, which are initial factory calibration information specific to the model. Examples include zero-point calibration factor, gain compensation factor, sound wave propagation speed compensation, temperature and humidity correction coefficient, and default blind zone length, used to construct the initial boundary conditions for the dynamic calibration curve. The configuration data also sets test cutoff thresholds, used for data truncation or validity judgment during the testing phase. Examples include echo intensity thresholds and response delay thresholds; results with echo signal strength below the thresholds are discarded during testing to reduce false echo interference. After parsing the configuration frame, a configuration status frame is sent back to the host computer, including a configuration success or failure flag. Successful configuration indicates that the ultrasonic radar driver has accepted the configuration parameters and returned a correct confirmation response; configuration failure may be caused by model mismatch, communication abnormality or internal error, and the user may be prompted to reconfigure.
[0054] S203. In response to the acquired calibration start command, based on the sensor connection channel, interactive calibration is performed according to the configuration data to obtain calibration data and calibration status frame; the calibration data includes calibration curve, error index and abnormal flag bit; the calibration start command is generated when the configuration status frame is configured successfully; the calibration status frame includes calibration waiting state and calibration completed state.
[0055] Indicatively, after receiving successful configuration feedback, the host computer issues a calibration start command, instructing the ultrasonic radar drive device to trigger its internal calibration service. Interactive calibration refers to a calibration process with a two-way feedback mechanism. Its purpose is to allow the sensor to adapt to the current environment and operating state, eliminating system errors. Specifically, the ultrasonic radar drive device sends excitation parameters within a certain range to the sensor. The sensor returns its internally processed raw ranging results or simulated response. The ultrasonic radar drive device uploads the raw response data acquired during the calibration process to the host computer, which then fits a calibration model based on this data. For example, ranging experiments are conducted in open fields, with known obstacle distances, and in multi-angle or multi-target scenarios. The difference between the output value and the theoretical value for each set of experiments is collected, and a calibration curve is fitted. The calibration curve can be represented as a function of distance offset with time, temperature, power supply fluctuations, etc., used for error correction in subsequent tests. Furthermore, a set of error indicators is generated, including maximum deviation, mean square error, repeatability, and other statistical values, to evaluate the stability and consistency of the current sensor. If the experimental data significantly deviates from the fitted model, an anomaly flag is recorded for subsequent diagnosis or exclusion of unqualified equipment. Once calibration is complete, a calibration status frame is generated and returned, marking the current state as calibration complete; otherwise, it remains in the calibration waiting state, prompting the user to wait or restart.
[0056] S204. In response to the acquired test start command, drive the test based on the sensor connection channel and configuration data, and make corrections in conjunction with calibration data to obtain the test results; the test start command is generated when the calibration status frame is in the calibration completion state.
[0057] Indicatively, after confirming the calibration status as complete, the host computer test program issues a test start command. Optionally, this command can be manually clicked through the control software interface or automatically triggered by the host computer's process controller. Upon receiving this command, the ultrasonic radar drive device will call the communication parameters in the configuration data and initiate periodic ranging requests, echo sampling, and blind zone determination to the sensor through the established channel. For example, the test process generates raw distance data based on the sensor's ranging response to the ultrasonic echo. Further, this raw data is dynamically corrected using the previously obtained calibration curve. For example, if a distance value falls into a known nonlinear error range, it is corrected through interpolation or function mapping. The corrected data is then compared with a test cutoff threshold to obtain the test result, thereby determining the sensor's performance in the current environment.
[0058] In the aforementioned interactive ultrasonic radar drive testing method, configuration schemes are matched with a preset sensor adaptation template library using model identification codes, achieving automatic adaptation for ultrasonic radars from different manufacturers and models. This significantly reduces manual configuration costs and error probability, improving the versatility and efficiency of the testing process. Configuration frames are parsed to obtain communication type, electrical parameters, calibration parameters, and thresholds, and configuration status frames are output. This ensures that the configuration process for each ultrasonic radar is traceable and verifiable, improving system stability and configuration success rate, and reducing the probability of invalid tests. Calibration start commands are only responded to when configuration is successful, and the testing process is triggered after calibration is completed. A hierarchical control logic is formed to ensure that each stage of operation is executed under reasonable conditions, improving fault tolerance and operational rigor. During the testing phase, calibration curves and error indicators are used to correct the original data, improving testing accuracy and robustness, especially suitable for batch radar consistency verification and misalignment detection. Throughout the test, execution status and abnormal situations are fed back in the form of configuration frames, status frames, calibration frames, and test frames, improving debugging transparency and visualization, facilitating engineers to locate the source of faults, and supporting subsequent maintenance and quality review.
[0059] In one embodiment, such as Figure 3 As shown, based on the sensor connection channel, interactive calibration is performed according to the configuration data to obtain calibration data and calibration status frames, including:
[0060] S301. Determine the communication protocol based on the communication type.
[0061] This is illustrative of how, based on the communication type specified in the configuration data, the corresponding communication protocol stack is determined. Then, within the ultrasonic radar driver device, a low-level communication control module matching this protocol is invoked, and corresponding pin mappings and interface electrical characteristics are set to establish an effective communication channel with the target sensor. Specifically, different driver codes are set to match the baud rate and level protocol according to the communication protocol.
[0062] S302. Based on the calibration function corresponding to the communication protocol, send standard test excitation to the sensor connection channel according to the sensor calibration parameters.
[0063] Indicatively, the calibration parameters corresponding to this type of sensor are extracted from the configuration data. For example, the calibration parameters include response time constant, zero-point calibration factor, gain supplement factor, and reference sensitivity factor, etc., and the pre-corresponding calibration function is called to construct a standard test excitation signal based on the calibration parameters. This excitation signal is sent to the sensor under test through the sensor connection channel.
[0064] S303. Obtain the response data corresponding to the standard test stimulus, and calculate the actual and theoretical output deviation based on the response data to obtain the calibration data.
[0065] In a schematic manner, the response data of the sensor to the excitation signal is acquired and compared with the theoretical standard output. By calculating the difference between the response data and the theoretical reference value, error indicators, calibration curves, and abnormal standard positions reflecting the calibration deviation are obtained. For example, the calibration curve is obtained by fitting the excitation signal input and the response data output, and the error indicators include mean square error, sensitivity offset, or linear drift.
[0066] S304. If the error index in the calibration data is within the preset threshold, then the calibration status frame is determined to be the calibration completed state.
[0067] Indicatively, the error index is evaluated. If the index is within the preset threshold range, the actual output of the sensor is considered to be basically consistent with the theoretical model, and the calibration is completed. The calibration parameters are stored as the sensor's activation calibration value for use in the testing process, and the generated calibration status frame will be marked as calibration complete.
[0068] S305. If the error index in the calibration data exceeds the preset threshold, the calibration status frame is determined to be in calibration waiting state.
[0069] If the detected error index exceeds the threshold limit, it indicates that the sensor has not yet reached the accuracy level required for reliable testing. In this case, a calibration status frame is generated and marked as calibration waiting state, which can notify the host computer to trigger the recalibration process or issue an abnormal prompt.
[0070] In one embodiment, the method further includes:
[0071] If the calibration status frame is in the calibration waiting state, a recalibration instruction is generated; the recalibration instruction is used to instruct the rematch of the configuration scheme to obtain a new configuration frame.
[0072] In the calibration waiting state, to ensure that the final test accuracy reaches an acceptable level, a recalibration instruction is automatically generated. As a control signal, this instruction indicates to the host computer to re-execute the configuration scheme matching process, dynamically adjust the configuration parameters, and generate a new configuration frame to adapt to the changes in the current state of the sensor and environmental conditions.
[0073] In one embodiment, based on the sensor connection channel, drive tests are performed according to the configuration data, and corrections are made in combination with the calibration data to obtain test results, including:
[0074] S41. Send a detection excitation to the sensor connection channel at a preset period to obtain the original response data corresponding to each round of detection excitation.
[0075] Schematically, according to a preset time period, a detection excitation signal is periodically sent to the sensor under test through the data communication path established with the sensor connection channel. The parameters of this detection excitation are determined by the configuration data to ensure that the sent excitation conforms to the excitation characteristics of the measured sensor in terms of amplitude, frequency, duration, etc. The analog or digital signal output by the sensor in response to the detection excitation constitutes the original response data corresponding to each round of detection.
[0076] S42. Perform real-time mapping correction on the original response data according to the calibration curve to obtain the true response data.
[0077] Furthermore, the calibration curve established during the calibration process is called to perform real-time correction on the original response data. This calibration curve is a family of mapping functions, which is constructed based on the historical standard excitation response relationship and has mathematical properties such as monotonicity, continuity, and differentiability, and can act efficiently on the dynamic input stream. The correction process usually adopts methods such as table lookup, interpolation, or function calculation to complete the conversion from the original value to the true physical value within microseconds and generate high-confidence true response data. The correction operation has a boundary buffering mechanism for the error-sensitive area to avoid abnormal amplification.
[0078] S43. Judge each true response data according to the test cut-off threshold to obtain the test result.
[0079] Schematically, based on the corrected true response data and in combination with the preset test cut-off threshold, the status of each round of data is judged. The test cut-off threshold comes from the product-level performance boundary index or the safety upper and lower limits set for the application scenario, and usually sets the judgment criteria in dimensions such as amplitude upper limit, waveform distortion rate, response delay, etc. Compare each true response data with the threshold range to determine whether the current sensor meets the performance requirements, and then output the test result. The test result can include labels such as pass, fail, critical state, recommended retest, etc., and supports linkage with the host computer to feedback to the test interface for engineering decision-making reference.
[0080] In one embodiment, the configuration frame is parsed to obtain configuration data and a configuration status frame, including:
[0081] S51. Restore the data structure of the configuration frame according to the data structure definition of the configuration frame to obtain the frame header identifier, checksum and configuration fields; the data structure definition of the configuration frame includes data frame header, data type, data length, function code, data content, checksum and data frame trailer.
[0082] This example illustrates how the received configuration frame data is reconstructed according to a preset configuration frame structure definition. The data transmission protocol between the host computer and the ultrasonic radar drive device uses a fixed-length frame format, with each frame being 64 bytes. This includes a data frame header for frame synchronization, a data type indicating the configuration purpose, a data length for dynamically truncating content segments, function codes mapping specific configuration behaviors, data content containing communication parameters and interface settings, a checksum for data integrity verification, and a data frame tail for frame integrity marking.
[0083] S52. Perform frame synchronization based on the frame header identifier and verify data integrity based on the checksum to obtain the verification result.
[0084] Frame synchronization is performed based on the parsed frame header identifier to confirm the start boundary of the configuration frame and ensure data alignment. Furthermore, a checksum is extracted and used to perform a data integrity check against the content segment to determine the validity of the configuration data during transmission. Specifically, the checksum mechanism is typically based on a CRC (Cyclic Redundancy Check) algorithm, a cumulative checksum, or a specific rule function, as specified by the communication protocol. If the checksum fails, the configuration frame is considered abnormally discarded and does not participate in the configuration process.
[0085] S53. If the verification result indicates that the data is complete, the configuration fields are mapped to obtain the configuration data, and the configuration status frame is determined to be successfully configured.
[0086] Assuming successful verification, the configuration fields undergo structured mapping to extract key parameters such as communication type, baud rate setting, data format type, and function enable flags, which are then stored as configuration data in the control buffer. Simultaneously, based on the completion status of this configuration process, a corresponding configuration status frame is generated and marked as successful before being uploaded to the host computer to drive subsequent calibration and testing processes. If the host computer does not receive a successful configuration status frame or a verification failure flag within the timeout period, the write operation is considered a failure.
[0087] The above method not only ensures the accurate initialization of device drive behavior through configuration data parsing, but also provides a parameter basis for dynamic switching and multi-channel compatibility between different sensors, significantly improving scalability and reusability in complex testing scenarios.
[0088] In one embodiment, a configuration frame is obtained by matching the corresponding configuration scheme according to the ultrasonic radar model identification code, including:
[0089] S61. Based on the preset sensor adapter template library, the corresponding configuration scheme is obtained by matching the ultrasonic radar model identification code as the index; the sensor adapter template library includes various communication protocol templates, electrical parameter ranges, calibration parameter default values and test logic rules.
[0090] As an illustration, upon receiving the model identification code of the ultrasonic radar to be tested, this code is used as an index key and input into a pre-built sensor adaptation template library. This template library organizes configuration schemes for various ultrasonic radar models in a structured format. Each configuration scheme includes fields such as a communication protocol template, electrical parameter range, default calibration parameters, and test control logic rules. The communication protocol template is further subdivided into frame structure format, transmission encoding method, and timing control parameters; the electrical parameter range covers equipment power supply voltage, current tolerance, and signal amplitude upper and lower limits; calibration parameters include default values such as initial gain and zero-point offset; and the test logic rules define operating parameters such as detection period, excitation period, and test cut-off threshold.
[0091] S62. Fill in the content of each field of the adaptation template according to the configuration scheme to obtain the configuration frame.
[0092] After the identifier code matching is completed, the complete configuration scheme that matches it is extracted. Then, the template field filling stage begins. In this stage, all parameter items from the extracted configuration scheme are filled into the field positions specified in the frame structure according to the field definitions in the communication protocol template. After the field filling is completed, a complete configuration frame is generated.
[0093] In one embodiment, the method further includes:
[0094] Based on configuration data, calibration data, and test results, pass / fail statistics and anomaly analysis are performed to generate a visual test report; the visual test report includes anomaly type statistics.
[0095] At the end of the testing process, calibration data, test results, and configuration records are integrated, and a visualized test report is generated using statistical and anomaly analysis methods. The report includes not only response curves, error distribution, and pass rate statistics, but also statistical classifications of anomaly types, such as deviation drift, signal attenuation, or communication interruption. The visualized results can be fed back to a host computer via a graphical interface to assist users in evaluating sensor performance.
[0096] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0097] Based on the same inventive concept, this application also provides an interactive ultrasonic radar driving test system for implementing the interactive ultrasonic radar driving test method described above. The solution provided by this system is similar to the implementation described in the above method; therefore, the specific limitations in one or more embodiments of the interactive ultrasonic radar driving test system provided below can be found in the limitations of the interactive ultrasonic radar driving test method described above, and will not be repeated here.
[0098] In one exemplary embodiment, such as Figure 4 As shown, an interactive ultrasonic radar-driven testing system is provided, comprising:
[0099] The configuration module 401 is used to respond to the acquired ultrasonic radar model identification code, match the corresponding configuration scheme according to the ultrasonic radar model identification code, and obtain a configuration frame; the configuration frame includes the sensor connection channel.
[0100] Parsing module 402 is used to parse the configuration frame to obtain configuration data and configuration status frame;
[0101] The calibration module 403 is used to respond to the acquired calibration start command, perform interactive calibration based on the sensor connection channel and configuration data, and obtain calibration data and calibration status frame;
[0102] Test module 404 is used to respond to the acquired test start command, drive the test based on the sensor connection channel and configuration data, and make corrections based on the calibration data to obtain the test results.
[0103] In one embodiment, the calibration module 403 is further configured to:
[0104] Determine the communication protocol based on the communication type;
[0105] Based on the calibration function corresponding to the communication protocol, standard test excitations are sent to the sensor connection channel according to the sensor calibration parameters.
[0106] Obtain the response data corresponding to the standard test stimulus, and calculate the actual and theoretical output deviation based on the response data to obtain the calibration data;
[0107] If the error index in the calibration data is within the preset threshold, then the calibration status frame is determined to be the calibration completed state.
[0108] If the error index in the calibration data exceeds the preset threshold, the calibration status frame is determined to be in the calibration waiting state.
[0109] In one embodiment, the parsing module 402 is further configured to:
[0110] If the calibration status frame is in the calibration waiting state, a recalibration instruction is generated; the recalibration instruction is used to instruct the rematch of the configuration scheme to obtain a new configuration frame.
[0111] In one embodiment, the test module 404 is further configured to:
[0112] The detection stimulus is sent to the sensor connection channel at a preset cycle to obtain the raw response data corresponding to each round of detection stimulus;
[0113] The original response data is mapped and corrected in real time based on the calibration curve to obtain the true response data.
[0114] The test results are obtained by judging each real response data according to the test cut-off threshold.
[0115] In one embodiment, the parsing module 402 is further configured to:
[0116] The configuration frame is restored according to its data structure definition to obtain the frame header identifier, checksum, and configuration fields. The data structure definition of the configuration frame includes the data frame header, data type, data length, function code, data content, checksum, and data frame trailer.
[0117] Frame synchronization is performed based on the frame header identifier, and data integrity is verified based on the checksum to obtain the verification result;
[0118] If the verification result indicates that the data is complete, the configuration fields will be mapped to obtain the configuration data, and the configuration status frame will be determined as successful.
[0119] In one embodiment, the configuration module 401 is further configured to:
[0120] Based on a pre-set sensor adapter template library, the corresponding configuration scheme is obtained by matching the ultrasonic radar model identification code as the index; the sensor adapter template library includes various communication protocol templates, electrical parameter ranges, calibration parameter default values, and test logic rules;
[0121] Fill in the fields of the adaptation template according to the configuration scheme to obtain the configuration frame.
[0122] In one embodiment, it further includes:
[0123] The visualization module is used to perform pass / fail statistics and anomaly analysis based on configuration data, calibration data, and test results, and generate a visual test report; the visual test report includes anomaly type statistics.
[0124] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above method embodiments.
[0125] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the above method embodiments.
[0126] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0127] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.
Claims
1. An interactive ultrasonic radar driving test method, characterized in that, The method includes: In response to the obtained ultrasonic radar model identification code, a corresponding configuration scheme is matched according to the ultrasonic radar model identification code to obtain a configuration frame; the configuration frame includes a sensor connection channel; The configuration frame is parsed to obtain configuration data and a configuration status frame; the configuration data includes communication type, electrical parameters, sensor calibration parameters, and test cut threshold; the configuration status frame includes configuration success and configuration failure. In response to the received calibration start command, the communication protocol is determined according to the communication type; the calibration start command is generated when the configuration status frame indicates that the configuration is successful. Based on the calibration function corresponding to the communication protocol, standard test excitation is sent to the sensor connection channel according to the sensor calibration parameters. Obtain the response data corresponding to the standard test stimulus, and calculate the actual and theoretical output deviation based on the response data to obtain calibration data; the calibration data includes calibration curve, error index, and anomaly flag. If the error index in the calibration data is within a preset threshold, then the calibration status frame is determined to be in the calibration completion state. If the error index in the calibration data exceeds the preset threshold, then the calibration status frame is determined to be in a calibration waiting state. If the calibration status frame is in the calibration waiting state, a recalibration instruction is generated; the recalibration instruction is used to instruct the configuration scheme to be rematched to obtain a new configuration frame; In response to the acquired test start command, a drive test is performed based on the sensor connection channel and the configuration data, and the test results are obtained by combining the calibration data; the test start command is generated when the calibration status frame is in the calibration completion state.
2. The method according to claim 1, characterized in that, The process of performing a drive test based on the sensor connection channel and the configuration data, and then correcting the results using the calibration data, to obtain the test results includes: The sensor connection channel is sent with a detection stimulus at a preset period to obtain the raw response data corresponding to each round of the detection stimulus. The original response data is mapped and corrected in real time according to the calibration curve to obtain the true response data. The test results are obtained by judging each of the real response data according to the test cutting threshold.
3. The method according to claim 2, characterized in that, The process of parsing the configuration frame to obtain configuration data and configuration status frames includes: The configuration frame is reconstructed according to its data structure definition to obtain the frame header identifier, checksum, and configuration fields. The data structure definition of the configuration frame includes a data frame header, data type, data length, function code, data content, checksum, and data frame trailer. Frame synchronization is performed based on the frame header identifier, and data integrity is verified based on the checksum to obtain the verification result. If the verification result indicates that the data is complete, the configuration fields are mapped to obtain the configuration data, and the configuration status frame is determined to indicate that the configuration is successful.
4. The method according to claim 1, characterized in that, The step of matching the corresponding configuration scheme according to the ultrasonic radar model identification code to obtain the configuration frame includes: Based on a preset sensor adaptation template library, the corresponding configuration scheme is obtained by matching the ultrasonic radar model identification code as an index; the sensor adaptation template library includes various communication protocol templates, electrical parameter ranges, calibration parameter default values, and test logic rules; The configuration frame is obtained by filling in the fields of the adaptation template according to the configuration scheme.
5. The method according to claim 2, characterized in that, The method further includes: Based on the configuration data, the calibration data, and the test results, pass / fail statistics and anomaly analysis are performed to generate a visual test report; the visual test report includes anomaly type statistics.
6. An interactive ultrasonic radar-driven testing system, characterized in that, The system includes: A configuration module is used to respond to the acquired ultrasonic radar model identification code, match the corresponding configuration scheme according to the ultrasonic radar model identification code, and obtain a configuration frame; the configuration frame includes a sensor connection channel. The parsing module is used to parse the configuration frame to obtain configuration data and a configuration status frame; the configuration data includes communication type, electrical parameters, sensor calibration parameters, and test cutting threshold; the configuration status frame includes configuration success and configuration failure. The calibration module is used to determine the communication protocol according to the communication type in response to the obtained calibration start command; the calibration start command is generated when the configuration status frame indicates that the configuration is successful. The calibration module is also used to send standard test excitations to the sensor connection channel according to the sensor calibration parameters based on the calibration function corresponding to the communication protocol. The calibration module is also used to acquire the response data corresponding to the standard test stimulus, and calculate the actual and theoretical output deviation based on the response data to obtain calibration data; the calibration data includes calibration curves, error indices, and anomaly flags; The calibration module is also used to determine that the calibration status frame is in the calibration completion state if the error index in the calibration data is within a preset threshold. The calibration module is further configured to determine that the calibration status frame is in a calibration waiting state if the error index in the calibration data exceeds the preset threshold. The parsing module is further configured to generate a recalibration instruction if the calibration status frame is in the calibration waiting state; the recalibration instruction is used to instruct the rematch of the configuration scheme to obtain a new configuration frame; The testing module is used to respond to the acquired test start command, perform drive testing based on the sensor connection channel and the configuration data, and make corrections in conjunction with the calibration data to obtain the test results.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.